Research on optimal configuration strategy of energy storage capacity in grid-connected microgrid

The optimal configuration of battery energy storage system is key to the designing of a microgrid. In this paper, a optimal configuration method of energy storage in grid-connected microgrid is proposed. Firstly, the two-layer decision model to allocate the capacity of storage is established. The decision variables in outer programming model are the capacity and power of the storage system. The objective is the least investment on the battery energy storage system. The decision variable in inner programming model is the charging and discharging power of battery. The objective is the lowest power fluctuation on the connection line. Then a case containing a grid-connected microgrid with wind power, photovoltaic, battery energy storage and load is studied, and the multi-scenario probabilistic method is used. The last result of energy storage configuration is calculated through the probability of each scene.


Introduction
Renewable energy is volatile and intermittent, therefore to stabilize its energy consumption through the energy storage technology is necessary. The battery energy storage technology is becoming one of the promising development direction with those advantages such as high energy density, flexible installation and high charging and discharging speed [1][2][3]. The Microgrid technology is an important form of efficient use of distributed renewable energy, and the optimal allocation of energy storage capacity is an important problem in the design of grid-connected microgrid.
There are many related research results about the allocation strategy for storage capacity in micro-grids. In the literature [4][5][6], the distribution of the fluctuation of the microgrid is summarized by analyzing the historical operational data, and then the capacity of the energy storage system is obtained based on the stabilization effect and cost. In [7,8], the time constant of the best first-order low-pass filter is determined by the stabilizing effect of the grid-connected output power, and the power and capacity of energy storage system are configured by the time constant. Literature [9,10] uses the spectrum analysis method to optimize the output power storage, but this method is only a single-objective optimization to stabilize photovoltaic fluctuations without considering the cost factor. In [11,12], the operation characteristics of important load in industry, and the optimization method of energy storage capacity of industrial photovoltaic microgrid is constructed with the aim of maximizing the utilization ratio of PV and the maximum annual net profit, but the impact of new energy volatility to grid is not involved. In [13,14], a method of rationally configuring the composite storage capacity is proposed for the microgrid including photovoltaic power generation, wind power generation and typical load. A multi-objective optimization model with the lowest equipment cost, the best power matching and the most smooth renewable energy output power is established and the solution method is an adaptive inertia weight particle swarm optimization algorithm. In view of the randomness of new energy output, literature [15][16][17] puts forward a hybrid energy storage capacity allocation method based on opportunistic constraint planning, and the genetic algorithm is used to solve the problem with the lowest cost, but the optimization for energy storage to stabilize power fluctuations is not taken into account.
In this paper, the optimal allocation strategy of energy storage capacity in the grid-connected microgrid is studied, and the two-layer decision model is established. The decision variables of the outer programming model are the power and capacity of the energy storage. The objective is the least investment of the energy storage and the fluctuation. The decision variable of the inner-layer programming model is the charging and discharging power of the energy storage at the operation stage, the objective is the lowest power fluctuation of the system connection line. Then a case study of a grid-connected microgrid with wind power, photovoltaic, battery energy storage and load is given. Through the case study, the multi-scenario probability method is used to make the decision of the energy storage configuration.

The two-layer decision problem
The two-layer decision problem is an optimization problem with two-level hierarchical structure, and the outer the inner layer optimization problems have their own objective function and constraints. The objective function and constraints of the outer optimization problem are not only related to the decision variables of the outer optimization problem, but also on the optimal solution of the inner optimization problem. The optimal solution of the inner optimization problem is also affected by the decision variables of the outer optimization problem. The general mathematical model of the two-layer decision problem is as follows: In the above formulas:x∈R n x , y∈R n y are the decision variables of the outer optimization problem and the inner layer optimization problem, respectively. F; f : R n x þn y →R are the objective functions of the outer optimization problem and the inner layer optimization problem. g : R n x þn y →R n l are rrespectively the Restrictions of the outer optimization problem and the inner layer optimization problem.
It is usually difficult to obtain the global optimal solution of the two-layer optimization problem, and it is considered that the optimal solution is obtained by the iterative approximation of the numerical solution and satisfying certain convergence conditions.

