Reactive power and harmonics compensation by AC/DC and AC/AC PWM converters