Simultaneous voltage unbalance compensation and neutral‐to‐ground voltage minimization for an islanded mini‐grid using model predictive control

This paper presents a model predictive control (MPC) and its application on a three‐phase four‐leg inverter in an islanded mini‐grid to compensate for unbalanced load conditions while minimizing the neutral‐to‐ground voltage (NGV). The proposed approach uses the novel discrete‐time model of the four‐leg inverter and LC filter to predict the control variables. These predictions are evaluated by using a multiobjective cost function. The proposed method is based on the minimization of the cost function to select the best vector state of the power converter to be applied in the next sampling instance. The cost function in this study has two objectives: the adequately tracked low voltage reference and minimization of the NGV, simultaneously. The stability analysis is also defined to investigate the stable dynamics of the proposed MPC. The effectiveness of the suggested method is verified through simulations considering the single/three‐phase and balanced/unbalanced loads. The distinguished results of the proposed work indicate that the proposed MPC algorithm provides high power quality under unbalanced and nonlinear load conditions with high stability. The robustness of the proposed controller is also studied with both inductive and capacitive filter parameter variations.

In recent years, interest in using islanded mini-grids has increased because of their considerable advantages in supplying power in remote areas. Islanded mini-grids based on distributed generations (DGs) are used in areas where connection to the utility grid is not possible or connecting to the utility grid is too expensive, such as in single homes, islands, and large-scale computer systems [1]. Inverter-based DGs are the most popular and convenient sources for islanded mini-grids because of their economic, technical, and environmental benefits [2]. However, such mini-grids face various power quality problems such as unbalanced load conditions, harmonics, voltage sag, voltage swell, and high neutral-to-ground voltage (NGV) when supplying sensitive loads that need to be resolved before they become common-place [3].
One of the most important power quality problems in the islanded mini-grid is the unbalanced load condition. The presence of single-phase loads/sources in a threephase four-wire mini-grid can lead to excessive neutral current. This phenomenon can cause adverse effects on equipment and the electric distribution system, such as power loss and voltage drop [4]. According to IEEE's recommendation [5], the value of the voltage unbalance factor (VUF) should be below 2% for the distribution systems. Another important effect of unbalanced load conditions is neutral energization. The more neutral current can cause a significant rise to NGV. NGV becomes important when there are sensitive loads connected to the grid. Some sensitive electronic and computer equipment has stringent NGV limits [6], as low as 0.5 V. A high value of NGV can cause protection problems and serious electrical safety concerns; therefore, the NGV value needs to be within a certain range. This problem should be solved in mini-grids as well. The use of inverter-based DGs is one of the best solutions to compensate for the above-mentioned issues, because they can easily cope with unbalanced networks. Several types of inverter topologies are introduced to provide a neutral wire in islanded mini-grids that are presented extensively in the literature [2,[7][8][9]. The three-phase four-leg voltage source inverter (VSI) is the best topology for providing the neutral wire due to the proper operation to supply balanced output voltages even under severe unbalanced load conditions. Therefore, by providing appropriate control methods for four-leg VSIs, unbalanced load conditions and the NGV problem can be resolved in islanded mini-grids.

