The improvement of model predictive control based on three-level three-phase inverter

To improve the dynamic response of the inverter, the conventional proportional–integral controller and the modulation part are substituted by the finite-control step model predictive control (FCS-MPC) strategy. Compared to the two-level inverter, the drifted neutral point potential is an issue that cannot be neglected. To resolve this issue, the cost function is modified in this paper. Besides, as all of the voltage vectors are employed during optimal research progress in FCS-MPC, the switching frequency is variable, which burdens the filter. The complex calculation progress also burdens the microcontroller. According to the conventional modulation algorithm, the voltage vectors are divided into several groups and the optimal calculations are simplified with them. Based on that modification, the switching frequency is fixed. Finally, the simulation and the experimental results are demonstrated, which reveal the validity and merits of the proposed method.


Introduction
With the increasing awareness of environmental protection and the reduction of fossil fuel reserves, distributed generation (DG) such as photovoltaic and wind power has been vigorously developed (Dong et al., 2020;Kim et al., 2017;Klaes et al., 2020). To supply the energy collected by the micro source to the local power source and the power grid in the form of electrical energy, the concept of the microgrid has been proposed, and it has been extensively studied by relevant staff and experts. As the interface of the distributed generation system, grid-connected inverters play an important role in energy conversion and maintenance of power quality of the power grid (Azab, 2021;Saim et al., 2020).
Among the three-phase three-level inverters, the neutral point clamped (NPC) three-level topology is currently the most widely adopted structure (Hao et al., 2020;Wang et al., 2020). In this topology, the midpoint voltage will shift due to load and modulation mode during operation. Therefore, the adjustment of three-level midpoint clamp-type midpoint voltage balance has always been a research hot topic of scholars over the world, and various control of adjusting midpoint voltage has been proposed in reference (Lee & Lee, 2016;Li, Wang, Jiang, et al., 2014;Xu et al., 2018). An optimized pulse width modulation (PWM) strategy CONTACT Xiao Zhao xiaozhao_hbuas@126.com that can reduce switching losses and balance the neutral point with an optional THD of three-level neutral-pointclamped inverters is proposed in the literature (Xu et al., 2018). Lee and Lee (2016) proposed to control the midpoint potential in the case of a single modulated wave by adjusting the duty cycle. However, the single modulation wave modulation method has the problem of midpoint fluctuation.  and Li, Wang, Jiang, et al. (2014) proposed a dual modulation wave modulation method to adjust the midpoint potential and keep the midpoint potential constant. But this dual-modulated wave approach is computationally complex and has no unique solution. To mitigate this issue, it is necessary to artificially implement constraints. Model Predictive Control (MPC) originated in the 1970s. It combines the system information at the sampling time, the mathematical model of the system, and the previously obtained system state information, and uses the cost function in a rolling optimization method to control the system (Luo & Liu, 2020;Sotelo et al., 2020). Because it adapts to linear and nonlinear processes, there is no need to know the object model, and the cost function as a control standard can be modified according to the needs of the system and can be widely used. With this simple and feasible constraint ability, it has shown great advantages in the problem of seeking optimal control, especially in the fields of petrochemical, aerospace, robot control, etc. (Cao & Chen, 2014;Imani et al., 2017;Zhang et al., 2019). Model predictive control is essentially an open-loop control. When the mathematical model of the object is known and the number of variables available for control is limited, the process of optimizing the control variables using rolling optimization only needs to make the output meet the system's dynamic characteristics, status and input constraints, etc. (Zhou et al., 2021).
In this paper, the model predictive control is adopted to adjust the three-phase three-level midpoint voltage offset while shortening the control time. The rest of this paper is organized as follows. In Section 2, the principle of midpoint potential adjustment of the three-phase threelevel inverter is illustrated. In Section 3, the mathematical model of the three-phase three-level inverter under the predictive control of the finite set model is established. Simulation results and comparative analysis are given in Section 4. Finally, the conclusion and potential future work are drawn in Section 5.

