Provision of Frequency Stability of an Islanded Microgrid Using a Novel Virtual Inertia Control and a Fractional Order Cascade Controller

: Nowadays, the renewable energy sources in microgrids (MGs) have high participation to supply the consumer’s demand. In such MGs, the problems such as the system frequency stability, inertia, and damping reduction are threatened. To overcome this challenge, employing the virtual inertia control (VIC) concept in the MG structure could be considered as a viable solution to improve the system frequency response. Hence, this work proposes a novel modeling for VIC in an islanded MG that provides simultaneous emulation of the primary frequency control, virtual inertia, and damping. To show the efﬁciency of the proposed technique, a comparison is made between the dynamic performance of the proposed VIC and conventional VIC under different scenarios. The results indicate that the proposed VIC presents superior frequency performance in comparison with conventional VIC. In addition to VIC modeling, a new cascade controller based on three-degrees of freedom and fractional-order controllers (FOCs) is proposed as an MG secondary controller. The effectiveness of the proposed controller is compared to tilt-integral-derivative and FO proportional-integral-derivative controllers. The Squirrel search algorithm is utilized to obtain the optimal coefﬁcients of the controllers. The results demonstrate that the proposed controller improves the MG frequency performance over other controllers. Eventually, the sensitivity analysis is performed to investigate the robustness of the proposed controller in the face of the variations of the parameters. power and demand occurs, the system damping, inertia response, and primary frequency control are lowered, and MG frequency stability is threatened. To meet these challenges, this paper presented a novel modeling for VIC and a cascade controller based on a combination of the FOCs and 3DOF as a secondary controller. The proposed modeling for VIC simulates the primary frequency control, virtual inertia, and damping, simultaneously. To evaluate the dynamic efﬁciency of the proposed VIC modeling, its performance was compared with the conventional VIC under different disturbances and operating conditions. The results clearly showed that the proposed VIC signiﬁcantly improved the MG frequency performance in comparison with the conventional VIC. In order to investigate the effectiveness of the proposed controller, the dynamic performance of this controller was compared with the TID and FOPID controllers. Additionally, the SSA was utilized to optimize the adjustable coefﬁcients of the considered controllers. The simulation results indicated that the proposed controller provided much better frequency responses in comparison with the TID and FOPID controllers. Eventually, the sensitivity analysis was performed to study the efﬁciency of the proposed controller in the face of uncertainties of MG coefﬁcients. The results illustrated that the proposed controller is robust versus the uncertainties of the coefﬁcients.


Introduction
Nowadays, the focus on renewable energy sources (RESs) is increasing as a suitable alternative to replace the traditional power plants because of the shortage of fossil fuel resources, economic costs, and environmental problems. Microgrid (MG) is the integration of a number of RESs/distributed generators (DGs), such as wind turbine generators (WTG), diesel engine generators (DEG), photovoltaic (PV), fuel cell (FC), microturbine (MT), and energy storage systems (ESSs), such as battery ESS (BESS) and flywheel ESS (FESS), along with the loads. The weather conditions have a direct impact on the generation power of the RESs. Due to the intermittent nature of the RESs, it is necessary to utilize the ESSs in the MGs [1,2]. In [3], the authors proposed an energy planning model to analyze the different future energy scenarios in the islanded systems. To validate the proposed model, the authors considered the indices of total primary energy supply and CO 2 emission. The authors in [4] showed that the natural gas systems coupled with electricity can improve presence of disturbance inputs [28,29]. The authors in [28] presented a PID controller based on 3DOF as a secondary controller to solve the automatic generation control (AGC) problem in interconnected power systems.
Nowadays, the complexities of the MGs are increasing, and it is clear that the classical controllers cannot present appropriate performance against sudden changes in load and generation. As a solution to this challenge, the cascade controllers are introduced [30]. To improve the system performance, the cascade controllers employ two feedback control loops in their structure. The advantages of cascade controllers compared to controllers with one feedback control loop are presented in [30]. Additionally, the authors in [30] propose the application of the cascade tilt-integral-tilt-derivative controller to improve the frequency regulation of the power grid. In [31], the performance of a cascade fuzzy PID-FOI controller is evaluated to improve the AGC of the power grids. Authors in [32] present an FO-based cascade controller as a secondary controller of an interconnected power system. In [29], a cascade controller based on 2DOF, named a 2DOF-PI&FOPD controller, is employed as a secondary controller of an interconnected power grid.
According to the aforementioned discussions, employing a cascade controller based on FOCs and 3DOF has not been addressed yet. Accordingly, this work proposes a novel cascade controller based on 3DOF-tilt-integral-derivative (3DOF-TID) and fractional-order proportional-integral-derivative (FOPID) controllers as a secondary controller. The squirrel search algorithm (SSA) is utilized to obtain the optimal coefficients of the considered controller.
The contributions of this study are summarized as: • A novel modeling for VIC is presented that provides simultaneous emulation of the PFC, VI, and VD to improve the MG frequency response.

•
The dynamic efficiency of the proposed VIC is compared with conventional VIC under different scenarios. • A novel cascade controller based on FOCs and 3DOF, named the 3DOF-TID&FOPID controller, is proposed as a secondary frequency controller.

•
The SSA is employed to obtain the optimal values of the proposed controller.

