Optimized Fuzzy-Cuckoo Controller for Active Power Control of Battery Energy Storage System, Photovoltaic, Fuel Cell and Wind Turbine in an Isolated Micro-Grid

: This paper presents a new control strategy for isolated micro-grids including wind turbines (WT), fuel cells (FC), photo-voltaic (PV) and battery energy storage systems (BESS). FC have been used in parallel with BESSs in order to increase their lifetime and efﬁciency. The changes in some parameters such as wind speed, sunlight, and consumption, lead to improper performance of droop. To overcome this challenge, a new intelligent method using a combination of fuzzy controller and cuckoo optimization algorithm (COA) techniques for active power controllers in isolated networks is proposed. In this paper, COA is compared with genetic algorithm (GA) and particles swarm optimization algorithm (PSO). In order to show efﬁciency of the proposed controller, this optimal controller has been compared with droop, optimized droop, and conventional fuzzy methods, the dynamic analysis of the island is implemented to assess the behavior of isolated generations accurately and simulation results are reported.


Introduction
In today's world, the depletion of fossil-fuel resources and also growing concerns about Co 2 emissions and global warming have led to an increasing utilization of renewable energy sources and distributed generation (DG) [1,2].In this situation, photovoltaic energy conversion is expected to have large potential to become an alternative power source especially for small distributed areas [3].Regarding the problems with complexity and financial inefficiency of transmission lines for supplying rural and remote areas with electrical power, DG is usually preferred for stand-alone operations [4].Wind and solar energy systems are taking the biggest share from this trend [5], so photovoltaic (PV) and wind turbine (WT) power generations, as clean electric power supplies, play an important role among renewable power generators.To increase energy reliability, WT and PV systems are used together in isolated networks [6,7].Storage energy system plays an important role in establishing a balance between production and consumption in isolated networks.Among storage systems, battery and fuel cells (FC) store energy during a long time, whereas super-conductor and ultra-capacitor (UC) do it in a short time [6].The energy storage systems discussed in this paper are UCs which significantly offer better performance especially during acceleration and braking manner due to charge time and discharge time of UCs can change broadly [8][9][10].The management and control of isolated networks deploying WT/PV/FC/UC is one of the most important issues in such networks.Heretofore, many methods have been utilized for the management of isolated and micro-grid networks.
Optimal management of these networks maximizes the efficiency of these networks [11,12].One of the fundamental approaches for controlling the output active power of the DGs in micro-grids and isolated networks is frequency droop characteristics [13].Also, improved droop control method is one of the best methods for voltage and frequency control in micro-grids and isolated networks [14].Employing fuzzy logic controllers (FLCs) for solving control problems has also increased in various power system control applications [15].Some of the fuzzy controller applications include excitation control, voltage and frequency control, power system stabilizers, etc. Regarding its efficiency and flexibility, the fuzzy controller is utilized for power management and frequency control in isolated micro-grids.Because of the uncertainty in system structure and also changes between production and consumption, droop controllers and fuzzy controllers cannot fulfill expectations.Also, isolated micro-grid systems are independent from the main net; this issue makes the control of the produced and consumed power even more difficult.In order to make the maximum benefit from these controllers, coefficients of the controllers have been optimized using COA.

Modeling Isolated Micro-Grid
Figure 1 illustrates the system configuration for the recommended method (hybrid alternative energy system).In this scheme, it is clear that battery energy storage system (BESS) is used for storing energy; both WT and PV technologies are primary energy producers and finally FC is issued as the energy supporter (backup).A mathematical model is applied to the proposed hybrid power technology.In simulation of hybrid systems, the dynamic response of each DG is individually considered in the dynamic model [16].
Batteries 2017, 3, 23 2 of 18 grid networks.Optimal management of these networks maximizes the efficiency of these networks [11,12].One of the fundamental approaches for controlling the output active power of the DGs in micro-grids and isolated networks is frequency droop characteristics [13].Also, improved droop control method is one of the best methods for voltage and frequency control in micro-grids and isolated networks [14].Employing fuzzy logic controllers (FLCs) for solving control problems has also increased in various power system control applications [15].Some of the fuzzy controller applications include excitation control, voltage and frequency control, power system stabilizers, etc.
Regarding its efficiency and flexibility, the fuzzy controller is utilized for power management and frequency control in isolated micro-grids.Because of the uncertainty in system structure and also changes between production and consumption, droop controllers and fuzzy controllers cannot fulfill expectations.Also, isolated micro-grid systems are independent from the main net; this issue makes the control of the produced and consumed power even more difficult.In order to make the maximum benefit from these controllers, coefficients of the controllers have been optimized using COA.

Modeling Isolated Micro-Grid
Figure 1 illustrates the system configuration for the recommended method (hybrid alternative energy system).In this scheme, it is clear that battery energy storage system (BESS) is used for storing energy; both WT and PV technologies are primary energy producers and finally FC is issued as the energy supporter (backup).A mathematical model is applied to the proposed hybrid power technology.In simulation of hybrid systems, the dynamic response of each DG is individually considered in the dynamic model [16].

