Skip to main content

Minimization of total harmonic distortions of cascaded H-bridge multilevel inverter by utilizing bio inspired AI algorithm


Minimizing total harmonic distortion (THD) with less system complexity and computation time is a stringent constraint for many power systems. The multilevel inverter can have low THD when switching angles are selected at the fundamental frequency. For low-order harmonic minimization, selective harmonic elimination (SHE) is the most adopted and proficient technique but it involves the non-linear transcendental equations which are very difficult to solve analytically and numerically. This paper proposes a genetic algorithm (GA)-based optimization technique to minimize the THD of cascaded H-bridge multilevel inverter. The GA is the finest approach for solving such complex equations by obtaining optimized switching angles. The switching angles are calculated by the genetic algorithm by solving the nonlinear transcendental equations. This paper has modeled and simulated a five-level inverter in MATLAB Simulink. The THD comparison is carried out between step modulation method and optimization method. The results reveal that THD has been reduced from 17.88 to 16.74% while third and fifth harmonics have been reduced from 3.24%, 3.7% to 0.84% and 3.3%, respectively. The optimization method along with LC filter significantly improves the power quality providing a complete sinusoidal signal for varying load.


Power generation from renewable energy sources (RES) is increasing and being integrated in the conventional grid through an intermediate conversion. The power electronics interfaces such as inverters are used as a conversion tool that integrates the RES in the power grid. An inverter can generate an output of square wave which is of two levels or a quasi-square wave which has three-level or modified form of square wave [1]. For some applications, the two-level or three-level inverter does not meet the demand because of low-quality waveform. To overcome this problem, multilevel inverters (MLI) can be used [2]. MLIs can provide a multi-stepped output of low frequency or high frequency. The multi-stepped output minimizes the harmonic content and a passive filter helps in attaining a sinusoidal output waveform [3, 4]. MLI is one of the best possible options for high power, medium voltage, low energy loss, better power quality, and high efficiency. Furthermore, MLI can be used for selective harmonic filtering, VAR compensation, and drive applications.

By using several DC input sources to the multilevel inverter, staircase voltage waveform is obtained [1]. The efficiency of multilevel inverters is gauged upon the content of harmonic level, i.e., total harmonic distortion (THD). Singh and Garg [5] focused on the output waveforms of different multi-level inverters models designed n Simulink, which analyzed their respective THDs. It was verified that the THD decreases with an increase in the voltage levels of an inverter.

MLI enables direct integration with the medium or high voltage utility grid. The integration with medium or high voltage utility grid is not possible with single semiconductor switches of two-level inverter [6]. Different control schemes are adapted to trigger the switches. The most common strategies are selective harmonic elimination (SHE), pulse width modulation (carrier-based), and space vector modulation [7]. Sinusoidal and space vector pulse width modulation are categorized in high-frequency modulation schemes where switches transited many times per cycle [8]. SHE is a low-switching modulation technique, where the switches commutation occurs one or two in a cycle of the desired output voltage. Some features of SHE makes it more suitable for high voltage applications such as low switching losses, small size of filter, and no harmonic interference [9].

Different switching angle techniques have been proposed, i.e., half height (HH), feed forward (FF), equal phase (EP), and half equal phase (HEP) in [10]. These methods do not provide optimum solution to reduce THD and are time-consuming methods. To reduce the high order harmonics, a switching angle formulation technique has been proposed in [11] in which low odd-order harmonics are eliminated from a multilevel inverter by using genetic algorithm (GA). The most important and adopted technique for the elimination of any desired harmonics is SHE. It can be solved analytically as well as through optimization methods [12]. The optimization methods are based on biological systems that solve optimization problem by calculating switching angles [12, 13]. Selective harmonic elimination pulse width modulation (SHE-PWM) technique was used in [14] to eliminate low order harmonics using a single-phase 3-level inverter. The active harmonic elimination method has been proposed with unequal DC sources and switching angles are derived analytically in [15, 16]. The selective harmonic elimination method is proposed in [17] on cascaded H-bridge to reduce the THD. Paper [18] calculates switching angles by using particle swarm optimization for the elimination of harmonics. A generalized analytical model for SHE-PWM by finding the optimum solution of cascaded multilevel converters by solving nonlinear equations is proposed for harmonic elimination [19, 20]. The nonlinear equations used in the aforementioned literature for solving switching angles are time-consuming.

SHE generates nonlinear transcendental equations for calculating switching angles to minimize low order harmonics [12]. Different methods are available for solving these non-linear equations: numeric method, algebraic method, and bio-inspired intelligent algorithm. Many authors used SHE for harmonic elimination as SHE equations are non-linear and simple [21]. In [17, 22,23,24], the authors proposed iterative numerical techniques for solving non-linear equations. For calculating switching angles, the usual method is iterative methods such as Newton Raphson and other numeric or algebraic methods [13, 25]. The only problem with the iterative technique is the divergence problem whenever it is solved analytically by numeric methods or algebraic methods, and it is also likely that for minimum THD the optimum switching angles may not be produced [25]. These methods provide more complex and time-consuming solutions. In addition to this, these methods unable to find a solution to certain modulation indexes. There are optimization methods that are based on continuously generating new ants such as particle swarm optimization (PSO), genetic algorithm (GA), and bee algorithm. which can find the optimum solution of full range of modulation indexes [13]. The dc sources applied to multilevel inverter are varying in time, and the switching angles associated with the variation of dc sources. GA technique is used to determine the switching angles offline that correspond to the real time value of dc sources [26]. GA is a simple technique without any analytical calculations and initial guesses. It is bio-inspired artificial intelligence technique which provides the optimum and quick solutions of the harmonic equations [27, 28].

