1 Introduction

In recent decades, sustainable energies have been noticed extensively due to several issues, including global warming, changes in atmospheric conditions, reducing fossil fuel resources, pollutions caused by consumption of fossil fuels and their environmental problems and economic efficiency (Asgari et al. 2015). Among the sustainable energy resources, wind energy and solar cells have drawn much attention and usually they are considered as main parts in microgrids.

The microgrids are defined as a group of distributed energy resources and loads that can supply the required energy of a local area. Microgrids have great importance in future smart grids technology. The main benefits of the microgrids may be states as the reduction in the cost of energy transmission, power quality improvement and obtaining more reliable power system. However, because of unpredictable specification of renewable energies such as wind power or solar irradiation, frequency deviations may be occurred in the microgrids, especially in islanded operation. Hence, different methods to control the frequency deviation of microgrids are reported in the literature. Many control strategies such as, Model predictive control strategy (Pahasa and Ngamroo 2014a, b), adaptive control (Khooban et al. 2016), intelligent methods including fuzzy logic, neural networks and meta-heuristic-based optimization methods (Mahmoud et al. 2014; Khalghani et al. 2016; Bevrani et al. 2012; Esmaeili et al. 2017; Sedhom et al. 2020; Ghafouri et al. 2017), sliding mode control (Khooban 2017; Wang et al. 2016; Pandey et al. 2013) and robust control (Azizi and Khajehoddin 2016; Nandar 2013) have been proposed for frequency control of microgrids in the literature. Several surveys on modeling and control of microgrids, control architectures and their trends have been reported such as Bidram and Davoudi (2012), Guerrero et al. (2012), Guerrero et al. (2010) and Lopes et al. (2006).

On the other hand, fractional order controllers have been considered for different applications in recent years. These controllers have some additional degree of freedoms, which may lead to better performance of the system. In Kayalvizhi and Kumar (2017) a fractional order fuzzy PID load frequency control of an isolated microgrid is proposed. The parameters of the proposed controller are optimized automatically using a modified black hole algorithm. In Wang et al. (2017), fractional PID control of a microgrid in islanded operation mode is developed using multi-objective extremal optimization. A fractional order PID control strategy is employed in Pandey et al. (2013) wherein the controller coefficients are obtained with global optimization algorithm in order to satisfy some system performance indices. The load frequency control problem for microgrids in a ship power system using a new optimal fractional fuzzy PD+I controller is studied in Khooban et al. (2017a), which microgrid operates in islanded mode. In Khooban et al. (2017b), frequency deviation control of an islanded microgrid including electric vehicles is tackled based on an adaptive multi-objective fractional order fuzzy PID controller.

Reference (Sun et al. 2017) presents a novel Binary-Coded Extremal Optimization (BCEO)-based fractional order controller for frequency control of a microgrid in its isolated operation mode. Load frequency control of an islanded microgrid based on a robust fractional order PID controller is addresses in Khosravi et al. (2020) wherein the produced power by wind turbine and photovoltaic cells is assumed as the disturbance input in the system. The parameters of the proposed controller are determined by minimizing some constraints that guarantee robust stability and robust performance of the system. In Çelik (2020), fractional order proportional integral (FOPI) and fractional order proportional derivative (FOPD) controllers connected in cascade for load frequency control of power system is presented. The unknown parameters of the controllers including the gains and fractional order parameters are obtained by utilizing dragonfly search algorithm (DSA) considering the integral time absolute error (ITAE) of frequency and tie-line power deviations as the cost function. A complete investigation of Load frequency control problem for power system based on fractional order proportional-integral-derivative (FOPI-D) controller is presented in Guha et al. (2020) in which the derivative action is considered in the feedback path (PI-D controller) to avoid the set-point kick problem of PID controller. Grasshopper optimization algorithm (GOA) is used to tune the parameters of the proposed controller. Moreover, the closed-loop responses are compared with some conventional and intelligent controllers to demonstrate the performance of the presented controller. Robustness, sensitivity analysis and performance analysis of the proposed method are completely studied in the paper.

