Model and economic analysis of hydrogen consumption from hydropower considering storage capacity

Due to the characteristics of clean and efficient hydrogen energy and its wide application, hydropower hydrogen production has become one of the potential technical means to reduce the new energy abandonment rate


Introduction
In recent years, China's call for controlling the total greenhouse gas emissions has been increasing, and the energy structure adjustment and transformation has been growing [1][2].In this process, hydropower, a traditional clean energy source, should play an important role.By the end of 2015, China's hydropower installed capacity reached 320 million kW, with installed capacity exceeding 20% of China's installed power generation capacity [3].As the country's economy enters a new normal, the energy consumption per unit of GDP decreases, and the problem of "water abandonment" and other ineffective consumption of renewable energy power is becoming more and more prominent [4][5].
Nowadays, steadily promoting the transformation of energy structure accelerating the green and lowcarbon development of energy has become an essential way for China to realize the "dual-carbon" strategic goal [6][7].The National Energy Administration (NEA) requires the demonstration of hydrogen production from renewable energy sources according to local conditions and the orderly promotion of major hydropower and nuclear power projects.Hydrogen energy, as an essential part of the future national energy system, is an important carrier for end-use energy to realize green and lowcarbon development [8][9].
Hydrogen energy can be divided into "gray hydrogen," "blue hydrogen," and "green hydrogen," among which green hydrogen uses clean energy to generate surplus electricity to produce hydrogen by electrolysis of water, achieving zero carbon dioxide emissions at the source of production, which plays an essential role in building a green, safe, and efficient energy system [10].
Utilizing clean energy to generate surplus power electrolysis of water to produce hydrogen, green hydrogen energy realizes zero carbon dioxide emissions at the source of production.It plays an essential role in the global energy transition [11].Literature [12] explored ways to utilize Nepal's abundant water resources, including hydroelectric power plants, to produce hydrogen from hydroelectricity to meet the country's energy needs, but also energy exports to create foreign exchange.Literature [13] discussed the feasibility of an electric to-hydrogen re-conversion model combining an electrolyzer and hydrogen storage tank to unfold.The results of the study showed that the hydrogen conversion intermediary channel effectively improves energy loss, reduces the cost of the complete process, and reduces the emission of pollutant gases.Literature [14] describes a lowcost, efficient, and safe 2-orr catalyst that improves the efficiency and safety of hydrogen peroxide production.Literature [15] reveals the development and current situation in the field of green hydrogen production in Russia.It concludes that national strategic planning and resource support are the keys to the development of green hydrogen production in Russia.
In order to break through the current dilemma faced by renewable energy sources and to improve the consumption of renewable energy sources and the economy of system operation, the green certificate trading mechanism has received widespread attention.Literature [16] analyzed and studied the application of electrolytic hydrogen in the automotive industry, pointing out that the electrolytic hydrogen solution is the most environmentally friendly energy supply solution.Literature [17] emphasized the sustainable development of the hydropower industry to find a balance between river ecological environment protection and energy production.Literature [18] estimated the potential for green hydrogen production in the Columbia River in the United States.It proposed the reuse of abandoned water energy, such as hydrogen production, to create additional economic benefits.Literature [19] discusses that green hydrogen production can effectively mitigate the greenhouse effect, evaluates the green hydrogen production capacity of hydroelectric plants in Colombia and Venezuela, and concludes that a green hydrogen production program can help these countries to reduce pollution while increasing energy efficiency.Literature [20] suggests the feasibility of hydrogen fuel as an energy storage pathway, with lower costs and less environmental pollution than batteries and pumped storage.
The article covers all the aspects of hydropower-to-hydrogen production and calculates the amount of hydropower that is discarded using theoretical electricity and water discard.After mathematical modeling of six aspects, including electrolyzer, compressor, hydrogen storage device, fuel cell, and inverter, a hydropower-to-hydrogen energy storage scheduling and cost model is constructed to evaluate the economics of hydrogen storage cycles.In addition, in order to achieve a balance between the energy storage capacity and economy of hydropower-to-hydrogen production, a constraint hydropower-to-hydrogen output model is established using a two-layer planning algorithm, and the model is solved by PSO algorithm and CPLEX.Finally, the performance of hydropower hydrogen production is investigated, and an example analysis is carried out with the Shaping secondary hydropower station and an integrated energy system in an industrial park to explore the storage capacity of the hydropower hydrogen production and consumption model, as well as the optimal economy.

Abandonment of water and energy by hydropower plants
When a hydropower plant cannot generate electricity according to the rated output, the amount of abandoned water is the amount of electricity lost.Obviously, the maximum value of abandoned water and electricity in a certain period may be equal to the whole theoretical electricity generation minus the actual electricity generated by the hydropower station.The different reasons that cause hydroelectric power stations to be abandoned water, abandoned water, and electricity can be divided into the output of blocked abandoned water and electricity, security constraints, abandoned water and electricity, peak abandoned water and electricity, and maintenance of abandoned water and electricity, four kinds.Calculating the abandoned water and energy of hydropower plants is necessary before consuming hydrogen from hydropower.

Characteristics of Hydroelectric Power Plant Water Abandonment
It is usually considered that the theoretical amount of abandoned water and electricity is the amount of abandoned water and electricity calculated from the current operating conditions and generating capacity of the hydropower station when the water abandonment occurs and does not reach the theoretical output of the power station.The model can be described as: Where H E is the theoretical amount of abandoned water and electricity of the power station.Total () t  is the integrated output coefficient of the power station at the moment of t , which can be corrected in real time according to the turbine efficiency, unit transmission efficiency, and generator efficiency.() Qt for the power station t moment of abandoned water flow (according to the power generation side, the system side, and the market size of the abandoned water flow categorization calculation of the corresponding amount of abandoned water and electricity).() Ht is the practical net head of power station t moments of operation and power generation, which can be obtained by the difference between the total head of the upstream and downstream sections. ()

N
Pt is the theoretical output of the power station at the moment of t . ()n Pt is the actual output of the power plant at t .T is the length of the calculation period.
In the engineering application, without considering the water level pressure difference effect of the reservoir and the flow velocity of the water section, the theoretical output expression is: Total ( ) 9.8 ( ) ( ) ( ) Where, () Qt is the cross-sectional water flow through the turbine at the moment of t , which can be obtained from the hydrological database of the power station.
Based on Eq. ( 2), the water abandonment power of the hydropower station is calculated, and the equivalent water abandonment flow of the power station can be obtained as:

Calculation of electricity discarded based on theoretical electricity quantity
The method of calculating the amount of discarded electricity with theoretical electricity is to first calculate the theoretical electricity generation of the hydropower plant based on the actual incoming water and define the part of the difference between the theoretical electricity of the hydropower plant and the actual electricity as the amount of discarded electricity: Where K is the output coefficient.u Z is the upstream flood limit water level.
( ) , is the downstream water level of the hydropower station according to the incoming flow.h  is the head loss.c h  is the static head loss. is the head loss coefficient.max y

Q
is the maximum power generation referral flow rate of the power station.i Q is the average incoming flow of the hydropower station.t  is the calculation period, generally taking the day.
If Lz E P t  … , then take Lz E P t = , z P is the installed capacity of the hydropower station.
Calculation of the amount of abandoned hydroelectricity: Where s E is the actual power generation of the hydropower plant.
Calculation of peak discarded hydropower: Where   , is the maximum possible output of the hydropower plant.
( ) max ,, is the total expected output of the hydropower plant.max x P is the maximum possible output of the hydropower plant when ensuring the safe operation of the system.max j P , is the expected output of the hydropower station when there is unit maintenance, obviously when the station is not maintained max max yj PP = . When qd q EE  , make qd q EE = .
The safety-constrained water abandonment power is generated when , the safetyconstrained water abandonment is calculated as: If When the hydropower station has maintenance during the flood season, and , only when there is maintenance discarded electricity generated, let j P is the maintenance capacity, and its maintenance discarded electricity calculation formula is: If When the hydropower station has the situation that the unit cannot run at the total output due to the influence of the expected output during the flood season, and there is q qd qx qj , only then will the generation of the foreseen output obstructed discarded hydropower quantity.Let max zs z y P P P =− be the foreseen output obstructed capacity, and its foreseen output discarded hydropower is calculated by the formula: Of course, if the hydropower plant does not envision a blocked output, the theoretical power formula can be simplified to: If Eq. ( 11) is used for theoretical power calculations, it is referred to as the amount of electricity discarded using the simplified theoretical power method.

Calculation of the amount of electricity discarded based on the amount of water discarded
( ) ( ) Where ui Z is the upstream average water level.ds Z is the actual average water level downstream of the hydropower station.f Q is the average power generation flow rate of the hydropower station.If

Electrolyzer and compressor modeling
The electrolyzer is the primary component of the hydrogen sub-system for water electrolysis, and its primary purpose is to utilize electrical energy to initiate redox reactions that break down chemical substances.

1) Mathematical model of an electrolyzer
Alkaline electrolyzer working principle: in the anode OH − ions under the action of the electric field is oxidized (loss of electrons), the generation of 2 O and 2 HO and the release of electrons, electrons into the external circuit to reach the cathode, the reaction equation as equation ( 13): 2) Thermal mathematical model The temperature of the electrolyte has a significant influence on the operation of the cell IU − curve, and the heat balance of the electrolyzer can be described by the following equation: Where gen Q is the heat energy generated by the electrolytic cell during operation.store Q is the thermal energy stored in the system material.loss Q is the thermal energy dissipated in the surrounding environment.cool Q is the thermal energy absorbed by the cooling system.
The cooling of the electrolyzer equipment is accomplished by multiplying the amount of water in the electrolyte in the form of heat exchange and effectively reducing the temperature at the inlet and outlet of the cell through the cooling water flowing through the entire system with the following relational equation.
( ) ( ) ( ) Where el C is the electrolyzer heat capacity.el R is the thermal resistance of the electrolyzer.win T and wout T for the electrolyzer inlet, the outlet water temperature.
hx UA is the coefficient of heat exchange between cooling water and electrolyzer.LMTD is the logarithm of the average temperature difference between the cooling water and the electrolyte.The equation representing the average temperature of the electrolyte compared to the logarithm of the cooling water is: Combining the above equation with the heat balance equation gives a first-order nonlinear equation: Its solution is: Among them.
( ) 3) Mathematical model of compressor Alkaline electrolyzer precipitation of hydrogen pressure is far less than the pressure of solid hydrogen storage device to store hydrogen, so the need for compressors in the electrolyzer equipment and hydrogen storage device equipment to play a buffer between and regulate the role of hydrogen flow, the compressor is based on the principle of multi-variable compression of hydrogen, and its mathematical expression is: Where k is the multistage efficiency parameter of the compressor.com  is the compressor efficiency, which is approximately equal to 92%.com P is the compressor output power.

Mathematical modeling of hydrogen storage devices
According to the heat capacity method, the temperature of the metal hydride bed varies with time, and the heat of reaction required for the storage and release of hydrogen can be expressed as: Where s C is the heat capacity of the metal hydride.s Q is the heat required to produce the metal hydride.k is the heat loss coefficient.The amount of hydrogen stored in a high density solid state hydrogen storage device is expressed as: Where ( ) Mt is the amount of hydrogen stored at moment 0 t .
( ) The pressure of the high-density solid-state hydrogen storage device is characterized by: () Where g R is the gas constant.g V is the volume capacity of the hydrogen storage device. ()s Tt is the operating temperature in the reaction unit.

Mathematical Modeling of Fuel Cells and Inverters
In this paper, a proton exchange membrane fuel cell (PEMFC) is used as a power supply device under the energy power system, and the working principle is shown in Fig. 1.The main components are bipolar plates and gas diffusion electrodes.The system temperature reaches 80-160°C during operation, and the conversion efficiency is 40%-60%, which is 5%-25% higher than that of large and medium-sized coal-fired power generation.

Residual fuel
Remove water and heat

Catalytic layer
Catalytic layer Proton exchange membrane e e e - e -

Figure 1. Schematic diagram of the PEMFC system
The PEMFC voltage equation is: Among them.
.max The hydrogen consumption rate of the PEMFC fuel cell can be expressed as: Inverters are electronic devices that convert alternating current (AC) power into direct current (DC) power.Hydrogen storage systems require an inverter to convert the output power from hydroelectric power generation into direct current (DC) power for the electrolyzer to directly electrolyze water and produce hydrogen.
The input power of the inverter is expressed as: Where, ain P is the input power of the inverter.aout P is the output power of the inverter.acdc  is the converted power of the inverter.Where: Where acload I is the current of the load at the AC end.ac U is the AC terminal voltage.dcin I is the input current of the inverter.dc U DC end voltage.

Hydropower-to-hydrogen storage scheduling and operation
The scheduling and operation strategy of the hydroelectric power plant's abandoned water power generation and hydrogen storage energy system is a critical link that affects the actual operation effect of its system.Figure 2 shows the energy scheduling operation strategy for the coupled energy system.Through the allowable grid-connected power and hydropower station reservoir water data to determine whether to open into the hydrogen production and storage standby mode, the allowable grid-connected power can be set according to the grid scheduling plan power, reservoir water data according to the specific actual power station reservoir volume to determine.The lower limit of the electrolyzer power constraint is the minimum technical output of the electrolyzer battery, the upper limit is the rated power of the electrolyzer battery, and the actual production of the hydropower station is compared with its upper and lower limits to determine whether to enter the next mode.The assessment of high-density hydrogen storage/discharge devices is based on pressure constraints as follows: The hydropower plant's output power is equal to the grid-connected and electrolyzer power, expressed as: Pt are the grid load and the actual output of hydro units under the t time periods, respectively.The actual output of electrolyzer work.
() other Pt is the power consumed by each equipment component of the energy system during t hours.
Calculate the actual and theoretical output data according to the hydrological data of the power station and equations ( 1)-( 3

Costs of Hydroelectric Hydrogen Storage
Average annual total cost of hydrogen energy storage: Where ATC is the average annual total cost of hydrogen storage, , acc amc CC and aoc C are the average annual investment cost, annual maintenance cost, and annual operating cost of hydrogen storage, respectively: (1 ) (1 ) 1 r r jj CRF j Where CRF is the capital recovery factor, r is the planning period of the energy station, and j is the annual interest rate.PV is the planned power of components k and the capacity of hydrogen storage tanks with i levels of pressure, respectively.Namely: CC is the maintenance cost per unit power of component k and per unit volume of hydrogen storage tank, respectively.
Then:  N is the cycle life of component k .

Assessment of the economics of the hydrogen energy storage cycle
The internal rate of return (IRR) of a hydrogen storage project is the discount rate at which the present value of the net cash flows of the project accrues to equal zero in each year of the entire calculation period, calculated as in Equation (44): Where CI represents the cash inflow, CO represents the cash outflow, and () i CI CO − represents the net cash flow in year i .n indicates the investment planning cycle, and the benchmark internal rate of return (IRR) is 8%.The project is feasible if the IRR is higher than the benchmark rate of return for power industry projects.
1) Initial investment construction cost of hydrogen energy storage project: where , ii CQ is the unit price of hydrogen energy storage investment ($/kW) and its corresponding planning capacity, respectively.
2) Annual capital revenue of the project: ( ) where ,, , s i c i pp is the innovative utilization i price of hydrogen sales and cost of hydrogen production, respectively, and i U is the amount of hydrogen produced.
3 Model construction for optimal allocation of hydrogen storage capacity

Modeling of Hydrogen Storage Planning
The two-layer nested modeling idea is used to solve the problem of optimal allocation of hydrogen consumption capacity.Fig. 3 shows the overall modeling idea of the optimization model.In the upper layer planning model, the installed capacities of electrolyzer equipment, hydrogen storage tanks, and hydrogen fuel cells are optimized in order to maximize the long-term revenue of the combined waterelectricity-hydrogen system.In the lower layer model, to maximize the short-term system operating revenue as the objective function, the hydroelectric power, hydrogen production power from water electrolysis, and hydrogen fuel cell power generation in the system are used as decision variables.

Interpretation of variables
In order to describe the modeling in-depth, the main sets, parameters, and variables involved in the model and their corresponding interpretations are listed.
Among the sets: T is the point in time of dispatch, I is the reservoir, u I is the upstream reservoir, d I is the downstream reservoir, and c I is the upstream reservoir that affects the inflow of water from the i th downstream reservoir.

Parameters:
h  is the price of hydrogen, e  is the electric-hydrogen conversion factor of the electrolyzer, f  is the hydrogen-electric conversion factor of the hydrogen fuel cell,  is the hysteresis time of water flow, el C is the investment cost per unit capacity of the electrolyzer, fc C is the investment cost per unit capacity of the hydrogen fuel cell, and es C is the investment cost per unit capacity of the hydrogen storage tank.mel C is the operation and maintenance cost per unit capacity of electrolyzer, mfc C is the operation and maintenance cost per unit capacity of the hydrogen fuel cell, mes C is the operation and maintenance cost per unit capacity of the hydrogen storage tank, ,min n P is the minimum feed-in power of the contact line, and ,max n P is the maximum feed-in power of the contact line. Variables: ,, e sc d E is the daily revenue from electricity sales in scenario sc , ,, is the daily revenue from hydrogen sales in scenario sc , el S is the capacity of the electrolyzer, fc S is the capacity of the is the amount of water discarded at the l th hydropower plant at the t rd moment, ,, Q is the amount of water stored at the l th hydropower plant at the t th moment, ,, Q is the amount of water coming from the l th hydropower plant at the t th moment, and ,, is the flow rate of electricity generated at the l rd hydropower plant at the t nd moment.,, w l t P is the power generated by the l th hydropower plant at the t th moment, , lt h is the head of the l th hydropower plant at the t th moment, w  is the power generation coefficient of the hydropower plant, , et H is the amount of hydrogen produced in the electrolyzer at the t nd moment, , ft H is the amount of hydrogen used for power generation at the t th moment, and , st H is the amount of hydrogen stored at the t th moment.

Upper layer modeling
For the commissioned hydropower plants, the objective function of the upper model is expressed as follows in order to maximize the long-term return on investment profit of the hydropower-electricityhydrogen coupling system: ( ) In Eqs. ( 47) and ( 48), E represents the annual profit of the system, and e E and h E represent the income from electricity and hydrogen sales, respectively.In the O&M cost equations, ,

Lower-level modeling 1) Lower-level model objective function
The operational revenue is generated by selling electricity to the grid and hydrogen energy to users.Thus, the objective function of the lower-level model is expressed like this:  denotes the floating feed-in tariff at the t th moment.

2) Distribution network operation constraints
The distribution network satisfies the following active power balance constraints of generation equals consumption under any generation and load conditions of the system: In Equation ( 54), the sum of the power generated by the hydropower plant and the power generated by the hydrogen fuel cell at moment t is equal to the sum of the local load, the electrolyzer power load, and the feed-in power at moment t .
The distribution network's on-grid transmission capacity is limited to its maximum allowable power, and it should be noted.Thus, the power limitation of the feed-in contact line is expressed as follows: ,min , ,max n n t n In Eq. (55), ,min n P and ,max n P denote the minimum and maximum power constraints of the contact line, respectively.
3) Hydropower generation-related constraints (1) Water balance constraints In the hybrid connection structure, there is a water balance relationship between upstream and downstream hydropower plants, as described by this equation: , ,    in Eq. ( 58), denote the minimum and maximum water storage of the l rd hydropower plant, respectively.
(3) Generation flow constraints The hydropower plant's generation flow is subject to the same upper and lower constraints as follows: , ,min , , , ,max l p l p t l p q q q  (59) In Eq. ( 59), , ,min lp q and , ,max lp q denote the minimum and maximum generation flows of the l rd hydropower plant, respectively.

(4) Hydropower modeling
The hydroelectric model is modeled in the following way: In Equation (60), ,, w l t P represents the generation power of the l nd hydropower plant at the t time, , lt h and ,, l p t q represent the head and generation flow of the l th hydropower plant at the t time.w  denotes the generation coefficient of the hydropower plant.The maximum power generation for the installed cascade power plant is limited by the following constraints: , , , ,max 0 , ,max wl P in Eq. ( 61) denotes the installed capacity of the l nd hydropower plant.

4) Hydrogen energy system-related constraints (1) Physical model of hydrogen production by electrolysis of water
Electrolysis tank realizes the physical process of electricity and hydrogen conversion:  of the electrolyzer, and the capacity el S of the electrolyzer that is decided by the upper model and substituted into the lower model.In addition, the power of the electrolyzer needs to meet the following constraints: The physical model of electrohydrogen conversion in hydrogen fuel cells is constructed as follows: ,, Eq. ( 64), f  denotes the electric-hydrogen conversion rate of the hydrogen fuel cell, and , ft H , denotes the amount of hydrogen energy consumed for power generation at the t moment.In addition, the generation power , ft P of the hydrogen fuel cell and the hydrogen storage capacity In Eqs. ( 65) and (66), variables fc S and es S represent the capacity of the hydrogen fuel cell and hydrogen storage tank, respectively.

5) Hydrogen sales volume constraint
Only when the hydrogen storage tank is complete will the rich hydrogen be sold to the user, so the hydrogen sales volume , sale t

H
at the moment t is directly related to the hydrogen storage volume at the moment 1 t − , the hydrogen production volume at the moment t , and the hydrogen consumption volume of the hydrogen fuel cell at the moment t .The hydrogen sales volume constraint is determined by the following: As shown in Eq. ( 68), the lower level model contains a set of complementarity constraints.The solver cannot solve the resulting lower-level model directly due to the complementary constraints on hydrogen sales.Therefore, by employing a large M approach, constraint (69) can be transformed as follows: In Eqs. ( 69) through (72), M is an immense value and  is an auxiliary binary variable.

PSO algorithm-based upper layer solving
The particle swarm algorithm begins with particle initialization, in which each particle is a solution.
In a D -dimensional search space, there are N particles in the swarm, the position of the i rd particle in the t th iteration is denoted as , , and the velocity of the i th particle in the t th iteration is denoted as , . The particle updates itself in each iteration by keeping track of two poles, one is the optimal solution found by the particle itself, which is called the individual pole .After finding these two poles, in the 1 t + th iteration of the computation, the particle i can update its velocity and position according to the following rules: Where: t w is the inertia coefficient, w the minimum value is taken as 0.7, w the maximum value is taken as 1.2, and the values of the inertia weights are gradually reduced over time so as to speed up the convergence of the algorithm.1 r and 2 r are random numbers in the range of [0,1]. 1 c and 2 c are learning factors, which are taken as 12 1 cc == .The velocity update formula is made up of three parts: the initial part is the inertia part, which shows the particles' original inertia.The second part is the cognitive part, reflecting the tendency of the particle to approach its historical best position.The social aspect of the third part is a reflection of the particles' tendency to achieve the best position in the history of the group or field.

Model synthesis solution process
By combining the particle swarm algorithm and CPLEX, the computational efficiency and accuracy of the algorithm are taken into account simultaneously.The algorithm was finally implemented on the MATLAB platform.The computational process of the algorithm is shown in Figure 4.Here are the specific steps: Step 1: Initialize particles.The position of each particle represents the capacity of the decision variables electrolyzer, hydrogen fuel cell, and hydrogen storage tank in the upper model, and the speed is the search step of the PSO algorithm.
Step 2: Call the CPLEX solver to solve the lower layer model based on Eqs.(52) to (72).Based on the initialized particles selected in the PSO algorithm as the input variable values of the lower layer model, the optimal lower layer objective function value , cs d E is obtained based on Eq. (52).
Step 3: Optimize the upper layer model.Substitute the optimal objective function value obtained in Step 2 into Eq.( 47) in the upper layer model, update the particle positions and velocities according to the PSO algorithm, and search for the optimal solution of the upper layer model.
Step 4: Termination conditions.When the maximum value of iterations performed is reached, the algorithm comes to an end.Otherwise, the particle velocity and position are updated, and the process returns to step 2.

Analysis of Hydrogen Consumption from Hydropower
There are numerous current hydrogen production technologies, including hydrogen from fuels (hydrogen from coal gasification, hydrogen from coke oven gas, hydrogen from natural gas reforming, and hydrogen from methanol), hydrogen from ammonia cracking, and hydrogen from electrolysis of water.Physical storage (high-pressure gas storage, liquid hydrogen storage, and physical adsorption storage) and chemical storage (metal hydride storage, liquid organic storage, and ammonia compound storage) are the two types of hydrogen storage that are available.Transportation pathways include gas-hydrogen transportation, oceanic liquid hydrogen transportation, and others.The storage and transportation of hydrogen is not possible due to the lack of efficient and inexpensive technology.Figure 5 depicts a comparison of the annualized lifetime costs of various energy storage systems, and the error bars represent the range of possible values.The annualized lifetime cost of hydrogen-based energy storage is more than €330/kW-a (including €150/kW-a for hydrogen storage and about €100/kW-a for electricity), which is higher than the cost of all kinds of storage batteries except Liion, and more than twice the cost of aboveground air storage.The cost of aboveground air storage is more than twice what it is.Finding low-cost ways to produce hydrogen and compress the storage and transportation process is crucial for expanding hydrogen storage applications.regulating capacity of its own, and the frequent changes in the outflow from the upstream Pillow Head Dam power station will lead to the risk of water level overrun in the Shaping power station.As the Shaping power station is subject to a fixed load instruction, in order to prevent the water level from overrunning the limit, it can only open the gates to increase the flood discharge flow, which leads to the Shaping power station units not being able to be entirely generated, and generates a large amount of water and electricity abandonment.The calculation method for hydropower station power abandonment allows for the annual and monthly power abandonment of Shaping hydropower station to be obtained.Shaping hydropower stations throughout the year each month of power generation and power abandonment, as shown in Table 1.During the flood season, there is water and power abandonment every day in a typical month.The total amount of power abandonment in July is 0.52 billion kWh, and the total amount of power abandonment of Shaping Hydropower Station in a year is 181 million kWh.The main reason for the water and power abandonment of Shaping Grade II Hydropower Station is that the capacity of the reservoir is relatively small.The water level and the capacity of the reservoir are insufficient for the regulation of water levels and capacity.There is much incoming water during the flood season, and it is necessary to dissipate the excess flow in a timely manner in order to prevent the water level from overstepping the limit; however, the station is subjected to the fixed-load instruction of the power grid.However, the power stations are subject to the fixed load instruction of the power grid.The units of the hydropower stations cannot be entirely generated.The excess flow is dissipated through flood discharge, resulting in the phenomenon of water and power abandonment of hydropower stations.

Optimization results of the operation of the abandoned water storage system
According to the monitoring data of upstream and downstream water level and flood discharge flow rate of Shaping II hydropower station (the collection time step is 6min), taking a typical day during the flood season as an example, and in accordance with the operation mode of remote output of partially discarded power of the hydropower station, the intraday operation results of the waterdisplaced storage system on this typical day are shown in Table 2. Gradually, the daily power generation increment and the utilization rate of abandoned power increase as the capacity of the energy storage battery increases.When 36MWh of storage battery is configured, the system power generation increment for this typical day is 1555.81MWh,and the abandoned power utilization rate is 69.36%.According to the power abandonment process of the hydropower station during the annual flood season, the annual power generation increment and the annual utilization rate of the storage battery with different capacity configurations can be obtained from the intra-day operation optimization model of the abandoned water energy storage system.The incremental power generation and annual utilization rate of storage batteries in hydropower hydrogen production systems with different storage capacity configurations are accounted for.Fig. 7 shows the annual power generation increment and the annual utilization rate of the storage battery for the water abandonment storage system.Figure A shows the annual increase in power generation and the abandonment rate of power, while Figure b shows the annual utilization rate of batteries.With the rise of energy storage capacity, the annual power generation increment of the system gradually increases, the annual battery storage capacity gradually increases, and the annual battery utilization rate shows a trend of increasing and then decreasing.When the capacity of the energy storage battery is 36MWh, the annual power generation increment of the system is the largest, which is 126.2 million kWh, the annual storage capacity of the battery is the largest, which is 0.12 billion kWh, and the annual utilization rate of abandoned power is the largest, which is 71.44%.When the storage battery's capacity is 6MWh, the annual utilization rate is the highest, and the number of complete charging and discharging cycles can be up to 412 times.

Results of energy storage capacity allocation based on economic optimization
According to the current feed-in tariff of the hydropower station and considering the cost changes of the energy storage battery, the levelized cost of electricity and the entire life cycle NPV of the abandoned water energy storage system configured with different energy storage capacities are shown in Figure 8.With the increase of energy storage capacity, the cost of electricity of the abandoned water storage system of Shaping II hydropower station increases gradually, and the entire life cycle NPV of the system shows a trend of increasing and then decreasing.According to the energy storage battery unit price of 1650 yuan/kWh, when the energy storage capacity is 1MWh, the cost of kWh is the smallest, which is 0.113 yuan/kWh, and the entire life cycle NPV is the largest, which is 7.39×10 6 yuan.When the energy storage battery unit costs 1050 yuan/kWh, the entire life cycle NPV is the highest, with a maximum of 0.165 billion yuan, based on the energy storage capacity of 6MWh.In the optimal scheduling model considering the hydrogen production and consumption mode of energy storage and hydropower, the predicted values of hydropower output and load demand are regarded as fixed values, and the optimal benchmark values are calculated based on this so as to compare them with the subsequent uncertainty models.In order to better simulate the optimization situation, this chapter adopts the time-of-use electricity price and fixed hydrogen price strategies based on the current situation of the new power system.Figure 9 shows the distribution curve of electricity and hydrogen prices for time-of-use.The hydrogen price remains at 3.4 yuan/m 3 , while the electricity price is divided into three stages: 0.35 yuan/kWh at 0~6h, 0.88 yuan/kWh at 7~11h and 19~23h, and 0.53 yuan/kWh at 12~18h.Arithmetic analysis is performed using an integrated energy system in an industrial park as an example.Based on the rainy season characteristics of the area, typical days in summer are selected for analysis and comparison.The day-ahead scheduling will consist of 8 periods of 3 hours each.
Converting the solution to a mixed-integer linear programming model and combining it with the YALMIP toolbox and CPLEX solver for simulation and analysis in MATLAB is necessary.The energy storage parameters are shown in Table 3.The upper capacity limit for electricity, heat, cold, and hydrogen storage is 95%, while the lower capacity limit is 25%.In order to verify the effectiveness of the hydrogen storage device on the deterministic model, two deterministic scenarios are set up for comparative analysis: Scenario 1: Optimization model without considering the hydrogen storage device.
Scenario 2: Optimization model considering hydrogen storage device.

Analysis of operating conditions
First, the results of the electric power scheduling for the integrated hydropower hydrogen production and consumption model are investigated.Fig. 10 shows the electric power dispatching results of the deterministic hydropower-to-hydrogen model.The scheduling results are based solely on the hydrogen storage device in Fig. (a).It can be seen that during the peak hours of hydropower output, the hydropower output in the system is prioritized to satisfy the system's electric power demand.The system purchases electric energy to make up the shortfall during the hours when the hydroelectric power output is less, to achieve the electric load balance.In 07:00-11:00 and 19:00-23:00 hours due to the electricity price is at the peak, the gas turbine output increases, and in 11h, has been close to 2500kw to make up for the reduction of purchased power due to the rise of electricity price, so as to reduce the system operating cost and improve the daily profit of the system.Based on the scheduling results in Fig.(b) considering the hydrogen storage device, it can be seen that in the abundant water period, due to the high forecast of hydropower generation, a large amount of water abandonment will be generated, so the electrolyzer device is added, whose power is within the range of 500kW~1200kW, to convert the surplus hydropower into hydrogen and store it in the hydrogen storage tank, so as to reduce the cost of abandonment penalties., it can be seen that the gas boiler and the gas turbine supply the heat load.When the electricity price is in the trough period, the natural gas pricing is higher than the electricity price, so the gas turbine does not generate heat and the heat load is satisfied by the electric boiler.When the electricity price is in the peak period, the natural gas pricing is lower than the electricity price, and the system power purchase decreases, the gas unit will utilize the waste heat provided by the gas boiler to generate electricity, which can reach about 400kW~1000kW, and the heat load is satisfied by the gas boiler.As can be seen from Figure (b), the cold load is supplied by the electric chiller, providing a cold load of around 3000kW~4000kW.Since the effect of hydrogen storage devices on heat and cold power dispatch is almost negligible, it is not discussed in separate scenarios.

Economic Optimization Scheduling Analysis
The hydrogen production and consumption modes of hydropower under the two scenarios have been solved, and Table 4 shows the results of economic optimization scheduling.Hydropower plants in Scenario 1 do not require water curtailment to produce hydrogen.Assuming that all the consumable hydropower is sold, the daily profit that can be obtained is approximately 318,130 yuan.When the electricity price is lower than the hydrogen price, the surplus hydropower will give priority to the electrolysis of hydrogen production and obtain high returns through the production and sale of hydrogen.The single-day profit obtained by this law includes three parts: hydrogen sales, electricity sales, and energy sales, which are about 463,110 yuan, and the daily profit of the increase is about 144,980 yuan.

Conclusion
Considering the favorable conditions of hydropower resource endowment and the characteristics of hydrogen energy, this study establishes a two-layer planning model for the optimal allocation of hydrogen storage capacity, and investigates the economic benefits of hydropower hydrogen consumption mode by using the PSO algorithm, and draws the following conclusions through the analysis of examples: 1) The annualized lifetime cost of hydrogen-based energy storage is more than 330 €/kW-a (including 150 €/kW-a for hydrogen storage and about 100 €/kW-a for electricity), and it is necessary to explore low-cost ways to produce hydrogen and store it effectively.
2) When the capacity of the energy storage battery is 36 MWh, the system has the most significant annual power generation increment of 126.2 million kWh, the largest yearly storage capacity of the of 0.12 billion kWh, and the most critical annual utilization rate of abandoned power of 71.44%.According to the energy storage battery unit price of 1050 yuan/kWh, when the storage capacity is 6MWh, the whole life cycle NPV is the largest, which is 0.165 billion yuan, and the optimal allocation of storage capacity is achieved.
3) In the deterministic model, considering that the hydrogen storage device can promote the hydropower consumption capacity and improve the system operation economy, the uncertainty of hydropower output and load demand is quantified, which provides system managers with a scientific, reasonable, and practical method to deal with the uncertainty problem.

2 fcH P for 2 H 2 fcO P for 2 O 2 O
t -moment fuel cell voltage, thermodynamic electric potential, activation overvoltage, ohmic overvoltage, and concentration difference overvoltage, respectively.fc N is the number of fuel cell monomers in series.G  is the Gibbs energy variable.S  is the entropy variable. ()fc Tt is the t moment fuel cell internal temperature.fcref T is the fuel cell reference temperature.the partial pressure at the reaction interface.the partial pressure at the reaction interface.1 b , 2 b , 3 b , 4 b are empirical constants.V is the oxygen concentration at the cathode surface.() fc It is the fuel cell inductor current.fc d is the fuel cell proton exchange membrane film thickness.fc  is the fuel cell proton exchange membrane resistivity.fc S is the proton exchange membrane area.fc Z is the proton exchange membrane impedance..maxfc Iis the fuel cell maximum current density.K is the equation constant.

C
are the unit investment costs of components k and hydrogen storage tanks, respectively, and , , k HS i

Fuel( 1 )Figure 3 .
Figure 3. Model framework and m C are expressed as follows:

C
denote the O&M cost per unit capacity of the electrolyzer, hydrogen fuel cell, and hydrogen storage tank.The upper model's decision variables have value ranges that are defined as follows: capacity limit of the electrolyzer, hydrogen fuel cell, and hydrogen storage tank.
57) Equation (56) represents the water balance relationship between upstream and downstream hydropower plants, and equation (57) represents the water balance relationship between downstream and upstream hydropower plants.u I is the set of upstream hydropower plants, d I is the set of downstream hydropower plants, and c I denotes the set of upstream hydropower plants that affect the downstream hydropower plants l .

( 2 )
Physical model of hydrogen fuel cell , stH of the hydrogen storage tank need to satisfy the following constraints:

.
The other pole is the optimal solution found so far by the whole population, which is called the global pole 2 d gbest x

Figure 4 .
Figure 4. Calculation process of the PSO combined CPLEX algorithm

Figure 5 . 4 . 2 Analysis of optimized allocation of energy storage capacity 4 . 2 . 1 1 )
Figure 5.The cost comparison of different energy storage system years

Figure 6 .
Figure 6.Different magnitude statistics 2) Characteristics of hydroelectric power station water and energy abandonment

Figure 7 .
Figure 7.The annual rate of electricity generation and storage battery of the abandoned

Figure 8 . 4 . 3 . 1
Figure 8. Economic indicators of the energy storage system of Sand Plateau hydropower station

Figure 9 .
Figure 9. Hourly price and hydrogen price data distribution curve

Figure 10 .
Figure 10.Deterministic hydropower system power dispatching result

Figure 11 .
Figure 11.Deterministic system heat and cold power scheduling results 2) Water storage constraintIn operation, hydropower plants have upper and lower storage capacity requirements: )

Table 1 .
The whole month of the shaping hydropower station

Table 2 .
Operating results within days of abandoned water storage system

Table 3 .
Storage parameter

Table 4 .
Economic optimization scheduling results