Next Article in Journal
Review of Organic Waste-to-Energy (OWtE) Technologies as a Part of a Sustainable Circular Economy
Previous Article in Journal
Analysis of the Year-Round Operation of Enhanced Natural Ventilation Systems under Transient Weather Conditions in Europe
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Sparrow Search Algorithm Based on New Energy Power Hydrogen Synthesis Ammonia Economic Optimization of System Scheduling

1
State Nuclear Electric Power Planning Design & Research Institute Co., Ltd., Beijing 100095, China
2
Jilin Electric Power Co., Ltd., Changchun 130022, China
3
School of Electric and Control Engineering, North China University of Technology, Beijing 100144, China
*
Author to whom correspondence should be addressed.
Energies 2024, 17(15), 3796; https://doi.org/10.3390/en17153796
Submission received: 21 June 2024 / Revised: 18 July 2024 / Accepted: 27 July 2024 / Published: 1 August 2024

Abstract

:
P2A (Power to ammonia) is one of the important ways of large-scale consumption of renewable energy, and one of the important technological routes for the chemical industry to realize low-carbon and clean development. The new off-grid energy power to hydrogen ammonia system lacks the support of large power grids due to the complex mathematical model of the system, more variables, and cumbersome constraints, which leads to model solving difficulties, and the production simulation results obtained suffer from the problems of low economic efficiency and high new energy power abandonment rate. To address the shortcomings of the algorithm, which converges slowly and easily falls into the local optimum when solving the model, this paper applies the Sparrow Search Algorithm (SSA) to the problem of economic optimization of new energy hydrogen synthesis and ammonia system scheduling. Firstly, based on the characteristics of wind and light, the operating characteristics of an electrolyzer, and the characteristics of an electrochemical energy storage device, and taking the economic optimization of the electric hydrogen synthesis ammonia system as the objective function, the economic optimization scheduling model of an off-grid new energy electric hydrogen synthesis ammonia system is established for 24 h production simulation. Secondly, the model is solved based on the sparrow search algorithm, and the speed of solving and the economic benefits of the system are analyzed in comparison with the conventional algorithm. Finally, the proposed off-grid wind-powered hydrogen synthesis ammonia system based on the sparrow search algorithm is verified to achieve the optimal operation of the 24 h production simulation through an actual example in the Daan area of Baicheng City, Jilin Province, which shows that the optimized system has better economic efficiency and the new energy is completely consumed, thus verifying the reasonableness and validity of the algorithm proposed in this article.

1. Introduction

