Research Article | Open Access

Volume 2021 |Article ID 6642317 | https://doi.org/10.1155/2021/6642317

Seyed Yahya Nikouei, Behzad Mirzaeian Dehkordi, Mehdi Niroomand, "A Genetic-Based Hybrid Algorithm Harmonic Minimization Method for Cascaded Multilevel Inverters with ANFIS Implementation", Mathematical Problems in Engineering, vol. 2021, Article ID 6642317, 15 pages, 2021. https://doi.org/10.1155/2021/6642317

# A Genetic-Based Hybrid Algorithm Harmonic Minimization Method for Cascaded Multilevel Inverters with ANFIS Implementation

Academic Editor: Peng-Yeng Yin
Revised30 Mar 2021
Accepted12 Apr 2021
Published22 Apr 2021

#### Abstract

Selective harmonic elimination pulse-width modulation (SHEPWM) is a widely adopted method to eliminate harmonics in multilevel inverters, yet solving harmonic amplitude equations is both time consuming and not accurate. This method is applied here for a 7-level cascaded multilevel inverter (CMLI) with erroneous DC sources. To meet the seven harmonic amplitude equations, two notches are applied with the use of higher switching frequency than nominal. These notches can be placed in six different positions in the voltage wave, and each was assessed in a separate manner. In order to solve the equations, a hybrid algorithm composed of genetic algorithm (GA) and Newton–Raphson (N-R) algorithm is applied to achieve faster convergence and maintain the accuracy of stochastic methods. At each step of the modulation index (M), different positions for the notches are compared based on the distortion factor (DF2%) benchmark, and the position with lowest DF2% is selected to train an artificial neural fuzzy interface system (ANFIS). ANFIS will receive the DC sources’ voltages together with required M and will produce one output; thus, eight ANFISs are applied to produce seven firing angles, and the remaining one is to determine which one of the notches’ positions should be used. Software simulations and experimental results confirm the validity of this proposed method. The proposed method achieves THD 8.45% when M is equal to 0.8 and is capable of effectively eliminating all harmonics up to the 19th order.

#### 1. Introduction

As the power and voltage demands are getting higher and with the wide consumption rate of low-voltage DC sources such as the fuel cell and photovoltaic arrays [1], the need for multilevel inverters (MLIs) that receive these low voltages and produce high or medium voltage levels becomes obvious. Since 1975, when Nabae et al. introduced the concept of multilevel converters [2], many topologies have been introduced and assessed. Among flying capacitor [3], diode-clamped [4], and cascaded multilevel (CML) inverters, the latter, due to its simple structure and low number of elements (makes it more reliable) in contrast to other topologies, draws more attention to itself [5].

The biggest drawback of multilevel converters is they are having too many power semiconductor switches, where every switch needs a gate drive circuit which makes the overall converter more complicated and expensive, despite the fact that the advantages of applying multilevel converters are greater. Reduced frequency, reduced current, and voltage rating of switches which results in lower power loss, generating lower in output voltage with a low harmonic characteristic that reduces electromagnetic compatibility problems, are considered as their advantages [6].

The presence of undesired harmonics is the major issue of concern in inverters in an application (e.g., undesired heating, noise, and vibration when driving a motor). In order to further improve the output voltage and quality, three main methods are used. These methods are as follows: (1) switching strategies applied in minimizing or eliminating undesired harmonics; the optimal minimization of total harmonic distortion (OMTHD), space vector modulation (SVM) [7], selective harmonic elimination pulse-width modulation (SHEPWM) [8], the well-known sinusoidal PWM (SPWM) [9, 10], the finally optimized harmonic-stepped waveform (OHSW) [5]; (2) changing the multilevel structure to minimize harmonics [1114]; and (3) adding low-pass filters in the output of the multilevel to eliminate high-order harmonics [15].

The SHEPWM strategy has been and is being applied in many different inverters. To solve equations of this strategy, many different equation-solving algorithms are applied [1618]. To apply the calculus methods such as Newton–Raphson (N-R), a suitable starting point should exist. The step of the modulation index (M) is taken really small in [19] to allow the solution of the last step to be applied as a guess of current M. Other methods are stochastic: genetic algorithm (GA), particle swarm optimization (PSO), or bee colony [20, 21], which do not need a guess and tend to find the global optima. In [22, 23], the SHEPWM strategy is applied for a 9-level cascaded inverter with GAs. In [24, 25], this strategy is applied for a 7-level cascaded inverter through PSO. In [4, 26], notches are added by increasing the frequency of switching. Because the objective of applying MLIs is to reduce the switching losses, too many notches can increase the frequency and switching losses. In other studies, such as [18], the higher harmonic amplitudes are neglected, and fewer equations than unknowns are solved in order to find better solutions for the remaining equations. Due to the existence of computation burden, the mentioned equation-solving methods cannot reach the optimal angles in real time, which makes them appropriate for offline applications. After completing the lookup table for online applications, a nonlinear interpolation method becomes necessary to find angles in real time in online applications [2729]. In [30], Moeini et al. investigated a technique for the modulation technique of the active power filters using the ANN. Moreover, Zhao et al. [31] attempted to implement selective harmonic elimination (SHE) in real time by the inner instantaneous observer.

