Wind-solar-hydrogen-ammonia integrated system capacity and dispatching hour-level joint optimization method

CN122659997APending Publication Date: 2026-08-28POWERCHINA ZHONGNAN ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611149362.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0005]此外,现有调度策略对于化工负荷调节特性的处理存在局限性

Benefits of technology

1、本发明方法通过建立基于多尺度预测的前瞻负荷调节机制,提升风光氢氨全系统应对不确定性的鲁棒性,离网系统保障率显著提升;并采用合成氨系统的三种约束机制精确匹配工艺要求,避免非计划停机;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122659997A_ABST
    Figure CN122659997A_ABST
Patent Text Reader

Abstract

The application discloses a capacity and dispatching hour-level combined optimization method of a wind-solar-hydrogen-ammonia whole system, and comprises the following steps: acquiring wind-solar output power of a wind-solar power generation system and establishing an energy flow coupling relationship, constructing an electrolytic hydrogen production hourly hydrogen production calculation model, a synthetic ammonia switching operation control rule, a hydrogen storage system dynamic operation model and an electrochemical energy storage system operation constraint model according to the energy flow coupling relationship; secondly, a load regulation constraint mechanism of the wind-solar-hydrogen-ammonia whole system is constructed, and a forward-looking load regulation mechanism is established based on the load regulation constraint mechanism and a future preset time power adjustment mechanism, which is introduced into a two-way coupling mechanism to iteratively update the capacity configuration and dispatching optimization of the wind-solar-hydrogen-ammonia whole system until a target minimum optimization function converges, and optimal capacity configuration and dispatching operation results are output; the method is suitable for realizing collaborative planning and operation of hydrogen production, hydrogen storage and synthetic ammonia links in a high-proportion renewable energy consumption scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electro-hydrogen coupling and comprehensive utilization of renewable energy, and in particular to a method for joint optimization of the capacity and scheduling of the entire wind-solar-hydrogen-ammonia system at the hourly level. Background Technology

[0002] The renewable energy-to-hydrogen-to-ammonia process (referred to as the "green ammonia process") is a zero-carbon process that uses renewable energy sources such as wind and solar power to drive the electrolysis of water to produce green hydrogen, which is then reacted with nitrogen from the air to synthesize ammonia, thus generating green ammonia. This process replaces the gray ammonia produced by traditional fossil fuels. This process is not only an important way to utilize wind and solar renewable energy on a large scale, but also an important technical route for the chemical industry to achieve carbon emission reduction, and one of the key paths to achieve low-carbon energy transformation and decarbonization of the chemical industry.

[0003] The entire wind-solar-hydrogen-ammonia system involves multiple stages, including new energy power generation, electrolytic hydrogen production, hydrogen storage, and synthetic ammonia production. Each stage has significant differences in time scale and operating characteristics: wind and solar power output has strong fluctuations on an hourly scale, and electrolyzers can be quickly adjusted within a wide load range. However, due to the chemical reaction characteristics of the synthetic ammonia process, the load is usually adjusted on an hourly basis, and there are high requirements for the continuity and stability of hydrogen supply.

[0004] In existing technologies, the capacity configuration and operation scheduling of the entire wind-solar-hydrogen-ammonia system are mostly designed separately. On the one hand, the capacity configuration method is usually based on long-term statistical data, and the scale of wind and solar power generation, electrolyzers and hydrogen storage is determined with economic efficiency as the goal, but it fails to fully consider the dynamic scheduling needs of the system during actual operation. On the other hand, the operation scheduling method focuses on short-term optimization, such as considering the optimal range of hydrogen storage tank pressure updates or mitigating the risk of green ammonia production, but it does not take into account the scheduling feasibility in the capacity configuration decision.

[0005] Furthermore, existing scheduling strategies have limitations in handling the characteristics of chemical load regulation. Some studies treat ammonia synthesis as a rigid load, ignoring its adjustability; others consider its adjustability, but due to the long timescale (e.g., requiring 8-hour rolling optimization), it is difficult to accurately match the hourly fluctuations in wind and solar power output. How to proactively consider the hourly regulation characteristics of ammonia synthesis during the capacity configuration phase and achieve global system optimization through a two-way coupling of prediction, scheduling, and configuration remains a pressing technical challenge.

[0006] Therefore, the main challenges of existing technologies include the following: How to accurately model the hourly load regulation capability of the ammonia synthesis process and integrate it into the optimized scheduling to ensure the engineering feasibility of the scheduling scheme; How to break down the barriers between capacity configuration and operation scheduling, so that capacity planning can reflect actual scheduling needs and operation scheduling can guide capacity optimization, so as to achieve the global optimality of integrated system planning and operation; How to design a dynamic control strategy for a hydrogen-electricity co-buffered system to synergistically utilize the energy density advantages of hydrogen storage and the power density advantages of electricity storage, and minimize the start-up and shutdown risks of the electrolyzer in hourly energy imbalance scenarios, thereby improving the wind and solar power absorption rate and system operation stability. Summary of the Invention

[0007] To address the aforementioned technical challenges, this invention provides a joint hourly optimization method for the capacity and scheduling of a wind-solar-hydrogen-ammonia system. This method utilizes multi-scale wind and solar probability prediction as the core link between capacity configuration and operational scheduling, quantifying and coordinating the transmission of prediction uncertainties at all levels of system design. This significantly enhances the system's adaptability to real-world environments, making it particularly suitable for the coordinated planning and operation of hydrogen production, storage, and ammonia synthesis in scenarios with high proportions of renewable energy consumption. To achieve these objectives, this invention employs the following technical solutions: A method for hourly joint optimization of capacity and dispatch for a complete wind-solar-hydrogen-ammonia system, wherein the complete wind-solar-hydrogen-ammonia system includes a wind-solar power generation system, an electrolytic hydrogen production system, an ammonia synthesis system, a hydrogen storage system, and an electrochemical energy storage system, and the method for hourly joint optimization of capacity and dispatch includes the following steps: Using hourly time steps, the wind and solar power output of the wind and solar power generation system within the scheduling cycle is obtained, and based on the wind and solar power output, a first energy flow coupling relationship is established between the wind and solar power generation system and the ammonia synthesis system, a second energy flow coupling relationship is established between the wind and solar power generation system and the electrolytic hydrogen production system, a third energy flow coupling relationship is established between the wind and solar power generation system and the hydrogen storage system, and a fourth energy flow coupling relationship is established between the wind and solar power generation system and the electrochemical energy storage system. Based on the first energy flow coupling relationship, the second energy flow coupling relationship, the third energy flow coupling relationship, and the fourth energy flow coupling relationship, respectively construct the ammonia switching operation control rule for characterizing the operation of the ammonia synthesis system, the electrolytic hydrogen production calculation model for characterizing the hydrogen production process of the electrolytic hydrogen production system, the dynamic operation model of the hydrogen storage system for characterizing the dynamic balance of hydrogen supply and demand, and the operation constraint model of the electrochemical energy storage system for characterizing the energy storage and release process. Based on the calculation model of hydrogen production per hour in electrolytic hydrogen production, the control rules for switching operation of synthetic ammonia, the dynamic operation model of hydrogen storage system, and the operation constraint model of electrochemical energy storage system, a load regulation constraint mechanism for the entire wind-solar-hydrogen-ammonia system is constructed to achieve coordinated matching between electrical energy, hydrogen energy, and load demand within the entire wind-solar-hydrogen-ammonia system under fluctuating wind and solar power output conditions. Input the predicted wind and solar power output of the wind and solar power generation system and the load demand boundary conditions of the ammonia synthesis system within the future prediction period, and establish a future preset time power adjustment mechanism for adjusting the load rate of the ammonia synthesis system; based on the load adjustment constraint mechanism and the future preset time power adjustment mechanism, establish a forward-looking load adjustment mechanism for adjusting the operating status of the entire wind, solar, hydrogen and ammonia system in advance; the duration of the prediction period is 4 to 72 hours. The aforementioned forward-looking load regulation mechanism is introduced into a two-way coupling mechanism consisting of an upper-level capacity configuration optimization model and a lower-level rolling scheduling optimization model. This mechanism iteratively updates the capacity configuration and scheduling optimization of the entire wind-solar-hydrogen-ammonia system. The capacity parameters and operating parameters of the wind-solar power generation system, electrolytic hydrogen production system, hydrogen storage system, electrochemical energy storage system, and ammonia synthesis system are used as decision variables until the objective minimization optimization function within the upper-level capacity configuration optimization model converges. Output the optimal capacity configuration and scheduling results that satisfy the operational constraints of the entire wind, solar, hydrogen, and ammonia system.

[0008] Preferably, obtaining the wind and solar power output of the wind and solar power generation system within the scheduling period specifically includes: Step S11: Set t as the hour level, and collect the historical per-unit output power of wind farms and photovoltaic power stations of the wind-solar power generation system with t as the time node, and obtain the historical per-unit output power P of wind farms in time t. wt,pu,hist [t] and the historical per-unit output power P of the photovoltaic power station pv,pu,hist [t]; Step S12: Calculate the predicted power output of the wind farm and photovoltaic power station during time period t based on the historical per-unit power output of the wind farm and photovoltaic power station during time period t. The formula for calculating the predicted power output of a wind farm is as follows: P wt,pre [t]=P wt,pu,hist [t]•C wt The formula for calculating the predicted output power of a photovoltaic power plant is as follows: P pv,pre [t]=P pv,pu,hist [t]•C pv Among them, P wt,pre [t] represents the predicted power output of the wind farm at time t, P pv,pre [t] represents the predicted power output of the photovoltaic power station during time period t, P wt,pu,hist [t] represents the historical per-unit output power of the wind farm during time period t, P pv,pu,hist [t] represents the historical per-unit output power of the photovoltaic power station during time period t, C wt C represents the installed capacity of the wind farm. pv The installed capacity of the photovoltaic power station; Step S13: Calculate the actual power output of the wind farm and photovoltaic power station during time period t based on the predicted power output of the wind farm and photovoltaic power station during time period t. The formula for calculating the actual output power of a wind farm is as follows: P wt [t]=P wt,pre [t] •β wt [t] The formula for calculating the actual output power of a photovoltaic power station is: P pv [t]=P pv,pre [t] •β pv [t] Among them, P wt [t] represents the actual power output of the wind farm during time period t, P pv [t] represents the actual output power of the photovoltaic power station during time period t, β wt [t] represents the actual power output coefficient of the wind farm; β pv [t] represents the actual output power coefficient of the photovoltaic power station; Step S14: Calculate the wind and solar power output of the wind and solar power generation system during time period t based on the actual power output of the wind farm and photovoltaic power station during time period t. The formula for calculating the wind and solar power output of the wind and solar power generation system during time period t is as follows: P total [t]=P wt [t]+ P pv [t] Among them, P total [t] represents the wind and solar power output of the wind and solar power generation system during time period t.

[0009] Preferably, the ammonia synthesis switching operation control rule constructed based on the first energy flow coupling relationship to characterize the operation of the ammonia synthesis system specifically includes: Step S211: Based on the power tracking control strategy of source following load, calculate the load rate of the ammonia synthesis system in time period t according to the wind and solar power output of the wind and solar power generation system in time period t. The formula for calculating the load rate of the ammonia synthesis system during time period t is as follows:

