Designing an Energy Storage System Fuzzy PID Controller for Microgrid Islanded Operation

Recently, interest in microgrids, which are composed of distributed generation (DG), distributed storage (DS), and loads, has been growing as a potentially effective clean energy system to mitigate against climate change. The microgrid is operated in the grid-connected mode and the islanded mode according to the conditions of the upstream power grid. The role of the energy storage system (ESS) is especially important to maintain constant the frequency and voltage of an islanded microgrid. For this reason, various approaches for ESS control have been put forth. In this paper, a fuzzy PID controller is proposed to improve the frequency control performance of the ESS. This fuzzy PID controller consists of a fuzzy logic controller and a conventional PI controller, connected in series. The fuzzy logic controller has two input signals, and then the output signal of the fuzzy logic controller is the input signal of the conventional PI controller. For comparison of control performance, gains of each PI controller and fuzzy PID controller are tuned by the particle swam optimization (PSO) algorithm. In the simulation study, the control performance of the fuzzy PID was also tested under various operating conditions using the PSCAD/EMTDC simulation platform.


Introduction
Though the penetration of distributed generation (DG) into the electric power system is limited due to the insufficient economic benefits, it will be accelerated for various reasons.The increase in DG penetration depth and the presence of multiple DG units in electrical grids have brought about the concept of the microgrid [1][2][3][4], which is a cluster of interconnected DG units, loads and intermediate energy storage systems.
Compared to a single DG unit, a microgrid can provide greater technical benefits and control flexibility to the utility grid.The microgrid also offers economical opportunities by introducing combined heat and power (CHP) units, which are currently the most important means of improving energy efficiency [5,6].This system is interconnected to the distribution network of the utility, but they can also be operated in isolated mode from the main grid in the case of faults in the upstream network [7][8][9][10].In grid-connected mode, the frequency and voltage of the microgrid is maintained within a tight range by the main grid.However, in an islanded operation, the frequency and voltage should be controlled only by existing DG units in the microgrid.Moreover, in islanded mode, with relatively few DG units, the frequency and voltage control of the microgrid is not straightforward.In particular, the frequency of the microgrid will fluctuate rapidly due to the intrinsic characteristics of the renewable energy source (RES) and DG units.The RESs have an intermittent nature since their power outputs depend on the availability of some primary source, i.e., wind and sun, and thus they cannot ensure the constant power supply required by loads.Furthermore, the DG units with relatively slow response primary energy sources have insufficient dynamic performance in terms of load tracking [11,12].Therefore, stabilizing the frequency and voltage is one of the main issues in islanded operation [13].To overcome these limitations, the introduction of an energy storage system (ESS) is considered to be an effective solution.The ESS is based on a power electronics device and has a very fast response time.Therefore, a properly designed ESS can allow a system to stabilize by absorbing and injecting instantaneous power.Studies have been reported on the use of ESSs to stabilize power systems and RESs [14][15][16].In [14,15], a control scheme for reducing the power fluctuation of a wind generation system is presented.This scheme utilizes the stored energy of the ESS to smooth the power output of the wind generation system.In addition, the ESS can contribute to stabilize the frequency of an isolated power system [16].Discussions on the use of an ESS in a microgrid are presented in [17][18][19][20].
Applications of power electronics interfaced DG systems with an ESS are presented in [17][18][19].In [17][18][19], the ESS is installed in a common dc link to complement the slower power output of the primary energy source, particularly fuel cells.By installing the ESS in a DG system with a relatively slow response primary energy source, a microgrid can be stabilized during islanded mode, even if the load changes quickly.The application of an electric double layer capacitor (EDLC) as a power system stabilizer is presented in [20].These previous works indicate that control capability of the ESS is limited by the energy capacity of the storage device.If only the ESS is involved in stabilizing the microgrid, it may be result in an operational failure of the ESS.To prevent the ESS from operation failure, the power outputs of the dispatchable DG units should be coordinated to share the load following burden of the ESS.In [21], a coordinated control strategy of ESS and DG in microgrids for islanded operation is proposed.This control strategy consists of a primary control action of the ESS and a secondary control action of the microgrid management system (MMS).During islanded operation, the frequency and voltage are regulated by the fast-acting primary control of the ESS.The secondary control of the MMS detects the change of the power output of the ESS and tries to return the power output of the ESS to reference value by dispatching the power output set points of dispatchable DG units.
Meanwhile, quality of the frequency and voltage in microgrid during islanded operation mainly depends on the control performance of the ESS.Therefore, improving the control performance of the ESS is an important technical issue regarding microgrid islanded operation.The ESS has two controllers, an upper grid controller and a lower current controller [22].For these controllers, conventional PI controllers are widely applied.This is mainly because PI controllers have simple control structures, and are simple to maintain.The drawback of such PI controllers is that their performance degrades as the system operating conditions change.Recently, applications of fuzzy logic theory to engineering issues have drawn tremendous attention from researchers [23,24].The fuzzy logic controller has a number of distinguishing advantages over conventional controllers.It is not so sensitive to variations of system structure, parameters and operation points and can be easily implemented in a large scale nonlinear system.Furthermore, the fuzzy logic controller is a sophisticated technique that is easy to design and implement.In addition, in the past decade, many researchers have attempted to combine conventional PID controllers with fuzzy logic to improve controller performance [25,26].
In this paper, a fuzzy PID controller to improve the frequency control performance of the ESS is proposed.This fuzzy PID controller consists of a fuzzy logic controller and a conventional PI controller, connected in series.The fuzzy logic controller has two input signals, and the output signal of the fuzzy logic controller is the input signal of the conventional PI controller.For comparison of control performance, gains of each PI controller and fuzzy PID controller are tuned by the particle swam optimization (PSO) algorithm.In the simulation study, the control performance of the fuzzy PID was also tested under various operating conditions using the PSCAD/EMTDC simulation platform.

