Model Predictive Control with Modulator Applied to Grid Inverter under Voltage Distorted

: This research paper presents a model of predictive control with a modulator for the inverter linked to the electrical grid, using the stationary reference frame and operating under grid distorted voltage. The stationary reference frame model for the system is obtained in its fundamental frequency and then the model predictive technique is implemented, which predicts the system actions using the obtained system model without the need of any other harmonic consideration. The controller calculates the voltage vector of the inverter through the minimization of the cost function. Thus, the proposal demonstrates, through experiments, its positive results regarding the low impact of the distorted voltage in the grid current without using any harmonic consideration on the model. Experimental results and comparisons carried out endorse the proposal of this work.


Introduction
Various countries have increased their usage of renewable energy sources due to the concern about CO 2 emissions [1]. In this context the inverter connected to the grid can perform the connection between the renewable energy system and the electrical grid in several ways, as distributed generation (DG) systems [2].
Due to the employment of the power electronics converters, such as DG and electronics loads, the voltage can be distorted [3]. In this way, several controllers, such as resonant [4] or proportional plus integral considering harmonics [3,5], were proposed to mitigate the distortions.
In [6], they used a resonant control approach with a dual-loop current for a gridconnected inverter, which is based on a model of grid with LCL-filter between inverter and grid in discrete domain under a stationary frame. The paper work presents the practicality and robustness, but it is not clear that this controller is capable of mitigating some voltage distortions because the author focused on designing a robust controller.
Another solution that can be considered is to not only use a proportional controller with resonant, but an integral part that can also be added to obtain zero steady-state error [7] and a sinusoidal current. The mentioned solutions can obtain interesting results, they can degrade their performance due to the non-well tuning of the gains in the design and when the harmonics components enhance, again the author does not apply this controller under voltage distortions, due to this, the contribution of this article is presenting a controller technique to mitigate the distortion on the grid current caused by voltage distortion. based on the grid fundamental component with a proportional-resonant (PR) [9], and the implementation in a stationary frame avoids using a phase locked loop (PLL) as the controller proposed in this article.
The model predictive control (MPC) is a class of controllers that predicts the system action by means of its model and calculates the input by means of a minimized cost function [10].
The finite control set (FCS) for the grid connected inverter operating under voltage distortion, and using a moving average PLL was presented in [11], the authors also chose the stationary frame to control the system [12].
The FCS is a specific type of controller, compared to the predictive controller, the main difference is that it has a limited number of voltage vectors which the controller can choose [13]. Thus, the results obtained with this type of controller present a variable switching frequency that interferes with the projected of filters for grid-connected, and there is no robustness against distortions on the grid [14].
The paper [15], which proposes to mitigate the degradation of THD in the input currents by active front end (AFE) rectifiers under voltage distortion thought a model predictive virtual flux control (MPVFC). the controller is based on the cost function on virtual fluxes, that it is robust to voltage distortion.
Another solution to reduce the THD of grid current and output power, the authors in [16] proposes a model predictive direct current control (MPDCC) for a three-level T-type rectifier. If we compare this controller with the conventional method, the microcontroller is responsible for computing the instantaneous reactive power and active power; using a PLL, the positive and negative sequence is extracted. The article also provides the experimental results to support the feasibility and effectiveness of the proposed MPDCC strategy.
An MPC with modulator solves the problem of switching frequency presented in FCS, which consists of using a pulse width modulation (PWM). In this context, this technique has been proposed to induction motor drives [17], doubly-fed induction generator [18] or inventers [19]. However the tests are made in grid voltages without disturbances, it is commonly find this controller with modulation applied in power electronics, which provides a fixed switching frequency for the system [20]. MPC plus repetitive controller with modulator operating under voltage distortion for DFIG is presented in [21], the article proposal links the predictive control behavior to the repetitive in one controller, where the repetitive controller is designed to track the reference signals and reject possible disturbances in the DFIG.
This paper [22] proposes a grid-voltage sensorless MPC method for the control of PWM rectifier. Different other controller techniques for power control, this controller uses extended reactive power to cope with the unbalanced grid voltage. Moreover, the virtual flux is used to achieve grid-voltage sensorless operation and can work effectively even under voltage distortion. A second-order generalized integrator quadrature signal generator (SOGI-QSG) in combination with a cascaded delayed signal cancellation (CDSC) block is responsible for an estimation of the virtual flux. The equation of state is different from conventional controllers and work with the virtual flux, increases system complexity when compared to FCS.
The proposal of this paper introduces the current control of an inverter connected-grid using MPC with modulator operating when the grid voltage has harmonic distortions, this control technique is a different method to project a predictive controller. The controller predicts the components of the grid current vector action by means of its discrete statespace model in its fundamental frequency. The minimized cost function calculates the voltage vector of the inverter. In this context, the proposal permits to inject grid current in accordance with the standards as IEEEStd 1547. 2-2008 [23] even in voltage distorted. The results obtained in experimental setup endorses the proposal.