In the proposed strategies for load frequency control of the microgrid, the controller acts based on the frequency deviations. The change in demand power and sustainable energy resources may be assumed as the disturbances in the system. The controller changes the input when the disturbances led to frequency deviation. In another strategy, the controller may act before the disturbances lead to frequency deviation, which is called the feedforward controller. In this current paper, a novel strategy for load frequency control of microgrid is addressed. In the proposed control method, a feedforward fractional order PID (FFOPID) controller is used in addition to the feedback controller in which the parameters of the controller are obtained based on harmony search (HS) algorithm. The feedback control is based on the effect of disturbances and will compensate the effect of disturbances which may be seen in the tracking error. The feedforward controller may alleviate the effects of disturbances by giving proper input before the disturbances influence on the system provided that the disturbances are known to the system. In the microgrid, the difference between power of renewable sources and load may be defined as the disturbances in the system. The disturbances are unknown to the system, and thus, they must be estimated by a disturbance observer. The considered model of the microgrid includes wind turbine, solar cells, diesel generator and loads.

In summary, the main novelties of this paper are:

  • A new control strategy, including feedback control and FFOPID controller based on a disturbance observer, is presented.

  • The parameters of controllers are tuned using the modified HS algorithm.

The organization of the current paper is considered as follows. Firstly, in Sect. 2, the structure of the considered microgrid and mathematical modeling of different parts are given. The load frequency control strategy for the given microgrid in Sect. 2 is presented in Sect. 3. Simulation results of the feedforward fractional control strategy of the microgrid are provided in Sect. 4. Finally, the conclusion of the paper is given in the last section.

2 Problem Formulation and Preliminaries

In this section, the structure of the microgrid and mathematical model for each part are given. Different sources of energy may be considered in a microgrid. In this paper, the given structure in Fig. 1 including a wind turbine, solar cells, diesel generator as controllable resource and loads is considered.

Fig. 1
figure 1

Structure of the proposed microgrid

In Fig. 1, \(P_{DG}\), \(P_W\), \(P_S\) and \(P_L\) stand for the power of diesel generator, wind turbine, solar cells and load, respectively.

The mathematical models of different parts in the microgrid are presented in the following subsections.

2.1 Wind Turbine

The dynamic of a wind turbine consists of wind, aerodynamics, generator and mechanical drive train, which are studied in the sequel.

(a) Wind

Wind is directly interacts with blades as the input of the turbine. The mathematical model of wind is considered as two constant and turbulent parts as (1), which are denoted by \(v_m\) and \(v_t\), respectively:

$$\begin{aligned} v=v_m+v_t(t) \end{aligned}$$
(1)

The constant part in (1), which has slow variation rate, is used to show the mean value of wind speed. Moreover, \(v_t\) is the turbulent part of the wind model with fast variation rate (Muhando et al. 2009; Kassem 2012).

(b) Aerodynamic

The aerodynamic part of a wind turbine is used to convert the kinetic energy of wind as (2) into mechanical energy.

$$\begin{aligned} P=0.5 \rho \pi R^2 v^3 \end{aligned}$$
(2)

where \(\rho\) is the air density and R is the radius of the rotor in turbine.

The part of the kinetic energy that is converted to mechanical energy is defined based on Albert Betz’s law as follows (Burkart et al. 2011):

$$\begin{aligned} P_r=C_p.P \end{aligned}$$
(3)

in which \(P_r\) and \(C_p\) stand for mechanical energy of the rotor and power coefficient, respectively. The power coefficient is obtained as a nonlinear function of pitch angle and tip speed ratio in Asgari and Yazdizadeh (2018), which mainly depends on the turbine type. This nonlinear function is given by (4) as in Hammerum et al. (2007).

