Abstract
Due to integration of different distributed power sources in microgrid, power quality is adversely affected and has caused many control problems. Hence power system requires much more proficiency and adaptability in control and optimization to overcome these problems. The power quality issues in microgrid system are mainly from frequency fluctuations. In real scenario, frequency fluctuations happen because of impulsive variations in load/generation or both. This research study presents a Fractional Order Fuzzy PID (FOFPID) controller for frequency control in microgrid. To test effectiveness of proposed controller, its performance is evaluated and compared with standard PID and Fuzzy PID (FPID) controller. To find optimal parameters of the FOFPID, Gravitational Search Algorithm (GSA) is employed. To illustrate the effectiveness of GSA, its outcome is compared with existing algorithms such as Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) algorithms. Further performance of each controller and optimizing method is assessed by looking at the fitness function value, statistical data, frequency deviation, amplitude and oscillations of control signal. Finally, the most optimized algorithm-based controller is tested for robustness against parameter variations and nonlinearities like Generation Rate Constraint (GRC).
Introduction
The limited conventional sources and increased environmental pollution has become major concern for most of the countries. It should be the primary mission for all of us to take imperative action to develop and use renewable energy sources. Microgrid is one of the feasible solutions to solve power crisis. The integration of these nonconventional sources creates complexity and uncertainty in system. It requires excellent supervision and controlling techniques to endorse smooth functioning of the whole system [1]. Incorporation of different energy storage devices like storage battery, ultra-capacitor, flywheel etc. in microgrid alleviates the mismatch between load and generation. These are also used to store the additional energy when demand is less. It also enhances the power quality and depreciates frequency fluctuation. Moreover, it requires optimal control strategy having intelligence and flexibility to handle the abrupt variation in load and generation. The number of optimization and control strategies for frequency control in microgrid had been proposed in the literature over past decades. Senjyu et al. adopted Proportional Integral (PI) controller, for frequency control in microgrid [2] with trial method to tune controller. In [3], authors proposed Genetic Algorithm (GA) for getting the optimal parameters of PI and proportional integral derivative (PID) controllers for frequency regulation in hybrid system. A Bacterial foraging optimization was applied to tune PID controller in multi agent based microgrid frequency control [4].
In [5], Fuzzy PI controller was implemented in an AC microgrid to suppress the frequency deviation. In recent years, fractional order controllers are attaining popularity due to its adjustability and effectiveness in controller design and performance [6, 7]. Fractional Order (FO) controllers are implemented by researchers in various disciplines of engineering such as power system [8], process control [9], biomedical [10] etc. Furthermore, researchers also exploit the integration of intelligent methods such as Fuzzy logic and neural network with FO controller to improve the execution of system. Arya et al. proposed FOFPID controller in the field of Automatic Generation Control (AGC) [11] and Khakshour et al. [12] implemented neural network with fractional controller in two degree of freedom helicopter. FOFPID controller based Tow-link Robotic Manipulator has been implemented in [13]. In [14–17], FOFPID controller has been employed to multi area power system and it has produced satisfactory results. Motivated from these performances of FOFPID controller in various fields of power system, this study has employed FOFPID controller for suppressing the frequency deviation of the system and oscillations of actuating signal of the controller.
Various optimization techniques have been explored for tuning the parameter of fractional controller as bacterial foraging optimization [11], artificial bee colony algorithm [18], GA [19], PSO [20] etc. In the present world of control problem, invention and implementation of new search algorithms is always appreciated. This article implemented the Gravitational Search Algorithm (GSA) for optimizing the parameters of each FOFPID, FPID, and PID controllers. To prove the excellence of GSA based controllers (FOFPID/FPID/PID) in this study, its results are compared with PSO based controllers (FOFPID/FPID/PID) as well as GA optimized based controllers (FOFPID, FPID, and PID).
The Contribution of this study is detailed below: Implementation of a microgrid consists of various components such as Wind Turbine Generator (WTG), Solar Photovoltaic system (SPV), Diesel Engine Generator (DEG), Fuel Cells (FC), Flywheel Energy Storage System (FESS) and Battery Energy Storage System (BESS) in MATLAB Simulink. Design of FOFPID controller and comparing its results with FPID and PID controllers. Implementation of GSA to find optimal parameters of FOFPID/FPID/PID controllers. To show effectiveness of GSA, its outcomes are compared with GA and PSO methods in terms of mean, standard deviation and fitness index. To test the robustness of present controllers, nonlinearity like Generation Rate Constraint is added. To test the sensitivity of present controllers, parametric variations of 60% is executed.
This article is sorted out in sections. In Section 2, microgrid model and control techniques are discussed. Optimization algorithms are laid out in Section 3. In Section 4, simulation outcomes and discussion are introduced. Implication is elaborated in Section 5 followed by conclusions in Section 6.
Investigated model
Figure 1 demonstrates the single line diagram of proposed microgrid [5]. In this study, the model of microgrid comprises of various sub parts as: WTG, SPV, DEG, FC, FESS and BESS. As shown in Fig. 1 FC and DEG, both are fed by FOFPID controller’s output to give appropriate output to the gap amid demand and supply. As both, of these are expensive fuels, so its economical requirement to take action is needed only when there is fluctuation in grid frequency. Thus, grid frequency deviation signal is directly given to FESS/BESS without the involvement of the controller.