Photovoltaic
Using PVs is a totally renewable and natural way for clean power generation.As presented in [17], the main factors affecting output power of PVs are namely sun irradiances, solar cell temperature, and PV array zone.The equivalent circuit of PV model mainly consists of a current source IL whose magnitude can be influenced by temperature and irradiance of sun, diode D, and internal shunt and series resistances RSh and RS.V-I characteristic can be given by (1):

Photovoltaic
Using PVs is a totally renewable and natural way for clean power generation.As presented in [17], the main factors affecting output power of PVs are namely sun irradiances, solar cell temperature, and PV array zone.The equivalent circuit of PV model mainly consists of a current source I L whose magnitude can be influenced by temperature and irradiance of sun, diode D, and internal shunt and series resistances R Sh and R S .V-I characteristic can be given by (1): Voltage of each cell is denoted by V PV with I PV being the current.Moreover, I o , q, A, K, and T are the reverse saturation current of diode, electron load, desirable p-n conjunction coefficient, Boltzmann constant, and temperature of cells, respectively [18].The factors on which the outputs of PV panels depend are sun radiations, cellular temperature, and the system ingredient performances.Therefore, it is expected that the acceptable output power should avail in various criteria.To achieve this task, multiple types of techniques are discussed in the literatures [19][20][21].The model parameters used in this research are summarized in Table 1.These parameters are presented according to the data given in [22].

Parameters
Value Unit

Wind Turbine
For blade pitch regulation variable-speed operation is necessary [23].The extracted power that is produced by WT is as follows: where V w , ρ and C p are wind velocity, swept area of rotor, and power factor respectively.C p depends on wind velocity (V w ), the rotatory velocity of the turbine, and blade parameters; it can be presented as: where R BW is the radius of blades in meters (m), ω bw is the rotational speed of blades in radian per second (rad/s), β w is the pitch angle of blades, and C 1 -C 9 are the constants.

Fuel Cell
FCs have different structures such as FCs working with polymer electrolyte, solid oxide fuel cell (SOFC), and alkaline FC.SOFC has been used in this study, which enjoys high efficiency and thermal robustness for high power systems.A perfect model of solid oxide fuel cell described in [24] is utilized in this study.The relationships between these parameters are given in [25].The power supplied by SOFC is obtained by: P r = V r I r (6) where V r and I r are the output voltage and output current, respectively.Output voltage of Fuel cell is calculated using the following equation: Fuel utilization (U f ) is the ratio between the reacted and supplied hydrogen as follows: Ratio between hydrogen and oxygen flow rate (RH_O) is defined as: Boost DC/DC Converter Due to its slow dynamics, FC is usually unable to satisfactorily supply the energy demand during the start-up period or abrupt load accelerations.In order to link an FC to an external system, FC voltage or the number of its cells should be increased.DC/DC boost converter in order to control the FC power, and to regulate the voltage increases the FC voltage.The boost converter is described by two non-linear state space averaged equations [25].

Battery Energy Storage System
Dynamic model of battery is illustrated in Figure 2. Batteries are among the most important energy storage devices in power systems.Although batteries have a slow dynamic response, their robustness and low price make them very practical.The BESS model consists of a controlled voltage source E and an internal resistor R.Moreover, the state of charge (SOC) depends on the capacity of battery and is calculated using ( 16) and ( 17) [18].r r r P VI  where r V and r I are the output voltage and output current, respectively.Output voltage of Fuel cell is calculated using the following equation: is the ratio between the reacted and supplied hydrogen as follows: Ratio between hydrogen and oxygen flow rate ( _ ) RH O is defined as: Boost DC/DC Converter Due to its slow dynamics, FC is usually unable to satisfactorily supply the energy demand during the start-up period or abrupt load accelerations.In order to link an FC to an external system, FC voltage or the number of its cells should be increased.DC/DC boost converter in order to control the FC power, and to regulate the voltage increases the FC voltage.The boost converter is described by two non-linear state space averaged equations [25].

Battery Energy Storage System
Dynamic model of battery is illustrated in Figure 2. Batteries are among the most important energy storage devices in power systems.Although batteries have a slow dynamic response, their robustness and low price make them very practical.The BESS model consists of a controlled voltage source E and an internal resistor R.Moreover, the state of charge (SOC) depends on the capacity of battery and is calculated using ( 16) and ( 17) [18].

Controller System
Controlling isolated networks and designing a controller for them are the most important issues about these networks.There are various applicable schemes for controlling isolated networks, including classic controllers, fuzzy controllers, adaptive and neural methods.Each one has its particular advantages and disadvantages like precision, speed, complexity, and resistivity in various dynamical conditions, implementation considerations, and so on.In this article, we use fuzzy and droop controllers because of their suitable features like simplicity, flexibility and high precision in a network consisting of WT/FC/BESS/PV.The duty of main controller is to determine the reference power of each unit by gathering the voltage and current data from network lines.This section describes the control system which is able to control the parallel operation of FC and BESS systems.Section 3.1 explains the basic concept of the frequency controller.Section 3.2 describes controller configuration of the droop control system and evaluates its performance and limitations of performance improvement.In the third subsection, the fuzzy controller design is discussed in order to determine the reference power produced by the FC and BESS.In the fourth section, the COA and its implementation for the optimization of droop and fuzzy controllers will be discussed.

