Variable-frequency speed control