A new multilevel inverter topology has been used in [29]. An adaptive genetic algorithm has been used to reduce harmonic contents. A seven-level case is being considered and modeled for THD minimization. For medium voltage and high power applications, multilevel inverter has been used as it provides high-quality output power. Therefore, low switching frequency strategy is applied as it has low harmonic contents as compared to high switching frequency. The paper [30] is simulated by using a selective harmonic elimination method and a genetic algorithm approach to reduce high harmonic content and produce the high power output.

The significance of the optimization technique also lies in the field of the Internet of Medical Things (IoMT), which uses wireless communication for exchanging healthcare data aiming to reduce healthcare cost and prices for service [31]. To keep the reliability to an acceptable level the uncertainty is an important element in the cloud-based internet of things (IoT). Internet of things (IoT) aims to utilize energy efficiently by using different technologies and make it possible for people to live on a green planet [32]. The uncertainty factor includes transmission/reception energy, network topology, nodal charge, and computation capacity. These uncertainties are recorded and mapped to different nodes with changing capabilities by using artificial intelligence-based (AI) algorithms. The aim is to predict and calculate the price per big data by using AI algorithm [33].

In this paper, a cascaded H-bridge topology is adopted due to several advantages, i.e., for every bridge it uses a separate DC source in order to achieve the output voltage waveform similar to a sinusoidal signal and it has the simplest design with less cost as compared to other topologies. To obtain a smooth and pure sinusoidal signal the number of H-bridges are increased. A 5-level multilevel inverter has been designed in MATLAB/Simulink. Stepped modulation and genetic algorithms are used to obtain the switching angles. Moreover, GA-based SHE is used to reduce the undesired third- and fifth-order harmonics in both offline and online modes by the varying load. The simulation results reveal that the undesired third- and fifth-order harmonics from the output have been significantly reduced for a 5-level inverter. The introduction of filter to the design reduces more THD and improves the voltage and current output waveforms.

This paper is organized as follows: Section 2 describes the conventional step modulation technique applied to multilevel inverter and elaborates the limitations of these methods that, why it is not succeeded and gives a room to another approach. Section 3 proposes the methodology which describes the selective harmonic elimination method and the problem associated with solving nonlinear transcendental equations. This section also explains the optimization method for solving nonlinear transcendental equations. Section 4 presents the simulation results. Finally, the conclusion of the study is presented in Section 5.

Multi-level inverter with stepped modulation

There are different modulation schemes for various topologies of multilevel inverter. One of the modulation scheme to control switches is step modulation. An investigation has been carried out for THD of sine wave’s stepped waveform that synthesizes switching angles by different computational methods. The half-height (HH) method offers the lowest total harmonic distortion [34]. HH calculates the switching angle at the time at which the reference sine wave becomes equal to the half-height of the source. The ith switching angle θi can be obtained for balance voltage source as

$$ {\theta}_i={\sin}^{-1}\left(\frac{\pi }{4}.\frac{i-\frac{1}{2}}{ms}\right) $$

Where, θi is the ith switching angle for different modulation indexes ms.

A cascaded H-bridge configuration of five-level inverter is designed as shown in Fig. 1. Let “s” is the number of H-bridges. For m level inverter, 2(m+1) switching angles are needed. The output voltage vs can be obtained by relating a constant term ki with a dc voltage Vdc. A relationship can be written as

$$ {v}_s={k}_i.{V}_{\mathrm{dc}} $$
Fig. 1
figure 1

Simulink model of five-level inverter

ki is fluctuating between three values − 1, 0, 1. For positive value of 1, opposite switches S1 and S2 or S5 and S6 will be turned ON providing +v and 2v. For negative value of − 1 S3 and S4 or S7 and S8 will be turned ON and thus providing –v and − 2v, respectively. For 0, switches S1 and S3 or S5 and S7 will be turned ON. The output voltage vo of cascaded H-bridge is equal to the summation of output voltage vs of s H-bridges connected in series.

$$ {v}_o=\sum \limits_{i=1}^s{v}_s $$

The switching angles θ1, θ2, θ3 obtained by half-height method to control the ON and OFF of switches are shown below in Table 1. The output voltage of nth odd harmonic is given by

$$ {V}_n=\frac{4}{n\pi}.{\sum}_{i=1}^s{V}_{dc}\cos \left({\theta}_i\right) $$
Table 1 Design parameters for Cascaded Multilevel Inverter

Where n is the odd-order harmonic since the amplitude of even harmonic is 0. θi is the ith switching angle. HH method is a simple geometric method to calculate the switching angles but the problem occurs while considering the modulating index which has a mismatch between input and output. Minimum THD does not occur at m setting but slightly higher than m setting [35].