$$\begin{aligned} C_p(\lambda ,\beta )=0.5176(\frac{116}{\lambda _i}-0.4\beta -5)e^{\frac{-21}{\lambda _i}}+0.0068\lambda \end{aligned}$$
(4)
$$\begin{aligned} \frac{1}{\lambda _i}=\frac{1}{\lambda +0.08\beta }-\frac{0.035}{\beta ^3+1} \end{aligned}$$
(5)

in which \(\beta\) is the pitch angle of the turbine. The tip speed ratio, which is defined by \(\lambda\), is also given as (6) Simani et al. (2015).

$$\begin{aligned} \lambda =\frac{R \omega _r}{v} \end{aligned}$$
(6)

where \(\omega _r\) is the rotor speed.

It is also worth noting that the maximum value of the power coefficient is mentioned as 0.59 based upon Albert Betz’s law. The power coefficient of the wind turbine in the understudy microgrid, which is the V47/660kW turbine, operating in Manjil site, Iran, is obtained as 0.49.

(c) Generator The transient state of the induction generator of the understudy wind turbine is not considered in this study. In fact, the mechanical part of the wind turbine has slower dynamics in comparison to the generator dynamics (Alonge et al. 2007). Because of this fact, the mathematical model for the induction generator of the wind turbine is assumed as (7), which is the steady state part of the model.

$$\begin{aligned}&T_g(\omega _i)=\nonumber \\&\quad \frac{\rho R_2 L_m^2 V_e^2 \omega _i}{[R_1 R_2-\omega _a \omega _i (L_1L_m-L_m^2)]^2+(\omega _a R_2 L_1+\omega _i R_1 L_2)^2} \end{aligned}$$
(7)

where \(V_e\), \(\omega _i\), \(\omega _a\), p, \(L_m\) are considered for the voltage of the supply (rms), the frequency of the rotor, the frequency of the supply voltage, the pole pairs and mutual inductance, respectively. The inductances and resistances of the rotor and stator are also given as \(L_r\), \(L_s\), \(R_r\) and \(R_s\), respectively (Alonge et al. 2007).

(d) Mechanical Drive Train

The one mass model is assumed for the mechanical drive train of the wind turbine. This mathematical model is given by Medina and Cisneros (2009) and Ugalde-Loo et al. (2012):

$$\begin{aligned} J \frac{d \omega _{rot}}{dt}=T_{rot}-nT_g , \omega _{rot}=\frac{\omega _g}{n} \end{aligned}$$
(8)

where J, \(\omega _r\), \(T_r\), n, \(\omega _g\), \(T_g\) are the drive train inertia, the speed of the rotor, the rotor torque, the gearbox ratio, generator speed and generator torque, respectively.

2.2 Solar Cells Model

PV cells are utilized to convert the energy of insolation into electrical energy. The power of PV cells may be assumed as an uncertain part in the microgrid system because it depends on the sun irradiance and environmental temperature. The PV cells are considered as a nonlinear current source in the literature (Dev and Jeyaprabha 2013). The mathematical modeling of PV cells may be obtained using different equivalent electrical circuits. In this study, the equivalent one-diode circuit model is assumed for PV cells, which is shown in Fig. 2.

Fig. 2
figure 2

Equivalent one-diode model of PV cell (Dev and Jeyaprabha 2013)

By using Kirchhoff current law for the circuit, we have (Dev and Jeyaprabha 2013):

$$\begin{aligned} I=I_{ph}-I_{Rp}-I_d \end{aligned}$$
(9)

The \(I-V\) characteristic of a PV array may be obtained as (10) for \(N_s\) series cells and \(N_p\) parallel cells.

$$\begin{aligned} I=N_p I_{Ph} - N_P I_0 [e^{\frac{q[\frac{V}{N_s}+\frac{IR_s}{N_p}]}{nkT}}-1]-\frac{[\frac{N_P V}{N_s}+IR_s]}{R_{p}} \end{aligned}$$
(10)

