A motor control device is disclosed that reduces the shock caused by
torque increase during switching output of a motor's power generator from
PWM wave voltage driving to square-wave voltage driving. Switching of PWM
wave voltage driving and square-wave voltage driving is determined based
on rotation speed of the motor and a torque instruction value. When
switching from PWM wave voltage driving to square-wave voltage driving
occurs, the voltage output of the power generator is reduced. When
generated voltage V drops below a specified threshold voltage, PWM wave
voltage driving is switched to square-wave driving.