Single line diagram of a microgrid.
In this study each component of microgrid is represented in transfer function form as shown in Fig. 2. Fuel cell has three parts: fuel units, an inverter unit and an interconnection unit. Although, FC has a high order characteristic, a three-order model is adequate for this study. The diesel engine generator has two blocks: diesel generator and diesel turbine. PV solar also has also two blocks: inverter and an interconnection device. On the other hand, first order transfer function has been considered for flywheel energy storing system/battery energy storage system. Table 1 reveals the various component parameters of the microgrid with their values [5].

Schematic diagram of the microgrid.
Parameters of proposed microgrid [5]
Here, the rated electrical specifications of microgrid components and load are taken from [5] and given in Table 2. These specifications are integrated in the proposed grid by incorporating power limit in each of the components. In energy storage systems (FESS and BESS), limits of power generated/absorbed are 0.11 pu. In DEG, power limit is 0≤PDEG≤0.48 pu and FC has 0≤PFC≤0.45 pu.
Rated power of different components of microgrid [5]
This study also included Generation rate constraint (GRC) type nonlinearity in the microgrid to make system close to realistic scenario. GRC imposes the realistic restriction on storing and releasing power. For realization of GRC, components like DEG, FC, FESS and BESS have been considered and subsequent constraints of
This research work prototyped the practical varying wind/solar power and load by using general template as given in (1)
Following parameters of (1) are considered to generate the output power of WTG,
Here, H(t) represent Heaviside Step function.
Following parameters of (1) are considered to generate output power of SPV,
Following parameters of (1) are considered to develop the demanded load:
The graphical representation of the above equations for power profiles of wind, solar and load are presented in Fig. 3.

Renewable power generation and demanded load.
Fractional calculus
This technique gives the idea of non-integer order of differentiation/integration [6, 7]. Mathematically, fractional operator Riemann Liouville definition
Caputo’s definition
Grunwald Letnikov definition
Where
Here h is step size.
Fractional Order (FO) differentiators/integrators are linear filters of infinite dimensions [22]. Henceforth its band limited implementation is needed for realistic scenario. To achieve this, finite dimension approximation of fractional order differentiators or integrators should be done in proper frequency. This study employed Outstaloup’s method of rational approximations for FO integrators and differentiators.
Afterwards sub-optimum H2 approximation method is adopted to reduce the order of rational transfer function. The transfer function of a filter is expressed as [23] in the frequency band as (ω b , ω h ). Thus Δf signal is filtered through the Outstaloup filter and its output gives good approximation of fractionally differentiated/integrated signal.
Now transfer function, zeros, poles and gain of Outstaloup filter are expressed as
Here, N is equal to 2, which shows the order of filter is 5th. The ‘β’ represents order of integrator/differentiator. In this study, 5th order Oustaloup’s approximation in the frequency band of ω∈ { 10-2, 102 }rad/sec for the entire fractional order elements are employed.
The schematic illustration of FOFPID controller is revealed in Fig. 4(a), which is a group of Fractional Fuzzy PI and Fractional Fuzzy PD having Δf and d μ (Δf)/dt μ as inputs [24, 25]. Fuzzy logic controller response is scaled by factor β and its integral scaled by factor Ki and afterwards they are added to get final controller response. In FOFPID, fractional order μ/λ are used instead of integer order for rate of change of error/integral of output correspondingly as shown in Fig. 4(b). The membership function (MF) shown in Fig. 5 and rule base of Table 3 have been considered same as that in [24] and [26] for Fuzzy PID controller. It is notable in [25] that adjustment in scaling factors has better impact on the Fuzzy controller execution than variations in the shapes of the MF. In this way each parameter tuning has different potential in influencing the performance of the controller.