[0010] in, Let t represent the wind and solar power output of the wind and solar power generation system during time period t. This represents the overall rated equivalent electrical power of the ammonia synthesis system. The load rate of the ammonia synthesis system during time period t; The formula for calculating the comprehensive rated equivalent electrical power of the ammonia synthesis system is as follows: = +

[0011] in, This refers to the rated electrical power of the ammonia synthesis system. The rated electrical power required for the electrolytic hydrogen production process to consume the rated amount of hydrogen in the ammonia synthesis system; The formula for calculating the rated electrical power of the ammonia synthesis system is as follows:

[0012] in, The annual production capacity of the ammonia synthesis system is expressed in tons per year. This represents the rated hourly production load of the ammonia synthesis system. The unit product power consumption of the ammonia synthesis system is expressed in kilowatt-hours per ton. Step S212: Apply the following limitations to the load rate operating constraint range of the ammonia synthesis system during time period t: 0.3≤ ≤1.1 and | |≤0.6; Step S213: Define three operating states of the ammonia synthesis system and represent them using binary variables; the representation of the three operating states of the ammonia synthesis system is as follows: Let L[t] represent the working state of the ammonia synthesis system, let S[t] represent the hot standby state of the ammonia synthesis system, and let I[t] represent the shutdown state of the ammonia synthesis system. When L[t]=1, it indicates that the ammonia synthesis system is in a working state; when L[t]=0, it indicates that the ammonia synthesis system is in a non-working state. When S[t]=1, it indicates that the ammonia synthesis system is in a hot standby state; when S[t]=0, it indicates that the ammonia synthesis system is in a non-hot standby state. When I[t]=1, it indicates that the ammonia synthesis system is in a shutdown state; when I[t]=0, it indicates that the ammonia synthesis system is in a non-shutdown state. Step S214: Based on the three operating states of the ammonia synthesis system, establish a mutual exclusion constraint mechanism for the operating states, a start-stop count mechanism, and a power constraint mechanism for the operating states of the ammonia synthesis system.

[0013] Preferably, the method for establishing the mutual exclusion constraint mechanism for the operating states of the ammonia synthesis system based on the three operating states of the ammonia synthesis system in step S214 is as follows: L[t]+S[t]+I[t]=1 Where L[t], S[t], and I[t] represent the binary variables corresponding to the operating state of the ammonia synthesis system during time period t; The method for establishing the start-up and shutdown frequency statistics mechanism of the ammonia synthesis system based on the three operating states of the ammonia synthesis system in step S214 is as follows: A valid start-up action is triggered only when the operating state of the ammonia synthesis system changes from non-working to working; a valid shutdown action is triggered only when the operating state of the ammonia synthesis system changes from working to non-working. When L[t-1]=0 and L[t]=1, it is counted as a startup event; When L[t-1]=1 and L[t]=0, it is counted as a shutdown event; Set the number of start-stop cycles Y to perform start-stop statistics throughout the entire cycle; The method for establishing the working state power constraint mechanism of the ammonia synthesis system based on the three operating states of the ammonia synthesis system in step S214 is as follows: When S[t]=1, =P standby ; When I[t]=1, =0; in, P is the rated electrical power of the ammonia synthesis system. standby This refers to the electrical power of the ammonia synthesis system in hot standby mode.

[0014] Preferably, the step of constructing a time-by-time hydrogen production calculation model based on the second energy flow coupling relationship to characterize the hydrogen production process of the electrolytic hydrogen production system specifically includes: Step S221: Based on the wind and solar power output of the wind and solar power generation system during time period t, establish a power constraint model between the wind and solar power output and the electrolysis hydrogen production system. The power constraint model for the electrolytic hydrogen production system employs the following constraint method:

[0015] in, The real-time hydrogen production power of the electrolysis hydrogen production system during time period t. The rated power of the electrolysis hydrogen production system. Let t represent the wind and solar power output of the wind and solar power generation system during time period t. [t] represents the real-time power of the ammonia synthesis system during time period t; The formula for calculating the rated power of an electrolytic hydrogen production system is as follows: =

[0016] in, This refers to the annual production capacity of the electrolysis hydrogen production system, expressed in standard cubic meters per hour. The unit product power consumption of the electrolytic hydrogen production system is expressed in kilowatt-hours per standard cubic meter. Step S222: Establish a time-by-time hydrogen production calculation model for the electrolytic hydrogen production system using the real-time operating hydrogen production power of the electrolytic hydrogen production system; wherein, the calculation formula for the time-by-time hydrogen production calculation model of the electrolytic hydrogen production system is: =

[0017] in, The hydrogen production rate of the electrolysis hydrogen production system during time period t. Let t be the hydrogen production power of the electrolytic hydrogen production system during time period t.

[0018] Preferably, the construction of the dynamic operation model of the hydrogen storage system based on the third energy flow coupling relationship to characterize the dynamic balance of hydrogen supply and demand specifically includes: Step S231: Using the hydrogen production rate of the electrolytic hydrogen production system during time period t, the real-time hydrogen requirement of the ammonia synthesis system, and the hydrogen storage capacity of the hydrogen storage system in the previous time period t, establish a dynamic coupling boundary constraint model of the hydrogen production-storage-use three-terminals for the hydrogen storage system's charging flow rate. Calculate the hydrogen charging flow rate of the hydrogen storage system during time period t using this model. The dynamic coupling boundary constraint model of the hydrogen production-storage-use three-terminals is as follows: =min

[0019] in, The hydrogen charging flow rate of the hydrogen storage system during time period t. This represents the maximum hydrogen storage capacity of the hydrogen storage system. The hydrogen storage capacity of the hydrogen storage system is the distance from the previous time period t. The hydrogen production rate of the electrolysis hydrogen production system during time period t. This represents the real-time hydrogen requirement of the ammonia synthesis system during time period t. The quantity efficiency of the hydrogen charging process; The formula for calculating the real-time hydrogen requirement of the ammonia synthesis system during time period t is as follows: =

[0020] in, The load rate of the ammonia synthesis system during time period t. The rated electrical power required for electrolytic hydrogen production to consume the rated amount of hydrogen in the ammonia synthesis system. The unit product power consumption of the electrolytic hydrogen production system is expressed in kilowatt-hours per ton. Step S232: Calculate the difference between the real-time hydrogen demand of the ammonia synthesis system and the hydrogen production of the electrolytic hydrogen production system during time period t. Based on the difference in hydrogen production and the hydrogen storage capacity of the hydrogen storage system in the previous time period t, establish a three-terminal dynamic coupling constraint model of insufficient hydrogen production, hydrogen demand, and hydrogen storage capacity for the hydrogen release flow rate of the hydrogen storage system. Use this three-terminal dynamic coupling constraint model to calculate the hydrogen release flow rate of the hydrogen storage system during time period t. The three-terminal dynamic coupling constraint model of insufficient hydrogen production, hydrogen demand, and hydrogen storage capacity is as follows: =min

[0021] in, The hydrogen release flow rate of the hydrogen storage system during time period t. The hydrogen storage capacity of the hydrogen storage system in the previous time period is t. This refers to the quantity efficiency of the hydrogen release process. The difference between the real-time hydrogen requirement of the ammonia synthesis system and the hydrogen production of the electrolytic hydrogen production system during time period t; Step S233: Based on the obtained hydrogen charging flow rate and hydrogen discharging flow rate of the hydrogen storage system during time period t, and combined with the hydrogen storage capacity of the hydrogen storage system in the previous time period, calculate the hydrogen storage capacity of the hydrogen storage system during time period t; the formula for calculating the hydrogen storage capacity is:

[0022] in, Let t be the hydrogen storage capacity of the hydrogen storage system during time period t. The hydrogen storage capacity of the hydrogen storage system in the previous time period t; The hydrogen charging flow rate of the hydrogen storage system during time period t. The hydrogen release flow rate of the hydrogen storage system during time period t. and These are the quantity efficiencies of the hydrogen charging / discharging processes, respectively. Step S234: Based on the hydrogen production of the electrolytic hydrogen production system during time period t and the hydrogen release flow rate of the hydrogen storage system during time period t, establish a hydrogen supply guarantee constraint and penalty mechanism for the ammonia synthesis system; the constraint method of the hydrogen supply guarantee constraint and penalty mechanism is as follows: +

[0023] in, This represents the real-time hydrogen requirement of the ammonia synthesis system during time period t. The hydrogen production rate of the electrolysis hydrogen production system during time period t. Let t be the hydrogen release flow rate of the hydrogen storage system during time period t.

[0024] Preferably, the electrochemical energy storage system operation constraint model based on the fourth energy flow coupling relationship to characterize the energy storage and release process specifically includes: Step S241: Establish the rated energy storage capacity function of the electrochemical energy storage system; the rated energy storage capacity function of the electrochemical energy storage system is: =

[0025] in, This refers to the rated energy storage capacity of the electrochemical energy storage system. The rated power of the electrochemical energy storage system. This refers to the rated energy storage duration of the electrochemical energy storage system. Step S242: Based on the wind and solar power output of the wind and solar power generation system during time period t, the rated energy storage capacity of the electrochemical energy storage system, and the rated power of the electrochemical energy storage system, establish a dynamic matching model for the charging power of the electrochemical energy storage system; the dynamic matching model for the charging power of the electrochemical energy storage system is as follows: =min

[0026] in, The charging power of the electrochemical energy storage system during time period t. The energy stored in the electrochemical energy storage system in the previous time period t is the energy stored in the previous time period. Let t represent the wind and solar power output of the wind and solar power generation system during time period t. The real-time power of the ammonia synthesis system during time period t. The hydrogen production power of the electrolytic hydrogen production system during time period t; The charging efficiency of electrochemical energy storage systems; Step S243: Based on the wind and solar power output of the wind and solar power generation system during time period t, the rated energy storage capacity of the electrochemical energy storage system, and the rated power of the electrochemical energy storage system, establish a power consumption matching constraint model for the discharge power of the electrochemical energy storage system; the power consumption matching constraint model is as follows: =min

[0027] in, The discharge power of the electrochemical energy storage system during time period t. For the discharge efficiency of electrochemical energy storage systems, The energy stored in the electrochemical energy storage system in the previous time period t is the energy stored in the previous time period. This refers to the rated energy storage capacity of the electrochemical energy storage system. The rated power of the electrochemical energy storage system. The total rated equivalent electrical power of the ammonia synthesis system during time period t. The wind and solar power output of the wind and solar power generation system during time period t; Step S244: Based on the discharge power and charging power of the electrochemical energy storage system during time period t, establish the dynamic equation for the energy storage capacity of the electrochemical energy storage system; the calculation method for the dynamic equation for the energy storage capacity is as follows:

[0028] in, The energy stored in the electrochemical energy storage system during time period t is the energy stored in the system. The charging power of the electrochemical energy storage system during time period t. The discharge power of the electrochemical energy storage system during time period t. and These represent the charging efficiency and discharging efficiency of the electrochemical energy storage system at time t, respectively. Step S245: Based on the discharge power and charging power of the electrochemical energy storage system during time period t, establish a charge-discharge mutual exclusion constraint for the electrochemical energy storage system; the method of the charge-discharge mutual exclusion constraint is as follows: • =0 in, The charging power of the electrochemical energy storage system during time period t. Let t be the discharge power of the electrochemical energy storage system during time period t.

