Virtual Inertia Control-Based Model Predictive Control for Microgrid Frequency Stabilization Considering High Renewable Energy Integration

Renewable energy sources (RESs), such as wind and solar generations, equip inverters to connect to the microgrids. These inverters do not have any rotating mass, thus lowering the overall system inertia. This low system inertia issue could affect the microgrid stability and resiliency in the situation of uncertainties. Today’s microgrids will become unstable if the capacity of RESs become larger and larger, leading to the weakening of microgrid stability and resilience. This paper addresses a new concept of a microgrid control incorporating a virtual inertia system based on the model predictive control (MPC) to emulate virtual inertia into the microgrid control loop, thus stabilizing microgrid frequency during high penetration of RESs. The additional controller of virtual inertia is applied to the microgrid, employing MPC with virtual inertia response. System modeling and simulations are carried out using MATLAB/Simulink® software. The simulation results confirm the superior robustness and frequency stabilization effect of the proposed MPC-based virtual inertia control in comparison to the fuzzy logic system and conventional virtual inertia control in a system with high integration of RESs. The proposed MPC-based virtual inertia control is able to improve the robustness and frequency stabilization of the microgrid effectively.


Introduction
Widespread growth in utilizing renewable energy sources (RESs), such as wind, solar, biomass, and geothermal for electricity generation has become unavoidable. These are emerging as an important constituent of small-scale power systems called microgrids [1]. A microgrid is a group of local grids with a number of RESs, energy storage, and domestic loads, which can be identified as an independent system with the capability to operate in either grid-connected or isolated mode, thus reducing a huge burden on the utility grids [2,3]. However, RESs exchange power to the microgrids through inverters/converters. The power electronic interface-based RESs will reduce the overall system inertia and cause lack of frequency/voltage stabilization to a microgrid compared with traditional synchronous generators [4]. These negative effects in using power electronics, along with the intermittent nature of most RESs, could lead to problems such as severe power generation fluctuations due to variable nature of high RESs, voltage rise issues due to reverse power flow from high RESs, and excessive supply of electricity in the power grid due to full generation by high RESs.
These issues result in the difficulty to stabilize system frequency and voltage, leading to the weakening of microgrid resiliency. In order to handle the drawback introduced by inverter-based generators in microgrids, one of the modern solutions is to emulate the behavior of synchronous generators virtually into the microgrid, thus improving the system stability and resiliency [5].
The modern solution is known as a virtual synchronous machine/generator (VSM, VISMA, and VSG) concept, which emulates the essential behavior of a synchronous machine while providing ancillary services to systems [6,7]. Virtual inertia control is a particular case of VSG implementation, where only the action of the prime mover is emulated to support frequency control. The strategy is based on the rate of change of frequency (RoCoF). It calculates the frequency deviation to add the extra active power to the set-point. Thus, this concept emulates the inertia characteristic, which contributes to the total inertia of the microgrid, enhancing the transient frequency stability. During the past years, several models have been proposed and investigated related to the virtual inertia control designs. Li et al. [6] proposed a coherency-based equivalence method for VSG control using modular multilevel converter to emulate behaviors of the synchronous generator. Liu et al. [7] performed the comparison of dynamic characteristics between the VSG method and droop control method to emulate virtual inertia into power system. Chen et al. [8] presented the investigation of VSG for the islanding area, such as a microgrid system. Beck et al. [9] applied an energy storage system to perform a similar role as the kinetic energy in the rotor of a synchronous generator for improving the dynamic stability of power system. Karapanos et al. [10] proposed and studied the effect of VSG connected with the utility grid. Zhong et al. [11] presented the VSG controller based on the swing equation with the objective of conducting the inverter frequency reference.
In [6][7][8][9][10][11], most research focused on the design and implementation of VSG in the area of power electronics (i.e., equipment and control scales) without considering the effect of high penetration of RESs. During high penetration of RESs and load disturbances, the virtual inertia/VSG control might be unstable, leading to instability and system collapse. This issue is the major drawback of the mentioned approaches. Without considering this significant effect, the previous virtual inertia designs and techniques might be insufficient for microgrids. Hence, a robust adaptive control method needs to be implemented together with the virtual inertia control to deal with changes in a microgrid with high RES penetration.
Up to now, robust adaptive control techniques have been developed to deal with changes in system parameters. Fuzzy logic systems have been applied in research on frequency control with and without nonlinearities [12]. The applications of neural networks, genetic algorithm, and optimal control for frequency control have been reported in [13][14][15]. Compared with the mentioned methods, the model predictive control (MPC) shows the finest performance, such as fast response and robustness against load disturbances and parameter uncertainty. MPC is an advanced control strategy that has been widely used in industry. It adopts an optimization method to calculate the optimal control actions at each sampling time to system constraints. MPC is also well adapted to different physical setups and it allows for a unified method [16,17]. In power generation control area, MPC is applied to thermal power plant coordinated control [18] and nuclear power plant control [19,20]. In frequency control area, Mohamed et al. [21] proposed MPC designed for a multi-area power system and Mohamed et al. [22] presented a multi-area system considering integration of wind turbines. Pahasa and Ngamroo [23] proposed the coordinated control of wind turbines and plug-in electric vehicles using MPC for microgrid frequency control. Pahasa and Ngamroo [24] applied the charging/discharging of plug-in electric vehicles based on MPC for frequency stabilization. To overcome the difficulties in high penetration of RESs/load and mismatch parameters of the microgrid generations, this paper proposes virtual inertia control based on MPC to achieve a more stable and robust microgrid frequency stability and performance, avoiding instability and system collapse.
This paper presents a novel adaptive control method based on virtual inertia system with MPC for microgrid frequency stabilization by emulating virtual inertia into the microgrid during high penetration of RES and load uncertainties. The additional controller of virtual inertia control is applied to the microgrid, employing MPC with virtual inertia response. System modeling and simulations are carried out using MATLAB/Simulink ® . The simulation results confirm the superior robustness and frequency stabilization effect of the proposed MPC-based virtual inertia control in comparison to the fuzzy logic system and conventional virtual inertia control. The main contribution of this work is that using the proposed method, the microgrid system can be smoothly stabilized, maintained, and prevented from instability and collapse during high integrations of RES/load and mismatch parameters of microgrid generations. The rest of this paper is organized as follows: a brief introduction to microgrid frequency control considering virtual inertia system is given in Section 2. In Section 3, the proposed MPC-based virtual inertia control is presented. Section 4 introduces the fuzzy logic design for virtual inertia control as a comparative intelligent method. Section 5 presents four case studies of the proposed MPC-based virtual inertia control and the time-domain simulated results. Microgrid frequency performance under various operating conditions is presented. Finally, the conclusion is given in Section 6.

