Grid connected power regulation strategy of weak rural energy storage batteries based on particle swarm optimization algorithm

. In recent years, the research and application of distributed energy storage technology have received high attention from countries around the world and have achieved rapid development. Integrating distributed energy storage devices into the power grid is one of the effective ways to solve the problem of power quality in weak rural areas. Based on particle swarm optimization algorithm, this paper studies the regulation strategy of integrating distributed energy storage systems into weak rural areas to improve power quality. Based on the actual daily load curve of the distribution station area, optimization regulation strategies are obtained to generate success rate instructions to guide the actual grid connection operation process of the energy storage system.


Introduction
With the continuous development of society and the continuous improvement of people's living standards, the power demand of rural power customers is also increasing.Especially in the distribution network lines with single radiation, long distance and heavy load, there are often problems such as large line voltage loss, which seriously affect the voltage quality.In recent years, the research and application of distributed energy storage technology have been highly valued by countries all over the world and have achieved rapid development.Connecting distributed power storage devices to the power grid is one of the effective ways to solve the power quality problems in weak rural areas [1].Compared with the upgrading of power grid lines [2][3] and the addition of reactive power compensation devices [4][5][6], it has better flexibility and economy.Therefore, based on particle swarm optimization algorithm, this paper studies the control strategy of improving power quality by connecting distributed energy storage system in weak rural areas.According to the daily load curve of the actual distribution area, the optimal control strategy is obtained, so as to generate the success rate command, so as to guide the actual grid connected operation process of the energy storage system.

Analysis on power regulation strategy of energy storage system
Aiming at the voltage sag problem of rural distribution network, this paper will study the power regulation strategy of grid connected energy storage system to improve the power quality in weak rural areas.Generally, the energy storage system has the best improvement effect on the line voltage sag at the node where it is located, while the improvement effect on the line far from the grid connected node decreases sharply with the distance [7].Therefore, if the distributed energy storage system is connected at the weak voltage node, the best treatment effect will be achieved for the voltage sag problem of rural distribution network model [8][9].Therefore, this paper first considers the daily load curve of a weak rural distribution network area, and determines the charging and discharging power of the energy storage battery at each time through condition constraints, so as to control the line voltage sag in this area, improve the power quality, and ensure the power demand of users [10].The solving process of the power regulation strategy can be regarded as a single objective optimization problem.For this optimization problem, the following elements are proposed: 1) Objective function: the sum of daily average voltage deviation at all nodes of the line is the smallest after adding energy storage (single objective); 2) Decision variable: active power output/absorbed by the energy storage system at each time; 3) Constraints: A. Power flow balance constraints of power system; B. Restriction of maximum input and output power of energy storage battery; C. At the beginning and end of each day, the battery state of charge is constrained by the same amount (to ensure the energy conservation of the energy storage system); D. Upper and lower limits of SOC (state of charge) constraints; E. Equality constraints of battery state of charge and battery input and output power; 4) Solution: the common optimization algorithm should be used, and the improved particle swarm optimization algorithm will be used in this paper.

Optimization objective function of electric energy regulation strategy for energy storage system
It is assumed that the weak rural distribution network has i nodes, and the energy storage system will operate until time T after being connected.For the model of rural distribution area network in this paper, i=11, T=24.Here, Lkt is defined as the voltage deviation index of node k at time t: Where ΔUkt is the voltage deviation of node k at time t, and UN is the rated voltage of the line, taking 220V.
The overall voltage deviation index of the line can be expressed as: The voltage deviation of distribution lines depends on the size of L. The smaller L is, the better the power quality of weak rural distribution network and the better the control effect of voltage sag after adding energy storage configuration.
The voltage deviation index during the whole period is: The objective function is:

Energy constraints of energy storage system
When establishing the optimization model of the energy regulation strategy of the energy storage system connected to the weak rural distribution network, we should fully consider the constraints of the maximum input and output power of the energy storage battery, the upper and lower limits of the battery state of charge, the upper and lower limits of the node voltage, the power flow balance of the power system operation, and the energy storage balance.
1) Power flow balance constraints in power system operation ( ) ( ) Where, Pi and Qi are the active power and reactive power of node i respectively, Ui and Uj are the voltage amplitudes of node i and node j respectively, n is the number of nodes in the system, Gij and Bij are the real and imaginary parts of node admittance matrix elements respectively, and δij are the voltage phase angle difference of node i and node j.This constraint is completed in power flow calculation.
2) Upper and lower limits of node voltage constraints x min ma U UU  (6) Wherein, Umax and Umin are the upper and lower limit constraints of node voltage respectively, and are set as [0.9,1.1] in the model in this paper to ensure that node voltage does not cross the line.
3) Self charging and discharging power constraints of energy storage system The state of charge is used to represent the output characteristics of the energy storage system, and the charging and discharging output of the energy storage system are respectively expressed as: ( ) Wherein, SOC(t) and SOC(t-1) are the state of charge of the energy storage battery system at t and t-1 respectively, and Pc(t) and PF(t) are the charging and discharging power of the energy storage system at t respectively; ηc and ηF are charging and discharging efficiency respectively, taking 0.8; Δt is the sampling period.In this paper, 1h is taken as a period; EES is the capacity of energy storage battery, and 100kWh is selected in this paper.
The upper limit value of charging and discharging power of energy storage battery is related to the state of energy storage time and rated power value, and the relationship between the two can be expressed as [11]: Wherein, PC,rate and PF,rate are the rated charging and discharging power of the energy storage battery respectively, E(t-Δt) is the capacity of the energy storage system at t-Δt, and Emin is the allowable lower limit of the capacity of the energy storage battery system.
The energy storage battery also has its own performance constraints, which can be expressed as: Where, SOCmax and SOCmin are the upper and lower limits of the state of charge respectively, and PC,max, PC,min, PF,max and PF,min are the upper and lower limits of the power of charge and discharge respectively.4) Energy balance constraint of energy storage system Fig. 1 The block diagram of the particle swarm optimization algorithm The block diagram of the optimization algorithm in this paper is shown in Figure 1.It is worth noting that in the above constraints, the upper and lower limits of node voltage constraints and the charging and discharging power constraints of the energy storage system are implemented by "penalty function".The mechanism is to "punish" the objective function when the randomly initialized particle parameters do not meet the constraints, assign a maximum value to the objective function, so that the objective function is excluded from the optimal value in the iteration, and effectively eliminate the particles beyond the feasible constraint.This method can make the algorithm not fall into local optimization, and better find the energy storage regulation strategy that makes the sum of daily average voltage deviation of all nodes of weak rural distribution network lines the best.

Analysis of optimization results
According to the above ideas, the program is written in MATLAB software to build and run the optimization model of power regulation strategy.As shown in Figure 2, when the number of iterations is 0 (initial state), the number fitness function is 10 9 , which is due to the existence of parameters beyond the feasible region in the randomly generated initial particle.The particle "penalty function" acts, and its fitness function is "punished", which will be assigned 10 9 , so that its fitness function is excluded from the optimal value in this iteration, effectively eliminating the bad particle, and avoiding the algorithm falling into local optimization [12].

Fig.2 Fitness function iteration of power regulation strategy optimization modle
In order to facilitate the observation of the trend of subsequent iterations, the local image after one iteration in figure 2 is intercepted and magnified to obtain figure 3. It can be seen that the fitness function gradually decreases, the number of iterations is 20, and the final fitness function is 0.419.

Fig.3 Fitness function iteration of power regulation strategy optimization modle
Through iterative optimization, the optimization results of the active power output of the connected distributed energy storage system at the three weak nodes (node 4, node 7 and node 11) are obtained as shown in figure 4, figure 5 and figure 6 respectively.Based on the data of the optimization results of the model, the node voltages of the weak rural distribution network before and after the configuration of the energy storage system are drawn respectively, as shown in Figure 7.A curve represents the node voltages at the same time.
It can be seen from figure 7 that after completing the energy storage configuration and after the energy storage grid connected output power, the weak node voltage of the rural distribution network model at different times has been effectively raised.
With or without energy storage configuration respectively, take the voltage values of each node at 08:00, 13:00, 18:00 and 23:00, as shown in Figure 8 and figure 9. Different points on the same curve represent the voltage amplitudes of different nodes at the same time.Comparing Fig. 7 and Fig. 8, observing the curves at different times before and after optimization, it can be found that each curve representing the node voltage at each time is more compact after optimization, indicating that the voltage deviation range of the same node at different times after optimization is reduced, and the configuration of energy storage not only has the effect of raising the terminal voltage of weak distribution network lines, but also has the effect of stabilizing voltage fluctuations and "peak load shifting".Fig. 7 Voltage of each node of weak rural distribution network with energy storage configuration Simple calculation shows that the average voltage rise rate at weak nodes is up to 4.56% after energy storage is configured and the strategy is applied, and the voltage deviation of each node throughout the day is controlled within 7%, which has achieved good governance results.

Conclusion
According to the daily load curve of a certain area, this paper abstracts the power regulation problem after the energy storage system is connected to the grid, analyzes its objective function, constraints and other elements, and determines the solution method -improved particle swarm optimization algorithm.The optimization model of grid connected electric energy regulation of energy storage battery based on particle swarm optimization algorithm is established, which is programmed by MATLAB software.The optimal solution is obtained through iteration, and the power exchange curve of energy storage battery system is obtained.The daily average voltage deviation of each node in the weak rural distribution network is calculated, and it is found that under the condition of energy storage and grid connection, the average voltage rise rate at the weak node is 4.56%.At the same time, the voltage deviation of each node throughout the day is controlled within 7%, which has achieved good governance results.It shows that the strategy can effectively improve the power quality in weak rural areas.

Fig. 8 Fig. 9
Fig.8 Voltage of each node at some time without energy storage configured