Microgrid Configuration
A microgrid consists of low voltage (LV) distribution systems with DG units, e.g., CHP units, microturbines, fuel cells, PV systems, and wind turbines (WT), together with ESS and loads.A microgrid is coupled with the main utility grid through an interconnection switch at the PCC as per standard interface regulations.The interconnection switch at the PCC is operated to connect and disconnect the entire microgrid from the main utility grid as per the selected mode of operation [1,2].The microgrid operates in parallel with a utility grid under normal situations.The microgrid disconnects from the utility grid, and transfers into islanded operation mode when a fault occurs in the upstream grid.The microgrid has a hierarchical control structure as shown in Figure 1.
It has two control levels: central control level and local control level.The management of microgrid in two operation modes is performed through a local controller at the DG units and ESS, and a central controller like a MMS [21].The MMS is a supervisory centralized controller that includes several key functions (such as economic managing functions and control functionalities).It can exchange information with the DG units and dispatch the power output set points to the LC of the DG units.The LC that is located at each DG unit controls the power output to be in accordance with the power output set point from the central controller.

Main Concept for Islanded Operation
The main concept for islanded operation involves the coordinated control of ESS and other dispatchable DG units, as shown in Figure 2. The controller of the inverter in ESS responds in milliseconds.Otherwise, the reciprocating engine, and fuel cell have a relatively slow response time.Clearly, the ESS should play an important role in maintaining the frequency and voltage of the microgrid during islanded operation.In primary control, the ESS tries to stabilize the frequency and voltage locally with its fast-acting response.As a result, the frequency and the voltage of the microgrid can be regulated at the normal values [20,21].However, the power balancing control capability of the ESS is limited by its available system capacity.Therefore, the power output of the ESS should be brought back to zero as soon as possible by the secondary control in the MMS in order to secure the maximum spinning reserve and reduce the stored energy consumption.The secondary control of the MMS ensures the required power for returning the power output of the ESS to zero by sending out active and reactive power output set points to the dispatchable DG units.These power output set points are produced in the MMS based on measurements in the ESS and the dispatchable DG units.Then, each LC tries to make sure that the actual power output of the DG unit is in accordance with the power output set point received from the MMS.