At the ninth meeting of the Central Financial and Economic Commission, General Secretary Xi Jinping put forward a major strategic plan to build a new power system led by new energy, a change with far-reaching strategic, global, and revolutionary significance. In view of the rapid development trend of new energy, it is particularly crucial to revolutionize the existing power system in terms of physical form and institutional mechanisms. The core challenge is how to achieve a larger and longer-term power balance more effectively.
In recent years, the installed capacity of photovoltaic (PV) power generation has been growing continuously and the maturity of the technology has been increasing with the significant advancement of clean and efficient energy generation technologies. However, the development of PV power generation also faces two major challenges. First, due to the irregularity of light resources, PV power generation exhibits the characteristics of randomness, volatility, and phasing, which decrease the quality of electric energy affected to a certain extent, and at the same time increase the difficulty of grid scheduling. Secondly, the effective storage of electric energy has become a bottleneck restricting the further development of photovoltaic power generation. Traditional electrochemical, electromagnetic, and physical energy storage technologies are insufficient to meet the needs of large-scale energy storage and future green energy development.
Hydrogen, as a kind of clean energy, has become an ideal choice for PV-scale hydrogen utilization and storage due to its high energy density, large capacity, long life, and easy storage and transmission. The emergence of hydrogen energy provides a new solution to the problem of large-scale and long-cycle electric power balance. As a flexible resource of the power system and a new method of long-cycle energy storage and transmission, hydrogen energy can reduce the pressure of the new power system and aid efficient consumption and stable transmission. Electric–hydrogen coupling technology is expected to solve the difficulty of power system flexibility adjustment after the large-scale development of new energy sources and become an indispensable part of the new power system [1]. Through the electrolysis of water to produce hydrogen technology, it can effectively improve the peak adjustment ability of photovoltaic generating units and convert the photovoltaic power that cannot be directly utilized into hydrogen energy storage. This stored hydrogen can be used in a variety of scenarios, such as integrating into the existing gas supply network as an energy source for gas turbine power generation and realizing the complementary conversion of electricity and gas. In the chemical industry, hydrogen can be used for the refining of crude oil, the hydrogenation of fats for the production of products such as margarine and edible oils, or the synthesis of chemicals such as ammonia and methanol. In the aerospace industry, liquid hydrogen can be used as a fuel. In addition, it can be used in hydrogen refueling stations to provide power to hydrogen-powered vehicles.
The performance of the electrolyzer, as the core equipment of electrolytic water-to-hydrogen technology, directly determines the efficiency and effectiveness of hydrogen production from renewable energy sources. When smoothing out fluctuations in renewable energy, the electrolyzer needs to be highly adaptable to unstable power output. Currently, an alkaline electrolyzer is the main equipment used in large-scale engineering applications, as its technology is mature and low-cost, but there are problems such as poor dynamic adjustability, low efficiency, and short service life under fluctuating working conditions. In order to overcome these shortcomings, improving the applicability of alkaline electrolytic water to hydrogen systems under fluctuating working conditions has become the key to the development of renewable energy hydrogen production technology [2].
As a basic chemical product, ammonia is both a raw material and a fuel, which gives it a wide range of application prospects. In the industrial field, ammonia is used as a raw material in many aspects such as fertilizer, refrigerant, explosives, industrial flue gas denitrification, and sewage treatment. Meanwhile, as a zero-carbon fuel, ammonia shows great potential in marine and stationary power generation. Global hydrogen consumption data show that about 90 million tons of hydrogen will be consumed in 2020, of which 33.75 million tons will be used for ammonia. Total carbon emissions from the ammonia industry in 2020 will be more than 200 million tons, and in order to meet this challenge, the replacement of gray hydrogen with green hydrogen will become one of the most important technological paths for carbon emission reduction in the chemical industry.
Hydrogen ammonia synthesis technology adopts the Haber–Bosch Process and the ammonia synthesis station mainly uses hydrogen and nitrogen to synthesize and produce liquid ammonia. The main power-consuming equipment in the process flow of the ammonia synthesis station are compressors, pumps, and other power equipment. Hydrogen comes from the electrolytic water hydrogen production station, and nitrogen comes from the air separation station. Because the ammonia process involves a more complex chemical process, this paper focuses only on the study of new energy hydrogen ammonia system power scheduling problems. To ensure that the ammonia production can be stable, in the ammonia process, based only on empirical values, roughly 2000 standard cubic meters of hydrogen can produce 1 ton of liquid ammonia. In addition, since ammonia separation, circulation, compression, and other processes in the ammonia synthesis section consume less power compared to the entire hydrogen and ammonia system, their power consumption is ignored in this paper.
The cost of ammonia production in the Chinese market in 2022 is highly affected by fluctuations in feedstock prices. Against the backdrop of an anthracite coal price of CNY 1200/ton, the comprehensive production cost of ammonia from coal reaches CNY 3284/ton, while the comprehensive production cost of ammonia from natural gas is CNY 3861/ton at a natural gas price of CNY 4.2/Nm3. According to the International Renewable Energy Agency (IRENA), the production cost of green ammonia in 2022 is between USD 720 and USD 1400 per ton. However, the production cost of green ammonia is expected to gradually decrease as technology advances and production scales expand. By 2030, the production cost of green ammonia is expected to be the same as the current production cost of conventional gray ammonia; and by 2050, the cost of green ammonia will be further reduced to USD 310 and USD 610 per ton. The key to further cost reductions for Renewable Power to Ammonia (RePtA) systems lies in technological advances and scale-up. This will help improve production efficiency and reduce energy consumption and material waste in the production process, thus reducing overall costs. At the same time, with the reduction in green ammonia production costs, its market competitiveness will be further enhanced.
In order to improve the economic efficiency of the off-grid wind hydrogen synthesis ammonia system and achieve stable and coordinated operation, while simultaneously achieving a higher level of consumption of new energy, researchers have carried out a large number of studies on this in the literature. The authors of [3,4] studied the concept of process flexibility and the economy of P2A systems. The authors of [5] studied the economy of green ammonia systems applied to offshore wind power, and [6] carried out the parameter design of green ammonia systems from wind power.
In the process of solving problems, researchers have also applied many optimization algorithms to new energy power hydrogen ammonia systems. The authors of [6] proposed a particle swarm algorithm based on the optimization of wind power storage microgrid scheduling and operation analysis. In [7], a cogeneration microgrid source-load-storage cooperative optimization technology considering wind power consumption was proposed based on genetic algorithms, with the total cost of the operation of the microgrid and the level of wind power consumption as optimization goals. The authors of [8] established a microgrid operation optimization model with the objective of minimizing power generation cost and environmental cost, and the proposed optimization model is solved by using the multi-intelligent body chaotic particle swarm optimization algorithm.
In the current research on new energy hydrogen synthesis systems, off-grid operation needs to be further studied in terms of new energy consumption demand, equipment configuration, and economy. At the same time, the algorithm needs to be further optimized for the shortcomings of slow convergence speed and ease of falling into the local optimum when solving the model.
In order to solve the above problems, this paper constructs the operation model of an off-grid wind hydrogen synthesis ammonia system, takes economic optimization as the objective function, solves the system based on the sparrow search algorithm, obtains the optimal scheduling and operation simulation scheme, and verifies the reasonableness and validity of the mathematical model and optimization algorithm through real-life examples.

2. Modeling of Off-Grid Scenic Hydrogen-Ammonia Systems

In this section, we will introduce the components of off-grid wind-scenic hydrogen and ammonia systems, including wind power stations, photovoltaic power stations, electrolytic water hydrogen systems, energy storage devices, gas storage equipment, hydrogen ammonia synthesis devices, etc. We will also establish mathematical models of the related equipment according to their operational characteristics, and then establish the optimal economic dispatch model of off-grid wind-scenic hydrogen and ammonia systems.

2.1. Overview of the Wind-Solar Hydrogen-Ammonia System

The core objective of wind-solar hydrogen and ammonia system configuration is to make full use of and efficiently consume local wind-solar resources in regions with relatively weak grid coverage or high construction costs, maximizing the potential of renewable energy and minimizing the rate of power abandonment. By optimizing the allocation of resources, the transfer of the target product of hydrogen and ammonia synthesis is achieved, replacing the traditional high-input and high-cost grid laying with this new approach.
Renewable energy generation is realized through the construction of wind power and photovoltaic units, and electric hydrogen production equipment with highly flexible adjustment capability is deployed locally to convert excess electric energy into hydrogen for storage and utilization. At the same time, in order to balance the fluctuation of power supply and demand, corresponding energy storage equipment and hydrogen storage equipment are equipped to regulate the power difference between the source and the load side, thus assisting in realizing efficient and stable consumption of wind and solar power and providing strong support for the energy security and sustainable development of the region.

2.2. Photovoltaic Power Plant Model

Photovoltaic power generation is based on the photovoltaic effect, whereby solar energy is converted directly into electrical energy by means of solar cells. When sunlight strikes the surface of the cell, the PV cell generates a voltage that converts solar energy to electricity. Photovoltaic power generation systems usually consist of a combination of multiple photovoltaic cells that are connected in series or parallel to form a photovoltaic array. The efficiency of photovoltaic power generation depends mainly on the intensity of solar radiation received by the PV panels, and this intensity is affected by a combination of factors such as the path of sunlight propagation, the position of the sun, and the effect of the atmosphere on the radiation.
Considering the conversion characteristics of PV panel cells under different light intensities, the relationship between the active output of PV panel cells and the intensity of solar radiation can be approximated as [9]:
P p v = P p v , r I t 2 I s t d R c [ 1 T ( T C T s t c ) ]       0 I t < R c P p v , r I t I s t d [ 1 T ( T C T s t c ) ]        R c I t
Format: P p v —Actual output of photovoltaics, KW; P p v , r —PV power rating under standard conditions, KW; T C —Temperature of photovoltaic panel cells, °C; R c —Setting the light intensity for a specific intensity, W/m2; I s t d —Light intensity per unit area under standard conditions, W/m2; T s t c —Battery temperature at standard conditions, °C; I t —Intensity of solar radiation received by the headroom on the PV panel at time t, W/m2; T —The temperature coefficient of the photovoltaic panels, taking the value of 0.03~0.05 °C.

