PURPOSE: To flexibly and safely operate by switching one power source to the other power source even when a commercial power source voltage and an output voltage of an inverter have the same gradient and a voltage difference is substantially zero.
CONSTITUTION: A voltage gradient detector 7 outputs a predetermined signal only when the voltage gradients of an inverter 1 and a commercial power source coincide. A voltage difference detector 8 detects a voltage difference between the inverter 1 and the commercial power source, and outputs a predetermined signal only when both substantially coincide. The outputs of the detector 7 and the detector 8 are introduced into an AND gate AN1, and the outputs of the gate AN1 and a synchronous detector 4 are applied to an OR gate OR1. Accordingly, the voltage gradients of the inverter 1 and the commercial power source coincide not only while the voltages of the inverter 1 and the commercial power source are synchronizing but also while they are asynchronous, and they are switched when a difference of both is substantially zero.