Bidirectional energy storage off-grid inverter