Classical Control for Unequal DC Sources Five-Level Inverter-Based SHE Technique

: This study proposes a classical control algorithm for solving the transcendental set of equations for the unequal DC sources of ﬁve-level multilevel inverters (MLIs). Such sources can be generated from renewable energy sources. Two DC sources with di ﬀ erent values are used to produce an output voltage with ﬁve levels. Then, a set of two transcendental equations is formulated with two targeted functions to control the fundamental component and cancel the stipulated single harmonic order. The proposed solution uses a simple classical proportional control with two loops to generate two switching angles. The ﬁrst switching angle is assigned with an initial value, whereas the second one is calculated from the inner loop. The outer loop is used to cancel the speciﬁed harmonic by sending the error signal to the proposed proportional control that tunes the switching angles. The proposed algorithm is easy, fast, and accurate, and has a wide-range solution in terms of modulation index (MI ) and input DC source ratio (x = V 1 V 2 ≤ 1). The proposed algorithm is tested for a wide range of MI and x to verify its feasibility. Moreover, several simulation and laboratory tests are presented to further validate the applicability of the proposed approach.


Introduction
Multilevel inverters (MLIs) [1][2][3][4][5][6][7][8] have attracted increasing attention from researchers and industrial sectors due to their excellent performances compared with conventional two-level topologies. MLIs generate a staircase waveform that is close to sinusoidal voltages. In terms of suitable modulation indexes, MLIs can reduce the total harmonic distortion (THD) to extremely low values. In addition, MLIs can operate either at high or low switching frequency. In the case of low switching frequency, MLIs have high efficiency since the power switches operate at low switching frequency; this condition results in low switching losses, low switching stresses, and low electromagnetic interference (EMI). MLIs are also utilized in high-power applications, such as industries, large-scale renewable energy systems, and transportations that use medium-voltage switches [9].
In renewable energy systems, photovoltaic panels generate variable DC sources based on environmental conditions [22,23]. This phenomenon causes mismatches among their DC sources. Given that these DC sources are typically unequal, different control algorithms should be applied [24][25][26], which are explained in the following paragraphs. In [24], an artificial neural network (ANN)-based algorithm was introduced to calculate switching angles in real time for unequal DC sources. In ANN, the system is trained offline using many data points, and then it can respond in real time. The ANN can guarantee a fast response due to decreasing of time computation, but the output angles returned by the ANN may not provide a satisfactory result, or harmonic elimination, at some points as it generalizes. In [25], an analytical solution based on the cosine term identities for multiple angles was proposed for MLIs with asymmetrical DC sources. The nonlinear transcendental set of equations is transformed into a third-order equation with well-known solutions. The proposed solution is utilized for controlling the fundamental component and removing the third harmonic component. However, this technique is limited only to both actions and fails to solve the set of equations if another harmonic order, such as the fifth or seventh harmonic, is required to be eliminated. In [26], a middle-level selective harmonic elimination pulse-amplitude modulation (SHE-PAM) technique is presented to solve the harmonic equations for single phase MLIs using unequal DC sources. In this method, the switching angles are first assumed as (α i = i α 1 , i = 2, 3, . . .). The proposed technique used to determine the switching angle and synthesize the reverence voltage of variable DC sources that is connected to MLI. Due to the difficulties in solving high order nonlinear transcendental equations, then the utilization of SHE in some applications is limited in real time.
Therefore, the main contributions of the current work are summarized as follows: •