Specifying the switching angles is essential for the control of multilevel inverter. For getting the desired output waveform switching angles should be selected in such a way to reduce the THD. Different modulation techniques are available for MLI to control the output voltage and current. Modulation techniques are divided into two categories based on switching frequency [3, 4, 36]. GA-based SHE is used in this paper to eliminate the specified harmonic content and is discussed in the following section.

Selective harmonic elimination

The application of medium and high voltage inverters lies in distributed generations, medium voltage drives, and high voltage ac transmissions. Frequency of PWM is limited by switching losses and electromagnetic interference in these applications [37]. To overcome this issue, SHE exploited to reduce the frequency and THD [4, 38]. Selective harmonic elimination method is highly preferred for solving non-linear equations. It minimizes the low order harmonics and hence reduction of total harmonic distortion. This method calculates the switching angles in such a way to reduce the harmonics, which also depends on model design and control. It also controls the output voltage of fundamental waveform. For five-level inverter third and fifth harmonics are eliminated and for higher-level (N-1) odd harmonics are eliminated [39]. The fundamental output waveform depends on switching angles that should be selected in such a way to reduce the THD and the modulation index. The magnitude of all other harmonics like even harmonics get reduced to 0.

The output waveform can be expressed by Fourier expansion in selective harmonic elimination pulse width modulation method:

$$ {V}_m(t)=\frac{a_o}{2}+\sum \limits_{n=1}^m\left({E}_n\cos (nw)+{O}_n\sin (nw)\right) $$

Where ao is dc component, En is amplitude even harmonics and On represents odd harmonics. Multilevel inverter produces quarter symmetric output in which the dc component and even harmonic component gets 0. Equation (5) becomes

$$ {V}_m(t)={V}_n\sin \left(n{\theta}_i\right) $$

The equation of Fourier expansion can be expressed in the form of Eq. (2) which becomes

$$ {V}_n=\frac{4{V}_{DC}}{n\pi}\sum \limits_{i=1}^m{k}_i\cos \left(n{\theta}_i\right) $$

ki is the ratio of dc voltage source of ith voltage and dc source which can be expressed in the form of

$$ {k}_i=\frac{V_{DC i}}{V_{DC}} $$

The only harmonics present in quarter-wave symmetric multi-level inverter are odd which need to be eliminated. The switching angles should be selected in such a way to reduce the total harmonic distortion. In this study third and fifth harmonics are minimized for five levels inverter. The fundamental output voltage, third harmonic component and fifth harmonic component can be expressed in the form of

$$ {\displaystyle \begin{array}{c}{V}_1=\frac{4{V}_{DC}}{\pi}\left[\cos \left({\theta}_1\right)+\cos \left({\theta}_2\right)+\cos \left({\theta}_3\right)\right]\\ {}\kern1.75em {V}_3=\frac{4{V}_{DC}}{3\pi}\left[\cos \left(3{\theta}_1\right)+\cos \left(3{\theta}_2\right)+\cos \left(3{\theta}_3\right)\right]\\ {}\kern2em {V}_5=\frac{4{V}_{DC}}{5\pi}\left[\cos \left(5{\theta}_1\right)+\cos \left(5{\theta}_2\right)+\cos \left(5{\theta}_3\right)\right]\end{array}} $$

The condition should be applied for calculating the switching angles in quarter-wave symmetric waveform:

$$ {\theta}_1<{\theta}_2<{\theta}_3<\frac{\pi }{2} $$

A solution of nonlinear equations obtained by selective harmonic elimination PWM is a challenging task. Different methods are available to find the solution which includes a numeric method, algebraic method, and bio-inspired artificial intelligent algorithms [40].

When an exact solution cannot be determined by other methods, the numeric methods are used to approximate the solution of nonlinear equations. The numeric methods build successive approximations that converge to the exact solution of nonlinear equation. In numeric methods, different methods are available for optimization, the most popular are Newton Raphson, Walsh function, and gradient optimization iterative methods. Except for these methods, we also have numerical methods such as the Runge-Kutta methods that are used for solving initial-value problems for ordinary differential equations. However, these problems only focused on solving nonlinear equations with only one variable, rather than nonlinear equations with several variables [41]. These methods are fast iterative methods which involve initial guesses but these initial guesses may cause divergence problem sometime in large iterations.

The other method is algebraic that involve conversion of nonlinear equations into polynomial equations without any initial guess. The only drawback of this method is that optimization of switching angles is done in a very complex manner and also this method is not useful for high-level inverters. However, it can be used for low-level inverters.

The best method for optimization is bio-inspired artificial intelligent algorithm that is inspired by nature selection. This method is easy to implement and it decreases the processing time for optimization. The best optimum solution can be obtained from this method with fast iteration.

Genetic algorithm

Genetic algorithm (GA) is based on a biological inspired process in which a stronger individual is the final solution among all the individuals in the competition i.e. survival of the fittest [42,43,44,45]. This individual represents the set of solution and is composed of different parameters. These parameters are called genes of a chromosomes and is represented by binary strings [46]. The best possible (the fittest) solution at the end approaches the optimum point through several iterations of the algorithm. The bio-inspired intelligent algorithm is one of the best methods for optimization. The aim of using GA here is to optimize the switching angles to reduce the low order odd harmonics. This can be done by genetic algorithm to minimize the objective function. The overall process of genetic algorithm is shown in flowchart below in Fig. 2. The objective function is the total harmonic distortion. To minimize the function f(x1, x2, ……, xk) it is first coded as binary floating values, e.g.,

