A control device determines whether a motor generator is controlled in a
PWM control mode, an overmodulation control mode or a rectangular-wave
control mode. If a command to perform a boosting operation by a voltage
step-up converter is issued while the motor generator is controlled in
the rectangular-wave control mode, the control device controls an
inverter to drive the motor generator by switching the control mode to
the overmodulation or PWM control mode. Further, the control device
controls the inverter to drive the motor generator by suppressing
increase of a torque command value.