A method and apparatus for managing system energy flow. The apparatus includes an energy storage unit to store energy to be used by a system and a power conversion unit configured to be coupled between the energy storage unit and a utility grid. The apparatus also includes a controller