Fig. 2
figure 2

Flowchart of the overall process of optimization technique, i.e., genetic algorithm

$$ {\displaystyle \begin{array}{c}{x}_1=\left[001,\dots, 110\right]\\ {}{x}_2=\left[010,\dots, 111\right]\end{array}} $$

The set (x1, x2, ……, xk) is called chromosomes and the variables contained in chromosomes are genes. The population size is selected which determines the number of chromosomes contained within that population.

$$ population,p=\left\{\begin{array}{l}{x}_{1.a},{x}_{1.b},...,{x}_{1.n}\\ {}{x}_{2.a},{x}_{2.b},...,{x}_{2.n}\\ {}\kern0.72em ...\;...\;...\\ {}{x}_{m.a},{x}_{m.b},...,{x}_{m.n}\end{array}\right\} $$

Cost function used for evaluating the fitness value of each chromosome. The fitness value is equal to

$$ \mathrm{FV}=\frac{1}{f\left({x}_1,{x}_2,\dots, {x}_k\right)} $$

By adding all the fitness values, we will get the total fitness. To find the selection probability, each fitness value will be divided by total fitness. Crossover and mutation is the next step for optimization. For this, one number is selected that will be floating between 0 and 1. If the selected number for crossover and mutation is smaller than pre-selected probability, it will lead to crossover and mutation. This will be the new set of chromosome functions. This population is now ready to undergo the next cycle of genetic algorithm. It goes several times to get a minimum cost function. Once we get less cost function, it will be the best optimum solution for getting the switching angles. The objective is to get maximum fitness value with cost function less than 1.

In this paper, five-level inverter is simulated to minimize third and fifth harmonics. The best optimum switching angles are obtained by a genetic algorithm. The population size of 40 is selected. The chromosome functions are 40 in a population f(θ1, θ2, , θn). Performance and efficiency of GA depend on population size. Large population has slow rate of convergence as it required more evaluation per generation [9]. Optimal values were found out by [47] of different parameters in which a population size of 40 is selected. The genes in chromosomes are variables which are switching angles θn in five-level inverter. There are two variables in five-level quarter symmetric multilevel inverter, i.e., f(θ1, θ2). The constraints for the genetic algorithm must be satisfied to reduce the third and fifth harmonics that are given below:

$$ {\displaystyle \begin{array}{c}\cos \left({\theta}_1\right)+\cos \left({\theta}_2\right)=M\frac{\pi }{2}\\ {}\cos \left(3{\theta}_1\right)+\cos \left(3{\theta}_2\right)=0\\ {}\cos \left(5{\theta}_1\right)+\cos \left(5{\theta}_2\right)=0\end{array}} $$

The objective is to evaluate fitness function for each chromosome. The objective function is harmonic contents which need to be reduced. The cost function or fitness function obtained is

$$ F\left({\theta}_1,{\theta}_2\right)=\frac{\sqrt{V{(3)}^2+V{(5)}^2}}{abs\ V(1)} $$

GA runs for several iterations minimum of 100 until it reaches the best optimum solution with the cost function less than one. The fitness values determine the new setpoint after the first iteration and it will undergo the whole process of crossover and mutation to produce a new population of chromosomes. This process continues again the same cycle starts from the fitness function. The best fitness function or fitness value obtained is shown in Fig. 6. For five-level inverter, two variables are specified representing the switching angles (θ1, θ2) with the aim to get the best optimum switching angles. Optimization technique is applied to get the switching angles best for inverter having low harmonic distortion, the two best variables that are achieved after optimization. Designed parameters of five-level inverter are listed below in Table 1.

Filter with load

Filter with load-multilevel inverters are widely used for grid integration, industrial applications, smart grid technologies, and renewable energy systems. For grid integration, power quality is the main concern, it needs pure sinusoidal voltage and current waveforms. Fundamental output waveform has a lot of harmonics, we can eliminate lower odd-order harmonics by algorithms and different switching techniques, while higher order harmonics with filters. Mostly LC filter is used in multilevel inverter to reduce high-order harmonics. An L-C filter makes waveform pure and free from harmonics. LC filter is used to connect the inverter with machine loads and enable to interface with grid. In this paper, a Butterworth method has been implemented for designing a lumped element based filter. Figure 3 shows four elements of LC filter designed by Butterworth methods.

Fig. 3
figure 3

A four lumped element LC filter prototype

Output impedance should be minimized in case of nonlinear loads to minimize the distortion. If the cutoff frequency is specified the capacitance should be maximized and inductance should be minimized [26]. The most important step in LC filter design is selecting a passive elements L and C for a filter. The designed filter characteristic can be represented by frequency response, i.e., Return loss RL by keeping in view the specifications of filter [48]. Return loss is given by (16).

$$ {R}_L=20\log \frac{V_R}{V_{in}\ }\kern1em $$