Real-time operation; •
Operates for symmetrical/asymmetric and unequal DC input sources; • Its capability for higher-order harmonic elimination; • Continuous wide ranges for both modulation index and x; • No special required predetermined value for input/output or angles.
Therefore, this study proposes a new method for calculating the switching angles of MLIs with symmetrical, asymmetrical, and unequal DC sources by using the simple classical proportional control algorithm. The proposed method is fast, highly accurate, and valid for a wide range of MI and input DC source ratio x and provides online voltage control. The remainder of this paper is organized as follows. Section 2 provides a detailed explanation of the proposed procedure, including the assumptions, equation development, variables, and procedure analyses. Section 3 presents the simulation and laboratory results of the suggested case studies to verify and validate the performance of the proposed technique. Section 4 discusses the relationship among important variables to clarify the proposed concept. Section 5 provides the summary and conclusion. A low prototype is built and tested for validation. Figure 1a shows a single-phase five-level cascaded inverter with two DC input sources V 1 and V 2 , where V 1 > V 2 . The waveform of the output voltage V 0 (in the positive half cycle) for two switching angles α 1 and α 2 , where α 1 < α 2 < π/2, is presented in Figure 1b. V 0 has five levels, namely, V 1 , V 1 + V 2 , 0, −V 1 , and − V 1 − V 2 . The Fourier series of the staircase waveforms shown in Figure 1b is given in Equation (1). If α 1 or α 2 is negative, their actual values are their absolute values. Moreover, if α 1 < π/2 and α 2 > π/2, α 2 is expressed as α 2 = π − α 2 ( Figure 1c). In this case, the inverter still generates five levels, but the output voltage waveforms become V 1 , V 1 − V 2 , 0, −V 1 , and − V 1 + V 2 . The Fourier series of the staircase waveforms shown in Figure 1c is defined in Equation (2).

Proposed System Model
where MI is the modulation index, H 1 is the fundamental component, h 1 is the normalized fundamental amplitude (H 1 /V 1 ), and α 1 < α 2 ≤ π 2 .
Step 5. If α < α < /2, the output voltage waveform is similar to that presented in Figure 1b.
The proposed solution controls the fundamental component and removes one of the harmonics (third, fifth, seventh, . . . ). Therefore, two equations are generated from Equation (1) for h 1 and the harmonic to be canceled (h n ; with order third, fifth, seventh, . . . ).
Step 6. If α 2 > π/2, α 2 = π − α 2 , and the output voltage waveform is similar to that presented in Figure 1c. Figure 2 depicts the sequence for implementing the proposed technique. The flow chart has a single and simple iteration loop. The controller used is the proportional controller, which is the simplest controller with only a single parameter (k p ). The gain k p is increased slowly until an acceptable performance is reached. Figure 3 shows the effect of changing k p on the switching angles α 1 , α 2 , and error. It has been found that the system reaches a steady state at k p = 2 with a raise time approximately equals 2.5 ms, which represents 12.5% of the 50 Hz fundamental output voltage waveform cycle. At k p = 5, the system reaches a steady state with raise time approximately equaling 1 ms, which represents 5% of the 50 Hz fundamental output voltage waveform cycle. Therefore, the designed range is chosen as k p = 2 to 5. This value of k p results in a rapid iteration with a very accurate solution.
Energies 2020, 13, x FOR PEER REVIEW 5 of 15 Figure 2 depicts the sequence for implementing the proposed technique. The flow chart has a single and simple iteration loop. The controller used is the proportional controller, which is the simplest controller with only a single parameter (k ). The gain k is increased slowly until an acceptable performance is reached. Figure 3 shows the effect of changing k on the switching angles α , α , and error. It has been found that the system reaches a steady state at k = 2 with a raise time approximately equals 2.5 ms, which represents 12.5% of the 50 Hz fundamental output voltage waveform cycle. At k = 5, the system reaches a steady state with raise time approximately equaling 1 ms, which represents 5% of the 50 Hz fundamental output voltage waveform cycle. Therefore, the designed range is chosen as k = 2 to 5. This value of k results in a rapid iteration with a very accurate solution.     Figure 4 shows the proposed control technique. Logic and carrier signals are used to generate eight switching signals for the MLI system. Figure 4 comprehensively illustrates the last step in the flow chart shown in Figure 2. The carrier (Vc) and AC signals have unity amplitudes with frequencies that are equal to that of the output voltage waveform. Vc is multiplied by 90; thus, the generated carrier (V*c) has an amplitude that ranges from 0 to 90, which is the range of the actual switching angle solutions. The carrier V*c is separated into subcarriers Vc1 and Vc2, which represent the positive and negative half waveform cycles, respectively. Both subcarriers are compared with α 1 to generate the switching signals of the lower MLI cells (Q1-Q4). The index has a digital number of 1 or 0. When index = 0, α 2 ′ is within the accepted range (0°-90°), and no modification is required. When index = 1, α 2 ′ is outside the accepted range (90°-180°), and thus is subtracted from 180° to reduce it to the accepted range. Hence, α 2 ′ is modified to α 2 . The two index values, Vc1 and Vc2, and α 2 are used to  Figure 4 shows the proposed control technique. Logic and carrier signals are used to generate eight switching signals for the MLI system. Figure 4 comprehensively illustrates the last step in the flow chart shown in Figure 2. The carrier (V c ) and AC signals have unity amplitudes with frequencies that are equal to that of the output voltage waveform. V c is multiplied by 90; thus, the generated carrier (V* c ) has an amplitude that ranges from 0 to 90, which is the range of the actual switching angle solutions. The carrier V* c is separated into subcarriers V c1 and V c2 , which represent the positive and negative half waveform cycles, respectively. Both subcarriers are compared with α 1 to generate the switching signals of the lower MLI cells (Q1-Q4). The index has a digital number of 1 or 0. When index = 0, α 2 is within the accepted range (0 • -90 • ), and no modification is required. When index = 1, α 2 is Energies 2020, 13, 4715 7 of 15 outside the accepted range (90 • -180 • ), and thus is subtracted from 180 • to reduce it to the accepted range. Hence, α 2 is modified to α 2 . The two index values, V c1 and V c2 , and α 2 are used to generate the switching signals for the upper MLI cells (Q5-Q8). Equations (11)- (14) are used to calculate the switch signal pulses as follows: Energies 2020, 13, x FOR PEER REVIEW 7 of 15 generate the switching signals for the upper MLI cells (Q5-Q8). Equations (11)- (14) are used to calculate the switch signal pulses as follows:

Simulation and Experimental Results
Several case studies were used for simulation and experiments to verify the validity of the proposed method. The system parameters include the input DC voltages (V and V ), x (x = ), MI, and h . The proposed system is experimentally evaluated using the same simulation test parameters to confirm its effectiveness. The setup of the system is presented in Figure 5. MOSFETs (IRF740) and gate drives includes (6N136) are used as power switches and isolation elements, respectively. The microcontroller PIC18F4550 is used to perform the proposed algorithm and generate the control signal of the switches. MikroC PRO PIC and MPLAB IDE packages are used to write the codes and program the microcontroller, respectively.

Simulation and Experimental Results
Several case studies were used for simulation and experiments to verify the validity of the proposed method. The system parameters include the input DC voltages (V DC1 and V DC2 ), ), MI, and h n . The proposed system is experimentally evaluated using the same simulation test parameters to confirm its effectiveness. The setup of the system is presented in Figure 5. MOSFETs (IRF740) and gate drives includes (6N136) are used as power switches and isolation elements, respectively. The microcontroller PIC18F4550 is used to perform the proposed algorithm and generate the control signal of the switches. MikroC PRO PIC and MPLAB IDE packages are used to write the codes and program the microcontroller, respectively. Case Study I: Figure 6 illustrates the dynamic performances of the first case study, where a step change in MI from 1.08 to 0.65 is applied at 0.035 s. The inverter was tested at V = 20 V , V = 6 V, and x = 0.3 to control the fundamental component while removing the third harmonic. Figure 6a shows the switching angles. The result shows that α changes from 24.995° to 35.802°, whereas α increases from 49.905° to 118.566°. If α increases beyond 90°, this angle is modified by subtracting it from 180°, as shown by the dash dot waveform that decreases to 61.434° (180°−118.566°). On the basis of the calculated α and α , the control signals of the eight switches are generated to obtain the desired inverter output voltage. Figure 6b presents the lower (VL) and upper (VU) voltages, and Figure 6c depicts the resulting output voltage waveform. When the switching angles are lower than 90° (i.e., high MI), VL and VU are added to produce the output voltage. Otherwise, (i.e., low MI), the latter is subtracted from the former to determine the output voltage. The feedback controller is a simple proportional controller with a single parameter . The mechanism of this controller is simple, that is, increasing the gain until a stable operation is achieved. When k = 5, the controller delivers an extremely fast and stable response (Figure 6d). The simulation is conducted in MATLAB/Software ® , and the sample time is set to 100 µs. The system reaches the steady state within 1 ms. This result suggests that the proposed technique has a small computation complexity and it can be easily used in real-time calculation. The fundamental component changes from 28 to 17 V as the MI changes from 1.08 to 0.65 (Equation (3)). Figure 6e,f shows the output voltage harmonic spectra of the two cases of MI. As previously stated, the third harmonic is removed in both cases.
(a) (b) Case Study I: Figure 6 illustrates the dynamic performances of the first case study, where a step change in MI from 1.08 to 0.65 is applied at 0.035 s. The inverter was tested at V DC1 = 20 V, V DC2 = 6 V, and x = 0.3 to control the fundamental component while removing the third harmonic. Figure 6a shows the switching angles. The result shows that α 1 changes from 24.995 • to 35.802 • , whereas α 2 increases from 49.905 • to 118.566 • . If α 2 increases beyond 90 • , this angle is modified by subtracting it from 180 • , as shown by the dash dot waveform that decreases to 61.434 • (180 • −118.566 • ). On the basis of the calculated α 1 and α 2 , the control signals of the eight switches are generated to obtain the desired inverter output voltage. Figure 6b presents the lower (V L ) and upper (V U ) voltages, and Figure 6c depicts the resulting output voltage waveform. When the switching angles are lower than 90 • (i.e., high MI), V L and V U are added to produce the output voltage. Otherwise, (i.e., low MI), the latter is subtracted from the former to determine the output voltage. The feedback controller is a simple proportional controller with a single parameter k p . The mechanism of this controller is simple, that is, increasing the gain until a stable operation is achieved. When k p = 5, the controller delivers an extremely fast and stable response (Figure 6d). The simulation is conducted in MATLAB/Software ® , and the sample time is set to 100 µs. The system reaches the steady state within 1 ms. This result suggests that the proposed technique has a small computation complexity and it can be easily used in real-time calculation. The fundamental component changes from 28 to 17 V as the MI changes from 1.08 to 0.65 (Equation (3)). Figure 6e,f shows the output voltage harmonic spectra of the two cases of MI. As previously stated, the third harmonic is removed in both cases. Figure 7 shows the experimental results due to the dynamic change in MI induced through the simulation parameters presented in Figure 6. The goal in the first and second durations, where MI is 1.08 and 0.65, respectively, is to control the fundamental component and remove the third harmonic component. Figure 7a shows the sudden changes in the separated upper and lower generated output MLI cells, and Figure 7b-d display the total output voltages of the MLI in the entire range, first duration, and second duration, respectively.