in which \(I_{ph}\), I, \(I_0\), V, \(R_s\), \(R_p\), T, are used for insulation current, cell current, reverse saturation current, thermal voltage, the series resistance, the parallel resistance and the temperature of PV array, respectively.

Moreover, the \(I_{ph}\) and PV power can be obtained as:

$$\begin{aligned} I_{ph}=[I_{scr}+K_{i}(T-T_r)]\frac{s}{100} \end{aligned}$$
(11)
$$\begin{aligned} P=IV=N_p I_{Ph}V[(\frac{qV}{KTAn_s})-1] \end{aligned}$$
(12)

where q, A, S, \(T_r\) and \(I_{scr}\) are charge of an electron, p-n junction ideality factor, irradiance, reference temperature and short circuit current, respectively.

2.3 Diesel Generator

Renewable energy resources such as wind turbines have uncertain natures, which may not guarantee the needed power of loads. Hence, diesel generator is considered as a controllable resource in the microgrid. The diesel generator compensates the lack of required load power, which also improves the reliability of the system. Since the diesel generator is the deterministic and controllable power resource, an efficient control strategy must be used for power balance and load frequency control of the microgrid.

The state equations of the linearized plant model including diesel generator are given as (1316) Wang et al. (1993):

$$\begin{aligned} \Delta {\dot{f}}(t)= & {} -\frac{1}{T_p} \Delta f(t) + \frac{K_p}{T_p} \Delta P_d(t) - \frac{K_p}{T_p} \Delta P_L(t) \end{aligned}$$
(13)
$$\begin{aligned} \Delta {\dot{P}}_d(t)= & {} - \frac{1}{T_t} \Delta P_d(t) + \frac{1}{T_t} \Delta X_g(t) \end{aligned}$$
(14)
$$\begin{aligned} \Delta {\dot{X}}_g(t)= & {} - \frac{1}{RT_g}\Delta f(t) -\frac{1}{T_g} \Delta X_g(t) - \frac{1}{T_g} \Delta E(t)+\nonumber \\&\frac{1}{T_g} u(t) \end{aligned}$$
(15)
$$\begin{aligned} \Delta {\dot{E}}= & {} K_e \Delta f(t) \end{aligned}$$
(16)

in which the states of the system are defined as \(\Delta f(t)\), \(\Delta P_d(t)\), \(\Delta X_g(t)\) and \(\Delta E\) as frequency deviation, deviation of diesel generator power, load deviation and incremental change in governor position, respectively. Moreover, \(\Delta P_L(t)\) is the function of the power of the load variation and renewable energy sources as well. The other parameters and their values are tabulated in Table 1.

Table 1 Parameters of diesel generator and their values (Wang et al. 2016)

3 Main Results

The load frequency control of the considered microgrid is realized based on the proposed structure as given in Fig. 3.

Fig. 3
figure 3

Structure of the proposed microgrid

This structure contains a feedforward fractional order PID controller, which is tuned using HS algorithm, a disturbance observer and a feedback controller. The estimated values of the disturbance are used in the feedforward fractional order PID controller. The variation of \(P_L\) is considered as the disturbance, which is estimated based on the input and output information from the diesel generator system. A PID controller is also used in the conventional feedback control loop, which is tuned based on the HS algorithm as well. In fact, the proposed structure has main benefits of feedback control, feedforward control, fractional order calculus and optimality due to use of intelligent algorithms.

In the following subsections, the FFOPID controller, the considered disturbance observer and HS algorithm are given.

3.1 Fractional Order PID Controller

Fractional order PID (FOPID) controllers may be considered as an extended form of the conventional PID controller, which may lead to better performance due to more degree of freedoms. There is much interest in fractional order systems and controllers among the researchers in recent years for different applications.

The main form of an FOPID controller, which also known as \(PI^\lambda D^\mu\) controller, may be given as follows.