•
The sensitivity analysis is performed to evaluate the performance of the proposed controller versus the changes of the system parameters.
The remainder of this article is as follows: In Section 2, the MG dynamic modeling based on frequency regulation is explained. Moreover, Section 2 presents the proposed VIC modeling for BESS. In Section 3, the design process of the proposed cascade 3DOF TID&FOPID controller as an MG secondary controller is investigated. Section 4 explains the optimization problem formulation to obtain the suitable coefficients of the proposed controller. The simulation results are discussed in Section 5. Eventually, the conclusion of the paper is presented in Section 6. Figure 1 demonstrates the configuration of the studied islanded MG for this work. According to Figure 1, the investigated MG includes several kinds of generation resources, such as WTG, PV panel, FC, conventional DEG, BESS, and FESS, along with the load. As illustrated in Figure 1, the DGs/RESs are connected to the MG via power electronic-based interfaces. WTG and PV do not take part in the frequency control. Hence, the generation power of these resources will change the MG operating point. This condition significantly affects the MG frequency regulation. Therefore, ESSs are installed in MG. Here, BESS is equipped with the VIC. The communication lines of the green (dashed line) and the red (dotted line) in Figure 1 are utilized for exchanging information and control instructions, such as inertia response, primary control, and secondary control. The power line of black (solid line) is utilized for exchanging the required power.

Microgrid Modeling
The frequency stability depends on the power balance between generation supply and demand. When the imbalance occurs, the MG frequency deviates from the nominal value. Hence, the MG control center is responsible for restoring the rebalance between generation power and demand. In order to analyze the frequency stability issue, the dynamic model of the islanded MG is shown in Figure 2. The VIC is constructed for BESS. The WTG and PV do not take part in the frequency regulation problem. Therefore, the powers of WTG, PV, and load are considered as the perturbations of the investigated MG. However, the sources of the DEG and FC contribute to control the MG frequency. Hence, it is necessary to employ a proper control strategy in MG. In this work, a novel controller based on the combination of the 3DOF, cascade, and FO controllers, named as the 3DOF-TID&FOPID cascade controller, is proposed as a secondary controller.

Microgrid Modeling
The frequency stability depends on the power balance between generation supply and demand. When the imbalance occurs, the MG frequency deviates from the nominal value. Hence, the MG control center is responsible for restoring the rebalance between generation power and demand. In order to analyze the frequency stability issue, the dynamic model of the islanded MG is shown in Figure 2. The VIC is constructed for BESS. The WTG and PV do not take part in the frequency regulation problem. Therefore, the powers of WTG, PV, and load are considered as the perturbations of the investigated MG. However, the sources of the DEG and FC contribute to control the MG frequency. Hence, it is necessary to employ a proper control strategy in MG. In this work, a novel controller based on the combination of the 3DOF, cascade, and FO controllers, named as the 3DOF-TID&FOPID cascade controller, is proposed as a secondary controller.

Microgrid Modeling
The frequency stability depends on the power balance between generation supply and demand. When the imbalance occurs, the MG frequency deviates from the nominal value. Hence, the MG control center is responsible for restoring the rebalance between generation power and demand. In order to analyze the frequency stability issue, the dynamic model of the islanded MG is shown in Figure 2. The VIC is constructed for BESS. The WTG and PV do not take part in the frequency regulation problem. Therefore, the powers of WTG, PV, and load are considered as the perturbations of the investigated MG. However, the sources of the DEG and FC contribute to control the MG frequency. Hence, it is necessary to employ a proper control strategy in MG. In this work, a novel controller based on the combination of the 3DOF, cascade, and FO controllers, named as the 3DOF-TID&FOPID cascade controller, is proposed as a secondary controller.   The relation between MG frequency deviation and inertia constant is denoted as follows: where ∆P m and ∆P L are the generation and load power changes of the MG, respectively. M and D denote the inertia and damping constants of the MG, respectively. According to Figure 2, T PV , T WTG , T FC , T FESS , and T BESS show the time constants of the PV, WTG, FC, FESS, and BESS, respectively. K PV and K WTG express the gains of the PV and WTG, respectively. T g and T t are the governor and turbine time constants of DEG, respectively. R is the coefficient of the DEG governor speed regulation. Additionally, T IN and T IC indicate the time constants of the inverter and interconnector, respectively. The values of the investigated MG parameters are provided in Appendix A.

Modeling of the Proposed Virtual Inertia Control for BESS
VIC is an efficient solution to emulate the characteristics of the SG inertia and improve the stability of the low-inertia MG. The main idea to emulate the VIC is the derivative technique, in which its structure for BESS is depicted in Figure 3a. The derivative technique evaluates the rate of change of frequency (ROCOF) to adjust the active power of BESS to the system set-point value during perturbations. Due to the hypersensitivity of the derivative control to noise, a low-pass filter is employed in the control system. To limit the maximum and minimum energy capacity of the BESS, the limiter block is considered for BESS. The BESS power based on conventional VIC is represented as: where K VI denotes the gain of the VI and ∆ f is the frequency deviation of the MG.

The Proposed Cascade Controller Based on 3DOF and FOCs in the MG Structure
As mentioned, it is necessary to design a suitable control strategy in the MG secondary control loop to dampen the frequency fluctuations and improve the frequency regulation of the islanded MG. Hence, a novel FO cascade controller based on 3DOF, named as the 3DOF-TID&FOPID cascade controller, for the MG secondary controller is proposed. This section is divided into two subsections, the design of the cascade controller based on fractional-order and the design of the 3DOF-based TID controller.