Schematic diagram of (a) Fractional order Fuzzy PID controller (b) Fuzzy PID controller.

Membership functions of Fuzzy Logic Controller for inputs e (t) and output
Fuzzy Rules
In [27] authors discuss the simulation outcomes with tuned MF’s and tuning gave unsymmetrical (triangular) MF’s with uneven bases. Significant enhancement in transient reaction of a second-order system is observed. Besides, it increased the width of MF around. This type of MF’s negates the standard practice [28–30] where the MF’s have restricted range and become more and more close to the starting point. It makes the system sensitive at steady state conditions. In this way, the proposed MF’s tuning method [27] cannot ensure improved execution under disturbances. Tuning of the MF has shown the highest impact on the response and strength of the framework. Palm et al. [31] has also specified the same concept.
Thus this study has been considered exploring the impact of optimizing the scaling factor and holding the standard rules base and shapes of MF unaltered to improve response of the system. This methodology is superior from the point view of hardware realization. As, we have to tune two additional parameter rather than the shapes of MF and other factors. This study has considered Fuzzy rules base which is inferred by intuitive logic as in [24]. The arrangement of rules can be presented into the five sets (0–4) to rationalize the standard base as in Table 3, which is detailed in [29].
In this study for fuzzification, triangular MFs are preferred due to simple execution in practical hardware. However, from the perceptive of computational viability, memory use and response analysis, it is necessary to use uniform MFs [19]. Hence, the same MFs is selected for the Δf, d μ (Δf)/dt μ and the FLC output section.
In Table 3, the fuzzy linguistic variables NB, NM, NS, Z, PS, PM and PB with range [–1 1] represent Negative Big, Negative Medium, Negative Small, Zero, Positive Small, Positive Medium and Positive Big respectively. Mamdani inference method is considered in this paper. In Mamdani based inference system, it is feasible to describe rule-base that originated uniquely at some particular areas of the information space. This allows local adjustments of the working capacity of those specific areas without changing the capacity of the area outside (Mamdani 1994). Basically it provides nature interpreted and intuitive from the rule base. It gives better results in nonlinear system. The details of operator, implication and defuzzification methods presented in FLC are given in Table 4. In this study COG method (centre of gravity) is utilized for defuzzification and FLC is implemented in Fuzzy Logic Toolbox of Matlab 2015 a. The heuristic fuzzy rule base for this problem is given as follows.
Details of fuzzy inference system
Rule 1: If Δf is negative and d μ (Δf)/dt μ is negative then output is negative. ...
Rule 49: If Δf is negative and d μ (Δf)/dtμ is positive then output is zero.
Essentially, fitness function (J) is a numerical capacity demonstrating the nature of the findings created by any optimization issue. In other words fitness function is utilized to assess how close a given problem or system is to accomplish the pre-decided criteria.
This research study is adopted the following fitness function
Minimize J
Subject to
Here fitness function is used to minimize two problems: (1) minimize the frequency deviation (2) minimize the fluctuations in control signal. As both the problems are important, that’s why we have given equal weightage to both objectives [19, 20]. In this type of controller, there is constant trade off in the midst of load perturbation reduction (reducing Δf deviation to zero rapidly) and control exertion (Δu).
Various optimization search algorithms have been implemented by researchers. There is no particular algorithm to accomplish the best answer for all streamlining issues. A few algorithms give superior results for some specific issues than others. Henceforth, looking for new improvement algorithm is an open and challenging field. This research study adopts three search algorithms namely GA which are motivated from Darwinian evolutionary theory, PSO which are based upon the behaviour of flock of birds and GSA which supports Newton’s theory of gravity. In the next section, brief portrayals of adopted algorithms are presented.
Genetic algorithm (GA)
GA is a population based meta-heuristic investigation algorithm. It depends on natural selection that drives a genetic progression where stronger gene will be achiever. GA consistently changes a populace of every solution. GA includes three phases: Selection, Mutation, and Crossover to create optimal results [32]. The adopted parameters of GA are given in Table 5.
Parameters of GA
Parameters of GA
PSO relies upon the probability law which is impelled from the social lead of flying animals in finding food. The PSO involves following phases: The fitness of each particle must be determined. To refresh the individual and global bests Finally, to refresh position and velocity vectors of each particle.
In PSO,
Here the value of ‘w’ is assumed to vary linearly from 0.9 to 0, iter
max
represents the maximum number of iteration and iter represents the current iteration.
and
Parameters of PSO [20]
It is a heuristic search method supported by Newton’s law of gravitation and motion [34]. Here, every agent is considered as object and their respective efficiencies are obtained by their masses. The gravitational force is the driving medium for their interaction. The gravitational constant, G, at tth iteration is characterized as
The total force and acceleration of the agent k in the directiondth is computed as
The mass of each agent is calculated using fitness function. A heavier mass speaks to a progressively proficient agent. Taking the proportional gravitational/inertial mass, the estimations of masses are controlled by the fitness map. The updated gravitational/inertial masses are dictated by utilizing equations.
i = 1, 2, ... ., n
The employed parameters of GSA are given in Table 7.
Parameters of GSA
Performance evaluation of microgrid with three optimization algorithms for different controllers’ structure
This research work adopted three controllers namely PID, FPID and FOFPID to analyze the dynamic performance of the present microgrid. Three search algorithms GA, PSO, and GSA are also employed to search out optimized value of different parameters of the controllers. Each algorithm is being run with 20 population sizes for 100 generations. The results are reported in Table 8. This includes the statistical data (μ, σ,) with fitness index (J min ). The optimal parameters corresponding to each controller (PID, FPID and FOFPID) are given in Table 9.
Statistical analysis of different algorithms with proposed controllers
Statistical analysis of different algorithms with proposed controllers
Optimized parameters of controllers
It is clear from the reported data given in Table 8 that the FOFPID controller demonstrates the best results with each optimization algorithm. More over the best fitness (J min ) is obtained by the GSA based controllers compared to PSO and GA. The values ‘μ’ and ‘σ’ of the GSA as reported in Table 8 are very small against to the GA and PSO. It implies that in case of GSA information is firmly circulated (rather than generally spread) around the mean value. This generally signifies that the data does not change a lot. It indicates the consistency and stability of optimal results every time. The study of the reported data mentioned in Tables 8 and 9 clearly demonstrate the remarkable improvement with FOFPID controller optimized with GSA as compared to GA and PSO based controllers. Thus for further analysis of the system, GSA based controllers (PID, FPID and FOFPID) are considered.
Figure 6 illustrates the Δf and controller activated (Δu) signal for all three controllers with the reported optimization parameter obtained through GSA. It is observed from Fig. 6 that the fluctuations in control signal of PID controller are more noticeable when contrasted with other controllers. Moreover, the maximum amplitude of control signal in case of PID, FPID and FOFPID is 2.67pu, 2.62 pu and 2.30pu respectively. Thus least value of maximum amplitude of control signal and minimum band of oscillation can be seen in FOFPID controller. It is alluring as the consistent variation in control signal decreases the life span and execution of mechanical components. Also maximum frequency deviations in PID, FPID, and FOFPID are 0.1172 pu, 0.1135 pu and 0.1001pu respectively. It is also least prominent in the case of FOFPID as compared to other controllers whenever there are changes in load/power of stochastic component. Power delivered through each component of the microgrid for all controllers is represented in Fig. 7. The power generation curves of diesel generator and fuel cell show positive magnitude because they are energy delivering component while battery system and flywheel have negative power magnitude curves as they are energy retaining components. The oscillations in PDEG, PFESS, PBESS and PFC, are lesser with FOFPID controller in terms of sizing/requirement of energy storing /supplying components as can be seen in Fig. 7.

