Generation of torsional excitation in a variable-speed-drive system