Optimal Non-Integer Sliding Mode Control for Frequency Regulation in Stand-Alone Modern Power Grids

: In this paper, the concept of fractional calculus (FC) is introduced into the sliding mode control (SMC), named fractional order SMC (FOSMC), for the load frequency control (LFC) of an islanded microgrid (MG). The studied MG is constructed from di ﬀ erent autonomous generation components such as diesel engines, renewable sources, and storage devices, which are optimally planned to beneﬁt customers. The coe ﬃ cients embedded in the FOSMC structure play a vital role in the quality of controller commands, so there is a need for a powerful heuristic methodology in the LFC study to adjust the design coe ﬃ cients in such a way that better transient output may be achieved for resistance to renewable sources ﬂuctuations. Accordingly, the Sine Cosine algorithm (SCA) is e ﬀ ectively combined with the harmony search (HS) for the optimal setting of the controller coe ﬃ cients. The Lyapunov function based on the FOSMC is formulated to guarantee the stability of the LFC mechanism for the test MG. Finally, the hardware-in-the-loop (HIL) experiments are carried out to ensure that the suggested controller can suppress the frequency ﬂuctuations e ﬀ ectively, and that it provides more robust MG responses in comparison with the prior art techniques.


Introduction
Over the past decade, the reduction of conventional fossil fuel reserves, along with the environmental concerns about their burning, have led to the paradigm change toward the development of renewable energy sources (RESs), such as photovoltaic (PV) and wind turbine generator (WTG) systems penetrating into the power grid [1][2][3]. The planning and exploitation of RESs through distributed generators (DGs) offers the benefits of local generation according to the needs of consumers, with a consequent minimization in the transmission loss. The DGs can be potentially implemented for improving power quality and service reliability [4][5][6][7][8].
A microgrid is regarded as a regulated entity in the power plant and consists of various DGs such as microsources, energy reserve devices, and loads which are locally integrated into the grid for the profit of the customers. Normally, microgrids (MGs) can work in the stand-alone mode as independent islands or grid-connected modes in conjunction with the main electrical grid [9][10][11]. In the grid-connected mode, the main utility generators are responsible for power balance management in connection with new demands. In the isolated operation, the DGs are exposed to the load variations where t 0 is the initial time and Γ(.) is the Gamma function, which is defined by Γ(z) = ∞ t 0 t z−1 e −t dt.

An Isolated Microgrid
In an isolated MG, the distributed loads are provided by various DG components such as PVs and WTGs, and backup system elements (e.g., battery energy storage system (BESS) and flywheel energy storage system (FESS)) [8,31]. A general scheme of microgrids is illustrated in Figure 1. Usually, the MG dispatch system (MGDS) and the distribution management system (DMS) control the MG operation and the power grid, respectively. Moreover, communication links attain reciprocal information transition.

An Isolated Microgrid
In an isolated MG, the distributed loads are provided by various DG components such as PVs and WTGs, and backup system elements (e.g., battery energy storage system (BESS) and flywheel energy storage system (FESS)) [8,31]. A general scheme of microgrids is illustrated in Figure 1. Usually, the MG dispatch system (MGDS) and the distribution management system (DMS) control the MG operation and the power grid, respectively. Moreover, communication links attain reciprocal information transition.

The Diesel Engine Generator Model
The diesel engine generators (DEGs) have a lot of advantages, such as their fast speed in the start, low maintenance, and high efficiency; hence, they have been a good option for backup in isolated MGs [32]. By precisely regulating the DEG, the changes of load in the MGs can be instantaneously tracked. In addition, the diesel power element can compensate for the fluctuations of renewable DGs (such as WTG, PV, etc.) effectively.
The transfer function of the DEG is illustrated in Figure 2, which describes the control relationship of the DEG output power and the LFC action. As presented in Figure 2, the elements of the governor and generator are represented by the first-order inertia models of inertia term.

The Diesel Engine Generator Model
The diesel engine generators (DEGs) have a lot of advantages, such as their fast speed in the start, low maintenance, and high efficiency; hence, they have been a good option for backup in isolated MGs [32]. By precisely regulating the DEG, the changes of load in the MGs can be instantaneously tracked. In addition, the diesel power element can compensate for the fluctuations of renewable DGs (such as WTG, PV, etc.) effectively.
The transfer function of the DEG is illustrated in Figure 2, which describes the control relationship of the DEG output power and the LFC action. As presented in Figure 2, the elements of the governor and generator are represented by the first-order inertia models of inertia term.

