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

Miguel Vivert, Rafael Diez, Marc Cousineau, Diego Bernal Cobaleda, Diego Patino, Philippe Ladoux

## ► To cite this version:

Miguel Vivert, Rafael Diez, Marc Cousineau, Diego Bernal Cobaleda, Diego Patino, et al., Real-Time Adaptive Selective Harmonic Elimination for Cascaded Full-Bridge Multilevel Inverter. Energies, 2022, 15 (9), pp.2995. 10.3390/en15092995. [hal-04283960]

HAL Id: hal-04283960

https://hal.science/hal-04283960v1

Submitted on 14 Nov 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
Article

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

Miguel Vivert <fnref n="1" />,<fnref n="2" />,* , Rafael Diez <fnref n="3" /> ID, Marc Cousineau <fnref n="4" /> ID, Diego Bernal Cobaleda <fnref n="5" /> ID and Diego Patino <fnref n="3" /> ID
and Philippe Ladoux <fnref n="4" /> ID

<figure><img src="image_2.png" /></figure>

check for
updates

**Citation:** Vivert, M.; Diez, R.; Cousineau, M.; Bernal Cobaleda, D.; Patino, D.; Ladoux, P. Real-Time Adaptive Selective Harmonic Elimination for Cascaded Full-Bridge Multilevel Inverter. *Energies* **2022**, *15*, 2995. https://doi.org/10.3390/en15092995

Academic Editor: Mario Marchesoni

Received: 7 March 2022

Accepted: 15 April 2022

Published: 20 April 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_3.png" /></figure>

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

**Abstract:** Selective Harmonics Elimination is a high-efficiency modulation method for multilevel inverters that allows handling very high voltage applications. It eliminates the most significant harmonics and fixes 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 offline, 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, fifth, 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.

**Keywords:** multilevel inverter; selective harmonic elimination; polynomial transform; newton-raphson method; closed-loop system

## 1. 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–7]. For DC/AC conversion, the cascaded topology is an alternative when multiple independent voltage sources are available [8–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.

<footnote n="1">¹ Carrera de Ingeniería en Electricidad (CIELE), Facultad de Ciencias Aplicada (FICA), Universidad Técnica del Norte, Ibarra 100105, Ecuador</footnote>

<footnote n="2">² IKERGUNE AIE, 20870 Elgoibar, Spain</footnote>

<footnote n="3">³ Department of Electronics Engineering, Pontificia Universidad Javeriana, Bogota 110231, Colombia; rdiez@javeriana.edu.co (R.D.); patino-d@javeriana.edu.co (D.P.)</footnote>

<footnote n="4">⁴ LAPLACE, ENSEEIHT Engineering School, Department of Electronics, Electrical Energy and Automation, University de Toulouse, CNRS, Toulouse-INP, UPS, 3 Rue Charles Camichel, 31071 Toulouse, France; cousineau@laplace.univ-tlse.fr (M.C.); philippe.ladoux@laplace.univ-tlse.fr (P.L.)</footnote>

<footnote n="5">5 Electrical Engineering Department (ESAT) KU Leuven—EnergyVille Diepenbeek, 3001 Genk, Belgium; diego.bernal@kuleuven.be</footnote>

