The controller compares the reference torque with the instantaneous torque, gives the switching angle, provides a negative, zero or positive voltage for the terminal according to the torque error, and generates switching signals for all excitation phases of the motor.