2.3. Wind Power Plant Model

For the planned wind power station, the power generation of the wind power station is calculated based on wind speed and other data. The off-grid wind-powered hydrogen-ammonia system realizes the conversion of “new energy-electricity-hydrogen”, which involves the operation of key equipment, and a physical model will be constructed. Among them, the wind turbine converts the captured wind energy into electricity, which is mainly determined by the output curve of the wind turbine, and the power generation of the wind power station can be calculated according to the wind speed and other data [10,11]:
P w p = 0 , v < v c i , v > v c o a v 3 b P w p , r , v c i v < v r P w p , r , v r v < v c o
a = P w p , r v r 3 v c i 3 , b = v c i 3 v r 3 v c i 3
Format: v —Real-time wind speed, m/s; v c i —Cut-in wind speed, m/s; v c o —Cut-out speed, m/s; v r —Rated wind speed, m/s; P w p —Actual wind turbine output, MW; P w p , r —Rated power of the fan under standard conditions, MW.

2.4. Alkaline Electrolytic Water Hydrogen Production Model

Alkaline electrolyzed water-to-hydrogen models are used primarily for the conversion of electricity to hydrogen and oxygen. This type of equipment uses a porous diaphragm to separate the hydrogen side electrodes from the oxygen side electrodes in the electrolyzer. Under normal operating conditions, the alkaline flow rate is fast, which limits the diffusion of gases through the diaphragm. However, under low load conditions, the relative increase in the amount of gas passing through the diaphragm leads to an increase in the levels of oxygen impurities in the hydrogen and hydrogen impurities in the oxygen, which may affect the safety of the equipment and the purity of the output gas.
Therefore, there is a lower limit of minimum power and an upper limit of maximum power for normal operation of the alkaline electric hydrogen generator. The power rate of the alkaline electric hydrogen generator is fast under normal operating conditions, and the power conversion rate is more than 20% of the rated load per second [12,13].
The working alkaline electrolyzer can be considered as a nonlinear dc load and the output voltage is modeled as [14]:
U e l = U r e v + r 1 + r 2 T e l S e l I e l + K e l ln ( K T 1 + K T 2 T e l + K T 3 T e l 2 S e l I e l + 1 )
U r e v = U r 0 K r e v ( T e l 298.15 )
Format: U r e v —Reversible voltage for electrolytic baths, kV; S e l —Electrolyzer electrode surface area, m2; I e l —Electrolyzer current, kA; T e l —Electrolyzer operating temperature, °C; K e l —Electrode overvoltage coefficient; K T —Electrolyzer overpressure experience factor; U r 0 —Reversible voltage at standard conditions, kV; K r e v —Temperature empirical coefficient.
The relationship between single electrolyzer power and hydrogen production is as follows:
P e l , n = U e l I e l
Q ( t ) = 0.1977 P e l , n ( t ) + 96.9987
Format: P e l , n —Electrolyzer output power, Q ( t ) —Hydrogen production at time t.
When the electrolyzer is started up, the power consumed is mainly used for heating to raise the temperature of the electrolyzer, since the temperature is not sufficient to produce hydrogen. At the same time, taking into account the characteristics of the materials inside the electrolyzer, the operating power must be maintained above a specific limit so that the hydrogen and oxygen cascades do not exceed the safety threshold, which is usually set between 20 and 25% of the rated power of the electrolyzer. In addition, the electrolyzer is allowed to exceed its rated power for short periods of time during operation, up to 110% to 130% of the rated power, a feature that helps to reduce the configured capacity requirements of the electrolyzer. The operating power constraints of the electrolyzer are expressed as follows [15]:
0.2 P N et , n u e t , n ( t ) P e t , n ( t ) 1.1 P N e t , n u e t , n ( t )
u e t , n = 0 ,   off 1 ,   on
Format: P N et , n —Rated operating power of the electrolyzer, P e t , n ( t ) —Operating power of the electrolyzer, u e t , n ( t ) —Binary Variables for Electrolyzer Start-Stop.
The electrolyzer power creep constraint is expressed as follows:
P e t ( t ) P e t ( t 1 ) ( 1 w e t ( t ) ) r c + w e t ( t ) r w P e t N Δ t
P e t ( t 1 ) P e t ( t ) w e t ( t ) r w P e t N Δ t
w e t ( t ) = 0 , cold 1 , w a r m
Format: P e t ( t ) —Operating power of the electrolyzer; w e t ( t ) —Binary variable for electrolyzer state; r c —Climbing rate when the electrolyzer is cold; r w —Rate of climb when the electrolyzer is warm.

2.5. Gas Storage Equipment Modeling

The wind-solar hydrogen-ammonia system consists of hydrogen production by electrolysis of water, hydrogen storage, and ammonia synthesis at a constant rate. Hydrogen produced by electrolysis of water is stored in tanks, and hydrogen is withdrawn from the tanks at a constant rate for ammonia synthesis. The rate of ammonia production is constant for each time of the year (hour) and the rate of hydrogen required is constant.
Using one year’s operating data, we analyzed the maximum amount of hydrogen actually produced in the electrolyzer during a certain period of time. After subtracting the amount of hydrogen consumed by ammonia synthesis during this period, the maximum amount of hydrogen to be stored can be determined. Based on this data, the number of storage tanks can be further determined to ensure smooth and efficient operation of the system.
max F h 2 ( t ) F H 2 t = η h s , max
N h s = η h s , max / η h s , n
Format: max F h 2 ( t ) —Maximum hydrogen production at a given time of year, Nm3; F H 2 —Actual hydrogen production, Nm3; η h s , max —Maximum hydrogen storage capacity, Nm3; η h s , n —Rated capacity of individual tanks, Nm3; N h s —Number of gas storage tanks, number.