$$\begin{aligned} K(s)=K_p+K_is^{-\lambda }+K_ds^\mu \end{aligned}$$
(17)

in which \(\lambda\) and \(\mu\) are real positive numbers. \(K_p\), \(K_i\) and \(K_d\) are the gains of proportional, integral and derivative parts of the PID controller, respectively. The conventional form of the PID controller is a case of fractional order one wherein the values of \(\lambda\) and \(\mu\) are set to one.

The FOPID controller is given by (18) in time domain.

$$\begin{aligned} u(t)=K_pe(t)+K_i{D_t}^{-\lambda }e(t)+K_d{D_t}^\mu e(t) \end{aligned}$$
(18)

in which \({D_t}^\alpha\) is fractional integro-differential operator. \(\alpha\) is the fractional order of the integro-differential operator, which indicates integral and differential operators for \(\alpha >0\) and \(\alpha <0\), respectively. There exist five parameters in the FOPID controller design, which shows the more degree of freedoms compared to the given three parameters in the conventional PID controller.

3.2 Disturbance Observer for the Microgrid

In order to use the feedforward controller, we need to know the disturbance signal in the system. In a system, the disturbance signals are usually unknown. In this paper, a disturbance observer is used to estimate the disturbance signals in the system. In fact, based on the inputs and outputs information and considering the mathematical model of the system, the disturbance may be obtained, which is called the disturbance observer.

The considered disturbance observer is according to the presented method in Wang et al. (2016), which is briefly given in what follows.

By assuming the disturbance as the state of the system, the augmented model of the system is given by:

$$\begin{aligned} \left[ \begin{array}{c} {\dot{x}}\\ {\dot{W}} \\ \end{array} \right] = \left[ \begin{array}{cc} A &{} I\\ 0 &{} 0 \\ \end{array} \right] \left[ \begin{array}{c} x\\ W \\ \end{array} \right] +\left[ \begin{array}{c} B\\ 0 \\ \end{array} \right] u+ \left[ \begin{array}{c} 0\\ {\dot{W}} \\ \end{array} \right] \end{aligned}$$
(19)

where x and W indicate the states of the system according to (1316), respectively, and I is identity matrix.

The disturbance observer is assumed as (20).

$$\begin{aligned} \left[ \begin{array}{c} \dot{{\hat{x}}}\\ \dot{{\hat{W}}} \\ \end{array} \right] = \left[ \begin{array}{cc} A &{} I\\ 0 &{} 0 \\ \end{array} \right] \left[ \begin{array}{c} {\hat{x}}\\ {\hat{W}} \\ \end{array} \right] +\left[ \begin{array}{c} B\\ 0 \\ \end{array} \right] u- \left[ \begin{array}{c} K_1\\ K_2 \\ \end{array} \right] {\tilde{x}} \end{aligned}$$
(20)

in which \({\hat{x}}\) and \({\hat{W}}\) denote the state and disturbance estimation, respectively. The gain of the observer is defined as two parts, including \(K_1\) and \(K_2\). \({\tilde{x}}\) is also defined as the state estimation error of the observer as (21).

$$\begin{aligned} {\tilde{x}}={\hat{x}}-x \end{aligned}$$
(21)

The state estimation error of the considered disturbance observer is obtained as:

$$\begin{aligned} \left[ \begin{array}{c} \dot{{\tilde{x}}}\\ \dot{{\tilde{W}}} \\ \end{array} \right] = {\hat{A}} \left[ \begin{array}{c} {\tilde{x}}\\ {\tilde{W}} \\ \end{array} \right] - \left[ \begin{array}{c} 0\\ {\dot{W}} \\ \end{array} \right] \end{aligned}$$
(22)

where

$$\begin{aligned} {\tilde{W}}={\hat{W}}-W \end{aligned}$$
(23)
$$\begin{aligned} {\hat{A}}=\left[ \begin{array}{cc} A-K_1 &{} I\\ -K_2 &{} 0 \\ \end{array} \right] \end{aligned}$$
(24)