| Literature review
Many papers on unbalanced compensation and NGV minimization separately have been published in the literature. In [10][11][12][13][14][15][16][17], the authors proposed various control techniques to compensate for low voltage (LV) unbalances in the four-leg inverter, and in [18][19][20] attempts were made to reduce the value of the NGV in the four-leg inverter. In the aspect of the control method, several techniques for controlling the four-leg inverter in islanded mini-grids against unbalanced load conditions were previously proposed. One of the most common control methods is the proportional-integral (PI) technique [10,21]. Although this method has a simple structure, it does not perform perfectly under unbalanced load conditions. The proportional resonant (PR) controller, another type of control method [11], is unable to fully eliminate the steady-state error of a sinusoidal control signal. Yet another method, the hysteresis controller [12] with its simple structure, has a high current ripple and variable switching frequencies. In [22], repetitive control (RC) is used to overcome the unbalanced load conditions. Although the RC provided zero steady-state error at all harmonic frequencies, it did not have a good transient response. In [13,[23][24][25], the sliding mode control (SMC) was proposed to compensate for unbalanced conditions due to its fast dynamic response, yet its main lack is a chattering phenomenon in discrete implementation. In [1,14,26], a model predictive control (MPC) is proposed to compensate for unbalanced load conditions. Although this method needs some calculations, it has the possibility to include constraints in the design process. The MPC method is one of the best choices to compensate for unbalanced load conditions and NGV at the same time because of the possibility to include nonlinearities and constraints in the design procedure. A model of the predictive voltage control strategy of a quasi-Z source four-leg VSI is analyzed in [15] to compensate for unbalanced load conditions. In [16], minimizing the error between the output voltages and their references and simultaneously reducing the instantaneous reactive power with a two-stage matrix converter is proposed. A comparison between the proportional-integral-derivative technique in the dq frame with MPC for the autonomous two-level four-leg inverter is presented in [17]. In [27], the authors proposed duty cycle control to enhance the steady-state performance in addition to reducing the voltage reference tracking error in uninterruptable power supply applications. Furthermore, in [16], various unbalanced load conditions are compensated with a two-stage matrix converter by the MPC controller. However, none of the presented methods deals with the NGV problem. In [18], three methods are proposed for mitigating the NGV called load neutral point voltage in an islanded mini-grid, and the advantage and limitations of each method are analyzed. In [19], a new dynamic capacity distribution technique with a three-phase four-leg VSI is proposed to improve the neutral current compensation, phase balancing, and NGV compensation at the point of common coupling in a residential LV network. In [20], NGV is compensated by using a balancing algorithm to control the energy storage devices so as to provide an appropriate balancing effect under varying loads and photovoltaic unbalances. Table 1 demonstrates the main advantages and shortcomings of the mentioned control methods. As can be seen, the MPC controller is better for multiple objectives and also has an acceptable dynamic response. Table 2 compares the main parameters of the published papers based on several controllers with the MPC proposed in this paper, such as sample time, output filter types, and their values. As can be seen, most papers did not consider NGV compensation or stability analysis.

| Research gaps
On the basis of the papers reviewed and summarized in Table 2, the research gaps are as follows: • Many control methods have been published on the compensation of power quality problems for sensitive loads in islanded mini-grids; however, none of them has addressed the issue of NGV modeling and control, while this power quality problem is highly important for the protection and safety of critical loads in industrial mini-grids. • According to the literature, various methods have been proposed to solve only the unbalanced problem, and some methods have also been suggested only for the high NGV problem, but none of those works addresses these two issues as important power quality challenges for sensitive loads simultaneously. • Normally, power converter components, filters, and controllers are designed based on static analysis, but in previous works, system stability has not been considered, even though taking stability into account during the design procedure can lead to proper performance.

| Contributions of the paper
Compensating power quality problems including unbalanced load conditions and high NGV at the same time can provide many benefits for mini-grids, especially when supplying sensitive loads. However, jointly compensating for these two power quality problems is very complicated and needs more investigation. In this regard, the main contributions of this paper are as follows: • High NGV as an important power quality problem in islanded mini-grids supplying sensitive loads is taken into account and modeled. • A new method based on the MPC is proposed to compensate for the unbalanced load conditions and  high NGV problem in an islanded mini-grid supplied by a three-phase four-leg VSI, simultaneously. • The concept of a discrete-time model of the system with the output LC filter and neutral inductor is presented herein. On the basis of the developed model, the system component was designed in detail, and the stability of the proposed MPC was investigated.

| Organization of the paper
The rest of this paper is structured as follows. In Section 2, the modeling of the three-phase, four-leg inverter, and its mathematical equations are presented. Section 3 discusses the proposed control technique and its constraints in detail. The stability analysis of the proposed MPC is displayed in Section 4. The simulation results under different scenarios are presented in Section 5, and it is demonstrated that this technique can keep balanced LVs with minimum NGV in highly unbalanced load conditions. Finally, the conclusion is provided in Section 6.

| MODEL OF THE SYSTEM
The power topology for a three-phase, four-leg inverter with an LC output filter is shown in Figure 1. Direct current (DC)-link voltage is already replaced by an ideal DC voltage source to simplify the analysis. An additional leg is connected to the three-phase conventional inverter to control the zero sequence current and increase the control flexibility by gate signals. As shown in Figure 1, the middle point of the DC-link is usually grounded; thus, the voltage differences between the node "n" and the middle point of the DC-link are named NGV. The voltages of nodes are obtained by applying Kirchhoff's voltage law to the three-phase, four-leg inverter in Figure 1 as follows [18]: xn an bn cn T , and U n represent the middle point voltage of each leg, output voltage of each phase, and NGV, respectively.
La Lb Lc Lf T represents the inductor currents. L and L n are defined as phase inductance and neutral inductance, respectively. By using Kirchhoff's current law, the following equation is obtained: (1) and (2).
Kirchhoff's current law is obtained as follows: where Oa Ob Oc T it represents the output current.
The proposed predictive control scheme is shown in Figure 2. The main goals have been established as the minimization of NGV due to its standards and the minimization of unbalanced voltage factors in unbalanced load conditions, simultaneously. These two control objectives can be achieved through the following set of steps: (i) The reference output voltage of each phase (U xn * ) is defined as the input of the control strategy. The NGV (U n * ) condition is included as a control restriction. Furthermore, the variables of U xn (k) and I Ox (k) are measured and U n (k) is calculated.
(ii) Through the mathematical model obtained from Section 2 and the variables obtained in the previous step, the state variables for k + 1 instant are predicted. (iii) In the last step, the predicted output voltage values for each phase (U xn (k + 1)) and the restriction of NGV (U n (k)) are evaluated in a cost function, and finally, the switching state, which optimizes this cost function, will be applied to selected switching signals in the next sampling time to the inverter.
The performance algorithm of the MPC can be briefly described in the following steps that are shown in Figure 3:  • Measure U xn (k) and I Ox (k) as LV and load current, respectively. • Predict U xn (k + 1) by Equation (7) and calculate U n (k) by Equation (3). • Optimize the cost function by Equation (12).
The prediction variables in continuous-time statespace are given as where A and B are presented as follows: Because of the discrete nature of power converters' topology and control platforms, formulating the system equations in discrete time is required. The prediction variables in discrete-time state-space are given as (7) and (8) [30]: Therefore, the output voltage control is obtained as where U an (k + 1), U bn (k + 1), U cn (k + 1) are the output voltage of each phase (the LV) predictions according to the mathematical model that was proposed previously, and U * an (k + 1), U * bn (k + 1), U * cn (k + 1) are their respective references.
xn an bn cn T can be considered by using the formulation, as in [31]: If sampling time (T s ) is small enough (less than 20 μs), to simplify calculations, it can be considered that U * xn (k + 1) ≈ U * xn (k). Thus, Equation (9) can be changed to Equation (11). The scheme of the proposed MPC control that is shown in Figure 2 predicted the future behavior of variables and controlled the LV in a variety of conditions. With this control strategy, the cost function is minimized in (k + 1) that is defined in (12).
The switching state is chosen as the minimal value of the cost function and applied to the inverter during all of the (k + 1) period. The cost function of this paper that is presented in (12) has two control objectives: • The first term that is the main objective of this control technique is related to reference tracking of LVs in balanced and unbalanced load conditions which is expanded in (11). U xn * represents the voltage references in phases a, b, and c. The generation of voltage references depends on the specific application. In islanded DGs, it depends on the load appliance rating, and the magnitudes and frequencies can have various values per-phases. To simplify the analysis, the reference values are provided by the user. U xn (k + 1) estimates the future behavior of LVs and, as shown in Figure 2, is obtained from input variables U xn (k) and I Ox (k). • The second term deals with the reference boundaries of the NGV. U n * (k) is the reference voltage of NGV and has a constant value, which is assumed to be 0.5 in this paper [6]. U n (k) is the NGV that is obtained from Equation (3), and it is dependent on the input variable U x (k), state variable U xn , and the boundary of U n as defined in (13). Finally, in (13), λ is the weighting factor that indicates the importance of each term.

| STABILITY ANALYSIS OF THE PROPOSED MPC
In this part, the stability of the proposed controller is analyzed. The method used in [32] was employed in this study to validate the stability analysis of the MPC controller. First, the small-signal block diagram of the three-phase, four-leg inverter with the MPC control system is represented in Figure 4A. Second, as can be seen in this figure, the impedance of the load is depicted by Z L . The MPC controller becomes a firstorder delay element and is illustrated with a first-order transfer function by the time constant (T eq ) that indicates equivalent time delays of the control algorithm execution and analog to digital converters and can be considered by T eq = 0.85T s [32]. In addition, another parameter that can be seen in the MPC firstorder transfer function is the gain (K MPC ), which is expressed as the amplitude ratio of the measured and reference voltages amplitude and is assumed as a unity. For the third point, each series inductor filter and parallel capacitor filter are represented as first-order transfer functions as shown in Figure 4A. The Nyquist criterion and Bode plot used to verify the stability of the proposed control system are presented in Figures 4B,C, respectively. Figure 4B demonstrates a Nyquist plot of the transfer function of the system and shows the stability of the proposed MPC controller as the path which is in the clockwise direction and located at the right half of the axis s = -1. Afterward, the Bode plot that permits the display of wider frequency ranges in a single plot is used to analyze the system stability and is presented in Figure 4C. Moreover, in Figure 4C, the phase margin of the transfer function is 41.8°and demonstrates the stability of the controller. In summary, the proposed control technique is stable, dynamic, and of actual transfer function construction.

| SIMULATION RESULTS
In this section, the feasibility of the proposed voltage control technique with minimization of the neutral-to-ground voltage has been verified and demonstrated with simulation using MATLAB/ Simulink and the parameters given in Table 3. In these simulations, the cost function is prepared with the (k + 1) predictions.

| Steady-state analysis
The following fourth operating conditions are assumed employed to illustrate the proposed control method in a steady state.   The simulation results for the balanced load condition without and with constraint (scenarios 1 and 2, respectively) are shown in Figures 5 and 6, respectively. Due to the balanced resistive loads, very good tracking is observed in this figure. The LVs are tracked to their respected references. As the loads are balanced, the NGV has an almost constant value. As can be seen in the two mentioned figures, the NGV value is in its standard limitation when the constraint is activated; however, the standard NGV limitation is not observed without the constraint condition.
The simulation results with an inductive load that is added between phases B and C (L = 1 mH and R = 1 Ω) are presented in Figure 7. In scenario-3, this load condition is proposed without minimization of NGV. As shown in Figure 7, the LVs remain sinusoidal, and they have tracked their reference values in a steady state. However, the NGV has a value higher than that of the reference's boundaries.
The load condition of scenario-4 is just like that of scenario-3, but the difference between them is considered the NGV constraint. In this case, study, as shown in Figure 8, the reference tracking error is regarded just like the previous case, while the NGV is decreased from more than 4 to lower than 0.5 V.
The simulation results for scenario-5 are shown in Figure 9. In this case study, in phase C, a resistive load was added and minimization of NGV was not considered. This case study represents the three-phase, four-leg DG, where consumers maintain different loads in phase C compared with the other phases. It was observed that the controller maintains the LVs at their reference values.    Finally, in scenario-6, unbalanced loads on phase C (R = 0.8 Ω) with minimization of NGV were considered and are shown in Figure 10. As depicted, the NGV was decreased to under 0.5 V. Table 4 illustrates the simulation result parameters in steady-state conditions. It further depicts that both VUF and total harmonic distortion (THD) in all conditions are within the boundaries of its standard [5].

| Dynamic performance under load change
By considering T s = 15 μs as a sampling time, the fifth operation condition with the proposed control method is shown in this section: Dynamic performance results in unbalanced load conditions (scenario-A) without minimization of NGV are depicted in Figure 11. A very fast dynamic response can be observed without any overshoot. This figure shows that by every step change in load condition, the LVs are somewhat affected, but the duration is very slight and small (about microseconds). Figure 12 shows the dynamic performance of scenario-B with the minimization of NGV. Figures 13 and 14 show the dynamic simulation results when a resistive load was added on phase C without NGV constraint and with NGV constraint, respectively (scenarios C and D, respectively).

| Robustness to parameters variations analysis
Due to the proposed controller being model-based, the proper performance of the controller depends on the system parameters. Thus, the objective of this section is to assess the robustness of the proposed MPC controller in variations of the parameters of the L and C filters and to show the effects of these variables on the THD i o and VUF as well. It should be noted that during this study, the controller neglected the variations of the parameters, and thus remained in the fixed values mentioned in Table 3. To illustrate the investigation of the proposed controller with different filter parameters, the results of simulations in steady state with L and C variations are shown in Tables 5  and 6, respectively. The scenarios shown in these tables are the same as those defined in the steadystate analysis section. Table 5 depicts the L-filter parameters as being varied between 0.3 and 1.9 of their nominal values (mentioned in Table 3), while the C-filter is set at 1100 μF. Table 6 shows that the C-filter parameters are varied between 0.3 and 1.9 of their nominal values (mentioned in Table 3), while the L-filter is set at 45 μH. The THD has relatively high values for underestimated inductance values, with a THD of 18.13% in scenario-1 when the inductance is 50% of the nominal value, and it is 15.00% in scenario-1 when the capacitance is 30% of the nominal value. For a better understanding, Figure 15A shows the effect of the inductance variation, and Figure 15B shows the effect of the capacitance variation with data that are noted in scenario-3.

| CONCLUSION
This paper presented the MPC approach for a threephase, four-leg inverter in an islanded mini-grid under various unbalanced load conditions. To prevent the protection problem and safety of sensitive loads within the mini-grid, it is important to hold the NGV value under its limitation (less than 0.5 V). On the basis of the MPC controller's ability to include constraints in the design, the high NGV problem has been fixed to a great extent, and the unbalanced load conditions were simultaneously compensated. The stability analysis of the proposed controller is represented with Bode and Nyquist diagrams to show the dynamic stability of the system. In this approach, the VUF is held below 2%, and the NGV is under 0.5 V in several case studies. Moreover, different values of system parameters were considered so as to prove the robustness of the proposed controller and confirm the proper performance of the controller. The significant outcomes show that the proposed MPC can provide high power quality under various unbalanced conditions with high stability and robustness.