Energy storage configuration model
In the two-layer programming model proposed in this paper, the decision variables of the upper-level model are the capacity and power of the storage system and the objective is the lowest cost of the battery energy storage system. The decision variables in the lower-level model is the charging and discharging power of battery. With the increasing number of grid-connected microgrids, the power fluctuations on connection line will adversely affect the stability of the grid. So in the lower-level model, the objective is the lowest power fluctuation of the system connection line.

The upper-level model
The objective function is: In the above formula, c 1 is the unit power cost, for lithium batteries, lead acid and other battery energy storage, it is mainly the cost of power converter system (PCS); c 2 is the unit capacity costs, it is mainly the cost of the battery; λ is the penalty factor for the power fluctuation of the connection line; P ES is the power of energy storage in microgrid; P L is the power of load in microgrid; P G is the power of generation in microgrid; P base is the demand capacity reported to the grid by the microgrid corporation.
The constraints are shown as follows: Where N is the calculated number of time period, P M and E M are respectively the power and energy capacity of the storage system due to the installation site, grid power, etc., SOC M is the highest state of charge that allowed by the battery energy storage system, SOC 0 is the initial state of charge of the battery energy storage system.

The lower-level model
Two-part electricity price is implemented for the gridconnected microgrid. The first part is the fixed demand capacity cost which is calculated according to the demand power. And the second part is the electricity cost bought from the connection line. For the microgrid operator, the fluctuation variance of the connection line means extral tarrif. As a result, the inner objective function is given as below: The above equation shows the fluctuation variance of the power of the connection line within one day. p ES (i), p L (i), andp G (i)are respectively the energy storage power, load power and generation power in the microgrid system in the i time period.
The constraints are: Where P L0 , P G0 are respectively the maximum allowable consumption power and reverse power on the connect line. The first constrain is.
Here, p ES is maximum the charging and discharging power of the energy storage. Assuming that the energy storage system charging efficiency η c and discharge efficiency η d remains constant, set α as follows: So we can get the equation: where Δt is the calculating length of the time period.

Solving algorithm
It can be seen that the outer programming model is a quadratic problem and easy to solve. The inner programming mode is a mixed integer nonlinear programming (MINLP) problem, its objective function can be expressed as a form of univariate function and the dynamic programming method can be used to solve the problem. The dynamic programming method decomposes a multi-stage optimization problem into single-stage optimization problem by stage division, which is an effective algorithm to solve the problem. The dynamic programming model needs to determine the calculated decision quantity and state quantity. For each controllable resource, the power of each calculation period is the decision quantity in the dynamic programming model; for the energy storage, the SOC at the end of each calculation period is its state quantity, the initial state quantity and the end state quantity are known quantities. The optimal strategy of the dynamic programming decision-making process has the property as follows: the rest of the decisions must be an optimal strategy when any of the state is taken as the initial level and initial state, regardless of the initial state and the initial decision. That is, if there is a N-level decision process with initial state of  x(0), its optimal strategy is{u(0), u(1), …u(N − 1)}. Then, for a N-1-level decision process with initial state of x(1), the decision set {u(1), u(2), …u(N − 1)} must be the optimal strategy. Figure 1 shows the state transfer diagram of the Nlevel decision process. An N-level decision process can be expressed as follows: The constraints in the above formula are:x(k) ∈ X ∈ R n , u(k) ∈ Ω ⊂ R m . At this point, the programming problem can be described as solving an optimal control (decision) seriesu * (k) , k = 0 , 1 , … N − 1, which can make the performance indicator minimum.
The solving method of dynamic programming problem can be divided into two directions: forward and backward. The forward direction means starting from the initial layer and calculating gradually to the end; the backward direction means starting from the end layer and reversing the solution. In practical problems, the backward direction is more commonly used. The paper adopt the backward direction method.
At each stage, SOC at the end is considered as the state quantity, the power of the energy storage p ES (i) is the decision quantity, the variance of the power becomes the corresponding cost function, and eq. (7) is the dynamic equation.
The power decision set of energy storage can be established through the charging and discharging power limit and the line power limit. The state set of energy storage can be established through the SOC range of operation. Enumeration method is adopted to solve the single stage MINLP problem. According to the second constrain in eq. (5), the state set is composed of discrete value from SOC m to SOC M by a step of ΔSOC. The decision set can be calculated accordingly. The lessΔSOC value, the larger the decision set. As a result, it takes more time to calculate the optimal decision.
According to the steps above, the optimal charging and discharging process of energy storage system can be  solved. Figure 2 shows the transition diagram of SOC's stage state.
From the inner problem we can get the optimal charging and discharging process of the energy storage system. The solve of inner problem is transferred to the upper-level model to get the optimal configuration of energy storage system. And the configuration is transferred to the lower-lever model as constrains. The iteration process is illustrated in Fig. 3.