Modeling of the Grid-Connected Inverter
The power inverter links the grid using an inductive filter. In this context, the inverter is modeled as voltage source with variable frequency and amplitude. The inductor presents a behavior as voltage due to the inductance and internal resistance as in the following equations [24].
The grid voltage in stationary reference frame (αβ) in (1), can be represented in discrete form in T t sampling time employing the zero-order-hold (ZOH) technique without delay and it can be written as follows [25]: where L g and R g are the inductance and internal resistance of the filter, i current vector, v voltage vector, g related to the grid, in related to the inverter, α and β represent the components of the real and imaginary axis of the vector, v α and v β are the grid voltage vector components and C dig is the identity matrix. Filter L g can be calculated using the following expression, the filter is an important part of the system because is capable to filter some high-frequency noise in the current grid signal. [26].
where f 0 represents the switching frequency, V RMS expresses the effective value of the mains voltage, and I∆ represents the current variation in the inductor.

Current Grid Control Using the MPC
The MPC predicts the future actions of the system plant and one calculates the input using the cost function minimization. Additionally, it permits to insert the restrictions. In the proposal presented in this paper the system is modeled at fundamental frequency and the MPC must be able to reject the disturbance. Hence, the inverter can operate with no distortions in grid current. In this context the disturbance will be voltage distortions due to harmonic components.
The prediction of the components of the grid current vector can be performed as [27,28]: where n y means the prediction horizon of the grid current, I g is the prediction of the grid current vector, i g k =ī gαβ (k). The quadratic cost function in matrix representation is given by: where re f ∈ R (n y ·q)×1 represents the grid current vector future references, W y ∈ R (n y ·q)×(n y ·q) weighs the controlled grid currents (outputs) and their predictions, W u ∈ R n u ×n u weighs the control efforts of inverter voltage minus grid voltage vectors, V ∈ R n u ×n u is the input, n u is the control horizon and q = 2 due to the components of the vector representation. The expression of the minimized of the cost function (Equation (10)) can be represented algebraically from ∂J ∂V = 0 and and isolating V. Hence, the representation is given by In this paper it is assumed that v inαβ (k) ∼ = v inαβ (k + 1) ∼ = . . . ∼ = v inαβ (k + n y − 1). In this case, the T t is minor then the period of the grid time.
The elements i gα and i gβ of the grid current vector references in the fundamental frequency can be performed using the grid active P r and reactive Q r power references and the fundamental frequency of the grid voltage vector components as follows [29]: The grid current vector control using MPC calculates the voltage vector of the inverter in stationary reference frame using Equation (11) considering the value of the grid voltage vector components in fundamental component frequency. This voltage vector is the input of the PWM algorithm as space vector modulation. In this way, the grid current will reach their references. The Figure 1 depicts the block diagram representation of the scheme Rossiter [30].
MPC needs the information about the angle and the fundamental frequecy component of the grid to compute the appropriate voltage vector of the inverter to operate during grid voltages. In this context, the PLL based on grid voltage, like the one in [31] can operate under distorted voltage due to harmonics elements. Another possibility is to use the PLL presented in [32]. The PLL is inside the block current estimator function in Figure 1.