VR is the input voltage to the filter and Vin is reflected voltage, i.e., Vdc. The following parameters are needed in the design of a filter: Inverter input dc voltage, Line-line RMS voltage, rated power, frequency and cutoff frequency. Resonant frequency given in (17) should be lower than switching frequency to limit the harmonics [48].

$$ {f}_r=\frac{1}{2\pi \sqrt{LC}} $$

The specification of a design-filter contains a 3 dB cutoff frequency fc and attenuation or the order of the filter. The order of filter n means the number of poles in a transfer function [26]. The order of filter is not necessary in case of harmonics elimination as it is necessary only if the cost and weight of inverter are the concerns. The real values of capacitance and inductance can be determined by (18),

$$ {\displaystyle \begin{array}{c}L=\frac{R_L{A}_k}{2\pi {f}_c}\\ {}C=\frac{A_n}{R_L2\pi {f}_c}\end{array}} $$

Where Ak is the attenuation factor used to determine the values of lumped elements. Attenuation factor can be calculated from (A1 → L1, A2 → L2, A3 → L3):

$$ {A}_k=2\sin \frac{\left(2k-1\right)\pi }{2n},k=1,2,3\cdots, n $$

Where, k = 1, 2, 3,, n and n represents the number of elements in a filter. In this paper, four elements LC filter is designed for a five-level inverter to minimize the total harmonic distortion and to connect the inverter to the load. The parameters of LC filter are given in Table 2.

Table 2 Designed parameters of LC filter

For a design of LC filter, the specifications are given in Table 3 for a load. A 1 kW load is considered in this case with an input of dc voltage 300 V. The switching is carried out with a fundamental frequency.

Table 3 Inverter specifications for load

Results and discussion

To validate the algorithm for calculating switching angles, simulation is carried out in MATLAB/Simulink for five-level cascaded H-bridge multilevel inverter. Simulation is carried out for both conventional and genetic algorithm based selective harmonic elimination technique. Different applications have different optimization aims such as minimization of total harmonic distortion of inverter output voltage for PV system, minimization of low odd order harmonics such as third, fifth, and seventh, for different applications [49]. The aim of this research is to reduce the THD of output voltage and to reduce the low odd order harmonics such as third and fifth with both offline and load connected equipped with appropriate filter. Different methods are available for the calculation of switching angle. For our purpose, the best definition of total harmonic distortion is the sum of all harmonic components of rms voltage to the fundamental component of voltage rms.

$$ \mathrm{THD}=\frac{\sqrt{\sum \limits_{n=2}^{\infty }{V}_n^2}}{V_1} $$

Results obtained through stepped modulation technique and GA-based SHE are discussed in detailed in the following sections.

Stepped modulation technique

Switching angles are calculated by methods like stepped modulation half height method and in stepped modulation technique, one cannot eliminate or reduce the low-order odd harmonic in the output voltage but total harmonic distortion can be reduced to some extent. The simulation result of a five level inverter in which switching angles are calculated by step modulation technique is shown in Fig. 4. The THD in this case is 17.88%. The output waveform of voltage is shown in Fig. 4a and the order of harmonics is shown in Fig. 4b.

Fig. 4
figure 4

Simulation results of five level inverter by step modulation method. a Output voltage waveform. b Order of harmonics

GA-based SHE

The genetic algorithm method can eliminate or minimizes the third order and fifth order harmonics. In addition, there is minimization of total harmonic distortion in proposed method. To minimize total harmonic distortion in cascaded multilevel inverter with “s” H-bridges by considering more than (s-1) harmonics, those harmonics will not be eliminated because of more variables than equation sets [50]. The simulation result of proposed optimizing method of an inverter is shown in Fig. 5.

Fig. 5
figure 5

Simulation results of a five level inverter by optimization technique. a Output voltage waveform. b Order of harmonics

The THD result in this case is 16.74%. Output voltage waveform is shown in Fig.5a and Fourier transform analysis is shown in Fig. 5b. It can be observed from Figs. 4b and 5b that the low-order odd harmonics can be minimized to an acceptable range by using optimization technique, i.e., genetic algorithm. The best fitness value is shown in Fig. 6, while the best optimum variables after optimization is shown in Fig. 7.

Fig. 6
figure 6

Best fitness value by optimization technique

Fig. 7
figure 7

Two best optimum variables (switching angles) to control switches having low THD

The optimization method uses best variables, i.e., switching angles to reduce the THD. The output waveform is also similar to sinusoidal signal. The THD reduces to acceptable range. The best and optimum fitness function is obtained through algorithm. The main purpose is the minimization of objective function through algorithm.

The comparison of switching angles, total harmonic distortion, and phase delays are listed in Table 4. It can be seen that total harmonic distortion along with low order odd harmonics, i.e., third and fifth harmonics reduces when optimization method is applied. The table shows that both methods have different switching angles. The optimization aim is to get best switching angles to minimize the total harmonic distortion.

Table 4 Comparison of THD, switching angles, phase delay, and low-order odd harmonics of five-level inverter obtained by step modulation method and optimization technique

