Most of the brand uses PIC16F72 to control current and volt.How it works?
When mains restore,inverter resume battery charging.
Charging current almost sensed through negative wire of battery (from negative track on pcb).
And dropped voltage in negative track fed to op-amp LM324 etc.
LM 324 also amplify these volts for charging current control (adc) pin of PIC16F72.
A user can control charging current with trim pot.
In sine wave inverters (h-bridge type) during battery charge upper mosfet are in sleep mode (have no signal on gates).
And lower side fets are switched with 7 to 20 khz pwm signal.
7Khz with PIC16F72 ,73 and 20 khz with dspic.
Charging current is constant (regulated) till 13.5 to 13.8v of battery.
At 13.8 to 14 v charging current decreased gradually till 0.5 amp.
This technique is also famous in battery charging as CC/CV.