MPEMathematical Problems in Engineering1563-51471024-123XHindawi10.1155/2021/66423176642317Research ArticleA Genetic-Based Hybrid Algorithm Harmonic Minimization Method for Cascaded Multilevel Inverters with ANFIS ImplementationNikoueiSeyed YahyaDehkordiBehzad Mirzaeianhttps://orcid.org/0000-0001-5727-3569NiroomandMehdiYinPeng-YengDepartment of Electrical EngineeringUniversity of IsfahanIsfahanIranui.ac.ir202122420212021201120203032021124202122420212021Copyright © 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.

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 , 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 , many topologies have been introduced and assessed. Among flying capacitor , diode-clamped , 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 .

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 dv/dt in output voltage with a low harmonic characteristic that reduces electromagnetic compatibility problems, are considered as their advantages .

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) , selective harmonic elimination pulse-width modulation (SHEPWM) , the well-known sinusoidal PWM (SPWM) [9, 10], the finally optimized harmonic-stepped waveform (OHSW) ; (2) changing the multilevel structure to minimize harmonics ; and (3) adding low-pass filters in the output of the multilevel to eliminate high-order harmonics .

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 . 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  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 , 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 . In , Moeini et al. investigated a technique for the modulation technique of the active power filters using the ANN. Moreover, Zhao et al.  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.  presented the modified version of fish swarm optimization algorithm to achieve higher voltage quality. In , 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 .

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 Vdc when S1 and S2 are connected, 0 when all switches are off, and Vdc when switches S3 and S4 are on. When they are connected in series, the CMLI output voltage in a single phase can have 3Vdc to 3Vdc volts, with the step of Vdc. 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.

(a) Seven-level cascaded inverter. (b) Regular switching. (c) Switching strategy with two notches.

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., α1 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:(1)Vt=n=1ansinnαn+bncosnαn.

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:(2)Vn=4Vdcnπi=1skicosnαi,n: odd,0,n: even,where kiVdc 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 6n±1, 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.(3)Vn=4Vdcnπi=1skij=Ni1+1Ni1j1cosnαi,n: odd,0,n: even,where Ni 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):(4)M=k1cosα1+k2cosα2+k3cosα33,0=k1cos5α1+k2cos5α2+k3cos5α3,0=k1cos7α1+k2cos7α2+k3cos7α3.

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.(5)M=i=1N11i1k1cosαi+i=N1+1N21iN1+1k2cosαi+i=N2+1N31iN2+1k3cosαi3,0=i=1N11i1k1cos5αi+i=N1+1N21iN1+1k2cos5αi+i=N2+1N31iN2+1k3cos5αi,0=i=1N11i1k1cos7αi+i=N1+1N21iN1+1k2cos7αi+i=N2+1N31iN2+1k3cos7αi,0=i=1N11i1k1cos19αi+i=N1+1N21iN1+1k2cos19αi+i=N2+1N31iN2+1k3cos19αi.

In equation (5), the sum of N1+N2+N3 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.(6)M=V14Vdcs/π,0M1,where V1 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 , 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.(7)0α1α2α7π/2,(8)αi+1αiε.

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 .

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 N1, N2, and N3 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):(9)f=minαi100V1V1V14+s=2S1hs50VhsV12,where V1 is the first-order harmonic amplitude which is required at the inverter’s output, V1 is the first-order harmonic amplitude that can be received from the inverter, hs is the number of harmonic orders, Vhs 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 :(10)f1α1f1α7f7α1f7α7.

For different values of N1 and N2, the Jacobian matrix varies. The proposed hybrid algorithm is as follows:

Select random possible answers to form the unknowns’ space for M equal to the step value.

Validate the fitness function with a vector obtained from possible solutions.

Obtain the next-generation solutions through mutation, crossover, and other GA operators.

Go to Step 2 until the change in the fitness function or number of iterations becomes less than their respective limits.

Start N-R algorithm with the outputs of GA when it is close to the global optimum point.

Calculate the next iteration angles through the following equation:(11)αk+1=αk+Δαk,

where Δαk is(12)Δαk=J1αkBmaFαk,

where 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)).

Apply αk+1=  cos1abscosαk+1 to assure that the angles meet equation (7) requirements.

Go to Step 6 until the change in angles is less than the limit. At the end, check condition equation (8).

Calculate total harmonic distortion (THD) and DF2% and save the outcome in an array.

For different values of N1 and N2, go to Step 1.

Select the best switching strategy with the minimum of DF2%.

Increase M by the step value, and go to Step 1 until M becomes 1.

For every different value of DC voltage sources, go to Step 1.

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