Design of the Fractional-Order Cascade Controller
The combination concept of the cascade controller and FOCs is known as FOCC. FOCs expand IOC to a FO operator ( ). It can be defined mathematically as: This study proposes novel modeling for VIC to improve the MG frequency response. The block diagram of the proposed VIC is depicted in Figure 3b. According to Figure 3b, the proposed VIC emulates the features of the VI, VD, and PFC, simultaneously. The proposed VIC provides the VI and VD in positions of low inertia and damping when the penetration of the RESs increases. The VI part assigns the ROCOF to modify the added active power to the MG set-point value during contingencies. The VD part in the proposed VIC is developed to stabilize the time based on MG frequency change. Moreover, the proposed VIC simulates the PFC through droop control. Accordingly, the proposed VIC technique is capable of participating in improving the MG frequency regulation. This technique can play the role of a supporter for the conventional SGs. Considering the characteristics of the proposed VIC, it can be said that the proposed VIC can improve the MG frequency performance more than the conventional VIC during contingencies. The BESS power based on the proposed VIC is represented as: where R BESS and D VI show the droop and VD of the proposed VIC, respectively. The values of the R BESS and D VI are equal to 0.001 and 3.5, respectively.

The Proposed Cascade Controller Based on 3DOF and FOCs in the MG Structure
As mentioned, it is necessary to design a suitable control strategy in the MG secondary control loop to dampen the frequency fluctuations and improve the frequency regulation of the islanded MG. Hence, a novel FO cascade controller based on 3DOF, named as the 3DOF-TID&FOPID cascade controller, for the MG secondary controller is proposed. This section is divided into two subsections, the design of the cascade controller based on fractional-order and the design of the 3DOF-based TID controller.

Design of the Fractional-Order Cascade Controller
The combination concept of the cascade controller and FOCs is known as FOCC. FOCs expand IOC to a FO operator (aD α t ). It can be defined mathematically as: where a and t show the operating limits, and α denotes the order of integration. There are manners such as Riemann-Liouville (R-L), Grünwald-Letnikov (G-L), Riesz, and Caputo in the literature to definite the fractional calculus process, of which the R-L definition is more common than the others [27,32,33]. The R-L definition can be found in [27,32,33]. FOPID and TID controllers are two main types of FOCs. Generally, the transfer functions of the FOPID and TID controllers are presented by: where K P , K I , K T , and K D indicate the adjustable proportional, integral, tilt, and derivative coefficients, respectively. λ λand µµ show the integral and derivative fractional-order operators of the FOPID controller in the range of (0, 1), respectively. n shows the FO operator of the tilt term of the TID controller, which is determined in the range of (2, 3) from the beginning of the optimization. In this study, n = 3 is considered. The FOPID and TID controllers in comparison with the PID controller have two more degrees and one more degree of freedom, respectively. Hence, these controllers can improve overshoot, settling time, and noise rejection in comparison with the IOCs. In this study, for FOPID and TID applications, the fifth-order Oustaloup's rational recursive approximation is considered in the frequency range of ω ∈∈ (0.01, 100). The concept of cascade control is originated from the control of two sequential processes. This controller is mostly utilized for rejecting the perturbation in a comparatively faster method before transmitting it to other parts of the plant. In comparison with the single-loop control, employing the cascade control can enhance the efficiency of the con- trol system [30][31][32]. The block diagram of the cascade control is illustrated in Figure 4. According to Figure 4, in the structure of the cascade control, there are two control loops of C 1 (s) and C 2 (s), which show the transfer functions of the master and slave controllers, respectively. G 1 (s) and G 2 (s) are the transfer functions of the outer and inner loop plants, respectively. Y(s) is the final output of the system. The outer loop controls the final output quality to achieve a reference signal R(s) [30,31]. The equation of the outer loop is expressed by: where D 1 (s) and U 1 (s) are load disturbance and outer process input, respectively. U 1 (s) is the input of the outer loop, U 1 (s) = y 2 (s).
applications, the fifth-order Oustaloup's rational recursive approximation is considered in the frequency range of ω ∈ (0.01, 100). The concept of cascade control is originated from the control of two sequential processes. This controller is mostly utilized for rejecting the perturbation in a comparatively faster method before transmitting it to other parts of the plant. In comparison with the single-loop control, employing the cascade control can enhance the efficiency of the control system [30][31][32]. The block diagram of the cascade control is illustrated in Figure 4. According to Figure 4, in the structure of the cascade control, there are two control loops of C1(s) and C2(s), which show the transfer functions of the master and slave controllers, respectively. G1(s) and G2(s) are the transfer functions of the outer and inner loop plants, respectively. Y(s) is the final output of the system. The outer loop controls the final output quality to achieve a reference signal R(s) [30,31]. The equation of the outer loop is expressed by: where D1(s) and U1(s) are load disturbance and outer process input, respectively. U1(s) is the input of the outer loop, U1(s) = y2(s).

R(s) D(s) Y(s) Master Controller
Slave Controller

Inner loop
Outer loop The output of the inner loop provides the outer loop in sequence and reduces the effect of any perturbation. The equation of the inner loop is represented by (9): where U2(s) is the input of the inner loop.