Routray et al. [32, 33] used modified particle swarm optimization and grey wolf optimization, respectively, to reduce the harmonic in a cascaded multilevel inverter. Prasad et al. [34] presented the modified version of fish swarm optimization algorithm to achieve higher voltage quality. In [35], Panda et al. presented another solution to this problem using flower pollination algorithm (FPA), which has many features such as the single-stage local and global search ascertain [36].

Attempt is made in all of these studies to minimize the harmonics through single SHEPWM switching strategy. In this study, two notches are added in different positions to the output voltage wave in every M step value, and the best position is selected to be applied online; thus, under load, a change in M can change the notches’ positions from one voltage level to another to reach minimum harmonics. The traditional switching and switching with notches for a 7-level CMLI with inaccurate DC sources are compared. A hybrid algorithm composed of GA and N-R algorithms is proposed to determine the best firing angles for each one of the assessed situations. The angles with lowest distortion factor (DF2%) in each step of M in different notches’ positions are picked and are applied to train an adaptive neural fuzzy interface system (ANFIS) and to determine the angles in real time. The performance of the proposed system is exhibited through simulation and experimental results.

#### 2. SHEPWM for MLIs

A single-phase 7-level CMLI is shown in Figure 1(a) which consists of three single-phase full-bridge inverter units. Each of these DC sources is connected to a full-bridge inverter that will produce when S1 and S2 are connected, 0 when all switches are off, and when switches S3 and S4 are on. When they are connected in series, the CMLI output voltage in a single phase can have to volts, with the step of . One of the best aspects of these MLIs is their capability in producing the desired voltage in the output in a number of different switching situations when a change in the output voltage is required. This can help to reach the new voltage with the minimum number of switching changes. This possibility can also help in many different harmonic elimination strategies, mostly for SVPWM.

These bridges, connected in series, will produce a stepped voltage in the CMLI output as mentioned (Figure 1(b)). Each one of these DC sources will have an angle that would indicate their state of being connected or not (e.g., for the first full bridge). Here, at every voltage level, a return can be made to the last level and back, which will produce two extra firing angles. One of the six possibilities of two notches’ positions is shown in Figure 1(c) as an example, where there is one notch in the first voltage level and another one in the second voltage level. With the switching strategy shown in Figure 1(c), there can be seven firing angles, thus seven unknowns, which can solve seven equations, instead of three regular equations written for a 7-level inverter. The first equation is to provide the required first-order harmonic, and the rest are to eliminate or, if not possible, minimize the low-order harmonics.

It is assumed that the voltage will go back to the same level as it was in the first place; each time it goes to the last level. This means that going two levels down or up, one after another is not to be considered; furthermore, at zero voltage, there is no going back to the last voltage level. With these assumptions, there will be six different manners where the voltage notches are of concern.

The output phase voltage wave is expressed through Fourier series:

Because of the characteristics of the wave such as odd and half-wave symmetry, the amplitude of the nth harmonic is calculated through the following equation:where expresses each one of the DC sources and S is the total number of these sources. It is notable that because the inverter is going to be used in a three-phase system, there will be no third-order harmonic or its multiplications. Thus, the output wave harmonics’ order can be expressed as , where n is a natural number.

When notches exist, the amplitude of each harmonic is calculated through (3); once more, there are no even harmonics, and the amplitude is calculated for odd n.where is the number of firing angles at each voltage level.

In general, equations (2) and (3) are for any number of DC sources. The harmonic amplitude for the simple switching strategy for 7 levels is expressed in equation (4), and for 7 firing angles, the same is expressed in (5):

In (4) M is the modulation index, defined as equation (6). In (4), there exist three DC sources with no notches; hence, three angles solve three equations. The first equation in both equations (4) and (5) meets the first-order harmonic amplitude required from the inverter in its output. The remaining equations are applied to eliminate as many low-order harmonics as possible, starting from the 5th order since these harmonic orders have higher amplitudes and tend to remain even after passing transformers.

In equation (5), the sum of is 7, chosen according to the explained assumptions. Because there exist seven unknowns, seven harmonic amplitudes are eliminated or minimized if complete elimination is not possible. It should be noted that, in (5), there exist two notches, and with each notch, two more firing angles are produced: one angle for going back which is shown with a minus sign in (5) and the other to get back to the initial voltage level; this return angle is assigned a plus sign.where represents the amplitude of the first-order harmonic achieved by the inverter.

The picked set of angles should be in order and must meet equation (7) requirements. Furthermore, the angles tend to become equal to one another as the modulation index increases [5], and there should be a threshold to assure that the angles are not exactly equal to one another. This quantity is presented by in equation (8), which will represent a nonlinear, nonequality constraint.

