Optimization Method of Photovoltaic Microgrid Energy Storage System Based on Price-based DR

Extreme events lead to an increasing number of power outages in the distribution network. It is currently the most effective method to restore power supply after distribution network failure to connect distributed photovoltaic to the distribution network in the form of microgrids. However, the randomness of distributed PV output and load is the biggest obstacle limiting its development. Therefore, an optimization method of photovoltaic microgrid energy storage system (ESS) based on price-based demand response (DR) is proposed in this paper. Firstly, based on the influence of the uncertainty of the time of use (TOU) and load on the price-based DR, a price-based DR model is built. Then, taking the minimum difference between photovoltaic output and load demand as the optimization objective, the optimal operation model of price-based DR based on the fuzzy chance constrained program (FCCP) is established, and an optimization model of photovoltaic microgrid ESS based on FCCP is obtained. Finally, the fuzzy chance optimization problem is converted into a deterministic optimization problem through constraint equivalent treatment. The proposed method is verified by numerical simulations.


Introduction
With the implementation and promotion of the global energy revolution, new energy generation technologies represented by photovoltaic, wind energy and biomass energy has achieved rapid development [1][2] , and a pattern of high-permeability distributed photovoltaic access to the distribution network has been formed in the northwest of China.In view of the intermittent and fluctuating characteristics of photovoltaic power output, compared with the direct grid-connected scheme, the gridconnected photovoltaic microgrid connection scheme is more economical and reasonable.The allocation of an ESS of a reasonable scale in a grid-connected photovoltaic microgrid is the key to promoting the local consumption of distributed photovoltaic and improving the operation economy of the system [3][4] .Therefore, it is urgent to establish an optimization model of ESS of grid-connected photovoltaic microgrids.
At present, scholars at home and abroad have conducted extensive research on the optimization strategy of ESS for photovoltaic microgrids.The mainstream solutions are as follows: peaking and valley filling, smoothing out output fluctuations of distributed power sources, and improving the system economy [5][6][7] .As an economical and effective means of renewable energy consumption, price-based DR has been reported in lots of research.Zhou et al. [8] established an optimal configuration model of ESS based on peak-valley electricity price, and verified that price-based DR can significantly reduce the equal annual cost of grid-connected photovoltaic microgrids.The flexible cold-thermal-electrical load DR model is taken as the research model, and a mixed integer linear programming method is adopted to optimize the multi-region integrated energy system allowing for flexible load DR [9] .Wu et al. [10] considered the uncertainty of load demand and TOU price, and established a grid-load interactive optimization model of multi-period flexible random fuzzy uncertain demand response model, and the IEEE33 bus system was used to verify that the optimization model can effectively improve the economy of the grid.Zhang et al. [11] proposed an independent microgrid optimal configuration strategy considering price-based DR to improve the operation economy of microgrids.The above work does not involve research on the uncertainty of price-based DR, but it will lead to the over optimistic results of actual power grid optimization.Based on the curve of the electricity-load relationship, the random error of a certain point on the curve was used to represent the randomness of load variation, and it was applied to the unit combination model considering wind power and price-based DR [12][13] .Ye et al. [14] aimed at minimizing load variance, maximizing user satisfaction rate and minimizing the percentage of users giving up renewable energy, and established a microgrid time-of-use pricing strategy that considers the uncertainty of residential load, wind power and photovoltaic output.Li et al. [15] used normal distribution to describe the response quantity of price-based DR and applied it to the probabilistic power flow calculation of power systems.All the above works describe the uncertainty from the perspective of the probabilistic model.However, the establishment of the probabilistic model depends on sufficient information.It is difficult to describe uncertainty accurately with the probabilistic method.Relatively speaking, fuzzy variables can obtain membership functions of uncertain parameters with the help of expert systems when information is insufficient or there is no existing information.Therefore, in an environment of insufficient information, fuzzy numbers are used to represent uncertainty with certain advantages.The uncertainty of the reference load and the price demand elasticity have an effect on the system.But it is not considered in the above works.
To sum up, this paper proposes an optimization method of photovoltaic microgrid ESS based on price-based DR.Based on the influence of the uncertainty of TOU and load on the price-based DR, a price-based DR model is built.Based on this, taking the minimum difference between photovoltaic output and load demand as the optimization objective, the optimal operation model of price-based DR based on FCCP is established, and an optimization model of photovoltaic microgrid ESS based on FCCP is obtained.Finally, the fuzzy chance optimization problem is converted into a deterministic optimization problem through constraint equivalent treatment.The effectiveness of the proposed method is verified by numerical simulations.

