Analytical calculation of the average and RMS currents in three-level NPC inverter with SPWM