Real-Time Adaptive Selective Harmonic Elimination for Cascaded Full-Bridge Multilevel Inverter

: Selective Harmonics Elimination is a high-efﬁciency modulation method for multilevel inverters that allows handling very high voltage applications. It eliminates the most signiﬁcant harmonics and ﬁxes the desired fundamental component. The main issue of these techniques is the complex process to obtain the appropriate switching-angles, being necessary to calculate them ofﬂine, meaning that if some disturbances occur, the system will not be compensated. This article proposes a real-time selective harmonic elimination for a single-phase cascaded multilevel inverter. The control strategy maintains constant the fundamental component of the output voltage while removing its third, ﬁfth, and seventh order harmonics. The switching-angles are dynamically adapted to compensate for variations in the input voltage and the load. This is done by obtaining a virtual dynamic system using Groebner basis, an adaptation of the Newton-Raphson method, and implementing a digital PI controller into the virtual dynamical model. This adaptive modulation technique is validated experimentally in a 200 W, 9-levels Cascaded Full Bridge Inverter, canceling the harmonics and regulating the fundamental components in all the tests. The developed theory can be adapted or extended for any multilevel inverter modulated by selective harmonic elimination.


Introduction
Multilevel converters are becoming more popular in high power and high voltage applications. They distribute the power in sub-cells and reduce the size of the passive elements of the converter. This characteristic is due to the apparent frequency observed at the output voltage that is proportional to the switching frequency of the semiconductor devices multiplied by the number of cells [1][2][3][4][5][6][7]. For DC/AC conversion, the cascaded topology is an alternative when multiple independent voltage sources are available [8][9][10][11]. Even if these multilevel converters allow to reduce the cell switching frequency for the same number of passive components, switching losses are still a concern. In order to reduce those losses, low-frequency modulation techniques can also be employed, also helping in the minimization of electromagnetic interference due to the high number of switches. Low frequency modulations have several applications. One of them is to feed motors powering by multi-level inverter [12], where due to the slow motor dynamic, the presence of high-order harmonics on the resulting voltage waveform is not a real issue.
Hence, it is possible to improve the efficiency by switching only a few times per cycle. In this case, an outer loop for managing the frequency of the fundamental component is necessary. Another application is to generate Medium-Voltage AC (MVAC) [13], which handles around 10 kV. Commonly, switching devices that support these values of voltages are expensive or slow. Hence, using low frequency modulation techniques, a suitable manner to generates MVAC is obtained. Generating MVAC from several DC sources would allow to supply current to the grid at this voltage levels from several renewable sources, or to manage motors at theses voltages. Indeed, Two different approaches of low frequency modulation exist: minimization of THD [14,15], and Selective Harmonic Elimination (SHE) [16][17][18], where both approaches maintain the desired fundamental component. Both methods are based on finding the switching-angles that satisfy the given conditions. Some of the techniques used to find these angles are: intelligent methods as Generic Pattern Search [19] or swarm particles [20]; numeric methods as Newton-Raphson [21,22]; and algebraic methods as the conversion of the system to symmetrical polynomials or to its Groebner Basis [17,23,24]. Ref. [25] proposes another method to find the switching-angles with another polynomial approach. The algebraic methods allow finding all the solutions of the system in case more than one solution exist. However, its computation time is considerably high due to the search for the roots of a polynomial system. Indeed, the micro-controller must solve radicals and divisions if the polynomial degree is less than four, otherwise, according to Galois theory [17,23,24,26], in most cases numerical methods are available. The intelligent and numeric methods, besides the processing time, are not able to determine if whether there is another solution that minimizes or eliminates the desired harmonics. Furthermore, if a disturbance occurs in the input voltages or the load, all of these solving methods take excessive processing time to adjust the switchingangles to compensate the disturbance. In other cases, the solution of the switching-angle equations can be complex values, making impossible its implementation. This affirmation is validated, taking into account the equations found in [17,23,24], where the polynomial roots can produce complex-values for the switching-angles. This fact generates instability in the system. One solution is to set-up a look-up table. However, if a robust system is desired, able to provide the angles for different values of the input voltages, a large look-up table is necessary, requiring a considerable amount of computation resources. Ref. [27] proposes a closed-loop solution, linearizing the system and involving an Integral controller. However, if the disturbance is high enough, the system can present a change in the direction of the gradient, causing the controller to destabilize the system. Ref. [28] implements an interesting control using the Groebner basis and Sturm chain, and evaluates the performance between some micro-controllers None of the previously presented methods allows the switching-angles to be recalculated in real-time in order to adapt to fast disturbances or parametric changes. The present article proposes an adaptive control strategy for SHE that readjusts dynamically the switching-angles for compensating the disturbances produced in the input voltages or the load, maintaining a desired fundamental component, and eliminating the most significant harmonics. This regulation is carried out by obtaining a virtual dynamical model of the harmonics. Then a Proportional-Integral (PI) controller is implemented to cancel the errors between the real Fourier components and the desired ones. This control method is computed for an inverter of 9 levels, eliminating the third, fifth and seventh order harmonics.
The article is organized as follows: Section two describes the inverter, the obtention of a static model of the harmonics according to the switching-angles, and the conversion to Groebner basis. The third section studies the switching-angle solution when the fundamental component changes, analyzing the feasible regions, and the behavior of the angles in those regions. The fourth section introduces a conversion of the static model into a dynamical system, using a modification of Newton Raphson and proposes a linear controller design. Section five shows the simulation and experimental results with a 9-levels full-bridge cascaded multilevel inverter prototype, inserting a 200 W load and changing one of the input voltages. Finally, the conclusions and future works are developed in the last section.

