Genetic Algorithm Technique for 7-Level Cascaded H-Bridge Multilevel Converter THD Minimization

Multilevel converters (especially cascaded H-bridge converters) have been widely applied to industrial applications, today. One of the main problems of multilevel converters is high magnitudes of total harmonics distortions which has an effect on the power quality of systems. In this paper, a genetic algorithm (GA) technique is applied for the minimization of total harmonic distortion (THD) for a 7-level cascaded H-bridge converter. By using the genetic algorithm, the best switching angles and the best voltage magnitudes for a 7-levels cascaded H-bridge converter are calculated for minimization of THD. Finally, the calculated angles are applied to simulation results to validate the approach performance.


I. INTRODUCTION
Recently, multilevel converters have been used in various industrial fields such as motor drives, static reactive compensators, transmission systems, and renewable energy sources [1]. The most important advantage of multilevel converters is the capacity of stepping output voltage generation and low switching frequency. This advantage gives a high power quality, low switching losses, the ability to generate a higher voltage level than conventional two-level converters and reduced electromagnetic interference [2]. Voltage source multilevel converters are a suitable configuration for achieving high voltage and high-quality waveforms. Among different configurations, cascaded multilevel converters are considered are highly considered compared to other types of converters due to the low number of components and simple control. The operation principles of these converters are based on the accumulation of input dc supplies to achieve desirable voltage levels at the output. A cascaded H-bridge (CHB) converter with n dc voltage source at the input can generate 2n + 1 voltage levels at the output which leads to reducing the total harmonic distortions (THD) voltage compared to the two-level conventional converter [3], [4]. Regarding switching frequency, the commutation strategy of multilevel converters are classified as high switching frequency which is similar to pulse width modulation (PWM), and low switching frequency which is often equal to the components' switching frequency, as a result, the staircase output voltage waveform is created. The second group includes three basic switching strategies that are referred as step-by-step, optimization of harmonics on the staircase waveform, selective harmonic elimination (SHE) and optimization of total harmonic distortion [5]. There are different optimization algorithms for solving theses types of problems. Selective harmonic elimination is an effective method for selecting the switching angles that minimize the THD of the output waveform. This method used a mathematical theory for finding switching angles of multilevel converters, and when the number of levels of the converter is high, it cannot solve high order polynomials. Today, evolutionary algorithms are used to overcome these kinds of problems [6].
In this paper, a genetic algorithm technique is applied to determine the switching angles for a 7-level cascaded multilevel converter in order to reduce THD. In this case, the GA technique optimization toolbox in MATLAB software is used to find the optimal switching angles. To demonstrate the performance of the genetic algorithm it was presented on a 7-level two unit CHB are presented.

II. CASCADED H-BRIDGE MULTILEVEL CONVERTER
The power structure of a single CHB inverter is shown in Fig. 1. This topology consists of n series CHBs. In this topology, the values of the input dc supplies are the same, and each CHB creates three voltage levels of +V dc , −V dc and 0. Thus, the total number of output voltage levels is:

III. FORMULATION OF PROBLEM
In this study, a 7-level CHB converter is considered for reducing the THD magnitude. This topology has three Hbridges and can produce seven voltage levels. The power circuit of the 7-level CHB converter is shown in Fig. 2 along with the output voltage waveform. The switching pattern for the 7-level CHB converter are given Table I. Harmonic spectrum of this converter is displayed in Fig. 3 with a staircase modulation technique. In this case, the number of  Vo S11 S21 S31 S41 S12 S22 S32 S42 S13 S23 S33 S43   switching angles are three: α 1 , α 2 and α 3 . The output voltage waveform is obtained from the sum of the output voltage of each H-bridge. The output voltage waveform of the 7-level CHB converter is written as a Fourier series as following: 4V dc nπ (cos(nα 1 ) + (cos(nα 2 ) + cos(nα 3 )) The 4 nπ represents the maximum value of the main component of the output voltage of an H-bridge, and as well as the creation of an adjustable modulation index that can be used as follows: Here m a is the modulation index, and V 1 is the main component of the output voltage the 7-level CHB converter.

IV. GENETIC ALGORITHM TECHNIQUE
Genetic algorithm is one of the most important algorithms that is used to optimize defined functions on a limited domain. In this algorithm, the past information is extracted according to the inheritance of the algorithm and is used in the search process. A genetic algorithm repeatedly modifies a set or a population of solutions or individuals in the course of its entire run. At each step, the genetic algorithm selects individuals from the current population to be parents based on certain criteria. The parents are then used to produce the next generation of individuals, called children. Over successive generations, the population evolves toward an optimal solution [7]- [9]. Fig. 4 shows the structure of the genetic algorithm. GA implementation involves the following tasks: a) Encoding b) Initial population c) Reproduction (Elitist, Crossover, Mutation) d) Generations

