Patent attributes
A torque ripple and a position error caused by an offset error of the current sensor affects an electrical angle frequency of a motor. In an apparatus of the present disclosure, a computation device executes a power spectrum computing process when a three-phase alternating current motor is at a constant speed, and a value obtained by subtracting a position command value from a position detected by a position detector is fast Fourier transformed, to compute a power spectrum of a position error signal at the electrical angle frequency. Then, the computation device executes an offset correction computing process, to evaluate the power spectrum and to update an offset correction amount. By repeatedly executing these processes when the three-phase alternating current motor is driven at a constant speed, the torque ripple and position error caused by the offset error are reduced.