Description of the System
The proposed work describes an adaptive modulation technique for selective harmonic elimination applied to a multilevel inverter, using 4-cells maximum. This limitation will be explained at the end of section 3. The system described in this article corresponds to a Cascaded Full-Bridge Multilevel Inverter (CFBMI), composed of 4 Full-Bridge Cells (FBC), as shown in Figure 1a, where E k and v H k are the input and output voltages of the k th FBC (FB k ), respectively, for k = {1, 2, 3, 4}. v an is the output voltage of the entire system, corresponding to the sum of all the v H k . In this work, each FBC switches once per quarter of the cycle. The aims are to control the fundamental component and to eliminate as many harmonics as possible. Figure 1b shows the waveform of the output voltage, neglecting the effects of inductors and capacitors of the input filters, and Figure 1c shows the harmonics analysis of the produced waveform when all the switching-angles are equally separated (θ k = 2πk/5). Notice that the waveforms are symmetric in both axes, as FB k commutes at θ k , π − θ k , π + θ k , and 2π − θ k , producing that the even order harmonics and the quadrature components of all the harmonics are eliminated as it is mentioned in [17,23,24]. Furthermore, it can be observed that if there is no specific control law for the computation of the switching-angles, harmonics at different orders are produced as shown in Figure 1c.

Computing the Output Voltage Harmonics
In this subsection, an analytical expression of the harmonics, as a function of the switching-angles is obtained. Based on Figure 1b, the Fourier components of v H k are defined as: As mentioned previously, all the quadrature components and the even order harmonics are eliminated. Hence the l th Fourier coefficient of the k th FBC can be described as: Then, defining v an as the sum of all the v H k : According to (3), the l th Fourier components (h l ) of v an is defined as: Assuming that all the sources are identical, the nominal value of E k is noted E. Therefore, E k can be defined as E k = E(1 + δ k ), δ k is a disturbance in the input voltage E. Then, defining h l as: It follows, Knowing that cos(lθ) = T l (cos(θ)) where T l (•) is the Chebyshev polynomial of first kind of l th degree, then: where x k = cos(θ k ).
As it is mentioned previously, this strategy aims to impose the fundamental component and to eliminate the most significant harmonics. In this work, those correspond to the first three odd order harmonics. For that reason, expanding T l (x k ) for l = {1, 3, 5, 7}: Expressing (8) as a matrix form: where (9) expresses the Fourier components that are managed as a function of the cosine of the switching-angles defined as X. Lets define H e , as the estimated harmonics, corresponding to the harmonics with no disturbances. Hence: Notice that if there is no disturbance, it follows H R = H e . The next subsection shows a method to solve (10).