Price-based DR model based on TOU price
Figure 1 shows the calculation method of the price-based DR model based on TOU price, and the load demand and actual price are calculated by Formula (1): load, price, where L load,t is the change rate of load demand in period t; ε t is the elasticity coefficient of the forecasted load demand in time period t; Y price,t is the change rate of electricity price in period t.

Demand response
Figure 1 Method of calculating price-based DR response quantity based on price-demand elastic curve At this time, the response quantity of price stability DR is shown in Formula (2): load , load, where q load,t represents the reference load in period t; ∆q t is the response quantity of demand response in period t.
In the actual system, the price-based DR cannot be accurately estimated, and there must be some uncertainty.And it mainly comes from two aspects: the uncertainty of the price demand elasticity curve and the uncertainty of reference load.Therefore, Formula (3) shows that the uncertainty of price-based DR can be composed of the above two parts.
unDR, unDR_price, unDR_load, t t t q q q Δ =Δ +Δ where ∆q unDR,t is the fuzzy quantity of price-based DR in period t; ∆q unDR_Price,t is the fuzzy quantity of price-based DR from price uncertainty in period t; ∆q unDR_load,t is the fuzzy quantity of price-based DR of load demand uncertainty in period t.
It can be seen from Figure 1 that the uncertainty from price is closely related to the uncertainty from load demand.The uncertainty of price-based DR can finally be summarized as the uncertainty of DR.The uncertainty of load elasticity coefficient is described by the triangular fuzzy number.The expressions of the uncertainty of price-based DR from load demand are shown in Formula (4).

( )
un, unDR_price, un, price, load, ,0, where εun,t is the fuzzy expression of load demand uncertainty in period t; kε+ and kε-are respectively the positive and negative maximum error proportions of load demand in period t; Similarly, the expression of price-based DR uncertainty derived from price can be expressed as: ( ) un_load, load load, load load, unDR_load, un, price, load, ,0, where ∆q un_load,t is the fuzzy expression of load demand uncertainty in period t; k load+ and k load-are respectively the maximum error ratios of the positive and negative directions of the reference load in period t.
According to the calculation formula of the triangular fuzzy number, the uncertainty of price-based DR is also a triangular fuzzy number, and its triple representation is shown in Formula ( 6).

Optimization model of grid connected photovoltaic ESS
The grid connected optical storage microgrid contains distributed photovoltaic, ESS and load.The ESS is charged when the photovoltaic output exceeds the required load, and the surplus electricity is connected to the grid.Insufficient electricity is purchased from the distribution network when the photovoltaic output is lower than the required load.After the day ahead TOU electricity price policy is put into effect, the guide electricity load curve and the photovoltaic output curve should be as close as possible through the adjustment of the electricity price in the microgrid, so as to reduce the configuration demand of the photovoltaic microgrid of the ESS.This paper uses typical daily data and similar days in a year to calculate the optimal allocation of ESS.Typical daily data can be obtained by the spline interpolation method.The annual similar days can be selected by clustering and other methods to obtain the annual similar days.The selection principle of similar days needs to consider temperature, humidity, characteristic meteorological parameters, and other factors.In this paper, the main role of price-based DR is to make the load and photovoltaic power generation closer in time sequence by changing the load shape, thus helping to absorb photovoltaic power and reducing the configuration demand of ESS.Therefore, based on typical daily operation data, this paper first takes the uncertainty of DR into account and optimizes the configuration of ESS based on the system load after the optimized operation.The update period of the day ahead hourly electricity price is 24 h, and the unit segment length is 1 h.