In case of equal DC sources, there is no need to check if the angles are in order or not; there, the firing angles should only be in the required range. If the angles are not in order, they can be sorted after the solving algorithm finds the answers because there is no difference in which full-bridge inverter unit certain angle is used. On the contrary, this assumption is not true when DC sources do not have accurate nominal values in reality. For example, applying an angle from the second voltage level for the first voltage level can produce different outputs than expected since here, certain angle cosine is going to be multiplied into the DC voltage that is different from what the algorithm output might be. Moreover, when applying a different number of firing angles at each voltage level, DC voltage source erroneous nominal values should be of full concern, that is, for a 7-level inverter with three DC voltage sources of 95%, 100%, and 105% nominal voltage, there will be 27 different manners to consider equations [37].

#### 3. Hybrid Genetic Algorithm

In order to solve equations (4) and (5), an algorithm which converges faster to the global optima should be applied since they are to be solved for six different possibilities of , , and with different DC voltage sources, with no nonlinear, nonequality constraints. In order to take into account the DC voltage sources’ deviation from the nominal value, the equations are solved when each of the DC sources is 5% or equal to the nominal value, that is, 27 different situations should be checked with varying number of firing angles at each level, and this number cannot be reduced due to existing overlaps. These factors cause computational burden, thus long computational time.

The fastest algorithms in terms of convergence are of the calculus type such as N-R algorithm. The only problem is to choose a proper starting point for the algorithm to converge to the best point possible. However, these algorithms will not converge at all or will converge to a local minimum if the starting guess is not good. In contrast, among other advantages, stochastic algorithms do not need a starting point and will converge to the global optima if tuned well. The speed of these algorithms decreases in an exponential manner, where at the beginning, convergence speed is high, and by getting closer to the global optimum point, it decreases. One of the manners in applying the calculus method’s speed and all other advantages of stochastic methods is applying to hybrid algorithms.

The search will start with a random selection of unknowns that are to be fed to GA. In each iteration of the algorithm, the next generation will be produced by the best points in terms of fitness function, with the assistance of genetic operators; following this, the answers are fed to N-R algorithm as the starting point. It is not desired to converge to local minima, so ending the GA very fast is not wise.

In each iteration of the GA, all possible solutions should be validated through the fitness function, which might take some time. In order to make the algorithm to run even faster, one can sort all the possible solutions in a vector and send them in one call to the fitness function; here, this function is calculated once at each iteration. The output of the function is also in a vector format.

When using stochastic methods such as GA, there should be a fitness function to minimize which is equivalent to harmonic minimization. Here, this function is considered as equation (9) subject to equations (7) and (8):where is the first-order harmonic amplitude which is required at the inverter’s output, is the first-order harmonic amplitude that can be received from the inverter, is the number of harmonic orders, is the amplitude of that harmonic, and S is the number of DC voltage sources.

In the N-R algorithm, there is no need to apply the fitness function. Each of the harmonic amplitudes is subject to become minimized. The first-order harmonic amplitude should be subtracted from the desired amplitude. After starting the N-R algorithm, in each iteration, the next iteration answers are obtained through the Jacobian matrix, shown in the following equation [21]:

For different values of N1 and N2, the Jacobian matrix varies. The proposed hybrid algorithm is as follows:(1)Select random possible answers to form the unknowns’ space for M equal to the step value.(2)Validate the fitness function with a vector obtained from possible solutions.(3)Obtain the next-generation solutions through mutation, crossover, and other GA operators.(4)Go to Step 2 until the change in the fitness function or number of iterations becomes less than their respective limits.(5)Start N-R algorithm with the outputs of GA when it is close to the global optimum point.(6)Calculate the next iteration angles through the following equation:where iswhere J is the Jacobian matrix and F represents the system of equations equal to vector B (ma) (equation F = B is observed in both equations (4) and (5)).(7)Apply to assure that the angles meet equation (7) requirements.(8)Go to Step 6 until the change in angles is less than the limit. At the end, check condition equation (8).(9)Calculate total harmonic distortion (THD) and DF2% and save the outcome in an array.(10)For different values of N1 and N2, go to Step 1.(11)Select the best switching strategy with the minimum of DF2%.(12)Increase M by the step value, and go to Step 1 until M becomes 1.(13)For every different value of DC voltage sources, go to Step 1.(14)Develop the lookup table with different values for every DC source and the selected notch position for a certain index of M.

This algorithm should be applied in calculating the angles where there are 27 different possibilities for the DC sources and 25 steps for M, that is, the algorithm should be applied for at least 675 times in order to complete the lookup table. This process will take a long time to complete; however, after the completion, one can train an ANFIS to reach angles in the lookup table and the values between angles in an instance for online usage.

#### 4. Simulation Results

First, the regular switching equations are solved through the proposed hybrid algorithm. For M near zero, the equations are not solvable, and the first harmonic amplitude is going to be less than the 5th- and the 7th-order amplitudes, thus an undesirable phenomenon. It is observed that how these amplitudes change with respect to M in Figure 2(a). In this figure, the THD% and DF2% benchmarks are shown as

