Applications incorporating Variable Speed Drives (VSD) may experience torsional vibration problems. The vibration phenomenon can typically appear from two reasons: Excitation of torsional resonance by pulsating torque ripple and closed loop electro-mechanical interaction between VSD and driven load. This paper aims to explain the mechanism of torsional vibration in VSD and proposes an approach to model complete drive system in order to predict the torsional vibration and optimize the control system prior to commissioning. The method is easy to apply and much less time consuming compared to time domain simulations. The theoretical results are verified on a real example of 6'100 kW compressor drive.