Text this: Curve fitting technique for optimal pulsewidth modulation (PWM) online control of a voltage source inverter (VSI)