Patent ID: 8044621

Claim:
A motor controller to drive a motor including a position detector, the motor controller comprising: a position-signal generation unit configured to generate a position signal based on a position detection signal detected by the position detector; a velocity control unit which generates a torque instruction by using a velocity instruction and a velocity signal; an electrical-angle generation unit configured to generate an electrical angle by using the position detection signal; a trace unit configured to store the torque instruction and the electrical angle for a given period; a Fourier transform unit configured to Fourier-transform the stored torque instruction and configured to extract only a first- and a second-order frequency components caused by the motor controller and a sixth-order frequency component caused by the motor among frequency components including in the Fourier-transformed torque instruction; an order-component extraction unit configured to extract an order component having a largest spectrum from the first-, second-, and sixth-order frequency components extracted by the Fourier transform unit; a correction-signal generation unit configured to generate a sine wave correction signal by inverse-Fourier-transforming the torque instruction of the order component extracted by the order-component extraction unit; an adder which adds the sine wave correction signal to the torque instruction, and generates a new torque instruction; a motor drive unit configured to supply power to a motor based on the new torque instruction; and a first sine-wave-correction-signal storage unit configured to store the sine wave correction signals generated by inverse-Fourier-transforming the torque instruction of each of the first- and the second-order frequency components and configured to store the sine wave correction signals generated by inverse-Fourier-transforming the torque instruction of the sixth-order frequency component.