Grid-connected inverter battery buffer