Microgrid System
The microgrid system employed in this research is displayed in Figure 1. System details are shown as follows: thermal power plant with a peak power of 20 MW, wind farm 1 with a peak power of 2.5 MW, wind farm 2 with a peak power of 8 MW, residential load with a peak power of 5 MW, and industrial load with a peak power of 10 MW. The system base is 20 MW [25]. Due to the penetration of RESs such as wind turbine generation in the microgrid, these power electronics-based RESs reduce overall system inertia and are negatively affecting frequency and voltage stabilization of the microgrid. The virtual inertia system is greatly expected to compensate active power imbalance in the microgrid together with the LFC or when the LFC is not sufficient. comparison to the fuzzy logic system and conventional virtual inertia control. The main contribution of this work is that using the proposed method, the microgrid system can be smoothly stabilized, maintained, and prevented from instability and collapse during high integrations of RES/load and mismatch parameters of microgrid generations. The rest of this paper is organized as follows: a brief introduction to microgrid frequency control considering virtual inertia system is given in Section 2.
In Section 3, the proposed MPC-based virtual inertia control is presented. Section 4 introduces the fuzzy logic design for virtual inertia control as a comparative intelligent method. Section 5 presents four case studies of the proposed MPC-based virtual inertia control and the time-domain simulated results. Microgrid frequency performance under various operating conditions is presented. Finally, the conclusion is given in Section 6.

Microgrid System
The microgrid system employed in this research is displayed in Figure 1. System details are shown as follows: thermal power plant with a peak power of 20 MW, wind farm 1 with a peak power of 2.5 MW, wind farm 2 with a peak power of 8 MW, residential load with a peak power of 5 MW, and industrial load with a peak power of 10 MW. The system base is 20 MW [25]. Due to the penetration of RESs such as wind turbine generation in the microgrid, these power electronics-based RESs reduce overall system inertia and are negatively affecting frequency and voltage stabilization of the microgrid. The virtual inertia system is greatly expected to compensate active power imbalance in the microgrid together with the LFC or when the LFC is not sufficient. The non-linear model of the studied microgrid is shown in Figure 2. To get an accurate perception of the actual microgrid, this paper considers the important inherent requirements and the basic constraints imposed by the physical system dynamics of thermal power system, wind power system, and load system. An important physical constraint of thermal power plant is the rate of change of power generation due to the limitation of thermal and mechanical movements. The physical system dynamics of the thermal generation is represented by the speed governor dead band and generation rate constraint (GRC). The maximum value of dead band for the governor of the steam turbine is specified as 0.05 pu. The GRC for non-reheat thermal generation is specified as 10% per minute [22]. The VU and VL are the maximum and minimum limits that restrict the rate of valve (gate) closing/opening speed. The physical system dynamic of the load is described in Appendix A. Then, the wind power and load demand are assigned as the disturbance to the microgrid. In the virtual inertia model, the first-order derivative transfer function with gain (KVI) and time delay (TVI) is employed [26]. The important physical constraint of the virtual inertia system is described in the following section. Microgrid system parameters are shown in Table 1 [27,28]. The non-linear model of the studied microgrid is shown in Figure 2. To get an accurate perception of the actual microgrid, this paper considers the important inherent requirements and the basic constraints imposed by the physical system dynamics of thermal power system, wind power system, and load system. An important physical constraint of thermal power plant is the rate of change of power generation due to the limitation of thermal and mechanical movements. The physical system dynamics of the thermal generation is represented by the speed governor dead band and generation rate constraint (GRC). The maximum value of dead band for the governor of the steam turbine is specified as 0.05 pu. The GRC for non-reheat thermal generation is specified as 10% per minute [22]. The V U and V L are the maximum and minimum limits that restrict the rate of valve (gate) closing/opening speed. The physical system dynamic of the load is described in Appendix A. Then, the wind power and load demand are assigned as the disturbance to the microgrid. In the virtual inertia model, the first-order derivative transfer function with gain (K VI ) and time delay (T VI ) is employed [26]. The important physical constraint of the virtual inertia system is described in the following section. Microgrid system parameters are shown in Table 1 [27,28].