A. Variables
In the case of selective harmonics elimination problem, the switching angles have to solve which are non-linear transcendental. Next, the switching angles are applied to control the converter in order to minimize THD. In this case, chromosomes are applied as a solution to this kind of problem. Then, each chromosome is defined as an array of variable values to be optimized. If the chromosome has K v variables given by C 1 , C 2 .C 3 , · · · , K v then the chromosome is written as an array with 1 × n elements so that: In case of reducing THD, variables are switching angles that for a 7-level CHB converter are three. So, the variable values are represented as floating-point numbers.

B. Fitness Function
In this paper, firstly the switching angles are selected so that the magnitude of selective harmonics reached is as close to zero as possible in order to reduce the percentage of THD. Therefore, the fitness function is obtained as follows: C. Encoding (Chromosome) A string or sequence of bits, as a coded form, is an answer (suitable or inappropriate) of the desired problem. If a binary code is used, each bit can accept one of the zeroes and one values. Each of the chromosome bits of the last problem is a potential answer to the variables' problem.

D. Initial Population
To start the genetic algorithm, we must have some type of information of the problem, and since we know that each answer is actually a chromosome, then in this step, we only need to create several primary chromosomes. The important condition in this step is that the population should be completely randomized.

E. Reproduction
This operator which is a new generation of solutions (called child) generates, by choosing the previous generation (called parent) with the highest fitness. In each generation, a number of elements of the population find the opportunity to reproduce. Parents are referred to these elements that are selected from the population. Generally, there are three mechanisms applied to create a new generation, explained as follows: 1. Crossover: possibility to combine the detailed solutions and thus to obtain higher quality responses. In the process of recombination, randomly, the portions of the chromosomes are replaced with each other. This makes enables the children to have a combination of their parents' characteristics while not being exactly like one parent. The objective is to produce a new child in the hope that the dominant qualities of the two beings are gathered together in their child and produce a stronger creature.
2. Mutation: provides a random feature and the ability to escape from local optimization points. The genetic algorithm performs the following actions: -It chooses a number of the child's chromosomes randomly and changes the values of one or more of its genes. Also: For each chromosome it performs the following actions: -It produces a random number between zero and one. If the generated number is smaller than g, it performs the following for each g; otherwise, it will ignore the mutation of the chromosome.

F. Replacement
Each replication of the algorithm that leads to the creation of a new population is called a generation. The new generations created by selections such as a roulette-wheel selection, stochastic universal selection, ranking selection and tournament selection), recombination, and mutation replace the original parental population. Finally these steps are repeated until one or more of the stopping criteria are met.

V. SIMULATION RESULTS
MATLAB genetic algorithm programming environment is applied to obtain the best way of reducing THD's magnitude. Three case studies are considered to reduce THD's magnitude a 7-level CHB converter. The first case is, three switching angles are variables and three DC voltage magnitudes are constant, the second case is, three switching angles are constant and three DC voltage magnitudes are variables and the third case is, three switching angles and three DC voltage magnitudes are variables. Additionally, the simulation results of the CHB converter is done under MATLAB/Simulink software to demonstrate the control of the converter and calculation magnitudes of THD and FFT of the output waveform. Table  II provides the parameters of the genetic algorithm that have been applied to the calculation of optimal switching angles and optimal DC voltage magnitude, in two GA approaches based on maximizing the performance presented in [10].

