Control and modulation of medium-voltage drives