well, illustrating that THD% is going to be more than 100% for some values of M. Even DF2% is more than 100% at some points, thus an undesirable phenomenon. The fitness function values are shown in Figure 2(b), where the values higher than 0.01 are considered as points of M, where the equations are not solvable [21].

A well-known benchmark for output voltage quality is the THD% benchmark, as defined by the following equation [38]:

In equation (13), represents each one of the harmonic order amplitudes, and is the amplitude of the first-order harmonic generated by the inverter.

A better benchmark would be second-order DF2%, where the harmonics’ attenuation is considered through L-C filtering [5]:

It is well established that regular switching and eliminating just the 5th- and the 7th-order harmonics will produce a waveform which contains THD% and DF2% values which are more than standards and is not appropriate. The calculated angles are presented in Figure 2(c), where it is observed that these angles start from 90°, that is, the inverter is off for most of the duty cycles, and when the value of M increases, these angles tend to get smaller; in this case, the inverter is going to stay on for most of the time, producing a first-order harmonic with a higher amplitude. According to this figure, these angles are not changing in a linear manner revealing that, for values of M where the algorithm is not applied in an offline mode, a nonlinear interpolation method is needed to determine the firing angles in real time.

The same process is carried out for 7-firing angles’ switching (e.g., the harmonic amplitude percentages of two notches in the third voltage level, Figure 3(a)). The harmonic amplitude percentages of two notches in the first voltage level are presented in Figure 3(b). Every one of these strategies is perfect for a precise range of M in minimizing harmonic amplitudes to its best. In every index of M and in every notch position, DF2% is calculated. In the end, one strategy with the lowest DF2% in that index of M is selected along with its produced angles to be applied in the lookup table (e.g., notch positioning in Figure 3(a) is used for and notch positioning in Figure 3(b) for ). The results of THD% and DF2% and harmonics can be seen in Figure 3(c).

In contrast to Figure 2(a), in Figure 3(c), the harmonics are minimized even in very low values of the modulation index, where six harmonic amplitudes are minimized instead of two. THD% and DF2% are having lower values for each index of M in Figure 3(c). For most of M’s range, DF2% is lower than 2%, which shows an acceptable waveform. The angles which produce this wave with respect to M are shown in Figure 3(d). Figure 4 presents the fast Fourier transformation of the voltage signal again with M equal to 0.7 and 0.81 in Figures 4(a) and 4(b), respectively. Note that the multiplications of the third harmonic are eliminated in the three-phase system.

The angles tend to get equal to each other which is prevented by nonlinear, nonequality constraints in equations (7) and (8) (Figure 3(d)). Because of the nonlinear nature of the angles, it is best to use a nonlinear interpolation method in order to find best angles for M’s that are not calculated by the proposed hybrid algorithm. Moreover, these methods need less controller memory because the table should not be uploaded and are more stable in a noisy environment. Here, an ANFIS is trained and applied for interpolation.

A three-phase simulation is carried out in MATLAB software. The inverter, with 100 volts for DC sources and a frequency of 50 hertz for M equal to 0.81, is applied for L-R load. The load is of 2.81 Ohms resistance and of 0.0116 Henry inductance and is connected in a star formation. The line voltage in the lower part of Figure 5(a) and phase current in the upper part of the same figure are observed for regular switching and in Figure 5(b) for 7 angles. In these figures, M is equal to 0.81; in Figure 5(c), M is equal to 0.70.

The THD% and DF2% comparison in these different methods of switching is tabulated in Table 1. The firing angles calculated with this proposed hybrid algorithm and genetic algorithm for M equal to 0.81 and 0.70 are tabulated in Table 2, where it is assumed that each of the DC voltage sources’ nominal value is equal to 100 volts. It is observed that this proposed hybrid algorithm has generated angles that produce lower DF2% with less time spent in calculating the values which shows the effectiveness of this proposed hybrid algorithm in generating firing angles with faster convergence.

 M Regular switching Seven-firing angle switching THD% DF2% THD% DF2% 0.08 339.43 133.27 121.99 49.01 0.2 109.87 104.94 39.28 6.59 0.28 80.79 51.06 43.01 5.89 0.4 5.81 24.68 22.72 2.79 0.48 40.09 26.98 16.22 1.74 0.6 40.10 21.50 11.43 1.29 0.68 31.01 10.78 11.97 1.69 0.8 25.33 8.07 8.45 0.89 0.88 44.45 29.96 9.00 1.29 1 57.10 110.79 18.03 28.7
 Genetic algorithm Proposed hybrid algorithm M 0.70 0.81 0.70 0.81 THD% 9.88 8.41 11.31 8.1 DF2% 1.54 2.92 1.13 0.80 Cal. time (s) 34 163 8 12 (degree) 11.81 12.44 11.62 1.42 (degree) 18.20 25.73 23.98 27.12 (degree) 35.92 32.64 61.55 33.56 (degree) 41.55 34.03 70.66 35.93 (degree) 61.92 57.48 74.91 46.35 (degree) 72.68 88.27 80.89 61.89 (degree) 89.99 88.78 88.88 71.64