A. First Case Study
In this case, the variables have three switching angles, but the output voltage magnitude that 7-level CHB converter generates have a constant value of 1.0P.u so the magnitudes of DC power supplies are constant with V dc1 = V dc2 = V dc3 = 1/3P.u. In this case, the fitness function (FF) with constant values of is defined as: The total number of variables that correspond to the number of switching angles are K v = 3. The relation between switching angles or linear inequalities and the values of lower bound (LB) and upper bound (UB) are as follows:    Table III and the FFT analysis of the output voltage is shown in Fig.  5. As one can note, the magnitude of selected harmonics is eliminated by the GA technique.

B. Second Case Study
In the second case, the three switching angles that calculated in the previous part are considered as constants and three voltage magnitudes are variables. The switching angles are α 1 = 29.79 • , α 2 = 8.82 • , α 3 = 52.65 • . By replace the switching angles in the fitness function (equation 8), the new cost function is defined as follows: inequalities and the values of lower bound (LB) and upper bound (UB) are as follows: The voltage magnitudes are calculated based on two GA approaches (Table II) and the results are shown in Table IV. Also, the simulation results of the second case study are shown in Fig. 6(a) and 6(b). THD's magnitude is 5.77%.

C. Third Case Study
In the third case, the three switching angles and three voltage magnitudes are variables. The switching angles are α 1 , α 2 , α 3 and three voltage magnitude are V dc1 , V dc2 , V dc3 . By replace the switching angles and voltage magnitudes in the fitness function (equation 8), the new cost function is defined as follows: In this case, the total number of variables that correspond to the number of voltage magnitudes and switching angles are K v = 6.   The relation between voltage magnitudes, switching angles and the values of lower bound (LB) and upper bound (UB) are as follows: LB 3 = 0 0 0 0 0 0 (18) The three voltage magnitudes and three switching angles are calculated based on two proposed GA approaches and the results are given in Table V. Also the simulation results of the second case study are shown in Fig. 7(a) and 7(b). THD's magnitude is 6.51%.

D. Cost Functions and RMS Definitions
By adding two other indicators to the F F a more complex process for reducing harmonics and obtaining practical results for multi-level inverters: 1-Add size function V rms to reduce THD and create higher output voltage.
2-Add battery cost function and switches to find the best price, to perform the results, we define the function of V rms in genetic algorithm in following way: The best value for the above equation is zero, because the effective voltage is the ideal value of √ 2 2 , which by approaching the variable value, the function limit tends to zero. Since each cell of a CHB converter consists of a constant voltage source and four power switches, the cost function (CF) is define as follows: Where DC price is the price of each DC sources and S price is the price of each power switch. The devices cost is given in Table VI. The best value for the above equation is 1 since the most economical condition for the above equation is to obtain exact values consistent with the variables created by the above equation because all the functions are impressed logically and uniformly, all functions are defined in Per-Unit (P.U) system. Therefore, the final goal is creating a function that the values of T HD, F (V rms ), CF be minimum.

E. Quality Coefficients Definition
If the objective function is defined as follows:   If K 1 = K 2 = K 3 = 1, we have looked at the objective function from the economic and technical points of view equally.
If K 1 = K 2 = 0.8, K 3 = 2, we have defined the objective function more than the economic point of view.
If K 1 = K 2 = 1, K 3 = 0.5, we consider the objective function from the technical point of view.
Considering the Tables VII, VIII, XI the following information can be deduced: 1-THD's value is much better in technical mode than the economic and economical mode in all three case studies.
2-The V rms of the inverter is close to √ 2 2 . 3. The THD's value and V rms in the third case study are much lower than the first and second case studies because of the α i and V dci change simultaneously.

VI. CONCLUSION
In this paper, to reduce the total harmonics distortion of a 7-level CHB converter, a genetic algorithm technique was presented. The genetic algorithm technique applied determined three switching angles to control of CHB converter. Genetic algorithm solved the problem of elimination of harmonic order, and the magnitude of THD was reduced. MATLAB GA optimization toolbox was applied to find the switching angles and DC voltage magnitudes to validate the performance of the genetic algorithm, the simulation results of the 7-level CHB converter were presented under a MATLAB/Simulink environment.