Text this: Analysis of total harmonic distortion and switching losses of PWM in grid-connected photovoltaic system