[0029] Preferably, the load regulation and constraint mechanism for constructing the entire wind-solar-hydrogen-ammonia system specifically includes: Step S31: Based on the wind and solar power output of the wind and solar power generation system during time period t, the discharge power of the electrochemical energy storage system during time period t, and the power purchased from the grid during time period t, establish the energy balance equation for the entire wind-solar-hydrogen-ammonia system; the energy balance equation is as follows:

[0030] in, Let t represent the wind and solar power output of the wind and solar power generation system during time period t. The discharge power of the electrochemical energy storage system during time period t. The power purchased from the grid during time period t; The real-time power of the ammonia synthesis system during time period t. Let be the hydrogen production power of the electrolytic hydrogen production system during time period t. The charging power of the electrochemical energy storage system during time period t. The power sold to the grid during time period t; Furthermore, based on the wind and solar power output of the wind and solar power generation system during time period t, the following constraints are applied to the logical scheduling rules for the surplus power scenario of the entire wind-solar-hydrogen-ammonia system: [t]>1.1•

[0031] in, [t] represents the comprehensive rated equivalent electrical power of the ammonia synthesis system during time period t, expressed as: = [t]+ [t] in, [t] represents the real-time power of the ammonia synthesis system during time period t; [t] represents the hydrogen production power of the electrolytic hydrogen production system during time period t; Step S32: When the wind and solar power output of the wind and solar power generation system still has surplus power after satisfying the real-time power of the ammonia synthesis system, the hydrogen production power of the electrolytic hydrogen production system, the real-time charging power of the electrochemical energy storage system, and the power sold to the grid during time period t, a power curtailment constraint model for the wind and solar power generation system under the surplus power scenario is established based on the wind and solar power output of the wind and solar power generation system, the real-time power of the ammonia synthesis system, the hydrogen production power of the electrolytic hydrogen production system, the real-time charging power of the electrochemical energy storage system, and the power sold to the grid during time period t. The calculation formula for the power curtailment constraint model is as follows:

[0032] in, The amount of power curtailed by the wind and solar power generation system during time period t. The charging efficiency of the electrochemical energy storage system during time period t; Furthermore, based on the wind and solar power output of the wind and solar power generation system during time period t, the following constraints are applied to the logical scheduling rules for the entire wind-solar-hydrogen-ammonia system under a power shortage scenario: <0.3•

[0033] Step S33: Set the normal range logic range of the ammonia synthesis system to meet the logic scheduling rules of the entire wind-solar-hydrogen-ammonia system under surplus power or power shortage scenarios; the normal range logic range is 0.3. ≤ ≤1.1• .

[0034] Preferably, the establishment of a future preset time power adjustment mechanism for adjusting the load rate of the ammonia synthesis system specifically includes: Step S41: Input the predicted wind and solar power output of the wind and solar power generation system and the load demand boundary conditions of the entire wind-solar-hydrogen-ammonia system within the prediction period of the next 4-72 hours; the load demand boundary conditions of the entire wind-solar-hydrogen-ammonia system include the upper and lower limits of the load rate of the ammonia synthesis system, the mutual exclusion boundary of the operating status between each system, the energy consumption parameter boundary of the electrolytic hydrogen production system and the ammonia synthesis system, the constraint boundary of the number of start-ups and shutdowns of the ammonia synthesis system, and the load boundary of the hydrogen supply matching of the ammonia synthesis system. Step S42: Calculate the cumulative power shortage E of the entire wind-solar-hydrogen-ammonia system within the forecast period of 4-72 hours. gap ; Step S43: Preset a fixed cumulative power shortage threshold E gap,lim If E gap ≥E gap,lim If the system is deemed to have insufficient medium- to long-term power supply capacity for the entire wind-solar-hydrogen-ammonia system, the load rate of the synthetic ammonia system will be forcibly reduced to the minimum stable load rate of 30%.

[0035] Preferably, the upper-layer capacity configuration optimization model is configured in the following ways: Based on the initial total investment, operation and maintenance costs, and system energy consumption costs, an optimization function for minimizing the total life-cycle ammonia cost (LCOA) is established with the optimization objective of minimizing the LCOA target minimization function; this LCOA target minimization optimization function is then set as the upper-level capacity configuration optimization model. The LCOA objective minimization optimization function is:

[0036] in, c represents the initial total investment, and c represents the year. The maintenance cost for year c is... Let the system energy consumption cost be in year c. For the power grid's electricity purchase and sale cost in year c, For the electricity sales revenue from the power grid in year c, Let r be the estimated ammonia production in year c, r be the discount rate, and N be the total project lifecycle. The configuration methods for the lower-level rolling scheduling optimization model include: Based on the total lifecycle cost of ammonia, the curtailment rate of wind and solar power, and the number of start-ups and shutdowns of the ammonia synthesis system, a comprehensive optimization function is constructed with the goals of minimizing system operating costs, maximizing renewable energy consumption, and ensuring stable operation of the ammonia synthesis unit. This comprehensive optimization function is then used to establish a lower-level rolling scheduling optimization model. The comprehensive optimization function is as follows: λ1LCOA+λ2•Wind and Solar Curtailment Rate+λ3•Y Where λ1, λ2, and λ3 are weighted penalty coefficients, LCOA is the total life cycle ammonia cost, and Y is the number of start-ups and shutdowns of the ammonia synthesis system throughout the entire cycle; Among them, the curtailment rate of wind and solar power is: =

[0037] in, For wind and solar power curtailment rate, The amount of power curtailed by the wind and solar power generation system during time period t. The wind and solar power output of the wind and solar power generation system during time period t; The decision variables include the installed capacity C of the wind farm. wt The installed capacity C of photovoltaic power stations pv Annual production scale of electrolysis hydrogen production system Maximum hydrogen storage capacity of hydrogen storage system Rated energy storage capacity of electrochemical energy storage system Annual production scale of the ammonia synthesis system At least one or more of the following.

[0038] The present invention has the following advantages and beneficial effects compared with the prior art: 1. The method of this invention improves the robustness of the entire wind-solar-hydrogen-ammonia system to cope with uncertainties by establishing a forward-looking load adjustment mechanism based on multi-scale prediction, and significantly improves the off-grid system guarantee rate; and adopts three constraint mechanisms of the ammonia synthesis system to accurately match process requirements and avoid unplanned downtime. 2. The method of this invention establishes a hydrogen-electricity joint buffer mechanism, realizes a multi-time and multi-scale energy regulation mechanism, achieves a wind and solar power absorption rate of ≥95%, significantly reduces LCOA, and greatly enhances the economic efficiency and engineering feasibility of the project. 3. The method of this invention is the first to create a capacity-scheduling dual-layer coupled optimization model, which breaks the limitations of traditional separate design. It also corrects the capacity configuration in reverse through scheduling feasibility index, so that the final solution not only meets the economic requirements, but also has good operational operability, and achieves the global optimal solution of planning and operation. 4. This invention establishes a three-state identification mechanism and a start-up and shutdown count mechanism for the ammonia synthesis system, which minimizes the downtime risk of the ammonia synthesis system, significantly reduces equipment wear and tear, extends equipment life, and ultimately reduces product operating costs, while improving system stability and economy. Attached Figure Description

[0039] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0040] The present invention will now be further described with reference to the accompanying drawings and specific embodiments: To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0042] Example 1: like Figure 1 As shown, this invention discloses a method for joint optimization of capacity and scheduling at the hourly level for a complete wind-solar-hydrogen-ammonia system. The complete wind-solar-hydrogen-ammonia system includes a wind-solar power generation system, an electrolytic hydrogen production system, an ammonia synthesis system, a hydrogen storage system, and an electrochemical energy storage system. The method for joint optimization of capacity and scheduling at the hourly level includes the following steps: Using hourly time steps, the wind and solar power output of the wind and solar power generation system within the scheduling cycle is obtained, and based on the wind and solar power output, the first energy flow coupling relationship between the wind and solar power generation system and the ammonia synthesis system, the second energy flow coupling relationship between the wind and solar power generation system and the hydrogen electrolysis system, the third energy flow coupling relationship between the wind and solar power generation system and the hydrogen storage system, and the fourth energy flow coupling relationship between the wind and solar power generation system and the electrochemical energy storage system are established respectively. Based on the first energy flow coupling relationship, the second energy flow coupling relationship, the third energy flow coupling relationship, and the fourth energy flow coupling relationship, respectively, a synthetic ammonia switching operation control rule for characterizing the operation of the synthetic ammonia system, a calculation model of hydrogen production per moment for electrolytic hydrogen production for characterizing the hydrogen production process of the electrolytic hydrogen production system, a dynamic operation model for hydrogen storage system for characterizing the dynamic balance of hydrogen supply and demand, and an operation constraint model for electrochemical energy storage system for characterizing the energy storage and release process. Based on the calculation model of hydrogen production per hour in electrolytic hydrogen production, the switching operation control rules of synthetic ammonia, the dynamic operation model of hydrogen storage system, and the operation constraint model of electrochemical energy storage system, a load regulation constraint mechanism for the entire wind-solar-hydrogen-ammonia system is constructed to achieve coordinated matching between electrical energy, hydrogen energy and load demand within the entire wind-solar-hydrogen-ammonia system under fluctuating wind and solar power output. Input the predicted power output of the wind and solar power generation system and the load demand boundary conditions of the ammonia synthesis system within the future forecast period, and establish a future preset time power adjustment mechanism for adjusting the load rate of the ammonia synthesis system; based on the load regulation constraint mechanism and the future preset time power adjustment mechanism, establish a forward-looking load regulation mechanism for adjusting the operating status of the entire wind-solar-hydrogen-ammonia system in advance; wherein, the duration of the forecast period is 4 to 72 hours. The forward-looking load regulation mechanism is introduced into the two-way coupling mechanism consisting of the upper-level capacity configuration optimization model and the lower-level rolling scheduling optimization model. The capacity configuration and scheduling optimization of the entire wind-solar-hydrogen-ammonia system are iteratively updated. The capacity parameters and operating parameters of the wind-solar power generation system, electrolytic hydrogen production system, hydrogen storage system, electrochemical energy storage system and ammonia synthesis system are used as decision variables until the target minimization optimization function in the upper-level capacity configuration optimization model converges. Output the optimal capacity configuration and scheduling results that satisfy the operational constraints of the entire wind, solar, hydrogen, and ammonia system.