Case Study II:
To further verify the effectiveness of the proposed algorithm, another case study is performed by applying a step change in MI from 0.6 to 1.  Figure 8a, α 2 exceeds 90 • (solid line) and is therefore subtracted from 180 • to obtain the accurate value (dashed line). The voltage of each cell is depicted in Figure 8b. The two voltages are subtracted in the first duration (low MI) and added in the second one (high MI) to obtain the desired inverter output voltage (Figure 8c). The subtraction or addition of V U and V L is achieved by generating the proper control signals of the power switches. Figure 8d displays the error signal, and thus confirms that the computation complexity is extremely small because the proposed algorithm rapidly reaches the steady state values of the switching angles. The Fourier spectra of both durations are presented in Figure 8e,f. The seventh harmonic component is fully removed in the first duration, whereas the 13th and 15th harmonic components are effectively deleted in the second one.
to control the fundamental component while removing the third harmonic. Figure 6a shows the switching angles. The result shows that α 1 changes from 24.995° to 35.802°, whereas α 2 increases from 49.905° to 118.566°. If α 2 increases beyond 90°, this angle is modified by subtracting it from 180°, as shown by the dash dot waveform that decreases to 61.434° (180°−118.566°). On the basis of the calculated α 1 and α 2 , the control signals of the eight switches are generated to obtain the desired inverter output voltage. Figure 6b presents the lower (VL) and upper (VU) voltages, and Figure 6c depicts the resulting output voltage waveform. When the switching angles are lower than 90° (i.e., high MI), VL and VU are added to produce the output voltage. Otherwise, (i.e., low MI), the latter is subtracted from the former to determine the output voltage. The feedback controller is a simple proportional controller with a single parameter . The mechanism of this controller is simple, that is, increasing the gain until a stable operation is achieved. When k p = 5, the controller delivers an extremely fast and stable response (Figure 6d). The simulation is conducted in MATLAB/Software ® , and the sample time is set to 100 µ s. The system reaches the steady state within 1 ms. This result suggests that the proposed technique has a small computation complexity and it can be easily used in real-time calculation. The fundamental component changes from 28 to 17 V as the MI changes from 1.08 to 0.65 (Equation (3)). Figure 6e,f shows the output voltage harmonic spectra of the two cases of MI. As previously stated, the third harmonic is removed in both cases.  Figure 7 shows the experimental results due to the dynamic change in MI induced through the simulation parameters presented in Figure 6. The goal in the first and second durations, where MI is 1.08 and 0.65, respectively, is to control the fundamental component and remove the third harmonic component. Figure 7a shows the sudden changes in the separated upper and lower generated output MLI cells, and Figure 7b-d display the total output voltages of the MLI in the entire range, first duration, and second duration, respectively.
Case Study II: To further verify the effectiveness of the proposed algorithm, another case study is performed  Figure 9 shows the results due to the dynamic change in both MIs and removal of harmonic order, which is similar to the simulation conditions presented in Figure 8. Figure Figure 10 shows that when α 2 < / 2, the output voltage waveform in Figure 1b is generated; otherwise, the output voltage waveform in Figure 1c is produced. Therefore α 2 = π / 2 is an ideal border between the two waveforms. By using Equation (7), the corresponding α 1 in this condition (e) (f)  Figure 9 shows the results due to the dynamic change in both MIs and removal of harmonic order, which is similar to the simulation conditions presented in Figure 8. Figure Figure 10 shows that when α < / 2, the output voltage waveform in Figure 1b is generated; otherwise, the output voltage waveform in Figure 1c is produced. Therefore α = π / 2 is an ideal border between the two waveforms. By using Equation (7), the corresponding α in this condition h7 = 0 h13 = 0  Figure 9 shows the results due to the dynamic change in both MIs and removal of harmonic order, which is similar to the simulation conditions presented in Figure 8. Figure 9a depicts the sudden changes in the separated upper and lower generated output MLI cells, and Figure 9b-d shows the total output voltages of the MLI in the entire range, first duration, and second duration, respectively. The experimental results are extremely close to the simulated ones, thereby indicating the high performance and applicability of the proposed method in a wide range of MI. Figure 10 shows that when α 2 < π/2, the output voltage waveform in Figure 1b is generated; otherwise, the output voltage waveform in Figure 1c is produced. Therefore α 2 = π/2 is an ideal border Energies 2020, 13, 4715 12 of 15 between the two waveforms. By using Equation (7), the corresponding α 1 in this condition can be calculated as α 1 = π/(2h n ), where h n is the stipulated removed harmonic order (n = 3 or 5 or 7 or 9, . . . ). Figure 11 illustrates this relationship for the elimination of the third, fifth, seventh, and 23rd harmonic components. The region of the upper curve represents α 2 < / 2, which yields the output voltage waveforms shown in Figure 1b. By contrast, the region of the lower curve denotes α 2 > / 2, which produces the output voltage waveforms shown in Figure 1c. Figure 11 illustrates how α 2 changes the output voltage waveforms. The removal of the harmonic h5 at x = 0.4 ( Figure 10) is taken as an example. Given that the operation point is lower than the curve, MI = 0.85 (α 2 < / 2 ), and VU is subtracted from VL to generate the output voltage waveform (Figure 11a). If the operation point is located higher than the curve, MI = 0.9 (α 2 > / 2), and VU and VL are added to generate the output voltage waveform (Figure 11b). Substituting Equation (6) yields