Three-phase three-level midpoint potential adjustment
The topology of the three-phase three-level midpoint clamped inverter is shown in Figure 1. The following assumptions can be made: (1) the two capacitors on the DC side are equal to generate the reference midpoint voltage, namely; (2) the switch is in an ideal state to simplify the analysis process. Taking a bridge arm in the figure as an example, the four switching devices on the bridge arm are S 1 , S 2 , S 3 , and S 4 , respectively.
When the two capacitor voltages on the DC side are half of the DC voltage when S 1 and S 2 are turned on, S3 and S4 are turned off and the output phase voltage V xO = 0.5V dc , where x = A, B, Cis recorded as P; when the S 3 , S 2 is turned on and S 1 , S 4 is turned off, the output phase voltage V xO = 0which is recorded as the state O; when S 3 , S 4 is turned on, S 1 and S 2 are turned off and the output phase voltage V xO = −0.5V dc . It can be seen that the output voltage vector can be described by the switching  state, and the spatial voltage vector distribution is shown in Figure 2. Yongchang and Changqi (2015) divide the voltage vector into the small vector, medium vector, and large vector according to the magnitude of the vector. Among them, the small vector and the middle vector can affect the DC midpoint voltage. The two small vectors that are redundant with each other have opposite effects on the midpoint potential, and it is concluded that the midpoint potential can be adjusted through the redundant small vectors. Choi and Lee (2013) pointed out that when the output voltage vector is a small vector or a medium vector, the midpoint is connected to the load and a midpoint current is generated. Then the relationship between midpoint voltage and midpoint current is shown in Figure 3.
The current flowing through the midpoint in Figure 3 is i NP . The midpoint is the positive direction. The two supporting capacitors are C 1 and C 2 respectively. To simplify  the analysis and calculation process, assuming that the capacitances of the two are equal and the value of both are C, the currents flowing through the two capacitors are i C1 and i C2 . According to the relationship between capacitor voltage and capacitor current, the expression can be obtained.
From Equation (1), the midpoint current can be adjusted by the midpoint current. Taking Figure 2 as an example, assume that the target voltage vector falls within a vector triangle enclosed by voltage vectors (PPO, OON), PON, and PNN. The duty cycle of the final output of the modulation link is shown in Figure 4. It can be seen from Figure 4 that when the voltage vector is ONN, the midpoint current is i a ; when the voltage vector is PON, the midpoint current is i b ; when the voltage vector is POO, the midpoint current is -i a . Taking the situation in Figure 1 as an example, suppose that the initial voltage difference between the two capacitors on the DC side is u dc . When the reference voltage vector is in a small sector enclosed by the vectors PON, POO, ONN, and PNN, that is, the midpoint current is generated by two small vectors and one mid vector. Assuming that the small vector POO acts for kT 1 , the small vector ONN acts for (1 -k) T 1 , k∈[0,1], and the middle vector PON acts for T 2 .
Since the switching frequency is much greater than the current frequency, it is considered that the magnitude and direction of the three-phase currents do not change in one cycle. Therefore, after a switching cycle, the updated voltage difference between the two capacitors is

Mathematical model of the three-phase inverter
The topology of the three-phase inverter is shown in Figure 1. The output terminal is connected to an LC filter. The voltage of the output phase is u rx , the current flowing through the inductor L is i x , and the output voltage on the filter capacitor is u cx where x = a, b, or c. The parameters are assumed the same, the value of inductance is the L f , and the resistance of the inductor is the R f . The output voltage of the inverter and the voltage of the load terminal capacitor are both ideal sinusoidal waveforms, and the voltage relationship can be expressed as The expression of inverter in the two-phase stationary coordinate system and the two-phase rotating coordinate system could be obtained by Clarke transformation and Park transformation as shown in Equations (4) and (5) Variables on the same coordinate axis are marked with the same subscript. It can be seen from (5) that the coupling amount is introduced into the expressions of the d-axis and the q-axis. To eliminate the influence between them, given the need to add feed-forward to eliminate the coupling effect, the control equations of the voltage outer loop and the current inner loop is given as follows: It can be seen from the mathematical model that the control of the traditional three-phase inverter system is to enter the modulation link through the reference voltage signal obtained by the current inner loop to control the output signal. This approach can utilize PI control while decoupling the axis variables. However, the PI controller can only track the deviation of the DC quantity, then Park transformation is required, which increases the amount of calculation.

