Patent ID: 7538515

Claim:
A motor controller for controlling a motor comprising: an inverter circuit that drives the motor based on a PWM signal, the PWM signal including a first PWM and a second PWM signal; a control circuit that controls timing of supply of the PWM signal to the inverter circuit; a rotation speed detection circuit that generates an actual rotation speed signal having a first voltage corresponding to an actual rotation speed of the motor; an amplifier circuit that outputs a differential voltage signal by amplifying a difference between the actual rotation speed signal and a target rotation speed signal having a second voltage that causes the motor to rotate at a target rotation speed; a first comparison circuit that generates the first PWM signal by comparing the differential voltage signal with a carrier signal having a predetermined frequency, the carrier signal changing between an upper limit voltage and a lower limit voltage; a voltage detection circuit that outputs a switch signal for reversing a rotation direction of the motor, the switch signal having a first signal level to command the motor to rotate in forward direction when a voltage of the differential voltage signal is equal to or greater than the lower limit voltage of the carrier signal, the switch signal having a second signal level to command the motor to rotate in reverse direction when the voltage of the differential voltage signal is less than the lower limit voltage of the carrier signal, a signal generation circuit that outputs a correction voltage signal during a period of time when the voltage of the differential voltage signal is less than the lower limit voltage of the carrier signal, the correction voltage signal having a voltage greater than the lower limit voltage of the carrier signal; a second comparison circuit that generates the second PWM signal by comparing the correction voltage signal with the carrier signal; a switch circuit that supplies the first PWM signal to the control circuit when the switch signal has the first signal level, the switch circuit supplying the second PWM signal to the control circuit when the switch signal has the second signal level; and an offset voltage addition circuit that adds an offset voltage to the differential voltage signal according to the signal level of the switch signal, wherein when the switch signal has the second signal level, the control circuit controls the inverter circuit in such a manner that the motor receives reverse torque.