Optimal operation model of price-based DR
The optimization objective is to minimize the total difference between the photovoltaic output and the expected value of the electrical load, which is shown in Formula (7): where P PV,t represents the photovoltaic output in the period t; P load,t represents the load in period t; E is symbol for calculating the fuzzy expected value; T represents the update cycle of TOU price; Δ t refers to the segment unit duration of TOU tariff.
The normal production and life of users is the basic requirement, under the premise of meeting a certain degree of confidence [15] .The total required electricity of users throughout the whole day is approximately unchanged before and after the formulation of the TOU price.The price constraints and confidence constraints of price-based DR are shown in Formula ( 8 where Pr t is the TOU electrical price in period t; Pr max and Pr min are limits of TOU price in period t; Cr is the confidence expression; α is the confidence degree constrained by the total required electricity of chronic users throughout the day; P dmax is the maximum allowable deviation of the total required electricity of the user throughout the day.

Optimal operation model of ESS
The ESS can store the surplus photovoltaic output and discharge when the load is higher than photovoltaic, thus reducing electricity purchasing costs from the distribution network.When the load is lower than PV, the charging will reduce the backfeed power from the microgrid to the distribution network, thus reducing the amount of light discarded due to the power backfeed limitation.Therefore, for the greater benefit of the ESS in photovoltaic microgrids, the target expression is shown in Formula ( 9): where PY out and PY in are respectively the revenue from electricity sales of microgrid and the cost of electricity purchase of microgrid; PY PV_sub is the subsidy income of photovoltaic power generation; C BESS is costs in the storage plant including investment, operation and maintenance.
The microgrid needs to sell electricity into the distribution network and purchase electricity from the distribution network in case of excess and insufficient electricity, respectively.The system power balance and the charging and discharging power constraints of the ESS in the above two cases are respectively expressed in Formula (10).
where P out,t , P in,t are the power of microgrid to sell electricity to distribution network and the power of purchasing electricity from distribution network in period t, respectively; P BESS,t is the output of the ESS in period t, P BESS,t ≤0 indicates that the ESS is in the charging state, and P BESS,t ≤0 indicates that the ESS is in the discharging state; P PVcur,t is the discarded light power in period t; n BESS is the number of storage batteries; P BESS_charge,max and P BESS_discharge,max are respectively the maximum charging power and maximum discharge power of single energy storage battery(ESB).
At the same time, there is uncertainty during the power conversion from microgrid to distribution network.To reasonably control the risk of the reverse power exceeding the limit, the form of fuzzy chance constraint is used to express the microgrid reverse power constraint, as shown in Formula (11).
where ϕ is the confidence degree that satisfies the reverse power constraint; P out,max is the maximum power allowed to be transmitted to the distribution network.The calculation expression and the constraint of the charging state of the ESB are shown in Formula (12).BESS BESS, 1 BESS min max where SOC t represents the charging state of the ESB in period t; n BESS is the charging and discharging efficiency of ESB; Q BESS is the capacity of ESB; SOC min and SOC max are the charge limit of the ESB, respectively.

Model calculation
According to the calculation formula for the expected value of the triangular fuzzy number, the expected value expression for the uncertainty is shown in Formula ( 13).
( ) By substituting the above formula into Formula (7) and Formula (10), they can all be converted into deterministic expressions.
In this paper, both the constraint of total energy consumption of users throughout the day and the constraint of microgrid power backfeed are fuzzy opportunity optimization constraints, and both meet the standard conversion form of the clear equivalence class.According to the method in Li et al.'s work [15] , the clear equivalent forms of Formula (8) and Formula (11) are as follows.
( ) To sum up, all uncertainty expressions can be converted into clear equivalent forms for later model establishment and calculation.

Model building
This paper takes the data of a 10 kV feeder in a practical area as an example for analysis.The typical solar volt output curve of the feeder and the typical daily load curve of the region are shown in  The prices are set as follows: assuming that the unit price of industrial power is 1 ¥, the unit price of distributed photovoltaic generation is 0.485 ¥, and photovoltaic generation subsidy unit price is 0.62 ¥.The maximum allowable reverse power of the microgrid is 250 kW.
Load response characteristics are as follows: assuming that the self-elastic coefficient of load is -0.4 and the positive and negative maximum error level proportionality coefficients of load elasticity coefficient are 0.3.The positive and negative maximum error level proportionality coefficients of reference load are 0.05.The confidence degree of the constraint on the total electricity consumption of the user for the whole day and the constraint on the power backfeed of the microgrid are both set as 0.9, and the maximum permissible deviation of the total required electricity of the user for the whole day is 5% of the total required electricity of the initial user.

Influence of uncertainty of price-based DR on the optimization results
This paper sets up four scenarios to analyze the influence of price-based DR uncertainty on the configuration scale and net system income of grid connected photovoltaic microgrid ESS.Scenario 1: the photovoltaic microgrid does not include the ESS and price-based DR.Scenario 2: photovoltaic microgrid includes ESS but does not include price-based DR.Scenario 3: the photovoltaic microgrid contains ESS and price-based DR, but does not include the uncertainty.Scenario 4: the photovoltaic microgrid contains ESS and price-based DR, and the uncertainty is considered.Since no battery is installed in Scenario 1, the annual light discarding amount is 556.63 MWh.For the other three scenarios, the annual light discarding amount is 0. The number of installed batteries is 29048, 18029 and 21324, respectively.The system optimization results under the four scenarios are shown in Figure 3.  3, after the ESS is configured, the grid connected photovoltaic microgrid will no longer have light discarding, and the amount of light discarding throughout the year will be reduced by 556.63 MWh.In addition, the benefits of the energy storage device for the system are greater than its own costs, and the net income of the system will increase by 55 k¥.It shows that the configuration of ESS can improve the economy and photovoltaic consumption rate of grid connected photovoltaic microgrids.
By comparing the calculation results of Scenario 2, Scenario 3 and Scenario 4 in Figure 3, it can be observed that after the introduction of price-based DR, the cost of ESS and the power purchasing cost of the system have decreased to a large extent, regardless of whether the response uncertainty is considered.Before and after considering the uncertainty, the system net income increased by 318.8 k ¥ and 193.4 k¥, respectively.The number of battery configurations decreased by 11019 and 7724, respectively.In addition, compared with before considering the uncertainty, after taking the uncertainty of response into account, the configuration scale of the ESS and the electricity purchasing cost increase, the revenue from selling electricity decreases, the net revenue of the system decreases by 125.4 k ¥, and the number of battery configurations increases by 3295.It shows that after considering the uncertainty, price-based DR still has the ability to reduce the configuration scale of ESS and improve the economics and reliability, but this ability is weakened.

Influence of the total power consumption constraint on the optimization results
On the basis of Scenario 4, set the maximum allowable deviation of the total daily power consumption of the user as 5%, 2.5% and 1% of the total daily required power of the initial user, with the remaining parameters unchanged.The system optimization results are shown in Figure 4. From Figure 4, it shows that with the reduction of the maximum allowable deviation of initial power consumption, the deviation between a typical daily load and photovoltaic output gradually increases with 6.525 kWh, 6.87 kWh and 7.399 kWh, respectively.The number of optimized battery configurations in the system increases with 21324, 22962 and 24943.The net income of the system decreases.It should be noted that the constraint on the total required electricity of users throughout the day is an important constraint to ensure users' satisfaction with electricity consumption, but its severity will affect the response level of price-based DR.The smaller the maximum allowable deviation is, the more restricted the overall adjustable level of the load is, which leads to ESS configuration scale increase and system net income decline.Therefore, it is obliged to carefully weigh the maximum allowable deviation of the total power consumption of users throughout the day in the planning and operation of the actual system and find a balance point between the user's satisfaction with power consumption and the system economy.
In an effort to compare the influence of the user's total required electricity constraint on the system optimization results before and after considering the price-based DR uncertainty, plot the system net benefit under the maximum allowable deviation of different total electricity consumption before and after considering the price-based DR uncertainty.The results are shown in Figure 5.    5 shows that the net income of the system will decline with the reduction of the maximum allowable deviation whether or not the uncertainty is considered.In addition, with the reduction of the maximum allowable deviation, the system net income gap before and after considering the uncertainty shows a downward trend.This is mainly because with the reduction of the maximum allowable deviation, the response level of the price-based DR decreases, and the system is affected by uncertainty.Therefore, when the maximum allowable deviation decreases, the system net income gap before and after considering the uncertainty also decreases.

Influence of Load Elastic Coefficient on the Optimization Results
On the basis of scenario 4, it is assumed that the predicted values of system load elasticity coefficients are -0.2,-0.4 and -0.6, respectively.Since the maximum error proportional coefficients of load elasticity coefficients are positively correlated with the absolute value of load elasticity coefficients, it is assumed that the corresponding maximum error horizontal proportional coefficients are 0.1, 0.3 and 0.5, respectively, and the other conditions remain unchanged.The system optimization results before and after considering the uncertainty of price-based DR are shown in Figure 6.When the DR uncertainty is not considered, the number of batteries is 23439, 18029 and 17496, respectively, when the εt =-0.2, -0.4 and -0.6, respectively.When the DR uncertainty is considered, the number of batteries is 24058, 21324 and 21162, respectively, when the εt=-0.2,-0.4 and -0.6.
Values/k￥ (a) Ignore DR uncertainty (b) Consider DR uncertainty Figure 6.Optimization results with different load elastic index It can be observed from Figure 6 that with the increase of the absolute value of the load elasticity coefficient, the ability of price-based DR to reduce the cost of the ESS and improve the operating economy and reliability of the system.However, it is worth noting that after considering the uncertainty, when the load elasticity coefficient changes from -0.4 to -0.6, the number of battery configurations is only reduced by 162, and the net benefit of the system is only increased by 16.4 k¥, which is not as good as the benefits brought by increasing the load elasticity coefficient without considering the uncertainty.The main reasons for this phenomenon are: 1) when the uncertainty is not considered, improving the elasticity of load is equivalent to improving the response level of load, which can effectively improve the ability of price-based DR to reduce the cost of ESS and improve the economy and reliability of system operation; 2) considering the uncertainty of price-based DR, higher load elasticity means greater response uncertainty, which will weaken the ability of demand response to reduce the cost of ESS and improve the economy and reliability of system operation, thereby weakening the advantages brought by the improvement of load elasticity.