2.6. Hydrogen to Ammonia Plant Model

The hydrogen ammonia plant utilizes a chemical reaction between hydrogen and nitrogen to produce liquid ammonia. The core technology is the Haber–Bosch synthesis, in which hydrogen is produced in a hydrogen plant by electrolysis of water and nitrogen is produced in an air separation station. Due to the safety and economic requirements of chemical production, the ammonia plant can only be regulated within a certain range of quasi-steady state conditions to ensure the stability and safety of the production process.
In order to avoid temperature and pressure overruns in the ammonia reactor and in various process steps such as ammonia splitting, circulation, and heat transfer, the load creep rate needs to be limited [16]:
F t N H 3 = F t 1 N H 3 + h r t N H 3
r _ N H 3 r t N H 3 r ¯ N H 3
Format: h —scheduling step; F t N H 3 —Ammonia yield at time t; r t N H 3 —Ammonia load creep rate; r ¯ N H 3 , r _ N H 3 —Upper and lower limits of load climbing rate, take +15% and −25% of rated output per hour.
At the same time, the ammonia production rate should be maintained within the given interval due to the constraints of heat balance and catalyst activity:
F _ N H 3 F t N H 3 F ¯ N H 3
Format: F ¯ N H 3 , F _ N H 3 —The upper and lower limits of ammonia production were taken as 100 percent and 20 percent of the nominal production rate.

2.7. Modeling of Energy Storage Equipment

In this article, an electrochemical energy storage system is considered for regulating the difference between the windlight fluctuation and the electrical load profile of the electric hydrogen production equipment, which improves the efficiency of the system for hydrogen production through the transfer of electrical energy in the temporal sequence, as well as enhances the flexibility of the system regulation, which can be expressed as [17]:
0 P c h a e s ( t ) B c h a e s ( t ) P max e s 0 P d i s e s ( t ) B d i s e s ( t ) P max e s ρ min S O C max S O C ( t ) ρ max S O C max S O C ( t + 1 ) = S O C ( t ) + η c h a P c h a ( t ) Δ t P d i s ( t ) η d i s Δ t
Format: P c h a e s ( t ) , P d i s e s ( t ) —Charging and discharging power of energy storage devices, MW; P max e s —rating, MW; B c h a e s ( t ) , B d i s e s ( t ) —Binary variables for charging and discharging flags of energy storage devices; S O C ( t ) —Capacity of energy storage devices; η c h a , η d i s —Charge and discharge factors for energy storage devices; S O C max —Maximum capacity of the energy storage device; ρ min , ρ max —Upper and lower charging and discharging limits for energy storage devices. As shown in Figure 1, the energy storage device operation strategy is shown.
(1) Input new energy power P n e w , Capacity of energy storage devices S O C ( t ) .
(2) When the new energy power P n e w is greater than load power P e l , energy storage is for determining whether charging is possible; When the new energy power P n e w is less than load power P e l , the energy storage carries out the judgment of whether it can be discharged or not.
(3) Determining whether energy storage can be charged or discharged requires considering whether the current capacity of the storage device is within the set range. When judging charging, if the current energy storage capacity S O C ( t ) is less than 85% of the maximum capacity, charging is permitted; otherwise, power is discarded. When judging the discharge, if the current storage capacity is more than 15% of the maximum capacity, the discharge is allowed; otherwise, it is terminated.
(4) The capacity of the energy storage device for the next time period can be further calculated based on the current charging and discharging conditions S O C ( t + 1 ) . The energy storage capacity for the next time period is re-entered and the program runs in a loop.

3. Operational Optimization Model Based on Sparrow Search Algorithm

In this section, considering the resource utilization and economy of the system, the objective function and constraints are constructed to optimize the operation simulation of the off-grid scenic hydrogen-ammonia system based on the sparrow search algorithm, and the optimal operation simulation scheme is derived.

3.1. Optimization Objective and Constraints

3.1.1. Objective Function

The off-grid wind-powered hydrogen synthesized ammonia system takes economic optimization as the objective function, and the system cost consists of process electricity cost, operation and maintenance cost, electrolyzer water consumption cost, personnel wages and benefits, equipment depreciation cost, etc. The system revenue is the ammonia sales revenue, as shown in the following equation:
min J = S C C = C A + C B + C t Water + C S a l + C D e p
Format: J —Profitability of electric hydrogen to ammonia systems, S —Proceeds from ammonia sales, C —Total cost of an electric hydrogen to ammonia system, C A —Process electricity costs, C B —Operation and Maintenance Costs, C t Water —Electrolyzer water consumption costs, C S a l —Personnel wages and benefits, C D e p —Depreciation cost of equipment.
(1) Process electricity costs
C A = C t P 2 H + C t N H 3 + C t H 2 , comp
Format: C t P 2 H —Cost of hydrogen production from electrolyzed water, C t N H 3 —Hydrogen to ammonia cost, C t H 2 , comp —Hydrogen storage costs.
C t P 2 H = h t = 1 T c t p r , R E S P t P 2 H
C t N H 3 = h t = 1 T c t p r , R E S P t N H 3
C t H 2 , comp = h t = 1 T c t p r , R E S P t H 2 , comp
Format: h —Scheduling step, c t p r , R E S —Wind and solar tariffs, P t P 2 H —Electrolyzed water to hydrogen power, P t N H 3 —Ammonia process electricity, P t H 2 , comp —Electricity used to compress hydrogen.
(2) Operation and Maintenance Costs
C B = C H 2 o m + C N H 3 o m + C c o m p o m
Format: C H 2 o m , C N H 3 o m , C c o m p o m —Operation and maintenance costs for electric hydrogen production units, hydrogen ammonia units, hydrogen compression units.
(3) Electrolyzer water consumption costs
C t Water = t = 1 T K W a t e r c t w a t e r Q H 2
Format: K W a t e r —Water consumption per unit of hydrogen produced in electrolysis tanks; c t w a t e r —Price per unit of water; Q H 2 —Hourly hydrogen production from an electrolyzed water to hydrogen system.
(4) Personnel wages and benefits
C S a l = M × Y a v e
Format: M —Electro hydrogen-ammonia system staffing, Y a v e —Per capita salary and benefits.
(5) Depreciation and cost of equipment
C D e p = K d e p × C i n v
Format: K d e p —Depreciation cost ratio factor, C i n v —Investment costs.
(6) Proceeds from ammonia sales
S = h t = 1 T c N H 3 F t N H 3
Format: c N H 3 —Price per unit of ammonia sold, F t N H 3 —Ammonia yield of the system.

