To accurately extract a pulsating component generated due to a cogging torque or a torque ripple to reduce a pulsation, the pulsating component is extracted using a bandpass filter having a variable time constant, and the time constant is set according to a frequency of cogging torque or torque ripple to be extracted. Further, a reference angle for a rotation angle of a motor is preset according to a generation harmonic order of the cogging torque or torque ripple, and the time constant of the bandpass filter is set from a time period required for the motor to rotate by the reference angle.