[0043] As a specific implementation method, obtaining the wind and solar power output of the wind and solar power generation system within the scheduling period specifically includes: Step S11: Set t as the hour level, and collect the historical per-unit output power of wind farms and photovoltaic power stations of the wind-solar power generation system with t as the time node, and obtain the historical per-unit output power P of wind farms in time t. wt,pu,hist [t] and the historical per-unit output power P of the photovoltaic power station pv,pu,hist [t]; Step S12: Calculate the predicted power output of the wind farm and photovoltaic power station during time period t based on the historical per-unit power output of the wind farm and photovoltaic power station during time period t. The formula for calculating the predicted power output of a wind farm is as follows: P wt,pre [t]=P wt,pu,hist [t]•C wt The formula for calculating the predicted output power of a photovoltaic power plant is as follows: P pv,pre [t]=P pv,pu,hist [t]•C pv Among them, P wt,pre [t] and P pv,pre [t] represents the predicted power output of the wind farm and the photovoltaic power station at time t, respectively. wt,pu,hist [t] and P pv,pu,hist [t] represents the historical per-unit output power of the wind farm and photovoltaic power station during time period t, respectively. wt and C pv These represent the installed capacity of wind farms and photovoltaic power plants, respectively. Step S13: Calculate the actual power output of the wind farm and photovoltaic power station during time period t based on the predicted power output of the wind farm and photovoltaic power station during time period t. The formula for calculating the actual output power of a wind farm is as follows: P wt [t]=P wt,pre [t] •β wt [t] The formula for calculating the actual output power of a photovoltaic power station is: P pv [t]=P pv,pre [t] •β pv [t] Among them, P wt [t] and P pv [t] represents the actual power output of the wind farm and the photovoltaic power station during time period t, respectively, β wt [t] and β pv [t] represents the actual power output coefficient of wind farms and photovoltaic power plants, respectively; Step S14: Calculate the wind and solar power output of the wind and solar power generation system during time period t based on the actual power output of the wind farm and photovoltaic power station during time period t. The formula for calculating the wind and solar power output of the wind and solar power generation system during time period t is as follows: P total [t]=P wt [t]+ P pv [t] Among them, P total [t] represents the wind and solar power output of the wind and solar power generation system during time period t, and is used as the scheduling boundary condition for subsequent steps.

[0044] It is understandable that the predicted power output obtained in step S1 can be obtained through various methods, including but not limited to: physical models based on numerical weather prediction, statistical models based on historical data, and intelligent prediction models based on machine learning, such as LSTM neural networks and GRU networks. The frequency of obtaining the predicted power output also needs to match the scheduling cycle, updating it periodically, every hour, or every two hours to ensure the timeliness of scheduling decisions.

[0045] Due to their thermodynamic and kinetic characteristics, ammonia synthesis reactors cannot achieve rapid adjustments on a second or minute basis like electrolyzers. However, they possess a certain range of hourly adjustment capabilities, meaning the ammonia synthesis system can operate within 30%-100% of its rated load, with an hourly load change rate not exceeding 60 percentage points. Therefore, to quantify these constraints, a load adjustment constraint model with t as the basic scheduling cycle needs to be established. The constraint conditions must be determined based on the specific design parameters and operating experience of the ammonia synthesis process, and may vary depending on the scale and technology of the ammonia synthesis system. Specifically, t can be on a 1-hour or 2-hour scale, etc.

[0046] As a specific implementation method, a synthesis ammonia switching operation control rule for characterizing the operation of the synthesis ammonia system is constructed based on the first energy flow coupling relationship, specifically including: Step S211: Based on the power tracking control strategy of source following load, the load rate of the synthetic ammonia system in time period t is obtained according to the wind and solar power output of the wind and solar power generation system in time period t. The load rate of the synthetic ammonia system in time period t is defined as the ratio of the wind and solar power output to the comprehensive rated equivalent power of the synthetic ammonia system. This load rate represents the theoretical maximum operable load ratio of the synthetic ammonia system under the current wind and solar resource conditions. The formula for calculating the load rate of the ammonia synthesis system during time period t is as follows:

[0047] in, This represents the wind and solar power output of the wind and solar power generation system during time period t. Represents the overall rated equivalent electrical power of the ammonia synthesis system; This represents the load rate of the ammonia synthesis system during time period t. The core of this step lies in accurately characterizing the load regulation capability of the ammonia synthesis system process, integrating the characteristics of the chemical process into the key link of power system optimization and dispatch.

[0048] The calculation method for the comprehensive rated equivalent electrical power of the ammonia synthesis system is as follows: = +

[0049] in, This represents the rated electrical power of the ammonia synthesis system; This represents the rated electrical power required for the electrolytic hydrogen production process to consume the rated amount of hydrogen in the ammonia synthesis system. The formula for calculating the rated electrical power of the ammonia synthesis system is as follows:

[0050] in, The annual production capacity of the ammonia synthesis system is expressed in tons per year. This represents the rated hourly production load of the ammonia synthesis system. This represents the unit power consumption of the ammonia synthesis system, expressed in kilowatt-hours per ton. The function's purpose is to ensure that the load commands generated by the optimized scheduling scheme remain within the executable range of the ammonia synthesis process, preventing production interruptions or equipment damage caused by scheduling schemes deviating from reality. Simultaneously, it ensures that the scheduling cycle matches the chemical load adjustment cycle, achieving coordination between power-side fluctuations and chemical-side responses.

[0051] Step S212: Apply the following limitations to the load rate operating constraint range of the ammonia synthesis system during time period t: 0.3≤ ≤1.1 and | |≤0.6; That is, the load rate of the ammonia synthesis system must be maintained between 30% and 110% of the rated power of the ammonia synthesis system. If it is below 30%, it should still be operated at 30%, and shutdown is prohibited; and the hourly load fluctuation should not exceed 60%. Furthermore, the upper limit of the ramp constraint of 0.6 is determined by the maximum hourly load change rate of the ammonia synthesis system unit, that is, 60% of the rated load / hour; this value is jointly determined by process parameters such as the thermal inertia of the reactor and the catalyst bed temperature adjustment rate in the ammonia synthesis system.

[0052] Step S213: Define three operating states of the ammonia synthesis system and represent them using binary variables; the representation of the three operating states of the ammonia synthesis system is as follows: Let L[t] represent the working state of the ammonia synthesis system, S[t] represent the hot standby state of the ammonia synthesis system, and I[t] represent the shutdown state of the ammonia synthesis system. The working state is the ammonia synthesis system operating at the corresponding load rate and consuming rated or partial electrical power and raw material hydrogen. The hot standby state is the ammonia synthesis system maintaining temperature and pressure in standby mode, consuming only a small amount of auxiliary power and not producing. The shutdown state is the ammonia synthesis system completely shut down, with both electrical power and raw material consumption being 0.

[0053] Specifically, L[t]=1 indicates that the ammonia synthesis system is in working state, and L[t]=0 indicates that the ammonia synthesis system is in non-working state; S[t]=1 indicates that the ammonia synthesis system is in hot standby state, and S[t]=0 indicates that the ammonia synthesis system is in non-hot standby state; I[t]=1 indicates that the ammonia synthesis system is in shutdown state, and I[t]=0 indicates that the ammonia synthesis system is in non-shutdown state.

[0054] Step S214: Based on the three operating states of the ammonia synthesis system, establish a mutual exclusion constraint mechanism for the operating states, a start-stop count mechanism, and a power constraint mechanism for the operating states of the ammonia synthesis system.

[0055] The method for establishing a mutual exclusion constraint mechanism for the operating states of the ammonia synthesis system based on the three operating states of the ammonia synthesis system is as follows: A mutually exclusive constraint model for operating states is established to ensure that the ammonia synthesis system is in only one state at any given time, and that state overlap is not allowed. The model is as follows: L[t]+S[t]+I[t]=1 In the formula, L[t], S[t], and I[t] represent the binary variables corresponding to the operating state of the ammonia synthesis system during time period t, respectively; The aforementioned mutually exclusive constraint mechanism for operating states ensures that the ammonia synthesis system operates in only one state. This means that when the ammonia synthesis system is in a hydrogen-producing state (electrolysis power operation, consuming electricity), its standby state is a non-hydrogen-producing state where the equipment is kept in hot standby and can be quickly started; the idle state is a state where the equipment is completely shut down and powered off, with no energy output. These three operating states are always mutually exclusive, and the system is in only one operating state at any given time.

[0056] The method for establishing a statistical mechanism for the number of start-ups and shutdowns of an ammonia synthesis system based on the three operating states of the system is as follows: A valid start-up action is triggered only when the operating state of the ammonia synthesis system changes from non-working to working; a valid shutdown action is triggered only when the operating state of the ammonia synthesis system changes from working to non-working; when L[t-1]=0 and L[t]=1, it is counted as a start-up event; when L[t-1]=1 and L[t]=0, it is counted as a shutdown event; the number of start-ups and shutdowns Y is set to be used to count start-ups and shutdowns throughout the entire cycle; and the number of start-ups and shutdowns Y is included in the target penalty item to reduce equipment wear.

[0057] The method for establishing the operating state power constraint mechanism of the ammonia synthesis system based on the three operating states of the ammonia synthesis system is as follows: When S[t]=1, =P standby ; When I[t]=1, =0; in, P represents the rated electrical power of the ammonia synthesis system. standby This represents the electrical power of the ammonia synthesis system in hot standby mode.

[0058] As a specific implementation method, a time-by-time hydrogen production calculation model for electrolytic hydrogen production is constructed based on the second energy flow coupling relationship to characterize the hydrogen production process of the electrolytic hydrogen production system. Specifically, it includes: Step S221: Based on the wind and solar power output of the wind and solar power generation system during time period t, establish a power constraint model between the wind and solar power output and the electrolysis hydrogen production system. The power constraint model for the electrolytic hydrogen production system employs the following constraint method:

[0059] In the formula, The real-time hydrogen production power of the electrolysis hydrogen production system during time period t. This represents the rated power of the electrolysis hydrogen production system. This represents the wind and solar power output of the wind and solar power generation system during time period t. [t] represents the real-time power of the ammonia synthesis system during time period t; 1.1 is the maximum allowable overload rate coefficient of the electrolytic hydrogen production system, which corresponds to 110% of the rated power of the electrolytic hydrogen production system.

[0060] The rated power of the electrolytic hydrogen production system is: =

[0061] In the formula, This represents the annual production capacity of the electrolysis hydrogen production system, expressed in standard cubic meters per hour. This refers to the unit power consumption of the electrolytic hydrogen production system, expressed in kilowatt-hours per standard cubic meter (Nm³). 3 / kWh is used to characterize the volume of standard-state hydrogen that can be produced by an electrolysis hydrogen production system for every 1kWh of electricity consumed; Step S222: Establish a time-by-time hydrogen production calculation model for the electrolytic hydrogen production system using the real-time operating hydrogen production power of the electrolytic hydrogen production system; wherein, the calculation method for the time-by-time hydrogen production calculation model of the electrolytic hydrogen production system is as follows: =

[0062] In the formula, This represents the hydrogen production output of the electrolysis hydrogen production system during time period t. This represents the hydrogen production power of the electrolysis hydrogen production system during time period t.

[0063] Due to process constraints, the ammonia synthesis system can only adjust its load on an hourly basis, resulting in a significant time-scale mismatch between the power supply and load sides. Relying solely on a single buffering method, such as using only hydrogen storage tanks, may be insufficient to respond to short-term, drastic fluctuations in wind and solar power; conversely, relying solely on energy storage batteries may be inadequate for sustained periods of low wind and solar power output. Therefore, establishing a dynamic operation model for the hydrogen storage system and an operational constraint model for the electrochemical energy storage system aims to resolve the contradiction between wind and solar power volatility and the stability of the ammonia synthesis load. By constructing a multi-time-scale buffering mechanism, stable system operation can be achieved.