Table 3 shows the parameters used in the hybrid algorithm.

 Parameter name Parameter value M increment step 0.04 Convert per M step 10 Minimum M 0.04 Maximum M 1 Lower angle bound 0 Higher angle bound Pi/2 Initial population range [0, 1.6] Population size 70 Constraint tolerance 1e − 4 Function tolerance 1e − 4

Table 4 presents the comparison between our results and some of the state-of-the-art techniques. As can be seen, results presented in this paper are more accurate than similar proposals, and moreover, this paper presents a method to carry out these results in real time using the neural fuzzy interface system introduced in the Section 5.

 Ozpineci et al. [23] Diong et al. [1] Kavousi et al. [20] Farokhnia et al. [8] Song et al. [14] Proposed algorithm 8.41 10.64 12.52 9.1 12.5 8.1

We have also used the model in a three-phase RL load to study the voltages in each of the phases. Here, seven firing angles are used to control M equal to 0.81. We used the MATLAB simulation tool to design and control. Figure 6 shows the simulation circuit, and Figure 7 presents the voltages for each of the phases.

#### 5. Neural Fuzzy Interface System

In order to apply this inverter, it is required to change the firing angles in real time under the load. However, these solving algorithms are not fast enough to produce the answers based on load variations. The GA needs around 10 to 150 seconds based on the starting point to produce the answers, while this proposed hybrid algorithm needs 5 to 15 seconds to produce the results in a Core-i7 Intel processor 2.2 GHz, with 8 gigabytes of RAM with MATLAB software. Thus, an interpolation method should be adopted to produce the angles in indexes of M that are not solved through this proposed algorithm in an offline mode. Lookup tables are applied in a traditional manner. Here, the nonlinearity of the firing angles is more because of the change in notches’ positions in different voltage levels with load change, so it is not sufficient to apply linear interpolation. Moreover, linear interpolation methods may be affected by environment noise, while, by applying nonlinear methods, resistance to noise can be accomplished. Among nonlinear interpolation methods such as ANN, ANFIS is selected to have the advantages of both the artificial neural network and fuzzy decision-making. Each ANFIS is going to obtain as many inputs as necessary and produce one output; thus, the number of weights for each ANFIS will produce just one output. There exists the possibility to apply one ANFIS to produce all outputs. The same number of weights is applied for producing all the outputs which can lead to outputs with less accuracy.

There exist two main methods for training the ANFIS [26]:(1)A hybrid method consisting of backpropagation and least squares estimation(2)Backpropagation for all parameters

The first method, the hybrid, can lead to time-consuming training for the system, but the output is assured as being more reliable when implemented to the system. Moreover, the angles can be reached in an instance when the training is over; thus, the first method is applied. Each one of the ANFIS rules is going to be determined through the following equation:where is the output and , , and are the consequent parameters of the ith rule. In equation (15), it is assumed that there exist only two inputs with the names x and y. Symbols and are the linguistic labels represented by fuzzy sets. Here, the ANFIS will receive four inputs. The first one is the required amplitude of the wave, in terms of M. For this input, 26 Gaussian membership functions are chosen as shown for the first output in Figure 8(a). The last three inputs are the amplitude of each one of the DC voltage sources per unit. For each one of these inputs, three Gaussian membership functions are applied (Figure 8(b)). In order to train the system, 675 samples are calculated through this proposed hybrid algorithm, where 540 samples are applied for training and 135 samples are to evaluate the system. These samples are calculated at certain values of M and are equally distributed through M’s range. There should be 8 outputs: seven for firing angles and 1 to show which one of the six mentioned notches’ positions is to be applied. Each one of these 8 systems will contain 702 rules, which are equal to the product of the number of all input membership functions. The second rule, as an example, is expressed by the following:

It can be seen that each rule is produced by the “and” operation between the inputs and generates its own output value.

The training error in ANFIS is observed with respect to each epoch (Figure 8(c)). The error between the angles generated through ANFIS and the angles of test data for system evaluation is shown in Figure 8(d). The overall check data average error for all eight ANFIS networks is 0.00086.

#### 6. Experimental Results

To assess the effectiveness of this proposed method, a single-phase CMLI prototype is built. MOSFET IRF630 with 200 volts and 9 amperes rating is applied as the power switches, and the 4N25 optocoupler is applied to control the gates.

The DC voltage source is fixed at 50 volts for the first level, 50.5 volts for the second one, and 50.3 volts for the third level. The implementation setup of this proposed method is shown in Figure 9.

The output of this inverter which is captured by the Gw INSTEK oscilloscope is shown in Figure 10. The regular switching for M equal to 0.81 is shown in Figure 10(a). The 7-firing angle switching for two different indexes of M is shown in Figures 10(b) and 10(c). There exists one notch in both second and third voltage levels at M = 0.81 (Figure 10(b)). Two notches are seen in the third voltage level at M = 0.70 (Figure 10(c)). It is worth mentioning that these angles are produced through the trained ANFIS. Here, triple harmonic orders will be eliminated in a three-phase system.

