Variable-frequency motor