[0064] As a specific implementation method, a dynamic operation model for a hydrogen storage system is constructed based on the third energy flow coupling relationship to characterize the dynamic balance of hydrogen supply and demand. This model specifically includes: Step S231: Using the hydrogen production rate of the electrolytic hydrogen production system during time period t, the real-time hydrogen requirement of the ammonia synthesis system, and the hydrogen storage capacity of the hydrogen storage system in the previous time period t, establish a dynamic coupling boundary constraint model of the hydrogen production-storage-use three-terminals for the hydrogen storage system's charging flow rate. Calculate the hydrogen charging flow rate of the hydrogen storage system during time period t using this model. The dynamic coupling boundary constraint model of the hydrogen production-storage-use three-terminals is as follows: =min

[0065] In the formula, The hydrogen flow rate of the hydrogen storage system during time period t represents the hydrogen charging flow rate of the hydrogen storage system. This represents the maximum hydrogen storage capacity of the hydrogen storage system. This represents the hydrogen storage capacity of the hydrogen storage system from the previous time period t. This represents the hydrogen production output of the electrolysis hydrogen production system during time period t. This represents the real-time hydrogen requirement of the ammonia synthesis system during time period t. This represents the quantity efficiency of the hydrogen charging process; the hydrogen charging process of the hydrogen storage system is triggered only when the hydrogen production of the electrolytic hydrogen production system is higher than the real-time hydrogen requirement of the ammonia synthesis system.

[0066] The real-time hydrogen requirement of the ammonia synthesis system during time period t is: =

[0067] In the formula, This represents the load rate of the ammonia synthesis system during time period t. This represents the rated electrical power required for the electrolysis of hydrogen to produce the rated amount of hydrogen needed for the ammonia synthesis system. The unit product power consumption of the electrolytic hydrogen production system is expressed in kilowatt-hours per ton. Step S232: Calculate the difference between the real-time hydrogen demand of the ammonia synthesis system and the hydrogen production of the electrolytic hydrogen production system during time period t. Based on the difference in hydrogen production and the hydrogen storage capacity of the hydrogen storage system in the previous time period t, establish a three-terminal dynamic coupling constraint model of insufficient hydrogen production, hydrogen demand, and hydrogen storage capacity for the hydrogen release flow rate of the hydrogen storage system. Use this three-terminal dynamic coupling constraint model to calculate the hydrogen release flow rate of the hydrogen storage system during time period t. The three-terminal dynamic coupling constraint model of insufficient hydrogen production, hydrogen demand, and hydrogen storage capacity is as follows: =min

[0068] In the formula, This represents the hydrogen release flow rate of the hydrogen storage system during time period t. This represents the hydrogen storage capacity of the hydrogen storage system in the previous time period t. This represents the quantity efficiency of the hydrogen release process. The difference between the real-time hydrogen demand of the ammonia synthesis system and the hydrogen production of the electrolytic hydrogen production system during time period t is used. The hydrogen release process of the hydrogen storage system is triggered only when the hydrogen production of the electrolytic hydrogen production system is lower than the hydrogen demand of the ammonia synthesis system.

[0069] Step S233: Based on the obtained hydrogen charging flow rate and hydrogen discharging flow rate of the hydrogen storage system during time period t, and combined with the hydrogen storage capacity of the hydrogen storage system in the previous time period, calculate the hydrogen storage capacity of the hydrogen storage system during time period t; the calculation method for the hydrogen storage capacity is as follows:

[0070] In the formula, This represents the hydrogen storage capacity of the hydrogen storage system during time period t. This represents the hydrogen storage capacity of the hydrogen storage system in the previous time period (t). The hydrogen flow rate of the hydrogen storage system during time period t represents the hydrogen charging flow rate of the hydrogen storage system. This represents the hydrogen release flow rate of the hydrogen storage system during time period t. and These represent the quantity efficiency of the hydrogen charging / decharging process, respectively.

[0071] Step S234: Based on the hydrogen production of the electrolytic hydrogen production system during time period t and the hydrogen release flow rate of the hydrogen storage system during time period t, establish a hydrogen supply guarantee constraint and penalty mechanism for the ammonia synthesis system; the constraint method of the hydrogen supply guarantee constraint and penalty mechanism is as follows: +

[0072] In the formula, This represents the real-time hydrogen requirement of the ammonia synthesis system during time period t. This represents the hydrogen production output of the electrolysis hydrogen production system during time period t. The hydrogen release flow rate of the hydrogen storage system during time period t represents the hydrogen release flow rate during time period t. When this constraint cannot be met, a hydrogen supply shortage penalty mechanism is triggered: the load rate x[t] of the ammonia synthesis system is reduced to a level that meets the hydrogen supply constraint; if the load rate is reduced to the minimum stable load rate of 0.3 and still cannot meet the constraint, the ammonia synthesis system is forced to switch out of operation (L[t]=0), and an unplanned shutdown event is recorded. This event will be quantified and penalized in the objective function of step S52 by the penalty coefficient λ4.

[0073] If the hydrogen supply guarantee constraint and penalty mechanism model of the ammonia synthesis system cannot be met when the ammonia synthesis system is in operation, then the ammonia synthesis system must be set to a non-operational state or the load rate of the ammonia synthesis system must be reduced until the requirement is met.

[0074] As a specific implementation method, the electrochemical energy storage system operation constraint model based on the fourth energy flow coupling relationship to characterize the energy storage and release process specifically includes: Step S241: Establish the rated energy storage capacity function of the electrochemical energy storage system; the rated energy storage capacity function of the electrochemical energy storage system is: =

[0075] In the formula, This refers to the rated energy storage capacity of the electrochemical energy storage system. Represents the rated power of the electrochemical energy storage system. This represents the rated energy storage duration of the electrochemical energy storage system; Step S242: Based on the wind and solar power output of the wind and solar power generation system during time period t, the rated energy storage capacity of the electrochemical energy storage system, and the rated power of the electrochemical energy storage system, establish a dynamic matching model for the charging power of the electrochemical energy storage system; the dynamic matching model for the charging power of the electrochemical energy storage system is as follows: =min

[0076] In the formula, This represents the charging power of the electrochemical energy storage system during time period t. This represents the stored energy of the electrochemical energy storage system in the previous time period t. This represents the wind and solar power output of the wind and solar power generation system during time period t. This represents the rated electrical power of the ammonia synthesis system during time period t. The hydrogen production power of the electrolytic hydrogen production system during time period t; 0.95 represents the charging efficiency of the electrochemical energy storage system; 0.95 is the maximum allowable depth of charge coefficient of the electrochemical energy storage system, corresponding to 95% of the rated energy storage capacity of the electrochemical energy storage system; the electrochemical energy storage system is only triggered to charge when the available output of wind and solar power combined is higher than the comprehensive equivalent power of the ammonia synthesis system.

[0077] Step S243: Based on the wind and solar power output of the wind and solar power generation system during time period t, the rated energy storage capacity of the electrochemical energy storage system, and the rated power of the electrochemical energy storage system, establish a power consumption matching constraint model for the discharge power of the electrochemical energy storage system; the power consumption matching constraint model is as follows: =min

[0078] In the formula, Represents the discharge power of the electrochemical energy storage system during time period t. Represents the discharge efficiency of an electrochemical energy storage system. This represents the stored energy of the electrochemical energy storage system in the previous time period t. This refers to the rated energy storage capacity of the electrochemical energy storage system. Represents the rated power of the electrochemical energy storage system. This represents the overall equivalent electrical power of the ammonia synthesis system during time period t. The wind and solar power output of the system during time period t represents the total power output of the wind and solar power generation system. 0.05 is the maximum allowable depth of discharge coefficient for the electrochemical energy storage system, corresponding to 5% of the rated energy storage capacity of the electrochemical energy storage system. The electrochemical energy storage system is only triggered to discharge when the wind and solar power output time series data is lower than the comprehensive rated equivalent power of the ammonia synthesis system.

[0079] Step S244: Based on the discharge power and charging power of the electrochemical energy storage system during time period t, establish the dynamic equation for the energy storage capacity of the electrochemical energy storage system; the calculation method for the dynamic equation for the energy storage capacity is as follows:

[0080] In the formula, This represents the energy stored in the electrochemical energy storage system during time period t. This represents the stored energy of the electrochemical energy storage system in the previous time period (t). This represents the charging power of the electrochemical energy storage system during time period t. Represents the discharge power of the electrochemical energy storage system during time period t. and These represent the charging efficiency and discharging efficiency of the electrochemical energy storage system at time t, respectively. Step S245: Based on the discharge power and charging power of the electrochemical energy storage system during time period t, establish a charge-discharge mutual exclusion constraint for the electrochemical energy storage system; the method of the charge-discharge mutual exclusion constraint is as follows: • =0 In the formula, This represents the charging power of the electrochemical energy storage system during time period t. This represents the discharge power of the electrochemical energy storage system during time period t.

[0081] This method employs a hydrogen-electricity combined buffering scheme, where the two systems work synergistically and complement each other's advantages. The buffering ratio is dynamically allocated based on the real-time matching degree between wind and solar power output and the ammonia synthesis system load. When the predicted wind and solar power output is higher than the ammonia synthesis system load rate, the system is in an energy surplus state. In this case, the faster-responding electrochemical energy storage system is prioritized for charging to absorb the instantaneous excess power. When the charging amount exceeds the allowable energy storage range of the electrochemical energy storage system, the excess is used for electrolysis to produce hydrogen, converting electrical energy into hydrogen energy for storage in the hydrogen storage system. When the predicted wind and solar power output is lower than the ammonia synthesis system load, the ammonia synthesis system is in an energy deficit state. In this case, the hydrogen storage system is prioritized to supply the hydrogen gap, leveraging its high energy density advantage. If the hydrogen storage system's hydrogen supply is insufficient, the electrochemical energy storage system discharges to supplement hydrogen production, utilizing its rapid response characteristics to fill the instantaneous gap.

[0082] As a specific implementation method, the implementation method for constructing a load regulation constraint mechanism for the entire wind-solar-hydrogen-ammonia system specifically includes: Step S31: Based on the wind and solar power output of the wind and solar power generation system during time period t, the discharge power of the electrochemical energy storage system during time period t, and the power purchased from the grid during time period t, establish the energy balance equation for the entire wind-solar-hydrogen-ammonia system; the energy balance equation is as follows:

[0083] In the formula, This represents the wind and solar power output of the wind and solar power generation system during time period t. Represents the discharge power of the electrochemical energy storage system during time period t. This represents the power purchased from the grid during time period t; This represents the real-time power of the ammonia synthesis system during time period t. The hydrogen production power of the electrolytic hydrogen production system during time period t. This represents the charging power of the electrochemical energy storage system during time period t. This represents the power sold to the grid during time period t; Furthermore, based on the wind and solar power output of the wind and solar power generation system during time period t, the following constraints are applied to the logical scheduling rules for the surplus power scenario of the entire wind-solar-hydrogen-ammonia system: [t]>1.1• ; in, [t] represents the comprehensive rated equivalent electrical power of the ammonia synthesis system during time period t, expressed as: = [t]+ [t] In the formula, [t] represents the real-time power of the ammonia synthesis system at time t; [t] represents the hydrogen production power of the electrolysis hydrogen production system during time period t; Step S32: When the wind and solar power output of the wind and solar power generation system still has surplus power after satisfying the real-time power of the ammonia synthesis system, the hydrogen production power of the electrolytic hydrogen production system, the real-time charging power of the electrochemical energy storage system, and the power sold to the grid during time period t, a power curtailment constraint model for the wind and solar power generation system under the surplus power scenario is established based on the wind and solar power output of the wind and solar power generation system, the real-time power of the ammonia synthesis system, the hydrogen production power of the electrolytic hydrogen production system, the real-time charging power of the electrochemical energy storage system, and the power sold to the grid during time period t. The calculation method of the power curtailment constraint model is as follows:

[0084] In the formula, This represents the amount of power curtailed by the wind and solar power generation system during time period t. This represents the charging efficiency of the electrochemical energy storage system during time period t. Furthermore, based on the wind and solar power output of the wind and solar power generation system during time period t, the following constraints are applied to the logical scheduling rules for the entire wind-solar-hydrogen-ammonia system under a power shortage scenario: <0.3•

[0085] This means that priority will be given to ensuring the hydrogen and electricity needs of the entire wind, solar, hydrogen, and ammonia system by relying on hydrogen storage and release; if hydrogen storage is insufficient, it will be supplemented by the discharge of the electrochemical energy storage system, and the remaining energy will be supplemented by purchasing electricity from the grid after the storage is exhausted; under off-grid conditions, the ammonia synthesis system will be forcibly locked at 30% of the minimum stable load power, and shutdown will be considered when the power is lower than 30% of the minimum load requirement. Step S33: Set the normal range logic range of the ammonia synthesis system to meet the logic scheduling rules of the entire wind-solar-hydrogen-ammonia system under surplus power or power shortage scenarios; the normal range logic range is 0.3. ≤ ≤1.1• .

[0086] As a specific implementation method, an implementation method for establishing a future preset time power adjustment mechanism for adjusting the load rate of ammonia synthesis systems specifically includes: Step S41: Input the predicted power output of the wind and solar power generation system and the load operation boundary of the entire wind-solar-hydrogen-ammonia system within the future prediction period. The prediction period is preferably 4-72 hours. The load operation boundary conditions of the entire wind-solar-hydrogen-ammonia system include the upper and lower limits of the load rate of the ammonia synthesis system, the mutual exclusion boundary of the operating states between the systems, the energy consumption parameter boundary between the electrolytic hydrogen production system and the ammonia synthesis system, the constraint boundary of the number of start-ups and shutdowns of the ammonia synthesis system, and the load boundary of the hydrogen supply matching of the ammonia synthesis system. The upper and lower limits of the load rate of the ammonia synthesis system are 30% to 110% of the design load of the ammonia synthesis system. The mutual exclusion boundary of the operating states between the systems means that the logic conflict of "the ammonia synthesis system continues to produce but the hydrogen supply is interrupted" is not allowed at the same time. The charging and discharging states of the hydrogen storage system are mutually exclusive, and the charging and discharging states of the energy storage system are mutually exclusive. As the energy input end, the power generation state of the wind and solar power generation system depends on wind resources and sunlight conditions. It does not have mutual exclusion constraints of charging / discharging or start-up / shutdown and does not participate in the above-mentioned mutual exclusion logic of operating states. The energy consumption parameter boundaries between the electrolysis hydrogen production system and the ammonia synthesis system are as follows: the unit product power consumption of the electrolysis hydrogen production system is 5.0~5.5 kWh / Nm³, which includes the power consumption of auxiliary systems; and a single electrolysis cell can operate within the range of 30%~110% of its rated power, or it can be shut down; the comprehensive power consumption of the ammonia synthesis system is approximately 7.7~10.1 kWh / kgNH3; the start-up and shutdown frequency constraint boundary of the ammonia synthesis system is that the start-up and shutdown frequency of the ammonia synthesis system is limited by the thermal fatigue life of the equipment. Under off-grid conditions, the cumulative number of start-ups and shutdowns per year should not exceed 10 times in principle. If the project adopts a grid-connected power supply scheme, the grid side must ensure the reliability of power supply to ensure that the ammonia synthesis system does not experience unplanned start-ups and shutdowns due to power-side reasons throughout the year; the hydrogen supply matching load boundary of the ammonia synthesis system is that the amount of hydrogen required for the production of the ammonia synthesis system is matched with a constraint of approximately 2000 Nm³ / tNH3.

[0087] Step S42: Calculate the cumulative power shortage E of the entire wind-solar-hydrogen-ammonia system within the forecast period of 4-72 hours. gap ; Step S43: Preset a fixed cumulative power shortage threshold E gap,lim If E gap ≥E gap,lim If the system is deemed to have insufficient medium- to long-term power supply capacity for the entire wind-solar-hydrogen-ammonia system, the load rate of the synthetic ammonia system will be forcibly reduced to the minimum stable load rate of 30%.

[0088] By proactively reducing the rigid load on the ammonia side, the source-load mismatch contradiction is mitigated, and the system's redundant surplus power is directed to hydrogen electrolysis for production and storage, as well as energy storage charging and reserves, thereby enhancing the energy security of the hydrogen production and ammonia synthesis system during subsequent low-output periods.

[0089] As a specific implementation method, the upper-layer capacity configuration optimization model is set up as follows: based on the initial total investment, operation and maintenance costs, and system energy consumption costs, with the minimization of the total life cycle ammonia cost (LCOA) as the optimization objective, an LCOA target minimization optimization function is established; and the LCOA target minimization optimization function is set as the upper-layer capacity configuration optimization model. The LCOA objective minimization optimization function is:

[0090] in, c represents the initial total investment, and c represents the year. This represents the maintenance cost in year c. Let the system energy consumption cost be in year c. / Let the power grid purchase and sale cost / revenue be in year c. Let r be the estimated ammonia production in year c, r be the discount rate, and N be the total project lifecycle. The lower-level rolling scheduling optimization model is configured as follows: Based on the full life cycle ammonia cost, wind and solar curtailment rate, and number of start-ups and shutdowns of the ammonia synthesis system, a comprehensive optimization function is constructed with the goal of minimizing system operating costs, maximizing new energy consumption rate, and ensuring stable operation of the ammonia synthesis unit. The comprehensive optimization function is then used to establish a lower-level rolling scheduling optimization model. The objective comprehensive optimization function is: λ1LCOA+λ2•Wind and Solar Curtailment Rate+λ3•Y Wherein, λ1, λ2, and λ3 are weighted penalty coefficients, LCOA represents the total life cycle ammonia cost, and Y represents the number of start-ups and shutdowns of the ammonia synthesis system throughout the entire cycle; it is used to coordinate and balance the system's economic efficiency, new energy absorption capacity, and equipment operation stability; the model uses the system's energy balance relationship, the operating output boundary of each device, load supply and demand matching, and other conditions as global constraints, and solves the problem to obtain the hourly optimal scheduling scheme under multi-objective equilibrium.

[0091] Among them, the curtailment rate of wind and solar power is: =

[0092] in, Indicates the curtailment rate of wind and solar power. This represents the amount of power curtailed by the wind and solar power generation system during time period t. This represents the wind and solar power output of the wind and solar power generation system during time period t.

[0093] The decision variables include the installed capacity C of the wind farm. wt The installed capacity C of photovoltaic power stations pv Annual production scale of electrolysis hydrogen production system Maximum hydrogen storage capacity of hydrogen storage system Rated energy storage capacity of electrochemical energy storage system Annual production scale of the ammonia synthesis system At least one or more of the following.

[0094] By establishing a two-way coupling mechanism between the upper-level capacity configuration optimization model and the lower-level rolling scheduling optimization model, and setting the installed capacity C of the wind farm... wt The installed capacity C of photovoltaic power stations pv Annual production scale of electrolysis hydrogen production system Maximum hydrogen storage capacity of hydrogen storage system Rated energy storage capacity of electrochemical energy storage system Annual production scale of the ammonia synthesis system These are decision variables.

[0095] The upper-level capacity configuration optimization model transmits capacity configuration constraints for wind and solar power, electrolyzers, energy storage, hydrogen storage, and ammonia synthesis units to the lower-level rolling scheduling optimization model. The lower-level rolling scheduling optimization model feeds back operational indicators such as system LCOA, renewable energy absorption rate, and number of ammonia synthesis unit shutdowns to the upper-level capacity configuration optimization model. In other words, the upper-level capacity configuration optimization model and the lower-level rolling scheduling optimization model are iteratively updated until the objective function converges, thereby achieving coordinated optimization of capacity configuration and operation scheduling.

[0096] In traditional methods, capacity allocation is typically based on long-term statistical data for static optimization to determine the scale of equipment such as wind and solar power plants, electrolyzers, and hydrogen storage; while operation scheduling is optimized in the short term under a given capacity. These two processes are independent, leading to situations where the capacity allocation results may be difficult to achieve in actual scheduling, or the scheduling scheme may be limited by the capacity allocation and fail to reach its optimal state. This invention breaks through the traditional "configure first, then schedule" separation model, establishing a bidirectional coupled optimization framework for capacity allocation and operation scheduling, with bidirectional coupling achieved through information exchange between the two layers.

[0097] The two-way coupling is manifested in the following ways: the upper-level capacity configuration optimization model transmits equipment capacity constraints to the lower-level rolling scheduling optimization model, limiting the feasible domain of scheduling optimization; the lower-level rolling scheduling optimization model feeds back scheduling feasibility indicators to the upper-level capacity configuration optimization model, reflecting the performance of the current capacity scheme in actual operation. If the number of outages or the wind and solar power absorption rate reported by the lower-level rolling scheduling optimization model is too high, the upper-level capacity configuration optimization model will adjust the capacity configuration in the next iteration, such as increasing hydrogen storage capacity or optimizing the wind and solar power ratio, until the solution that comprehensively optimizes capacity configuration and scheduling performance is found. This two-way coupling mechanism ensures that the capacity configuration scheme is not only optimal in terms of economy, but also has good operability and stability in actual scheduling.

[0098] As a specific implementation method, a multi-scale fine-grained verification mechanism is employed to iteratively solve and verify the accuracy of the collaborative optimization model, outputting the optimal capacity configuration and scheduling operation results of the wind-solar-hydrogen-ammonia synthesis system. Specifically, the upper-level capacity configuration optimization model and the lower-level rolling scheduling optimization model, after establishing a two-way coupling mechanism, are solved according to the process of initializing the capacity population, executing annual scheduling, calculating fitness, and iteratively optimizing; the optimal capacity configuration, hourly scheduling strategy, LCOA, wind-solar integration rate, annual equipment utilization hours, and typical daily power flow diagram are output.

