Novel Distributed Optimal Control of Battery Energy Storage System in an Islanded Microgrid with Fast Frequency Recovery

Xiao Qi 1,* ID , Yan Bai 1, Huanhuan Luo 2, Yiqing Zhang 3, Guiping Zhou 2 and Zhonghua Wei 2 1 School of Control and Computer Engineering, North China Electric Power University, Beijing 102206, China; by@ncepu.edu.cn 2 State Grid Liaoning Electric Power Supply Co., Ltd., Shenyang 110004, China; rawn@163.com (H.L.); 18900911559@163.com (G.Z.); wzh_fw@ln.sgcc.com.cn (Z.W.) 3 Synergy Innovation Center for Energy Economics of Shandong, Shandong Institute of Business and Technology, Yantai 264005, China; zyq_751105@163.com * Correspondence: qixiao@ncepu.edu.cn; Tel.: +86-010-6177-2102


Introduction
The microgrid, as is defined by the Consortium for Electric Reliability Technology Solutions (CERTS), is the integration of interconnected load and distributed energy resources and acts as a single controllable entity with respect to the traditional power grid [1,2].However, due to the high intermittence of renewable energy sources (RESs), new challenges have been posed to the operation and control of microgrid.
In order to overcome this problem, battery energy storage systems (BESSs) [3] are installed in microgrids due to their fast dynamic responses and accurate performances in absorbing excessive power and compensating for insufficient power.In [4], a BESS was used to provide fast active power compensation and improve performances of load frequency control.In [5], a novel state-of-charge-based control strategy is proposed to smooth the output fluctuation of a hybrid system.Finally, in [6], a cooperation control strategy for wind power and battery storage is proposed to provide frequency regulation.The supply-demand balance can be well guaranteed through an appropriately designed control strategy of BESSs.Additionally, the rotating inertia of a microgrid is significantly reduced due to the widely use of power electronic converters, which will result in greater 2. Preliminary

Consensus Algorithm
The theory of a consensus algorithm is described in this section.G = (N , E ) expresses a network.N = 1, 2, • • • , n denotes nodes set, E denotes edges set.Edge (i, j) ∈ E denotes the connected nodes.The initial value of node i is x i (0) ∈ R.And the initial values of entire network can be expressed as x(0) = (x 1 (0), x 2 (0), • • • , x n (0)) T .The purpose of Multi-Agent System is to obtain the value of 1 n ∑ n i=1 (x i (0)) which can be calculated through the consensus algorithm.The iterations are as where t = 0, 1, 2, • • •, w ij denotes the calculation weight of x j at node i.
Then, Equation ( 1) is described as where The converging speed of Multi-Agent System depends on W. Thus, this paper adopts an improved metropolis algorithm [22] and w ij can be described as where N i denotes the neighbor agents of agent i, n i denotes the amount of agents which are connected with agent i, and n j denotes the amount of agents which are connected with agent j.

Improved Linear Active Disturbance Rejection Control
In a system, the output is usually denoted by y, the control signal is denoted by u, the external disturbance is denoted by d.Then, the system can be expressed following where f denotes the sum of external and internal disturbance.The system can be described in Equation (5).Then, in order to estimate y, ẏ, and f , a linear extended state observer (LESO) is designed following Equation (6).
where b 0 denotes the estimation value of b. where With the estimation of disturbance, system control signal can be expressed as Equation (7).This also transforms system into an integral cascade following Equation (8).
Finally, the control law of ILADRC is following [21]

Problem Formulation
A framework of an islanded microgrid is presented in Figure 1, which consists of multiple BESSs, two wind power generators, and three load demands.In a system's stable state, the active power balance of an islanded microgrid can be represented as: where P BESS i , P RES i , and P L i are the output power of ith BESS, RES, and load demand, respectively.Furthermore, N B , N R , and N L are the index sets of BESSs, RESs, and load demands, respectively.Although the wind power generator can make contributions to the frequency regulation through the inertia control strategy, the output power cannot be accurately controlled due to its intermittent nature.Additionally, the wind power generator is almost undispatchable.In contrast, because of the fast dynamic responses and accurate performances, the BESSs can be dispatched to eliminate the supply-demand mismatch caused by the intermittence of RESs and unpredicted fluctuation of load demand.
The cost function for BESSs is often modeled as: where C is the cost, and nonnegative a i and b i are the cost coefficients.P min BESS i and P max BESS i are the lower and upper bounds of ith BESS power output, respectively.
Then, the optimal control problem of BESSs can be described as follows: The traditional solution of this situation is to use the Lagrange multiplier method, and the Lagrange function for the optimal problem can be constructed as: where λ is the Lagrange multiplier associated with the equality constraint.
The Lagrangian operator L is minimized when the following equation is satisfied: which yields the following optimal solution: Then, through substituting Equation (15) into Equation (10), the optimized incremental cost of each component can be represented as: Furthermore, considering of the generation constraints of each component, the optimal solution is given as [23]: where r * = λ is the optimal incremental cost.
The above solution can be solved through the centralized control strategy.However, due to the timely communication and calculation manner, the centralized control strategy cannot provide the desired responses under unexpected and rapidly changed disturbances.In contrast, the distributed control strategy is flexible, scalable, reliable, and cost-effective to implementation, and it is wildly adopted to maintain system stability and provide optimal control performances.
With the theory of consensus algorithm, the optimal control problem can be solved by Equation ( 18): where r is the incremental cost.
Given that all the components are operating in a stable state at t = 0, and following the consensus algorithm, the optimal incremental cost will converge to Equation (19) where T is a convergent period to obtain the optimized incremental cost with a consensus algorithm.However, as described in Equation ( 20), the result obtained by the consensus algorithm in one convergent period is not equal to that calculated by the Lagrange multiplier method with a centralized control strategy.That is to say, the supply-demand balance is broken.The supply-demand mismatch is described by Equation (21).
In order to deal with the above problem, an improved distributed approach was proposed by [14], and the updating rule for the leader agent follows: where ε is the convergence coefficient, which controls the convergence speed of the leader agent.
Then, [16] modified the updating rules for agents coordination, which are represented as: In the initial state, ∆P t=0•T [0] = 0.After completing one convergent period, ∆P t=1•T [0] = 0, then ε works to eliminate the supply-demand mismatch until ∆P t=n•T [0] = 0.As is shown in Equation ( 24), the optimal incremental cost converges to that calculated by central control strategy.