Design of the 3DOF-Based TID Controller
The description of the DOF in a control system is the regulation of the number of closed-loop transfer functions, independently. The advantages of 2DOF-based control systems over 1DOF are reported in [28]. In this paper, the 3DOF-based control system for TID is considered. The different components for designing the 3DOF controller are as follows: (i) closed-loop stability, (ii) appointing the closed-loop response, and (iii) perturbation elimination [28]. The structure of the 3DOF controller is depicted in Figure 5. According to Figure 5, R(s) is the input reference signal, K(s) shows the feedback from the output of the considered system, P(s) is the model of the plant, J(s) is the 1DOF controller, D(s) indicates the load disturbance, and RC(s) and FFC(s) are the controllers of the input reference and feed-forward, respectively. The block diagram of the 3DOF-TID controller is illustrated in Figure 6. The closed-loop equation for the 3DOF-TID controller is represented by (10): where J(s) provides closed-loop stability, and J(s) and RC(s) stabilize the quality of the static and dynamic of the output Y(s)/R(s), respectively. Satisfying (11) leads to the removal of the D(s) via the feed-forward controller FFC(s): The output of the inner loop provides the outer loop in sequence and reduces the effect of any perturbation. The equation of the inner loop is represented by (9): where U 2 (s) is the input of the inner loop.

Design of the 3DOF-Based TID Controller
The description of the DOF in a control system is the regulation of the number of closed-loop transfer functions, independently. The advantages of 2DOF-based control systems over 1DOF are reported in [28]. In this paper, the 3DOF-based control system for TID is considered. The different components for designing the 3DOF controller are as follows: (i) closed-loop stability, (ii) appointing the closed-loop response, and (iii) perturbation elimination [28]. The structure of the 3DOF controller is depicted in Figure 5. According to Figure 5, R(s) is the input reference signal, K(s) shows the feedback from the output of the considered system, P(s) is the model of the plant, J(s) is the 1DOF controller, D(s) indicates the load disturbance, and R C (s) and FF C (s) are the controllers of the input reference and feed-forward, respectively. The block diagram of the 3DOF-TID controller is illustrated in Figure 6. The closed-loop equation for the 3DOF-TID controller is represented by (10): where J(s) provides closed-loop stability, and J(s) and R C (s) stabilize the quality of the static and dynamic of the output Y(s)/R(s), respectively. Satisfying (11) leads to the removal of the D(s) via the feed-forward controller FF C (s): In this study, the 3DOF-TID and FOPID controllers are combined to form a cascade controller as the MG secondary controller, where 3DOF-TID and FOPID controllers are C1(s) and C2(s), respectively. C1(s) and C2(s) are represented by (12) and (13) respectively, as: Thus, the closed loop transfer function which evaluates the overall performance of the cascaded system is provided by (14): In this study, the 3DOF-TID and FOPID controllers are combined to form a cascade controller as the MG secondary controller, where 3DOF-TID and FOPID controllers are C1(s) and C2(s), respectively. C1(s) and C2(s) are represented by (12) and (13) respectively, as: Thus, the closed loop transfer function which evaluates the overall performance of the cascaded system is provided by (14): Hence, it is necessary to update the FF C (s) parameter due to the changing J(s) parameter. In this study, the 3DOF-TID and FOPID controllers are combined to form a cascade controller as the MG secondary controller, where 3DOF-TID and FOPID controllers are C 1 (s) and C 2 (s), respectively. C 1 (s) and C 2 (s) are represented by (12) and (13) respectively, as: Thus, the closed loop transfer function which evaluates the overall performance of the cascaded system is provided by (14): To complete the proposed controller design, the adjustable, gains, set-points of the 3DOF, orders of the tilt, integral, and derivative are simultaneously optimized via SSA. Figure 7 demonstrates the structure of the proposed 3DOF-TID&FOPID cascade controller.
To complete the proposed controller design, the adjustable, gains, set-points of the 3DOF, orders of the tilt, integral, and derivative are simultaneously optimized via SSA.

Optimization Method to Obtain the Optimal Coefficients of the Proposed Controller
To evaluate the efficiency of the proposed 3DOF-TID&FOPID controller, considering a suitable objective function is necessary. In this study, the objective function of the integral of time multiplied squared error (ITSE) is considered as a constrained optimization problem, as follows [26,27]: Objective Function: where in this paper, Decision Variables: , , , , , , , , Subject to: where Tsim and ∆f show the simulation time and MG frequency deviation, respectively. It should be mentioned that the SSA is utilized to achieve the suitable coefficients of the controller subject to the constraints.

Optimization Method to Obtain the Optimal Coefficients of the Proposed Controller
To evaluate the efficiency of the proposed 3DOF-TID&FOPID controller, considering a suitable objective function is necessary. In this study, the objective function of the integral of time multiplied squared error (ITSE) is considered as a constrained optimization problem, as follows [26,27]: Objective Function: where in this paper, Decision Variables: Subject to: where T sim and ∆f show the simulation time and MG frequency deviation, respectively. It should be mentioned that the SSA is utilized to achieve the suitable coefficients of the controller subject to the constraints.