Wind Turbine Generator
The output power of wind turbines depends on the inherent specifications of the turbine, and two factors: The speed and direction of the wind. The controllable WTG can be considered as a power oscillation source in the MG via the control of the DG sections.

Wind Turbine Generator
The output power of wind turbines depends on the inherent specifications of the turbine, and two factors: The speed and direction of the wind. The controllable WTG can be considered as a power oscillation source in the MG via the control of the DG sections.

Model of a Photovoltaic (PV) Generation
The electrical energy can be produced from the energy of the photons in PV cells, which are constructed from semiconductor materials. Due to the external and boundary contiguity along with the series resistance, losing power is inevitable in PVs. Naturally, the PVs have an intermittent characteristic, and their generated power depends on several factors, such as the radiation intensity, the surface area of the cell, and the ambient temperature [11]. A random power source can be utilized to model the stochastic behavior of PVs in simulations. Figure 3 illustrates the structure of the suggested LFC for the test MG, which employs different DGs such as PV, WT and DEG, storage devices (BESS and FESS), and loads. It is clear that the PV, fuel cell (FC), and BESS parts are connected to the AC MG via DC/AC interfacing inverters. All smallscale DGs and energy storage sections are connected to the AC bus via a circuit breaker. The spinning reserve for the secondary frequency control is offered by the diesel power system.

Model of a Photovoltaic (PV) Generation
The electrical energy can be produced from the energy of the photons in PV cells, which are constructed from semiconductor materials. Due to the external and boundary contiguity along with the series resistance, losing power is inevitable in PVs. Naturally, the PVs have an intermittent characteristic, and their generated power depends on several factors, such as the radiation intensity, the surface area of the cell, and the ambient temperature [11]. A random power source can be utilized to model the stochastic behavior of PVs in simulations. Figure 3 illustrates the structure of the suggested LFC for the test MG, which employs different DGs such as PV, WT and DEG, storage devices (BESS and FESS), and loads. It is clear that the PV, fuel cell (FC), and BESS parts are connected to the AC MG via DC/AC interfacing inverters. All small-scale DGs and energy storage sections are connected to the AC bus via a circuit breaker. The spinning reserve for the secondary frequency control is offered by the diesel power system.

Structure of the LFC-Based MG System
The dynamics of the MG system is shown in Figure 3. This system is a nine-state set of fractional-order equations. The objects of state equations are presented in the following: Inverter circuit of solar unit Filter circuit of solar unit

T b s+1
Battery system The dynamics of the MG system is shown in Figure 3. This system is a nine-state set of fractionalorder equations. The objects of state equations are presented in the following: The nine state MG dynamics and the output equation rewrite in a compact form in the following equations: where X, A, B, C, D, and U are stated matrix, system matrix, input matrix, the direct transition matrix, and input respectively, and they are introduced as follows:

Proposed Fractional-Order Sliding Mode Control Scheme
Here, a non-integer sliding surface is designed as follows: where 1 < p < 2 and K, is a vector of positive constants. Based on the sliding mode control theory, when the system operates in the sliding mode, it should satisfy: So, using property 1, D α S(t) = 0. Therefore: The above equation can be rewritten in the form: Based on the frequency distributed model theorem, this sliding mode dynamic is stable, and its state trajectories converge to the equilibrium X = 0.
As a proof, due to Theorem 2, FO sliding dynamics (Equation (16)) can be expressed as: By choosing a positive Lyapunov function in the form V 1 = 1 2 ∞ 0 u(ω)Λ 2 (ω, t)dω, one has: So, based on Theorem 1, the FO sliding dynamics (Equation (16)) is asymptotically stable. Now, to guarantee the existence of the sliding motion, the following robust controller is designed: In which γ, λ are vectors of positive constants.
Theorem 3. Consider the fractional order linear system (12). If this system is controlled by the control law (19), then the state trajectories of the system will converge to the equilibrium point.
Proof. Choose the following Lyapunov function Applying the D α of V 2 (t) and using Lemma 1, one obtains Substituting s i from (13) into (21), one has Inserting D α X from (12), we have Now some simplifications, and based on Lemma 1, we obtain Case 1: If S > 0, then sign(S) = 1 and 0 < tan h(S) = ε < 1, then Case 2: If S < 0, then sign(S) = −1 and −1 < tan h(S) = ξ < 0, thus Thus, according to Theorem 1, the state trajectories of the fractional order system (11) will converge to s i = 0 asymptotically.