3.1.2. Restrictive Condition

The operation of the off-grid wind-generated hydrogen-to-ammonia system is simulated to satisfy the constraints of system power balance, new energy abandonment limit, and green electricity rate limit.
(1) System power balance constraints
The power of the system needs to satisfy the following equilibrium constraints:
P t P 2 H + P t NH 3 = P t P V + P t W T + P t b a t
Format: P t P 2 H , P t NH 3 —Electricity-to-hydrogen power, hydrogen-to-ammonia power; P t P V , P t W T —Photovoltaic output, wind turbine output; P t b a t —Energy storage out of the way.
(2) New energy abandonment rate constraints
P l o s s ( t ) Δ t P r e ( t ) Δ t 0.05
P l o s s ( t ) 0
Format: P l o s s ( t ) —Abandoned power, P r e ( t ) —Power generation.

3.1.3. Sparrow Search Algorithm

In this paper, the sparrow search algorithm (SSA) is used to solve the model. The sparrow search algorithm is derived from the foraging and anti-predation behaviors of sparrows in nature and was proposed in 2020. The algorithm realizes a more accurate exploration of the search space by constructing a finder-follower model and incorporating a detection and warning mechanism. The core idea is to subdivide the search space into multiple subregions, and then search in each subregion until the target is found or the search space is empty.
Compared with the traditional particle swarm optimization algorithm, the sparrow search algorithm pays more attention to the mining of the local optimal solution, which has the advantages of strong ability to find the optimal solution, high solving efficiency, robustness, etc., and thus serves the limitations of the PS0 algorithm to a certain extent [18]. The algorithm flow is shown in Figure 2.
Based on the foraging and anti-predator behaviors of sparrow populations, the sparrow population can be abstracted into an explorer-follower-warning model. The explorers have the highest energy reserve in the population and good fitness value, providing foraging directions for the whole population. The followers will pay close attention to the explorers to get better food sources to increase their fitness value. The early warning will give an alarm when encountering danger. At this time, the sparrows at the edge of the population will move to the safe area, and the intermediate sparrows will randomly roam around and approach the other sparrows [19,20,21].
Applying SSA to the optimization problem, if there are N sparrows in a D-dimensional search space, then the position of the ith sparrow in the space is X i = [ x i 1 , , x i d , , x i D ] . The corresponding fitness value is F x = [ f ( x i 1 ) , , f ( x i d ) , , f ( x i D ) ] , included among these is i = 1 , 2 , , N , denoting the number of sparrows in the population. d = 1 , 2 , , D denotes the dimension of the design variables of the problem to be optimized.
In SSA, explorers are able to take the lead in targeting food sources during the search process by virtue of their broader search horizons. In the iterative algorithm, the position update mechanism of explorers is designed to ensure that they can continue to search for better food sources in a wider search field, thus effectively guiding the entire sparrow population in a more favorable direction:
x i d t + 1 = x i d t exp ( i α i t e r max ) x i d t + Q L
Format: t is the current number of iterations; i t e r max is the maximum number of iterations; α ( 0 , 1 ] is randomization; Q is a random number that follows a normal distribution; L is a 1 × d matrix with all elements 1; R 2 [ 0 , 1 ] is an early warning value; ST [ 0.5 , 1 ] is a safe value. When R 2 < ST , it indicates that there are no predators in the current foraging environment and that the explorer can conduct a wide search. When R 2 S T , it indicates that a predator has been detected by an early warning agent and an alarm is raised, at which point all sparrows will move to a safe area to feed.
All the sparrows in the population except the explorer are followers, and the position update of the follower during the iteration process is described as follows:
x i d t + 1 = Q exp ( x w o r s t x i d t i 2 ) x p t + 1 + x i d t x p t + 1 A + L
Format: x w o r s t is the global worst position in the current population; x p is the optimal position of the current discoverer; A + = A T ( A A T ) 1 , A is a 1 × d matrix, each element of the matrix is randomly assigned a value of 1 or −1. When i > N 2 , this indicates that the ith follower did not obtain food, has a low fitness value, and needs to fly elsewhere urgently to forage for food. When i N 2 , it indicates that the ith follower will forage near the optimal location.
Sparrows were randomly selected as early warning agents in the population, whose numbers generally accounted for 10% to 20% of the population, and the location of the early warning agents was updated as described below:
x i d t + 1 = x b e s t t + β x i d t x b e s t t x i d t + K ( x i d t x w o r s t t ( f i f w ) + ε )
Format: x b e s t is the current global optimal position; β is the step control parameter, obeying normal distribution (mean 0, variance 1); K [ 1 , 1 ] is randomization; f i , f w , f g are the current individual sparrow fitness value, the current global worst fitness value, and the best fitness value, respectively; ε is a very small constant that prevents the denominator from being zero. When f i > f g , it indicates that sparrows are at the edge of the population and are vulnerable to predators. When f i = f g , it indicates that the sparrow in the middle of the population realizes the danger and needs to move closer to the other sparrows to avoid the attack [22,23].
The sparrow search algorithm is used to optimize the hydrogen production power, the energy storage capacity, and the amount of new energy discarded by the system to find the optimal solution. This is to ensure that the hydrogen production power is maximized while minimizing the amount of new energy discarded, and to simultaneously maintain the power balance of the system through the energy storage capacity to ensure the flexibility of system operation [24,25].
The optimal solution calculation process is shown in Figure 3.

