You asked for it.
The sinewave PWM H-bridge on LF inverters is on primary side of heavy silicon-iron LF transformer. If secondary AC side transformer instantly changes from a load to a source (in sync) like when AC coupling, the PWM H-bridge, without missing a beat, will turn into rectification of the pushed back feed AC power creating DC charge push into batteries.
Only difference between AC inverting, battery charging, back feeding grid, limiting AC input draw current, or supplementing AC output is just a slight tweak to H-bridge PWM duty cycling to make the AC sinewave output of LF transformer be a little more or a little less than AC input voltage.
This is all controlled via AC current measurements on the three connection AC node.
View attachment 266756
HF inverter is more complicated with more semiconductors, but less cost and much less weight. It steps up battery voltage to high voltage DC. There is a high frequency ferrite transformer that has a high frequency primary side H-bridge made of MOSFETs and secondary side synchronous rectification H-bridge made with insulated gate bipolar power transistors for high voltage DC. There is an output L-C filter similar to a buck DC to DC converter that integrates the variable duty cycle high voltage pulses to HV DC, about 500vdc for 230 vac inverters, about 250vdc for 120vac inverters.
Finally, there is a third H-bridge made of insulted gate bipolar power transistors that chops up the HV DC via a PWM, sinewave shaped variable duty cycle followed by L-C filter to create the inverter's sinewave AC output.
It is the HV DC inductor filter that causes the switch over time delay issue on HF inverters to switch from sourcing to AC PWM inverter or reverse direction to charge battery from HV DC node. The energy stored in the inductor must be flushed before power flow direction can be reversed.
Solar charge controller feeds the HV DC node. Sinewave output H-bridge also can rectify the AC input to produce HV DC for battery charging from grid or generator.
It is a bit more complicated to explain why HF inverters often have issues with high surge current load,, but it has to do with the HV DC filter capacitors having very little energy storage so supply surge and/or the battery to HV DC converter not having the peak power overhead capable ferrite transformer. If ferrite transformer saturates due to peak load surge it can blow out the primary side MOSFET's.
View attachment 266757