Model predictive control
Because the traditional control method uses a PI controller, and to achieve the error-free tracking of a given amount, the input of the controller is DC, so Park transformation is required. Model predictive control is different. It is a control method that predicts its future output based on the mathematical model of the controlled object. For predictive control of the finite set model, the optimal vector is selected by evaluating the future state of the system corresponding to each discrete voltage vector. Considering the discrete characteristics of the numerical controller used, delays are introduced in the sample-hold and calculation processes. When the sampling frequency is much greater than the measured frequency, the differential component in the system can be approximated by the first-order forward differential component, that is where k and k+1 represent the sampling time, respectively, the controlled quantity is x, and the sampling period is T s . The original three-phase inverter mathematical model (3) can be discretized as Equation (9), The predicted value of the current can be obtained from (9). Where u rα (k) and u rβ (k) in the finite set prediction model, respectively, all the separate voltage vectors are projected on the two-phase stationary coordinate system, namely where V n is the selected voltage vector. Finally, the effect of each voltage vector is evaluated by the evaluation function, and the required voltage vector is finally obtained. To introduce the model prediction method used in this article, first introduce the mathematical model. Since there are voltage outer loop and the current inner loop in the system control model, the current inner loop is the research object. Assuming that the sampling and the duty cycle are updated synchronously, according to the mathematical model of the traditional model predictive control introduced in the previous formula (9), it can be seen that according to the existing state, each current variable corresponds to an output voltage, that is, a corresponding relationship is formed between current and voltage. Among the three-level converter equipment, the output voltage is required to follow the given, and this relationship can be converted into the relationship between the output current and the given current. If the error between the latter is extremely small, the output voltage will also follow the given voltage under ideal conditions. In model predictive control, a cost function can be used to constrain the system, where the cost function of the system is shown in expression (11), where I ref α and I ref β are the projections of the reference current value on the α axis and the βaxis, respectively, and I α (n) are I β (n) the predicted current at time n. J 1 = 0 represents that there is no error between the output current and the given current. According to the above introduction, there is no error between the output voltage and the given voltage in an ideal state, and the system is controlled. In the two-level converter, there are eight voltage vectors to choose from; in the threelevel converter, without considering repetition, there are 27 voltage vectors to choose from, each voltage Vectors are independent variables. On this basis, the researchers proposed the finite control set MPC (FCS-MPC).
For a three-phase three-level system, based on ensuring the output voltage waveform, the midpoint current needs to be constrained. Assuming that the midpoint voltage offset is u dc , the second evaluation function is where I 0 is the midpoint current generated by the voltage vector V n in a cycle and λ is the weighting factor for midpoint current adjustment. Combining (9), (11), and (12), firstly through (9), (11) can realize the control of three-phase three-level inverter. It can be seen from Figure 2 that the three-phase threelevel inverter has 27 voltage vectors. In the traditional finite set control model predictive control, all voltage vectors need to be a large amount of online calculation for each prediction process via (11) and (12) formula. At the same time, each voltage vector needs to continue to act for one switching cycle, and only the voltage vector of the next cycle is considered from the aspect of voltage synthesis. This voltage synthesis method can ensure that the output follows the target vector ( Figure 5).
At the initial time k, the output of the system is x(k), and the error between the given and the state is e(k) = x ref -x(k). At this moment, the output states of each voltage vector correspond to one cycle are S 1 ∼ S 27 . To reduce the error e(k), the appropriate voltage vector is selected according to the cost function, so that the state of the system is x(k + 1) at the end of a cycle. In the next cycle, this step is repeated to achieve control of the system.
In practice, not all voltage vectors need to participate in online calculations. Assuming that the target voltage vector is in sector III, both the discrete voltage vector and the target voltage vector are projected onto the coordinate axis of the two-phase stationary coordinate system. It can be seen that the components of some voltage vectors on the two coordinate axes are opposite to the desired synthesized voltage vector. It can be simplified here, as long as the voltage vector in the same large sector as the target voltage vector is involved in the synthesis. After adding this constraint, the number of voltage vectors involved in the selection was reduced from 27 to 10, reducing the amount of calculation. Besides, considering the demand for the switching frequency, each switching cycle needs to have an effective vector and a zero vector. In a cycle, it can only change in the adjacent voltage state, that is, P-O, O-N, and cannot directly change between P and N states.

Simulation and experimental results
To verify the correctness of the proposed algorithm, this paper uses simulation and experiments to verify. The simulation software adopts MATLAB 2013b, and the experiment is completed on the three-phase inverter prototype built in the laboratory. Among them, the experimental platform adopts the switching device as the FS3L30R07W2H3F_B11 three-phase three-level module produced by Infineon, the controller uses the 32-bit floating-point DSP of TI company: TMS320C6748 and the coprocessor is the FPGA of Xilinx company: Spartan6E, switch The tube drive is MAST5-6C-U12.

