Model-based Predictive Control in Three-Phase Inverters

In the last year model predictive control strategy has emerged as a good alternative for the control of power converters. This research proposes a new model-based predictive control strategy for a voltage source inverter, operating at variable and fixed switching frequency, with the objective of comparing the performance of the control algorithm and the output variables. The experimental results show the benefits of predictive control and the superiority of fixed frequency control strategies instead of the variable switching frequency. Based on the total harmonic distortion (THD) and the absolute error, we can prove that better results are obtained by forcing the converter to commutate at fixed frequency.


I. INTRODUCTION
The population growth and its related increasing energy demand have encouraged the development of applications that promote the use of renewable resources. Among these technologies, microgrids are one of the most used and investigated. The characteristics of integration with different renewable sources, isolation of the main grid in case of failures and higher efficiency, provide the microgrids with, a wider range of possibilities comparing to conventional electrical networks. 1 The efficiency of the microgrids stress into the integration of power converters within the electrical system [1], [2]. The voltage source converters are one of the most widely used converters in the architecture of a microgrid [3]. The voltage source inverters (VSI), convert a continuous voltage (DC) into an alternating voltage (AC), acting as intermediaries within the process of clean energy injection to the electrical grid. The small amount of elements in this converter makes it an economical and reliable alternative for medium and low power applications. In addition, the VSI is presented as a potential solution to the problem of management and energy supply, necessary for the operation of the engines like mining or transportation industries.
The topology of the VSI is shown in Fig. 1 for three phase load and two level output. Some of the most commonly used control strategies in power converters are the hysteresis control [4], the proportional-integral (PI) controller [5] and the modelbased predictive control (MPC) [6].
The model-based predictive control (MPC) is characterized by the use of mathematical models of the system, to predict future behaviors and to select the control actions that the converter should perform. Among the advantages of MPC is the inclusion of several control objectives, restrictions and nonlinearities in a single control law. In this way, it is possible to control some typical variables such as current, voltage, power, torque, or flux, among others.
Predictive control in VSI converters has the particularity that only a finite number of possible switching states can be generated. This can be used to predict the behavior of the variables in each switching time, while a selection criterion is defined to determine the state. This criterion consists on a cost function that will be evaluated according to the predicted values of the controlled variables. The prediction of these future variables are calculated for each of the possible switching states. Then, the state that minimizes the cost function is selected. The control strategy can be summarized in the following steps: • Define the cost function g. • Build the model of the converter with the possible switching states. • Build the load model for the prediction. The introduction of a cost function that includes control objectives is the basis of the MPC. This function can include more than one control variable, which gives the MPC some advantage over conventional control strategies. However, the combination of two or more variables in a cost function is not a simple task when they have different units and magnitudes.
v dc Each additional term has a specific weighting factor, which is used to handle its relative importance compared to the other objectives [7]. These parameters must be designed correctly in order to achieve the desired performance of the VSI. Unfortunately, there are no analytical, numerical, or control theories to adjust these parameters, and they are currently determined based on heuristic procedures. It is important to say that, when the system is linear, there is a correlation between the MPC technique and the state feedback technique, which implies a good initial way to calculate the weights of the cost function analitically. However, the nonlinear nature of MPC strategies should always be considered.
This study proposes a new predictive control strategy applied to a three-phase inverter with RL load. Recent research has addressed the implementation of predictive control strategies at fixed frequency [8], [9] and variable frequency [10], [11], but there are few studies that relate both strategies. The main contribution of this research lies in the implementation of two new predictive control strategies with variable frequency and the other at fixed switching frequency, as well as the comparison of the results in a three-phase inverter.

II. MATHEMATICAL MODEL OF THE CONVERTER
The VSI converter topology considered in this investigation consists of six switches (IGBT), the DC link voltage and a three-phase load RL, as shown in Fig. 1. Considering that the two switches in each phase of the inverter operate in a complementary mode, to avoid the short-circuit of the DC source, the switching state changes S x , with x = 1, ..., 6, and it can be represented by the switching signals S a , S b and S c , defined as follows: S c = 1 f or S 5 ON and S 2 OF F 0 f or S 5 OF F and S 2 ON These switching signals define the value of the output voltages: v where V dc is the voltage of DC source. Considering the unitary vector a = e j2pi/3 = − 1 2 + j √ 3/2 which represents 120 • for phase shift. The output voltage vector is defined as: where v aN , v bN and v cN are the phase-to-ground voltages (N) of the inverter. Taking into account all possible combinations of the activation signals S a , S b and S c , eight commutation states are Voltage vectors in the complex plane.
obtained and, consequently, eight voltage vectors as shown in Table I. Also, in Fig. 2 shows that V 0 = V 7 , which results in a finite set of only seven different voltage vectors in the complex plane.

