<p>A control device which controls a rotating electrical machine which functions as a motor and a generator comprises: a power transformer circuit which carries out a function as an inverter which supplies drive current from a battery to a rotating electrical machine and a function as a rectifier which rectifies generated power output of the rotating electrical machine and supplies same to the battery; and a controller which controls the transformer circuit to be in a state of short-circuiting a three-phase armature coil of the rotating electrical machine when the battery is disconnected from the transformer circuit and the DC output voltage of the transformer circuit becomes excessive, and thereafter when the direct current voltage of the transformer circuit has declined to a set minimum voltage to be in a state of disabling a monophasic short-circuit of the armature coil and short-circuiting only a diphase thereof.</p>