Lemma (Wang et al. 2016): For the given disturbance observer as (20), the disturbance estimation error is bounded stable provided that the observer gains \(K_1\) and \(K_2\) are defined as follows:

$$\begin{aligned} K_1= & {} A+2 \Lambda \end{aligned}$$
(25)
$$\begin{aligned} K_2= & {} \Lambda ^2 I \end{aligned}$$
(26)

in which

$$\begin{aligned} \Lambda= & {} {\rm diag}\{\lambda _1, \ldots , \lambda _n\}, \lambda _i>0,\quad i=1,2, \ldots ,n. \end{aligned}$$
(27)

For the considered microgrid, the gains of the disturbance observer are obtained as follows by assuming \(\Lambda =\{50,100,100,100\}\).

$$\begin{aligned} K_1=\left[ \begin{array}{cccc} 87.5 &{} 1500 &{} 0 &{} 0\\ 0 &{} 196.7 &{} 3.3 &{} 0 \\ -5.2 &{} 0 &{} 187.5 &{} -12.5 \\ 5.2 &{} 0 &{} 0 &{} 200 \\ \end{array} \right] \\ K_2=\left[ \begin{array}{cccc} 2500 &{} 0 &{} 0 &{} 0\\ 0 &{} 10000 &{} 0 &{} 0 \\ 0 &{} 0 &{} 10000 &{} 0 \\ 0 &{} 0 &{} 0 &{} 10000 \\ \end{array} \right] \end{aligned}.$$

3.3 Modified Harmony Search Algorithm

The parameters of the FFOPID controller are tuned using HS algorithm. HS algorithm is a meta-heuristic algorithm that is extensively employed in the engineering optimization problems. This optimization method is developed based upon improvisation of harmony in the music composition (Geem et al. 2002). In this paper, the modified HS algorithm as in Shivaie et al. (2015) is used to calculate the given parameters of the FFOPID controller.

The flowchart of the HS algorithm for the FFOPID controller design is illustrated in Fig. 4.

Fig. 4
figure 4

Optimization strategy of the modified HS algorithm

The parameters of the HS algorithm and their definition for the FFOPID controller are given in Table 2.

Table 2 The HS algorithm parameters

The HS algorithm initializes the harmony memory, which is denoted as HM in Table 2, with randomly generated solutions. The number of solutions stored in the HM is determined by the harmony memory size (HMS). At each stage, a new solution is produced iteratively as follows. Each decision variable will be generated considering both memory consideration and a possible additional modification, or is produced randomly. The parameters that are utilized in the process of a new solution generation are called harmony memory considering rate (HMCR) and pitch adjusting rate (PAR). Each variable is set to the value of the corresponding variable of one of the solutions in the harmony memory with a probability of HMCR, and an additional modification of this value is done with a probability of pitch adjusting rate. Otherwise, the variable is set to a random value with probability of \(1-\)HMCR. Each generated solution is then compared to the worst available solution in the memory to be located in the memory or not. It is clear that if the corresponding cost function is better than that of the worst solution in memory, the new generated solution is replaced the worst solution. The above-mentioned process is repeated until a predefined termination criterion is fulfilled (Weyland 2012).

The cost function of the optimization problem is defined as the summation of integral time-multiplied squared error (ITSE) criterion and absolute value of maximum deviation of the frequency as in (28).

$$\begin{aligned} ITSE=\int {t (\Delta f)^2dt}+|\max {(\Delta f)}| \end{aligned}$$
(28)

where t is time and \(\Delta f\) is the frequency deviation of the microgrid.

The variations of the defined cost function are given in Fig. 5 as follows, which results in the coefficients of the controllers as Table 3.

Fig. 5
figure 5

Objective function convergence curve

Table 3 Coefficients of controllers using HS algorithm

The eigenvalues of the closed-loop system are obtained as follows, which shows the stability of the closed-loop system.

