Theoretical and experimental investigation of switching ripple in the DC-link voltage of single-phase H-bridge PWM inverters