Patent ID: 8150580

Claim:
A motor controller comprising: a rotational angle detector that detects a rotational angle of a motor; a rotational speed detector that detects a rotational speed of the motor; a compensating current computing unit that computes, based on the rotational angle and a predetermined target current command value, and by multiplying a basic compensation value by a steering speed gain, a compensating current command value defining a current to flow into the motor to prevent occurrence of a torque ripple, which is derived from distortion in a waveform of electromotive force induced by the motor; a correction unit that corrects the predetermined target current command value in accordance with the compensating current command value; a controller which performs a feedback control for the motor in such a way that an electric current corresponding to the predetermined target current command value corrected by the correction unit flows into the motor, the controller constituting a system for controlling an electric current of the motor by the feedback control, a computing period of the compensating current computing unit being different from a control period of the controller; and means for setting the compensating current command value to zero when the rotational speed is equal to or greater than a first threshold value, by setting the steering speed gain to zero, where the first threshold value is the rotational speed of the motor where a torque ripple of the motor controlled by the controller based on the predetermined target current command value corrected by the correction unit becomes equal to a torque ripple of the motor acquired based on the predetermined target current command without being corrected by the correction unit.