Design of an improved PWM inverter using PI controller