(a) Control signal with GSA based PID/FPID/FOFPID controller. (b) Frequency deviation with GSA based PID/FPID/FOFPID controller.

6ptPower output of each component with GSA based PID/FPID/FOFPID controller (a) for t = 0 –120 sec and (b) for t = 0 –5 sec.
Basically sensitivity analysis is done to test robustness against parametric variation. The same optimized values of parameters corresponding to GSA based PID/GSA based FPID/GSA based FOFPID controllers mentioned in Table 9 are used. To test the robustness of these controllers, values of different microgrid parameters one at a time is being changed (either +ve or –ve) in the range of±60%. The effective results in terms of fitness function values are reported in Table 10 and their responses with increase in parameter values and with decrease in parameter value are shown in Figs. 8 and 9 respectively. It is noticeable that larger values in system parameters have more adverse effects as compared to lower values in system parameters. It is also evident from the result given in Table 10 that PID is the least robust in all the three controllers for parametric variation. The FOFPID controller shows excellent performance in term of fitness function, overshoot and oscillations. The fitness function value (0.00134) in the case of FOFPID controller again exhibits its adequacy in contrast with FPID controller’s value (0.0024) and PID controller’s value (0.01456). It is noticeable that FOFPID gives the best outcome in all proposed controllers.
Sensitivity analysis against parametric variation
Sensitivity analysis against parametric variation