4. Example Analysis and Discussion

In this section, the model is solved based on the sparrow search algorithm and particle swarm optimization algorithm in the Daan area of Baicheng City, Jilin Province, as an example, and the running simulation results are obtained. The speed of the two algorithms and the economic data derived from the solution are compared to prove the reliability and superiority of the sparrow search algorithm.

4.1. Algorithmic Parameter

Typical daily wind data of a region in Baicheng City, Jilin Province, China are selected as input data for the case, and the typical daily wind data are shown in Figure 4, with 24 h and a step size of 1 h. Considering the local wind resources, the investment cost, and other factors, the case adopts the total scale of a 70 MW wind turbine and the total scale of a 70 MW photovoltaic array as examples for the simulation and optimization of the operation.
Based on the operating constraints of the system, the following operating parameters are set:
(1) Electrolyzer working state: To ensure stable operation of the system, the minimum operating power of the electrolyzer is 30% of the rated power, and the maximum operating power is 100% of the rated power. At the same time, the hydrogen production efficiency of the electrolyzer is 1 Nm3 of hydrogen per 5 kWh of electricity consumed. The specific parameters are shown in Table 1.
(2) Parameter setting of gas storage tanks: For a single gas storage tank, the lower limit of gas storage capacity is set at 4000 Nm3 to ensure sufficient hydrogen storage capacity; the upper limit of gas storage capacity is set at 30,000 Nm3 to prevent safety hazards caused by too much gas.
(3) Parameter setting of the energy storage device: The SOC of the energy storage battery is limited to 0.15 to 0.85, and the charging and discharging efficiency is set to 92% to ensure the safe operation of the battery. The specific parameters are shown in Table 2.
(4) Hydrogen ammonia synthesis device: Every 2000 Nm3 of hydrogen can produce 1 ton of ammonia, liquid ammonia is priced at USD 5000 per bidder.
(5) Requirements for power abandonment rate: In order to improve the efficiency of energy utilization, the power abandonment rate of the system is required to be less than 5% so as to maximize the consumption of wind and solar resources and reduce the abandonment of wind and light.
In addition, other economic data are shown in Table 3.

4.2. Analysis of Results

Combined with the above example data, the rated number of electrolyzer runs for a typical 24 h day is obtained. As shown in Figure 5, the maximum number of rated tanks in operation during a 24 h day is 10.
The simulated power abandonment of 24 h operation is shown in Figure 6, which shows that each item of data is close to 0, i.e., there is no wind and light abandonment, which meets the requirement of a new energy abandonment rate of less than 5%.
According to the actual ammonia process, to ensure the stability of the ammonia power, as shown in Figure 7, and to achieve economic optimization, ammonia production is always maintained at the rated rate of production as far as possible.
As shown in Figure 8, 24 h hydrogen production is consistent with the operation of the electrolyzer. The maximum hydrogen production is 10,978 Nm3 and the minimum hydrogen production is 3095 Nm3.
As shown in Figure 9, for the amount of hydrogen stored in the hydrogen storage tank, according to the hydrogen buffer tank inlet flow rate and outlet flow rate, the hydrogen storage tank storage capacity changes curve, and the storage capacity is maintained in the hydrogen buffer tank storage capacity between the upper and lower limits.
Figure 10 shows the power balance diagram for each time period of 24 h. At each moment, the algebraic sum of the various outputs is equal to the load, which satisfies the power balance. Energy storage output is positive for discharge and negative for charging. If the wind power is small, energy storage discharges to meet the load demand; if the wind power is large, energy storage is charged to store energy to cope with peak power consumption.
Figure 11 shows the 24 h benefits of the electric hydrogen synthesis ammonia system solved by the sparrow search algorithm and the traditional particle swarm optimization algorithm, respectively. It can be seen that the total benefits of the system on a typical day solved by the sparrow search algorithm are about USD 27,510.5, while the total benefits of the system on a typical day solved by the particle swarm optimization algorithm are about USD 24,558.7. The benefits of the system solved by the sparrow search algorithm are greater than the results of the particle swarm optimization algorithm most of the time. The system revenue solved by the sparrow search algorithm is larger than that solved by the particle swarm optimization algorithm most of the time. Therefore, the results obtained by the sparrow search algorithm are superior and the economic benefits of the system are better.
Figure 12 shows the convergence speed of the sparrow search algorithm and particle swarm optimization algorithm for the optimal solution at a certain moment, respectively. It can be seen that the solution efficiency of the sparrow search algorithm is significantly greater than that of the particle swarm optimization algorithm, and the results of the operation, i.e., the system’s benefits, are better.

5. Conclusions

This article proposes an economic optimization scheduling method based on the Sparrow Search Algorithm (SSA) for the new energy electric hydrogen synthesis and ammonia system, taking into account the operating characteristics of the electrolyzer and the characteristics of the electrochemical energy storage device and considering the operation mode of wind energy supply and energy storage in the system balance, which can accurately reflect the economic benefits of the system production simulation operation and realize the production and operation of the off-grid electric hydrogen synthesis and ammonia system in a more accurate way. The production and operation of an off-grid electric hydrogen synthesis ammonia system effectively maximize the economic benefits of the system, achieving the complete consumption of new energy.
Taking the typical daily wind and light characteristics of the Daan area as an example, we carried out the optimization scheduling of the system for a 24 h operation simulation and used the sparrow search algorithm to optimize the system’s hydrogen production, power abandonment rate, and energy storage output. We then obtained the number of electrolyzers of the wind hydrogen ammonia system operating at each time period, maximized hydrogen production under the premise of meeting the constraints of the power abandonment rate, and stabilized ammonia production, so as to reduce the maximization of the system’s economic benefits.
By comparing the solution results of the algorithm proposed in this paper with those of the conventional optimization algorithm, the results solved by the sparrow search algorithm are superior, the economic benefits of the system are better, and the solution efficiency is higher. It can be seen that the sparrow search algorithm proposed in this paper shows superiority in the economic optimization scheduling problem of the new energy hydrogen synthesis ammonia system, which in turn verifies the reasonableness and validity of the application of the algorithm proposed in this paper.
Combined with the research results of this paper, the next step will be to continue to study the impact of the joint start-stop strategy of wind power and hydrogen production units, wind power randomness, and other factors on the system operation results.
This will allow us to establish a more detailed and accurate planning and operation integration model and to realize more accurate operation simulation and optimization of off-grid wind power and hydrogen storage systems.