In the Table 4, the comparison has been done between conventional method, i.e., stepped modulation and proposed optimization technique, i.e., genetic algorithm. The comparison is carried out in terms of switching angles, THD, phase delay, and low-odd order harmonics. It is clear from the results that the switching angles, THD, phase delay, and low-odd order harmonics has been reduced in optimization technique. The two variables, i.e., θ1and θ2which we have taken in optimization technique is reduced from 14.47°, 48.59° to 12.89°, and 42.76°. Therefore, the same reduction has been observed in total harmonic distortion from 17.88 to 16.74% and low-odd order harmonics from 3.24%, 3.7% to 0.84%, and 3.3%.

Filter with load

To minimize the total harmonic distortion of output voltage below 5% and to make the output current and voltage waveform smooth the L-C filter is used [26]. The L-C filter is used in multi-level inverter connected to load. The THD comparison is carried out by varying load. The output voltage waveform is shown in Fig. 8. It can be seen from the comparison table that by increasing the load without changing any parameter the THD slightly increases. A minute increase of THD has seen by increasing the load to a large extent. The variation of voltage THD with load is shown in Fig. 9 and Table 5.

Fig. 8
figure 8

Output waveform of five level inverter

Fig. 9
figure 9

Voltage THD versus the load, obtained by optimization approach

Table 5 THD variation with load

The above Fig. 9 depicts the THD variation with respect to the load. The graph shows that the THD variation is directly proportional to the load increase. As the load increases the THD also increases. Therefore, we need optimization approach to reduce this inclination of THD versus load. If the optimization technique is not applied to the multilevel inverter, these THD variations will shoot out with respect to load and become uncontrollable. We used genetic algorithm approach to reduce the variation of THD with respect to load as the increase of THD is very less.


The genetic algorithm-based approach is proposed to solve the nonlinear transcendental equations of selective harmonic elimination of cascaded H-bridge multilevel inverter. The total harmonic distortion (THD) comparison is carried out between step modulation method and optimization method. The optimization method finds the switching angles in such a way to minimize the THD and low order odd harmonics. Cascaded H-bridge configuration is more practical than diode clamped and flying capacitor multilevel inverter because of less number of components and complexity. Magnitude of fundamental component is not controllable and is constant throughout the cycle while the magnitude of harmonic component depends on order of harmonics inversely. The simulation is done in MATLAB/Simulink and the optimum solution is provided subsequently due to its fast iterative method. The results reveals that THD has been reduced from 17.88 to 16.74% while third and fifth harmonics has been reduced from 3.24%, 3.7% to 0.84% and 3.3%, respectively. The optimization method is tested with LC filter which results in a complete sinusoidal signal with the significant improvement of THD. The result is verified by varying the load. It also shows the importance of filter to the integration of grid, industrial, and smart grid applications.

Availability of data and materials

The related data is already included in the manuscript.



Total harmonic distortion


Selective harmonic elimination


Genetic algorithm


Renewable energy sources


Multi-level inverter


Selective harmonic elimination pulse width modulation


Particle swarm optimization


Artificial intelligence