Proposed Distributed Optimal Control of BESS with Fast Frequency Recovery
Through the distributed control strategy introduced in Section 3, the optimal incremental cost can converge to the desired value after nTs, which produces negative effects on system stability.Furthermore, the authors also find that the frequency recovery process will take a long time, or even have deviation following great and rapid changes of the wind turbine generator's (WTG's) output power and load demand.This may result in a system crash.To overcome this problem, this paper proposes a novel distributed optimal control of BESSs to realize fast frequency recovery and enhance system stability.

Distributed Optimal Control Strategy
The system control structure of [14,16] is described in Figure 2, and the proposed control structure is described in Figure 3. System power-frequency characteristic is described by ∆P ∆ f = 1 Ms+D .Most previous studies in the literature have focused on modifying the updating rule of the consensus algorithm for optimization.However, it still cannot greatly guarantee the frequency stability.This study designed a supplementary controller to enhance the frequency stability, which is shown in Figure 3.The deviation of frequency ∆ f is regarded as the controlled variable, and the control signal is regarded as the referential deviation of supply-demand mismatch ∆P re f [0].Based on this improvement, the deviation of frequency ∆ f is thoroughly eliminated and the frequency recovery process is also accelerated.This paper employs ILADRC algorithm.Recently, the LADRC algorithm, which was developed from the PID algorithm, is widely employed in power system control and other fields.It inherits the essence of PID algorithm and removes its shortcoming.Furthermore, the LESO can well estimate system external and internal disturbance.It is obvious that the intermittent and random power of renewable energy sources is the external disturbance of microgrid.So, the BESSs in an islanded microgrid system can provide better control based on the LADRC to compensate for the fluctuation of system supply-demand mismatch.That is to say, the stability of microgrid frequency can be greatly enhanced.Furthermore, the effectiveness of ILADRC has proved better than the LADRC.Consequently, the ILADRC has great anti-disturbance capability and robustness.This is also the main reason that the ILADRC is employed in this paper.Moreover, the parameter tuning process of the ILADRC-based controller is much easier than that of controllers based on other control algorithms.Moreover, the ILADRC-based controller is independent of an accurate system model, which means that a complex modeling process can be avoided.

Algorithm Implementation
With the proposed control strategy, the construction of the leader agent and normal agent are shown in Figures 4 and 5, respectively.And Figure 6 shows the communication relationship of BESSs.Firstly, the normal agent measures the component output power and initializes the value of r i [0].Then, the communication signal of ∆P i [k] and r i [k] can be obtained through the updating rules described in Equation (23).Different from the normal agent, the leader agent still has to measure the value of system frequency and calculate the deviation of frequency ∆ f for initialization.Through the consensus algorithm, the referential power output of each component can be calculated by the optimized incremental cost r * .
After obtaining the referential power of each BESS, it will be controlled by the lower-level control block, as is shown in Figure 7. Considering the sampling process and time-delay characteristic, the transfer function of the decoupled d axis current loop is described in Figure 8. Furthermore, the transfer function can be equivalent to the inertial unit, and the inertia time constant is equal to 3T s .The agent of BESS 1 is the leader agent, and the agents of others are the normal agents.Furthermore, the variable-speed WTG model [21] is described in Figure 9; its principles and parameter values will not be introduced in this paper.

Communication Neighboring
Agent Leader Agent Calculation (23) Supplementary Controller Battery Control Unit      The proposed control strategy of a microgrid is shown in Figure 10.The imaginary lines represent the communication topology.The referential power output of each BESS can be obtained through communicating with its neighboring agent.
Numerical simulations with the aforementioned control strategy under different operation conditions were tested with the above model, and the results are described in Section 5.Then, the validity of the proposed method is demonstrated through comparison to previous literatures in the following section.