Solving the Polynomial Equation
To solve (10), this paper uses an algebraic method that converts (10) into its Groebner Basis. The groebner basis conversion is developed in Maple. There exists several algorithm for that. However, the most used, the most efficient and also compact to use is the Buchberger's Algorithm [29] which consists in developing several polynomial divisions to meet a predefined condition. The resulting system is another polynomial system of equations with the same solution set where the coefficients of the variables are polynomial functions of H e following the form: This conversion decouples the independent variables, simplifying the solving process of the system. Refs. [23,29] explain this polynomial conversion. Furthermore, according to [17], this system corresponds to a symmetric polynomial system, meaning that the solution set of any x k is a permutation of the solution set of x 1 . For that reason, finding the solution set of p 1 (x 1 , H e), the solution set of the other x k is also found. Therefore, it is possible to define the system as: where q(x k , H e ) = p 1 (x k , H e ). Grouping (12), it follows: where Q(X, H e ) represents all the polynomials obtained by the Groebner basis conversion. Equation (14) describes q(x k , H e ), where its roots corresponds to the solution set of all the cosine of the switching-angles.

Analysis of the Solutions
To validate the Groebner conversion described in (14), the parameters are set to E = 48 V, h 1 = 155 V. Therefore, according to (5), h e 1 = 3.23. Furthermore, taking into account that the objective is to eliminate the third, fifth and seventh order harmonics (h 3 , h 5 and h 7 ). Those harmonics are equaled to 0. Based on these parameters, the solution set of (14) is: x 1 = 0.9842, x 2 = 0.8958, x 3 = 0.6187, x 4 = 0.0468, resulting the switching-angles: θ 1 = 0.1780 rad, θ 2 = 0.4606 rad, θ 3 = 0.9037 rad, θ 4 = 1.5240 rad. Figure 2a shows the waveform of v an , v H 1 , v H 2 , v H 3 and v H 4 with the respective switching-angles, and Figure 2b shows the Harmonics analysis.  Comparing Figure 1c and Figure 2b it is shown that the third, fifth and seventh order harmonics are eliminated, while the fundamental value is the desired one. Furthermore, Figure 2a shows that all the FBCs present a positive step in the first quarter of the cycle. However, for different values of h 1 , x k can be negatives or higher than one. When x k is negative, the switching-angle is higher than π/2, producing a negative step. Figure 3a shows the behavior of the waveform when x k is positive and Figure 3b shows the output voltage when x 4 < 0.
According to Figures 2a and 3a when all the switching-angles are lower than π/2, all the x k values are positives, presenting the levels: 4E, 3E, 2E, E, 0, −E, −2E, −3E, −4E; meaning that for this case the v an has 9 levels. For the case of Figure 3b, which shows the waveform of v an and v H4 when x 4 < 0, it can be inferred that the v an has the following levels: 3E, 2E, E, 0 E, 2E, 3E; meaning that for one x k value less than zero, the v an presents seven levels, two levels less than the previous case, one level less for the positive part and one less for the negative one. Hence, if E is high enough, it is possible to remove the third, fifth and seventh order harmonics, having the same fundamental component with less than nine levels, switching four times per quarter of the cycle. Thus, it is possible to deduce that the number of levels is not relevant in the solution and only the number of commutations per quarter of cycles and the value of E care. It should be noted that having more levels than switching-angles is equivalent to have asymmetric levels with steps of more than twice the minimum level.
In other cases, depending on h 1 , the solution set of (14) can present complex values, higher than 1 or lower than −1. Then, there are no switching-angles that satisfy the desired h e 1 and the nullity of h e 3 , h e 5 , h e 7 . To analyze the behavior of the solution set when the system eliminates h e 3 , h e 5 and h e 7 , Figure 4 shows X vs h e 1 when the third, fifth and seventh order harmonics are zero. Note that there are three regions where a feasible solution of the system does not exist: 1.19 < h e1 < 1.52; 2.07 < h e1 < 2.28 and h e1 > 3.44. Figure 4 also shows that in other regions, the values of x k are negative, meaning that the step is negative in the positive semi cycle. This paper focuses in the feasible region 2.28 < h e1 < 3.44, because in this region the maximum number of levels (9) with 4 FBCs is generated. In this region only x 4 can be negative, meaning that it is possible to produce 7 or 9 levels, according to the value of the fundamental component.
To prove that the Groebner conversion is valid for cases where x 4 < 0, Figure 5a shows v an and v H k when E = 54 V and h 1 = 155.5 V. With these parameters, h e 1 = 2.88 and the solution set of X is: x 1 = 0.9797, x 2 = 0.8661, x 3 = 0.4744, x 4 = −0.0582, generating the switching-angles of: θ 1 = 0.2020 rad, θ 2 = 0.5235 rad, θ 3 = 1.0765 rad, θ 4 = 1.629 rad. Note that θ 4 > π/2 means that the step in FB 4 is negative during the first quarter of cycle. Notice in Figure 5a that v H 4 starts with a negative step and v an has 2 levels less than the v an shown in Figure 2a. To validate this result, Figure 5b shows the Harmonic analysis of Figure 5a, where the fundamental component does not change and the third, fifth and seventh order harmonics, h e 3 , h e 5 , h e 7 , are eliminated again.  This result indicates that it is possible to analyze mathematically this system according to the number of switching-angles without taking into account the number of FBCs, knowing that x k > 0 and x k < 0 produces positive and negative step the first quarter of cycle, respectively.
Apparently, this method could work for any number of switching-angles. However, for more than 4 commutations per quarter of cycle, the software never find the Groebner basis. This is because it is necessary to express the coefficients of the Groebner basis as a function of the harmonics; and those are found solving another polynomial equation. If the degree of this polynomial equation is higher than four, according to Galois theory, it is not possible to find its roots in a explicit manner [26].