Overview of the Original SCA
The Sine Cosine algorithm (SCA) is a recently introduced stochastic heuristic scheme, which is developed based on the mathematical sine and cosine functions [33,34]. The SCA starts with initial candidate solutions and improves them through fluctuating outwards and toward the targeted global solution, using sine and cosine functions as follows: where x j, t is the current solution at tth iteration in jth dimension, P j, t is the best solution, ω is a control parameter which decreases linearly from a constant value a to 0 by each iteration, and T max is the total number of iteration.

The Hybrid SCA and HS
In spite the fact that the SCA has exhibited an efficient accuracy more often than other well-known heuristic methodologies, the native algorithm is not fitting for highly complex problems because of its poor exploration capability. To ameliorate the diversification of the standard SCA, the improvisation strategy used in HS is integrated into the SCA. In this way, a component of each search agent X = (x 1 , x 2 , . . . , x D ) is generated by using the SCA mechanism, with a probability of the harmony memory consideration rate (HMCR). While with the rate of (1 − HMCR), a new component is randomly generated within the range of [LB UP], where LB and UP are the lower and upper bounds of the search agent space. Moreover, with a probability of HMCR multiplying the pitch adjustment rate (PAR), the surrounding space of a search agent is searched by the coefficient distance bandwidth (bw). To guarantee a quick convergence and to guarantee the quality of the search agents, the design coefficients of the SCA-HS algorithm (PAR, bw) are dynamically updated during the evaluation procedure [35], given as: where PAR min and PAR max are the minimum and maximum pitch adjustment, respectively. Likewise, bw min and bw max are the minimum and maximum bandwidths, respectively. The computational procedure of combination of the SCA with HS is depicted in Figure 4.
where and are the minimum and maximum pitch adjustment, respectively. Likewise, and are the minimum and maximum bandwidths, respectively. The computational procedure of combination of the SCA with HS is depicted in Figure 4. The evolutionary algorithms (e.g., genetic, firefly, cuckoo search, etc.) merely require information about the objective function. For online setting of the controller coefficients, a proper objective function should be defined for the guidance of its search of heuristic methodologies. In this study, the objective function of Equation (30) is adopted to adjust optimally the coefficients embedded in the FOSMC controller optimally. The evolutionary algorithms (e.g., genetic, firefly, cuckoo search, etc.) merely require information about the objective function. For online setting of the controller coefficients, a proper objective function should be defined for the guidance of its search of heuristic methodologies. In this study, the objective function of Equation (30) is adopted to adjust optimally the coefficients embedded in the FOSMC controller optimally.
set−point (t) + ∆u 2 (t).dt (30) where e set-point is the error signal and ∆u is the control signal.

Simulation and Real-Time Results
In this section, the MG, which is provided in Figure 3, is simulated in MATLAB/Simulink (R2017a, MathWorks, MA, USA, 2017) to investigate the efficiency of the FOSMC method from a systematic perspective. To confirm the applicability of the FOSMC in the context of MGs, the experimental examinations are conducted. The FOSMC-based experimental outcomes of the test MG are compared to the well-known methodologies, such as MPC and SMC. In this application, the real-time HIL testbed is established to take into account the delays and realistic errors that are not considered in the usual off-line simulation. The schematic diagram of the HIL setup is depicted in Figure 5 and the main parts of the setup are given below [34,36].
(i) A real-time OPAL-RT simulator is used which simulates the studied MG shown in Figure 3; (ii) For the programming host, a PC is used as the command station to execute the MATLAB/Simulink based-code on the OPAL-RT; (iii) A router is established to connect all the setup devices in the same sub-network. In this application, the OPAL-RT is connected to the DK60 board by Ethernet ports.
Appl. Sci. 2019, 9, x 11 of 16 (iii) A router is established to connect all the setup devices in the same sub-network. In this application, the OPAL-RT is connected to the DK60 board by Ethernet ports.