Conclusions
In this paper, a fuzzy model of price-based DR uncertainty is established by considering reference load and price demand elasticity curve on price-based DR uncertainty.On this basis, the optimal model of photovoltaic microgrid ESS based on price-based DR is established, and the influence mechanism of the uncertainty of price-based DR on the optimal configuration of grid-connected microgrid ESS is analyzed.Compared with the deterministic price-based DR, the price-based DR considering uncertainty still has the ability to reduce the configuration scale of the ESS and improve the operating economy of the system.But this ability is weakened.With the increase in customer satisfaction limit, the difference in ESS optimization results before and after considering the uncertainty of price-based DR shows a decreasing trend.To a certain extent, the improvement of load flexibility can enhance the ability of price-based DR to reduce the configuration scale of ESS and improve the operation economy of the system.However, due to the uncertainty, the advantages of price-based DR can't be effectively played when the load flexibility is too high.

Figure 2 .
It is assumed that there are 260 similar days each year.Detailed parameters of lead-acid battery are NESP-2023 Journal of Physics: Conference Series 2592 (2023) 012057 IOP Publishing doi:10.1088/1742-6596/2592/1/0120577 as follows: cell voltage is 2.1 V; maximum single battery capacity is 50 Ah; SOC min =0.95,SOC max =0.45, P BESS_charge,min =0.21 kW and P BESS_discharge,max =0.42 kW; charge and discharge efficiency is 085; initial investment cost of monomer is 70 ¥; operation and maintenance cost accounts for 0.3% of investment cost; and cycle life is 1000 times.