A. Load model
According to the definitions of the variables shown in Fig.  1, the equations for the dynamics of the load current in each phase can be written as: The voltage of the inverter can be calculated based on the definition of the spatial vector as: then the dynamics of the load current is described by the vector differential equation: where v is the voltage vector generated by the inverter, and i is the load current vector. It is important to note that the converter connected to the grid is not considered.
To discretize the previous equation, we resort to the Euler method, based on a tangential approximation of the derivative: where i k corresponds to the current value measured, i k+1 is the current predicted for the next sampling and T s is the sampling period. If you combine the equation (12) and (13), you get the following: If we consider the common mode voltage (v nN ) as null, then we have a good approximation of the model: The objective is to know the current that is being led to the next sampling, in such a way that the current can be compared with the predicted one and the error can be reduced. For this reason, equation (15) is reduced as a function of the current of the next state.

III. CLASSIC PREDICTIVE CONTROL FOR THE VSI
The current predictive control proposal considers three variables to obtain the current prediction, which are: two current values in coordinates α, β and the voltage provided by the DC link. The values are worked within the prediction model and the predictions obtained are evaluated in the cost function. The block diagram of the variable frequency predictive control strategy applied to the VSI control is shown in Fig. 3. The cost function is an expression that calculates the error as the difference between the reference and the predicted value, considering the currents in coordinates α and β, according to Clarke's transformation. The objective is to select the minimum error between the reference current and the predicted current and can be obtained from equation (17): where i p α (k + 1) and i p β (k + 1) are the real and imaginary parts of the predicted load current vector i p (k + 1), for a particular voltage vector. The reference currents i * α (k + 1) and i * β (k + 1) are the real and imaginary parts of the reference vector i * (k+1). For simplicity, it is assumed that this reference current does not change enough in a sampling interval, so it is considered i * (k + 1) = i * (k). This assumption can introduce  a delay of a sample in the reference follow-up, which is not a problem if a high sampling frequency is considered. The results can be improved by considering a square error for the current reference, after the terms of the cost function [12]: where the currents i α and i β are calculated as: The cost function of equation (18) is inserted into a cycle, which evaluates the currents generated by the eight valid switching states and chooses the one that generates the least error.