<footnote>* Correspondence: mevivert@utn.edu.ec; Tel.: +34-603-33-54-16</footnote>
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 generate 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 these voltages. Indeed, Two different approaches of low frequency modulation exist: minimization of THD [14,15], and Selective Harmonic Elimination (SHE) [16–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 switching-angles 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 recal-
culated 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 funda-
mental 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 con-
troller 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.

## 2. 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 ($\theta_k = 2\pi k/5$).

<figure><img src="image_4.png" /><figcaption>Figure 1. (a) Cascaded-Full-Bridge Multilevel Inverter with 4 FBCs, (b) Waveforms of $v_{an}$, $v_{H1}$, $v_{H2}$, $v_{H3}$ and $v_{H4}$, (c) harmonic analysis of $v_{an}$.</figcaption></figure>

Notice that the waveforms are symmetric in both axes, as $FB_k$ commutes at $\theta_k$, $\pi - \theta_k$, $\pi + \theta_k$, and $2\pi - \theta_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.

### 2.1. 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:

$$v_{H_k} = \sum_{l=1}^{\infty} (b_{kl} \sin(l\omega t) + a_{kl} \cos(l\omega t)) \quad (1)$$

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:

$$b_{kl} = \begin{cases} \frac{4E_k}{l\pi} \cos(l\theta_k) & ; \ l \text{ is odd}; \forall k = \{1, 2, 3, 4\} \\ 0 & ; \ l \text{ is even}; \forall k = \{1, 2, 3, 4\} \end{cases} \quad (2a)$$

$$a_{kl} = 0 \quad ; \quad \forall k = \{1, 2, 3, 4\}; \forall l \ge 1 \quad (2b)$$
Then, defining $v_{an}$ as the sum of all the $v_{H_k}$:

$$v_{an} = \frac{4}{\pi} \sum_{l=1}^{\infty} \left( \frac{1}{l} \sum_{k=1}^{4} (E_k \cos(l\theta_k)) \sin(l\omega t) \right) \quad (3)$$

According to (3), the $l^{th}$ Fourier components ($h_l$) of $v_{an}$ is defined as:

$$h_l = \frac{4}{l\pi} \sum_{k=1}^{4} (E_k \cos(l\theta_k)) \quad (4)$$

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 + \delta_k)$, $\delta_k$ is a disturbance in the input voltage $E$. Then, defining $h'_l$ as:

$$h'_l = \frac{h_l}{E} \quad (5)$$

It follows,

$$h'_{l} = \frac{4}{l\pi} \sum_{k=1}^{4} (1 + \delta_{k}) \cos(l\theta_{k}) \quad (6)$$

Knowing that $\cos(l\theta) = T_l(\cos(\theta))$ where $T_l(\cdot)$ is the Chebyshev polynomial of first kind of $l^{th}$ degree, then:

$$h'_{l} = \frac{4}{l\pi} \sum_{k=1}^{4} (1 + \delta_{k}) T_{l}(x_{k}) \quad (7)$$

where $x_k = \cos(\theta_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\}$:

$$\begin{aligned}
h'_{1} &= \frac{4}{\pi} \sum_{k=1}^{4} (1 + \delta_k)x_k \\
h'_{3} &= \frac{4}{3\pi} \sum_{k=1}^{4} (1 + \delta_k)(4x_k^3 - 3x_k) \\
h'_{5} &= \frac{4}{5\pi} \sum_{k=1}^{4} (1 + \delta_k)(16x_k^5 - 20x_k^3 + 5x_k) \\
h'_{7} &= \frac{4}{7\pi} \sum_{k=1}^{4} (1 + \delta_k)(64x_k^7 - 112x_k^5 + 56x_k^3 - 7x_k)
\end{aligned} \quad (8)$$

Expressing (8) as a matrix form:

$$\mathbf{H}'_{\mathbf{R}} = \Pi(\mathbf{X})(\mathbf{V}_1 + \mathbf{\Delta}) \quad (9)$$

where $\mathbf{V}_1 = [1 \ 1 \ 1 \ 1]^T$, $\mathbf{H}'_{\mathbf{R}} = [h'_1 \ h'_2 \ h'_3 \ h'_4]^T$, $\mathbf{\Delta} = [\delta_1 \ \delta_2 \ \delta_3 \ \delta_4]^T$, $\mathbf{X} = [x_1 \ x_2 \ x_3 \ x_4]^T$,

$$\Pi(\mathbf{X}) = \frac{4}{\pi} \begin{bmatrix} T_1(x_1) & T_1(x_2) & T_1(x_3) & T_1(x_4) \\ \frac{1}{3}T_3(x_1) & \frac{1}{3}T_3(x_2) & \frac{1}{3}T_3(x_3) & \frac{1}{3}T_3(x_4) \\ \frac{1}{5}T_5(x_1) & \frac{1}{5}T_5(x_2) & \frac{1}{5}T_5(x_3) & \frac{1}{5}T_5(x_4) \\ \frac{1}{7}T_7(x_1) & \frac{1}{7}T_7(x_2) & \frac{1}{7}T_7(x_3) & \frac{1}{7}T_7(x_4) \end{bmatrix}$$
Equation (9) expresses the Fourier components that are managed as a function of the cosine of the switching-angles defined as X. Lets define $\mathbf{H}'_e$, as the estimated harmonics, corresponding to the harmonics with no disturbances. Hence:

$$ \mathbf{H}'_e = \Pi(\mathbf{X})\mathbf{V}_1 \qquad (10) $$

Notice that if there is no disturbance, it follows $\mathbf{H}'_R = \mathbf{H}'_e$. The next subsection shows a method to solve (10).

## 2.2. 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 $\mathbf{H}'_e$ following the form:

$$ \begin{aligned} p_1(x_1, \mathbf{H}'_e) &= 0 \\ p_2(x_1, x_2, \mathbf{H}'_e) &= 0 \\ \vdots \\ p_N(x_1, x_2, \dots, x_N, \mathbf{H}'_e) &= 0 \end{aligned} \qquad (11) $$

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, \mathbf{H}'_e)$, the solution set of the other $x_k$ is also found. Therefore, it is possible to define the system as:

$$ \begin{aligned} q(x_1, \mathbf{H}'_e) &= 0 \\ \vdots \\ q(x_N, \mathbf{H}'_e) &= 0 \end{aligned} \qquad (12) $$

where $q(x_k, \mathbf{H}'_e) = p_1(x_k, \mathbf{H}'_e)$.

Grouping (12), it follows:

$$ \mathbf{Q}(\mathbf{X}, \mathbf{H}'_e) = 0 \qquad (13) $$

where $\mathbf{Q}(\mathbf{X}, \mathbf{H}'_e)$ represents all the polynomials obtained by the Groebner basis conversion.

Equation (14) describes $q(x_k, \mathbf{H}'_e)$, where its roots corresponds to the solution set of all the cosine of the switching-angles.
$$ (268.8\pi^4 h_1'^6 - 16128\pi^2 h_1'^4 - 16128\pi^2 h_1'^3 h_3' + 193536h_1'^2 + 193536h_1' h_3' + 193536h_1' h_5' - 193536h_3'^2)x_k^4 \\ - (67.2\pi^5 h_1'^7 - 4032\pi^3 h_1'^5 - 4032\pi^3 h_1'^4 h_3' + 48384\pi h_1'^3 + 48384\pi h_1'^2 h_3' + 48384\pi h_1'^2 h_5' - 48384\pi h_1' h_3'^2)x_k^3 \\ + (720\pi^6 h_1'^8 - 604.8\pi^4 h_1'^6 - 604.8\pi^4 h_1'^5 h_3' + 16128\pi^2 h_1'^4 + 24192\pi^2 h_1'^3 h_3' + 8064\pi^2 h_1'^3 h_5' - 145152h_1'^2 \\ - 193536h_1' h_3' - 193536h_1' h_5' - 48384h_1' h_7' + 145152h_3'^2 + 48384h_3' h_5')x_k^2 - (40\pi^7 h_1'^9 - 50.4\pi^5 h_1'^7 - 50.4\pi^5 h_1'^6 h_3' \\ - 2016\pi^3 h_1'^5 + 3024\pi^3 h_1'^4 h_3' + 1008\pi^3 h_1'^4 h_5' - 24192\pi h_1'^3 - 24192\pi h_1'^2 h_3' + 36288\pi h_1'^2 h_5' + 12096\pi h_1'^2 h_7' \\ + 36288\pi h_1' h_3'^2 - 24192\pi h_1' h_3' h_5' + 12096\pi h_3'^3)x_k + \pi^8 h_1'^{10} - 1.8\pi^6 h_1'^8 - 1.8\pi^6 h_1'^7 h_3' + 100.8\pi^4 h_1'^6 \\ + 151.2\pi^4 h_1'^5 h_3' + 50.4\pi^4 h_1'^5 h_5' - 2016\pi^2 h_1'^4 - 3024\pi^2 h_1'^3 h_3' - 2016\pi^2 h_1'^3 h_5' - 1008\pi^2 h_1'^3 h_7' + 3024\pi^2 h_1'^2 h_3' h_5' \\ - 30.24\pi^2 h_1' h_3'^3 + 120.96h_1'^2 + 24192h_1' h_3' + 12096h_1' h_5' + 12096h_7' h_1' - 12096h_3' h_5' + 12096h_3' h_7' - 12096h_5'^2 = 0 \quad (14) $$

### 3. 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: $\theta_1 = 0.1780$ rad, $\theta_2 = 0.4606$ rad, $\theta_3 = 0.9037$ rad, $\theta_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.

<figure><img src="image_5.png" /><figcaption>Figure 2. (a) Waveforms of $v_{an}$, $v_{H_1}$, $v_{H_2}$, $v_{H_3}$, $v_{H_4}$, (b) Harmonics analysis of $v_{an}$.</figcaption></figure>

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 $\pi/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 $\pi/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.
<figure><img src="image_6.png" /><figcaption>**Figure 3.** Waveforms of $v_{an}$ and $v_{H4}$, shifting $x_4$ (a) for $x_4 > 0$ and $\theta_4 < \pi/2$, (b) for $x_4 > 0$ and $\theta_4 < \pi/2$.</figcaption></figure>

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'_{e1}$ and the nullity of $h'_{e3}$, $h'_{e5}$, $h'_{e7}$. To analyze the behavior of the solution set when the system eliminates $h'_{e3}$, $h'_{e5}$ and $h'_{e7}$, Figure 4 shows X vs $h'_{e1}$ when the third, fifth and seventh order harmonics are zero.

<figure><img src="image_7.png" /><figcaption>**Figure 4.** Behavior of the cosine of the switching-angles (X) according to the fundamental component, $h'_1$, when the third, fifth and seventh order harmonics are equal to 0.</figcaption></figure>

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: $\theta_1 = 0.2020$ rad, $\theta_2 = 0.5235$ rad, $\theta_3 = 1.0765$ rad, $\theta_4 = 1.629$ rad. Note that $\theta_4 > \pi/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.

<figure><img src="image_8.png" /><figcaption>**Figure 5.** (a) Waveforms of $v_{an}, v_{H1}, v_{H2}, v_{H3}, v_{H4}$ when $\theta_4 > \pi/2$, (b) Harmonics analysis of $v_{an}$ when $\theta_4 > \pi/2$.</figcaption></figure>

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 an explicit manner [26].

## 4. 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 $\theta_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.
<figure><img src="image_9.png" /><figcaption>Figure 6. static model and block diagram of the system.</figcaption></figure>

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

$$Q'_{t} = Q_{t-1} + \left( \left. \frac{\partial Q}{\partial X} \right|_{t-1} \right) (X_t - X_{t-1}) + \left( \left. \frac{\partial Q}{\partial H'_{e}} \right|_{t-1} \right) (H'_{e_t} - H'_{e_{t-1}}) \quad (15)$$

Hence,

$$X_t = X_{t-1} - \left( \left. \frac{\partial Q}{\partial X} \right|_{t-1} \right)^{-1} Q_{t-1} + \left( \left. \frac{\partial Q}{\partial X} \right|_{t-1} \right)^{-1} \left( \left. \frac{\partial Q}{\partial H'_{e}} \right|_{t-1} \right) (H'_{e_t} - H'_{e_{t-1}}) \quad (16)$$

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.

$$\begin{bmatrix} X_t \\ H'_{R_t} \end{bmatrix} = \begin{bmatrix} F(X_{t-1}, H'_{e_t}, H'_{e_{t-1}}) \\ \Pi(X_t)(V_1 + \Delta) \end{bmatrix} \quad (17)$$

<figure><img src="image_10.png" /><figcaption>Figure 7. virtual dynamic model of the system.</figcaption></figure>

Based on this model, the proposed control law is composed of the desired normalized harmonics plus a discrete PI controller, as shown by (18).

$$H'_{e_t} = H'_{ref} + a_1 \xi_t - a_0 \xi_{t-1} \quad (18)$$

where $\xi_t = H_{ref} - H_{R_t}$.
Inserting the PI controller in (16), it follows:

$$ \mathbf{X}_t = \mathbf{X}_{t-1} - \left(\frac{\partial \mathbf{Q}}{\partial \mathbf{X}}\bigg|_{t-1}\right)^{-1} \mathbf{Q}_{t-1} - \left(\frac{\partial \mathbf{Q}}{\partial \mathbf{X}}\bigg|_{t-1}\right)^{-1} \left(\frac{\partial \mathbf{Q}}{\partial \mathbf{H}'_e}\bigg|_{t-1}\right) (a_1 \mathbf{H}'_{Rt} - (a_1 + a_0) \mathbf{H}'_{Rt-1} + a_0 \mathbf{H}'_{Rt-2}) \quad (19) $$

where $\mathbf{H}_{Rt} = \Pi(\mathbf{X}_t)(\mathbf{V}_1 + \mathbf{\Delta})$

It can be observed that when the angles are found, $\mathbf{Q}_t = 0$ and the harmonics do not change. Hence, $\mathbf{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.

<figure><img src="image_11.png" /><figcaption>**Figure 8.** Block diagram of the CFBMI with the solving method of the Groebner basis conversion, the PI controller and the acquisition of the harmonics.</figcaption></figure>

## 5. 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.

<table><caption>**Table 1.** Parameters of the inverter.</caption><thead><tr><th>Parameter</th><th>Value</th><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td>E</td><td>48 V</td><td>R<sub>x</sub></td><td>100 mΩ</td></tr><tr><td>L<sub>i</sub></td><td>1.8 mH</td><td>R<sub>o</sub></td><td>52 Ω</td></tr><tr><td>R<sub>L<sub>i</sub></sub></td><td>200 mΩ</td><td>h<sub>1<sub>ref</sub></sub></td><td>145 V</td></tr><tr><td>R<sub>s</sub></td><td>200 mΩ</td><td>P<sub>o</sub></td><td>200 W</td></tr><tr><td>C<sub>i</sub></td><td>4 mF</td><td>a<sub>1</sub></td><td>0.12</td></tr><tr><td>R<sub>DS</sub></td><td>58 mΩ</td><td>a<sub>0</sub></td><td>0.012</td></tr></tbody></table>

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 IRF14212 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.
<figure><img src="image_12.png" /><figcaption>**Figure 9.** Prototype.</figcaption></figure>

## 5.1. 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.

<figure><img src="image_13.png" /><figcaption>**Figure 10.** (a) Simulation result of 200 W load insertion, (b) Experimental result of 200 W load insertion.</figcaption></figure>

## 5.2. 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*₁, *h*₃, *h*₅, that correspond to 4%, 1.1% and 0.4% of the reference of *h*₁, respectively. *h*₇ is almost not affected. *h*₁ 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.

<figure><img src="image_14.png" /><figcaption>**Figure 11.** (a) Cosine of the switching-angles $x_k$ in 200 W load insertion test, (b) Harmonics behavior after a 200 W load insertion</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>**Figure 12.** (a) Simulations of $E_1$ disturbance, (b) Experimental result of $E_1$ disturbance.</figcaption></figure>
<figure><img src="image_16.png" /><figcaption>**Figure 13.** (a) Cosine of the switching-angles $x_k$ in 200 W load insertion test, (b) Harmonics behavior of $E_1$ disturbance experimental test.</figcaption></figure>

**6. 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.

**Author Contributions:** Conceptualization, M.V. and R.D.; methodology, M.V., D.B.C. and R.D.; formal analysis, M.V., M.C. and R.D.; investigation, M.V., R.D. and D.B.C.; writing—original draft preparation, M.V., R.D.; writing—review and editing, R.D., D.P., M.C. and P.L.; visualization, D.P., P.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research belongs to a Ph.D. studies of one of the authors which was founded by the Ecuadorian government.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Acknowledgments:** The authors would like to thank the "Secretaría de Educación Superior, Ciencia, Tecnología e Innovación" of the Ecuadorian Government (SENESCYT) that supported this study with the contract no: 8859.
**Conflicts of Interest:** The authors declare no conflict of interest.

**References**

1. Sahoo, S.K.; Bhattacharya, T. Phase-Shifted Carrier-Based Synchronized Sinusoidal PWM Techniques for a Cascaded H-Bridge Multilevel Inverter. *IEEE Trans. Power Electron.* **2018**, *33*, 513–524. [CrossRef]

2. Cousineau, M.; Cougo, B. Interleaved converter with massive parallelization of high frequency GaN switching-cells using decentralized modular analog controller. In Proceedings of the 2015 IEEE Energy Conversion Congress and Exposition (ECCE), Montreal, QC, Canada, 20–24 September 2015; pp. 4343–4350. [CrossRef]

3. Fabre, J.; Ladoux, P. Parallel Connection of 1200-V/100-A SiC-MOSFET Half-Bridge Modules. *IEEE Trans. Ind. Appl.* **2016**, *52*, 1669–1676. [CrossRef]

4. Vivert, M.; Cousineau, M.; Ladoux, P.; Fabre, J. Decentralized Controller for the Cell-Voltage Balancing of a Multilevel Flying Cap Converter. In Proceedings of the PCIM Europe 2019, International Exhibition and Conference for Power Electronics, Intelligent Motion, Renewable Energy and Energy Management, Nuremberg, Germany, 7–9 May 2019; pp. 1–8.

5. Fabre, J.; Ladoux, P.; Solano, E.; Gateau, G.; Blaquière, J. Full SiC multilevel chopper for three-wire supply systems in DC electric railways. In Proceedings of the 2016 International Conference on Electrical Systems for Aircraft, Railway, Ship Propulsion and Road Vehicles International Transportation Electrification Conference (ESARS-ITEC), Toulouse, France, 2–4 November 2016; pp. 1–7. [CrossRef]

6. Fabre, J.; Ladoux, P.; Solano, E.; Gateau, G.; Blaquière, J. MVDC Three-Wire Supply Systems for Electric Railways: Design and Test of a Full SiC Multilevel Chopper. *IEEE Trans. Ind. Appl.* **2017**, *53*, 5820–5830. [CrossRef]

7. Alolah, A.I.; Hulley, L.N.; Shepherd, W. A three-phase neutral point clamped inverter for motor control. *IEEE Trans. Power Electron.* **1988**, *3*, 399–405. [CrossRef]

8. Negash, M.F.; Manthati, U.B. Development of 7-level cascaded H-bridge inverter topology for PV applications. In Proceedings of the International Conference on Electrical, Electronics, and Optimization Techniques, Chennai, Tamil Nadu, India, 3–5 March 2016; pp. 1847–1852. [CrossRef]

9. Huang, Q.; Huang, A.Q. Feedforward Proportional Carrier-Based PWM for Cascaded H-Bridge PV Inverter. *IEEE J. Emerg. Sel. Top. Power Electron.* **2018**, *6*, 2192–2205. [CrossRef]

10. Luo, F.L.; Ye, H. Multilevel DC/AC Inverters. In *Advanced DC/AC Inverters: Applications in Renewable Energy*; CRC Press: Boca Raton, FL, USA, 2013; Chapter 8, pp. 137–154.

11. Cobaleda, D.B.; Vivert, M.; Diez, R.; Perilla, G.; Patiño, D.; Ruiz, F. Low-Voltage Cascade Multilevel Inverter with GaN Devices for Energy Storage System. In Proceedings of the 13th IEEE International Conference on Power Electronics and Drive Systems, Toulouse, France, 9–12 July 2019.

12. Liu Yu, F.L. Trinary hybrid 81-level multilevel inverter for motor drive with zero common-mode voltage. *IEEE Trans. Ind. Electron.* **2008**, *55*, 1014–1021. [CrossRef]

13. Edpuganti, A.; Rathore, A.K. A Survey of Low Switching Frequency Modulation Techniques for Medium-Voltage Multilevel Converters. *IEEE Trans. Ind. Appl.* **2015**, *51*, 4212–4228. [CrossRef]

14. Liu, Y.; Hong, H.; Huang, A.Q. Real-Time Algorithm for Minimizing THD in Multilevel Inverters With Unequal or Varying Voltage Steps Under Staircase Modulation. *IEEE Trans. Ind. Electron.* **2009**, *56*, 2249–2258. [CrossRef]

15. Srndovic, M.; Zhetessov, A.; Alizadeh, T.; Familiant, Y.L.; Grandi, G.; Ruderman, A. Simultaneous Selective Harmonic Elimination and THD Minimization for a Single-Phase Multilevel Inverter With Staircase Modulation. *IEEE Trans. Ind. Appl.* **2018**, *54*, 1532–1541. [CrossRef]

16. Kavousi, A.; Vahidi, B.; Salehi, R.; Bakhshizadeh, M.K.; Farokhnia, N.; Fathi, S.H. Application of the Bee Algorithm for Selective Harmonic Elimination Strategy in Multilevel Inverters. *IEEE Trans. Power Electron.* **2012**, *27*, 1689–1696. [CrossRef]

17. Yang, K.; Zhang, Q.; Yuan, R.; Yu, W.; Yuan, J.; Wang, J. Selective Harmonic Elimination With Groebner Bases and Symmetric Polynomials. *IEEE Trans. Power Electron.* **2016**, *31*, 2742–2752. [CrossRef]

18. Ahmed, M.; Sheir, A.; Orabi, M. Real-Time Solution and Implementation of Selective Harmonic Elimination of Seven-Level Multilevel Inverter. *IEEE J. Emerg. Sel. Top. Power Electron.* **2017**, *5*, 1700–1709. [CrossRef]

19. Haghdar, K.; Shayanfar, H.A. Selective Harmonic Elimination With Optimal DC Sources in Multilevel Inverters Using Generalized Pattern Search. *IEEE Trans. Ind. Inform.* **2018**, *14*, 3124–3131. [CrossRef]

20. Routray, A.; Kumar Singh, R.; Mahanty, R. Harmonic Minimization in Three-Phase Hybrid Cascaded Multilevel Inverter Using Modified Particle Swarm Optimization. *IEEE Trans. Ind. Informatics* **2019**, *15*, 4407–4417. [CrossRef]

21. Sahu, N.; Londhe, N.D. Optimization based selective harmonic elimination in multi-level inverters. In Proceedings of the 2017 National Power Electronics Conference (NPEC), Puerto Varas, Chile, 4–7 December 2017; pp. 325–329. [CrossRef]

22. Kumar, A.; Chatterjee, D.; Dasgupta, A. Harmonic mitigation of cascaded multilevel inverter with non equal DC sources using Hybrid Newton Raphson Method. In Proceedings of the 2017 4th International Conference on Power, Control Embedded Systems (ICPCES), Allahabad, India, 9–11 March 2017; pp. 1–5. [CrossRef]

23. Yang, K.; Yuan, Z.; Yuan, R.; Yu, W.; Yuan, J.; Wang, J. A Groebner Bases Theory-Based Method for Selective Harmonic Elimination. *IEEE Trans. Power Electron.* **2015**, *30*, 6581–6592. [CrossRef]

24. Yang, K.; Zhang, Q.; Zhang, J.; Yuan, R.; Guan, Q.; Yu, W.; Wang, J. Unified Selective Harmonic Elimination for Multilevel Converters. *IEEE Trans. Power Electron.* **2017**, *32*, 1579–1590. [CrossRef]
25. Sharifzadeh, M.; Vahedi, H.; Portillo, R.; Franquelo, L.G.; Al-Haddad, K. Selective Harmonic Mitigation Based Self-Elimination of Triplen Harmonics for Single-Phase Five-Level Inverters. *IEEE Trans. Power Electron.* **2019**, *34*, 86–96. [CrossRef]

26. Lal, R. Chapter 8: Field Theory, Galois Theory, 8.8 Galois theory for equations. In *Algebra 2. Linear Algebra, Galois Theory, Representation theory, Group extensions and Schur Multipliere*; Springer: Singapore, 2017.

27. Zhao, H.; Jin, T.; Wang, S.; Sun, L. A Real-Time Selective Harmonic Elimination Based on a Transient-Free Inner Closed-Loop Control for Cascaded Multilevel Inverters. *IEEE Trans. Power Electron.* **2016**, *31*, 1000–1014. [CrossRef]

28. Yang, K.; Feng, M.; Wang, Y.; Lan, X.; Wang, J.; Zhu, D.; Yu, W. Real-Time switching-angle Computation for Selective Harmonic Control. *IEEE Trans. Power Electron.* **2019**, *34*, 8201–8212. [CrossRef]

29. Cox, D.; Little, J.; O'Shea, D. *Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra*, 2nd ed.; Springer Science & Business Media: Cham, Switzerland, 2015. [CrossRef]

30. Proakis, J.G.; Manolakis, D.K. *Digital Signal Processing*, 4th ed.; Prentice Hall: Hoboken, NJ, USA, 2006.