Wind Turbine Generation
The model of wind turbine generation for frequency control is described in Figure 3. In this study, the wind speed standard deviation is multiplied by the random output fluctuation delivered from the white noise block in MATLAB/Simulink ® in order to evaluate the random wind power fluctuation in the microgrid as shown in Figure 11 [29,30]. Wind power output PW1,2 can be calculated as follows:

Wind Turbine Generation
The model of wind turbine generation for frequency control is described in Figure 3. In this study, the wind speed standard deviation is multiplied by the random output fluctuation delivered from the white noise block in MATLAB/Simulink ® in order to evaluate the random wind power fluctuation in the microgrid as shown in Figure 11 [29,30]. Wind power output P W1,2 can be calculated as follows:

Frequency Control Based on Inertia Response
Frequency control is characterized by two main processes the inertia response process and primary control process. During the inertia response process, the controllers have not yet been activated, hence, when a frequency deviation occurs, the power requirement is balanced by the kinetic energy from the generators. During the second process, primary control stabilizes frequency to a new steady-state condition for a time period between 10 and 30 s after the disturbance. Afterwards, the secondary control, such as load frequency control (LFC), recovers frequency to its nominal equilibrium stage for a time period between 30 s and 30 min after the disturbance [31].
In conventional power systems, the inertia response is represented by the kinetic energy. The total kinetic energy of a system rotational mass, including spinning loads, is expressed as [32,33]: The rate of change of rotor speed relies on the torque balance of spinning mass as shown below.
The stored kinetic energy (Ekinetic) is regularly characterized proportional to its power rating and known as the system inertia constant (H): Therefore, the rate of change of frequency (RoCoF) can be obtained and calculated as follows [11]: In the per-unit system, the RoCoF can be represented as:

Virtual Inertia Control for Microgrids
Virtual inertia control is a particular case of a VSM/VISMA/VSG implementation, where only the action of the prime mover is emulated to support frequency control systems [5]. The virtual inertia control strategy is based on the rate of change of frequency (RoCoF). It calculates the frequency deviation to add extra active power to the set-point. As mentioned before, the renewable energy sources (RESs) in a microgrid such as wind and solar generations equip inverters to connect to the grid. Utilization of these power electronic inverters reduces overall system inertia, affecting the microgrid stability and resiliency and increases the uncertainties in the system. The shortage of inertia

Frequency Control Based on Inertia Response
Frequency control is characterized by two main processes the inertia response process and primary control process. During the inertia response process, the controllers have not yet been activated, hence, when a frequency deviation occurs, the power requirement is balanced by the kinetic energy from the generators. During the second process, primary control stabilizes frequency to a new steady-state condition for a time period between 10 and 30 s after the disturbance. Afterwards, the secondary control, such as load frequency control (LFC), recovers frequency to its nominal equilibrium stage for a time period between 30 s and 30 min after the disturbance [31].
In conventional power systems, the inertia response is represented by the kinetic energy. The total kinetic energy of a system rotational mass, including spinning loads, is expressed as [32,33]: The rate of change of rotor speed relies on the torque balance of spinning mass as shown below.
The stored kinetic energy (E kinetic ) is regularly characterized proportional to its power rating and known as the system inertia constant (H): Therefore, the rate of change of frequency (RoCoF) can be obtained and calculated as follows [11]: In the per-unit system, the RoCoF can be represented as:

Virtual Inertia Control for Microgrids
Virtual inertia control is a particular case of a VSM/VISMA/VSG implementation, where only the action of the prime mover is emulated to support frequency control systems [5]. The virtual inertia control strategy is based on the rate of change of frequency (RoCoF). It calculates the frequency deviation to add extra active power to the set-point. As mentioned before, the renewable energy sources (RESs) in a microgrid such as wind and solar generations equip inverters to connect to the grid. Utilization of these power electronic inverters reduces overall system inertia, affecting the microgrid stability and resiliency and increases the uncertainties in the system. The shortage of inertia response from RESs in a microgrid can be solved by adding the virtual inertia control block as shown in Figure 2.
The power of virtual inertia block is obtained by deploying energy storage systems (ESS). In this way, RESs could give the inertia support to the microgrid similar to the conventional synchronous generator, enhancing the transient frequency stability, resilience [6] and reliability [34].
The microgrid inertia constant (H) is determined by Equation (7) with the unit of puMW s, where f 0 is the nominal frequency (i.e., 60 Hz) and D is the load-damping coefficient. where The inertia power is obtained by determining RoCoF. For any frequency deviation, the virtual inertial controller provides the required power to the microgrid as shown below.
In this study, K VI is the virtual inertia variable gain due to the RESs/load changes. The value of 0.08 is used, obtained using trial-and-error method. It yielded a good dynamic stability during the transients even when the total system inertia is reduced to 50% of its system. Figure 4 shows the virtual inertia power control using the MPC control signal. In the virtual inertia controller model, the first-order derivative transfer function with the gain and time delay is used [26]. response from RESs in a microgrid can be solved by adding the virtual inertia control block as shown in Figure 2. The power of virtual inertia block is obtained by deploying energy storage systems (ESS). In this way, RESs could give the inertia support to the microgrid similar to the conventional synchronous generator, enhancing the transient frequency stability, resilience [6] and reliability [34]. The microgrid inertia constant (H) is determined by Equation (7) with the unit of puMW s, where f0 is the nominal frequency (i.e., 60 Hz) and D is the load-damping coefficient.
The inertia power is obtained by determining RoCoF. For any frequency deviation, the virtual inertial controller provides the required power to the microgrid as shown below.
In this study, KVI is the virtual inertia variable gain due to the RESs/load changes. The value of 0.08 is used, obtained using trial-and-error method. It yielded a good dynamic stability during the transients even when the total system inertia is reduced to 50% of its system. Figure 4 shows the virtual inertia power control using the MPC control signal. In the virtual inertia controller model, the first-order derivative transfer function with the gain and time delay is used [26].