IV. PREDICTIVE CONTROL OPERATING AT FIXED SWITCHING FREQUENCY
The classic predictive control has the particularity to evaluate all the valid commutation states of the VSI. Also, to predict the current in the next state, and to minimize the error, the converter must do all predictions until reaching the reference current. This process occurs at a variable switching frequency, because it is likely that when predicting the next switching state, it is equal to the current one, whereby the converter maintains its state. This situation can be generated indefinitely, changing the switching frequency at every moment, generating noise and ripple in the voltage and current of the converter.
Applying a technique that allows switching to a fixed frequency [13], reduces noise and increases the efficiency of the converter. The representative scheme of the fixedfrequency predictive control differs from the classic predictive control scheme, in that contemplates a block corresponding to a defined switching pattern, which is executed in the same way during all predictions. In Fig. 4  control at fixed frequency is the same one used by the variable frequency predictive control. The representation of the space vectors is equal to that of the classical control shown in Fig. 2. The fixed frequency prediction technique, evaluates each sector of the plane α − β, which is composed by two adjacent voltage vectors, in addition to a zero vector. Within a cycle, all the regions of the vectoral plane are evaluated, obtaining as results two optimal vectors and three periods of time, in which referred vectors will apply.
In each cycle, two vectors are taken and constitute a region within the vector plane. Therefore the current predictions are evaluated based on these vectors. This implies two cost functions g 1 and g 2 and a third cost function g 0 , which is calculated only once and corresponds to the prediction when the voltage is equal to zero. As in the classical predictive control, the minimum cost function is the one that will prevail and will be used to determine the effective time periods for the commutation T 0 , T 1 and T 2 . On the other hand, the cost functions are used to determine the working cycles, that are associated with each vector and are determined by the following relationships: Substituting the equation (22) in (21), we obtain the expression for the constant K: In this way, the new cost function to be used is obtained by replacing the previous equation in (21) and is determined by the following relationship: The values d 1 and d 2 are evaluated in the new cost function, in conjunction with the functions g 1 and g 2 obtained previously. The optimal vectors chosen will be those that minimize the new cost function. In turn, the time periods T 0 , T 1 and T 2 , are determined directly by the work cycles d 0 , d 1 and d 2 in the following way: where t m corresponds to a number obtained by dividing the sampling time into equal parts, in this case it is divided into 100, therefore t m = T s /100. Once the optimal vectors are already available and its application times, the switching strategy to be applied in the next sampling state is established. This strategy can be summarized in: • The switching pattern is started, applying the zero vector, one quarter of its time T 0 (T 0 /4). • Then the first optimal vector v opt 1 is applied half of its time T 1 (T 1 /2). • It is followed by applying the second optimal vector v opt 2 half of its time T 2 (T 2 /2). • Next, the zero vector is applied in a period equivalent to half of its time T 0 (T 0 /2). • The second optimal vector v o 2 pt is applied half of its time T 2 (T 2 /2). • The first optimal vector v opt 1 is applied half of its time T 1 (T 1 /2). • Finally the zero vector is applied, a quarter of its time T 0 (T 0 /4). It is very important to know which vector will be considered as optimal vector one and optimal vector two, since what is sought in the switching at fixed frequency is that in each change of applied vector, only one switch leg of the converter is on. In this way the application of this method is optimized and better results are obtained. Specifically, for the odd sectors (one, three and five) the optimal vector one will correspond to the first vector of the sector, considering that the optimal vector two will be the one that follows it in an anti-clockwise direction. In the opposite case, that is, for the even sectors (two, four and six) the optimal vector one will correspond to the first vector of the sector and the optimal vector two will be the one that follows it in a clockwise direction. The zero voltage vector can be obtained by two different combinations, the first is when S 1 , S 3 and S 5 are worth zero and the second when S 1 , S 3 and S 5 are worth one. For the correct application of the sequence, the first combination must be applied at the beginning and end of the sequence, while the application of the   zero voltage vector in the middle of the sequence is achieved by applying the second combination. For the development of the experimental part of this research the DSP Delfino is used with a microcontroller F28335, which is responsible for executing the control algorithm. Also, an FPGA (Basys 2) is used, where the dead time is implemented and serves as a clock for the DSP, sending the interruptions at a fixed sampling period. The parameters used for the implementation are shown in Table II.
The experimental tests of the predictive control, working at variable frequency of commutation and fixed frequency in steady state, are shown in Figure 5. On the left side are shown the results of the variable strategy and on the right those at fixed switching frequency. Regarding, Figure 6 shows the predictive control strategy working at variable switching frequency (left) and fixed switching frequency (right), for the transient state. As presented, the performance of the VSI operating at a fixed frequency is better than variable frequency. The above can also be checked in Table III, where the total harmonic distortion percentage of the voltage v an is shown. The data was obtained by evaluating the predictive control technique at fixed switching frequency and the predictive control at variable frequency for four different references.
When comparing both phase voltages v an , it is appreciated that the predictive control operating at fixed switching frequency has lower total harmonic distortion, and it can be graphically appreciated, since the phase voltage has better homogeneous pattern as it is commuted with a fixed pattern. For the case of the current i a , the results end favorable for this control technique, because shown at the tables, the differences are considerably marked.
It is possible to demonstrate the good performance of the control strategies, the feasibility of the MPC strategies and their applicability in power converters. In the case of low sampling frequency, it is justified on the basis that the predictive control operating at a fixed switching frequency took around 60µs to finish executing the actions. Therefore, it was not possible to work at very high sampling frequency. However, this served to demonstrate that the predictive control operating at fixed frequency works better than the classical one and in fact, it is not necessary to increase the sampling frequency to obtain acceptable results. In order to improve classical predictive control, and to match the good results of fixed frequency control, the sampling frequency must be increased at least twice. The most appreciable comparative results focus on the total harmonic distortion, takes place in the current.

VI. CONCLUSIONS
The voltage source inverter was used to test the performance of a predictive current control strategy operating at variable frequency and fixed switching frequency. Similarly, both controls showed a rapid response to changes, both in frequency and amplitude, and managed to follow the sinusoidal reference wave.
The technique of predictive control at fixed frequency overcome the strategy with variable frequency, in terms of THD and error in steady state. These differences are appreciated because at the same sampling frequency, the fixed frequency control has approximately 5 % less THD and error than the strategy at variable frequency. For smaller currents, these differences are accentuated and reach almost 10 % in terms of THD.
The control strategy at fixed frequency has better performance than its classic predecessor, because it works with two optimal vectors during the entire switching sequence and a zero voltage vector in some instants. This method decreases the steady-state error throughout the entire execution period of the sequence since it calculates how much is the optimal application time for each vector within the sequence. The problem for predictive control at variable frequency relies on it calculating only one optimal vector per period. Hence it does not always correspond to the one that minimizes the cost function during the entire period.
By comparing the spectra of the harmonics for both controls, we can see the best performance of fixed switching predictive technique than the classical strategy.

VII. ACKNOWLEDGMENT
This work was supported by the Chilean Government under Projects FONDECYT 1160690 and the National Doctorate Scholarship CONICYT 2019.