In order to apply the angles to generate gate signals, a square wave of 50 hertz frequency is compared to a triangle wave. For the half of a cycle, the square wave has the desired amplitude. This amplitude changes with respect to the firing angle: 90° means an amplitude of one and 0° means an amplitude of zero. For the other half of the cycle, this square wave has zero amplitude. The triangle wave is of 50 hertz frequency and with an amplitude of one, where the amplitude of the square wave is less than that of the triangular wave, and a pulse gate with an amplitude of one is sent to the MOSFET gate.

The highest number of firing angles that can exist in each one of the voltage levels for the assumptions made here is five, indicating that five comparisons must be made between the square and triangle waveforms. If less than five firing angles are needed for the given level switches, the amplitude of the square wave can be two, and thus, no firing angle is produced. With the assistance of the last ANFIS outputs, a code block can decide how to change the square-wave amplitudes to generate the required gate signal.

The harmonic amplitudes are shown in Figure 7. The fast Fourier transform (FFT) analysis of the regular switching phase voltage at M 0.81with THD% of 24.5% and DF2% of 7.97% is compared to the FFT analysis for 7 firing angles for M of 0.81 with THD% of 7.6% and DF2% of 0.6% (Table 5). The FFT analysis for M equal to 0.70 with THD% of 11.31% and DF2% of 1.13% is tabulated in this table as well. It is observed that, with 7 firing angles, more harmonic amplitudes are minimized that assist THD% and DF2% values to be much less than the regular switching strategy.

 Harmonic order Regular switching Proposed hybrid algorithm M 0.81 0.81 0.70 1 151.6 149.86 112.2 5 0.320 0.337 0.239 7 0.133 0.287 0.071 11 0.569 0.049 0.049 13 5.28 0.071 0.204 17 6.99 0.534 0.038 19 2.64 0.032 0.074

#### 7. Conclusion

In the 7-level cascaded multilevel inverter with three DC sources, or seven voltage levels, the regular switching strategy with three firing angles can only set the first-order harmonic to the required value and eliminate the 5th- and the 7th-order harmonics in parts of the modulation index and produce THD% of 24.3% for M equal to 0.81, an insufficient attempt. Furthermore, for M’s less than 0.2, DF2% exceeds 100%. In order to make a better voltage waveform, a 7-firing angle strategy is introduced. Six different notches’ positioning exists where in each index of M, one of them is selected based on lower DF2% of the wave produced. The lookup table filled with the selected angles calculated through a hybrid algorithm of GA and N-R is applied to train and check an ANFIS to interpolate the indexes of M not calculated with this hybrid algorithm. THD% is 7.6% and DF2% is 0.6% for M equal to 0.81. In addition, the harmonic amplitudes to be eliminated never reach more than 60% of the first-order harmonic in the whole range of M, which is because of using different notch positions in different indexes of M. An ANFIS is proposed to determine the online optimal firing angles for the 7-level inverter, in terms of load changes. The prototype made for this experiment confirms the simulation results. The number of firing angles can be different based on the accuracy required, while higher numbers result in higher switching frequencies and switching losses.

The proposed algorithm is one of the possible solutions to the multilevel inverter problem, and more generalized models as well as under load decision-making could be evaluated in the future. Also, we will continue our research for higher-performance switching with looking higher-efficiency algorithms which may be used under the load in the real-time fashion without the need for offline processing. Moreover, as the number of levels increases, a higher degree of freedom is achieved, which presents more challenges for stochastic space search methods.

#### Data Availability

The data used to support the findings of this study are included within the article.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### References