Real-Time Simulation of Micro Grid and Contro ller in the RTS-lab
The compilation process

Case 1:
In this case, it is supposed that the load demand of the isolated MG is unvarying, i.e., ∆ = 0. On the other hand, the power randomness of the WTG (∆ ) and PVG (∆ ) are involved in the LFCbased MG. The profile of the wind power fluctuation, which is extracted from an offshore wind farm in Sweden [37], is depicted in Figure 6a, while Figure 6b illustrates the solar radiation data in Aberdeen [38], which was used in this test MG. By employing the real data, the frequency outcomes of the MG system in the HIL environment are depicted in Figure 7.

Case 1:
In this case, it is supposed that the load demand of the isolated MG is unvarying, i.e., ∆P L = 0. On the other hand, the power randomness of the WTG (∆P w ) and PVG (∆P pv ) are involved in the LFC-based MG. The profile of the wind power fluctuation, which is extracted from an offshore wind farm in Sweden [37], is depicted in Figure 6a, while Figure 6b illustrates the solar radiation data in Aberdeen [38], which was used in this test MG. By employing the real data, the frequency outcomes of the MG system in the HIL environment are depicted in Figure 7.
On the other hand, the power randomness of the WTG (∆ ) and PVG (∆ ) are involved in the LFCbased MG. The profile of the wind power fluctuation, which is extracted from an offshore wind farm in Sweden [37], is depicted in Figure 6a, while Figure 6b illustrates the solar radiation data in Aberdeen [38], which was used in this test MG. By employing the real data, the frequency outcomes of the MG system in the HIL environment are depicted in Figure 7.  According to Figure 7, the desired level of the MG outcome (∆ ), regarding settling time and transient fluctuations, is provided by the FOSMC controller. In comparison, the suggested technique can achieve much smaller fluctuations of ∆ with quicker outcome specifications than the MPC and SMC approaches. In other words, the real-time outcomes confirm that the suggested technique can handle the randomness of the WTG and PV more effectively as compared to the considered modelbased approaches.

Case 2:
In this case, to confirm the robustness of the FOSMC controller, some parameters of the MG (i.e., , , , , and ) are changed. The percentage of the variations for the test system is furnished in Table 2. Table 2. Uncertain parameters of the test MG.

Parameters Variation Range
−20% +35% −10% −25% +25% As observed in Table 2, a sever scenario of changing the MG parameters is considered to assure the robustness of the suggested FOSMC scheme. The real-time results obtained by the suggested According to Figure 7, the desired level of the MG outcome (∆ f ), regarding settling time and transient fluctuations, is provided by the FOSMC controller. In comparison, the suggested technique can achieve much smaller fluctuations of ∆ f with quicker outcome specifications than the MPC and SMC approaches. In other words, the real-time outcomes confirm that the suggested technique can handle the randomness of the WTG and PV more effectively as compared to the considered model-based approaches.

Case 2:
In this case, to confirm the robustness of the FOSMC controller, some parameters of the MG (i.e., R, D, H, T inv , and T g ) are changed. The percentage of the variations for the test system is furnished in Table 2.
As observed in Table 2, a sever scenario of changing the MG parameters is considered to assure the robustness of the suggested FOSMC scheme. The real-time results obtained by the suggested controller, MPC, and conventional SMC are depicted in Figure 8.

Parameters
Variation Range In this case, to confirm the robustness of the FOSMC controller, some parameters of the MG (i.e., , , , , and ) are changed. The percentage of the variations for the test system is furnished in Table 2.

Parameters Variation Range
−20% +35% −10% −25% +25% As observed in Table 2, a sever scenario of changing the MG parameters is considered to assure the robustness of the suggested FOSMC scheme. The real-time results obtained by the suggested controller, MPC, and conventional SMC are depicted in Figure 8.  The results of Figure 8 reveal that when the system parameters are changed, both the MPC and conventional SMC can still provide robust LFC performance, but they are not adequately optimal. Moreover, the results indicate that the proposed controller provides a higher degree of robustness in comparison with the other two control strategies.