Model Predictive Control Design
MPC has confirmed to have a high control efficiency in a wide range of industry applications such as chemical process, petrol industry, electromechanical systems, and several other applications including power system controls [35]. The MPC method is based on an explicit use of a prediction model of the system response in order to obtain the control actions by minimizing an objective function. The effectiveness of the MPC is demonstrated to be equivalent to the optimum control. The objective of the MPC is to evaluate a sequence of control movements to the set point in an optimum manner. The general concept of MPC is shown in Figure 5, where y is the actual output, is the predicted output, and u is the manipulated input. At the present sampling instant, known as j, the MPC scheme determines a set of M values of the input {u(j + i − 1), i = 1, 2, …, M}. The set contains current input u(j) and M − 1 future inputs. The input is set constant after the M control moves. The input are determined in order that a set of P predicted outputs {y̅ (j + i), i = 1, 2, …, P} achieves the set point in an optimum control manner [24,36].

Model Predictive Control Design
MPC has confirmed to have a high control efficiency in a wide range of industry applications such as chemical process, petrol industry, electromechanical systems, and several other applications including power system controls [35]. The MPC method is based on an explicit use of a prediction model of the system response in order to obtain the control actions by minimizing an objective function. The effectiveness of the MPC is demonstrated to be equivalent to the optimum control. The objective of the MPC is to evaluate a sequence of control movements to the set point in an optimum manner. The general concept of MPC is shown in Figure 5, where y is the actual output, y is the predicted output, and u is the manipulated input. At the present sampling instant, known as j, the MPC scheme determines a set of M values of the input {u(j + i − 1), i = 1, 2, . . . , M}. The set contains current input u(j) and M − 1 future inputs. The input is set constant after the M control moves. The input are determined in order that a set of P predicted outputs {y(j + i), i = 1, 2, . . . , P} achieves the set point in an optimum control manner [24,36].
The number of predictions P is based on the prediction horizon, whereas the number of M control moves is called the control horizon. Even if a sequence of M control moves is determined at each sampling instant, only the first move has been applied. Afterwards, a new sequence is calculated at the The number of predictions P is based on the prediction horizon, whereas the number of M control moves is called the control horizon. Even if a sequence of M control moves is determined at each sampling instant, only the first move has been applied. Afterwards, a new sequence is calculated at the next sampling instant; after new measurements become available again, only the first input movement is implemented. The process is repeated at each sampling instant.
The MPC predictions are created by the dynamic model, known as a linear empirical model (e.g., multivariable version of the step response or difference equation models). Alternatively, a transfer function or state-space models can be applied.
The MPC technique solves an optimization problem for finite future time steps at current time [19]. Thus, the system can be expressed by its finite impulse response [37] as: The coefficient number is presented as: where gi is the scalar such that giA is the ith impulse response coefficient matrix.
The MPC problem is to calculate u(j) as the solution to the quadratic program, which is defined as [36]: Subject to: Each weight (i.e., Wy and Wu) is assumed to be constant multiplied by the identity matrix, which is suitable for the virtual inertia control. This is because the weighting of the input (i.e., frequency deviation) and output (i.e., virtual inertia power control signal) may not change when the microgrid parameters, wind power, and load power are changed.
In addition, two simple PI or fuzzy controllers may be sufficient for virtual inertia control. However, PI and fuzzy controllers are insufficient when the disturbances, as well as the lack of total The MPC predictions are created by the dynamic model, known as a linear empirical model (e.g., multivariable version of the step response or difference equation models). Alternatively, a transfer function or state-space models can be applied.
The MPC technique solves an optimization problem for finite future time steps at current time [19]. Thus, the system can be expressed by its finite impulse response [37] as: The coefficient number is presented as: where g i is the scalar such that g i A is the ith impulse response coefficient matrix. The MPC problem is to calculate u(j) as the solution to the quadratic program, which is defined as [36]: Subject to: Each weight (i.e., W y and W u ) is assumed to be constant multiplied by the identity matrix, which is suitable for the virtual inertia control. This is because the weighting of the input (i.e., frequency deviation) and output (i.e., virtual inertia power control signal) may not change when the microgrid parameters, wind power, and load power are changed.
In addition, two simple PI or fuzzy controllers may be sufficient for virtual inertia control. However, PI and fuzzy controllers are insufficient when the disturbances, as well as the lack of total system inertia, occur in the microgrid with high penetration of RESs. Moreover, when using a fuzzy logic controller, it is not easy to define a proper fuzzy rule for a specific problem [26,[38][39][40][41][42].

MPC for Virtual Inertia Control
In this study, the MPC is implemented to produce the optimum control signal to the virtual inertia control system while respecting the given constraints over the output frequency deviation and the RES/load changes. The control loop of the virtual inertia system using MPC controller is shown in Figure 2. The objective function is to minimize the frequency deviation and also provide the robustness to the microgrid when a serious and continuous load/RES disturbances occur in a system with low overall inertia. The calculation of the virtual inertia control signal can be determined as: Subject to: Figure 6 depicts the flowchart of the MPC designed for virtual inertia control. The corresponding steps are described as follows: Step 1: MPC agents monitor the corresponding information, and establish the virtual inertia model based MPC in form of Equation (13) over the current time j.
Step 2: The optimization process for the first control step is performed using Equation (15).
Step 3: The first control step ∆P inertia (j) is extracted and implemented on the virtual inertia controller.
Step 4: Determining whether the termination occurs depends on the disagreement of the tracking consensus within the constraints. If not, the optimization process is repeated for the next time j + 1.

MPC for Virtual Inertia Control
In this study, the MPC is implemented to produce the optimum control signal to the virtual inertia control system while respecting the given constraints over the output frequency deviation and the RES/load changes. The control loop of the virtual inertia system using MPC controller is shown in Figure 2. The objective function is to minimize the frequency deviation and also provide the robustness to the microgrid when a serious and continuous load/RES disturbances occur in a system with low overall inertia. The calculation of the virtual inertia control signal can be determined as: Subject to: Figure 6 depicts the flowchart of the MPC designed for virtual inertia control. The corresponding steps are described as follows: Step 1: MPC agents monitor the corresponding information, and establish the virtual inertia model based MPC in form of Equation (13) over the current time j.
Step 2: The optimization process for the first control step is performed using Equation (15).
Step 3: The first control step ∆Pinertia(j) is extracted and implemented on the virtual inertia controller.
Step 4: Determining whether the termination occurs depends on the disagreement of the tracking consensus within the constraints. If not, the optimization process is repeated for the next time j + 1.

Prediction of the microgrid network for current time j
Optimization for the first control step

Local implementation
Judge the disagreement of tracking consensus with constraints ?

Correction part
Step 4 Step 3 Step 2 Step 1 Optimization part Figure 6. The flowchart of MPC for virtual inertia control. Figure 6. The flowchart of MPC for virtual inertia control.

Fuzzy Logic System for Virtual Inertia Control (Comparative Method)
A fuzzy logic system is an intelligent adaptive controller, which is used in almost all fields of science and technology, including control of power system [38]. The fuzzy system is robust and suitable for practical applications and industries. It can approximate any smooth nonlinear function to any specified accuracy within any compact set. The fuzzy system tries to constitute the controller directly based on the measurements, long-term experiences, and the knowledge of domain experts. The fuzzy logic designs for frequency control are explained in [39][40][41][42].
In order to implement the fuzzy logic controller-based virtual inertia control for microgrid frequency stabilization, a set of fuzzy rules in Table 2 is used to map input variables (∆f ) to output variables (∆P inertia ). The input variables are the rate of change of frequency (∆f ) and the output variables are the virtual inertia power deviation (∆P inertia ). This controller aims to change the frequency deviation input signal to inertia power deviation for compensation of load/RES changes and various rates of microgrid rotation inertia as shown in Figure 7. In this study, the fuzzy system-based virtual inertia control is designed as a comparative intelligent controller to validate the effectiveness of the proposed virtual inertia controller-based MPC method.

Fuzzy Logic System for Virtual Inertia Control (Comparative Method)
A fuzzy logic system is an intelligent adaptive controller, which is used in almost all fields of science and technology, including control of power system [38]. The fuzzy system is robust and suitable for practical applications and industries. It can approximate any smooth nonlinear function to any specified accuracy within any compact set. The fuzzy system tries to constitute the controller directly based on the measurements, long-term experiences, and the knowledge of domain experts. The fuzzy logic designs for frequency control are explained in [39][40][41][42].
In order to implement the fuzzy logic controller-based virtual inertia control for microgrid frequency stabilization, a set of fuzzy rules in Table 2 is used to map input variables (∆f) to output variables (∆Pinertia). The input variables are the rate of change of frequency (∆f) and the output variables are the virtual inertia power deviation (∆Pinertia). This controller aims to change the frequency deviation input signal to inertia power deviation for compensation of load/RES changes and various rates of microgrid rotation inertia as shown in Figure 7. In this study, the fuzzy systembased virtual inertia control is designed as a comparative intelligent controller to validate the effectiveness of the proposed virtual inertia controller-based MPC method.  The process of the proposed fuzzy system involves membership functions and if-then rules. This process is applied to calculate the mapping from the input values to the output values, consisting of three sub-processes (i.e., fuzzification, aggregation, and defuzzification).   The process of the proposed fuzzy system involves membership functions and if-then rules. This process is applied to calculate the mapping from the input values to the output values, consisting of three sub-processes (i.e., fuzzification, aggregation, and defuzzification).

Fuzzy Logic System for Virtual Inertia Control (Comparative Method)
A fuzzy logic system is an intelligent adaptive controller, which is used in almost all fields of science and technology, including control of power system [38]. The fuzzy system is robust and suitable for practical applications and industries. It can approximate any smooth nonlinear function to any specified accuracy within any compact set. The fuzzy system tries to constitute the controller directly based on the measurements, long-term experiences, and the knowledge of domain experts. The fuzzy logic designs for frequency control are explained in [39][40][41][42].
In order to implement the fuzzy logic controller-based virtual inertia control for microgrid frequency stabilization, a set of fuzzy rules in Table 2 is used to map input variables (∆f) to output variables (∆Pinertia). The input variables are the rate of change of frequency (∆f) and the output variables are the virtual inertia power deviation (∆Pinertia). This controller aims to change the frequency deviation input signal to inertia power deviation for compensation of load/RES changes and various rates of microgrid rotation inertia as shown in Figure 7. In this study, the fuzzy systembased virtual inertia control is designed as a comparative intelligent controller to validate the effectiveness of the proposed virtual inertia controller-based MPC method.  The process of the proposed fuzzy system involves membership functions and if-then rules. This process is applied to calculate the mapping from the input values to the output values, consisting of three sub-processes (i.e., fuzzification, aggregation, and defuzzification).  The virtual inertia control is described by a set of "if-then" based fuzzy rules. Using Table 2, fuzzy rules can be expressed in the form of if-then statement as Equation (20). The fuzzy rules can be shown as follow [42]: If Input ∆f i = y i , then Output ∆P inertia,i = o i (20)

Simulation Results and Discussions
The simulation has been carried out in order to validate the effectiveness of the proposed control scheme. The MATLAB/Simulink ® software has been applied for this simulation.
The parameters of the MPC controller are set as follows: To investigate the microgrid frequency response and robustness with the proposed control method, four severe test scenarios are performed with the system parameters given in Table 1.

Scenario 1 (With Sudden Load Change)
In this scenario, the microgrid system shown in Figure 2 is considered as the test system to illustrate the effectiveness of the proposed control strategy. The wind power fluctuation has not been considered in this case. The proposed MPC control method is tested by implementing the step load disturbance (∆P L = 0.1 pu) and the reduction of the system inertia by half of default value (T MG = 10). Figures 9 and 10 show the simulation results for Scenario 1 under default system inertia and half of the default system inertia, respectively. It is obvious that the virtual inertia system (i.e., blue line) improves the frequency response and reduces transient excursions compared with the microgrid system without the virtual inertia control (i.e., black dotted line). The frequency performance is clearly improved by using the fuzzy system-based virtual inertia controller (i.e., green dotted line). The best frequency performance among all simulated control method is obtained by using MPC-based virtual inertia control (i.e., red line). In addition, the transient frequency performance is significantly improved when the microgrid utilizes MPC-based virtual inertia control.

Scenario 2 (With High Integrations of Wind Energy and Load Disturbances)
In this section, the robustness of the proposed MPC control method is evaluated by implementing high fluctuation of wind power and load, which are divided into three sub-scenarios. The microgrid is tested in the presence of low fluctuated wind power (i.e., wind farm 1) and high fluctuated wind power (i.e., wind farm 2) shown in Figure 11, and also low random load change (i.e., residential load) and high random load change (i.e., industrial load) shown in Figure 12. For three sub-scenarios, wind farms and domestic loads are considered as the disturbances, which participate under the assumed multiple operating conditions in Table 3.

Scenario 2 (With High Integrations of Wind Energy and Load Disturbances)
In this section, the robustness of the proposed MPC control method is evaluated by implementing high fluctuation of wind power and load, which are divided into three sub-scenarios. The microgrid is tested in the presence of low fluctuated wind power (i.e., wind farm 1) and high fluctuated wind power (i.e., wind farm 2) shown in Figure 11, and also low random load change (i.e., residential load) and high random load change (i.e., industrial load) shown in Figure 12. For three sub-scenarios, wind farms and domestic loads are considered as the disturbances, which participate under the assumed multiple operating conditions in Table 3.

Scenario 2 (With High Integrations of Wind Energy and Load Disturbances)
In this section, the robustness of the proposed MPC control method is evaluated by implementing high fluctuation of wind power and load, which are divided into three sub-scenarios. The microgrid is tested in the presence of low fluctuated wind power (i.e., wind farm 1) and high fluctuated wind power (i.e., wind farm 2) shown in Figure 11, and also low random load change (i.e., residential load) and high random load change (i.e., industrial load) shown in Figure 12. For three sub-scenarios, wind farms and domestic loads are considered as the disturbances, which participate under the assumed multiple operating conditions in Table 3.      Scenario 2A: In this case, the microgrid system is assumed to have the default parameters with high system inertia (100% of default system inertia, T MG = 20) with multiple operating conditions in Table 3. Microgrid frequency response in this case is illustrated in Figure 13. From Figure 13, it is clearly seen that the frequency deviation of the microgrid with the proposed MPC-based virtual inertia control is less than ±0.25 Hz while the microgrid with the fuzzy logic and conventional virtual inertia controller give the frequency deviation of about ±0.6 Hz. Compared to the microgrid with fuzzy and conventional virtual inertia controllers, the MPC-based virtual inertia controller can provide smooth and secure frequency performance during the multiple operating conditions of the microgrid. Figure 14 shows that the virtual inertia power is greatly discharged by the proposed MPC-based controller (∆P inertia ≈ 0.2 pu for the system with MPC-based virtual inertia controller, ∆P inertia ≈ 0.055 pu for the system with fuzzy controller and ∆P inertia ≈ 0.05 pu for the system with conventional virtual inertia controller). Thus, the frequency response of the microgrid is improved by using the MPC-based virtual inertia controller during the low and high fluctuation of wind power and load in a system with high penetration of RESs.  Scenario 2A: In this case, the microgrid system is assumed to have the default parameters with high system inertia (100% of default system inertia, TMG = 20) with multiple operating conditions in Table 3. Microgrid frequency response in this case is illustrated in Figure 13. From Figure 13, it is clearly seen that the frequency deviation of the microgrid with the proposed MPC-based virtual inertia control is less than ±0.25 Hz while the microgrid with the fuzzy logic and conventional virtual inertia controller give the frequency deviation of about ±0.6 Hz. Compared to the microgrid with fuzzy and conventional virtual inertia controllers, the MPC-based virtual inertia controller can provide smooth and secure frequency performance during the multiple operating conditions of the microgrid. Figure 14 shows that the virtual inertia power is greatly discharged by the proposed MPCbased controller (∆Pinertia ≈ 0.2 pu for the system with MPC-based virtual inertia controller, ∆Pinertia ≈ 0.055 pu for the system with fuzzy controller and ∆Pinertia ≈ 0.05 pu for the system with conventional virtual inertia controller). Thus, the frequency response of the microgrid is improved by using the MPC-based virtual inertia controller during the low and high fluctuation of wind power and load in a system with high penetration of RESs.  Scenario 2B: The microgrid system is assumed to have the default parameters and the microgrid is tested under the situation of half of default system inertia (50% of default system inertia, TMG = 10) with multiple operating conditions of load and wind variations as shown Table 3. The effect of medium system inertia through the proposed virtual inertia controller-based MPC is investigated. Figure 15 shows the frequency deviation of the four methods. It can be seen that the frequency is fluctuating more with high deviation in this scenario. In the case of no virtual inertia controller, the frequency deviation is about −1 Hz when the industrial load is connected to the microgrid at 200 s. In the case of the fuzzy and conventional virtual inertial controllers, the frequency deviation when the industrial load is connected to the microgrid at 200 s is about −0.75 Hz. The frequency in the case of the conventional virtual inertia controller is oscillating more than in the case of fuzzy logic systembased virtual inertia controller. It is clearly seen that the proposed MPC-based virtual inertia controller can maintain the frequency deviation within ±0.25 Hz during the connection of the industrial load. Figure 16 shows virtual inertia power produced by the four methods. Despite the situation of half of default system inertia, the virtual inertia power is greatly discharged by the  Scenario 2B: The microgrid system is assumed to have the default parameters and the microgrid is tested under the situation of half of default system inertia (50% of default system inertia, TMG = 10) with multiple operating conditions of load and wind variations as shown Table 3. The effect of medium system inertia through the proposed virtual inertia controller-based MPC is investigated. Figure 15 shows the frequency deviation of the four methods. It can be seen that the frequency is fluctuating more with high deviation in this scenario. In the case of no virtual inertia controller, the frequency deviation is about −1 Hz when the industrial load is connected to the microgrid at 200 s. In the case of the fuzzy and conventional virtual inertial controllers, the frequency deviation when the industrial load is connected to the microgrid at 200 s is about −0.75 Hz. The frequency in the case of the conventional virtual inertia controller is oscillating more than in the case of fuzzy logic systembased virtual inertia controller. It is clearly seen that the proposed MPC-based virtual inertia controller can maintain the frequency deviation within ±0.25 Hz during the connection of the industrial load. Figure 16 shows virtual inertia power produced by the four methods. Despite the situation of half of default system inertia, the virtual inertia power is greatly discharged by the Scenario 2B: The microgrid system is assumed to have the default parameters and the microgrid is tested under the situation of half of default system inertia (50% of default system inertia, T MG = 10) with multiple operating conditions of load and wind variations as shown Table 3. The effect of medium system inertia through the proposed virtual inertia controller-based MPC is investigated. Figure 15 shows the frequency deviation of the four methods. It can be seen that the frequency is fluctuating more with high deviation in this scenario. In the case of no virtual inertia controller, the frequency deviation is about −1 Hz when the industrial load is connected to the microgrid at 200 s. In the case of the fuzzy and conventional virtual inertial controllers, the frequency deviation when the industrial load is connected to the microgrid at 200 s is about −0.75 Hz. The frequency in the case of the conventional virtual inertia controller is oscillating more than in the case of fuzzy logic system-based virtual inertia controller. It is clearly seen that the proposed MPC-based virtual inertia controller can maintain the frequency deviation within ±0.25 Hz during the connection of the industrial load. Figure 16 shows virtual inertia power produced by the four methods. Despite the situation of half of default system inertia, the virtual inertia power is greatly discharged by the proposed MPC-based controller. These results imply that the MPC-based virtual inertia controller is robust to compensate wind power and load variations under reduced system inertia condition. proposed MPC-based controller. These results imply that the MPC-based virtual inertia controller is robust to compensate wind power and load variations under reduced system inertia condition.  Scenario 2C: The robustness of the proposed MPC-based virtual inertia controller is tested in the extreme scenario. Both the thermal generation governor and turbine time constants are increased to Tg = 0.19 s and Tt = 5.5 s (this can happen in case of off-line change of the practical turbine and governor, while the controller keeps the nominal values of these parts), which means the thermal generation unit is changed to unstable mode. The system inertia is changed from medium to low system inertia (TMG = 5). The microgrid is operated in several different operating conditions of load and wind power changes as shown in Table 3. Figure 17 shows that the virtual inertia power is greatly discharged by the proposed MPC-based controller under the severe condition of uncertainties. Figure  18 shows the frequency deviation of the four methods. In the case of no virtual inertia controller, the microgrid becomes unstable and frequency performance cannot hold against high fluctuation of wind power and loads. In the case of the fuzzy logic and conventional virtual inertia controllers, frequency is fluctuating more and yields large frequency transient compared with the proposed MPC-based controller. At this severe condition of uncertainties, the proposed MPC-based virtual inertia controller could maintain stable frequency response and yields small frequency transient compared with the other comparative methods. Hence, these results confirm that the MPC-based virtual inertia controller is very robust for frequency control in a system with high fluctuation of wind power and load under the critical situation of low system inertia. Scenario 2C: The robustness of the proposed MPC-based virtual inertia controller is tested in the extreme scenario. Both the thermal generation governor and turbine time constants are increased to T g = 0.19 s and T t = 5.5 s (this can happen in case of off-line change of the practical turbine and governor, while the controller keeps the nominal values of these parts), which means the thermal generation unit is changed to unstable mode. The system inertia is changed from medium to low system inertia (T MG = 5). The microgrid is operated in several different operating conditions of load and wind power changes as shown in Table 3. Figure 17 shows that the virtual inertia power is greatly discharged by the proposed MPC-based controller under the severe condition of uncertainties. Figure 18 shows the frequency deviation of the four methods. In the case of no virtual inertia controller, the microgrid becomes unstable and frequency performance cannot hold against high fluctuation of wind power and loads. In the case of the fuzzy logic and conventional virtual inertia controllers, frequency is fluctuating more and yields large frequency transient compared with the proposed MPC-based controller. At this severe condition of uncertainties, the proposed MPC-based virtual inertia controller could maintain stable frequency response and yields small frequency transient compared with the other comparative methods. Hence, these results confirm that the MPC-based virtual inertia controller is very robust for frequency control in a system with high fluctuation of wind power and load under the critical situation of low system inertia. Scenario 2C: The robustness of the proposed MPC-based virtual inertia controller is tested in the extreme scenario. Both the thermal generation governor and turbine time constants are increased to Tg = 0.19 s and Tt = 5.5 s (this can happen in case of off-line change of the practical turbine and governor, while the controller keeps the nominal values of these parts), which means the thermal generation unit is changed to unstable mode. The system inertia is changed from medium to low system inertia (TMG = 5). The microgrid is operated in several different operating conditions of load and wind power changes as shown in Table 3. Figure 17 shows that the virtual inertia power is greatly discharged by the proposed MPC-based controller under the severe condition of uncertainties. Figure  18 shows the frequency deviation of the four methods. In the case of no virtual inertia controller, the microgrid becomes unstable and frequency performance cannot hold against high fluctuation of wind power and loads. In the case of the fuzzy logic and conventional virtual inertia controllers, frequency is fluctuating more and yields large frequency transient compared with the proposed MPC-based controller. At this severe condition of uncertainties, the proposed MPC-based virtual inertia controller could maintain stable frequency response and yields small frequency transient compared with the other comparative methods. Hence, these results confirm that the MPC-based virtual inertia controller is very robust for frequency control in a system with high fluctuation of wind power and load under the critical situation of low system inertia.  Additionally, in order to investigate the effectiveness of the proposed MPC-based virtual inertia controller, the mean absolute frequency deviations when system inertia is set as high, medium, and low are carried out as shown in Table 4. When the system inertia decreases, the maximum frequency deviation of the microgrid is increased. However, the proposed MPC-based virtual inertia controller is able to maintain the frequency deviation better than the comparative methods. Additionally, in order to investigate the effectiveness of the proposed MPC-based virtual inertia controller, the mean absolute frequency deviations when system inertia is set as high, medium, and low are carried out as shown in Table 4. When the system inertia decreases, the maximum frequency deviation of the microgrid is increased. However, the proposed MPC-based virtual inertia controller is able to maintain the frequency deviation better than the comparative methods.

Conclusions
In a system with high integration of RESs and continuous load disturbances, the virtual inertia system might not stable and cannot maintain and stabilize the frequency deviation within the desirable frequency performance, leading to instability and system collapse. In this paper, MPC is applied for the virtual inertia control for microgrid frequency stabilization during high integration of RES and fluctuating load disturbances. The proposed MPC-based virtual inertia control has been tested for several mismatched parameters of the microgrid, wind power, and load disturbances. Simulation results show that the proposed MPC-based virtual inertia control is robust against the parameter perturbation of the system and has desirable performance in comparison to fuzzy logic and conventional virtual inertia control designs in all of the performed test scenarios. It is concluded that the proposed MPC-based virtual inertia control is able to reduce and stabilize frequency deviation of the microgrid and gives robustness to the system subjected to uncertainties and disturbances over the fuzzy logic and conventional virtual inertia systems, thus significantly enhancing the stability and resiliency of the microgrid. Such a promising result provides a clear perspective on utilizing robust but simple methods for virtual inertia control. For further work, as the virtual inertia system is designed by utilizing the energy storage systems, the analysis of energy storage sizes and costs based on the existing technologies will be evaluated for optimum microgrid investments and operations.
In this study, the input power variability of the domestic load in the microgrid is evaluated by considering the deviation from the initial value as shown in Figure A1. The standard deviation is multiplied by the random output fluctuation delivered from the white noise block in MATLAB/Simulink ® to generate the random power fluctuation on the domestic load profile in Figure 12. The load deviation is simulated close to an actual load change pattern by the following function [29,30]: Figure A1. Domestic load model [29,30].