Half height


  1. F. Peng, J. McKeever, D. Adams, Cascade multilevel inverters for utility applications (Oak Ridge National Lab, TN (United States), 1997)

    Book  Google Scholar 

  2. E. Babaei, S.H. Hosseini, New cascaded multilevel inverter topology with minimum number of switches. Energy Conversion and Management50(11), 2761–2767 (2009)

    Article  Google Scholar 

  3. I. Colak, E. Kabalci, R. Bayindir, Review of multilevel voltage source inverter topologies and control schemes. Energy conversion and management52(2), 1114–1128 (2011)

    Article  Google Scholar 

  4. J. Rodriguez, J.-S. Lai, F.Z. Peng, Multilevel inverters: a survey of topologies, controls, and applications. IEEE Transactions on industrial electronics49(4), 724–738 (2002)

    Article  Google Scholar 

  5. G. Singh and V. K. Garg, THD analysis of cascaded H-bridge multi-level inverter, in 2017 4th International Conference on Signal Processing, Computing and Control (ISPCC), 2017: IEEE, pp. 229-234.

  6. J.-S. Lai and F. Z. Peng, Multilevel converters-a new breed of power converters, in IAS'95. Conference Record of the 1995 IEEE Industry Applications Conference Thirtieth IAS Annual Meeting, 1995, vol. 3: IEEE, pp. 2348-2356.

  7. J. Kumar, B. Das, and P. Agarwal, Selective harmonic elimination technique for a multilevel inverter, space, vol. 1, p. 3, 2008.

  8. L. M. Tolbert, J. Chiasson, K. McKenzie, and Z. Du, Elimination of harmonics in a multilevel converter with nonequal DC sources, in Eighteenth Annual IEEE Applied Power Electronics Conference and Exposition, 2003. APEC'03., 2003, vol. 1: IEEE, pp. 589-595.

  9. J.J. Grefenstette, Optimization of control parameters for genetic algorithms. IEEE Transactions on systems, man, and cybernetics16(1), 122–128 (1986)

    Article  Google Scholar 

  10. N. Jalakanuru, M. Kiber, Switching angle calculation By EP HEP HH And FF Methods For Modified 11-Level Cascade H-Bridge Multilevel Inverter. International Journal of Engineering Science Invention (IJESI)6(12), 69–75 (2017)

    Google Scholar 

  11. B. Ozpineci, L. M. Tolbert, and J. N. Chiasson, Harmonic optimization of multilevel converters using genetic algorithms, in Power Electronics Specialists Conference, 2004. PESC 04. 2004 IEEE 35th Annual, 2004, vol. 5: IEEE, pp. 3911-3916.

  12. E. Bektas, H. Karaca, GA based selective harmonic elimination for five-level inverter using cascaded H-bridge modules. International Journal of Intelligent Systems and Applications in Engineering4(2), 29–32 (2016)

    Article  Google Scholar 

  13. D. Rai, K. Tyagi, Bio-inspired optimization techniques: a critical comparative study. ACM SIGSOFT Software Engineering Notes38(4), 1–7 (2013)

    Article  Google Scholar 

  14. S. Ramkumar, V. Kamaraj, and S. Thamizharasan, GA based optimization and critical evaluation SHE methods for three-level inverter, in 2011 1st International Conference on Electrical Energy Systems, 2011: IEEE, pp. 115-121.

  15. Z. Du, L. M. Tolbert, J. N. Chiasson, and H. Li, Low switching frequency active harmonic elimination in multilevel converters with unequal DC voltages, in Fourtieth IAS Annual Meeting. Conference Record of the 2005 Industry Applications Conference, 2005., 2005, vol. 1: IEEE, pp. 92-98.

  16. M. Nandhini Gayathri et al., Active harmonic elimination for multilevel converters. Journal of Applied Sciences14(15), 3088–3099 (2008)

    Google Scholar 

  17. T. Tang, J. Han, and X. Tan, Selective harmonic elimination for a cascade multilevel inverter, in 2006 IEEE International Symposium on Industrial Electronics, 2006, vol. 2: IEEE, pp. 977-981.

  18. H. Taghizadeh, M.T. Hagh, Harmonic elimination of cascade multilevel inverters with nonequal DC sources using particle swarm optimization. IEEE Transactions on Industrial Electronics57(11), 3678–3684 (2010)

    Article  Google Scholar 

  19. M.S. Dahidah, V.G. Agelidis, Selective harmonic elimination PWM control for cascaded multilevel voltage source converters: a generalized formula. IEEE Transactions on power electronics23(4), 1620–1630 (2008)

    Article  Google Scholar 

  20. J.R. Wells, B.M. Nee, P.L. Chapman, P.T. Krein, Selective harmonic control: a general problem formulation and selected solutions. IEEE Transactions on Power Electronics20(6), 1337–1345 (2005)

    Article  Google Scholar 

  21. A. Edpuganti, A.K. Rathore, A survey of low switching frequency modulation techniques for medium-voltage multilevel converters. IEEE Transactions on Industry Applications51(5), 4212–4228 (2015)

    Article  Google Scholar 

  22. L. Li, D. Czarkowski, Y. Liu, P. Pillay, Multilevel selective harmonic elimination PWM technique in series-connected voltage inverters. IEEE Transactions on Industry Applications36(1), 160–170 (2000)

    Article  Google Scholar 

  23. J. Sun and I. Grotstollen, Pulsewidth modulation based on real-time solution of algebraic harmonic elimination equations, in Proceedings of IECON'94-20th Annual Conference of IEEE Industrial Electronics, 1994, vol. 1: IEEE, pp. 79-84.

  24. L. M. Tolbert and F. Z. Peng, Multilevel converters for large electric drives, in APEC'98 Thirteenth Annual Applied Power Electronics Conference and Exposition, 1998, vol. 2: IEEE, pp. 530-536.

  25. K. El-Naggar, T.H. Abdelhamid, Selective harmonic elimination of new family of multilevel inverters using genetic algorithms. Energy Conversion and Management49(1), 89–95 (2008)

    Article  Google Scholar 

  26. M. D. Patil and R. G. Ramteke, LC filter design implementation and comparative study with various PWM techniques for DCMLI, in 2015 International Conference on Energy Systems and Applications, 2015: IEEE, pp. 347-352.

  27. O. Bouhali, F. Bouaziz, N. Rizoug, A. Talha, Solving harmonic elimination equations in multi-levelinverters by using neural networks. International journal of information and electronics engineering3(2), 191 (2013)

    Google Scholar 

  28. D. Kumar, S. Pattnaik, and V. J. I. Singh, Genetic algorithm based approach for optimization of conducting angles in cascaded multilevel inverter, vol. 2, no. 3, pp. 2389-2395, 2012.

  29. K. T. Eddine, R. Abdelhadi, B. Omar, and O. Hassan, A new multilevel inverter with genetic algorithm optimization for hybrid power station application, in 2018 4th International Conference on Optimization and Applications (ICOA), 2018: IEEE, pp. 1-6.

  30. M. A. Hosseinzadeh, M. Sarbanzadeh, Y. Salgueiro, M. Rivera, and P. Wheeler, Selective harmonic elimination in cascaded H-bridge multilevel inverter using genetic algorithm approach, in 2019 IEEE International Conference on Industrial Technology, 2019, pp. 1527-1532.

  31. F. Al-Turjman, M.H. Nawaz, U.D. Ulusar, Intelligence in the Internet of medical things era: a systematic review of current and future trends. Computer Communications (2019)

  32. F. Campioni, S. Choudhury, F. Al-Turjman, Scheduling RFID networks in the IoT and smart health era. Journal of Ambient Intelligence and Humanized Computing, 1–15 (2019)

  33. F. Al-Turjman, H. Zahmatkesh, L. Mostarda, Quantifying uncertainty in internet of medical things and big-data services using intelligence and deep learning. IEEE Access7, 115749–115759 (2019)

    Article  Google Scholar 

  34. N. Karnik, D. Singla, and P. Sharma, Comparative analysis of harmonic reduction in multilevel inverter, in 2012 IEEE Fifth Power India Conference, 2012: IEEE, pp. 1-5.

  35. Y. Fong and K. E. Cheng, An adaptive modulation scheme for fundamental frequency switched multilevel inverter with unbalanced and varying voltage sources, in 2015 6th International Conference on Power Electronics Systems and Applications (PESA), 2015: IEEE, pp. 1-6.

  36. K. S. Neralwar, P. Meshram, and V. Borghate, Genetic algorithm (GA) based SHE technique applied to seven-level Nested Neutral Point Clamped (NNPC) Converter, in 2016 IEEE 1st International Conference on Power Electronics, Intelligent Control and Energy Systems (ICPEICES), 2016: IEEE, pp. 1-6.

  37. D. Ahmadi, K. Zou, C. Li, Y. Huang, J. Wang, A universal selective harmonic elimination method for high-power inverters. IEEE Transactions on power electronics26(10), 2743–2752 (2011)

    Article  Google Scholar 

  38. F. Peng and J. Lai, A static var generator using a staircase waveform multilevel voltage-source converter, in Proc. Rec. Power Quality Conf, 1994, pp. 58-66.

  39. H. Karaca, E. Bektas, Selective harmonic elimination using genetic algorithm for multilevel inverter with reduced number of power switches. Engineering Letters24(2), 138–143 (2016)

    Google Scholar 

  40. R. Banos, F. Manzano-Agugliaro, F. Montoya, C. Gil, A. Alcayde, J. Gómez, Optimization methods applied to renewable and sustainable energy: a review. Renewable and sustainable energy reviews15(4), 1753–1766 (2011)

    Article  Google Scholar 

  41. C. Remani, Numerical methods for solving systems of nonlinear equations (Lakehead University Thunder Bay, Ontario, Canada, 2013)

    Google Scholar 

  42. L. Davis, Handbook of genetic algorithms (New York, Van Nostrand Reinhold, 1991). K AD long Machine Learning3, 121 (1988)

    Google Scholar 

  43. D.E. Goldberg, J.H. Holland, Genetic algorithms and machine learning. Machine learning3(2), 95–99 (1988)

    Article  Google Scholar 

  44. J. H. Holland, Adaptation in natural and artificial systems: an introductory analysis with applications to biology, control, and artificial intelligence. MIT press, 1992.

  45. Z. Michalewicz, Genetic algorithms+ data structures= evolution programs. Springer Science & Business Media, 2013.

  46. K.-F. Man, K.-S. Tang, S. Kwong, Genetic algorithms: concepts and applications [in engineering design]. IEEE transactions on Industrial Electronics43(5), 519–534 (1996)

    Article  Google Scholar 

  47. J. T. Alander, On optimal population size of genetic algorithms, in CompEuro 1992 Proceedings computer systems and software engineering, 1992: IEEE, pp. 65-70.

  48. M.A. Uslu, L. Sevy, A MATLAB-based filter-design program: from lumped elements to microstrip lines. IEEE Antennas and Propagation Magazine53(1), 213–224 (2011)

    Article  Google Scholar 

  49. F.-s. Kang, S.E. Cho, S.-J. Park, C.-U. Kim, T. Ise, A new control scheme of a cascaded transformer type multilevel PWM inverter for a residential photovoltaic power conditioning system. Solar Energy78(6), 727–738 (2005)

    Article  Google Scholar 

  50. Y. Liu, H. Hong, A.Q. Huang, Real-time calculation of switching angles minimizing THD for multilevel inverters with step modulation. IEEE Transactions on Industrial Electronics56(2), 285–293 (2008)

    Article  Google Scholar 

Download references


This research was solely the work of the authors, funded by no authority.

Author information

Authors and Affiliations



This work is primarily based on the research work of MS at USPCAS-E UET Peshawar, Pakistan. The main idea was conceived by AB and JI. This research work was supervised by AB and TA. JI and HA provided support in the data analyses section. AQ and IH provided assistance in using simulation software and results interpretation. MK helped in the final review of the paper. The author(s) read and approved the final manuscript.

Corresponding author

Correspondence to Javed Iqbal.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Salman, M., Haq, I.U., Ahmad, T. et al. Minimization of total harmonic distortions of cascaded H-bridge multilevel inverter by utilizing bio inspired AI algorithm. J Wireless Com Network 2020, 66 (2020).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI:


  • Total harmonic distortion
  • Multilevel inverter
  • Selective harmonic elimination
  • Genetic algorithm
  • MATLAB simulink