Figure 2 .
Figure 2. Output power of photovoltaics and system

Figure 3 .
Figure 3. Optimization results in different scenariosBy comparing the calculation results of Scenario 1 and Scenario 2 in Figure3, after the ESS is configured, the grid connected photovoltaic microgrid will no longer have light discarding, and the amount of light discarding throughout the year will be reduced by 556.63 MWh.In addition, the benefits of the energy storage device for the system are greater than its own costs, and the net income of the system will increase by 55 k¥.It shows that the configuration of ESS can improve the economy and photovoltaic consumption rate of grid connected photovoltaic microgrids.By comparing the calculation results of Scenario 2, Scenario 3 and Scenario 4 in Figure3, it can be observed that after the introduction of price-based DR, the cost of ESS and the power purchasing cost of the system have decreased to a large extent, regardless of whether the response uncertainty is considered.Before and after considering the uncertainty, the system net income increased by 318.8 k ¥ and 193.4 k¥, respectively.The number of battery configurations decreased by 11019 and 7724, respectively.In addition, compared with before considering the uncertainty, after taking the uncertainty of response into account, the configuration scale of the ESS and the electricity purchasing cost increase, the revenue from selling electricity decreases, the net revenue of the system decreases by 125.4 k ¥, and the number of battery configurations increases by 3295.It shows that after considering the uncertainty, price-based DR still has the ability to reduce the configuration scale of ESS and improve the economics and reliability, but this ability is weakened.

Figure 5 .
Figure 5. Net profits under different maximum allowable deviation of total electricity demand

Figure
Figure5shows that the net income of the system will decline with the reduction of the maximum allowable deviation whether or not the uncertainty is considered.In addition, with the reduction of the maximum allowable deviation, the system net income gap before and after considering the uncertainty shows a downward trend.This is mainly because with the reduction of the maximum allowable deviation, the response level of the price-based DR decreases, and the system is affected by uncertainty.Therefore, when the maximum allowable deviation decreases, the system net income gap before and after considering the uncertainty also decreases. ):