Results Obtained in Experimental Setup
The proposed grid current control using MPC strategy were tested based on the experimental setup in accordance with Figure 1. This mentioned set is composed of electronic boards to acquire the voltage (v) and current (i) variables, a digital signal processor (DSP) Texas Instruments model TMS320F28335, inductor bank, and a controllable electronic voltage source that acts as the electrical power grid, and also provides the distorted voltage, and the Figure 2 presents the experimental bank setup. The parameters of the system is presented in Table 1, it provides also the weighting factors that were chosen based on the FARE-based weighting matrices approach [27].  To test the performance of the proposed grid current control using MPC, the voltage of the electrical grid chosen is the same of [21] which is a variation of the distorted grid used in [33], this grid is distorted by 3.94% in 5th, 3.15% in 7th, 2.36% in 11th, 1.50% in 13th, 1.10% in 17th and 0.70% 19th harmonic components, as presented in Table 2. The first test was carried out using a step of reactive power reference Q r from −300 var to 0 var and the active power reference P r was maintained at 500 W as depicted in Figure 3. The elements of the grid current vector action and the grid voltage and current during this test is depicted in Figures 4 and 5, respectively. It can be seen that the power reach the references and the grid current has no impact due to the harmonics components of the grid voltage. The oscillations in power occurs due to the MPC effort that allows the operation of the grid current as mentioned and due to the distorted voltage. Hence, the MPC allows to reject the disturbance in grid current in this case.  The second test was carried out using a step of active power reference P r from 500 W to 750 W and the reactive power reference Q r was maintained at 0 var, as depicted in Figure 6. The elements of the grid current vector action and the grid voltage and current during this test is depicted in Figures 7 and 8, respectively, the magnitude values present in the figures are the peak values for voltage and current. The total harmonic distortion (THD) of the grid current is depicted in Figure 9, it is 4.82% and in accordance with the grid requirements of the IEEE Std 1547.2-2008 [23]. It can be seen that the power reaches the references and the grid current has no impact due to the harmonics components of the grid voltage. The oscillations in power occurs due to the MPC effort that allows the operation of the grid current as mentioned and due to the distorted voltage. Hence, the MPC allows the rejection of the disturbance in grid current in this case.  All the details about the signal used to validate the controllers were presented in this section. The most important acquired knowledge during the tests was that the test bench must be a great measure system for current and voltage, it is also necessary a microcontroller solve all the equation because is essential for the controller to generate the correct control signal.

Experimental Comparison between FCS and MPC with Modulation
To consolidate the performance of MPC with modulation, a comparison with FCS control [25] is presented in this section using approximated 20 kHz for switching frequency. The proposed evaluation consists in firstly, the peak magnitude of voltage and current signals obtained from the FCS control applied to inverter grid-connected present in Figure 10. This is the same test of the proposal operation depicted in Figure 8. To illustrate the comparison, using the CSV file from the results with MATLAB were created the Figures 11 and 12 using the elements of Figure 10  It is clear that the FCS produces a current with more distortion and the active power has more oscillation if compared to Figure 4, due to the limited number of vector available for FCS [34]. Even both controllers were applied to the three-phase inverter, when the controller proposed in this article chooses which switches will be activated, it can choose more than one voltage vector during the sample period, but the FCS can use only one vector per sample. Due to this, the signals produced by FCS have more oscillation around the references.
The following test presents in Figure 13 the THD for the current generated by the FCS. The THD of the proposed MPC with modulator operation during distorted voltage depicted in Figure 9 is lower if compared to THD presented in Figure 13, the Table 3 summarize the THD results.

TDH [%]
3.82% 6.28% It is proven that the proposed controller is more qualified for renewable energy applications, due to its capability to provide a great quality of current for the grid, even if under voltage distortion.

Conclusions
The article presented a proposal for a predictive controller and its practical implementation. The methodology and design process of the controller was presented, which presented a satisfactory result, as an example, a rise time of 2.1 ms for active power and 2.3 ms for reactive power, suitable values when dealing with a power system and with no overshoot, and a low stationary error.
The controller implementation process was presented throughout the article, with the steps for mathematical elaboration applied to the grid-connected inverter system. The proposal is based on the prediction of future values of the system states through the predictive model, in this case, the current in the stationary reference (i α i β ). The performance of the controller was evaluated in distorted voltage scenarios, which occurs when there is a lot of electronic equipment connected to the electrical network.
The strategy was presented as simple to be implemented in the DSP, as long as the measurement system is correctly calibrated, faithfully representing the voltage values of the currents entered. Furthermore, with the evolution of signal processing systems, it became possible to use a small amount of sampling time, making it easier to measure and act on the system more accurately.
The results show that the MPC technique is a powerful control, which uses a method already consolidated in the literature, but like other controllers, there are numerous ways to be designed, this article presents a new way of application in systems connected to the electrical grid. Finally, it is possible to conclude that the grid current control by the MPC reaches the references of current with little impact due to the harmonics components of the grid voltage and it is in accordance with the grid requirements of the IEEE Std 1547. 2-2008 [23]. In future papers to maintain under this subject, the focuses could be related to the robustness of the system under parameters variations. The project of prediction horizons and weights factors according to the performance criteria are the other factors that can be used as focuses for new papers.