Primary Control of Energy Storage System
For the ESS, there are three different control modes: (a) PQ control (fixed power control) (b) droop control, and (c) constant frequency/voltage control.PQ control is adopted so that the ESS runs on a constant power output.As PQ control delivers a fixed power output, it makes no contribution to any local frequency and voltage control of the microgrid.The power output of the regulating device may be fixed at zero when the microgrid is operated in grid-connected mode.Therefore, the control scheme of the ESS has to be changed from PQ control to droop control or frequency/voltage control during islanded operation.In this study, the control mode of ESS shifts from PQ control mode to constant frequency/voltage control mode when the microgrid is disconnected from the utility grid.The ESS consists of an energy storage device and a grid-interfacing power conditioning system (PCS).A supercapacitor and lead-acid battery bank can be considered as an energy storage device to be used for stabilizing the microgrid during islanded operation.Figure 3 shows the configuration of a three-phase grid-interfacing PCS with a battery bank [27,28].The controller consists of an upper grid controller and a d-q frame-based lower current controller [29].In grid-connected operation, all of the DG units and the ESS are in PQ control mode, where the power output set point is provided by the MMS.In this mode, the upper grid controller regulates the active and the reactive power injected into the grid and outputs the d-and q-axis current commands, I d_ref and I q_ref .Otherwise, in islanded operation, the upper grid controller regulates the frequency and voltage of the microgrid, and also outputs the d-and q-axis current commands as shown in Figure 4.The transition from fixed power control to frequency and voltage is activated by information received from the MMS.The MMS receives the state of connection from the STS, and then the received information is passed to the ESS through a serial communication link.The lower current control scheme is presented in Figure 5. Once the current reference (I d_ref and I q_ref ) is determined, d-q transformation control is applied to enable the active and reactive components of ac output power to be mutually independently controlled.In the current controller shown in Figure 6, d-and q-axis reference voltage (V d_ref and V q_ref ) is generated using errors between dq current reference (I d_ref and I q_ref ) and measured d-q current (Id and Iq).The generated d-q reference voltage is transformed into the a-, b-, and c-axis reference voltage V a_ref , V b_ref , and V c_ref by the d-q to abc transformation block.The phase-lock-loop (PLL) block as shown in Figure 7 generates a signal synchronized in phase to the converter input voltage V abc to provide the reference phase angle for the rotational inverse d-q transformation.When the desired voltages on the a-b-c frame are set, a pulse width modulation (PWM) technique is applied because of its simplicity and excellent performance.In the PWM block, the desired voltage waves V abc_ref and the triangular carrier signal are compared at cross-over points and create turn-on and turn-off switching signals for the six insulated gate bipolar transistors (IGBTs).

Secondary Control of MMS
The goal of the secondary control of the MMS is to return the power output of the ESS to zero quickly without degradation of power quality.In the secondary control of the MMS, there are two separate control loops: one for the active power control and the other for the reactive power control, as shown in Figure 8.Total power command is further used by a dispatch function block to generate a power output set point for each dispatchable DG unit.In the dispatch function block, total power command is converted into power output set point for each individual DG unit by using Equations ( 1) and ( 2): where P ref_i and Q ref_i are the active and reactive power output set point for the ith DG unit, and pf_P i and pf_Q i are the participation factors for the ith DG unit, which is determined by Equation (3).
av_ av_ t_av av_ t_av av_ In Equations ( 3) and ( 4), P av_i and Q av_i are the available active and reactive power of ith DG unit, P t_av and Q t_av are the total available active and reactive power of the DG units in the microgrid.The available reactive power of ith DG unit, Q av_i , is computed based on the rated apparent power for each DG unit in Equation ( 5):

Fuzzy PID Controller
In many previous studies, the fuzzy controller has been applied to improve control performance and has shown better control performance than conventional linear controllers.However, many parameters of the fuzzy controller should be tuned to achieve better performance.This optimization work is very difficult because there are many parameters that should be tuned.In fact, a non-optimized standard fuzzy controller cannot assure good performance when the fuzzy controller is applied alone.On the other hand, just two gains of the PI controller should be tuned in the proposed fuzzy PI controller to improve control performance, even though a non-optimized standard fuzzy controller is used.In terms of the difficulty in choosing gains, the proposed method can be an easier way.In this study, a fuzzy PID controller with double input was proposed to improve the frequency control performance of the ESS, as presented in Figure 9.This fuzzy PID controller consists of a fuzzy logic controller and a conventional PI controller, connected in series.The fuzzy logic controller has two input signals, namely, error (e) and derivative of output (e * ), and then the output signal (U) of the fuzzy logic controller is the input signal of the conventional PI controller.Finally, the output signal from the conventional PI controller, called the control signal (u), is used for stabilizing the microgrid.The fuzzy logic controller is comprised of four main components: the fuzzifier, the inference engine, the rule base, and the defuzzifier, as mentioned before.By taking the system output, the control signal for the fuzzy PID controller is given by: where U is the output of the fuzzy logic controller.It has been shown in [30] that for the product-sum crisp type fuzzy controller, the relation between the input and the output variables of the fuzzy logic controller can be given as: where E = K e e and E * = K d e * .Therefore, from Equations ( 6) and ( 7), the controller output is obtained as: Thus, the equivalent control components of the fuzzy PID controller are obtained as follows: Proportional gain: K p K e P + K i K d D Integral gain: K i K e P Derivative gain: Important procedures in designing the fuzzy PID controller are how to determine the controller gains (K p , K i , K e , K d ), membership functions and control rules.In general, the membership functions and control rules are determined based on the trial and error and the designer's experience.In this thesis, the membership functions consist of three memberships functions (two-inputs and one-output).Each membership function has seven memberships, comprising seven triangular memberships.All memberships are selected to describe all linguistic variables.For the determination of the control rules, it can be more complicated than membership functions, which depend on the designer experiences and actual physical systems.For this case, general two-input and one output controller rule is used as shown in Table 1.Finally, four gains (K p , K i , K e , K d ) are tuned by PSO algorithm to have proper control performance.Figure 10 shows the configuration of proposed fuzzy PID controller for controlling the frequency.