Squirrel Search Algorithm (SSA)
SSA is a swarm intelligence technique based on the developed population recently introduced by Jain [34]. This optimization technique is originated from the dynamic scavenging behavior of southern flying squirrels and an effective moving pattern known as gliding. Gliding is an efficient mechanism utilized by small mammals for food collection in a large region. During warm weather, the squirrels eat acorn nuts. Then, they search for hickory nuts and store them for winter. During cold weather, the activities of the squirrels decrease, and they preserve daily energy needs with the storage of hickory nuts. The framework of the SSA technique is as follows [34,35].
Define the input parameters of the SSA: The following parameters are regulated at the beginning of the SSA process: Iter max (maximum number of iteration), NP (the population size), n (the number of decision variables), P dp (the predator attendance probability), sf (the scaling factor), G c (the gliding constant), and FS U and FS L (the upper and lower bounds for each decision variable).
Allocate the initial location for the flying squirrels randomly: The initial location of the flying squirrels are randomly allocated as: The random number U(0, 1) is set within the range [0, 1]. FS i,j shows the jth of the ith flying squirrel.
Evaluate the fitness of location of flying squirrels: The fitness value for the location of each flying squirrel is computed by putting the decision variables' value into a fitness function, and the fitness value related to the location of each flying squirrel is stored from the minimum value to the maximum value in the following array: . . .
The fitness value corresponding to the location of each flying squirrel shows the quality of food sources defined by it, i.e., hickory nut tree FS ht (location of the best food source), acorn nuts tree FS at (location of the normal food source), and normal tree FS nt .
Create new locations: According to the above-mentioned facts, three cases may happen subsequent to the dynamic scavenging of flying squirrels.
Case 1: Flying squirrels at FS at may move towards FS ht . Therefore, the new locations of flying squirrels can be calculated as: The random number, R 1 , is set within the range [0, 1] and t indicates the current iteration.
Case 2: Some flying squirrels at FS nt may move towards FS at to provide their energy requirements. Hence, the new locations of flying squirrels can be generated as: Similar to R 1 , R 2 is set within the range [0, 1]. Case 3: Some flying squirrels at FS nt may move towards FS ht to reserve the hickory nuts, which are useful when food sources are in shortage.
where R 3 is a random number within [0, 1]. In all cases, the values of P dp and G c are considered to be 0.1 and 1.9, respectively. d g shows random gliding distance, which can be obtained as [35]: The values of h g and sf are 8 and 18, respectively. tan (ϕ) shows the gliding angle, obtained as follows: where D and L represent the drag and lift force, obtained as: Evaluate the seasonal supervising situation: Seasonal variations significantly influence the foraging behavior of the flying squirrels [34,35]. Thus, it is necessary to consider a seasonal supervising condition in the method in order to save the results from being trapped in local solutions.
The computation of the seasonal constant (S C ) and corresponding minimum value are as follows: In case S t c < S c min , the winter season is ended, and the flying squirrels which are not able to find the food during the winter season will relocate their situations for searching the food source: where Lévy distribution is an efficient mathematical instrument to improve the global exploration of search space:Ĺ where r a and r b show the two normally distributed random numbers which are set in the range of [0, 1], β is a constant (here, β = 1.5), and σ is calculated by (32): where Γ(x) = (x − 1)!.
Stop criterion: The algorithm finishes if t = iter max . Figure 8 shows the flowchart of SSA. The optimal coefficients of the controllers are presented in Table 1. In [34,35], the efficiency of SSA is compared with grey wolf optimization (GWO), genetic algorithm (GA), firefly algorithm (FA), artificial bee colony (ABC) algorithm, bat algorithm (BA), particle swarm optimization (PSO), differential evolution (DE), and evolutionary programming (EP). The results indicated that SSA has the capability to bestow with better-quality solutions than other optimization algorithms.

Simulation Results
To investigate the efficiency of the proposed secondary controller and VIC, an islanded MG according to Figure 2 is considered. The simulation results and analyses were accomplished using MATLAB/Simulink software(R2019a, version 9.6.0.1072779). The simulation studies are divided into three subsections. In the first subsection, the frequency performance of the proposed 3DOF-TID&FOPID cascade controller is evaluated and compared to TID and FOPID controllers under different load disturbances. The second subsection focuses on the dynamic performance of the proposed VIC-based BESS. To examine the efficiency of the proposed VIC-based BESS, the results have been compared with the conventional VIC-based BESS under different scenarios. Finally, the sensitivity analysis is carried out in the third subsection for the investigated MG by employing the proposed 3DOF-TID&FOPID cascade controller under ±25% changes in the parameters of Tg and TFC. Moreover, the sensitivity of the frequency deviation w.r.t. L(s) is investigated in the third subsection.

Impact of the 3DOF-TID&FOPID Cascade Controller on MG Frequency Performance
This subsection aims to evaluate the efficiency of the proposed controller as a secondary controller of the islanded MG. To evaluate the efficiency of the proposed controller, the simulation results are compared with TID and FOPID controllers under scenarios of step load deviation, a sequence of step load changes, and random load change. In this subsection, BESS is modeled by using conventional VIC.

Step Load Change
In this scenario, a 20% step load deviation in time = 0 s is applied to the islanded MG without the presence of the WTG and PV. Figure 9 shows the frequency responses of the  Table 1. The values of optimal parameters of considered controllers using SSA.

Simulation Results
To investigate the efficiency of the proposed secondary controller and VIC, an islanded MG according to Figure 2 is considered. The simulation results and analyses were accomplished using MATLAB/Simulink software(R2019a, version 9.6.0.1072779). The simulation studies are divided into three subsections. In the first subsection, the frequency performance of the proposed 3DOF-TID&FOPID cascade controller is evaluated and compared to TID and FOPID controllers under different load disturbances. The second subsection focuses on the dynamic performance of the proposed VIC-based BESS. To examine the efficiency of the proposed VIC-based BESS, the results have been compared with the conventional VIC-based BESS under different scenarios. Finally, the sensitivity analysis is carried out in the third subsection for the investigated MG by employing the proposed 3DOF-TID&FOPID cascade controller under ±25% changes in the parameters of T g and T FC . Moreover, the sensitivity of the frequency deviation w.r.t. L(s) is investigated in the third subsection.