$$\begin{aligned} s_1=-4.1425,s_{2,3}=-0.56 \pm 0.7325i,s_{4,5}=-0.6368 \pm 0.3782i \end{aligned}$$

4 Simulation Results

The proposed strategy for considered microgrid is implemented in MATLAB/Simulink environment. The obtained results of the proposed controller are given in this section of the paper. The efficiency of the proposed feedforward method is shown by comparison between the results of the method with the case that the fractional feedforward controller is not used. To this end, two scenarios are considered.

4.1 High Integrations of Wind Power, Solar Power and Load Disturbance

In this scenario, the performance of the proposed feedforward controller is shown in the presence of high integration of wind, solar and load power. The load model in the microgrid is shown in Fig. 6.

Fig. 6
figure 6

Load model

In microgrid concept, it is favorable that the demanded load is supplied with available renewable energy sources such as wind turbine or solar cells. These power supplies are unpredictable due to variation in wind speed and solar irradiation. The wind speed and solar irradiation are respectively depicted in Figs. 7 and 8, which lead to wind and PV array power as shown in Figs. 9 and 10, respectively.

Fig. 7
figure 7

Wind speed

Fig. 8
figure 8

Solar irradiation

Fig. 9
figure 9

Wind turbine power

Fig. 10
figure 10

PV array power

The disturbance is defined as the difference between power of renewable resources and the load, which must be estimated for the feedforward controller. The disturbance signal (W) and its estimation are depicted in Fig. 11.

Fig. 11
figure 11

Disturbance signal W and its estimation

It should be pointed out that the disturbance signal, which is presented as W, is the multiplication of the matrix H and the difference between load variation and variation in the renewable resources.

The frequency deviation of the proposed feedforward method is displayed in Fig. 12.

Fig. 12
figure 12

Frequency deviation

It can be seen from the figure that the proposed feedforward method leads to smaller deviations of the frequency in the microgrid, which implies the great performance of the feedforward controller in the presence of unpredictable power of renewable energies such as photovoltaic power or wind turbine.

Numerical comparisons for different criteria of the frequency deviation including integral of absolute error (IAE), integral time-multiplied absolute error (ITAE), ITSE and summation of ITSE and absolute of the maximum error are also given in Table 4.

Table 4 Different criteria of the cost function compared to the method without FFOPID controller in the first scenario

4.2 Sudden Load Change

In this scenario, the load variation is assumed as several step functions to show the performance of the proposed FOPID feedforward controller in the case that we have sharp variations in the load. The power generated by PV is considered as constant. The load variation and the disturbance signal together with its estimation are depicted in Figs. 13 and 14, respectively.

Fig. 13
figure 13

Load variation

Fig. 14
figure 14

Disturbance signal versus disturbance observer estimation

The obtained frequency deviation is also presented in Fig. 15 as follows.

Fig. 15
figure 15

Frequency deviation in sudden load change

For better comparison with PID controller without feedforward loop, the following table summarizes the different criteria in this scenario (Table 5).

Table 5 Different criteria of the cost function compared to the method without FFOPID controller in the second scenario

It can be obvious from the table that the proposed feedforward method has great efficiency compared to the non-fractional PID controller.

5 Conclusion

In this paper, a new control strategy using feedforward fractional order controller, conventional feedback controller and the disturbance observer has been proposed to frequency control of microgrid in islanded operation mode. The difference between power of renewable resources and load has been assumed as the disturbance in the system, which must be estimated using the disturbance observer. The HS algorithm has been used to optimal design of FFOPID controller parameters. The simulation results have been shown the efficiency of the proposed controller compared to PID controller. Due to use of disturbance observer, the deviation of power is estimated and the feedforward controller may change the input of the diesel generator before that the disturbances lead to the frequency deviation. The proposed method may be developed for the grid connected operation mode of the microgrid in the presence of other power resources such as electric vehicles and batteries.