PSO Algorithm
The PSO algorithm is a population based optimization method first proposed by Kennedy and Eberhart [31].The PSO technique finds the optimal solution using a population of particles.Each particle represents a candidate solution to the problem.PSO algorithm is basically developed through the simulation of bird flocking in a two-dimensional space.Some of the attractive features of the PSO algorithm include ease of implementation and the fact that no gradient information is required.Suppose we have to find out the global minimum of multi-modal function f(x) = f(x 1 , x 2 ,…., x n ) in n-dimensional space.In PSO algorithm, each particle i (i = 1,…,N) in the population is characterized by three vectors (x i , v i , p i ) which represent their temporal position x i = (x i1 , x i2 ,…, x in ), velocity v i = (v i1 , v i2 ,…., v in ), and the best position p i = (p i1 , p i2 ,…., p in ).
The fitness of each particle is given by the function value f(x i ).Since we look at the minimization problem in this thesis, the lower the function value the better the fitness.Each particle stores its best position P called personal best, p-best, which gives the best fitness in memory.They can also consult their neighbor's best position.Most simply, the neighbor is the whole population (fully connected topology), and therefore, the neighbor's best is the best position among personal bests of the whole population.Hence, the position P g is called global best, g-best.
Now each particle i moves around the search space at iteration k, and renews its velocity component v i k+1 using its past experience (personal best), the population's experience (global best), and current velocity at iteration k, v i k , as follows: The parameters c 1 and c 2 are the acceleration constants, and r 1 and r 2 are the uniform random numbers within the range [0, 1].If v i k is larger than a predefined velocity v max called maximum velocity, it is set to v max .Similarly, if it is smaller than −v max , it is fixed to −v max .Then the particle changes its position by the "equation of motion": The above searching concept is described in Figure 11.At a given current position and velocity of the particle, the change of velocity (v mod ) is determined based on the global best (g-best) and personal best (p-best).Then a new velocity (v k+1 ) can be calculated by summation of the current velocity (v k ) and the change of velocity (v mod ).Finally, the new position is updated by Equation (10).To improve the performance, the inertia-weight was introduced by Eberhart and Shi [32] who added an inertia weight in updating the equation of standard PSO algorithm: The parameter ω, called inertia weight, controls the exploration (global search)-exploitation (local search) tradeoff.When realizing the above Equation (11), ω may be a constant factor or it may decrease linearly in a range or other appropriate form.Suitable selection of inertia weight can provide a balance between global exploration and local exploitation.

Gain Tuning of Fuzzy PI Controller
For design of the fuzzy PID controller, we select controller gains (K p , K i , K e , K d ) as optimized control variables in the PSO algorithm.Figure 12 shows the configuration for the tuning of fuzzy PID controller of the ESS using PSO algorithm.Figure 13 presents the position vector architecture of the PSO for the gain tuning.In the evaluation procedure of PSO algorithm, the integral of absolute error of the frequency deviation of the microgrid during islanded operation is selected as the performance index.Accordingly, the objective function J is set by: Minimize ∫ Δ = T dt f J 0 (13) where T is simulation time and Δf is the frequency deviation.

