Voltage and frequency controlled ac motor