Impact of the 3DOF-TID&FOPID Cascade Controller on MG Frequency Performance
This subsection aims to evaluate the efficiency of the proposed controller as a secondary controller of the islanded MG. To evaluate the efficiency of the proposed controller, the simulation results are compared with TID and FOPID controllers under scenarios of step load deviation, a sequence of step load changes, and random load change. In this subsection, BESS is modeled by using conventional VIC.

Step Load Change
In this scenario, a 20% step load deviation in time = 0 s is applied to the islanded MG without the presence of the WTG and PV. Figure 9 shows the frequency responses of the studied MG using the TID, FOPID, and 3DOF-TID&FOPID controllers. It is clear from Figure 9 that the frequency oscillations are eliminated faster using the proposed controller in comparison with TID and FOPID controllers. Moreover, Table 2 displays the dynamic characteristics of the considered controllers in terms of the maximum frequency deviation peak (MP), peak time (PT), and ITSE index. According to Table 2, it is obvious that the proposed controller has a lower MP, PT, and ITSE than other controllers. Hence, it can be said that the proposed controller provides better frequency performance than other controllers.
Energies 2021, 14, x FOR PEER REVIEW 13 of 23 studied MG using the TID, FOPID, and 3DOF-TID&FOPID controllers. It is clear from Figure 9 that the frequency oscillations are eliminated faster using the proposed controller in comparison with TID and FOPID controllers. Moreover, Table 2 displays the dynamic characteristics of the considered controllers in terms of the maximum frequency deviation peak (MP), peak time (PT), and ITSE index. According to Table 2, it is obvious that the proposed controller has a lower MP, PT, and ITSE than other controllers. Hence, it can be said that the proposed controller provides better frequency performance than other controllers.

A Sequence of Step Load Changes
In this scenario, a sequence of step load changes according to Figure 10a is applied to MG. Figure 10b,c show the output powers of the WTG and PV, respectively. The resulted frequency responses for this scenario are depicted in Figure 10d. With respect to Figure 10d, it can be obvious that the amplitude of the frequency fluctuations is significantly reduced by employing the proposed controller compared to other controllers. Therefore, like the previous scenario, it can be concluded that by employing the proposed controller as a secondary controller, the MG becomes stable faster than with the other controllers.

Random Load Change
To further investigate the effectiveness of the proposed control strategy, a disturbance according to Figure 11a is applied to MG. Additionally, Figure 11b,c exhibit the output power changes of WTG and PV, respectively. The results are indicated in Figure 11d. Obviously, the proposed controller provides lower fluctuation amplitude than the other controllers.
From this subsection, it can be inferred that the proposed controller has better capability in capturing the load level uncertainties to generate the control command signals compared to the other controllers.

A Sequence of Step Load Changes
In this scenario, a sequence of step load changes according to Figure 10a is applied to MG. Figure 10b,c show the output powers of the WTG and PV, respectively. The resulted frequency responses for this scenario are depicted in Figure 10d. With respect to Figure 10d, it can be obvious that the amplitude of the frequency fluctuations is significantly reduced by employing the proposed controller compared to other controllers. Therefore, like the previous scenario, it can be concluded that by employing the proposed controller as a secondary controller, the MG becomes stable faster than with the other controllers.

Random Load Change
To further investigate the effectiveness of the proposed control strategy, a disturbance according to Figure 11a is applied to MG. Additionally, Figure 11b,c exhibit the output power changes of WTG and PV, respectively. The results are indicated in Figure 11d. Obviously, the proposed controller provides lower fluctuation amplitude than the other controllers.   From this subsection, it can be inferred that the proposed controller has better capability in capturing the load level uncertainties to generate the control command signals compared to the other controllers.

Impact of the Proposed VIC on MG Frequency Performance
In this subsection, the performance of the proposed VIC under the different operating situations and scenarios is investigated. The dynamic performance of the proposed VIC is compared to the conventional VIC under scenarios of a sequence of step load changes and random load change. In the scenario of the random load change, the performance of the proposed VIC is evaluated in three operating conditions: (1) normal operating condition, (2) 20% reduction in K VI , and (3) 50% reduction in K VI . It should be noted that the proposed 3DOF-TID&FOPID cascade controller is considered as an MG secondary controller.

A Sequence of Step Load Changes
According to Figure 12a, a sequence of step load changes is applied to MG. The variations of the output powers of WTG and PV for this scenario are depicted in Figure 12b,c, respectively. Figure 12d indicates the MG frequency responses by employing conventional and proposed VICs. From Figure 12d, it is evident that the proposed VIC provides better efficiency in damping of the swings and reducing the amplitude of the swings compared to the conventional VIC.

Impact of the Proposed VIC on MG Frequency Performance
In this subsection, the performance of the proposed VIC under the different operating situations and scenarios is investigated. The dynamic performance of the proposed VIC is compared to the conventional VIC under scenarios of a sequence of step load changes and random load change. In the scenario of the random load change, the performance of the proposed VIC is evaluated in three operating conditions: (1) normal operating condition, (2) 20% reduction in KVI, and (3) 50% reduction in KVI. It should be noted that the proposed 3DOF-TID&FOPID cascade controller is considered as an MG secondary controller.