Frequency Control Concept
When weather conditions change, power generations of WT and PV are affected.Also load variations during a day should not be neglected.So imbalances between production and consumption arise and therefore a suitable controller is needed for suitable power adjustment.In the studied parallel energy system, the electrical energy supplied by PV and WT are added through FC and BESS to assure the load demand.The total power of all generation units or P total is given by: P total = P WT + P PV + P FC ± P BESS (12) The power balance equation can be written as: The transfer function from power balance to frequency deviation can be written as: where M and D are positive constant which indicate the equivalent inertia and damping of the hybrid isolated Micro-grids and K is the hybrid system frequency characteristic constant [26].

Design of the Droop Controller
Figure 3 shows the droop characteristic of each unit.Appropriate load sharing between each unit can be obtained by suitable droop coefficients m FC and m BESS .

Fuzzy Logic Strategies
Owing to its low computational burden and stability, fuzzy controller is really appealing as an option.Some advantages of using FLC are sorted by numerous researchers who have placed their attention mainly on this issue [27,28].Fuzzy logic displays distinctions conforming to various shapes of membership functions (MFs) in system experiences.Fuzzification, rule base, inference engine, and defuzzification are four main components of a Mamdani fuzzy logic controller.The Fuzzy controller duty is to satisfy the power demand by managing the power flow obtained by different power sources.Since frequency deviation is in the range of (+0.1, −0.1), the control input is also in this interval.The second input is the derivative of these deviations.The structure of frequency FLC of the proposed hybrid isolated Micro-grid is shown in Figure 4.

Design of a Controller for Fuel Cells System
Fuzzy Logic Cintroller is intended to determine the power set-point for frequency control.This part fully explains the fuzzy controller design.The input variables of fuzzy system are frequency changes and derivative of frequency changes.The complete, consistent and normal membership functions are chosen as NB, NS, Z, PS and PB in the normalized interval for each of the input variables.Figure 5 shows the membership functions related to fuzzy controller input variables.The fuzzy controller determines the reference power of FC.FC controller output also has five MFs.In Table 2 the rule bases are designed based on system condition and designer's experience to control

Fuzzy Logic Strategies
Owing to its low computational burden and stability, fuzzy controller is really appealing as an option.Some advantages of using FLC are sorted by numerous researchers who have placed their attention mainly on this issue [27,28].Fuzzy logic displays distinctions conforming to various shapes of membership functions (MFs) in system experiences.Fuzzification, rule base, inference engine, and defuzzification are four main components of a Mamdani fuzzy logic controller.The Fuzzy controller duty is to satisfy the power demand by managing the power flow obtained by different power sources.Since frequency deviation is in the range of (+0.1, −0.1), the control input is also in this interval.The second input is the derivative of these deviations.The structure of frequency FLC of the proposed hybrid isolated Micro-grid is shown in Figure 4.

Fuzzy Logic Strategies
Owing to its low computational burden and stability, fuzzy controller is really appealing as an option.Some advantages of using FLC are sorted by numerous researchers who have placed their attention mainly on this issue [27,28].Fuzzy logic displays distinctions conforming to various shapes of membership functions (MFs) in system experiences.Fuzzification, rule base, inference engine, and defuzzification are four main components of a Mamdani fuzzy logic controller.The Fuzzy controller duty is to satisfy the power demand by managing the power flow obtained by different power sources.Since frequency deviation is in the range of (+0.1, −0.1), the control input is also in this interval.The second input is the derivative of these deviations.The structure of frequency FLC of the proposed hybrid isolated Micro-grid is shown in Figure 4.

Design of a Controller for Fuel Cells System
Fuzzy Logic Cintroller is intended to determine the power set-point for frequency control.This part fully explains the fuzzy controller design.The input variables of fuzzy system are frequency changes and derivative of frequency changes.The complete, consistent and normal membership functions are chosen as NB, NS, Z, PS and PB in the normalized interval for each of the input variables.Figure 5 shows the membership functions related to fuzzy controller input variables.The fuzzy controller determines the reference power of FC.FC controller output also has five MFs.In Table 2 the rule bases are designed based on system condition and designer's experience to control

Design of a Controller for Fuel Cells System
Fuzzy Logic Cintroller is intended to determine the power set-point for frequency control.This part fully explains the fuzzy controller design.The input variables of fuzzy system are frequency changes and derivative of frequency changes.The complete, consistent and normal membership functions are chosen as NB, NS, Z, PS and PB in the normalized interval for each of the input variables.Figure 5 shows the membership functions related to fuzzy controller input variables.The fuzzy controller determines the reference power of FC.FC controller output also has five MFs.In Table 2 the rule bases are designed based on system condition and designer's experience to control the FC.In this table, the error corresponds to frequency deviation and error change corresponds to derivative of frequency deviation.The fuzzy controller for BESS is also includes MFs for its inputs and outputs similar to the previous section.Input variables include frequency changes and derivative of frequency changes of the hybrid isolated micro-grid and the output is set-point for the generated power.The fuzzy rules are summarized in Table 3. Fuzzy rules are designed based on frequency deviation compensation gained by BESS and the frequency regulations achieved by FC system.

