<p>A method for controlling a force-commutated inverter coupled between an electrochemical cell and a power grid for adjusting the magnitude and direction of the electrical energy flowing therebetween. Both the real power component and the reactive power component of AC electrical energy flow can be independently varied through the switching waveform presented to the intermediately coupled inverter. A var error signal is derived from a comparison of a var command signal with a signal proportional to the actual reactive power circulating between the inverter and the power grid. This signal is presented to a voltage controller which essentially varies only the effective magnitude of the fundamental voltage waveform out of the inverter, thereby leaving the real power component substantially unaffected. In a similar manner, a power error signal is derived by a comparison of a power command signal with a signal proportional to the actual real power flowing between the electrochemical cell and the power grid. This signal is presented to a phase controller which varies only the phase of the fundamental component of the voltage waveform out of the inverter relative to that of the power grid and changes only the real power in proportion thereto, thus leaving the reactive power component substantially unaffected.</p>