Closing the Loop
In this section, a control law is proposed to ensure a desired fundamental component and the elimination of the selected harmonics when a disturbance occurs. According to (9) and (13), the system is modeled as a static one. The proposed computation method consists of two steps. The first one corresponding to (13), indicates that for a given estimated harmonics, H e , the polynomial Q(X, H e ) provides a solution set for X. Then in the second step, modeled by (9), the switching-angles θ k are obtained from X and applied to the inverter, generating the output voltage, v an . Then, the normalized harmonics of v an , H R , are computed. Figure 6 shows a diagram of the implemented system and the static model that represents it. The model shown in Figure 6 is static, nonlinear, and presents an implicit system Equation (13). However, for designing a controller aimed to cancel some specific harmonics, it is necessary to obtain an explicit, dynamic model. To achieve these requirements, a Newton Raphson (NR) method with modifications is shown in (15). Hence, According to (16), if the harmonics do not change, the equation corresponds to the solving process of the classical NR method. Hence, the new system corresponds to a "virtual" dynamical system, composed of two stages. The first one corresponds the iterative equation that solves X, while the second stage corresponds to the static, explicit equation that represents the inverter, the computations of the switching-angle from X and the computation of the normalized harmonics H R from the sensed output voltage v an . Equation (17) shows the proposed dynamical model of the system and a block diagram of (17) is shown in Figure 7. Based on this model, the proposed control law is composed of the desired normalized harmonics plus a discrete PI controller, as shown by (18).
Inserting the PI controller in (16), it follows: where H Rt = Π(X t )(V 1 + ∆) It can be observed that when the angles are found, Q t = 0 and the harmonics do not change. Hence, X does not change, meaning that the system reaches a stable operating point. It should be mentioned that the controller works only in the feasible regions of Figure 4 without passing from one feasible region to another one. Figure 8 shows the block diagram of the closed-loop system. To validate this control law, the next section shows the simulation and experimental results.