Cuckoo Optimization Algorithm (COA)-Fuzzy Frequency Controller
Recently, optimization methods have been applied to enhance capabilities of the controllers.There are a couple of methods to optimize fuzzy controllers: (1) Optimization of membership functions (2) Optimization of coefficients of the controller  The fuzzy controller for BESS is also includes MFs for its inputs and outputs similar to the previous section.Input variables include frequency changes and derivative of frequency changes of the hybrid isolated micro-grid and the output is set-point for the generated power.The fuzzy rules are summarized in Table 3. Fuzzy rules are designed based on frequency deviation compensation gained by BESS and the frequency regulations achieved by FC system.

Cuckoo Optimization Algorithm (COA)-Fuzzy Frequency Controller
Recently, optimization methods have been applied to enhance capabilities of the controllers.There are a couple of methods to optimize fuzzy controllers: (1) Optimization of membership functions (2) Optimization of coefficients of the controller Since membership functions are similar to each other, changing them does not have a substantial effect on reducing the system error, and because of the fact that deriving the precise interval of fuzzy controllers is difficult, the second method is chosen.Algorithms like genetic, ants' colony, bees' colony, and so on can be used to optimize controllers [29].We have used COA because of its advantages [30].
The considered system has two fuzzy controllers; each controller has three coefficients that must be optimized in inputs and outputs.Figure 6 shows the optimized fuzzy controller.The optimized coefficients include: (1) Input gain of the controllers that includes error and change error.(Error corresponding to frequency deviation and change error corresponding to derivative of frequency deviation).( 2) The output gain that is related to the optimization of controlling signal.
The COA is a direct search optimization method based on natural models which can find an optimal solution for the optimization problems [30].The main advantage of the COA in comparison with other intelligent methods is the simplicity of implementation.Other outstanding features of the COA are pointed out in [31].
Batteries 2017, 3, 23 8 of 18 Since membership functions are similar to each other, changing them does not have a substantial effect on reducing the system error, and because of the fact that deriving the precise interval of fuzzy controllers is difficult, the second method is chosen.Algorithms like genetic, ants' colony, bees' colony, and so on can be used to optimize controllers [29].We have used COA because of its advantages [30].The considered system has two fuzzy controllers; each controller has three coefficients that must be optimized in inputs and outputs.Figure 6 shows the optimized fuzzy controller.The optimized coefficients include: (1) Input gain of the controllers that includes error and change error.(Error corresponding to frequency deviation and change error corresponding to derivative of frequency deviation).( 2) The output gain that is related to the optimization of controlling signal.
The COA is a direct search optimization method based on natural models which can find an optimal solution for the optimization problems [30].The main advantage of the COA in comparison with other intelligent methods is the simplicity of implementation.Other outstanding features of the COA are pointed out in [31].

Structure of Cuckoo Optimization Algorithm
COA is a novel evolutionary optimization algorithm which is inspired by cuckoo's unique lifestyle.A brief review of this bird's survival and reproduction process can help us understand the main idea behind this algorithm.Known as "brood parasites", cuckoos never parent their own eggs, they lay eggs in other birds' nests and let other species take care of them and grow their young.Although cuckoos try to mimic hosts' eggs and improve this mimicry for the next time, there are some species that can detect the parasitic eggs and destroy them.This challenge between the parasite and host goes on and they both try to out-survive.
Figure 7 shows the flowchart for COA.This algorithm has an initial population of cuckoos as its starting point.Then this population starts laying their eggs in the hosts' nests.Some of these eggs that are similar to the hosts' ones have the chance to survive and grow up.Others get detected by the host and will be killed.The number of the surviving cuckoos can be a measure of the suitability of that area as a habitat for cuckoos.In fact, COA is trying to optimize the position, in which more eggs will survive and find the best habitat for them.
In order to use COA, first we have to define an initial habitat.Like "chromosome" in genetic algorithm (GA) and "particle position" in particles swarm optimization algorithm (PSO), a habitat is an array of