Simulation results
Set the parameters in the simulation software according to Table 1. Comparing the simulation results of the two methods, the output current waveform is shown in Figure  6 at a steady state. Figure 6(a) is the current waveform when using traditional FCS-MPC control, and Figure 6(b) is the current waveform when using the improved algorithm. Figure  6 shows the results of two methods for controlling the midpoint potential in the simulation platform.   It can be seen from Figure 7 that the midpoint potential fluctuation is about ±0.5 V, and this method has a suppressive effect on the midpoint potential shift. However, it can be seen that only one voltage vector is output per cycle. When the filter inductance is small, the output voltage harmonic content is very high. Besides, there are no specific harmonics in the output voltage of the traditional model predictive control method, which makes the design of the system filter difficult. At the same time, if the model predictive control needs to achieve a good control effect, a high sampling frequency, and an increase in filter inductance is required, otherwise, the effect will be affected.
In the simulation output results Figure 8, for the traditional virtual vector method, it takes 1.1 s to reach the equilibrium state, which is relatively a long time; when the improved method is adopted, it takes only 0.3s to reach the equilibrium state. In the balanced state, the midpoint potential fluctuations of the traditional method and the improved method are eliminated. In the improved method, the voltage difference between the two capacitors in the balanced state is almost zero, which is better than the traditional method.
In Figure 9, the X-axis corresponds to the power factor, the Y-axis corresponds to the degree of modulation, and the Z-axis corresponds to the midpoint potential fluctuation amplitude, in volts. It can be seen from Figure  9(a) that is the traditional method, the midpoint potential fluctuation increases with the increase of the modulation degree, and is affected by the power factor at the same time, the maximum fluctuation is 0.7 V. It can be seen from Figure 9(b) that in the improved method under model predictive control, the midpoint voltage fluctuation is almost not affected by these two factors, and the maximum fluctuation amplitude is reduced from Figure 9. The relationship between power factor, modulation degree, and midpoint potential fluctuation amplitude.  0.7 to 0.07 V decreasing 90% compared to the original method.
By comparison, it can be seen that the improved method has a stronger midpoint potential offset adjustment ability than the traditional virtual vector method under high modulation. At the same time, the ability to suppress low-frequency fluctuations of the midpoint potential is better than that of the traditional FCS-MPC method, and the adjustment effect is less affected by the modulation and power factor.

Experimental results
To further verify the effectiveness of the improved algorithm, a comparative experiment was conducted on the experimental platform. Except for the selection of 1.4mH for the filter inductance during the test, the remaining parameters are communicated with the values given in Table 1. Figure 10 shows the difference waveform of the midpoint voltage between the two methods.
In Figure 10, both the traditional method and the improved algorithm can maintain a constant midpoint voltage.
Take the flip of a certain pin level of DSP as the mark, and the high level is the time required for calculation. The time required for the two algorithms to complete the control algorithm is shown in Figure 11. It can be seen from the comparison of Figure 11 that the traditional FCS-MPC algorithm needs 140 μs to complete the control, and the improved algorithm needs 54 μs to complete the control. This shows that the use of improved algorithms reduces the amount of calculation.
Then, compare the midpoint voltage adjustment process with the output alternating current. The experiment uses the traditional virtual voltage vector modulation, that is, the traditional method is compared with the multi-stage mid-vector combined model predictive control. In the initial state, the voltages of the two capacitors are 100 and O V, respectively. Same as simulation, the degree of modulation in the experiment is from low to high. Figure 12 shows the midpoint adjustment process. The red and blue lines represent the voltages of the two capacitors. When the modulation degree is low, the midpoint balance adjustment time of the two methods is similar, the traditional method requires 0.15s, and the improved method requires 0.1s; when the modulation degree reaches 0.9, the difference between the two is obvious. The traditional method requires 1.5 s, and the voltage between the two capacitors is still not equal in the steady-state; the adjustment time of the new method is 0.4 s, and the voltage value of the two capacitors is equal in the steadystate.
In Figure 14, harmonic analysis is performed on the current waveform shown in Figure 13. It can be seen from Figures 13 and 14 that the AC voltage and current waveforms output by the two methods are highly similar and can meet system requirements.

Conclusion
A fixed frequency model predictive control algorithm for a three-phase three-level inverter system is proposed in this paper. Based on the original algorithm model predictive control, the evaluation function is developed and analysed. The midpoint potential control of the threelevel system is realized. By improving the method, the inverter's ability to adjust the midpoint potential under a high modulation degree is improved, and the problem of low frequency fluctuations of midpoint potential is eliminated. And the effect of the algorithm is verified through simulation and experimental results.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Data availability statement
The PSIM11 simulation data used to support the findings of this study are available from the corresponding author upon request.