how to calculate battery capacity for inverter