The Application of Genetic Algorithms in Electrical Drives to Optimize the PWM Modulation ANDRÉS FERNANDO LIZCANO VILLAMIZAR, JORGE LUIS DÍAZ RODRÍGUEZ, ALDO PARDO GARCÍA. Universidad de Pamplona, Pamplona, Colombia jdiazcu@gmail.com, apardo3@hotmail.com, aflizcano@gmail.com. Abstract: - This paper describes a new strategy for pulsewidth modulation (PWM) optimized by a direct method and the application of genetic algorithms (GA) to minimize the harmonic content specifically the fifth and seventh harmonic of the total content, based on the minimum total harmonic distortion (THD). Described the development of the method, the guidelines to take into account including the algorithm development, the strategy within the Digital Signal Processor (DSP), and the obtained results can be visualized. Key-Words: - Pulse Width Modulation, Selective Harmonic Elimination, Genetic Algorithms, Harmonic Distortion, Digital Signal Processing, Fast Fourier Transform. I. Introduction. The great development of industrial processes supported by AC power has increased the demand for highly reliable strategies for optimal control and operation thereof, that is why, it is necessary to study and investigate various processes to meet those needs, which give rise to the development of applications such as the one presented in this work [-4]. One of the major reasons is the reduction of energy consumption of the devices, in addition to this reduction in switching losses and reducing harmonic content. The use of artificial intelligence techniques such as genetic algorithms are, establish a new optimization tool, despite its relative current implementation is not complex, so it is an efficient and attractive tool in solving a optimization problem [5]. Reviewing the literature on the subject can verify that the application of genetic algorithms in electrical drives to optimize the PWM modulation frequency inverters, data of the last decade, in the early work on the subject include that of the Authors K. L. Shi and H. Li [6], this paper applies a genetic algorithm to optimize a PWM inverter, with the results obtained over sinusoidal PWM modulation (SPWM) standard triangular and random PWM. However, both modulations are not a good starting point, since you can add other parameters such as modulation SPWM triangular asymmetry [7, 8] or use other PWM modulation to ensure lower content of harmonic distortion [9]. Others can also be used as optimization criteria harmonic is the harmonic content of the 5 th and 7 th harmonics, which harmonics are to be the most representative of lower order produced by the inverter which generates no even harmonics and the 3 rd order harmonic are suppressed proper connection with a motorcycle II. PWM modulation with the Direct method The rise of programmable digital devices, such as Digital Signal Processors or DSP's, have enabled these techniques PWM can be implemented in a comfortable and efficient way, allowing the great evolution of the modulation strategies including decreased costs for its development [4, 9]. To generate a PWM requires a certain set of switching angles (positions) are determined using numerical and computational methods. Figure shows a direct method PWM of 3 pulses [4, 9]. The direct method PWM has the advantage of not using a carrier signal, as the case of the Sine PWM modulation (SPWM), since the algorithm generates the switching angles by means of calculation (simulation) and then is recorded to the digital electronic device. Fig. Direct method PWM modulation. ISBN: 978--6804-03-6 2
We discuss the procedure used to generate the Direct Method PWM from the following expressions [4, 9]. From the sine reference expression: u Vm sen t () Where: u Desired output voltage [V]. V m Maximum value (amplitude) [V]. Angular frequency ( = 2f) [rad/sec]. f Frequency [Hz]. The area of a half period (0 to / ). A seno Vm Vmsen t dt cos t 0 0 2Vm (2) This can be divided into Np (number of pulses) regular time intervals as shown below [4, 9]: t0 0 t np (3) 2 i t2 ti i 0,, 2,, np n p np np tn n p The area of each of the intervals is: ti t V i m Ai Vmsen t dt cos t ti (4) ti Vm Ai cos ti cos ti Knowing the area of each interval and setting the maximum value of the PWM waveform equal to the amplitude of the sinusoidal signal, one can determine the width of the pulses. Ai tpi (5) Vm Finally, for the formation of the PMW signal under the criterion above, are located each of the pulses obtained at the center of each of the intervals, mathematically expressing this set of pulses in an x,y coordinate plane, where the axis x corresponds to the time axis y to the signal amplitude [4], as shown: xi xi tpi xi xi tpi x, Pulso i x, y (6) 2 2 2 2 0 y V m where i 0,, 2,, n A. System Simulation To validate the above methodology and obtain the PWM modulation optimized by the direct method and a model is developed using the Simulink for generating the PWM (Figure 2). p V 2 fase 4 Tiempo 3 Np 5 Pp pi sin fix AND Logical Operator < > i Xi Sign Xi Fig. 2. Simulink Model of Direct Method PWM modulation With this predecessor block is generated which has the following inputs: the amplitude (V), frequency (), the number of pulses (Np) and the asymmetry of the triangular carrier signal (Pulse position or Pp), as shown in figure 3, it varies in a range of 0 to and determines the position of the pulses. Fig. 3. Pulse position values. Figure 4 shows the result of modulation to an inverter stage and the next shows the spectrum of harmonics to a fundamental frequency of 60 Hz, a pulse number Np = 33 and pulse position Pp = 0.45 asymmetrical with respect to central axis reference. In figure 5 shows the simulation program for the description of PWM developed and the respective calculation of harmonic content (THD) total and 5 th and 7 th harmonics both graphically and numerically. Fig. 4. PWM modulation for np = 33 and pp = 0.45. Xi_a Xi_a D C Scope Q!Q Tpi Tpi cos cos Abs u 2 Mod PWM ISBN: 978--6804-03-6 22
Fig. 5. Simulink model for harmonic distortion. Figure 6 shows the application of the Fast Fourier Transform (FFT) to the PWM modulation. Fig 6. FFT analysis for PWM signal. Input parameters are positioned randomly, which does not ensure that the PWM modulation obtained is the best, as can be seen the frequency spectrum, including harmonic content has direct component, which is undesirable. But he notes that the fifth and seventh harmonics are quite low in amplitude that makes it not all bad the response. Numerically obtain the result of total harmonic distortion for the fifth and seventh harmonic equal to 23%, which is adequate but can be reduced further with an optimization process. III. Optimization of the PWM Modulation with Genetic Algorithms The purpose of the application of genetic algorithms is the optimization of the PWM modulation, this is achieved by creating a set of individuals (different values of frequency, pulse number and pulse position) representing possible solutions to the problem in particular you want to optimize and find the lowest harmonic distortion of the system, which makes the objective function (fitness) to optimize the harmonic distortion is equivalent to the 5 th and 7 th harmonics of the PWM output signal. Each of the values THD is subtracted from the constant α which corresponds to the maximum permitted standard distortion value within the genetic algorithm. The objective function is: 2 2 v5 v7 F (7) v Where: F Objective function (fitness). Maximum fitness value. v 5 Magnitude of 5 th harmonic voltage. v 7 Magnitude of 7 th harmonic voltage. v Magnitude of main harmonic voltage. In the above equation are taken only the magnitudes of the 5 th and 7 th harmonic, since the shape of the signal must present only odd harmonics and the third harmonic is then removed from the delta connection of three phase asynchronous motor. The representative harmonics by low order would be the 5 th and 7 th harmonic, the other harmonics for being away from the fundamental frequency much less influence on the functioning of the machine. In figure 7 shows the block diagram of the structure of the genetic algorithm implemented [7]. As seen from this figure the first step performed is to create an initial population that refers to possible solutions to the problem, then makes the evaluation of the objective function and only the fittest individuals will advance to the next stage in the which is applied to the mutation and crossover to generate new individuals with better characteristics to be evaluated again. This procedure is repeated successively until you find the best possible outcome in 00 generations. The genetic algorithm can be stopped in two ways, first is whether it meets the desired optimization and the second if you end up running the stipulated number of generations. One of the great advantages of using a genetic algorithm is that it ensures that this does not lead to an answer of zero error achieved by the end of the process the individual best suited to achieve the lowest possible error. As mentioned above genetic algorithms based on the fact of random solutions, in our case study we decided to take a range of individuals from 00 according to the available hardware to apply the tool which is restricted to the number of possible solutions, which prevents us from establishing a wider range of individuals. ISBN: 978--6804-03-6 23
The algorithm is developed in Simulink tool of Matlab, which works interactively with the data generated by the model of three-phase inverter, so the algorithm is applied immediately and are generated optimal solutions for reducing of harmonic distortion. To show the algorithm by which to obtain the optimum individual and get the least distortion is shown in Figure 8 the Fast Fourier Transform (FFT) of the PWM signal optimized for 60 Hz. Fig. 8. PWM Signal Spectrum for 60 Hz. The figure above shows the decrease of 5 th and 7 th harmonics in a considerable way, the absence of even harmonics and the increase of the 3rd harmonic is not important because the motor delta connection of phase does not allow these to circulate the power supply. When applying the PWM modulation can be optimized to get the motor current waveform and its frequency spectrum (Figure 9) which yields a harmonic distortion percentage less than %. Fig 7. Genetic algorithm diagram. Genetic algorithms, have a common feature with the various artificial intelligence techniques, it is significant or considerable time it takes to run and find possible solutions to our case and with the number of individuals is taken from 4 to 6 hours to run as a whole, the idea of taking a genetic algorithm as a tool for finding solutions is to fully optimize the result. For each of the frequencies algorithm 00 evaluates different possible solutions (individuals), statistics are generated when the algorithm classifies each of the solutions and placed in the first position the response clearer and better results (optimal) to obtain a significant reduction in harmonic distortion. A. Results Table I shows the results for some of the frequencies near 60 Hz, which presents the best-fit parameters for the implementation of modulation. Table I: Optimization for frequency near (60 Hz). Frequency (Hz) Pulses (Np) Position (0<Pp) THD: 5 th +7 th (%) 58 29 0.966 0.996 59 0.9520 5.2787 60 5 0.3392 6.2368 Fig. 9. Spectrum of power to 60 Hz. IV. Strategy Implementation in DSP 56f80 As a control device used a floating point Digital Signal Processor DSP 56F80 from Freescale company, as compared to another device such as a microcontroller, has more computing power and more memory storage, for the implementation of the strategy chose to perform the calculations within the DSP algorithm, Figure 0 shows a block diagram of the implemented system. Fig. 0. Block diagram of the System. ISBN: 978--6804-03-6 24
This diagram above shows that the data, such as the number of pulses, the working frequency and pulse position are sent from a computer graphical interface to the DSP which captures data, processes and generates control signals go back to the inverter which connects the three-phase motor control. The control system as shown in figure is composed of the DSP, the programmer of the DSP, the matching circuit TTL to RS232 (constructed from a MAX232) and for recording oscilloscope waveforms. Fig. 3. Voltage between phases (Vab). Fig. 4. Line voltage (Va). Fig.. Control system with Digital Signal Processor: DSP 56f80. The system starts when through the graphical interface sends data to the processor that stores the PWM waveforms result of the optimization process and makes the formation of the phase modulation PWM outputs of which are displayed on the oscilloscope (see Figures 2 to 4). In figure 2 shows the 6 control signals that go to the inverter, 3 triggers from the top of the bridge and 3 triggers from the bottom, 20 degree out of phase with each other. Fig. 2. Optimized PWM modulation signals generated for DSP (np = 5). In the figures 3, 4 and 5 show the phase voltage (AB), the line voltage (A) and the harmonic spectrum generated at the output of the inverter. Fig. 5. Harmonic spectrum. V. The Improve of the Energy Quality When designing a PWM strategy that provides the best conditions in terms of harmonic distortion reduction ensures proper delivery of a signal which will provide the best features of work to the electrical machine or device that is connected, thus contributing directly to the power quality [0]. With the above motivation, the PWM strategy that arises in this paper addresses throughout its development an explicit goal: optimization of harmonic distortion. The development of this strategy PWM low harmonic content generates greater reliability when assessing the quality of power delivered by the inverter, thus allowing for this modulation with a magnitude of greater efficiency in terms of reduced harmonic distortion generated. ISBN: 978--6804-03-6 25
VI. Conclusions Genetic algorithms are robust and efficient strategies for solving nontrivial problems that contribute greatly to the optimization of different process where required. Through the use of these techniques have been able to find the best working conditions for different frequency sweeps where PWM modulation works and comes to be inferred that the optimal modulation obtained is possible. By optimizing the PWM signal directly minimize the total harmonic distortion of motor current at a rate good enough for the machine (<%). At the end of the selection process using Genetic Algorithms, settled the fittest individuals to find the lowest possible harmonic distortion provided by the inverter at the fifth and seventh harmonic. Development of Genetic Algorithm is offline so because these artificial intelligence strategies are characterized by their long generation time and high consumption of memory resources, so that the fittest individuals are obtained at the algorithm and simulation then programmed the DSP. Finally, once led the analysis of theoretical and practical results of optimization of PWM, the study provides a minimization of the harmonic content optimized PWM wave basis, developed by the authors as a starting point of the optimization procedure, using an optimization criterion (fitness) based on the content of the 5 th and 7 th harmonics that ensures optimization with less computational effort we do is calculated based on the value of total harmonic distortion (THD) for its determination requires knowledge of each individual harmonic. The optimized PWM waveform ensures the efficient functioning of the whole inverter - motor, as it minimizes the 5 th and 7 th harmonics, which are the most responsible for the braking torques parasites being negative sequence and is able to reduce the number of pulses (Np) PWM modulation thus reducing switching losses in the inverter. [5] D. E. Goldberg. Genetic algorithms in search, optimization & machine learning. Addison-Wesley, Reading, 989. [6] K. L. Shi and H. Li. "Optimized random PWM strategy based on Genetic algorithms". IEEE Trans. Mag Vol 33, pp. 07-, 2003. [7] B. Justus Rabi. "Minimization of Harmonics in PWM inverters based on Genetic Algorithms". Journal of Applied Sciences 6 (9), pp. 2056-2059, 2006. [8] N. Tutkun. "A new approach to decrease modulation distortion total harmonic voltage waveform of the SPWM technique using genetic optimization". International Conference on Renewable Energies and Power Quality (ICREPQ'08), Magdalena Palace in Santander, 2-4 March 2008. [9] J. L. Diaz, A. Pardo and E. Y. Rios. "Implementing an optimized PWM control of a three-phase induction motor using DSP TMS320C646 DSK board". Colombian Journal of Advanced Technologies, Vol, No. 3, 2009. [0] G. Carrillo, et al. "Characterization, compensation and measurement of a distribution system with high power harmonic pollution". First International Symposium on Electric Power Quality, Bogotá, November, 200. References: [] M. H. Rashid, Power Electronics Handbook, Second Edition: Devices, Circuits and Applications. Academic Press, 2 ed, 2007. [2] M. H. Rashid, Power Electronics. Prentice Hall, India, 2008. [3] N. Mohan, T. M. Undeland and W. P. Robbins, Power Electronics. Converters, applications and design. McGraw Hill Interamericana, 3rd Edition, Mexico City, 2009. [4] A. Pardo and J. L. Diaz, Application of frequency converters. PWM Strategies. Editorial Java E. U., Colombia, 2004. ISBN: 978--6804-03-6 26