Structure of Cuckoo Optimization Algorithm
COA is a novel evolutionary optimization algorithm which is inspired by cuckoo's unique lifestyle.A brief review of this bird's survival and reproduction process can help us understand the main idea behind this algorithm.Known as "brood parasites", cuckoos never parent their own eggs, they lay eggs in other birds' nests and let other species take care of them and grow their young.Although cuckoos try to mimic hosts' eggs and improve this mimicry for the next time, there are some species that can detect the parasitic eggs and destroy them.This challenge between the parasite and host goes on and they both try to out-survive.
Figure 7 shows the flowchart for COA.This algorithm has an initial population of cuckoos as its starting point.Then this population starts laying their eggs in the hosts' nests.Some of these eggs that are similar to the hosts' ones have the chance to survive and grow up.Others get detected by the host and will be killed.The number of the surviving cuckoos can be a measure of the suitability of that area as a habitat for cuckoos.In fact, COA is trying to optimize the position, in which more eggs will survive and find the best habitat for them.
In order to use COA, first we have to define an initial habitat.Like "chromosome" in genetic algorithm (GA) and "particle position" in particles swarm optimization algorithm (PSO), a habitat is an array of 1 × N var in which variables are floating point numbers.This array represents cuckoo's current living position: habitat = [x 1 , x 2 , . . . ,x Nvar ] Then a profit function should be determined to evaluate each habitat: Batteries 2017, 3, 23 9 of 18 By determining the number of the eggs that each cuckoo can lay and variable limits ( var hi and var low ) and also dedicating an "Egg Laying Radius" (ELR) to them, optimization algorithm sets out to maximize the profit:

Number of current cuckoo's eggs (var var )
Total number of eggs By adjusting the coefficient α we can alter the maximum ELR as we desire.Note that cuckoo grouping is done by using K-means clustering method.The optimization process uses K-means clustering method for grouping the cuckoos.Then, by calculating the mean profit value and pointing out the best habitat with maximum profit, the cuckoos will move toward the best habitat as much as they can.Obviously, cuckoos cannot fly all the way to the best habitat; they fly a percentage of distance ( %  ) and they have deviations from the point ( ).This reproduction and immigration cycle will continue till most cuckoos are gathered in a particular area (optimum point).Clearly, the two parameters λ and  are defined as:  By determining the number of the eggs that each cuckoo can lay and variable limits (var hi and var low ) and also dedicating an "Egg Laying Radius" (ELR) to them, optimization algorithm sets out to maximize the profit: By adjusting the coefficient α we can alter the maximum ELR as we desire.Note that cuckoo grouping is done by using K-means clustering method.The optimization process uses K-means clustering method for grouping the cuckoos.Then, by calculating the mean profit value and pointing out the best habitat with maximum profit, the cuckoos will move toward the best habitat as much as they can.Obviously, cuckoos cannot fly all the way to the best habitat; they fly a percentage of distance (λ%) and they have deviations from the point (φ).This reproduction and immigration cycle will continue till most cuckoos are gathered in a particular area (optimum point).Clearly, the two parameters λ and φ are defined as: COA uses all the aforementioned parameters and finds new habitats for each generation of cuckoos.In several iterations, the optimum point with maximum profit is reached.

Cuckoo Optimization Algorithm Optimized Droop Controller
As we have discussed in the last section, coefficients related to the droop controllers are derived.However, the derived relations are not exact and we would not have a suitable controlling scheme.In order to optimize droop coefficients, initial values are obtained by equations of main drop controller.Then, by considering nominal value of each generator an interval is chosen for each coefficient.The goal is to minimize frequency changes by choosing the optimal coefficients using COA.The structure of optimal droop frequency controller of the proposed isolated Micro-grid is shown in Figure 8.
Batteries 2017, 3, 23 10 of 18 COA uses all the aforementioned parameters and finds new habitats for each generation of cuckoos.In several iterations, the optimum point with maximum profit is reached.

Cuckoo Optimization Algorithm Optimized Droop Controller
As we have discussed in the last section, coefficients related to the droop controllers are derived.However, the derived relations are not exact and we would not have a suitable controlling scheme.In order to optimize droop coefficients, initial values are obtained by equations of main drop controller.Then, by considering nominal value of each generator an interval is chosen for each coefficient.The goal is to minimize frequency changes by choosing the optimal coefficients using COA.The structure of optimal droop frequency controller of the proposed isolated Micro-grid is shown in Figure 8.

Simulation Results
Simulations are organized in two scenarios.In the simulation studies, the proposed setup system has been developed in MATLAB/SIMULINK environment.The system in this paper has been tested under the given data from each part of the system (load power demand data, PV data, and WT data).The results attained by applying the algorithms are presented in Table 4.In this paper, a comparison is made between COA and two other optimization algorithms, namely GA and PSO, and its higher efficiency is demonstrated.In this table, the error of frequency deviation has been used as an index for evaluating efficiency of these algorithms.The results shown in this table approve that COA is more efficient.

Case Study 1
The hourly solar radiation data and wind speed during this scenario are presented in Figures 9  and 10, respectively.It assumed that wind speed is changing between 10 and 13 m/s and irradiation energy of sun can be obtained from 6:30 to 18:00 in local time zone.

Simulation Results
Simulations are organized in two scenarios.In the simulation studies, the proposed setup system has been developed in MATLAB/SIMULINK environment.The system in this paper has been tested under the given data from each part of the system (load power demand data, PV data, and WT data).The results attained by applying the algorithms are presented in Table 4.In this paper, a comparison is made between COA and two other optimization algorithms, namely GA and PSO, and its higher efficiency is demonstrated.In this table, the error of frequency deviation has been used as an index for evaluating efficiency of these algorithms.The results shown in this table approve that COA is more efficient.

