# Differential Evolution Applied to a Multilevel Inverter--A Case Study
## 3 Simulation Results  
MATLAB software was used to program the DE algorithm.  
For this case study, three switching angles (\(\propto\)1, \(\propto\)2, and \(\propto\)3) were searched for the seven-level CHBMII.  
After obtaining the different sets of switching angles, the modulation index sweep was performed.  
Figure 4 shown the simulation diagram of the seven-level single-phase CHBMII, was performed in MATLAB Simulink software using the parameters in Table 1.  
Figure 5 shows the output voltage waveform realized in MATLAB Simulink.  
As shown in Figure 5, the output peak voltage obtained is 250 V.  
The initialization parameters of the differential evolution algorithm reported in [31] were taken as a starting point. The parameters used in the case study of this article are shown in Table 2.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Specifications** \\ \hline Voltage sources (Vdc 1,2,3) & 83.33 V \\ R Load & 100 \(\Omega\) \\ L Load & 100 mH \\ Power & 625 W \\ Peak Voltage (V\({}_{\text{out}}\)) & 250 V \\ Frequency & 60 Hz \\ \hline \hline \end{tabular}
\end{table}
Table 1: Most important parameters for the simulation of CHBMII in MATLAB.  
Figure 3: CHBMII inverter with RL load.  
Figure 4: The schematic diagram for CHBMLI Simulink simulation.  
Figure 5: Output peak voltage in the CHBMLI Simulink simulation.  
Figure 6 shows the step-by-step procedure of the methodology that was carried out to obtain the different sets of angles, the Mi, and the THD percentage.  
The results of the seven-level CHBMII previously simulated in Simulink were tested and plotted to observe its behavior. The following figure shows the results of the angles obtained by the implementation of this algorithm.  
Figure 7 shows the graph of the different sets of angles obtained (Angle 1 circles, Angle 2 squares, and Angle 3 triangles) that coincide with some Mi.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Population (NP) & 100 \\ Generation (G) & 100 \\ Scaling Factor (F) & 0.3 \\ Crossover rate (Cr) & 0.9 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Parameter values for the differential evolution algorithm.  
Figure 6: Flow chart of the methodology used.  
Figure 7: Angles vs. Mi in CHBMII Simulink simulation.  
The set of angles depends on Mi; the smaller the Mi, the more sets are available. Two sets of angles showing the best angles (with lowest THD) found for a Mi of 0.97 (marked with black color) and 1.05 (marked with red color) have been marked in Figure 7 to generate the following Table.  
In Figure 8, only the lowest THD obtained from the set of angles corresponding to each modular index was used, considering that in Figure 7, there are four combinations of angles for one Mi.  
As can be seen in Figure 8, the Mi that reached the minimum percentage of THD was 1.05 (10.46%).  
Several articles do not consider the value of Mi; there is a probability of not finding the optimal angles to reduce the THD or generate an overmodulation. For this case study, the values with a Mi < 1 were a Mi of 0.97 and a THD of 12.98%. It is shown in Figure 8. marked with red dots.  
The following figures compare the harmonic spectrum generated by the MATLAB Simulink Toolbox, from the Mi < 1 and regardless of the Mi, showing the percentage of THD corresponding to these.  
By not considering the Mi, there is a high probability of finding a set of angles that can generate an overmodulation with a very low THD but is inefficient for the desired load.  
Considering the above, looking at the values with a Mi < 1, the Mi with a low THD percentage was a Mi of 0.97, with a THD of 12.98%, as shown in Figure 9b). Almost a 3% difference from the THD percentage was found without considering the Mi (10.46%).  
Figure 8: THD vs. Mi in CHBMLI simulink simulation.  
Figure 9: Harmonic spectrum generated with the MATLAB Simulink Toolbox: (**a**) harmonic spectrum generated with Mi 0.97; (**b**) harmonic spectrum generated with Mi 1.05 (minimum %THD found).