1. B. Diong, H. Sepahvand, and K. A. Corzine, “Harmonic distortion optimization of cascaded H-bridge inverters considering device voltage drops and noninteger DC voltage ratios,” IEEE Transactions on Industrial Electronics, vol. 60, no. 8, pp. 3106–3114, 2013. View at: Publisher Site | Google Scholar
2. A. Nabae, I. Takahashi, and H. Akagi, “A new neutral-point-clamped PWM inverter,” IEEE Transactions on Industry Applications, vol. 17, no. 5, pp. 518–523, 1981. View at: Publisher Site | Google Scholar
3. S. J. Watkins and L. Zhang, “Influence of multilevel sinusoidal PWM schemes on the performance of a flying-capacitor 9 inverter,” in Proceedings of the IEEE International Conference on Power Electronics, Drives and Energy Systems, pp. 92–97, Bombay, Mumbai, December 2002. View at: Google Scholar
4. M. R. Banaei and P. A. Shayan, “Solution for selective harmonic optimisation in diode‐clamped inverters using radial basis function neural networks,” IET Power Electronics, vol. 7, no. 7, pp. 1797–1804, 2014. View at: Publisher Site | Google Scholar
5. A. M. Amjad, Z. Salam, and A. M. A. Saif, “Application of differential evolution for cascaded multilevel VSI with harmonics elimination PWM switching,” International Journal of Electrical Power & Energy Systems, vol. 64, Elsevier, 2015. View at: Publisher Site | Google Scholar
6. A. Kumar Panda and S. Sangita Patnaik, “Analysis of cascaded multilevel inverters for active harmonic filtering in distribution networks,” Electrical Power and Energy Systems, vol. 66, Elsevier, 2014. View at: Google Scholar
7. D. W. Kang, Y. H. Lee, B. S. Suh, C. H. Choi, and D. S. Hyun, “An improved carrier-based SVPWM method by the redistribution of carrier-wave using leg voltage redundancies in generalized cascaded multilevel inverter,” JPE, vol. 1, pp. 36–47, 2001. View at: Google Scholar
8. N. Farokhnia, S. H. Fathi, R. Salehi, G. B. Gharehpetian, and M. Ehsani, “Improved selective harmonic elimination pulse-width modulation strategy in multilevel inverters,” IET Power Electronics, vol. 5, no. 9, pp. 1904–1911, 2012. View at: Publisher Site | Google Scholar
9. B. Wu, “High-power converters and ac drives,” Industrial Electronics, Ieee, Press, Power, Energy, & Industry Applications, Hoboken, NJ, USA, 2006. View at: Google Scholar
10. V. Kumar Gupta and R. Mahanty, “Optimized switching scheme of cascaded H-bridge multilevel inverter using PSO,” Electrical Power and Energy Systems, vol. 64, Elsevier, 2014. View at: Google Scholar
11. E. Babaei, A. Dehqan, and M. Sabahi, “Improvement of the performance of the cascaded multilevel inverters using power cells with two series legs,” Journal of Power Electronics, vol. 13, no. 2, pp. 223–231, 2013. View at: Publisher Site | Google Scholar
12. H. Khounjahan, M. R. Banaei, and A. Farakhor, “A new low cost cascaded transformer multilevel inverter topology using minimum number of components with modified selective harmonic elimination modulation,” A in Shams Engineering Journal, vol. 6, Elsevier, 2014. View at: Google Scholar
13. J. Sathik, M. Ali, and R. Kannan, “A new symmetric cascaded multilevel inverter topology using single and double source unit,” JPE, vol. 15, pp. 951–963, 2015. View at: Google Scholar
14. S. G. Song, F. S. Kang, and S. Park, “Cascaded multilevel inverter employing three phase transformers and single DC input,” Ieee, Transactions on Industrial Electronics, vol. 56, pp. 2005–2014, 2009. View at: Google Scholar
15. G. Nageswara Rao, P. Sangameswara Raju, and K. Chandra Sekhar, “Harmonic elimination of cascaded H-bridge multilevel inverter based active power filter controlled by intelligent techniques,” Electrical Power and Energy Systems, vol. 61, Elsevier, 2014. View at: Google Scholar
16. Y. Tan and Y. Zhu, Fireworks Algorithm for Optimization, Peking University, Beijing, China, 2010.
17. K. Ding, S. Zheng, and Y. Tan, ““A GPU-based parallel fireworks algorithm for optimization” GECCO,” ACM, vol. 978, 2013. View at: Google Scholar
18. M. H. Etesami, N. Farokhnia, and S. H. Fathi, “Colonial competitive algorithm development toward harmonic minimization in multilevel inverters,” Ieee, Transactions on Industrial Electronics, vol. 11, pp. 459–466, 2015. View at: Google Scholar
19. N. A. R. Krismadinata, H. W. Ping, N. A. Rahim, H. W. Ping, and J. Selvaraj, “Elimination of harmonics in photovoltaic seven-level inverter with Newton-raphson optimization,” Procedia Environmental Sciences, vol. 17, Elsevier, 2013. View at: Publisher Site | Google Scholar
20. A. Kavousi, B. Vahidi, R. Salehi, M. K. Bakhshizadeh, N. Farokhnia, and S. H. Fathi, “Application of the bee algorithm for selective harmonic elimination strategy in multilevel inverters,” IEEE Transactions on Power Electronics, vol. 27, no. 4, pp. 1689–1696, 2012. View at: Publisher Site | Google Scholar
21. D. T. Pham, S. Otari, A. Adidy, M. Mahmuddin, and H. Al-Jabbouli, “Data clustering using the bees algorithm,” in Proceedings of the International Conference on Computer Science and its Applications (CSA), Jeju, Korea, December 2007. View at: Google Scholar
22. R. Salehi, N. Farokhnia, M. Abedi, and S. H. Fathi, “Elimination of low order harmonics in multilevel inverters using genetic algorithm,” Journal of Power Electronics, vol. 11, no. 2, pp. 132–139, 2011. View at: Publisher Site | Google Scholar
23. B. Ozpineci, L. M. Tolbert, and J. N. Chiasson, “Harmonic optimization of multilevel converters using genetic algorithms,” IEEE Power Electronics Letters, vol. 3, no. 3, pp. 92–95, 2005. View at: Publisher Site | Google Scholar
24. A. K. Al-Othman and T. H. Abdelhamid, “Elimination of harmonics in multilevel inverters with non-equal dc sources using PSO,” Energy Conversion and Management, vol. 50, no. 3, Elsevier, 2009. View at: Publisher Site | Google Scholar
25. G. S. Konstantinou, M. S. A. Dahidah, and V. G. Agelidis, “Solution trajectories for selective harmonic elimination pulse-width modulation for seven-level waveforms: analysis and implementation,” Power Electronics, IET, vol. 5, pp. 22–30, 2011. View at: Google Scholar
26. R. N. Ray, D. Chatterjee, and S. K. Goswami, “Harmonics elimination in a multilevel inverter using the particle swarm optimization technique,” Power Electronics, IET, vol. 2, pp. 646–652, 2008. View at: Google Scholar
27. W. A. Halim, N. A. Rahim, and M. Azri, “Selective harmonic elimination for a single-phase 13-level TCHB based cascaded multilevel inverter using FPGA,” Journal of Power Electronics, vol. 14, no. 3, pp. 488–498, 2014. View at: Publisher Site | Google Scholar
28. S. Khomfoi and L. M. Tolbert, “Fault diagnosis and reconfiguration for multilevel inverter drive using AI-based techniques,” IEEE Transactions on Industrial Electronics, vol. 54, no. 6, pp. 2954–2968, 2007. View at: Publisher Site | Google Scholar
29. F. Filho, H. Z. Maia, T. H. A. Mateus, B. Ozpineci, L. M. Tolbert, and J. O. P. Pinto, “Adaptive selective harmonic minimization based on ANNs for cascade multilevel inverters with varying DC sources,” IEEE Transactions on Industrial Electronics, vol. 60, no. 5, pp. 1955–1962, 2013. View at: Publisher Site | Google Scholar
30. A. Moeini, M. Dabbaghjamanesh, J. W. Kimball, and J. Zhang, “Artificial neural networks for asymmetric selective harmonic current mitigation-PWM in active power filters to meet power quality standards,” IEEE Transactions on Industry Applications, vol. 1, 2020. View at: Publisher Site | Google Scholar
31. H. Zhao, T. Jin, S. Wang, and L. Sun, “A real-time selective harmonic elimination based on a transient-free inner closed-loop control for cascaded multilevel inverters,” IEEE Transactions on Power Electronics, vol. 31, no. 2, pp. 1000–1014, 2016. View at: Publisher Site | Google Scholar
32. A. Routray, R. Kumar Singh, and R. Mahanty, “Harmonic minimization in three-phase hybrid cascaded multilevel inverter using modified particle swarm optimization,” IEEE Transactions on Industrial Informatics, vol. 15, no. 8, pp. 4407–4417, 2019. View at: Publisher Site | Google Scholar
33. A. Routray, R. K. Singh, and R. Mahanty, “Harmonic reduction in hybrid cascaded multilevel inverter using modified Grey Wolf optimization,” IEEE Transactions on Industry Applications, vol. 56, no. 2, pp. 1827–1838, 2020. View at: Publisher Site | Google Scholar
34. P. K. Prasad, S. S. Lee, and G. Panda, “Reduced switch cascaded multilevel inverter with new selective harmonic elimination control for standalone renewable energy system,” IEEE Transactions on Industry Applications, vol. 55, no. 6, pp. 7561–7574, 2019. View at: Google Scholar
35. K. Prasad, P. R. Bana, and G. Panda, “FPA optimized selective harmonic elimination in symmetric–asymmetric reduced switch cascaded multilevel inverter,” IEEE Transactions on Industry Applications, vol. 56, no. 3, pp. 2862–2870, 2020. View at: Google Scholar
36. B. P. Ranjan, K. P. Panda, and G. Panda, “Power quality performance evaluation of multilevel inverter with reduced switching devices and minimum standing voltage,” IEEE Transactions on Industrial Informatics, vol. 16, no. 8, pp. 5009–5022, 2019. View at: Google Scholar
37. H. Taghizadeh and M. Tarafdar Hagh, “Harmonic elimination of cascade multilevel inverters with nonequal DC sources using particle swarm optimization,” IEEE Transactions on Industrial Electronics, vol. 57, no. 11, pp. 3678–3684, 2010. View at: Publisher Site | Google Scholar
38. A. K. Al-Othman, N. A. Ahmed, M. E. AlSharidah, and H. A. AlMekhaizim, “A hybrid real coded genetic algorithm - pattern search approach for selective harmonic elimination of PWM AC/AC voltage controller,” International Journal of Electrical Power & Energy Systems, vol. 44, no. 1, Elsevier, 2013. View at: Publisher Site | Google Scholar

Copyright © 2021 Seyed Yahya Nikouei et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Related articles

No related content is available yet for this article.
Order printed copiesOrder
Views204
Citations

#### Related articles

No related content is available yet for this article.

Article of the Year Award: Outstanding research contributions of 2021, as selected by our Chief Editors. Read the winning articles.