Author Contributions

Conceptualization, Q.W. and Y.L.; methodology, Y.L. and H.W.; software, Y.L. and L.Z.; validation, J.L. and Y.L.; formal analysis, B.L. and Y.L.; investigation, L.C. and Y.C.; data curation, X.L. and J.Y.; writing—original draft preparation, Y.L.; writing—review and editing, G.W. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Fund Project (Off-Grid Hydrogen System Modeling and Simulation Project) of Jilin Electric Power Co, Ltd., (KYB12022QN01).

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Conflicts of Interest

Authors Jingchao Liu, Huisheng Wang, Biao Li and Linsheng Cheng were employed by the company State Nuclear Electric Power Planning Design & Research Institute Co., Ltd. Authors Yue Chen, Jiqing Yu, Liyan Zhang, Xianhai Liu and Guinan Wang were employed by the company Jilin Electric Power Co., Ltd. The authors declare that this study received funding from Jilin Electric Power Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. International Energy Agency. Global Hydrogen Review 2021; International Energy Agency: Paris, France, 2021. [Google Scholar]
  2. Song, D.; Wang, S.; Miao, J.; Xiang, B. Discussion on the economics and cost analysis of hydrogen production from renewable energy. Sino-Glob. Energy 2023, 28, 24–29. [Google Scholar]
  3. Salmon, N.; Banares-Alcantara, R. Green ammonia as aspatial energy vector: A review. Sustain. Energy Fuels 2021, 5, 2814–2839. [Google Scholar] [CrossRef]
  4. Beerbühl, S.S.; Kolbe, B.; Roosen, C.; Schultmann, F. Synthesis of ammoniafrom intermittently generated hydrogen. ChemieIngenieur Tech. 2014, 86, 649–657. [Google Scholar]
  5. Morgan, E.R.; Manwell, J.F.; McGowan, J.G. Sustainable ammoniaproduction from U.S. offshore wind farms: Atechno-economic review. ACS Sustain. Chem. Eng. 2017, 5, 9554–9567. [Google Scholar] [CrossRef]
  6. Qiu, Y.; Ji, X.; Zhu, W.; Zhu, J.; Zhou, B.; He, G.; Li, J.; Lin, J. Research status and key supporting technologies of green hydrogen chemical technology for new energy scale consumption. Chin. J. Electr. Eng. 2023, 43, 6934–6955. [Google Scholar]
  7. Cao, F.; Guo, T.; Chen, K.; Jin, X.; Zhang, L.; Yang, J.; Yin, A. Progress and development prospect of wind-power coupled hydrogen production technology. Chin. J. Electr. Eng. 2021, 41, 2187–2200. [Google Scholar]
  8. Tian, Y. Research on Optimal Allocation of Power Capacity of Grid-Connected Microgrid; Shenyang Engineering College: Shenyang, China, 2023. [Google Scholar]
  9. Xie, B.; Li, P.; Su, J.; Su, J.; Liu, S. Research on maximum power point tracking algorithm for photovoltaic arrays under localized shadows. J. Sol. Energy 2023, 44, 47–52. [Google Scholar]
  10. Zhou, J.-Y.; Qiu, G.-H.; Lu, J. Research on optimal scheduling control method for photovoltaic access to distribution grid for peaking. Electron. Des. Eng. 2023, 31, 122–126. [Google Scholar]
  11. Deng, Z.; Jiang, Y. Optimal sizing of wind-hydrogen system considering hydrogen demand and trading modes. Int. J. Hydrogen Energy 2020, 45, 11527–11537. [Google Scholar] [CrossRef]
  12. Li, J.L.; Zhao, W.D.; Liang, Z.H.; Miao, H.Y.; Yuan, X.D. Power allocation technique based on hybrid electrolyzer hydrogen production system. Power Syst. Autom. 2024, 48, 9–24. [Google Scholar]
  13. Zhou, B.; Zhu, W.; Zhu, J.; Qiu, Y.; Zang, T.; He, G.; Chen, G. Multi-time schedulable domain analysis of wind-solar hydrogen to ammonia system. Chin. J. Electr. Eng. 2024, 44, 160–174. [Google Scholar]
  14. Di, J.J.; Shen, Y.; Jia, M.X.; He, Q. Modeling and analysis of wind-hydrogen coupled power generation system. Therm. Power Gener. 2022, 51, 65–73. [Google Scholar]
  15. Jia, C.; Wang, L.; Meng, E.; Yang, D.; Guo, D.; Liu, Y. Optimal capacity allocation and day-ahead optimal scheduling of wind-hydrogen coupled generation system. China Electr. Power 2020, 53, 80–87. [Google Scholar]
  16. Lin, J.; Yu, Z.-P.; Zhang, X.-Z.; Li, J.-R. On/off-grid operation and economic analysis of renewable energy electric hydrogen synthesis ammonia system. Chin. J. Electr. Eng. 2024, 44, 117–127. [Google Scholar]
  17. Meng, Y.; Guo, R.; Shi, Z.; Xue, J.; Lv, J.; Fan, F. Robust coordinated operation of flexibility resources in low-carbon parks with high percentage of wind power. J. Shanghai Jiao Tong Univ. 2024, 1–22. [Google Scholar] [CrossRef]
  18. Xue, Y.; Shi, Y.; Li, H.; Kan, D. Economic optimization operation of wind-solar storage microgrid based on particle swarm algorithm. In Proceedings of the 2015 National Academic Annual Conference on Customer-side Energy Management of Smart Grid, Automation and Computer Application Professional Committee of China Electrotechnical Society, Fieldbus Branch of China Electrical Appliance Industry Association Equipment Network, National Technical Committee for Standardization of Network Communication Interface for Electrical Equipment, Miami, FL, USA, 2–5 November 2015; p. 4. [Google Scholar]
  19. Fang, Q.; Liu, H.; Wang, M.; Liu, X. Optimal allocation of wind energy storage capacity based on improved discrete particle swarm algorithm. J. Shaanxi Univ. Sci. Technol. (Nat. Sci. Ed.) 2022, 38, 23–31. [Google Scholar]
  20. Zhang, Y.; Jiang, L.; Tang, B.; Chen, X.; Hu, H. Optimization method of substation frames based on improved sparrow search algorithm. Vib. Shock 2024, 43, 94–101. [Google Scholar]
  21. Li, H.; Zhang, L.; Mai, Z.; Ji, T. Distribution network restoration reconfiguration method based on improved discrete sparrow search algorithm. Intell. Power 2023, 51, 16–22+30. [Google Scholar]
  22. Dong, Z.; Xu, Q.; Zhigang, M.A. Optimal capacity allocation of new energy side energy storage based on SSA-RNN algorithm. Sci. Technol. Wind. 2024, 4–6. [Google Scholar] [CrossRef]
  23. Zhou, J.; Wang, S.; Cao, W.; Xie, Y.; Fernandez, C. State of health prediction of lithium-ion batteries based on SSA optimized hybrid neural network model. Electrochim. Acta 2024, 487, 144146. [Google Scholar] [CrossRef]
  24. Shu, X.; Tong, G.; Zhang, M.; Ke, Q.; Xiao, T.; Li, M.; Wang, Y. Wind power generation prediction based on the SSA-CNN-BiLSTM neural network model. J. Phys. Conf. Ser. 2024, 2703, 012014. [Google Scholar] [CrossRef]
  25. Xie, G.; Zhang, M.; Yang, M.; Wang, D. Economic Dispatch of Isolated Microgrids Based on Enhanced Sparrow Search Algorithm. Eng. Lett. 2024, 32, 753–760. [Google Scholar]