Simulation Results and Analysis
The simulation results are described in this section and the simulations are testing in an islanded microgrid with a configuration of five BESSs, two WTGs, and three load demands.The parameters of the BESS are summarized in Table 1, and the parameters of the WTG and load demand are summarized in Table 2.The wind turbine generator used in this work is the doubly-fed induction generator, which will not be introduced in detail in this paper.The supplementary controller parameters are shown in Table 3.All the simulations are testing in MATLAB/Simulink and the step time is 0.01 s.Furthermore, this study adopted the rate of change of frequency (RoCoF) and the integral of time-weighted absolute value of the error (ITAE) to be the evaluation indexes of system frequency stability.The RoCoF and ITAE are described by Equations ( 25) and (26), respectively.

Case A
In this case, performances of the proposed method at initial state are investigated.The initial power output of BESSs are shown in Table 1.The fluctuation of supply-demand and WTG power output are supposed to be stable and their initial values are shown in Table 2.The response of total active power deviation and microgrid frequency deviation are described in Figure 11.As is shown in Figure 11, the frequency based on the proposed distributed strategy can be recovered to its normal value in 2.7 s.And the overshoot of frequency is 0.0006 Hz, it's better than those derived by other methods.The detailed comparison results are shown in Table 4. Obviously, microgrid system with the proposed distributed strategy has better frequency recovery capability and desired optimal performances.The convergence curve of incremental cost is described in Figure 12 and the active power of each BESS is shown in Figure 13.Proposed method Method in [14] Method in [16]

Case B
The validity of the proposed method in handling the situation with unpredicted fluctuation of load demand is demonstrated.Suppose that WTG power is stable, and the load demand suddenly increases from 1.0 p.u. to 1.1 p.u. at 10 s.The total active power deviation can be well eliminated by all three distributed control strategies, as is shown in Figure 14b.However, the overshoot of frequency based on the proposed control strategy is 0.0115 Hz, which is smaller than 0.0617 Hz and 0.0148 Hz obtained through the methods in [14,16], respectively.
Additionally, the settling time of the system frequency with the proposed control strategy, which is 4.9 s, is shorter than that based on the other methods.The convergence curve of incremental cost and the power of BESSs are described in Figures 15 and 16, respectively.Simulation results in Table 5 indicate the significant importance of the supplementary controller with the ILADRC algorithm.The supplementary controller can compensate for the deviation of frequency faster, and the incremental cost of the BESSs can also converge to the optimization value simultaneously.

Case C
In the practical environment, unpredictable disturbances cannot be neglected anymore.Then, the anti-disturbance ability of the distributed optimal control strategy is of significant importance.So, the system performances under stochastic power output of the WTGs are investigated.The total load demand is supposed to be stable at 1.0 p.u.
The stochastic characteristic of wind power is shown in Figure 17.The comparison results of supply-demand mismatch and frequency deviation are described in Figure 18.From comparison results shown in Table 6, it can be found that frequency fluctuation with the proposed method is in an extremely smaller range than that based on other methods, which demonstrates the superior anti-disturbance capability of the proposed method.The power of the BESSs and the convergence curve of incremental cost are shown in Figures 19 and 20, respectively.Proposed method Method in [16] Method in [14]  Proposed method Method in [16] Method in [14]

Conclusions
In an islanded microgrid, the system frequency changes more rapidly and sharply than that in a traditional power grid while supply-demand mismatch occurs.Therefore, this paper proposes a novel distributed optimal control strategy of BESSs in an islanded microgrid, which can provide optimal control performances and simultaneously realize faster frequency recovery, compared with previous studies.A multi-agent system based on the consensus algorithm is adopted in the proposed control strategy.A supplementary controller based on the ILADRC algorithm is employed to greatly enhance the frequency stability.The validity of the proposed distributed strategy is demonstrated by adequate simulation experiments, comparing the proposed method with two previous methods.
On the one hand, the proposed control strategy realizes the maximum welfare of the BESSs in a microgrid, so it makes economic sense.On the other hand, practically, the proposed method guarantees the microgrid stability while the components are operating at minimum cost, which ensures system security and consumers' experience.Based on the above aspects, this work realizes the economic operation of a microgrid without reducing power quality, and it even greatly enhances system stability.
In future work, the proposed distributed optimal control strategy can be improved for a system with more realistic constraints.Furthermore, it also has the potential to solve multi-microgrid optimal control problem.

Figure 9 .
Figure 9. Simulation model of wind turbine generator.

Figure 10 .
Figure 10.The proposed control strategy of the microgrid.

Figure 16 .
Figure 16.Power of the BESSs.(a) Power of the BESSs with the proposed method.(b) Power of the BESSs with the method in[16].(c) Power of the BESSs with the method in[14].

Figure 19 .
Figure 19.Power output of the BESSs.

Figure 2 .
System control process.

Table 1 .
Simulation parameters of BESS.

Table 2 .
Simulation parameters of load demand and wind turbine generator (WTG).

Table 3 .
Simulation parameters of the ILADRC-based controller.

Table 4 .
Performance comparison from the initial state.

Table 6 .
Performances with stochastic disturbance of WTG.The total stochastic power output of the WTG.