A Quasi Optimal Technique for the On-Line Control of AC/DC and DC/AC PWM Converters