Charging inverter battery model