Observations on the α 1 and α 2 Solutions
Equation (15) shows the relationship that defines which output voltage waveform will be generated. Figure 11 illustrates this relationship for the elimination of the third, fifth, seventh, and 23rd harmonic components. The region of the upper curve represents α 2 < π/2, which yields the output voltage waveforms shown in Figure 1b. By contrast, the region of the lower curve denotes α 2 > π/2, which produces the output voltage waveforms shown in Figure 1c.
Energies 2020, 13, x FOR PEER REVIEW 12 of 15 can be calculated as α 1 = π / (2h n ), where h n is the stipulated removed harmonic order (n = 3 or 5 or 7 or 9, …). Substituting Equation (6) yields MI (1 + x) = 4 π cos(α 1 ) = 4 π cos(π / (2h n )) Equation (15) shows the relationship that defines which output voltage waveform will be generated. Figure 11 illustrates this relationship for the elimination of the third, fifth, seventh, and 23rd harmonic components. The region of the upper curve represents α 2 < / 2, which yields the output voltage waveforms shown in Figure 1b. By contrast, the region of the lower curve denotes α 2 > / 2, which produces the output voltage waveforms shown in Figure 1c. Figure 11 illustrates how α 2 changes the output voltage waveforms. The removal of the harmonic h5 at x = 0.4 ( Figure 10) is taken as an example. Given that the operation point is lower than the curve, MI = 0.85 (α 2 < / 2 ), and VU is subtracted from VL to generate the output voltage waveform (Figure 11a). If the operation point is located higher than the curve, MI = 0.9 (α 2 > / 2), and VU and VL are added to generate the output voltage waveform (Figure 11b).    Figure 10) is taken as an example. Given that the operation point is lower than the curve, MI = 0.85 (α 2 < π/2), and V U is subtracted from V L to generate the output voltage waveform (Figure 11a). If the operation point is located higher than the curve, MI = 0.9 (α 2 > π/2), and V U and V L are added to generate the output voltage waveform (Figure 11b).

Conclusions
In this study, a fast and easy solution that utilizes the classical proportional control algorithm and SHE technique to analyze the unequal DC sources of a five-level inverter is proposed to calculate the switching angles of MLI (α 1 and α 2 ). The proposed method is applicable to renewable energy systems because it can overcome the mismatches among their generated DC sources. Two transcendental equations are formulated in terms of α 1 , α 2 , MI, and x to verify two specified conditions. The two stipulated conditions are controlling the output voltage fundamental component and removing the extra single harmonic component. The advantages of the proposed technique are as follows.

1.
The proposed control algorithm is a simple proportional control (k p ).

2.
The computational time complexity is minimal, and the proposed method can be easily implemented in real time.

3.
The proposed algorithm is fast and produces accurate solutions.

4.
The proposed technique is valid for a wide range of MI and x variations. 5.
The simulation and laboratory tests results match the analytical findings, and thus validate the proposed concept.
Suggested future research that can be performed with the existing technique is summarized in the following items.

1.
The proposed technique can be extended to a three-phase system.

2.
The proposed technique can be extended to higher MLI levels; thus more harmonic components can be removed, leading to decreasing the harmonic contents.