Figure 1. Energy storage and charging.
Figure 1. Energy storage and charging.
Energies 17 03796 g001
Figure 2. Sparrow Search Algorithm Flowchart.
Figure 2. Sparrow Search Algorithm Flowchart.
Energies 17 03796 g002
Figure 3. Optimal Solution Calculation Flow.
Figure 3. Optimal Solution Calculation Flow.
Energies 17 03796 g003
Figure 4. Typical daily data for Daan area, Baicheng City, Jilin Province, China.
Figure 4. Typical daily data for Daan area, Baicheng City, Jilin Province, China.
Energies 17 03796 g004
Figure 5. Number of electrolyzers rated for 24 h operation.
Figure 5. Number of electrolyzers rated for 24 h operation.
Energies 17 03796 g005
Figure 6. Graph showing 24 h of abandoned power.
Figure 6. Graph showing 24 h of abandoned power.
Energies 17 03796 g006
Figure 7. Graph showing 24 h of ammonia production.
Figure 7. Graph showing 24 h of ammonia production.
Energies 17 03796 g007
Figure 8. Graph showing 24 h of hydrogen production.
Figure 8. Graph showing 24 h of hydrogen production.
Energies 17 03796 g008
Figure 9. Graph showing 24 h of hydrogen volume in the storage tank.
Figure 9. Graph showing 24 h of hydrogen volume in the storage tank.
Energies 17 03796 g009
Figure 10. Simulated power balance for 24 h operation.
Figure 10. Simulated power balance for 24 h operation.
Energies 17 03796 g010
Figure 11. The 24 h returns of the system solved by the two algorithms.
Figure 11. The 24 h returns of the system solved by the two algorithms.
Energies 17 03796 g011
Figure 12. The speed of convergence of the optimal solutions of the two algorithms at a given moment in time.
Figure 12. The speed of convergence of the optimal solutions of the two algorithms at a given moment in time.
Energies 17 03796 g012
Table 1. Electrolyzer parameter data.
Table 1. Electrolyzer parameter data.
Parameter NameElectrolyzer
Power Adjustment Range[30%, 100%]
Electric-to-hydrogen ratio (kWh/Nm3)5
Climbing ability100%/h
Unit cost (CNY/Nm3)3500
Table 2. Energy storage devices: parameter data.
Table 2. Energy storage devices: parameter data.
Parameter NameEnergy Storage Devices
SOC Range[15%, 85%]
Charge and Discharge Efficiency92%
Initial SOC (MW)50
Maximum SOC (MW)80
Unit cost (CNY/Nm3)1800
Table 3. Other economic data.
Table 3. Other economic data.
Parameter NameUnit Costs
Wind power (CNY/kW)4600
Photovoltaic (CNY/kW)4300
Gas storage tanks (CNY/Nm3)155
Ammonia (CNY/Nm3)4100
Personnel wages (CNY/Nm3)107
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, J.; Chen, Y.; Yu, J.; Wang, H.; Zhang, L.; Li, B.; Cheng, L.; Liu, X.; Wang, G.; Li, Y.; et al. Sparrow Search Algorithm Based on New Energy Power Hydrogen Synthesis Ammonia Economic Optimization of System Scheduling. Energies 2024, 17, 3796. https://doi.org/10.3390/en17153796

AMA Style

Liu J, Chen Y, Yu J, Wang H, Zhang L, Li B, Cheng L, Liu X, Wang G, Li Y, et al. Sparrow Search Algorithm Based on New Energy Power Hydrogen Synthesis Ammonia Economic Optimization of System Scheduling. Energies. 2024; 17(15):3796. https://doi.org/10.3390/en17153796

Chicago/Turabian Style

Liu, Jingchao, Yue Chen, Jiqing Yu, Huisheng Wang, Liyan Zhang, Biao Li, Linsheng Cheng, Xianhai Liu, Guinan Wang, Yiyao Li, and et al. 2024. "Sparrow Search Algorithm Based on New Energy Power Hydrogen Synthesis Ammonia Economic Optimization of System Scheduling" Energies 17, no. 15: 3796. https://doi.org/10.3390/en17153796

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop