Optimal Planning of Hybrid Electricity–Hydrogen Energy Storage System Considering Demand Response

: In recent years, the stability of the distribution network has declined due to the large proportion of the uses of distributed generation (DG) with the continuous development of renewable energy power generation technology. Meanwhile, the traditional distribution network operation mode cannot keep the balance of the source and load. The operation mode of the active distribution network (ADN) can effectively reduce the decline in operation stability caused by the high proportion of DG. Therefore, this work proposes a bi-layer model for the planning of the electricity–hydrogen hybrid energy storage system (ESS) considering demand response (DR) for ADN. The upper layer takes the minimum load ﬂuctuation, maximum user purchase cost satisfaction, and user comfort as the goals. Based on the electricity price elasticity matrix model, the optimal electricity price formulation strategy is obtained for the lower ESS planning. In the lower layer, the optimal ESS planning scheme is obtained with the minimum life cycle cost (LCC) of ESS, the voltage ﬂuctuation of ADN, and the load ﬂuctuation as the objectives. Finally, the MOPSO algorithm is used to test the model, and the correctness of the proposed method is veriﬁed by the extended IEEE-33 node test system. The simulation results show that the ﬂuctuation in the voltage and load is reduced by 62.13% and 37.06%, respectively.


Introduction
Distributed generation (DG) based on wind power and photovoltaic power generation can ensure the normal supply of electricity consumption while reducing the impact on the environment [1,2].However, the high proportion of DG will have a serious impact on the operation stability of the distribution network [3,4].An energy storage system (ESS) is an important distributed resource.Additionally, the demand response (DR) load is a demand-side energy management application in the distribution system.In the operation mechanism of DR, the formulation of the time-of-use strategy is extremely important.This can shift the peak load to the valley, thereby reducing the pressure on ADN during peak hours.It should be noted that the total load in a day does not change, and the obvious degree of the phenomenon of electricity load shifting is mainly affected by user behaviour, and not all users will respond to this regulation strategy.The rational allocation of ESS while considering DR can effectively reduce the impact of the high proportion of DG access and improve the operation stability of the actively distributed network (ADN).However, distribution network planning needs to consider the future load growth and power grid development needs, integrated users, and different interest groups' win-win complex issues.The traditional distribution network cannot process the access of a high proportion of DG.ADN uses an active management model that integrates DG, ESS, and the user load.This management mode can effectively improve the safety and stability of the distribution network operation and economy, and give full play to the active use of DG [5][6][7].
At the same time, to reduce the impact of DG when it is accessing the ADN, it is necessary to configure the ESS in ADN to store the excess DG output in the energy storage medium so that the ESS can provide power when the load of ADN increases to ensure the normal operation of ADN.In addition, as an important part of ADN, the load changing is mainly caused by human subjective factors (for example, for residential electricity, the switching of electrical equipment, and for industrial electricity, the changing of factory output).These changes will cause the load pressure of ADN, which will reduce the operation stability of ADN.Therefore, it is necessary to call on residents' load to reduce the use of high-power appliances during the peak period of electricity consumption and use them during the valley period of electricity consumption.The addition of the DR load can effectively achieve this goal [8][9][10].On the electricity market, DR is mainly composed of two types: one is to sign an interruptible agreement with the user, which requires that it reduces or interrupts the electricity consumption during the peak load period to obtain relevant compensation.The scheme is mainly aimed at large industrial users because it has high power flexibility and is not suitable for small-scale distribution networks.The other is based on the price elasticity matrix, through the dynamic changes in electricity prices that affect the user's electricity consumption behavior, as in the case of total electricity users which remain unchanged through the load shifting to achieve the 'peak load shifting' role, to reduce the net load fluctuations caused by DG.
Therefore, an effective configuration scheme is key to realizing the renewable energy consumption.At the same time, the rational use of the DR side load can maximize the benefits and reduce the load fluctuations caused by DG access.Reference [11] proposed a method to offset the uncertainty of the renewable energy output with the DR load.Taking the terminal load size and the balanced load strategy as the decision variables, a renewable energy consumption optimization model considering the renewable energy consumption target and economic target is established.Reference [12] proposed a multi-objective DR model based on user satisfaction, electricity expenditure satisfaction, and user satisfaction.However, it does not consider the stability index of the ADN, and it weights the multiobjective into a single objective by setting the weight method which lacks objectivity.Based on the integrated energy system considering the electric, thermal, and gas loads on the DR side, the authors in [13,14] used the Cplex solver to obtain the minimum operation and maintenance cost of the integrated energy system under the constraints.In [15], an optimal dispatch model with ESS was constructed based on the dynamic electricity price model, which reduced the cost of operation.
In recent years, ESS has become a key facility to promote the large-scale application of renewable energy and improve the resilience and economy of ADN due to its ability to adjust the power of the distribution network and transfer energy across time scales.The configuration of ESS on the distribution side plays an important role in improving the consumption rate of renewable energy, stabilizing the fluctuation of DG and solving the uncoordinated development of the network.However, the role of ESS in regulating ADN and accelerating DG applications depends to a large extent on the proper planning of ESS.The disorderly access of ESS may lead to problems such as voltage over-limit, increased load fluctuation, and endangering the grid operation.
In many studies of configuring ESS, determining how the ESS may reasonably access ADN is an important issue.In [16], a single-layer model was established to describe the economic optimization problem of the ESS configuration, without considering the coupling relationship between ESS and ADN.Aiming at reducing the ESS operation and maintenance cost and improving the voltage fluctuation and load fluctuation, reference [17] used the multi-objective mayfly algorithm (MOMA) to formulate the optimal location and capacity.In the optimal configuration of ESS with DR, it is necessary to consider the multiple indicators of the user side and the distribution side.If these indicators are optimized in the model at the same level, the local optimal phenomenon will be caused by the contradictory Processes 2023, 11, 852 3 of 22 relationship between different objectives.Therefore, a bi-level optimization model is needed to solve this problem.In reference [18], a two-layer model and multiple indicators were established to optimize the configuration of a battery energy storage system (BESS).However, ADN planning needs to consider the long-term load growth, electromagnetic energy storage system charging, and discharging time scale as shorter, which is suitable for the short-term storage of electricity.As the most promising energy source in the 21st century, hydrogen is an energy storage medium with incomparable advantages over other energy storage media.For example, in combustible materials, compared to natural gas, hydrogen combustion products are only completely pollution-free water.In terms of storage stability, with the development of hydrogen storage technology in recent years, it has been possible to ensure the long-term safe storage and transportation of hydrogen.Moreover, in the medium and long-term, a hydrogen energy storage system (HESS) is more suitable for solving the problem of the coordinated matching of renewable energy and load in the regional power grid, accelerating energy transformation, and playing an important role in environmental protection [19][20][21].In reference [22], an ESS planning model considering the mixed storage differentiation characteristics is established, and the genetic algorithm based on an elitist preservation strategy is used to optimize the configuration of the hybrid ESS.Reference [23] used a bi-layer model to optimize the configuration of the hybrid ESS.The upper-level objective function is the annual comprehensive cost of configuring ESS, and the lower-level objective function is the rate of wind and light abandonment.It does not consider DR.This configuration method requires a highly stable ADN and it is difficult to guarantee the satisfaction of users.
Considering DR while configuring ESS serves to further reduce the impact on ADN.Therefore, a bi-level programming model considering the DR side load and electricityhydrogen hybrid ESS is established in this work.The bi-layer model can better coordinate various problems in ESS.The upper-level layer aims at the minimum net load fluctuation, user satisfaction with electricity, and user satisfaction with money, and affects the user's electricity consumption behavior through the adjustment of a dynamic electricity price.The lower-level layer is concerned with the minimum life cycle cost (LCC), minimum net load fluctuation, and minimum voltage fluctuation of the electricity-hydrogen hybrid energy storage to improve the stability of the ADN while ensuring the economic benefits of investors.Finally, the feasibility of the model is verified by multi-objective particle swarm (MOPSO) in the extended IEEE-33 test node combined with the historical wind and light load data of a certain place.Meanwhile, a multi-objective artificial bee colony (MOABC) and multi-objective differential evolution (MODE) have been used as the comparison algorithm to verify the accuracy of MOPSO.
The main contribution of this work is: (1) The demand side response model is established.The model describes the electricity consumption and purchase behavior of users under different electricity prices through the time-of-use electricity price strategy.
(2) A bi-layer optimization model is proposed.The model takes into account the economy and comfort of users' electricity consumption, the economy of ESS and the change in the ADN operating index under the time-of-use strategy.
(3) The simulation test based on the IEEE-33 node test system is designed, and the MOPSO algorithm is used to solve the model.The simulation results show that the proposed model and solution method can obtain the optimal configuration scheme.

Time-Of-Use Price Model
After the implementation of this measure, the original electricity price in each period becomes: where p p , p u , p v represent the peak time, flat time, and valley time price after the implementation of the time-of-use price strategy, respectively; p 0 represents the electricity price set by the power supply company before the implementation of time-of-use price strategy; α, β, γ represent the price fluctuation range for three periods, respectively.

Electricity Price Elasticity Matrix Model
The electricity price elasticity matrix reflects the user changing their electricity consumption behavior according to different periods of time-of-use price.The relationship between the change in user electricity consumption and the change in electricity price is as follows: where ∆L represents the load change value and ∆p represents the electricity price change value.
The peak, flat, and valley loads change as follows: where P 1,p , P 1,u , P 1,v represent the amount of electricity purchased by users from the superior power grid at three different times after the price changes, respectively; p 0,p , p 0,u , p 0,v represent the electricity prices of each period before the time-of-use price strategy is not implemented, respectively.K is the price elasticity matrix, which is calculated as follows: This work uses the price elasticity matrix data described in reference [24] to describe the response of the load to electricity price changes.The active DR diagram is shown in Figure 1.

Battery Energy Storage System Model
In this work, BESS uses lithium batteries and lead-acid batteries as energy storage

Battery Energy Storage System Model
In this work, BESS uses lithium batteries and lead-acid batteries as energy storage batteries, and its daily self-discharge rate is low (0.1~0.3%).Therefore, this work only considers the power exchange between BESS and ADN.The charge-discharge model of BESS is as follows: where P charge,B (t) represents the charging power of BESS at time t; P discharge,B (t) represents the discharge power of BESS at time t; α charge, B and α discharge,B represent the chargedischarge efficiencies of BESS, respectively.

Hydrogen Energy Storage System Model
Electrolytic cell (EC), hydrogen storage tank (HT), and fuel cell (FC) are the main components of HESS.The EC can electrolyze water into hydrogen and oxygen in a short time, and its output power can be described as: where P charge,H represents the charging power of HESS; α EC represents the conversion efficiency for EC.The FC is the power output core of HESS, which supplies power to the ADN by consuming hydrogen in HT.The output power of HESS can be expressed by the output power of FC, as follows: where Q HT represents the hydrogen sent to FC from the HT; α FC represents the conversion efficiency for FC.q hydrogen represent the calorific value constant of hydrogen, which is 39.3 kWh/kg.

Upper-Level Objective Function
After considering DR, users will change their electricity consumption habits according to the time-of-use price.This behavior will reduce the load fluctuation and improve the stability of ADN.The formulation of time-of-use electricity prices will allow users to selectively adapt their electricity consumption at different times.The behavior of users to choose their electricity consumption period according to the electricity price will change the electricity comfort for the user.
After comprehensive consideration, this work selects the load fluctuation of ADN, users' electricity purchase cost satisfaction, and the electricity comfort for user as the objective function in the upper optimization model.

The Load Fluctuation of ADN
where n t represents the number of typical days; P 1,i (t) and P 1,i (t − 1) represent the electricity purchased at time t and time (t − 1) on typical days after the application of the time-of-use electricity price strategy, respectively.T is 24 h.

User Purchase Cost Satisfaction
In this work, the ratio of user electricity expenditure before and after the real-time time-of-use electricity price is used as a measure of the user purchase cost satisfaction index, as follows: where P 0,i (t) and p 1,i (t), respectively, represent the electricity price in the period t before and after the application of the time-of-use electricity price on a typical day i;

Comfort of User
This work defines the comfort of a user through the ratio of the user's transferred load to the initial load, which is specifically expressed as:

Upper-Level Constraint
When the electricity price fluctuates greatly, it will have a great impact on the user's electricity consumption habits and the stability of the power grid.Therefore, the usual price is equal to the price when time-of-use price is not considered.The peak price should be increased by 50% over the usual price, and the valley price should be reduced by 50% according to the usual price [25].
where p f represents the electricity price fluctuation in different periods ranging from 10% to 20%.This work takes 20%.

Lower-Level Optimization Model
(1) The initial investment cost of BESS where n BESS represents the number of BESS installations; E BESS represents the capacity of BESS; P BESS represents the rated power rating of BESS; w B represents the cost of battery; and w I represents the cost of the inverter.γ B represents the recovery coefficient of the equal annual value of BESS.l B,H denotes the lifetime of BESS and HESS; d denotes the discount rate [26].
(2) The maintenance cost of BESS where µ B represents the proportion of the battery maintenance cost to investment cost; µ I represents the proportion of the inverter maintenance cost to investment cost.
(3) The operation cost of BESS where c p (t) and c s (t) are the purchase and sale prices of ESS, respectively.(4) The replacement cost of BESS where r BESS and r time represent the battery replacement times and life cycle, respectively; δ BESS represents the annual decrease ratio of the BESS cost [27].
(5) The initial investment cost of HESS where w FC , w EC , and w HT denote the unit capacity cost of FC, EC, and HT, respectively; P FC , P EC represent the rated power of FC and EC, respectively; Q HT represents the capacity of HT. γ H represents the recovery coefficient of the equal annual value of HESS.(6) The maintenance cost of HESS where µ FC,EC represents the proportion of the FC and EC maintenance cost to investment cost; µ HT represents the proportion of HT maintenance cost to the investment cost.(7) The operation cost of HESS (8) The replacement cost of HESS The service life of FC and EC is 5-10 years, which is much shorter than that of HT (25 years).Therefore, the replacement cost of HESS only includes FC and EC.
where r FC,EC represents the service life of FC and EC; t FC,EC represents the replacement times of FC and EC, respectively.

The Load Fluctuation of ADN
where P 2,i (t) represents the power purchased from the upper power grid at time t after the ESS is connected to the ADN.

The Voltage Fluctuation of ADN
where V n,i (t) represents the voltage per unit value of node n on a typical day at time t; V n,i represents the average voltage of node n on a typical day.

Constraints
Before and after the installation of ESS, the voltage of each node in the ADN needs to be satisfied within a certain safety range.At the same time, to ensure the rationality of the ESS configuration, the installation capacity and rated power of ESS also need to fall within a certain range.Moreover, the same type of ESS cannot be installed on the same node of the distribution network, and the node cannot be the contact point between the ADN and the upper power grid.These constraints can be described as:

Model Solving Method Based on MOPSO
The location and capacity of the electricity-hydrogen hybrid system considering DR is a complex multi-objective model, which needs to optimize the electricity price fluctuation, ESS charging and discharging power, capacity, and location during each period.Therefore, this work uses MOPSO to solve the model [28,29].The bi-layer model solving the process of the MOPSO algorithm is shown in Figure 1.Equations ( 29) and (30) represent MOPSO's optimization mechanism.
where Pbest i (t) represents the historical optimal position of the i(i = 1, 2, 3, . . ., N) particles in the search process, which is the local optimal solution; Gbest i (t) represents the optimal position of all particles in the current search results, which is the global optimal solution; r 1 and r 2 represent random values in [0,1]; c 1 and c 2 represent the particle self and group learning factors, usually between 0 and 2; w represents the value of the inertia weight that controls the particles in the population to search in the solution space.The bi-level model solution flow based on the MOPSO algorithm is shown in Figure 2 where P () represents the historical optimal position of the ( = 1,2,3, … , ) particles in the search process, which is the local optimal solution; G () represents the optimal position of all particles in the current search results, which is the global optimal solution;  and  represent random values in [0,1];  and  represent the particle self and group learning factors, usually between 0 and 2;  represents the value of the inertia weight that controls the particles in the population to search in the solution space.
The bi-level model solution flow based on the MOPSO algorithm is shown in Figure 2 Update particle population according to Eq. ( 28) and Eq. ( 29) Calculate the initial value of the upper objective.

A Compromise Solution Selection Method Based on Improved Grey Target Decision
In order to avoid the influence of subjective factors on the results, this work uses the improved grey target decision making (IGTDM) based on the entropy weight method (EWM) to obtain the optimal compromise solution.The detailed steps can be found in [30,31].

Simulation Experiment Model
This work designs a simulation experiment based on the extended IEEE-33 node test system [32].The system topology is shown in Figure 3.Meanwhile, this work accesses two wind DGs with an installed capacity of 1 MW as well as two photovoltaic DGs with an installed capacity of 0.9 MW at nodes 15 and 32 as well as 23 and 20, respectively.In addition, the main parameters of ADN are shown in Table 1, whilst the main parameters of the different algorithms are shown in Table 2.The main parameters of the algorithms can be deduced from a uniform design, as determined in [33][34][35].Table 3 shows the main cost of ESS [36][37][38][39].It should be noted that the installation node position of DG in this paper was completed before configuring ESS by referring to the previous work [40] and the method in the literature [41].

A Compromise Solution Selection Method Based on Improved Grey Target Decision
In order to avoid the influence of subjective factors on the results, this work uses the improved grey target decision making (IGTDM) based on the entropy weight method (EWM) to obtain the optimal compromise solution.The detailed steps can be found in [30,31].

Simulation Experiment Model
This work designs a simulation experiment based on the extended IEEE-33 node test system [32].The system topology is shown in Figure 3.Meanwhile, this work accesses two wind DGs with an installed capacity of 1 MW as well as two photovoltaic DGs with an installed capacity of 0.9 MW at nodes 15 and 32 as well as 23 and 20, respectively.In addition, the main parameters of ADN are shown in Table 1, whilst the main parameters of the different algorithms are shown in Table 2.The main parameters of the algorithms can be deduced from a uniform design, as determined in [33][34][35].Table 3 shows the main cost of ESS [36][37][38][39].It should be noted that the installation node position of DG in this paper was completed before configuring ESS by referring to the previous work [40] and the method in the literature [41].

ESS Configuration Scheme
The optimization results of the upper-level model are shown in Table 4. Residents can achieve the maximum improvement in load fluctuation within a reasonable range of electricity comfort through the lower purchase cost than without considering the time of use electricity price based on the new price scheme formulated by MOPSO, MOABC, and MODE, respectively.In addition, the optimal configuration scheme formulated by different algorithms of ESS based on IGTDM is shown in Tables 5-7.From Tables 5-7, it can be concluded that ESS based on the MOPSO configuration can most significantly reduce the load fluctuation and voltage fluctuation of ADN.Compared with MODE and MOABC, the net load fluctuation of ESS based on MOPSO is reduced by 22.93% and 28.76%, respectively.Meanwhile, the voltage fluctuation is reduced by 41.39% and 45.64%, respectively.In summary, although the LCC optimized by MOPSO is slightly higher than the other two algorithms, the stability of ADN can be most significantly improved by ESS based on MOPSO configuration.Therefore, according to the above configuration scheme, four ESSs are configured near the distributed power supply, which cannot quickly suppress the influence of the unstable output of DG on the stability of ADN.Figures 4 and 5 are the load and voltage fluctuation curves of ADN after ESS access under the condition of considering DR.It should be noted that the average node voltage in Figure 5 is averaged by the node voltage values of all nodes.Based on the above, it can be concluded that the reasonable configuration of the ESS can stabilize the load and improve the stability of ADN.  5 is averaged by the node voltage values of all nodes.Based on the above, it can be concluded that the reasonable configuration of the ESS can stabilize the load and improve the stability of ADN.Furthermore, in order to verify its superiority, MOPSO was analyzed from two aspects, namely computational stability and operation time.The computational stability of the three algorithms was shown by the boxplot in Figures 6-8.It can be seen that the distribution of three objective functions optimized by MOPSO is more concentrated, indicating that the MOPSO algorithm is more stable and accurate in the ESS location, capacity, and power optimization.Table 8 shows the operation time of the three algorithms under the same population size (50) and iteration number (200).It can be concluded from the table that the operation time of MOABC and MOPSO is much lower than that of MODE.Figures 9 and 10 are the operation curves of ESS.In this work, the ESS daily initial charge and discharge power is positive for ESS charging or for discharging.In addition, Figures 9 and 10 show the charge-discharge power curve of both HESS and BESS in one day, respectively.These ESSs operate independently, so they can be charged and discharged simultaneously.It can be seen from the diagram that, compared with BESS, HESS does not have the ability of BESS to quickly swallow discharge because of its low conversion efficiency.However, due to its advantages of a long storage time and long running life, it can fully make up for the shortcomings of the short life of BESS.Furthermore, in order to verify its superiority, MOPSO was analyzed from two aspects, namely computational stability and operation time.The computational stability of the three algorithms was shown by the boxplot in Figures 6-8.It can be seen that the distribution of three objective functions optimized by MOPSO is more concentrated, indicating that the MOPSO algorithm is more stable and accurate in the ESS location, capacity, and power optimization.Table 8 shows the operation time of the three algorithms under the same population size (50) and iteration number (200).It can be concluded from the table that the operation time of MOABC and MOPSO is much lower than that of MODE.Figures 9 and 10 are the operation curves of ESS.In this work, the ESS daily initial charge and discharge power is positive for ESS charging or for discharging.In addition, Figures 9 and 10 show the charge-discharge power curve of both HESS and BESS in one day, respectively.These ESSs operate independently, so they can be charged and discharged simultaneously.It can be seen from the diagram that, compared with BESS, HESS does not have the ability of BESS to quickly swallow discharge because of its low conversion efficiency.However, due to its advantages of a long storage time and long running life, it can fully make up for the shortcomings of the short life of BESS.From the lower-level Pareto front distribution, it can be seen that LCC is also negatively correlated with voltage fluctuation and load fluctuation, which shows that the LCC of the hybrid ESS is often optimized at the expense of ADN stability.In summary, MOPSO can obtain a wide range of non-dominated solutions, which shows that MOPSO does not easily fall into a local optimum and has a superior optimization ability when solving ESS planning problems [42].

Analysis of the Stability of ADN throughout Four Weeks
To verify the feasibility of the system, the obtained results (the locations, capacities, and charging/discharging power of BESS and HESS in 24 h) by MOPSO-IGTDM were applied to analyze the stability of ADN.The curves of the load and voltage over the course of four weeks are shown in Figures 13 and 14, respectively.Meanwhile, Table 5 gives the values of the load and voltage fluctuation.It can be concluded from Table 9 that the net load fluctuation and voltage fluctuation decreased by 25.89% and 44.80% after accessing ESS compared with the initial condition, respectively.On the whole, the stability of ADN can be greatly enhanced by taking the DR and ESS into account at the same time.To verify the feasibility of the system, the obtained results (the locations, capacities, and charging/discharging power of BESS and HESS in 24 h) by MOPSO-IGTDM were applied to analyze the stability of ADN.The curves of the load and voltage over the course of four weeks are shown in Figures 13 and 14, respectively.Meanwhile, Table 5 gives the values of the load and voltage fluctuation.It can be concluded from Table 9 that the net load fluctuation and voltage fluctuation decreased by 25.89% and 44.80% after accessing ESS compared with the initial condition, respectively.On the whole, the stability of ADN can be greatly enhanced by taking the DR and ESS into account at the same time.Table 10 shows the ADN stability and ESS configuration under different operating scenarios.In addition, it can be seen from Table 5 that the LCC of ESS is unaffected by DR.In addition, comparing Scenario 1 and Scenario 2 in Table 10, it can be seen that considering DR without ESS, the ADN load fluctuation is reduced by 0.6373 (MW/day) and the voltage fluctuation is reduced by 0.0475 (p.u./day).Comparing the LCC values of Scenario 3 and Scenario 4, it can be seen that configuring ESS after considering DR can reduce the LCC of the configured ESS by 172.6 (USD/day), and the load fluctuation and voltage fluctuation are reduced by 1.6757 (MW/day) and 0.0499 (p.u./day), respectively.Moreover, comparing scenario 2 and scenario 4, configuring ESS while considering DR can further reduce the ADN, 13.44% load fluctuation and 0.72% voltage fluctuation.This is because the application of the time-of-use electricity price changes the user's electricity consumption behavior and improves the stability of ADN operation.On this basis, the further configuration of ESS can give full play to the role of ESS and greatly reduce the load fluctuation and voltage fluctuation of ADN.Therefore, configuring ESS while considering DR can maximize the operational stability of ADN.The access to DG and BESS changes the power flow distribution of the ADN, which also has a certain impact on the voltage quality of the ADN.When DG and BESS are connected to ADN at the same time, and ADN loss is ignored and the node voltage can be calculated by the following equation (assuming that node No.1 is the power injection node of DG and BESS, and that node No.0 is the access node of the upper power grid): where P load and Q load represent the active power and reactive power of the load, respectively.U N represents the phase voltage of the ADN.P DG and Q DG represent the active power and reactive power transferred to the ADN by DG.P BESS and Q BESS represent the active and reactive power absorbed or emitted by BESS to the ADN, which is positive when BESS is charging and negative when it is discharging.U node and ∆U node are the voltage at node 1 and the voltage drop of 0-1 branch after accessing DG and BESS, respectively.
After the BESS 's appropriate capacity is connected, it absorbs power from the ADN as a load in the charging state to avoid overvoltage in node 1.Therefore, BESS can reduce the voltage surge caused by the access of large-capacity DG through reasonable charging and discharging.Similarly, if the ADN is at peak load and the DG output is insufficient, BESS can act as the power supply to send power to the ADN and increase the node voltage.Therefore, for the ADN with a high proportion of DG access, the access of BESS can effectively guarantee the voltage level of the ADN and improve the quality of the power supply.The rational allocation of BESS capacity is the key to exerting the pressure regulation capability of BESS.
The influence of different access location conditions on voltage fluctuation is verified by only changing the location of BESS when the capacity did not change.Table 11 shows the values of voltage fluctuation when BESS is connected to the optimal location obtained by MODE and MOABC under the condition of constant capacity and charge-discharge power, respectively.When node 2 and node 6 connected to BESS, the voltage fluctuation decreases by 0.72% and 0.64% compared with the two other conditions, respectively.Figure 15 is the curve of voltage fluctuation at different access locations of BESS.On the whole, it can be seen that the proposed model is feasible and the algorithm is superior.
where P L (t) represents the equivalent load power of ADN at time t when DG and BESS are connected simultaneously.P load (t) represents the load demand of ADN at time t.
It can be seen that BESS can effectively balance the power supply and demand and reduce the peak-valley load difference.However, the peak cutting and valley filling effects of BESS largely depend on the configured capacity and its charging and discharging strategy.

Conclusions
In this work, the DR model is established based on the time-of-use electricity price strategy, and a bi-layer model for configuring the electricity-hydrogen hybrid ESS is established based on the DR model.The conclusion is as follows: (1) The time-of-use price strategy can achieve a balance between the stability of the ADN and the comfort of the user side through the load transfer of the ADN, and the load transfer operation will not change the total power consumption throughout the day.
(2) The bi-layer ESS location and capacity model proposed in this work not only considers the profits of all parties but also improves the stability of ADN by scientifically and reasonably planning the capacity and access location of ESS.
(3) A simulation experiment based on the IEEE-33 node test system is designed.In the simulation experiment result, the stability of ADN can be greatly enhanced by the configuration scheme based on MOPSO.Compared with MODE and MOABC, the net load fluctuation of ESS based on MOPSO is reduced by 22.93% and 28.76%, respectively.Meanwhile, the voltage fluctuation is reduced by 41.39% and 45.64%, respectively.The comparison of ADN operation indexes in four different scenarios is given.The experimental results show that the electricity-hydrogen hybrid energy storage system can effectively reduce the ADN load fluctuation and voltage fluctuation.Considering DR while configuring ESS, the load fluctuation and voltage fluctuation of ADN can be further reduced.
In future research, it is not only necessary to consider how ESS can be more correctly connected to ADN, but also whether the multi-type ESS comprehensive configuration can further reduce the configuration cost and improve the stability of ADN operation.
5.1.Lower-Level Objective Function 5.1.1.The LCC of ESS At present, most ESS cost models do not consider the impact of the type, technical characteristics, and life cycle of ESS in detail.The LCC model comprehensively considers all the costs of a life-cycle including the investment cost, maintenance cost, operation cost, and replacement cost, which can more comprehensively describe the economic cost of the whole life of ESS.Hence, this work takes the daily LCC of the hybrid ESS as the objective function as follows:

i=imaxFigure 2 .
Figure 2. The flowchart of the bi-level model based on MOPSO algorithm.

Figure 2 .
Figure 2. The flowchart of the bi-level model based on MOPSO algorithm.

Figure 3 .
Figure 3. Topology of the extended IEEE-33 bus system.

Figure 4 .
Figure 4. Load curve connected to ESS considering DR.Figure 4. Load curve connected to ESS considering DR.

