ABSTRACTThe present study explores the influence exerted by various pulse width modulation (PWM) techniques upon harmonic distortion and switching losses of a voltage source inverter. In the context of this inquiry, a generalized algorithm for variable frequency operations, inspired by continuous and discontinuous PWM is outlined in this article. The algorithm is explicitly formulated as a function of fundamental frequency and the load power factor angle with the objective of minimizing total harmonic distortion (THD) and switching losses within a specified frequency range. The algorithm is segmented into various regions of frequency, guided by the theory that each region corresponds to a distinct PWM technique that yields reduced harmonic distortion. In this article, a minimum switching loss algorithm is introduced and implemented using both BCPWM and ABCPWM techniques. The algorithm is specifically designed to minimize switching losses across the entire range of load power factor angles. The integration of switching loss algorithm with the selection of the optimal PWM technique across different frequency ranges results in reduced switching losses and harmonic distortion. This leads to a comprehensive PWM algorithm that efficiently reduces both THD and switching losses during dynamic frequency and load changes. Experimental and theoretical evidences demonstrate the efficacy of the proposed algorithm in attaining minimum harmonic distortion and reduced switching loss operation during variations in fundamental frequency and load.