Case Study 1
The hourly solar radiation data and wind speed during this scenario are presented in Figures 9 and 10, respectively.It assumed that wind speed is changing between 10 and 13 m/s and irradiation energy of sun can be obtained from 6:30 to 18:00 in local time zone.The load demand power curve during 24 h is shown in Figure 11.It can be seen that variations of the load demand is between 0.45(p.u.) and 0.95(p.u.) which this behavior is depended on the variety of loads and seasons changes during the years.In Figures 12 and 13 the generated power of PV and WT are shown respectively.It has been expected that the output of PV power generation has the same behavior as irradiance of sun in Figure 9 and output power of wind turbine during the time be similar to wind profile.Priorities in this paper are benefiting from PV and WT generations in the first place.The load demand power curve during 24 h is shown in Figure 11.It can be seen that variations of the load demand is between 0.45(p.u.) and 0.95(p.u.) which this behavior is depended on the variety of loads and seasons changes during the years.In Figures 12 and 13 the generated power of PV and WT are shown respectively.It has been expected that the output of PV power generation has the same behavior as irradiance of sun in Figure 9 and output power of wind turbine during the time be similar to wind profile.Priorities in this paper are benefiting from PV and WT generations in the first place.The load demand power curve during 24 h is shown in Figure 11.It can be seen that variations of the load demand is between 0.45(p.u.) and 0.95(p.u.) which this behavior is depended on the variety of loads and seasons changes during the years.The load demand power curve during 24 h is shown in Figure 11.It can be seen that variations of the load demand is between 0.45(p.u.) and 0.95(p.u.) which this behavior is depended on the variety of loads and seasons changes during the years.In Figures 12 and 13 the generated power of PV and WT are shown respectively.It has been expected that the output of PV power generation has the same behavior as irradiance of sun in Figure 9 and output power of wind turbine during the time be similar to wind profile.Priorities in this paper are benefiting from PV and WT generations in the first place.In Figures 12 and 13 the generated power of PV and WT are shown respectively.It has been expected that the output of PV power generation has the same behavior as irradiance of sun in Figure 9 and output power of wind turbine during the time be similar to wind profile.Priorities in this paper are benefiting from PV and WT generations in the first place.The SOFC system power command is achieved according to the values of demanded power deviations, BESS power and WT.It can be seen that in the hours from 18:00 to 24:00 there is no solar radiation, and high demand is for consumption.It is expected to compensate this demand by SOFC and BESS generations.The power produced by SOFC system is shown in Figure 14.The power applied by BESS units in this hybrid isolated network for controlling the frequency deviation is illustrated in Figure 15.Deviation in the frequency is the result of difference between energy demand and the energy provided by WT/FC/PV/BESS systems which is illustrated in Figure 16.By coordination of FC and BESS, this deviation can be controlled.Figure 16 compares the proposed optimal fuzzy controller method with droop, fuzzy, and optimal droop controllers and the superiority of the proposed optimal fuzzy controller can be seen.The SOFC system power command is achieved according to the values of demanded power deviations, BESS power and WT.It can be seen that in the hours from 18:00 to 24:00 there is no solar radiation, and high demand is for consumption.It is expected to compensate this demand by SOFC and BESS generations.The power produced by SOFC system is shown in Figure 14.The power applied by BESS units in this hybrid isolated network for controlling the frequency deviation is illustrated in Figure 15.Deviation in the frequency is the result of difference between energy demand and the energy provided by WT/FC/PV/BESS systems which is illustrated in Figure 16.By coordination of FC and BESS, this deviation can be controlled.Figure 16 compares the proposed optimal fuzzy controller method with droop, fuzzy, and optimal droop controllers and the superiority of the proposed optimal fuzzy controller can be seen.The SOFC system power command is achieved according to the values of demanded power deviations, BESS power and WT.It can be seen that in the hours from 18:00 to 24:00 there is no solar radiation, and high demand is for consumption.It is expected to compensate this demand by SOFC and BESS generations.The power produced by SOFC system is shown in Figure 14.The power applied by BESS units in this hybrid isolated network for controlling the frequency deviation is illustrated in Figure 15.Deviation in the frequency is the result of difference between energy demand and the energy provided by WT/FC/PV/BESS systems which is illustrated in Figure 16.By coordination of FC and BESS, this deviation can be controlled.Figure 16 compares the proposed optimal fuzzy controller method with droop, fuzzy, and optimal droop controllers and the superiority of the proposed optimal fuzzy controller can be seen.The SOFC system power command is achieved according to the values of demanded power deviations, BESS power and WT.It can be seen that in the hours from 18:00 to 24:00 there is no solar radiation, and high demand is for consumption.It is expected to compensate this demand by SOFC and BESS generations.The power produced by SOFC system is shown in Figure 14.The power applied by BESS units in this hybrid isolated network for controlling the frequency deviation is illustrated in Figure 15.Deviation in the frequency is the result of difference between energy demand and the energy provided by WT/FC/PV/BESS systems which is illustrated in Figure 16.By coordination of FC and BESS, this deviation can be controlled.Figure 16 compares the proposed optimal fuzzy controller method with droop, fuzzy, and optimal droop controllers and the superiority of the proposed optimal fuzzy controller can be seen.