Figure 5 .
Voltage curve connected to ESS considering DR.

Figure 5 .
Voltage curve connected to ESS considering DR.

Figure 6 .
Figure 6.Boxplot of LCC obtained by various algorithms.

Figure 6 .
Figure 6.Boxplot of LCC obtained by various algorithms.

Figure 7 .
Figure 7. Boxplot of net load fluctuation obtained by various algorithms.

Figure 8 .
Figure 8. Boxplot of voltage fluctuation obtained by various algorithms.

Figures 11 and 12
Figures 11 and 12 represent the Pareto front obtained by MOPSO.The distribution of the Pareto front reflects the distribution of solutions.In addition, by observing the Pareto front distribution of the upper-level objective function, it can be seen that user comfort is negatively correlated with the user purchase cost and load fluctuation, respectively.From the lower-level Pareto front distribution, it can be seen that LCC is also negatively correlated with voltage fluctuation and load fluctuation, which shows that the LCC of the hybrid ESS is often optimized at the expense of ADN stability.In summary, MOPSO can obtain a wide range of non-dominated solutions, which shows that MOPSO does not easily fall into a local optimum and has a superior optimization ability when solving ESS planning problems[42].

Figures 11 and 12
Figures 11 and 12 represent the Pareto front obtained by MOPSO.The distribution of the Pareto front reflects the distribution of solutions.In addition, by observing the Pareto front distribution of the upper-level objective function, it can be seen that user comfort is negatively correlated with the user purchase cost and load fluctuation, respectively.From the lower-level Pareto front distribution, it can be seen that LCC is also negatively correlated with voltage fluctuation and load fluctuation, which shows that the LCC of the hybrid ESS is often optimized at the expense of ADN stability.In summary, MOPSO can obtain a wide range of non-dominated solutions, which shows that MOPSO does not easily fall into a local optimum and has a superior optimization ability when solving ESS planning problems[42].

Figure 11 .
Figure 11.The Pareto front of the upper-level objective function.Figure 11.The Pareto front of the upper-level objective function.

Figure 11 .
Figure 11.The Pareto front of the upper-level objective function.Figure 11.The Pareto front of the upper-level objective function.

Figure 11 .
Figure 11.The Pareto front of the upper-level objective function.

Figure 12 .
Figure 12.The Pareto front of the lower-level objective function.Figure 12.The Pareto front of the lower-level objective function.

Figure 12 .
Figure 12.The Pareto front of the lower-level objective function.Figure 12.The Pareto front of the lower-level objective function.
PV2Figure3.Topology of the extended IEEE-33 bus system.

Table 2 .
Main parameters of different algorithms.

Table 2 .
Main parameters of different algorithms.

Table 3 .
Main cost of ESS.

Table 4 .
Optimization results of the upper model.

Table 5 .
Optimization results of the lower model of the MOPSO.

Table 6 .
Optimization results of the lower model of the MODE.

Table 7 .
Optimization results of the lower model of the MOABC.areconfigurednear the distributed power supply, which cannot quickly suppress the influence of the unstable output of DG on the stability of ADN.Figures4 and 5are the load and voltage fluctuation curves of ADN after ESS access under the condition of considering DR.It should be noted that the average node voltage in Figure

Table 8 .
Comparison of the calculation times of the three algorithms.

Table 8 .
Comparison of the calculation times of the three algorithms.Analysis of the Stability of ADN throughout Four Weeks

Table 9 .
Value of load and voltage fluctuation through four weeks.Influence of Different Operation Modes on Stability of ADN Based on the time-of-use price strategy and ESS configuration, this section divides the ADN operation into four scenarios to compare the stability of ADN in different scenarios.Scenario 1: DR is not considered and ESS is not configured; Scenario 2: Consider DR only; Scenario 3: Configure ESS only; Scenario 4: Consider DR and configure ESS.

Table 10 .
Configuration of ADN stability and ESS under different scenarios.

Table 11 .
Voltage fluctuation at different access locations of BESS.

Table 11 .
Voltage fluctuation at different access locations of BESS.Voltage fluctuation at different access locations of BESS.Figure 15.Voltage fluctuation at different access locations of BESS.8.2.Effect on the Load Level P L (t) = P load (t) − P DG (t) + P dis/chaD,BESS (t) Figure 15.