In this paper, a method for voltage harmonic elimination in a pulse width modulated (PWM). single phase inverter using genetic algorithms (GAs) is proposed. We explain the resolution method procedure of the non-linear equation systems in order to achieve the appropriate switching angles. The output voltages with k pulses per half cycle are written in terms of switching angles using Fourier series, and the best switching angles are calculated off line to eliminate the third, fifth and seventh harmonics. Then problem is redrafted as an optimization task, and a solution is sought through GAs. For performance comparison with GAs, the Newton-Raphson method is also applied to the present problem. Comparison shows that the genetic algorithm method has some advantages such as a reduced computational burden, faster convergence and guaranteed global optima in most cases relative to the Newton-Raphson method. The developed analysis is experimentally verified by an experimental implementation. (c) 2005 Elsevier Ltd. All rights reserved.