Case Study 2
In this scenario it is assumed that wind speed is changing between 7 m/s and 11 m/s.The hourly solar radiation data by considering the effects of clouds in the sky and wind speed during this simulation process are presented in Figures 17 and 18, respectively.Priorities in this scenario are benefiting from PV and WT generations in the first place as like as previous scenario.

Case Study 2
In this scenario it is assumed that wind speed is changing between 7 m/s and 11 m/s.The hourly solar radiation data by considering the effects of clouds in the sky and wind speed during this simulation process are presented in Figures 17 and 18, respectively.Priorities in this scenario are benefiting from PV and WT generations in the first place as like as previous scenario.

Case Study 2
In this scenario it is assumed that wind speed is changing between 7 m/s and 11 m/s.The hourly solar radiation data by considering the effects of clouds in the sky and wind speed during this simulation process are presented in Figures 17 and 18, respectively.Priorities in this scenario are benefiting from PV and WT generations in the first place as like as previous scenario.

Case Study 2
In this scenario it is assumed that wind speed is changing between 7 m/s and 11 m/s.The hourly solar radiation data by considering the effects of clouds in the sky and wind speed during this simulation process are presented in Figures 17 and 18, respectively.Priorities in this scenario are benefiting from PV and WT generations in the first place as like as previous scenario.The load demand power in 24 h is shown in Figure 19.The peak hours are between 15:00 and 23:00 according to local time zone.The load demand power in 24 h is shown in Figure 19.The peak hours are between 15:00 and 23:00 according to local time zone.The load demand power in 24 h is shown in Figure 19.The peak hours are between 15:00 and 23:00 according to local time zone.The SOFC system generation is shown in Figure 22 and Figure 23 shows the BESS generation, which consists of the exceeded power of load demand.It can be seen whenever in spite of no SOFC generation, the total generation using WT and PV exceeds consumption, BESS can absorb the surplus generation, and thus battery power becomes negative.The controlled frequency deviation by coordination of FC and BESS is shown in Figure 24.The comparison between the optimal fuzzy controller method with droop, fuzzy, and optimal droop controllers is shown in Figure 24 and the simulation results show a good performance of the optimal fuzzy controller.The SOFC system generation is shown in Figures 22 and 23 shows the BESS generation, which consists of the exceeded power of load demand.It can be seen whenever in spite of no SOFC generation, the total generation using WT and PV exceeds consumption, BESS can absorb the surplus generation, and thus battery power becomes negative.The controlled frequency deviation by coordination of FC and BESS is shown in Figure 24.The comparison between the optimal fuzzy controller method with droop, fuzzy, and optimal droop controllers is shown in Figure 24 and the simulation results show a good performance of the optimal fuzzy controller.The SOFC system generation is shown in Figure 22 and Figure 23 shows the BESS generation, which consists of the exceeded power of load demand.It can be seen whenever in spite of no SOFC generation, the total generation using WT and PV exceeds consumption, BESS can absorb the surplus generation, and thus battery power becomes negative.The controlled frequency deviation by coordination of FC and BESS is shown in Figure 24.The comparison between the optimal fuzzy controller method with droop, fuzzy, and optimal droop controllers is shown in Figure 24 and the simulation results show a good performance of the optimal fuzzy controller.The SOFC system generation is shown in Figure 22 and Figure 23 shows the BESS generation, which consists of the exceeded power of load demand.It can be seen whenever in spite of no SOFC generation, the total generation using WT and PV exceeds consumption, BESS can absorb the surplus generation, and thus battery power becomes negative.The controlled frequency deviation by coordination of FC and BESS is shown in Figure 24.The comparison between the optimal fuzzy controller method with droop, fuzzy, and optimal droop controllers is shown in Figure 24 and the simulation results show a good performance of the optimal fuzzy controller.

Conclusions
In this paper, a new control strategy in isolated micro-grids in the presence of BESS/FC/PV/WT was implemented and a dynamic response was simulated.The WT and PV system outputs change under different weather conditions.In the case of BESS failure, FC is connected to the network.In this paper, three optimization algorithms were utilized for optimizing fuzzy controllers.Among these three algorithms, it was shown that COA led to better results in setting the fuzzy controller coefficients with 59% and 68% fewer errors compared to GA and PSO.The proposed hybrid power system combined with the new optimal FLC algorithm reduced the FC system size while satisfying the peak power demand.In this study, a controller with droop method was suggested which did not show a high efficiency in reducing frequency changes.In order to enhance the efficiency of the controllers, each one was optimized by COA.Simulation results showed that the optimal fuzzy controller has superior efficiency over the other methods.
Author Contributions: The main idea of this article is designed and co-authored by all individuals.Mohsen Einan has been involved in computer simulations; Hossein Torkaman has collaborated on the guiding and writing the power system section of the paper; Mahdi Pourgholi has collaborated on the guiding and writing controller design section.