[0099] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for hourly joint optimization of capacity and scheduling of a wind-solar-hydrogen-ammonia system, wherein the wind-solar-hydrogen-ammonia system includes a wind-solar power generation system, an electrolytic hydrogen production system, an ammonia synthesis system, a hydrogen storage system, and an electrochemical energy storage system, characterized in that, The hourly joint optimization method for capacity and scheduling includes the following steps: Using hourly time steps, the wind and solar power output of the wind and solar power generation system within the scheduling cycle is obtained, and based on the wind and solar power output, a first energy flow coupling relationship is established between the wind and solar power generation system and the ammonia synthesis system, a second energy flow coupling relationship is established between the wind and solar power generation system and the electrolytic hydrogen production system, a third energy flow coupling relationship is established between the wind and solar power generation system and the hydrogen storage system, and a fourth energy flow coupling relationship is established between the wind and solar power generation system and the electrochemical energy storage system. Based on the first energy flow coupling relationship, the second energy flow coupling relationship, the third energy flow coupling relationship, and the fourth energy flow coupling relationship, respectively construct the ammonia switching operation control rule for characterizing the operation of the ammonia synthesis system, the electrolytic hydrogen production calculation model for characterizing the hydrogen production process of the electrolytic hydrogen production system, the dynamic operation model of the hydrogen storage system for characterizing the dynamic balance of hydrogen supply and demand, and the operation constraint model of the electrochemical energy storage system for characterizing the energy storage and release process. Based on the calculation model of hydrogen production per hour in electrolytic hydrogen production, the control rules for switching operation of synthetic ammonia, the dynamic operation model of hydrogen storage system, and the operation constraint model of electrochemical energy storage system, a load regulation constraint mechanism for the entire wind-solar-hydrogen-ammonia system is constructed to achieve coordinated matching between electrical energy, hydrogen energy, and load demand within the entire wind-solar-hydrogen-ammonia system under fluctuating wind and solar power output conditions. Input the predicted wind and solar power output of the wind and solar power generation system within the future prediction period and the load demand boundary conditions of the entire wind-solar-hydrogen-ammonia system to establish a future preset time power adjustment mechanism for adjusting the load rate of the ammonia synthesis system; based on the load adjustment constraint mechanism and the future preset time power adjustment mechanism, establish a forward-looking load adjustment mechanism for adjusting the operating status of the entire wind-solar-hydrogen-ammonia system in advance; the duration of the prediction period is 4 to 72 hours. The aforementioned forward-looking load regulation mechanism is introduced into a two-way coupling mechanism consisting of an upper-level capacity configuration optimization model and a lower-level rolling scheduling optimization model. This mechanism iteratively updates the capacity configuration and scheduling optimization of the entire wind-solar-hydrogen-ammonia system. The capacity parameters and operating parameters of the wind-solar power generation system, electrolytic hydrogen production system, hydrogen storage system, electrochemical energy storage system, and ammonia synthesis system are used as decision variables until the objective minimization optimization function within the upper-level capacity configuration optimization model converges. Output the optimal capacity configuration and scheduling results that satisfy the operational constraints of the entire wind, solar, hydrogen, and ammonia system.

2. The hourly joint optimization method for capacity and scheduling of a wind-solar-hydrogen-ammonia system according to claim 1, characterized in that, The acquisition of wind and solar power output of the wind and solar power generation system within the scheduling period specifically includes: Step S11: Set t as the hour level, and collect the historical per-unit output power of wind farms and photovoltaic power stations of the wind-solar power generation system with t as the time node, and obtain the historical per-unit output power P of wind farms in time t. wt,pu,hist [t] and the historical per-unit output power P of the photovoltaic power station pv,pu,hist [t]; Step S12: Calculate the predicted power output of the wind farm and photovoltaic power station during time period t based on the historical per-unit power output of the wind farm and photovoltaic power station during time period t. The formula for calculating the predicted power output of a wind farm is as follows: P wt,pre [t]=P wt,pu,hist [t]•C wt The formula for calculating the predicted output power of a photovoltaic power plant is as follows: P pv,pre [t]=P pv,pu,hist [t]•C pv Among them, P wt,pre [t] represents the predicted power output of the wind farm at time t, P pv,pre [t] represents the predicted power output of the photovoltaic power station during time period t, P wt,pu,hist [t] represents the historical per-unit output power of the wind farm during time period t, P pv,pu,hist [t] represents the historical per-unit output power of the photovoltaic power station during time period t, C wt C represents the installed capacity of the wind farm. pv The installed capacity of the photovoltaic power station; Step S13: Calculate the actual power output of the wind farm and photovoltaic power station during time period t based on the predicted power output of the wind farm and photovoltaic power station during time period t. The formula for calculating the actual output power of a wind farm is as follows: P wt [t]=P wt,pre [t] •β wt [t] The formula for calculating the actual output power of a photovoltaic power station is: P pv [t]=P pv,pre [t] •β pv [t] Among them, P wt [t] represents the actual power output of the wind farm during time period t, P pv [t] represents the actual output power of the photovoltaic power station during time period t, β wt [t] represents the actual power output coefficient of the wind farm; β pv [t] represents the actual output power coefficient of the photovoltaic power station; Step S14: Calculate the wind and solar power output of the wind and solar power generation system during time period t based on the actual power output of the wind farm and photovoltaic power station during time period t. The formula for calculating the wind and solar power output of the wind and solar power generation system during time period t is as follows: P total [t]=P wt [t]+ P pv [t] Among them, P total [t] represents the wind and solar power output of the wind and solar power generation system during time period t.

3. The hourly joint optimization method for capacity and scheduling of a wind-solar-hydrogen-ammonia system according to claim 2, characterized in that, The ammonia switching operation control rules, constructed based on the first energy flow coupling relationship to characterize the operation of the ammonia synthesis system, specifically include: Step S211: Based on the power tracking control strategy of source following load, calculate the load rate of the ammonia synthesis system in time period t according to the wind and solar power output of the wind and solar power generation system in time period t. The formula for calculating the load rate of the ammonia synthesis system during time period t is as follows: in, Let t represent the wind and solar power output of the wind and solar power generation system during time period t. This represents the overall rated equivalent electrical power of the ammonia synthesis system. The load rate of the ammonia synthesis system during time period t; The formula for calculating the comprehensive rated equivalent electrical power of the ammonia synthesis system is as follows: = + in, This refers to the rated electrical power of the ammonia synthesis system. The rated electrical power required for the electrolytic hydrogen production process to consume the rated amount of hydrogen in the ammonia synthesis system; The formula for calculating the rated electrical power of the ammonia synthesis system is as follows: in, The annual production capacity of the ammonia synthesis system is expressed in tons per year. This represents the rated hourly production load of the ammonia synthesis system. The unit product power consumption of the ammonia synthesis system is expressed in kilowatt-hours per ton. Step S212: Apply the following limitations to the load rate operating constraint range of the ammonia synthesis system during time period t: 0.3≤ ≤1.1 and | |≤0.6; Step S213: Define three operating states of the ammonia synthesis system and represent them using binary variables; the representation of the three operating states of the ammonia synthesis system is as follows: Let L[t] represent the working state of the ammonia synthesis system, let S[t] represent the hot standby state of the ammonia synthesis system, and let I[t] represent the shutdown state of the ammonia synthesis system. When L[t]=1, it indicates that the ammonia synthesis system is in a working state; when L[t]=0, it indicates that the ammonia synthesis system is in a non-working state. When S[t]=1, it indicates that the ammonia synthesis system is in a hot standby state; when S[t]=0, it indicates that the ammonia synthesis system is in a non-hot standby state. When I[t]=1, it indicates that the ammonia synthesis system is in a shutdown state; when I[t]=0, it indicates that the ammonia synthesis system is in a non-shutdown state. Step S214: Based on the three operating states of the ammonia synthesis system, establish a mutual exclusion constraint mechanism for the operating states, a start-stop count mechanism, and a power constraint mechanism for the operating states of the ammonia synthesis system.

4. The hourly joint optimization method for capacity and scheduling of a wind-solar-hydrogen-ammonia system according to claim 3, characterized in that, The method for establishing the mutual exclusion constraint mechanism for the operating states of the ammonia synthesis system based on the three operating states of the ammonia synthesis system in step S214 is as follows: L[t]+S[t]+I[t]=1 Where L[t], S[t], and I[t] represent the binary variables corresponding to the operating state of the ammonia synthesis system during time period t; The method for establishing the start-up and shutdown frequency statistics mechanism of the ammonia synthesis system based on the three operating states of the ammonia synthesis system in step S214 is as follows: A valid start-up action is triggered only when the operating state of the ammonia synthesis system changes from non-working to working; a valid shutdown action is triggered only when the operating state of the ammonia synthesis system changes from working to non-working. When L[t-1]=0 and L[t]=1, it is counted as a startup event; When L[t-1]=1 and L[t]=0, it is counted as a shutdown event; Set the number of start-stop cycles Y to perform start-stop statistics throughout the entire cycle; The method for establishing the working state power constraint mechanism of the ammonia synthesis system based on the three operating states of the ammonia synthesis system in step S214 is as follows: When S[t]=1, =P standby ; When I[t]=1, =0; in, P is the rated electrical power of the ammonia synthesis system. standby This refers to the electrical power of the ammonia synthesis system in hot standby mode.

5. The hourly joint optimization method for capacity and scheduling of a wind-solar-hydrogen-ammonia system according to claim 4, characterized in that, The time-by-time hydrogen production calculation model for the electrolytic hydrogen production process, constructed based on the second energy flow coupling relationship, specifically includes: Step S221: Based on the wind and solar power output of the wind and solar power generation system during time period t, establish a power constraint model between the wind and solar power output and the electrolysis hydrogen production system. The power constraint model for the electrolytic hydrogen production system employs the following constraint method: in, The real-time hydrogen production power of the electrolysis hydrogen production system during time period t. The rated power of the electrolysis hydrogen production system. Let t represent the wind and solar power output of the wind and solar power generation system during time period t. [t] represents the real-time power of the ammonia synthesis system during time period t; The formula for calculating the rated power of an electrolytic hydrogen production system is as follows: = in, This refers to the annual production capacity of the electrolysis hydrogen production system, expressed in standard cubic meters per hour. The unit product power consumption of the electrolytic hydrogen production system is expressed in kilowatt-hours per standard cubic meter. Step S222: Establish a time-by-time hydrogen production calculation model for the electrolytic hydrogen production system using the real-time operating hydrogen production power of the electrolytic hydrogen production system; wherein, the calculation formula for the time-by-time hydrogen production calculation model of the electrolytic hydrogen production system is: = in, The hydrogen production rate of the electrolysis hydrogen production system during time period t. Let t be the hydrogen production power of the electrolytic hydrogen production system during time period t.