Results
This section develops and comments the obtained simulation and the experimental results. The tests are carried out using the prototype shown in Figure 9, with the parameters described in Table 1. Where the input voltages, E, come from 4 li-ion batteries of 25Ah; R L k is the DC Resistance (DCR) of the inductance L k , P o is the output power, R DS is the series ON resistances of the IRFI4212 switches, and the Si8274 is used as the gate driver. R s and R x are the resistances associated with the wires at the input of each FBC, and at the output of the inverter, respectively. For the acquisition of the harmonics, the DSP captures the output voltage during 20 periods of v an , with a sampling time of 66 µs. Indeed, according to signal processing theory shown in [30], in order to have good accuracy, the period of acquisition must be 10 times higher than the period of the minimum Fourier coefficient. The oscilloscope used correspond to a DSOX3034 of Keysight, which has a bandwidth of 350 MHz. The tests developed hereafter correspond to an insertion of a load and a disturbance in one of the input voltages.

Response to a Load Transient
This test analyzes the system when a load of 200 W is inserted at t = 7.5 s. Figure 10a,b show the simulation and experimental results, respectively, validating its similarity. Before the load insertion, one can observe a negative step in FB 4 , because of according to Table 1 and (5), h 1 = 145 V, E = 48 V and h 1 = 3.02, which produces a negative value of x 4 , as Figure 4 indicates. When the load is inserted, there is a voltage drop caused by the impedance of the converter. Hence, to regulate the fundamental component, the inverter must produce a higher fundamental component. According to Figure 4, to increase the fundamental component from h 1 = 3.02, it is necessary to increase x 4 to reach values higher than 0. For that reason, when the controller acts to regulate the fundamental component and the harmonics, x 4 changes from a negative value to a positive value, as shown in Figure 11a. The desired fundamental component is recovered and the third, fifth, and seventh order harmonics are reduced again close to zero volts, as shown in Figure 11b. The fundamental component reaches the reference value in about 6 s. All the selected order harmonics remain between 0 and 1.45 V, meaning they reach a value less than 1% of the fundamental component. After 30 s, these harmonics are less 0.34 % of the fundamental component.

Disturbance on a Cell Input Voltage Source
This test shown in Figure 12a,b is carried out with the converter connected to a 200 W load while applying a step transient to E 1 from 55 V to 48 V. It should be noted that before the voltage step, the fourth FBC presents a negative step. This is because E 1 is higher than the other sources, seven levels being enough, instead of nine, producing a steady-state of x 4 lower than 0, while the others x k are higher than 0, as shown in Figure 13a. When E 1 goes back to 48 V, all the x k are positive, producing a positive step and reaching the desired fundamental component. All the FBs show positive steps because E 1 is reduced. For that reason, the inverter presents lower voltage in the inputs. Hence the FBs must increase the value of the fundamental component. Figure 13b shows the behavior of the harmonics during this test, presenting overshoots in h 1 , h 3 , h 5 , that correspond to 4%, 1.1% and 0.4% of the reference of h 1 , respectively. h 7 is almost not affected. h 1 is stabilized after 5 s. In this test, the harmonics present a very low oscillations representing 0.48% of the fundamental component in the worst case, validating the robustness of the controller.

Conclusions
This article has presented a control law applied to low frequency modulation strategy, regulating the fundamental component and eliminating the third, fifth and seventh order harmonics for the case of a multilevel inverter involving 6 to 8 cells.
Implementing real-time switching angle computations for SHE control method is not common due to its complexity. Using Groebner basis approach to decouple the equations and Newton Rapshon to emulate a virtual dynamical model allows to control the fundamental and harmonics with an additional PI controller. This process relaxes the complexity and saves processing time to compensate the switching-angles if a disturbance in the input voltage or in the load occurs. This control method is validated both by observing the response of the system during a load transient and disturbing one of the cell input voltage sources, canceling practically the harmonics of third, fifth and seventh order and regulating the fundamental components in all the tests.
Concerning the future works, proving that the proposed controller can operate for a higher number of commutations, meaning eliminating more harmonics, is under investigation. This will allow to use more cells in the multilevel inverters.