Bidirectional power inverter (AC/DC DC/AC)