Case study
In this case, a grid-connected microgrid with wind power, photovoltaic, battery energy storage and load is studied. The system structure of the microgrid is shown in Fig. 4.
In this system, the installed capacity of photovoltaic is 300 kW, the installed capacity of wind power is 500 kW, the maximum load is 1200 kW, the maximum power limit of the connection line is 1000 kW, and the reverse transmission power is limited to 500 kW.
For the uncertainties of wind power, photovoltaic power and load, the multi-scene probability method is used to make the decision of the energy storage configuration. That is to say, the energy storage configuration is calculated in several scenes, and decisions are made according   to the probability level of each scene. Scene analysis is an effective method to solve stochastic problems. By modeling the possible scenes, the uncertainties in the model are transformed into multiple deterministic scene problems, where the difficulty of modeling and solving is reduced. The time series of a possible operating state in the period being studied is called a scene s, and the set of all possible scenes of the system is called the scene set S. The uncertainty of the system can be simulated by generating a scene set.
Here, the historical data of wind power, photovoltaic power and load in this microgrid during one year is used for analysis, that is, the number of scenes is 365. In order to trade-off between the computational burden and maintain a certain degree of credibility, an approximate subset of the original scene is selected using the probability distance to reduce the number of scenarios. The original scene set can be reduced to four scenes which are shown in Table 1 and Figs. 5, 6, 7 and 8. Table 2 shows the optimal configuration of energy storage in each scene. Figure 9 shows the energy storage configuration of grid-connected microgrid system based on scene decision.
The power curves of energy storage system and connection line in each scene are shown in Figs. 10, 11, 12 and 13. According to the configuration results of energy storage in each scene, the power and capacity of energy storage can be calculated as follows: The energy storage configuration result is 227. 4 kW / 240. 7kWh after calculation. The values of the parameters are shown in Table 3. The value of c 1 and c 2 is given as an example for Lithium energy storage system cost nowadays. λ is given considering the total cost of construction of distribution network and the reserve capacity of system.
After calculation, the standard deviation of the power fluctuation of connection line in the grid-connected microgrid can be suppressed within 50 kW (expected value) under this energy storage configuration.  This paper studies an optimal configuration strategy of energy storage in grid-connected microgrid and detail work is as follows: (1) The two-layer decision model of energy storage capacity configuration is given. The decision variables of the upper-level model are the power and capacity of the energy storage and the objective is to minimize the initial investment and the fluctuation on the connection line. The decision variable of the lower-level programming model is the charging and discharging power of the energy storage, and the objective is the lowest power fluctuation of the connection line. The upper-level model is a quadratic programming problem, which is easy to solve. For the lower-level model which is not easy to be solved, the dynamic programming method can be used.
(2) A case study of a grid-connected microgrid containing wind power, photovoltaic, battery energy storage and load is given. The multi-scene probability method is used to make the decision on the configuration of energy storage according to the probability level of each scene. Finally, the result of the energy storage configuration is 227.4 kW / 240.7kWh under which the power fluctuation of connection line in the grid-connected microgrid can be suppressed within 50 kW.

Funding
The National Key Research and Development Plan(2017YFB0903504); Science and Technology Project of the SGCC(5210EF17001c).