Patent ID: 7102322

Claim:
A motor controller comprising a PWM output section and a PWM inverter, the PWM output section outputting a gate ON/OFF signal by comparing a DUTY instruction value and a carrier wave, the PWM inverter being formed of a plurality of switching element circuits in parallel, each switching element circuit being formed of a pair of switching elements in series, wherein the PWM inverter converts direct-current power supply into three-phase driving power by turning on and off each switching element based on the gate ON/OFF signal, and supplies the three-phase driving power to a motor, wherein dead time is set in the gate ON/OFF signal for preventing arm short circuits in each switching element; a current direction detection section for detecting a direction of current for each phase; a memory section storing, for each phase, a first compensation amount that corresponds to a case where the direction of current is a positive direction, and a second compensation amount that corresponds to a case where the direction of current is a negative direction; a dead time compensation section for correcting the DUTY instruction value for each phase and the direction of current of the phase by adding the first compensation amount or the second compensation amount to the DUTY instruction value according to the detected direction of current; and an actual DUTY value detection section that measures time in which the output voltage of each phase of the PWM inverter becomes the power supply voltage in one cycle of the carrier wave, thereby detecting an actual DUTY value that corresponds to the DUTY instruction value, wherein the dead time compensation section adds a difference value between the DUTY instruction value before the correction and the actual DUTY value to the compensation amount used in the correction, thereby determining a new compensation amount, and the dead time compensation section renews the compensation amount used in the correction with the new compensation amount and stores the new compensation amount in the memory section.