An inverter needs Pulse-Width-Modulation and a voltage sensor for voltage regulation. Then when the sensor shows the output voltage dropping, the PWM circuit increases the pulse widths that raises the voltage. When the output voltage rises then the opposite occurs and the pulse widths become less.