A Sequence of Step Load Changes
According to Figure 12a, a sequence of step load changes is applied to MG. The variations of the output powers of WTG and PV for this scenario are depicted in Figure 12b,c, respectively. Figure 12d indicates the MG frequency responses by employing conventional and proposed VICs. From Figure 12d, it is evident that the proposed VIC provides better efficiency in damping of the swings and reducing the amplitude of the swings compared to the conventional VIC.

Random Load Change
In this scenario, the effectiveness of the proposed VIC-based BESS is evaluated by considering the severe disturbance and high penetration of the WTG and PV under three operating conditions: (1) normal operating condition, (2) 20% reduction in KVI, and (3) 50% reduction in KVI. A severe disturbance for a time interval of 700 s according to Figure 13a is considered. The output powers of the WTG and PV for this scenario are shown in Figure  13b,c, respectively.

Random Load Change
In this scenario, the effectiveness of the proposed VIC-based BESS is evaluated by considering the severe disturbance and high penetration of the WTG and PV under three operating conditions: (1) normal operating condition, (2) 20% reduction in K VI , and (3) 50% reduction in K VI . A severe disturbance for a time interval of 700 s according to Figure 13a is considered. The output powers of the WTG and PV for this scenario are shown in Figure 13b,c, respectively.

Nominal Operating Condition
First, the proposed VIC performance is investigated under normal conditions (the nominal KVI value). The MG frequency responses by employing the conventional and proposed VICs under the normal condition are shown in Figure 14a. As illustrated in Figure  14a, the amplitude of the frequency deviations by using the proposed VIC is significantly reduced in comparison with conventional VIC. According to Figure 14a, due to the connection of PV and WTG to MG at times = 100 and 200 s respectively, it causes the frequency rise of +0.0084 and +0.006 Hz for the case of the conventional VIC, and +0.0047 and +0.0033 Hz for the case of the proposed VIC. Additionally, due to the connection of load disturbance at time = 0 s, disconnection of PV and WTG at times = 500 and 600 s respectively, it results in the frequency drop of -0.0139, −0.0086, and −0.0061 Hz for the case of the conventional VIC, and −0.0078, -0.0046, and −0.0035 Hz for the case of the proposed VIC.

Nominal Operating Condition
First, the proposed VIC performance is investigated under normal conditions (the nominal K VI value). The MG frequency responses by employing the conventional and proposed VICs under the normal condition are shown in Figure 14a. As illustrated in Figure 14a, the amplitude of the frequency deviations by using the proposed VIC is significantly reduced in comparison with conventional VIC. According to Figure 14a negative values show charging and discharging powers. It was found that BESS equipped by the proposed VIC is charged/discharged more than BESS equipped by the conventional VIC in response to applied perturbations. Hence, it can be said that the proposed VIC is superior to the conventional VIC in improving the MG frequency stability.  Figure 14b,c demonstrate the output powers of the conventional VIC-based BESS and proposed VIC-based BESS for normal conditions, respectively. The positive and negative values show charging and discharging powers. It was found that BESS equipped by the proposed VIC is charged/discharged more than BESS equipped by the conventional VIC in response to applied perturbations. Hence, it can be said that the proposed VIC is superior to the conventional VIC in improving the MG frequency stability. Now, the proposed VIC performance is studied under critical conditions, i.e., 20% reduction in KVI value (KVI = 0.8) and 50% reduction in KVI value (KVI = 0.5).  Now, the proposed VIC performance is studied under critical conditions, i.e., 20% reduction in K VI value (K VI = 0.8) and 50% reduction in K VI value (K VI = 0.5).  Figure 15a illustrates the MG frequency responses under the situation of the 20% reduction in K VI value. With respect to this condition, the results show that the BESS based on the proposed VIC is more effective in handling the applied disturbances to MG and damping the frequency deviations in comparison with the BESS based on the conventional VIC. The maximum frequency deviation in the case of the conventional VIC has driven to −0.015 Hz, while for the proposed VIC, the maximum frequency amplitude is −0.0085 Hz. The BESS power changes equipped by conventional and proposed VICs are depicted in Figure 15b,c, respectively. From Figure 15b,c, it is obvious that BESS based on the proposed VIC provides faster and better performance in charging/discharging power than the conventional VIC-based BESS.  Figure 15a illustrates the MG frequency responses under the situation of the 20% reduction in KVI value. With respect to this condition, the results show that the BESS based on the proposed VIC is more effective in handling the applied disturbances to MG and damping the frequency deviations in comparison with the BESS based on the conventional VIC. The maximum frequency deviation in the case of the conventional VIC has driven to −0.015 Hz, while for the proposed VIC, the maximum frequency amplitude is −0.0085 Hz. The BESS power changes equipped by conventional and proposed VICs are depicted in Figure 15b,c, respectively. From Figure 15b,c, it is obvious that BESS based on the proposed VIC provides faster and better performance in charging/discharging power than the conventional VIC-based BESS.

