In a controller, a voltage controller operates, in an initial excitation mode, to turn selectively on and off a switch to supply an excitation current as an initial excitation current to the field winding, and operates, in a power generation mode, to selectively increase and reduce the excitation current to be supplied to the field winding to regulate an output voltage of the power generator to a target value. A mode-shift determiner determines, while the voltage controller operates in the initial excitation mode, whether to shift an operation mode of the voltage controller from the initial excitation mode to the power generation mode based on: a measured rotation number of a rotor, a threshold rotation number of the rotor, and a preset time period, the time period being equal to or longer than an expected maximum value of cycle of pulsations of rotation of the engine.