Discussion
The stochastic feature of the renewable energy items, i.e., wind and solar energies, introduces oscillations in the MG frequency. Under such circumstances, LFC plays a great role in the MG system because of its duty to preserve frequency in its scheduled value, in normal conditions, and in case of a very slight deviation of the load. However, the control of the hybrid power system operations in uncertain environments is a more complex task, without using a sufficient analytical model. This makes it necessary to apply advanced control methodologies for the realization of the system stability requirements.
Having knowledge of all the aforesaid, a new model-based FOSMC controller is developed to ameliorate the LFC performance of an MG with high penetration of RESs. To ascertain the superiority of the suggested model-based controller, two scenarios (Case 1 and Case 2) corresponding to the fluctuation of RESs and their severe parametric variations (robustness analysis) are applied. From the experimental results of Case 1 and Case 2, it is reflected that in spite of having the high system complexity with the fluctuation nature of the RESs, all the designed LFC controllers can stabilize the grid frequency effectively. In comparison, the FOSMC outperforms the MPC and conventional SMC in terms of the settling time and overshoot. The peak overshoot and undershoot of frequency deviation, using the different controllers, for the two concerned scenarios are compared, as illustrated in Figure 9. Besides, the percentage of improvement of the suggested model-based controller over the MPC and conventional SMC is depicted in Figure 10. The bar graphs of Figures 9 and 10 prove the dominance of the FOSMC controller over both of the other controllers. By comparing the results of Case 1 and Case 2, it is shown that the performance of the designed LFC controllers is deteriorated when the parametric variation is applied to the test MG. However, a higher level of stability is achieved by the proposed method than the other compared controllers.
in terms of the settling time and overshoot. The peak overshoot and undershoot of frequency deviation, using the different controllers, for the two concerned scenarios are compared, as illustrated in Figure 9. Besides, the percentage of improvement of the suggested model-based controller over the MPC and conventional SMC is depicted in Figure 10. The bar graphs of Figures 9 and 10 prove the dominance of the FOSMC controller over both of the other controllers. By comparing the results of Case 1 and Case 2, it is shown that the performance of the designed LFC controllers is deteriorated when the parametric variation is applied to the test MG. However, a higher level of stability is achieved by the proposed method than the other compared controllers.

Conclusions
This work investigates a hybrid microgrid, in which the DGs and RESs are integrated to construct a complex plant with advanced functionality. A novel model-based FOSMC technique is designed for the LFC of the concerned MG with high penetration of renewable systems. Since the effectiveness of the model-based technique depends on the controller's coefficients, a hybrid SCA-HS algorithm is suggested and implemented to tune the coefficients optimally. In the sense of the Lyapunov criterion, the theoretical analysis is conducted to guarantee the stability of the suggested LFC-based MG. Furthermore, hardware-in-the-loop experiments have been carried out in this study to justify the feasibility of the FOSMC controller in a real-time environment. To show the supremacy of the suggested technique, the dynamic behavior of the test MG with the FOSMC controller is compared with the MPC and SMC approaches. Experimental outcomes confirm that the suggested technique successfully handles the aforementioned challenges of the MG, and outperforms the considered techniques.

Conclusions
This work investigates a hybrid microgrid, in which the DGs and RESs are integrated to construct a complex plant with advanced functionality. A novel model-based FOSMC technique is designed for the LFC of the concerned MG with high penetration of renewable systems. Since the effectiveness of the model-based technique depends on the controller's coefficients, a hybrid SCA-HS algorithm is suggested and implemented to tune the coefficients optimally. In the sense of the Lyapunov criterion, the theoretical analysis is conducted to guarantee the stability of the suggested LFC-based MG. Furthermore, hardware-in-the-loop experiments have been carried out in this study to justify the feasibility of the FOSMC controller in a real-time environment. To show the supremacy of the suggested technique, the dynamic behavior of the test MG with the FOSMC controller is compared with the MPC and SMC approaches. Experimental outcomes confirm that the suggested technique successfully handles the aforementioned challenges of the MG, and outperforms the considered techniques.

Conflicts of Interest:
The authors declare no conflict of interest.