6. The hourly joint optimization method for capacity and scheduling of a wind-solar-hydrogen-ammonia system according to claim 5, characterized in that, The dynamic operation model of the hydrogen storage system, constructed based on the third energy flow coupling relationship to characterize the dynamic balance of hydrogen supply and demand, specifically includes: Step S231: Using the hydrogen production rate of the electrolytic hydrogen production system during time period t, the real-time hydrogen requirement of the ammonia synthesis system, and the hydrogen storage capacity of the hydrogen storage system in the previous time period t, establish a dynamic coupling boundary constraint model of the hydrogen production-storage-use three-terminals for the hydrogen storage system's charging flow rate. Calculate the hydrogen charging flow rate of the hydrogen storage system during time period t using this model. The dynamic coupling boundary constraint model of the hydrogen production-storage-use three-terminals is as follows: =min in, The hydrogen charging flow rate of the hydrogen storage system during time period t. This represents the maximum hydrogen storage capacity of the hydrogen storage system. The hydrogen storage capacity of the hydrogen storage system is the distance from the previous time period t. The hydrogen production rate of the electrolysis hydrogen production system during time period t. This represents the real-time hydrogen requirement of the ammonia synthesis system during time period t. The quantity efficiency of the hydrogen charging process; The formula for calculating the real-time hydrogen requirement of the ammonia synthesis system during time period t is as follows: = in, The load rate of the ammonia synthesis system during time period t. The rated electrical power required for electrolytic hydrogen production to consume the rated amount of hydrogen in the ammonia synthesis system. The unit product power consumption of the electrolytic hydrogen production system is expressed in kilowatt-hours per ton. Step S232: Calculate the difference between the real-time hydrogen demand of the ammonia synthesis system and the hydrogen production of the electrolytic hydrogen production system during time period t. Based on the difference in hydrogen production and the hydrogen storage capacity of the hydrogen storage system in the previous time period t, establish a dynamic coupling constraint model of hydrogen production insufficiency, hydrogen demand, and hydrogen storage capacity for the hydrogen release flow rate of the hydrogen storage system. Use this dynamic coupling constraint model to calculate the hydrogen release flow rate of the hydrogen storage system during time period t. The dynamic coupling constraint model of hydrogen production insufficiency, hydrogen demand, and hydrogen storage capacity is as follows: =min in, The hydrogen release flow rate of the hydrogen storage system during time period t. The hydrogen storage capacity of the hydrogen storage system in the previous time period is t. This refers to the quantity efficiency of the hydrogen release process. The difference between the real-time hydrogen requirement of the ammonia synthesis system and the hydrogen production of the electrolytic hydrogen production system during time period t; Step S233: Based on the obtained hydrogen charging flow rate and hydrogen discharging flow rate of the hydrogen storage system during time period t, and combined with the hydrogen storage capacity of the hydrogen storage system in the previous time period, calculate the hydrogen storage capacity of the hydrogen storage system during time period t; the formula for calculating the hydrogen storage capacity is: in, Let t be the hydrogen storage capacity of the hydrogen storage system during time period t. The hydrogen storage capacity of the hydrogen storage system in the previous time period t; The hydrogen charging flow rate of the hydrogen storage system during time period t. The hydrogen release flow rate of the hydrogen storage system during time period t. and These are the quantity efficiencies of the hydrogen charging / discharging processes, respectively. Step S234: Based on the hydrogen production of the electrolytic hydrogen production system during time period t and the hydrogen release flow rate of the hydrogen storage system during time period t, establish a hydrogen supply guarantee constraint and penalty mechanism for the ammonia synthesis system; the constraint method of the hydrogen supply guarantee constraint and penalty mechanism is as follows: + in, This represents the real-time hydrogen requirement of the ammonia synthesis system during time period t. The hydrogen production rate of the electrolysis hydrogen production system during time period t. Let t be the hydrogen release flow rate of the hydrogen storage system during time period t.

7. The hourly joint optimization method for capacity and scheduling of a wind-solar-hydrogen-ammonia system according to claim 6, characterized in that, The electrochemical energy storage system operation constraint model based on the fourth energy flow coupling relationship to characterize the energy storage and release process specifically includes: Step S241: Establish the rated energy storage capacity function of the electrochemical energy storage system; the rated energy storage capacity function of the electrochemical energy storage system is: = in, This is the rated energy storage capacity of the electrochemical energy storage system. The rated power of the electrochemical energy storage system. This refers to the rated energy storage duration of the electrochemical energy storage system. Step S242: Based on the wind and solar power output of the wind and solar power generation system during time period t, the rated energy storage capacity of the electrochemical energy storage system, and the rated power of the electrochemical energy storage system, establish a dynamic matching model for the charging power of the electrochemical energy storage system; the dynamic matching model for the charging power of the electrochemical energy storage system is as follows: =min in, The charging power of the electrochemical energy storage system during time period t. The energy stored in the electrochemical energy storage system in the previous time period t is the energy stored in the previous time period. Let t represent the wind and solar power output of the wind and solar power generation system during time period t. The real-time power of the ammonia synthesis system during time period t. The hydrogen production power of the electrolytic hydrogen production system during time period t; The charging efficiency of electrochemical energy storage systems; Step S243: Based on the wind and solar power output of the wind and solar power generation system during time period t, the rated energy storage capacity of the electrochemical energy storage system, and the rated power of the electrochemical energy storage system, establish a power consumption matching constraint model for the discharge power of the electrochemical energy storage system; the power consumption matching constraint model is as follows: =min in, The discharge power of the electrochemical energy storage system during time period t. For the discharge efficiency of electrochemical energy storage systems, The energy stored in the electrochemical energy storage system in the previous time period t is the energy stored in the previous time period. This is the rated energy storage capacity of the electrochemical energy storage system. The rated power of the electrochemical energy storage system. The total rated equivalent electrical power of the ammonia synthesis system during time period t. The wind and solar power output of the wind and solar power generation system during time period t; Step S244: Based on the discharge power and charging power of the electrochemical energy storage system during time period t, establish the dynamic equation for the energy storage capacity of the electrochemical energy storage system; the calculation method for the dynamic equation for the energy storage capacity is as follows: in, The energy stored in the electrochemical energy storage system during time period t is the energy stored in the system. The charging power of the electrochemical energy storage system during time period t. The discharge power of the electrochemical energy storage system during time period t. and These represent the charging efficiency and discharging efficiency of the electrochemical energy storage system at time t, respectively. Step S245: Based on the discharge power and charging power of the electrochemical energy storage system during time period t, establish a charge-discharge mutual exclusion constraint for the electrochemical energy storage system; the method of the charge-discharge mutual exclusion constraint is as follows: • =0 in, The charging power of the electrochemical energy storage system during time period t. Let t be the discharge power of the electrochemical energy storage system during time period t.

8. The hourly joint optimization method for capacity and scheduling of a wind-solar-hydrogen-ammonia system according to claim 7, characterized in that, The load regulation and constraint mechanism for the entire wind-solar-hydrogen-ammonia system specifically includes: Step S31: Based on the wind and solar power output of the wind and solar power generation system during time period t, the discharge power of the electrochemical energy storage system during time period t, and the power purchased from the grid during time period t, establish the energy balance equation for the entire wind-solar-hydrogen-ammonia system; the energy balance equation is as follows: in, Let t represent the wind and solar power output of the wind and solar power generation system during time period t. The discharge power of the electrochemical energy storage system during time period t. The power purchased from the grid during time period t; The real-time power of the ammonia synthesis system during time period t. Let be the hydrogen production power of the electrolytic hydrogen production system during time period t. The charging power of the electrochemical energy storage system during time period t. The power sold to the grid during time period t; Furthermore, based on the wind and solar power output of the wind and solar power generation system during time period t, the following constraints are applied to the logical scheduling rules for the surplus power scenario of the entire wind-solar-hydrogen-ammonia system: [t]>1.1• in, [t] represents the comprehensive rated equivalent electrical power of the ammonia synthesis system during time period t, expressed as: = [t]+ [t] in, [t] represents the real-time power of the ammonia synthesis system during time period t; [t] represents the hydrogen production power of the electrolytic hydrogen production system during time period t; Step S32: When the wind and solar power output of the wind and solar power generation system still has surplus power after satisfying the real-time power of the ammonia synthesis system, the hydrogen production power of the electrolytic hydrogen production system, the real-time charging power of the electrochemical energy storage system, and the power sold to the grid during time period t, a power curtailment constraint model for the wind and solar power generation system under the surplus power scenario is established based on the wind and solar power output of the wind and solar power generation system, the real-time power of the ammonia synthesis system, the hydrogen production power of the electrolytic hydrogen production system, the real-time charging power of the electrochemical energy storage system, and the power sold to the grid during time period t. The calculation formula for the power curtailment constraint model is as follows: in, The power curtailment of wind and solar power generation systems during time period t. The charging efficiency of the electrochemical energy storage system during time period t; Furthermore, based on the wind and solar power output of the wind and solar power generation system during time period t, the following constraints are applied to the logical scheduling rules for the entire wind-solar-hydrogen-ammonia system under a power shortage scenario: <0.3• Step S33: Set the normal range logic range of the ammonia synthesis system to meet the logic scheduling rules of the entire wind-solar-hydrogen-ammonia system under surplus power or power shortage scenarios; the normal range logic range is 0.

3. ≤ ≤1.1• .

9. The hourly joint optimization method for capacity and scheduling of a wind-solar-hydrogen-ammonia system according to claim 8, characterized in that, The establishment of a future preset time power adjustment mechanism for adjusting the load rate of the ammonia synthesis system specifically includes: Step S41: Input the predicted wind and solar power output of the wind and solar power generation system within the prediction period of the next 4-72 hours, as well as the load demand boundary conditions of the entire wind-solar-hydrogen-ammonia system; the load demand boundary conditions of the entire wind-solar-hydrogen-ammonia system include the upper and lower limits of the load rate of the ammonia synthesis system, the mutual exclusion boundary of the operating status between each system, the energy consumption parameter boundary of the electrolytic hydrogen production system and the ammonia synthesis system, the constraint boundary of the number of start-ups and shutdowns of the ammonia synthesis system, and the hydrogen supply matching load boundary of the ammonia synthesis system. Step S42: Calculate the cumulative power shortage E of the entire wind-solar-hydrogen-ammonia system within the forecast period of 4-72 hours. gap ; Step S43: Preset a fixed cumulative power shortage threshold E gap,lim If E gap ≥E gap,lim If the system is deemed to have insufficient medium- to long-term power supply capacity for the entire wind-solar-hydrogen-ammonia system, the load rate of the synthetic ammonia system will be forcibly reduced to the minimum stable load rate of 30%.

10. The hourly joint optimization method for capacity and scheduling of a wind-solar-hydrogen-ammonia system according to claim 9, characterized in that, The upper-layer capacity configuration optimization model is configured in the following ways: Based on the initial total investment, operation and maintenance costs, and system energy consumption costs, an optimization function for minimizing the total life-cycle ammonia cost (LCOA) is established with the optimization objective of minimizing the LCOA target. This LCOA target minimization optimization function is then set as the upper-level capacity configuration optimization model. The LCOA objective minimization optimization function is: in, c represents the initial total investment, and c represents the year. The maintenance cost for year c is... Let the system energy consumption cost be in year c. For the power grid's electricity purchase and sale cost in year c, For the electricity sales revenue from the power grid in year c, Let r be the estimated ammonia production in year c, r be the discount rate, and N be the total life cycle of the project. The configuration methods for the lower-level rolling scheduling optimization model include: Based on the total lifecycle cost of ammonia, the curtailment rate of wind and solar power, and the number of start-ups and shutdowns of the ammonia synthesis system, a comprehensive optimization function is constructed with the goals of minimizing system operating costs, maximizing renewable energy consumption, and ensuring stable operation of the ammonia synthesis unit. This comprehensive optimization function is then used to establish a lower-level rolling scheduling optimization model. The comprehensive optimization function is as follows: λ1LCOA+λ2•Wind and Solar Curtailment Rate+λ3•Y Where λ1, λ2, and λ3 are weighted penalty coefficients, LCOA is the total life cycle ammonia cost, and Y is the number of start-ups and shutdowns of the ammonia synthesis system throughout the entire cycle; Among them, the curtailment rate of wind and solar power is: = in, For wind and solar power curtailment rate, The power curtailment of wind and solar power generation systems during time period t. The wind and solar power output of the wind and solar power generation system during time period t; The decision variables include the installed capacity C of the wind farm. wt The installed capacity C of photovoltaic power stations pv Annual production scale of electrolysis hydrogen production system Maximum hydrogen storage capacity of hydrogen storage system Rated energy storage capacity of electrochemical energy storage system Annual production scale of the ammonia synthesis system At least one or more of the following.