Conclusions
In this paper, a new control strategy in isolated micro-grids in the presence of BESS/FC/PV/WT was implemented and a dynamic response was simulated.The WT and PV system outputs change under different weather conditions.In the case of BESS failure, FC is connected to the network.In this paper, three optimization algorithms were utilized for optimizing fuzzy controllers.Among these three algorithms, it was shown that COA led to better results in setting the fuzzy controller coefficients with 59% and 68% fewer errors compared to GA and PSO.The proposed hybrid power system combined with the new optimal FLC algorithm reduced the FC system size while satisfying the peak power demand.In this study, a controller with droop method was suggested which did not show a high efficiency in reducing frequency changes.In order to enhance the efficiency of the controllers, each one was optimized by COA.Simulation results showed that the optimal fuzzy controller has superior efficiency over the other methods.

Figure 1 .
Figure 1.The block diagram of the proposed hybrid isolated micro-grids.

Figure 1 .
Figure 1.The block diagram of the proposed hybrid isolated micro-grids.

Figure 2 .
Figure 2. Dynamic model of a battery. s

Figure 3 .
Figure 3.The droop characteristics of each unit.

Figure 4 .
Figure 4. Employing fuzzy logic controller (FLC) structure of the proposed isolated Micro-grids.

Figure 3 .
Figure 3.The droop characteristics of each unit.

Figure 4 .
Figure 4. Employing fuzzy logic controller (FLC) structure of the proposed isolated Micro-grids.

Figure 4 .
Figure 4. Employing fuzzy logic controller (FLC) structure of the proposed isolated Micro-grids.
Batteries 2017, 3, 23 7 of 18 the FC.In this Table, the error corresponds to frequency deviation and error change corresponds to derivative of frequency deviation.

Figure 5 .
Figure 5. Membership functions for the input and output signals of fuzzy controller.

Figure 5 .
Figure 5. Membership functions for the input and output signals of fuzzy controller.

Figure 6 .
Figure 6.The optimal fuzzy structure of the proposed isolated network.

Figure 6 .
Figure 6.The optimal fuzzy structure of the proposed isolated network.

Figure 14 .
Figure 14.Output power of solid oxide fuel cell (SOFC) using the proposed method.

Figure 14 .
Figure 14.Output power of solid oxide fuel cell (SOFC) using the proposed method.

Figure 14 .
Figure 14.Output power of solid oxide fuel cell (SOFC) using the proposed method.Figure 14.Output power of solid oxide fuel cell (SOFC) using the proposed method.

Figure 14 .
Figure 14.Output power of solid oxide fuel cell (SOFC) using the proposed method.Figure 14.Output power of solid oxide fuel cell (SOFC) using the proposed method.

Figure 15 .
Figure 15.Applied power of BESS unit.

Figure 19 .
Figure 19.The load power demand.

Figure 20
Figure20shows PV power generation in respect to irradiance of sun despite the clouds in the sky and Figure21shows wind speed during 24 h in respect to wind profile.

Figure 19 .
Figure 19.The load power demand.

Figure 20
Figure20shows PV power generation in respect to irradiance of sun despite the clouds in the sky and Figure21shows wind speed during 24 h in respect to wind profile.

Figure 19 .
Figure 19.The load power demand.

Figure 20 18 Figure 18 .
Figure20shows PV power generation in respect to irradiance of sun despite the clouds in the sky and Figure21shows wind speed during 24 h in respect to wind profile.

Figure 19 .
Figure 19.The load power demand.

Figure 20
Figure20shows PV power generation in respect to irradiance of sun despite the clouds in the sky and Figure21shows wind speed during 24 h in respect to wind profile.

Figure 20 .
Figure 20.Output power of PV.Figure 20.Output power of PV.

Figure 20 .
Figure 20.Output power of PV.Figure 20.Output power of PV.

Figure 22 .
Figure 22.Output power of SOFC using the proposed method.

Figure 23 .
Figure 23.Applied power of BESS unit.

Figure 22 .
Figure 22.Output power of SOFC using the proposed method.

Figure 23 .
Figure 23.Applied power of BESS unit.

Figure 22 .
Figure 22.Output power of SOFC using the proposed method.

Figure 22 .
Figure 22.Output power of SOFC using the proposed method.

Figure 23 .
Figure 23.Applied power of BESS unit.Figure 23.Applied power of BESS unit.

Figure 23 .
Figure 23.Applied power of BESS unit.Figure 23.Applied power of BESS unit.

Table 2 .
Input and output rule bases of fuel cells (FC) fuzzy controller.

Table 3 .
Input and output rule bases of battery energy storage systems (BESS) fuzzy controller.

Table 2 .
Input and output rule bases of fuel cells (FC) fuzzy controller.

Table 3 .
Input and output rule bases of battery energy storage systems (BESS) fuzzy controller.

Table 4 .
Compare between difference optimization algorithms.

Table 4 .
Compare between difference optimization algorithms.