(a) Voltage amplitude and THD and DF2 for regular switching. (b) Objective function with respect to M for regular switching. (c) Switching angles for regular switching in a 7-level cascaded inverter.

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 .

A well-known benchmark for output voltage quality is the THD% benchmark, as defined by the following equation :(13)THD=i=1V6i±12Vf.

In equation (13), V6i±1 represents each one of the harmonic order amplitudes, and Vf 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 :(14)DF2=1Vfi=1V6i±16i±122.

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 0.6M0.9 and notch positioning in Figure 3(b) for 0M0.2). The results of THD% and DF2% and harmonics can be seen in Figure 3(c).

(a) Harmonic amplitudes for two notches in the third voltage level. (b) Harmonic amplitudes for two notches in the first voltage level. (c) THD% and DF2% and harmonic amplitude for 7 firing angles in a 7-level cascaded inverter. (d) Selected optimized angles for each index of M.

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.

(a) Nominal harmonic values on the spectrum M = 0.70. (b) Nominal harmonic values on the spectrum M = 0.81.

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.

(a) Phase current and line voltage of the 7-level cascaded inverter with regular switching for M equal to 0.81; the horizontal axis is time, and the vertical axis is the amplitude of the wave. (b) Phase current and line voltage of the 7-level cascaded inverter with 7 firing angles for M equal to 0.81. (c) Phase current and line voltage of the 7-level cascaded inverter with 7 firing angles for M 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.

THD% and DF2% comparison for regular and 7-firing angle (with one notch in the second voltage level and one notch in the third voltage level) switching for M equal to 0.81.

MRegular switchingSeven-firing angle switching
THD%DF2%THD%DF2%
0.08339.43133.27121.9949.01
0.2109.87104.9439.286.59
0.2880.7951.0643.015.89
0.45.8124.6822.722.79
0.4840.0926.9816.221.74
0.640.1021.5011.431.29
0.6831.0110.7811.971.69
0.825.338.078.450.89
0.8844.4529.969.001.29
157.10110.7918.0328.7

GA vs. proposed hybrid algorithm for two different indexes of M.

Genetic algorithmProposed hybrid algorithm
M0.700.810.700.81
THD%9.888.4111.318.1
DF2%1.542.921.130.80
Cal. time (s)34163812
α1 (degree)11.8112.4411.621.42
α2 (degree)18.2025.7323.9827.12
α3 (degree)35.9232.6461.5533.56
α4 (degree)41.5534.0370.6635.93
α5 (degree)61.9257.4874.9146.35
α6 (degree)72.6888.2780.8961.89
α7 (degree)89.9988.7888.8871.64

Table 3 shows the parameters used in the hybrid algorithm.

Hyperparameters used in the proposed hybrid algorithm.

Parameter nameParameter value
M increment step0.04
Convert per M step10
Minimum M0.04
Maximum M1
Lower angle bound0
Higher angle boundPi/2
Initial population range[0, 1.6]
Population size70
Constraint tolerance1e − 4
Function tolerance1e − 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.

THD% comparison between the proposed method, GA, and some state-of-the-art approaches for M = 0.81.

Ozpineci et al. Diong et al. Kavousi et al. Farokhnia et al. Song et al. Proposed algorithm
8.4110.6412.529.112.58.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.

Three-phase voltage with RL load and M = 0.81.

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 :

A hybrid method consisting of backpropagation and least squares estimation

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:(15)if x is Ai and y is Bi, then  fi=pix+qiy+ri,where fi is the output and pi, qi, and ri 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 Ai and Bi 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:(16)if input1 is in 1mf1 and input2 is in 2mf2 and input3 is in 3mf3 and input4 is in 4mf2, then output is out1mf2.

(a) Membership functions for the first input and first output produced by ANFIS, number of mmf = 26. (b) Membership functions for the second input and first output produced by ANFIS, number of mmf = 3. (c) Training error for each epoch. (d) Test data and ANFIS output for the first switching angle, max error: 0.0024.

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 single-phase cascaded multilevel inverter setup.

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.

(a) The regular switching phase voltage waveform; each DC source is 50 volts, and frequency of the wave is 50 hertz. (b) Seven-firing angle phase voltage waveform for M equal to 0.81. (c) Seven-firing angle phase voltage waveform for M equal to 0.70 (horizontal axis: 5 ms/div; vertical axis: 50 volts/div).

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 amplitudes in volts for the regular switching in comparison to the proposed switching.

Harmonic orderRegular switchingProposed hybrid algorithm
M0.810.810.70
1151.6149.86112.2
50.3200.3370.239
70.1330.2870.071
110.5690.0490.049
135.280.0710.204
176.990.5340.038
192.640.0320.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.