Configuration of a Test System
Figure 14 shows the configuration of a microgrid system for simulation.The test system consists of DG units, an ESS, a STS with an intelligent electronic device (IED), a distribution line, and loads.The DG units include a PV system, a PV and WT hybrid system, and diesel generators.The details of the test system are given in Table 2.A simulation platform under the PSCAD/EMTDC environment was developed to evaluate the dynamic behavior of the microgrid.In the PSCAD/EMTDC model, the RES and the ESS were modeled as an equivalent voltage source model for convenience [34].A typical synchronous generator model in the PSCAD/EMTDC library was used to represent the diesel generators.The upstream grid was modeled as an equivalent voltage source with the Thevenin impedance, and the load and distribution line were represented by constant impedance model, i.e., R and X.

Simulation Results
PSCAD/EMTDC simulation runs were made to validate the proposed fuzzy PID controller.The implementation fuzzy controller and PSO algorithm were made using user defined model (UDM) of PSCAD/EMTDC.The gains of conventional PI controller and fuzzy PID controller were determined by the PSO algorithm under the same operating conditions.The optimization parameters of the PSO algorithm are shown in Table 3.After tuning by PSO algorithm, both controllers have optimized or near optimized controller gains.The conventional PI and fuzzy PID controller applied to stabilize the frequency during transition mode under the condition with initial power flow of 15 kW from utility grid.A disconnect from the utility grid occurred at t = 2 s.The frequency and power output of the BESS after islanding are shown in Figure 15.The fuzzy PID controller greatly improved the control performance compared to the conventional PI controller.The rising and settling time were reduced considerably.

Case B. Islanded Operation with Step Load Change
In this case, the two consecutive events were applied after islanding.A disconnect from the utility grid occurred at t = 0 s and the active load increased from 70 kW to 80 kW at t = 5 s, and then it returns to 70 kW again at t = 15.Figure 16 shows the frequency of microgrid and the power output of the BESS.In both cases with conventional PI controller and fuzzy PID controller, the frequency fluctuated during transient state and settled again at 60 Hz.However, the fuzzy PID controller is significantly superior to the conventional PI controller in terms of frequency deviation.

Case C. Islanded Operation with Varying Loads and RES Power Outputs
The dynamic behavior of the microgrid during the islanded mode with varying loads and power outputs of the RESs was evaluated.During the test period, the loads and power outputs of PV and H/B were varied with time as shown in Figures 17a,b.Figure 17c shows the frequency of the microgrid.With both the conventional PI controller and the fuzzy PID controller, the frequency fluctuated during the test period.However, the frequency deviation was reduced considerably by the fuzzy PID controller in comparison with the conventional PI controller.

Conclusions
During islanded operation, the frequency and voltage of a microgrid may change rapidly due to power unbalance between supply and demand.The DG units existing in the microgrid do not have fast enough response characteristics to stabilize the frequency effectively.To overcome this technical issue, the introduction of the ESS is considered.The power quality of microgrid during islanded operation, meanwhile, is strongly related with the controller performance of the ESS.
Therefore, a fuzzy PID frequency controller was proposed.The fuzzy PID controller for the ESS provided better control performance than a conventional PI controller.The gains of two controllers were tuned by the PSO algorithm to compare the performance.As shown in the simulation results, the frequency deviations in islanded operation were reduced by effective control action of the proposed fuzzy PID controller.

Figure 1 .
Figure 1.The hierarchical control structure of microgrid.

Figure 2 .
Figure 2. Concept of coordinated control of ESS and DG.

Figure 4 .
Figure 4. Block diagram of grid controller.

Figure 5 .
Figure 5. Current control scheme of ESS.

Figure 6 .
Figure 6.Block diagram of current controller.

Figure 8 .
Figure 8. Block diagram of PLL: (a) Active power control loop; (b) Reactive power control loop.

Figure 10 .
Figure 10.Block diagram of fuzzy PID controller.

Figure 11 .
Figure 11.Concept on a change of position and velocity of each particle.

Figure 13 .
Figure 13.Structure of position vector of PSO for fuzzy PID controller tuning.

Figure 14 .
Figure 14.Configuration for a test microgrid system.

Figure 15 .
Figure 15.Simulation results in Case A: (a) Frequency deviation; (b) Power output of the ESS.

Figure 16 .
Figure 16.Simulation results in Case B: (a) Frequency deviation; (b) Power output of the ESS.

Figure 17 .
Figure 17.Simulation results in Case C: (a) Active load; (b) Power outputs of RES; (c) Frequency deviation; (d) Power outputs of ESS.

Table 2 .
Details of the test microgrid system.

Table 3 .
Parameters of PSO algorithm.