50% Reduction in K VI
To create the scenario more critically, the MG is operated under the situation of a 50% reduction in K VI value and considering high penetration of PV and WTG. Figure 16a indicates the MG frequency responses under this situation. From Figure 16a, it can be concluded that a much better frequency response is obtained from the proposed VICbased BESS. The BESS power changes based on the conventional and proposed VICs are demonstrated in Figure 16b,c, respectively. The comparison of Figure 16b,c clearly illustrates that the proposed VIC-based BESS is efficiently charged/discharged compared to the conventional VIC-based BESS in response to severe perturbations and contingencies. To create the scenario more critically, the MG is operated under the situation of a 50% reduction in KVI value and considering high penetration of PV and WTG. Figure 16a indicates the MG frequency responses under this situation. From Figure 16a, it can be concluded that a much better frequency response is obtained from the proposed VIC-based BESS. The BESS power changes based on the conventional and proposed VICs are demonstrated in Figure 16b,c, respectively. The comparison of Figure 16b,c clearly illustrates that the proposed VIC-based BESS is efficiently charged/discharged compared to the conventional VIC-based BESS in response to severe perturbations and contingencies.

Impact of the Changes of the Parameters on the Proposed 3DOF-TID&FOPID Cascade Controller Performance
This subsection investigates the robustness of the 3DOF-TID&FOPID cascade controller versus the variations of the parameters. Therefore, ±25% changes are applied to the parameters of T g and T FC . The sensitivity analysis is accomplished under a 10% step load perturbation without the presence of PV and WTG. BESS is modeled by using the proposed VIC. Moreover, the adjustable parameters of the proposed 3DOF-TID&FOPID cascade controller are optimized only for the nominal condition. Figure 17a,b demonstrate the frequency responses of the proposed 3DOF-TID&FOPID cascade controller for ±25% changes in parameters of T g and T FC , respectively. As seen, the MG frequency responses under the considered changes are almost identical. The dynamic characteristics for the considered changes are shown in Table 3. According to Table 3, it is obvious that the dynamic characteristics of the MG frequency responses are not affected remarkably after considering such changes. Hence, MG still remains stable.   Now, the sensitivity of frequency response deviation w.r.t. L(s) is investigated. Based on Figure 2, the frequency deviation of MG w.r.t. ∆P L (s) is written as:

Impact of the Changes of the Parameters on the Proposed 3DOF-TID&FOPID Cascade Controller Performance
This subsection investigates the robustness of the 3DOF-TID&FOPID cascade controller versus the variations of the parameters. Therefore, ±25% changes are applied to the parameters of Tg and TFC. The sensitivity analysis is accomplished under a 10% step load perturbation without the presence of PV and WTG. BESS is modeled by using the proposed VIC. Moreover, the adjustable parameters of the proposed 3DOF-TID&FOPID cascade controller are optimized only for the nominal condition. Figure 17a,b demonstrate the frequency responses of the proposed 3DOF-TID&FOPID cascade controller for ±25% changes in parameters of Tg and TFC, respectively. As seen, the MG frequency responses under the considered changes are almost identical. The dynamic characteristics for the considered changes are shown in Table 3. According to Table 3, it is obvious that the dynamic characteristics of the MG frequency responses are not affected remarkably after considering such changes. Hence, MG still remains stable. Now, the sensitivity of frequency response deviation w.r.t. L(s) is investigated. Based on Figure 2, the frequency deviation of MG w.r.t. ∆ ( ) is written as: Then, the sensitivity of the ∆ w.r.t. L(s) can be calculated as: Figure 18 shows the sensitivity of the ∆ w.r.t. L(s). As can be seen, the system has a slight sensitivity to the L(s) in the presence of the proposed controller.
Then, the sensitivity of the ∆ f w.r.t. L(s) can be calculated as: Figure 18 shows the sensitivity of the ∆ f w.r.t. L(s). As can be seen, the system has a slight sensitivity to the L(s) in the presence of the proposed controller.

Conclusions
This paper investigated the frequency regulation problem of the islanded MGs considering high penetration of the RESs. In such MGs, when an imbalance between generation power and demand occurs, the system damping, inertia response, and primary frequency control are lowered, and MG frequency stability is threatened. To meet these challenges, this paper presented a novel modeling for VIC and a cascade controller based on a combination of the FOCs and 3DOF as a secondary controller. The proposed modeling

Conclusions
This paper investigated the frequency regulation problem of the islanded MGs considering high penetration of the RESs. In such MGs, when an imbalance between generation power and demand occurs, the system damping, inertia response, and primary frequency control are lowered, and MG frequency stability is threatened. To meet these challenges, this paper presented a novel modeling for VIC and a cascade controller based on a combination of the FOCs and 3DOF as a secondary controller. The proposed modeling for VIC simulates the primary frequency control, virtual inertia, and damping, simultaneously. To evaluate the dynamic efficiency of the proposed VIC modeling, its performance was compared with the conventional VIC under different disturbances and operating conditions. The results clearly showed that the proposed VIC significantly improved the MG frequency performance in comparison with the conventional VIC. In order to investigate the effectiveness of the proposed controller, the dynamic performance of this controller was compared with the TID and FOPID controllers. Additionally, the SSA was utilized to optimize the adjustable coefficients of the considered controllers. The simulation results indicated that the proposed controller provided much better frequency responses in comparison with the TID and FOPID controllers. Eventually, the sensitivity analysis was performed to study the efficiency of the proposed controller in the face of uncertainties of MG coefficients. The results illustrated that the proposed controller is robust versus the uncertainties of the coefficients.