Sensitivity analysis against decrease in parametric value (a) t = 0–120 sec and (b) t = 0–5 sec.

Sensitivity analysis against increase in parametric value (a) for t = 0 –120 sec and (b) for t = 0 –5 sec.
The same optimized values of controller’s parameters have been considered here as in case of linear operation. The fluctuations and oscillations in power output are increased with inclusion of GRC. Figure 10 displays the representation of Generation Rate constraint for energy storing/generation systems. It is implemented by saturation block (with pre-defined upper and lower ranges) before integrator block.

Representation of Rate Constraint type nonlinearity.
A comparison of the performance of energy storage and generation elements with/without GRC is depicted in Fig. 11. By observing this figure, it is difficult to analyze which controller is more robust against nonlinearities. The fitness function value (0.00134) in the case of FOFPID controller again shows its superior response in contrast with FPID controller’s value (0.0024) and PID controller’s value (0.01456). Thus FOFPID gives best results in all the proposed controllers.

Realization of nonlinearity on energy storing/supplying components (a) for t = 0 –120 sec (b) for t = 0 –5 sec.
The implication of the results, which are obtained after doing simulation of the present microgrid system are discussed here The power fluctuation with FOFPID controller is least in magnitude. This implies that if the FOFPID controller is utilized, the sizing of these energy supply and storage systems can be made smaller. Additionally there are less prerequisites of providing and putting away capacity to stifle the microgrid frequency fluctuations. It diminishes flywheel twitch and diesel utilization making the overall power system control more economical. Statistical parameters i.e., mean and standard deviation values with GSA based FOFPID controllers are smaller than PSO and GA based FOFPID controller. This implies that GSA based controller gives better accuracy with consistent stability close to optimum value every time. Thus it provides quality solution and better convergence characteristics. The optimum solution is obtained in less number of iterations in GSA based FOFPID. This would facilitate the online implementation of tuning such controllers in future. GSA based FOFPID controller gives small frequency deviation. This implies that it will give better power quality. Faster damping of deficit grid power with less control signal implies that there is lesser actuator size requirement for fuel cell and diesel engine generator. It is evident from Fig. 6 that the band of fluctuations in control signal for the FOFPID controller is least as compared to PID or the Fuzzy PID controller. Large band of fluctuations deteriorates mechanical parts and consequently decreases its life span
Discussion and conclusion
This research work has implemented the FOFPID controller for suppressing the frequency deviation in present microgrid system. Parameters of FOFPID controllers are optimized by GSA. To validate the excellence of GSA in the present study, the results are compared with GA and PSO algorithms. The simulation results of FOFPID controller are contrasted with conventional PID and FPID. The results show the effectiveness of FOFPID controller over PID/FPID controllers in term of performance index, control signal oscillations, regulation of frequency deviation and statistical data (μ and σ). The best results are obtained with GSA based controllers in each case. To find best GSA based controller, further time domain analysis of system is done with GSA based PID/FPID/FOFPID controllers. From time domain analysis, we found that FOFPID controller gives best results in terms of performance index, decrease oscillations in frequency deviation, suppressed fluctuations in control signal and robustness against parametric variation. FOFPID controller also gives comparable performance with nonlinearities followed by FPID and PID.
Thus, GSA based FOFPID controller gives superior performance in contrast with other controllers. Future work may be directed toward the tuning of scaling factors of Fuzzy controller by employing other new soft computing techniques. Other control schemes like optimal fuzzy fractional order PID with filter (FOFPIDF), fuzzy fractional order PID with filter plus double integral controller (FOFPIDF-II), and fuzzy tilt integral derivative controller (FTIDF) etc. may be employed in future research work. The study may also be extended to multi microgrid system.
