International Journal of Electrical and Computer Engineering (IJECE) Vol. No. June 2025, pp. ISSN: 2088-8708. DOI: 10. 11591/ijece. Optimizing switching states using a current predictive control algorithm for multilevel cascaded H-bridge converters in solar photovoltaic integration into power grids An Thi Hoai Thu Anh1. Tran Hung Cuong2 Department of Electrical Engineering. University of Transport and Communications. Hanoi. Vietnam Faculty of Electrical and Electronics Engineering. Thuyloi University. Hanoi. Vietnam Article Info ABSTRACT Article history: Solar power is the best solution for renewable energy sources. Nowadays, solar power plants are invested and developed strongly in many places. Converting direct current (DC) energy from photovoltaic (PV) systems to the alternating current (AC) grid is critical to widely use this power source at high voltage levels. This paper presents an algorithm to optimize the valveswitching process for a cascading H-bridge multilevel converter (CHB) to convert energy from a PV system connected to the grid. This is done by a model predictive control algorithm (MPC) before a valve switching cycle, its process will be carried out in future forecast cycles and applied in the present time. From there, choose the best switching state for a working This will ensure the best quality of current and voltage with a low total harmonic distortion (THD) index to connect to the power grid. This method's advantages are reducing volume calculation for the controller. Selecting the most suitable valve switching state to achieve low valve switching frequency, reducing losses, and improving conversion efficiency. The implementation results are proven by simulation and evaluation of results on MATLAB-Simulink software. Received Jun 15, 2024 Revised Jan 23, 2025 Accepted Mar 3, 2025 Keywords: Cascading H-Bridge Cost function Finite-control-set model predictive control Model predictive control Solar power This is an open access article under the CC BY-SA license. Corresponding Author: Tran Hung Cuong Faculty of Electrical and Electronics Engineering. Thuyloi University VietNam. N0 175 Tay Son. Trung Liet Commune. Dong Da District. Hanoi. Vietnam Email: cuongth@tlu. INTRODUCTION The cascaded H-bridge (CHB) converter is a multi-level converter commonly used in gridconnected solar power systems because the CHB structure has capacitors on each H-bridge that are directly connected to the solar cell modules (PV) . Ae. PV modules will generate a voltage level on the alternating current (AC) output side of the CHB converter . , . Therefore, the CHB converter can generate a large number of voltage levels on the AC side for direct connection to the power grid without the need for a stepup transformer or harmonic filters on the output side . The main advantage of the CHB converter is high voltage operation. CHB can generate sinusoidal voltages from smaller voltage levels and reduce voltage transients on semiconductor valves . , . The above advantages help CHB be better applied in systems connecting renewable energy sources to the power grid. Several control methods for CHB have been applied to CHB, mainly the traditional PI control method to control the quality of current and voltage on the AC side and control the flow of power from the DC to the AC side . , . This method has a simple implementation and quick impact. However, this method often has to be combined with modulation steps . Some modulation methods have been commonly applied to CHB such as pulse width modulation Journal homepage: http://ijece. Int J Elec & Comp Eng ISSN: 2088-8708 (PWM) . , . , and space vector modulation (SVM) . The PWM method has a simple implementation but has the disadvantage of having a large switching frequency. When the number of levels of the CHB increases, it also becomes difficult to apply to the CHB and causes significant losses. The SVM method can produce good conversion quality. however, this method has a large and complex calculation volume, so it is not suitable for CHBs with many voltage levels . Applying the combined control modulation method will make the control structure more complicated and the computing volume of the microcontroller will increase . , . When the number of levels of the CHB is required to be large, the number of components in the switch will increase and the combination of switching states in a working cycle will also increase many times, which calculates control and modulation becomes extremely complicated . , . Recently, predictive control has attracted attention applied to control systems . Ae. The operating principle of model predictive control (MPC) is to rely on the behavioral characteristics of the control object in the present and the past to predict the state of the object in the future. thereby orienting working objects according to predictable states to achieve maximum efficiency . This article will introduce the predictive control method applied to CHB to replace both the modulation and control stages. This method will calculate and select appropriate switching states, eliminate unnecessary switching states, and only retain switching states serving the insulated-gate bipolar transistor (IGBT) valve switching process. This makes the microcontroller work less and more efficiently. The advantages of MPC applied in this model are fast action and high flexibility when combining multiple control objectives in one objective function to achieve all control objectives at the same time. To implement this method for CHB, the first thing is to build a mathematical model of CHB, then perform discontinuity and come up with a working model of the converter in the next Finally, an objective function is used to optimize the control variables and select the optimal valveswitching states for these control variables. To demonstrate the operation of the control system, experiments were simulated on MATLAB/Simulink software. The goal of this is that the current, voltage and power values follow the preset desired values, the capacitors oscillate within the allowable values. The following section 2 will present the continuous time model and the future prediction model of the converter. Section 3 will present the predictive control algorithms for the current of the CHB converter. The simulation results and their evaluation will be presented in section 4. PREDICTION MODEL OF THREE-PHASE CHB CONVERTER The structure of the seven-level three-phase CHB converter is built from three H-bridges connected in series on each phase as shown in Figure 1. Each H-bridge includes 4 IGBT semiconductor valves connected according to the bridge diagram, the power source of each H-bridge is taken from the DC source generated by PV panels. By opening and closing the valve pairs (S1. and (S3. , three output voltage levels of the H bridge will be created Vdc, 0, -Vdc, corresponding to the open and closed states of Au0Ay and Au1Ay. According to Figure 1, the mathematical equation of the three-phase CHB converter at time t when connected to the grid is shown as . ycyc_ycuycyc . = yayc ycIyc ycnyciyc . yc = yca, yca, yca where ycyc_ycuycyc . is the output voltage value of the CHB, ycyciyc . is the grid voltage and ycnyciyc is the inductor Each voltage ycyc . can take on one of seven voltage levels Vdc *( Oen. Oen 1,. ,0,. , . These voltage levels are called state levels. The State level can be expressed as . vlj ya {- n, - n 1,. ,0,. , . = ycOyccyca . Equation . can also be expressed as a vector equation in the coordinate system through the Clark transformation as . [ ] = . 1 ] . ca ] yu Oo3 Oo3 where a, b, c are the values representing the voltage or current of the abc coordinate system. , are the vector variables after a, b, c are transformed from the a, b, c coordinate system to the coordinate system. Then . can be described as . yayc yccycnyu,yu yccyc ycIyc ycnyu,yu ycyci_yu,yu = ycyu,yu . Optimizing switching states using a current predictive control algorithm for A (An Thi Hoai Thu An. A ISSN: 2088-8708 where ycyu,yu are voltage vectors and ycnyu,yu are load current vectors. _Vdc Figure 1. CHB converter structure with three phases and seven levels The implementation of the MPC control method will be based on the discontinuous model, so the mathematical model . in the continuous domain of CHB must be discontinuous. There are many different discontinuity methods with different accuracy . , . However, if the interruption period is small enough. EulerAos forward method can be applied in this case due to its simple implementation . , . , which uses the first derivative approximated in the form general as . )Oeycu. cyco ) yccycu c = yco 1ycN Here Ts is the sampling time, ycu. cyco 1 ) vy ycu. cyco ) is the value of the control variables in the next sampling period and the current state. Equation . is discontinuous by Euler's forward method, then the predicted equation for grid-connected current will be as . ycNyc ycIyc ycNyc yayc =( Oe ) ycnyciyc . cyc_ycuycyc . Oe ycyciyc . ] . Inferred: = . Oe ycIyc ycNyc yayc ycN ) ycnyciyc . cyc_ ycu ycyc . Oe ycyciyc . ] . yayc From . , we can write the discontinuous state equation as . = yaycu. yaAyc. In there: = . = . 1Oe ya=[ ycIyc ycNyc yayc 1Oe ycIyc ycNyc ]. yaA= ycOyccyca ycNyc 3yayc ycycoyca . = . Oe1 Oe1 Oe1 Oe1 yayc Equation . is written as . in the coordinate system as: Int J Elec & Comp Eng. Vol. No. June 2025: 2726-2734 ycN 1 ya = Oe yc[ yayc 0 Int J Elec & Comp Eng ISSN: 2088-8708 ycnyci_yuyu . = . ycIyc ycNyc ) ycnyci_yuyu . cyuyu_ ycu ycyc . Oe ycyci_yuyu . ] . MODEL PREDICTION CONTROL FOR THE CURRENT OF THE CHB CONVERTER In this paper, the Finite-control-set-model predictive control (FCS-MPC) predictive control method is presented to limit the number of microcontroller calculations and reduce signal delay to the lowest level with the fastest response speed. This model is applied to CHB including 7 voltage levels. This method has the characteristic of calculating states at a future time and eliminating unnecessary states, keeping only suitable states to optimize the objective function. This will select the optimal valve closing states corresponding to the objective function to apply at present. Therefore, it will be necessary to find a current that meets the control In the following cycles, the process is repeated many times, meaning the algorithm always calculates the future control value in advance and applies it to the present time. Operating principle of FCS-MPC for CHB converter Consider a multilevel CHB converter, with the number of H-bridges on each phase being N. Then the number of levels M created is M=2N 1. The number of switching state combinations of CHB is KM=M3. With a large number of transition states, the controller's signal processing speed will become slower and the signal response time will be longer. As the number of levels of the converter increases, the number of states to be converted increases exponentially. Therefore, the calculation pressure of the controller in the same sample extraction time is very large. Therefore, the FCS-MPC method will optimize the calculation states and select only the appropriate states before entering signal processing. Figure 2 shows the CHB converter control structure using the FCS-MPC control method. Grid a, b, c HB 1 HB 2 R L HB 3 vg_abc Sabc1 Sabc2 Sabc3 i vg_ FCS-MPC i* Figure 2. Principle diagram of MPC control method for CHB The proposed FCS-MPC method here is used to predict the grid current behavior, which will correspond to the step-wise output voltage of the CHB converter with the principle of predicting the next cycles of the current, which is shown in Figure 3. The FCS-MPC is implemented at a sampling interval Ts at k, with the measured current control variable i. As the signal is sampled at each time point, the objective function performs the task of calculating all possible switching states for the cycle at time k 1 based on the current state at time k. Then, the optimal states will be selected to close the valve of the CHB. These selected valve-switching states will keep the output current value on the AC side stable according to the set current value of i*. The algorithm will optimally calculate the objective function so that the difference between i. and i*. is smallest. The continuing process is carried out for the next sampling cycles k 2, k 3. Equation . represents the state current prediction based on the discrete model of the system and it is used in the controller to predict the future value of the AC current. The objective function that performs optimally between i. and i*. is shown in . O . Oe ycnyciyu . | ya. = . Oe ycnyciyu . | . O . is the predicted current at the k 1 working cycle in the coordinate system. The above Here ycnyci,yuyu calculation is repeated in each sampling cycle. Assuming the sampling time Ts is small enough, then Optimizing switching states using a current predictive control algorithm for A (An Thi Hoai Thu An. A ISSN: 2088-8708 OO ycnyu,yu . This means that the applied current value does not change in the entire prediction ycnyu,yu domain and the objective function . is rewritten as follows . O . Oe ycn . | . cn O . Oe ycn . | ya. = . cnyciyu yciyu The cost function . at time k 1 is evaluated for each state corresponding to alternating current and minimizes it to select and apply to time k. Figure 3. Model to predict alternating current using the FCS-MPC method Apply FCS-MPC to a CHB converter with seven voltage levels With the CHB converter as shown in Figure 1, it can generate 7 output voltage levels . M=. Then. KM=M3=343 is the total number of voltage states on the three phases of the CHB. From this, we can know that the number of voltage values yc. that need to be calculated is 343, so in each sampling period Ts, the objective function needs to be calculated according to . The number of turns is 343 to apply for seven-level CHB. The objective function . is used to determine the optimal working state of the current, thereby selecting the appropriate switching state of the converter. The algorithm flow chart for implementing the method is shown in Figure 4. K = 1:343 Perform vgj. , igj. Calculate igj. according to equation . Convert igj. to ig_ . Calculate the cost function J. according to equation . < Jmin ? i*g_ . Yes Choose the optimal switching state Sxj = Sxj. and Jmin = J. K = 343? Yes Perform switching of valves Sxj Figure 4. Algorithm flow chart to implement FCS-MPC for CHB converter Int J Elec & Comp Eng. Vol. No. June 2025: 2726-2734 Int J Elec & Comp Eng ISSN: 2088-8708 The process to eliminate the inappropriate switching state is selected in a short time thanks to the controller's quick processing based on the programming algorithm in Figure 4. This process is small enough not to affect CHB's activities. With a sinusoidal reference current, the H-bridges perform valve switching with optimal working states and will create a stepped output voltage with 7 levels, corresponding to connecting three H-bridges in series on each phase of the CHB converter. However, as the number of levels increases, programming programs must perform calculations with a very large amount of calculations in a small sampling time. That can make processing and generating the output signal take a long time. SIMULATION OF CURRENT PREDICTION CONTROL METHOD FOR THREE-PHASE CHB Simulate the CHB converter using the FCS-MPC control method with the parameters given in Table 1. The simulation model is implemented on MATLAB/SIMULINK software. The simulation results are performed from the time the converter starts working to 0. 1s and are shown in Figures 5 to 9. Table 1. Simulation parameters Parameter DC-link Vdc Inductance value L Resistor value R Sampling cycle Ts Voltage of the power grid Frequency of the power grid Value Unit AAs Figure 5 shows the AC current results on all three phases of the CHB converter. The results show that the current shape is sinusoidal and there is no transient when the current is operating steadily, these results meet the power quality requirements when the converter is connected to the grid. The AC current of phase a is shown in Figure 6, which shows that the current follows the reference current and gives a very fast response with a time interval of 0. 001 seconds. This shows that the response of the MPC is very good and gives the desired result in the first cycle with constant values in the following cycles. iga igb igc Figure 5. Three-phase AC current when CHB is connected to the grid Voltage (V) Times . Figure 6. Grid-connected AC current of Times . Voltage (V) Current (A) Current (A) iga igb igc Times . Figure 7. Voltage at the output of phase A of the Times . Figure 8. AC voltage of the CHB converter injected into the grid Optimizing switching states using a current predictive control algorithm for A (An Thi Hoai Thu An. A ISSN: 2088-8708 The output voltage of phase a is shown in Figure 7, which is the output voltage of the controller. The results show that there are seven levels of output voltage, the levels are very clear and there is no conflict between the levels. Figure 8 shows the voltage pattern on the AC side on all three phases of the converter to supply the power grid. It shows that the converter operates well and stably in the first working cycle. Perform Fourier analysis of the voltage vg up to the 20th harmonic, in time intervals of 0-0. 1 s as shown in Figure 9. The THD value of the voltage after analysis, we get the result of THD=1. 84%, in which there are very few high-order harmonics with large amplitude, this clearly shows the advantage of the CHB multi-level converter when calculating digital cancellation. Quantify the switching state for the circuit and achieve the goal of optimizing valve switching, reducing the number of times calculating the objective function to create voltage and current quality that reach the desired value. This means the MPC controller provides precise tracking with low THD distortion and low current ripple. Selected signal: 5 cycles. FFT window . n re. : 4 cycles Signal mag. Time . Fundamental . = 509. THD= 1. Mag ( % of Fundamenta. Frequency (H. Figure 9. Fourier analysis results of voltage vg CONCLUSION This article presents a predictive control method for CHB converters. From the requirements of the AC side output parameters of the CHB converter, the FCS-MPC control method is built to predict the future current value, and then optimize the corresponding switching state and voltage. applies to the current state. The process is performed by the objective function applied to the three-phase CHB converter and shows the voltage level on the AC side. The advantage of this control process is that it acts quickly, reducing the valve switching frequency due to optimizing the switching states, thereby reducing losses and improving the efficiency of the converter. The simulation results have evaluated that the operating process meets the requirements for the ability to create a sinusoidal current signal that adheres to the set value. The MPC control method clearly shows advantages such as ease of design, and ability to respond quickly and MPC also has some disadvantages such as: requiring the processor to operate continuously with high computational intensity. FUNDING INFORMATION Our paper is financially supported by the University of Transport and Communications (UTC) and Thuyloi University Int J Elec & Comp Eng. Vol. No. June 2025: 2726-2734 Int J Elec & Comp Eng ISSN: 2088-8708 AUTHOR CONTRIBUTIONS STATEMENT This journal uses the Contributor Roles Taxonomy (CRediT) to recognize individual author contributions, reduce authorship disputes, and facilitate collaboration Name of Author An Thi Hoai Thu Anh Tran Hung Cuong C : Conceptualization M : Methodology So : Software Va : Validation Fo : Formal analysis ue I : Investigation R : Resources D : Data Curation O : Writing - Original Draft E : Writing - Review & Editing ue Vi : Visualization Su : Supervision P : Project administration Fu : Funding acquisition CONFLICT OF INTEREST STATEMENT Authors state no conflict of interest DATA AVAILABILITY The authors confirm that the data supporting the findings of this study are available within the REFERENCES