Source network hydrogen-ammonia double-layer coordination optimization method and device based on model predictive control

By adopting the source network hydrogen ammonia bilayer coordination optimization method based on model prediction control in the new energy hydrogen synthesis system, the problem that the system is difficult to achieve economic operation and efficient and flexible utilization under the conditions of renewable energy with high volatility is solved, and the economic operation and efficient and flexible utilization of the system are realized, which enhances the equipment regulation capability and reliability of the system are enhanced.

CN119742742APending Publication Date: 2025-04-01CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411592198.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The existing new energy hydrogen-making ammonia synthesis system is difficult to achieve economic operation and efficient and flexible utilization under the conditions of renewable energy power supply with high volatility. At the same time, it faces the problems of poor equipment flexibility and insufficient system operation reliability.

Method used

The source network hydrogen ammonia double-layer coordination optimization method based on model prediction control is adopted. By establishing a double-layer coordination optimization model of the economic optimization control layer and the real-time power optimization control layer, combining new energy prediction power and real-time power, the full operating conditions of the system are optimized.

Benefits of technology

Under the conditions of high volatility of renewable energy, the economic operation and efficient and flexible utilization of the system are achieved, which enhances the equipment regulation capabilities and the reliability of the system operation, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119742742A_ABST
    Figure CN119742742A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of energy system optimization, and particularly relates to a source network hydrogen-ammonia double-layer coordinated optimization method and device based on model predictive control, and the method comprises the steps: building a source network hydrogen-ammonia double-layer coordinated optimization model based on model predictive control, the double-layer coordination optimization model comprises an economic optimization regulation and control layer optimization model and a real-time power optimization regulation and control layer optimization model; inputting the new energy prediction power of the prediction time into an economic optimization regulation and control layer optimization model to obtain an economic optimization result; inputting the new energy real-time power and the economic optimization result in a preset time period into a real-time power optimization regulation and control layer optimization model to obtain a power optimization result; and according to a power optimization result, carrying out optimized operation regulation and control on all working conditions of the source network hydrogen-ammonia combined system within the prediction time. According to the technical scheme provided by the invention, energy use can be optimized, the system cost can be reduced, the economic regulation and control optimization range of the source-network hydrogen-ammonia combined system can be expanded, and economic regulation and control and efficient absorption of clean energy in an electricity-hydrogen collaborative production mode can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of energy system optimization, and specifically relates to a source-grid hydrogen-ammonia double-layer coordinated optimization method and device based on model predictive control. Background Art

[0002] At present, the operation and control of new energy hydrogen production and ammonia synthesis systems mostly adopt optimization methods that are gradually corrected according to different time scales, and state correction or economic optimization correction is adopted in real-time regulation. As a result, a series of problems are still faced at this stage: on the one hand, how to achieve economic operation and efficient and flexible utilization of the system under the conditions of renewable energy power supply with large fluctuations; on the other hand, how to balance the economy of the system and the differentiation of flexible adjustment capabilities of the equipment to ensure that the system operation has sufficient reliability and rapid response capabilities. Summary of the invention

[0003] In order to overcome the problems existing in the above-mentioned related technologies, the present application provides a source-grid hydrogen-ammonia double-layer coordinated optimization method and device based on model predictive control.

[0004] According to a first aspect of an embodiment of the present application, a source-grid hydrogen-ammonia dual-layer coordinated optimization method based on model predictive control is provided, comprising:

[0005] Establishing a source-grid hydrogen-ammonia double-layer coordination optimization model based on model predictive control, wherein the double-layer coordination optimization model includes: an economic optimization regulation layer optimization model and a real-time power optimization regulation layer optimization model;

[0006] Inputting the predicted power of new energy at the predicted time into the optimization model of the economic optimization regulation layer to obtain the economic optimization result;

[0007] Inputting the real-time power of new energy in a preset time period and the economic optimization result into the optimization model of the real-time power optimization control layer to obtain the power optimization result;

[0008] According to the power optimization results, optimized operation and control of the source-grid hydrogen-ammonia combined system under all operating conditions at the predicted time are carried out.

[0009] Preferably, the inputting of the predicted power of new energy at the predicted time into the optimization model of the economic optimization regulation layer to obtain the economic optimization result includes:

[0010] The predicted power of new energy at the predicted time is input into the optimization model of the economic optimization regulation layer, and the optimization model of the economic optimization regulation layer is solved by using mathematical programming optimization theory to obtain the economic optimization power of photovoltaic power generation, the economic optimization power of hydropower, the economic optimization power of electrolysis hydrogen production, the economic optimization power of power grid electricity sales, the economic optimization power of power grid electricity purchase, the economic optimization production rate of synthetic ammonia, the storage capacity state and the hydrogen storage state value;

[0011] The economically optimized power of photovoltaic power generation, the economically optimized power of hydropower, the economically optimized power of electrolytic hydrogen production, the economically optimized power sales of the power grid, the economically optimized power purchase of the power grid, the economically optimized production rate of synthetic ammonia, the storage capacity status and the hydrogen storage status value are the economic optimization results.

[0012] Preferably, the economic optimization regulation layer optimization model includes: objective function and constraint conditions;

[0013] The objective function of the optimization model of the economic optimization control layer is constructed with the goal of maximizing the benefits of ammonia and minimizing the system cost;

[0014] The constraints of the optimization model of the economic optimization and regulation layer include: power balance constraints, new energy power constraints, hydropower storage capacity constraints, synthetic ammonia production rate constraints, synthetic ammonia ramp constraints, grid interactive power purchase and sales constraints, hydrogen storage state constraints and electrolysis hydrogen production operation power constraints.

[0015] Preferably, the objective function of the optimization model of the economic optimization regulation layer includes:

[0016] Ammonia sales revenue function, grid interaction cost function, power generation cost function, electrolyzer operation and maintenance cost function, and hydrogen storage cost function.

[0017] Preferably, the calculation formula of the objective function of the optimization model of the economic optimization regulation layer includes:

[0018]

[0019] In the above formula, f is the objective function of the optimization model of the economic optimization regulation layer, J NH3 is the revenue function of selling ammonia, J grid is the grid interaction cost function, J pg is the power generation cost function, J el is the electrolyzer operation and maintenance cost function, J hs is the hydrogen storage cost function.

[0020] Preferably, the calculation formula of the ammonia sales revenue function includes:

[0021]

[0022] The calculation formula of the interaction cost function of the power grid includes:

[0023]

[0024] The calculation formula of the power generation cost function includes:

[0025]

[0026] The calculation formula of the electrolytic cell operation and maintenance cost function includes:

[0027]

[0028] The calculation formula of the hydrogen storage cost function includes:

[0029]

[0030] In the above formula, t∈[1,T eco ], T eco Optimize the total sampling time of the model for economic optimization and regulation layer; NH3 is the revenue function of selling ammonia, C NH3 (t) is the selling price of ammonia at time t, C NH3,o&m (t) is the conversion cost of hydrogen to ammonia at time t, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t, ΔT 1 Optimize the model sampling time interval for economic optimization and regulation layer; grid is the grid interaction cost function, C gb is the electricity purchase price, δ gs,eco (t) is the power sales status of the power grid at the tth moment, C gs is the electricity price, δ gb,eco (t) is the power purchasing status of the power grid at the tth moment, P gs,eco (t) is the economically optimized power sales power of the power grid at the tth moment, P gb,eco (t) is the economically optimized power purchase power of the power grid at the tth moment; J pg is the power generation cost function, C PV is the photovoltaic power generation cost coefficient, P PV,eco (t) is the economic optimization power of photovoltaic power generation at the tth moment, C Hydro is the hydropower generation cost coefficient, P Hydro,eco (t) is the economic optimization power of hydropower at the tth moment, ε pena,PV is the light abandonment penalty coefficient, P PV,loss,eco (t) is the economic optimization power of abandoned light at the tth moment; J el is the electrolyzer operation and maintenance cost function, C el,o&m is the operation and maintenance cost coefficient of hydrogen production by electrolysis, δ el,eco (t) is the operating state of hydrogen production by electrolysis at the tth moment, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, C el,on is the startup cost coefficient of the electrolytic hydrogen production unit, χ el,eco (t) is the number of electrolytic hydrogen production units in operation at the tth moment; J hs is the hydrogen storage cost function, C sto is the hydrogen storage cost coefficient, n sto,eco(t) is the hydrogen storage rate at the tth moment.

[0031] Preferably, the calculation formula for the number of operating electrolytic hydrogen production units includes:

[0032]

[0033] The calculation formula of the hydrogen storage rate includes:

[0034]

[0035] In the above formula, χ el,eco (t) is the number of electrolytic hydrogen production units in operation at the tth moment, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, P el,N is the rated power of the electrolytic hydrogen production unit, el,eco (t-1) is the number of electrolytic hydrogen production units in operation at the t-1th moment; n sto,eco (t) is the hydrogen storage rate at time t, a H2 is the hydrogen production rate coefficient of electrolysis, ε htn is the hydrogen consumption rate coefficient for synthetic ammonia, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t.

[0036] Preferably, the calculation formula of the power balance constraint includes:

[0037]

[0038] The calculation formula of the new energy power constraint includes:

[0039]

[0040] The calculation formula for the hydropower storage capacity constraint includes:

[0041]

[0042] The calculation formula for the synthetic ammonia production rate constraint includes:

[0043]

[0044] The calculation formula of the synthetic ammonia ramp constraint includes:

[0045]

[0046] The calculation formula of the grid interactive power purchase and sale constraint includes:

[0047]

[0048] The calculation formula of the hydrogen storage state constraint includes:

[0049]

[0050] The calculation formula for the operating power constraint of hydrogen production by electrolysis includes:

[0051]

[0052] In the above formula, t∈[1,T eco ], T eco The total sampling time of the optimization model for the economic optimization control layer; ΔT 1 Optimize the model sampling time interval for the economic optimization control layer, P PV,eco (t) is the economic optimization power of photovoltaic power generation at the tth moment, P Hydro,eco (t) is the economic optimization power of hydropower at the tth moment, P grid (t) is the grid interaction power, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, P NH3,eco (t) is the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system at the tth moment, P gb,eco (t) is the economically optimized power purchase power of the power grid at the tth moment, P gs,eco (t) is the economically optimized power sales power of the power grid at the tth moment; P PV,for is the photovoltaic power prediction, P Hydro,min is the minimum value of hydropower power; P Hydro,max is the maximum value of hydropower power; V Hydro,min is the minimum value of storage capacity, V Hydro,max is the maximum value of storage capacity, V Hyo,eco (t) is the storage capacity at the tth moment, β is the conversion coefficient between hydropower and water consumption, H max is the maximum storage capacity; n NH3,min is the minimum rate of synthetic ammonia production, n NH3,max is the maximum rate of synthetic ammonia production, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t; Δn NH3,eco (t) is the change in the synthetic ammonia production rate at time t, Δn NH3,min is the minimum change in the synthetic ammonia production rate, Δn NH3,max is the maximum value of synthetic ammonia production rate; δ gb,eco (t) is the power purchase status of the power grid at the tth moment, δ gs,eco (t) is the power sales status of the power grid at the tth moment, P gs,min is the minimum power sold, P gs,max is the maximum power sold, P gb,min is the minimum purchased power, P gb,max is the maximum power purchase; LOH minis the minimum value of hydrogen storage state, LOH max is the maximum value of hydrogen storage state, S max is the maximum hydrogen storage capacity, n sto,eco (t) is the hydrogen storage rate at the tth moment, LOH(t) is the hydrogen storage state value at the tth moment; P el,min is the minimum power of the electrolyzer, P el,max is the maximum power of the electrolyzer, ΔP el,min is the minimum value of the electrolytic cell operating power change, ΔP el,max is the maximum value of the electrolytic cell operating power change, ΔP el,eco (t) is the change value of the electrolytic cell operating power at the tth moment, P el,eco (t-1) is the economically optimized power of hydrogen production by electrolysis at the t-1th moment.

[0053] Preferably, the calculation formula for the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system includes:

[0054]

[0055] In the above formula, P NH3,eco (t) is the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system at the tth moment, k is the synthetic ammonia power coefficient, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t.

[0056] Preferably, the step of inputting the real-time power of new energy in a preset time period and the economic optimization result into the optimization model of the real-time power optimization control layer to obtain the power optimization result includes:

[0057] Input the real-time power of new energy in a preset time period and the economic optimization result into the input of the optimization model of the real-time power optimization control layer, and output the photovoltaic operation reference power, hydropower operation reference power, electrolysis hydrogen production operation reference power and grid interaction operation reference power values;

[0058] The photovoltaic operation reference power, the hydropower operation reference power, the electrolysis hydrogen production operation reference power and the grid interaction operation reference power values ​​are the power optimization results.

[0059] Preferably, the real-time power optimization control layer optimization model includes: an objective function and constraint conditions;

[0060] The objective function of the optimization model of the real-time power optimization control layer is constructed by using the power optimization sub-objective, the dynamic response speed difference of each device and the relaxation constraint penalty term;

[0061] The constraints of the optimization model of the real-time power optimization control layer include: operating power constraints of the source-grid hydrogen-ammonia combined system, power change constraints, state constraints of the source-grid hydrogen-ammonia combined system and real-time power balance equation constraints.

[0062] Preferably, the calculation formula of the objective function of the optimization model of the real-time power optimization control layer includes:

[0063]

[0064] In the above formula, J MPC The objective function of the optimization model for the real-time power optimization control layer is: i∈Z, Z={PV,Hydro,el,grid,NH 3}, PV is photovoltaic power generation, Hydro is hydroelectric power generation, el is water electrolysis hydrogen production, grid is grid interaction, NH 3 For synthetic ammonia; N c ={0,1,…,N c},N c is the control step size; κ 1 is the output weight coefficient, P i is the power of i, P i (t k+j |t k ) is based on t k Always P i In t k+j Prediction of the moment, P i,ref (t k ) is the tth k The economic optimization control layer of the source-grid hydrogen-ammonia joint system at the moment is input into the real-time power control layer power, r i is the power change weight coefficient of i, ΔP i is the power change of i, ΔP i (t k+j |t k ) is based on t k Time to ΔP i In t k+j Prediction of the moment, g i is the power weight coefficient of i, ξ pena is the relaxation penalty coefficient, γ(t k ) is the tth k Relaxation penalty variable at time, γ∈[0,1]; T L Optimizing a set of discrete moments for real-time power regulation;

[0065] in, is the power optimization sub-goal, is the dynamic response speed difference of each device, is the penalty term for relaxing constraints.

[0066] Preferably, the calculation formula for the operating power constraint of the source-grid hydrogen-ammonia combined system includes:

[0067] P i,min ≤P i (t k )≤P i,max

[0068] The calculation formula of the power variation constraint includes:

[0069] ΔP i,min ≤ΔP i (t k )≤ΔP i,max

[0070] The calculation formula of the state constraint of the source-grid hydrogen-ammonia combined system includes:

[0071]

[0072] The calculation formula of the real-time power balance equation constraint includes:

[0073]

[0074] In the above formula, Z={PV,Hydro,el,grid,NH 3}, PV is photovoltaic power generation, Hydro is hydroelectric power generation, el is water electrolysis hydrogen production, grid is grid interaction, NH 3 For the synthesis of ammonia, T L Optimizing discrete time sets for real-time power control; P i (t k ) is the tth k The power at time i, P i,max is the maximum power of i, P i,min is the minimum power value of i; ΔP i (t k ) is the tth k The power change at time i, ΔP i,max is the maximum power change of i, ΔP i,min are the minimum power variation of i; γ(t k ) is the tth k The relaxation penalty variable at the time, γ∈[0,1]; V Hyo,min is the minimum value of the relaxation penalty range of the storage capacity state, is the minimum soft constraint value of storage capacity state, v Hyo,min is the minimum value of the relaxation penalty range of the storage capacity state, V(t k ) is the tthk Storage capacity status at the moment; is the maximum soft constraint value of storage capacity, v Hyo,max is the maximum value of the relaxation penalty range of the storage capacity state, V Hyo,max is the maximum value of storage capacity, LOH min is the minimum value of hydrogen storage state, is the soft constraint minimum value of hydrogen storage state, v LOH,min is the minimum value of the relaxation penalty range of the hydrogen storage state, LOH(t k ) is the tth k The hydrogen storage state value at the moment, is the maximum soft constraint value of hydrogen storage state, v LOH,max is the maximum value of the relaxation penalty range of the hydrogen storage state, LOH max is the maximum value of hydrogen storage state; P PV (t k ) is the tth k The real-time photovoltaic power at the moment, P PV,loss (t k ) is the tth k The real-time power of abandoned light at the moment, P Hydro (t k ) is the tth k The real-time hydropower power at the moment, P el (t k ) is the tth k The real-time power of hydrogen production by electrolysis at the moment, P NH3 (t k ) is the tth k Real-time ammonia production at each moment.

[0075] Preferably, the sampling time of the optimization model of the economic optimization regulation layer is hourly;

[0076] The sampling time of the optimization model of the real-time power optimization control layer is in the order of minutes.

[0077] According to a second aspect of an embodiment of the present application, a source-grid hydrogen-ammonia dual-layer coordinated optimization device based on model predictive control is provided, comprising:

[0078] An establishing unit is used to establish a source-grid hydrogen-ammonia double-layer coordinated optimization model based on model predictive control, wherein the double-layer coordinated optimization model includes: an economic optimization regulation layer optimization model and a real-time power optimization regulation layer optimization model;

[0079] A first acquisition unit is used to input the predicted power of new energy at the predicted time into the optimization model of the economic optimization regulation layer to obtain an economic optimization result;

[0080] A second acquisition unit is used to input the real-time power of the new energy in a preset time period and the economic optimization result into the optimization model of the real-time power optimization control layer to obtain the power optimization result;

[0081] The optimization unit is used to optimize the operation and control of the full operating conditions of the source-grid hydrogen-ammonia combined system at the predicted time according to the power optimization result.

[0082] According to a third aspect of an embodiment of the present application, there is provided an electronic device, comprising: at least one processor and a memory; the memory and the processor are connected via a bus;

[0083] The memory is used to store one or more programs;

[0084] When the one or more programs are executed by the at least one processor, the described method is implemented.

[0085] According to a fourth aspect of an embodiment of the present application, a readable storage medium is provided, on which an execution program is stored, and when the execution program is executed, the described method is implemented.

[0086] The technical solution provided by the present invention has the following beneficial effects:

[0087] The present invention provides a source-grid hydrogen-ammonia two-layer coordinated optimization method and device based on model predictive control. By establishing a source-grid hydrogen-ammonia two-layer coordinated optimization model based on model predictive control, the two-layer coordinated optimization model includes: an economic optimization control layer optimization model and a real-time power optimization control layer optimization model. An innovative two-layer control architecture including economic optimization control and real-time power optimization control is proposed, providing a mixed time scale solution. The economic optimization result is obtained by inputting the predicted power of the new energy at the predicted time into the economic optimization control layer optimization model. The power optimization result is obtained by inputting the real-time power of the new energy in a preset time period and the economic optimization result into the real-time power optimization control layer optimization model. By optimizing the operation and control of the source-grid hydrogen-ammonia joint system under all working conditions at the predicted time according to the power optimization result, energy use can be optimized, system cost can be reduced, the scope of economic control optimization of the source-grid hydrogen-ammonia joint system can be expanded, and economic control and efficient consumption of clean energy under the electric-hydrogen coordinated production mode can be realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0089] Figure 1It is a flow chart of a source-grid hydrogen-ammonia double-layer coordinated optimization method based on model predictive control provided by an embodiment of the present invention;

[0090] Figure 2 It is a flow chart of a source-grid hydrogen-ammonia double-layer coordinated optimization method based on model predictive control provided by an embodiment of the present invention;

[0091] Figure 3 It is a waveform diagram of photovoltaic predicted power and real-time power provided by an embodiment of the present invention;

[0092] Figure 4 is a waveform diagram of photovoltaic optimized power provided by an embodiment of the present invention;

[0093] Figure 5 It is a waveform diagram of the hydropower optimization power and storage capacity state provided by an embodiment of the present invention;

[0094] Figure 6 It is a waveform diagram of the optimized power and hydrogen storage state of hydrogen production by electrolysis provided by an embodiment of the present invention;

[0095] Figure 7 is a waveform diagram of power grid interactive optimization power provided by an embodiment of the present invention;

[0096] Figure 8 It is a waveform diagram of the optimized power and ammonia production rate of synthetic ammonia provided by an embodiment of the present invention;

[0097] Fig. 9 It is a structural block diagram of a source-grid hydrogen-ammonia double-layer coordinated optimization device based on model predictive control provided by an embodiment of the present invention;

[0098] Fig.10 It is a structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0099] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the following embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0100] Embodiment 1

[0101] The present invention provides a source-grid hydrogen-ammonia double-layer coordination optimization method based on model predictive control, such as Figure 1 As shown, the following steps are included:

[0102] Step 11: Establish a source-grid hydrogen-ammonia double-layer coordination optimization model based on model predictive control. The double-layer coordination optimization model includes: an economic optimization regulation layer optimization model and a real-time power optimization regulation layer optimization model;

[0103] Step 12: Input the predicted power of new energy at the predicted time into the optimization model of the economic optimization regulation layer to obtain the economic optimization result;

[0104] Step 13: Input the real-time power and economic optimization results of the new energy in the preset time period into the optimization model of the real-time power optimization control layer to obtain the power optimization results;

[0105] Step 14: Based on the power optimization results, optimize the operation and control of the source-grid hydrogen-ammonia combined system under all operating conditions at the predicted time.

[0106] Furthermore, the sampling time of the optimization model of the economic optimization control layer is in the hour level; the sampling time of the optimization model of the real-time power optimization control layer is in the minute level.

[0107] It should be noted that the predicted power of the new energy at the predicted time is obtained in advance, and the method of "obtaining the predicted power of the new energy at the predicted time" is well known to those skilled in the art, so its specific implementation method is not described in detail. In some embodiments, the predicted power of the new energy can be obtained by using, but not limited to, the day-ahead power prediction method.

[0108] The present invention does not limit the "prediction time" and "preset time period", which can be selected by technical personnel in this field based on experimental data, expert experience or engineering needs. For example, assuming that today is January 1, 2024, the prediction time can be but not limited to January 2, 2024, and the preset time period can be but not limited to January 1, 2024.

[0109] The technical field of the present invention focuses on solving the problems of economy and operational reliability in the optimized operation of energy systems. By innovatively proposing a two-layer control architecture that includes economic optimization control and real-time power optimization control, a hybrid time scale solution is provided to address the challenges of operational economy and real-time regulation reliability in the process of energy production, distribution and consumption. This method is suitable for systems with high requirements for real-time response and precise control, such as smart grids, renewable energy integration, industrial process control, etc. The present invention can optimize energy use, reduce operating costs, and improve system operation flexibility and reliability while ensuring stable and reliable system operation, thereby achieving the optimal operation of the system.

[0110] Further, step 12 includes:

[0111] Step 121: inputting the predicted power of new energy at the predicted time into the optimization model of the economic optimization regulation layer, and solving the optimization model of the economic optimization regulation layer by using mathematical programming optimization theory, to obtain the economic optimization power of photovoltaic power generation, the economic optimization power of hydropower, the economic optimization power of electrolysis hydrogen production, the economic optimization power of power grid electricity sales, the economic optimization power of power grid electricity purchase, the economic optimization production rate of synthetic ammonia, the storage capacity state and the hydrogen storage state value;

[0112] Step 122: The economically optimized power of photovoltaic power generation, the economically optimized power of hydropower, the economically optimized power of electrolytic hydrogen production, the economically optimized power of power grid sales, the economically optimized power of power grid purchase, the economically optimized production rate of synthetic ammonia, the storage capacity status and the hydrogen storage status values ​​are the economic optimization results.

[0113] The economic optimization control layer takes the predicted power of new energy as input, constructs and solves the economic optimization model, and obtains the economic optimization power and state benchmark values ​​such as the economic optimization photovoltaic and hydropower new energy power, electrolysis hydrogen production power, grid interaction power, synthetic ammonia operating power, hydropower storage capacity status and hydrogen storage status.

[0114] The economic optimization control layer of the present invention aims to maximize the benefits and obtain the benchmark power; the real-time power optimization control layer adopts a model predictive control method with multiple tracking targets and multiple constraint variables to adapt to the volatility of renewable energy, and through the relaxation of constraint boundaries, improves the flexibility and reliability of system operation while ensuring economy. Further, the optimization model of the economic optimization control layer includes: objective function and constraint conditions;

[0115] The objective function of the optimization model of the economic optimization control layer is constructed with the goal of maximizing the benefits of ammonia and minimizing the system cost;

[0116] The constraints of the optimization model of the economic optimization and regulation layer include: power balance constraints, new energy power constraints, hydropower storage capacity constraints, synthetic ammonia production rate constraints, synthetic ammonia ramp constraints, grid interactive power purchase and sales constraints, hydrogen storage status constraints and electrolysis hydrogen production operation power constraints.

[0117] Furthermore, the objective function of the optimization model of the economic optimization regulation layer includes:

[0118] Ammonia sales revenue function, grid interaction cost function, power generation cost function, electrolyzer operation and maintenance cost function, and hydrogen storage cost function.

[0119] Furthermore, the calculation formula of the objective function of the optimization model of the economic optimization regulation layer includes:

[0120] maxf=J NH3 -J grid -J pg -J el -J hs

[0121] In the above formula, f is the objective function of the optimization model of the economic optimization regulation layer, J NH3 is the revenue function of selling ammonia, J grid is the grid interaction cost function, J pg is the power generation cost function, J el is the electrolyzer operation and maintenance cost function, J hs is the hydrogen storage cost function.

[0122] Furthermore, the calculation formula of the ammonia sales revenue function includes:

[0123]

[0124] The calculation formula of the interaction cost function of the power grid includes:

[0125]

[0126] The calculation formula of the power generation cost function includes:

[0127]

[0128] The calculation formula of the electrolyzer operation and maintenance cost function includes:

[0129]

[0130] The calculation formula of hydrogen storage cost function includes:

[0131]

[0132] In the above formula, t∈[1,T eco ], T eco Optimize the total sampling time of the model for economic optimization and regulation layer; NH3 is the revenue function of selling ammonia, C NH3 (t) is the selling price of ammonia at the tth moment, C NH3,o&m (t) is the conversion cost of hydrogen to ammonia at time t, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t, ΔT 1 Optimize the model sampling time interval for economic optimization and regulation layer; grid is the grid interaction cost function, C gb is the electricity purchase price, δ gs,eco (t) is the power sales status of the power grid at the tth moment, C gs is the electricity price, δ gb,eco (t) is the power purchasing status of the power grid at the tth moment, P gs,eco (t) is the economically optimized power sales power of the power grid at the tth moment, P gb,eco (t) is the economically optimized power purchase power of the power grid at the tth moment; Jpg is the power generation cost function, C PV is the photovoltaic power generation cost coefficient, P PV,eco (t) is the economic optimization power of photovoltaic power generation at the tth moment, C Hydro is the hydropower generation cost coefficient, P Hydro,eco (t) is the economic optimization power of hydropower at the tth moment, ε pena,PV is the light abandonment penalty coefficient, P PV,loss,eco (t) is the economic optimization power of abandoned light at the tth moment; J el is the electrolyzer operation and maintenance cost function, C el,o&m is the operation and maintenance cost coefficient of hydrogen production by electrolysis, δ el,eco (t) is the operating state of hydrogen production by electrolysis at the tth moment, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, C el,on is the startup cost coefficient of the electrolytic hydrogen production unit, χ el,eco (t) is the number of electrolytic hydrogen production units in operation at the tth moment; J hs is the hydrogen storage cost function, C sto is the hydrogen storage cost coefficient, n sto,eco (t) is the hydrogen storage rate at the tth moment.

[0133] Furthermore, the calculation formula for the number of operating electrolytic hydrogen production units includes:

[0134]

[0135] The calculation formula for hydrogen storage rate includes:

[0136]

[0137] In the above formula, χ el,eco (t) is the number of electrolytic hydrogen production units in operation at the tth moment, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, P el,N is the rated power of the electrolytic hydrogen production unit, el,eco (t-1) is the number of electrolytic hydrogen production units in operation at the t-1th moment; n sto,eco (t) is the hydrogen storage rate at time t, a H2 is the hydrogen production rate coefficient of electrolysis, ε htn is the hydrogen consumption rate coefficient for synthetic ammonia, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t.

[0138] Furthermore, the calculation formula of the power balance constraint includes:

[0139]

[0140] The calculation formula for new energy power constraints includes:

[0141]

[0142] The calculation formula for hydropower storage capacity constraints includes:

[0143]

[0144] The calculation formula for the synthetic ammonia production rate constraint includes:

[0145]

[0146] The calculation formula for synthetic ammonia ramp constraints includes:

[0147]

[0148] The calculation formula for the grid interactive purchase and sale constraints includes:

[0149]

[0150] The calculation formula for hydrogen storage state constraints includes:

[0151]

[0152] The calculation formula for the operating power constraint of hydrogen electrolysis includes:

[0153]

[0154] In the above formula, t∈[1,T eco ], T eco The total sampling time of the optimization model for the economic optimization control layer; ΔT 1 Optimize the model sampling time interval for the economic optimization control layer, P PV,eco (t) is the economic optimization power of photovoltaic power generation at the tth moment, P Hydro,eco (t) is the economic optimization power of hydropower at the tth moment, P grid (t) is the grid interaction power, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, P NH3,eco (t) is the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system at the tth moment, P gb,eco (t) is the economically optimized power purchase power of the power grid at the tth moment, P gs,eco (t) is the economically optimized power sales power of the power grid at the tth moment; P PV,for is the photovoltaic power prediction, P Hydro,min is the minimum value of hydropower power; P Hydro,max is the maximum value of hydropower power; V Hydro,min is the minimum value of storage capacity, V Hydro,maxis the maximum value of storage capacity, V Hyo,eco (t) is the storage capacity at the tth moment, β is the conversion coefficient between hydropower and water consumption, H max is the maximum storage capacity; n NH3,min is the minimum rate of synthetic ammonia production, n NH3,max is the maximum rate of synthetic ammonia production, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t; Δn NH3,eco (t) is the change in the synthetic ammonia production rate at time t, Δn NH3,min is the minimum change in the synthetic ammonia production rate, Δn NH3,max is the maximum value of synthetic ammonia production rate; δ gb,eco (t) is the power purchase status of the power grid at the tth moment, δ gs,eco (t) is the power sales status of the power grid at the tth moment, P gs,min is the minimum power sold, P gs,max is the maximum power sold, P gb,min is the minimum purchased power, P gb,max is the maximum power purchase; LOH min is the minimum value of hydrogen storage state, LOH max is the maximum value of hydrogen storage state, S max is the maximum hydrogen storage capacity, n sto,eco (t) is the hydrogen storage rate at the tth moment, LOH(t) is the hydrogen storage state value at the tth moment; P el,min is the minimum power of the electrolyzer, P el,max is the maximum power of the electrolyzer, ΔP el,min is the minimum value of the electrolytic cell operating power change, ΔP el,max is the maximum value of the electrolytic cell operating power change, ΔP el,eco (t) is the change value of the electrolytic cell operating power at the tth moment, P el,eco (t-1) is the economically optimized power of hydrogen production by electrolysis at the t-1th moment.

[0155] Furthermore, the calculation formula for the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system includes:

[0156] P NH3,eco (t) = k·n NH3,eco (t)

[0157] In the above formula, P NH3,eco (t) is the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system at the tth moment, k is the synthetic ammonia power coefficient, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t.

[0158] Further, step 13 includes:

[0159] Step 131: inputting the real-time power of new energy and the economic optimization results of the preset time period into the input of the optimization model of the real-time power optimization control layer, and outputting the photovoltaic operation reference power, hydropower operation reference power, electrolysis hydrogen production operation reference power and grid interaction operation reference power values;

[0160] Step 132: The photovoltaic operation reference power, the hydropower operation reference power, the electrolysis hydrogen production operation reference power and the grid interaction operation reference power values ​​are power optimization results.

[0161] The optimization model of the real-time power optimization and regulation layer is based on the model predictive control theory. It takes the deviation value between the real-time power and predicted power of new energy and the economic optimization power and state reference value as input to solve the optimization model of the real-time power optimization and regulation layer, and obtains the reference power of new energy such as photovoltaic and hydropower, the reference power of electrolysis hydrogen production and the reference power value of grid interaction operation.

[0162] Furthermore, the optimization model of the real-time power optimization control layer includes: objective function and constraint conditions;

[0163] The objective function of the optimization model of the real-time power optimization control layer is constructed using the power optimization sub-objective, the dynamic response speed difference of each device and the relaxation constraint penalty term;

[0164] The constraints of the optimization model of the real-time power optimization control layer include: operating power constraints of the source-grid hydrogen-ammonia combined system, power change constraints, state constraints of the source-grid hydrogen-ammonia combined system and real-time power balance equation constraints.

[0165] In the construction of the model predictive control optimization problem, the economic optimization instructions obtained by the system economic optimization control layer are used as the model predictive control reference value to realize the transmission of economic parameters between the real-time power optimization control layer; set the power optimization sub-goal to adjust the participation of different equipment in the control; consider the dynamic response speed differences of each device to weaken the adverse effects of fluctuating conditions on the electrolyzer; add a relaxation constraint penalty term to avoid the failure of the model predictive control optimization solution and cause the controller to crash. Furthermore, the calculation formula of the objective function of the optimization model of the real-time power optimization control layer includes:

[0166]

[0167] In the above formula, J MPC The objective function of the optimization model for the real-time power optimization control layer is: i∈Z, Z={PV,Hydro,el,grid,NH 3}, PV is photovoltaic power generation, Hydro is hydroelectric power generation, el is water electrolysis hydrogen production, grid is grid interaction, NH 3 For synthetic ammonia; N c ={0,1,…,N c},Nc is the control step size; κ 1 is the output weight coefficient, P i is the power of i, P i (t k+j |t k ) is based on t k Always P i In t k+j Prediction of the moment, P i,ref (t k ) is the tth k The economic optimization control layer of the source-grid hydrogen-ammonia joint system at the moment is input into the real-time power control layer power, r i is the power change weight coefficient of i, ΔP i is the power change of i, ΔP i (t k+j |t k ) is based on t k Time to ΔP i In t k+j Prediction of the moment, g i is the power weight coefficient of i, ξ pena is the relaxation penalty coefficient, γ(t k ) is the tth k Relaxation penalty variable at time, γ∈[0,1]; T L Optimizing a set of discrete moments for real-time power regulation;

[0168] in, is the power optimization sub-goal, is the dynamic response speed difference of each device, is the penalty term for relaxing constraints.

[0169] When designing the constraint conditions of the optimization model of the real-time power optimization control layer, the present invention realizes the relaxation constraint penalty term by setting the soft and hard constraint boundaries respectively. The area within the soft constraint boundary is the zero penalty area, and the ideal operating state of the system is designed in this area. The area surrounded by the soft constraint boundary and the hard constraint boundary is the relaxation penalty area. When the optimization problem cannot obtain the optimal solution under the soft constraint, in order to ensure the stable operation of the system, the optimization solution process will enter the relaxation penalty area, but the solution of this area will bring a higher penalty term in the objective function. Therefore, after the system is stable, it will return to the soft constraint area under the guidance of the optimization target. The setting of the relaxation penalty area enhances the system's ability to cope with disturbances and further improves the reliability of the energy management method.

[0170] Furthermore, the calculation formula for the operating power constraint of the source-grid hydrogen-ammonia combined system includes:

[0171] P i,min ≤Pi (t k )≤P i,max

[0172] The calculation formula for power variation constraint includes:

[0173] ΔP i,min ≤ΔP i (t k )≤ΔP i,max

[0174] The calculation formula for the state constraints of the source-grid hydrogen-ammonia joint system includes:

[0175]

[0176] The calculation formula for real-time power balance equation constraints includes:

[0177]

[0178] In the above formula, Z={PV,Hydro,el,grid,NH 3}, PV is photovoltaic power generation, Hydro is hydroelectric power generation, el is water electrolysis hydrogen production, grid is grid interaction, NH 3 For the synthesis of ammonia, T L Optimizing discrete time sets for real-time power control; P i (t k ) is the tth k The power at time i, P i,max is the maximum power of i, P i,min is the minimum power value of i; ΔP i (t k ) is the tth k The power change at time i, ΔP i,max is the maximum power change of i, ΔP i,min are the minimum power variation of i; γ(t k ) is the tth k The relaxation penalty variable at the time, γ∈[0,1]; V Hyo,min is the minimum value of the relaxation penalty range of the storage capacity state, is the minimum soft constraint value of storage capacity state, v Hyo,min is the minimum value of the relaxation penalty range of the storage capacity state, V(t k ) is the tth k Storage capacity status at the moment; is the maximum soft constraint value of storage capacity, v Hyo,max is the maximum value of the relaxation penalty range of the storage capacity state, V Hyo,max is the maximum value of storage capacity, LOHmin is the minimum value of hydrogen storage state, is the soft constraint minimum value of hydrogen storage state, v LOH,min is the minimum value of the relaxation penalty range of the hydrogen storage state, LOH(t k ) is the tth k The hydrogen storage state value at the moment, is the maximum soft constraint value of hydrogen storage state, v LOH,max is the maximum value of the relaxation penalty range of the hydrogen storage state, LOH max is the maximum value of hydrogen storage state; P PV (t k ) is the tth k The real-time photovoltaic power at the moment, P PV,loss (t k ) is the tth k The real-time power of abandoned light at the moment, P Hydro (t k ) is the tth k The real-time hydropower power at the moment, P el (t k ) is the tth k The real-time power of hydrogen production by electrolysis at the moment, P NH3 (t k ) is the tth k Real-time ammonia production at each moment.

[0179] To further illustrate the above-mentioned source-grid hydrogen-ammonia double-layer coordination optimization method based on model predictive control, the present invention also provides a specific example. Among them, the example parameter settings include: photovoltaic installed capacity is 100MW; hydropower installed capacity is 100MW; electrolysis hydrogen production installed capacity is 75MW; the upper and lower limits of the power grid electricity purchase and sale price is 50MW; the hydropower reservoir capacity is 50000000m3; the hydrogen storage capacity is 70 tons; the power grid transmission coefficient is 0.018544; photovoltaic installed capacity is 100MW; the green ammonia price is 7100 yuan / ton; the ammonia production cost is 4123 yuan / ton; the electrolyzer operation cost is 15 yuan / MWh; the electrolyzer startup cost is 1100 yuan / unit; the photovoltaic power generation cost is 280 yuan / M Wh; the cost of hydropower generation is 253 yuan / MWh; the penalty coefficient for abandoned solar power is 600 yuan / MWh; the electricity selling price is 0.3 yuan / kWh; the hydrogen storage cost is 2,000 yuan / ton; the time-of-use electricity price in different time periods is: 00:00-06:00 and 23:00-00:00 is 0.425 yuan / kWh, 06:00-09:00, 11:30-15:30, 21:00-23:00 is 0.725 yuan / kWh, 09:00-11:30 and 15:30-21:00 is 1.025 yuan / kWh.

[0180] The sampling time of the economic optimization control layer of the two-layer optimization control method is 1 hour, and the sampling time of the real-time power optimization control layer is 1 minute. Matlab combined with Gurobi solver is used to solve the economic optimization control layer and the model predictive control MPC real-time power optimization layer layer by layer. Since the sampling time of the economic optimization control layer is 1 hour, and the sampling time of the real-time power optimization control layer is 1 minute, the real-time power optimization control layer needs to be optimized once every minute, for a total of 60 optimizations. Figure 2 As shown, the following steps are included:

[0181] Step 21: Input the system economic system: the photovoltaic power forecast curve for each hour within 24 hours;

[0182] Step 22: Solve the objective function of the optimization model of the economic optimization control layer based on the constraints of the optimization model of the economic optimization control layer to obtain the economic optimization results: ammonia production plan and economic optimization reference values ​​of hydropower, photovoltaics, electrolysis hydrogen production, and grid interactive power;

[0183] Step 23: let k=1;

[0184] Step 24: Input the economic optimization results and the real-time output of photovoltaic power into the objective function of the optimization model of the real-time power optimization and control layer, solve the MPC real-time power optimization and control problem, and obtain the power optimization results: ammonia production plan and reference power for interactive operation of hydropower, photovoltaic power, electrolysis hydrogen production, and power grid;

[0185] Step 25: Determine whether k is greater than 60. If k is greater than 60, use the power optimization results to optimize the operation and control of the source-grid hydrogen-ammonia combined system under all operating conditions; otherwise, set k=k+1 and return to step 24.

[0186] like Figure 3 The waveform diagram of photovoltaic predicted power and real-time power is shown in Figure 2. Since the system can generate income for hydrogen production and ammonia synthesis, and the penalty coefficient for abandoned light is large, photovoltaic power can be fully absorbed, such as Figure 4 The waveform of the photovoltaic optimized power is shown in Figure 1. Hydropower generation has strong flexibility. The coupling system mainly adjusts the power of hydropower to achieve stable control of the power of the entire system. When the photovoltaic power is unstable, the hydropower can be adjusted according to the needs of the system to supplement the power shortage or reduce the power to absorb the high power period of photovoltaic power, so as to achieve the complementary operation of water and light in the system. Figure 5 The waveform diagram of the hydropower optimization power and storage capacity status is shown. Hydrogen electrolysis provides the hydrogen required for ammonia synthesis. When the photovoltaic predicted power deviates, although hydrogen electrolysis also has a certain adjustment ability, the stable operation condition has a positive effect on the hydrogen electrolysis equipment and safety. Therefore, hydrogen electrolysis only adjusts the power when the hydropower regulation margin is insufficient, such as Figure 6The waveform diagram of the optimized power and hydrogen storage state of electrolysis hydrogen production is shown in the figure. The power grid is the key support for the stable operation of the system power. When the system meets the energy demand for synthetic ammonia and the system power is still surplus, part of the system power is connected to the grid, such as Figure 7 The waveform diagram of grid interaction optimization power is shown in Figure 1. Synthetic ammonia operates by slowly ramping up to the maximum power, such as Figure 8 The waveform diagram of the optimized ammonia synthesis power and ammonia production rate is shown.

[0187] In addition, the present invention also provides a source-grid hydrogen-ammonia double-layer coordinated optimization method based on model predictive control. The method adopts a double-layer optimization structure with two time scales, that is, the double-layer optimization is respectively an economic optimization regulation layer and a real-time power optimization regulation layer. The sampling time of the economic optimization regulation layer is hourly, and the sampling time of the model predictive control real-time power optimization regulation layer is minute-level.

[0188] Optimization models for the economic optimization control layer and the real-time power optimization control layer are established respectively. In the economic optimization control layer, economic optimization objective functions and constraints are constructed according to the cost and economic benefits of system operation, and economic optimization power and state reference values ​​are generated; in the real-time power optimization control layer, multi-objective tracking real-time power control objective functions and constraints based on model predictive control theory are established to realize real-time power control based on economic optimization power reference values.

[0189] The optimization objectives of the economic optimization and control layer include a comprehensive objective function to maximize the benefits of ammonia and minimize the system costs. The comprehensive objective function includes: system power generation costs, ammonia sales revenue, grid interaction costs, electrolysis hydrogen production operating costs and startup costs, and hydrogen storage and other cost functions. The constraints include system power balance constraints, hydropower, photovoltaic and other new energy power constraints, hydropower storage capacity constraints, hydrogen storage state constraints, synthetic ammonia production rate constraints and ramp constraints, grid interaction power constraints, electrolysis hydrogen production power constraints, hydrogen storage and other state constraints.

[0190] Taking the predicted power of new energy as input and based on optimization theories such as mathematical programming, the optimization model of the economic optimization control layer is solved to obtain the economic optimization power and state benchmark values ​​such as the power of new energy such as photovoltaic and hydropower, electrolysis hydrogen production power, grid interaction power, synthetic ammonia operating power, hydropower storage capacity status and hydrogen storage status.

[0191] The optimization objectives of the real-time power optimization control layer include the following sub-optimization objectives: first, setting the power optimization sub-objective to adjust the participation of different devices in the control; second, considering the differences in dynamic response speed of each device to weaken the adverse effects of fluctuating conditions on the electrolyzer; third, adding a relaxation constraint penalty term to avoid the failure of the model predictive control optimization solution and causing the controller to crash.

[0192] The constraints of the optimization model of the real-time power optimization control layer include system operation power constraints, power change constraints and system state constraints, and the reliability of the solution of the optimization strategy is improved by relaxing the constraint boundaries.

[0193] Based on the model predictive control theory, the deviation value between the real-time power and predicted power of new energy and the economic optimization power and state reference value are used as input to solve the optimization model of the real-time power optimization and regulation layer. The reference power of new energy operation such as photovoltaic and hydropower, the reference power of electrolysis hydrogen production and the reference power value of grid interaction operation can be obtained, so as to realize the optimized operation and regulation of the system under all working conditions.

[0194] Embodiment 2

[0195] The present invention also provides a source-grid hydrogen-ammonia double-layer coordination optimization device based on model predictive control, such as Fig. 9 As shown, including:

[0196] Establishing a unit for establishing a source-grid hydrogen-ammonia double-layer coordination optimization model based on model predictive control, the double-layer coordination optimization model including: an economic optimization regulation layer optimization model and a real-time power optimization regulation layer optimization model;

[0197] The first acquisition unit is used to input the predicted power of new energy at the predicted time into the optimization model of the economic optimization regulation layer to obtain the economic optimization result;

[0198] The second acquisition unit is used to input the real-time power and economic optimization results of the new energy in the preset time period into the optimization model of the real-time power optimization control layer to obtain the power optimization result;

[0199] The optimization unit is used to optimize the operation and control of the full operating conditions of the source-grid hydrogen-ammonia combined system within the predicted time according to the power optimization results.

[0200] Furthermore, the first acquisition unit is specifically used for:

[0201] The predicted power of new energy at the predicted time is input into the optimization model of the economic optimization regulation layer, and the optimization model of the economic optimization regulation layer is solved by using mathematical programming optimization theory to obtain the economic optimization power of photovoltaic power generation, the economic optimization power of hydropower, the economic optimization power of electrolysis hydrogen production, the economic optimization power of power grid electricity sales, the economic optimization power of power grid electricity purchase, the economic optimization production rate of synthetic ammonia, the storage capacity state and the hydrogen storage state value;

[0202] The economic optimization results include the economically optimized power of photovoltaic power generation, the economically optimized power of hydropower, the economically optimized power of hydrogen production by electrolysis, the economically optimized power sales power of the power grid, the economically optimized power purchase power of the power grid, the economically optimized production rate of synthetic ammonia, the storage capacity status and the hydrogen storage status values.

[0203] Furthermore, the optimization model of the economic optimization regulation layer includes: objective function and constraints;

[0204] The objective function of the optimization model of the economic optimization control layer is constructed with the goal of maximizing the benefits of ammonia and minimizing the system cost;

[0205] The constraints of the optimization model of the economic optimization and regulation layer include: power balance constraints, new energy power constraints, hydropower storage capacity constraints, synthetic ammonia production rate constraints, synthetic ammonia ramp constraints, grid interactive power purchase and sales constraints, hydrogen storage status constraints and electrolysis hydrogen production operation power constraints.

[0206] Furthermore, the objective function of the optimization model of the economic optimization regulation layer includes:

[0207] Ammonia sales revenue function, grid interaction cost function, power generation cost function, electrolyzer operation and maintenance cost function, and hydrogen storage cost function.

[0208] Furthermore, the calculation formula of the objective function of the optimization model of the economic optimization regulation layer includes:

[0209] maxf=J NH3 -J grid -J pg -J el -J hs

[0210] In the above formula, f is the objective function of the optimization model of the economic optimization regulation layer, J NH3 is the revenue function of selling ammonia, J grid is the grid interaction cost function, J pg is the power generation cost function, J el is the electrolyzer operation and maintenance cost function, J hs is the hydrogen storage cost function.

[0211] Furthermore, the calculation formula of the ammonia sales revenue function includes:

[0212]

[0213] The calculation formula of the interaction cost function of the power grid includes:

[0214]

[0215] The calculation formula of the power generation cost function includes:

[0216]

[0217] The calculation formula of the electrolyzer operation and maintenance cost function includes:

[0218]

[0219] The calculation formula of hydrogen storage cost function includes:

[0220]

[0221] In the above formula, t∈[1,T eco ], T eco Optimize the total sampling time of the model for economic optimization and regulation layer; NH3 is the revenue function of selling ammonia, C NH3 (t) is the selling price of ammonia at the tth moment, C NH3,o&m (t) is the conversion cost of hydrogen to ammonia at time t, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t, ΔT 1 Optimize the model sampling time interval for economic optimization and regulation layer; grid is the grid interaction cost function, C gb is the electricity purchase price, δ gs,eco (t) is the power sales status of the power grid at the tth moment, C gs is the electricity price, δ gb,eco (t) is the power purchasing status of the power grid at the tth moment, P gs,eco (t) is the economically optimized power sales power of the power grid at the tth moment, P gb,eco (t) is the economically optimized power purchase power of the power grid at the tth moment; J pg is the power generation cost function, C PV is the photovoltaic power generation cost coefficient, P PV,eco (t) is the economic optimization power of photovoltaic power generation at the tth moment, C Hydro is the hydropower generation cost coefficient, P Hydro,eco (t) is the economic optimization power of hydropower at the tth moment, ε pena,PV is the light abandonment penalty coefficient, P PV,loss,eco (t) is the economic optimization power of abandoned light at the tth moment; J el is the electrolyzer operation and maintenance cost function, C el,o&m is the operation and maintenance cost coefficient of hydrogen production by electrolysis, δ el,eco (t) is the operating state of hydrogen production by electrolysis at the tth moment, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, C el,on is the startup cost coefficient of the electrolytic hydrogen production unit, χ el,eco (t) is the number of electrolytic hydrogen production units in operation at the tth moment; J hs is the hydrogen storage cost function, C sto is the hydrogen storage cost coefficient, n sto,eco (t) is the hydrogen storage rate at the tth moment.

[0222] Furthermore, the calculation formula for the number of operating electrolytic hydrogen production units includes:

[0223]

[0224] The calculation formula for hydrogen storage rate includes:

[0225]

[0226] In the above formula, χ el,eco (t) is the number of electrolytic hydrogen production units in operation at the tth moment, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, P el,N is the rated power of the electrolytic hydrogen production unit, el,eco (t-1) is the number of electrolytic hydrogen production units in operation at the t-1th moment; n sto,eco (t) is the hydrogen storage rate at time t, a H2 is the hydrogen production rate coefficient of electrolysis, ε htn is the hydrogen consumption rate coefficient for synthetic ammonia, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t.

[0227] Furthermore, the calculation formula of the power balance constraint includes:

[0228]

[0229] The calculation formula for new energy power constraints includes:

[0230]

[0231] The calculation formula for hydropower storage capacity constraints includes:

[0232]

[0233] The calculation formula for the synthetic ammonia production rate constraint includes:

[0234]

[0235] The calculation formula for synthetic ammonia ramp constraints includes:

[0236]

[0237] The calculation formula for the grid interactive purchase and sale constraints includes:

[0238]

[0239] The calculation formula for hydrogen storage state constraints includes:

[0240]

[0241] The calculation formula for the operating power constraint of hydrogen electrolysis includes:

[0242]

[0243] In the above formula, t∈[1,T eco ], T eco The total sampling time of the optimization model for the economic optimization control layer; ΔT 1 Optimize the model sampling time interval for the economic optimization control layer, P PV,eco (t) is the economic optimization power of photovoltaic power generation at the tth moment, P Hydro,eco (t) is the economic optimization power of hydropower at the tth moment, P grid (t) is the grid interaction power, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, P NH3,eco (t) is the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system at the tth moment, P gb,eco (t) is the economically optimized power purchase power of the power grid at the tth moment, P gs,eco (t) is the economically optimized power sales power of the power grid at the tth moment; P PV,for is the photovoltaic power prediction, P Hydro,min is the minimum value of hydropower power; P Hydro,max is the maximum value of hydropower power; V Hydro,min is the minimum value of storage capacity, V Hydro,max is the maximum value of storage capacity, V Hyo,eco (t) is the storage capacity at the tth moment, β is the conversion coefficient between hydropower and water consumption, H max is the maximum storage capacity; n NH3,min is the minimum rate of synthetic ammonia production, n NH3,max is the maximum rate of synthetic ammonia production, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t; Δn NH3,eco (t) is the change in the synthetic ammonia production rate at time t, Δn NH3,min is the minimum change in the synthetic ammonia production rate, Δn NH3,max is the maximum value of synthetic ammonia production rate; δ gb,eco (t) is the power purchase status of the power grid at the tth moment, δ gs,eco (t) is the power sales status of the power grid at the tth moment, P gs,min is the minimum power sold, P gs,max is the maximum power sold, P gb,min is the minimum purchased power, P gb,max is the maximum power purchase; LOH min is the minimum value of hydrogen storage state, LOH max is the maximum value of hydrogen storage state, S max is the maximum hydrogen storage capacity, n sto,eco (t) is the hydrogen storage rate at the tth moment, LOH(t) is the hydrogen storage state value at the tth moment; P el,minis the minimum power of the electrolyzer, P el,max is the maximum power of the electrolyzer, ΔP el,min is the minimum value of the electrolytic cell operating power change, ΔP el,max is the maximum value of the electrolytic cell operating power change, ΔP el,eco (t) is the change value of the electrolytic cell operating power at the tth moment, P el,eco (t-1) is the economically optimized power of hydrogen production by electrolysis at the t-1th moment.

[0244] Furthermore, the calculation formula for the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system includes:

[0245]

[0246] In the above formula, P NH3,eco (t) is the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system at the tth moment, k is the synthetic ammonia power coefficient, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t.

[0247] Furthermore, the second acquisition unit is specifically used for:

[0248] Input the real-time power of new energy and economic optimization results in the preset time period into the input of the optimization model of the real-time power optimization control layer, and output the reference power values ​​of photovoltaic operation, hydropower operation, electrolysis hydrogen production operation, and grid interaction operation;

[0249] The photovoltaic operation reference power, hydropower operation reference power, electrolysis hydrogen production operation reference power and grid interaction operation reference power values ​​are the power optimization results.

[0250] Furthermore, the optimization model of the real-time power optimization control layer includes: objective function and constraint conditions;

[0251] The objective function of the optimization model of the real-time power optimization control layer is constructed using the power optimization sub-objective, the dynamic response speed difference of each device and the relaxation constraint penalty term;

[0252] The constraints of the optimization model of the real-time power optimization control layer include: operating power constraints of the source-grid hydrogen-ammonia combined system, power change constraints, state constraints of the source-grid hydrogen-ammonia combined system and real-time power balance equation constraints.

[0253] Furthermore, the calculation formula of the objective function of the optimization model of the real-time power optimization control layer includes:

[0254]

[0255] In the above formula, J MPCThe objective function of the optimization model for the real-time power optimization control layer is: i∈Z, Z={PV,Hydro,el,grid,NH 3}, PV is photovoltaic power generation, Hydro is hydroelectric power generation, el is water electrolysis hydrogen production, grid is grid interaction, NH 3 For synthetic ammonia; N c ={0,1,…,N c},N c is the control step size; κ 1 is the output weight coefficient, P i is the power of i, P i (t k+j |t k ) is based on t k Always P i In t k+j Prediction of the moment, P i,ref (t k ) is the tth k The economic optimization control layer of the source-grid hydrogen-ammonia joint system at the moment is input into the real-time power control layer power, r i is the power change weight coefficient of i, ΔP i is the power change of i, ΔP i (t k+j |t k ) is based on t k Time to ΔP i In t k+j Prediction of the moment, g i is the power weight coefficient of i, ξ pena is the relaxation penalty coefficient, γ(t k ) is the tth k Relaxation penalty variable at time, γ∈[0,1]; T L Optimizing a set of discrete moments for real-time power regulation;

[0256] in, is the power optimization sub-goal, is the dynamic response speed difference of each device, is the penalty term for relaxing constraints.

[0257] Furthermore, the calculation formula for the operating power constraint of the source-grid hydrogen-ammonia combined system includes:

[0258] P i,min ≤P i (t k )≤P i,max

[0259] The calculation formula for power variation constraint includes:

[0260] ΔPi,min ≤ΔP i (t k )≤ΔP i,max

[0261] The calculation formula for the state constraints of the source-grid hydrogen-ammonia joint system includes:

[0262]

[0263] The calculation formula for real-time power balance equation constraints includes:

[0264]

[0265] In the above formula, Z={PV,Hydro,el,grid,NH 3}, PV is photovoltaic power generation, Hydro is hydroelectric power generation, el is water electrolysis hydrogen production, grid is grid interaction, NH 3 For the synthesis of ammonia, T L Optimizing discrete time sets for real-time power control; P i (t k ) is the tth k The power at time i, P i,max is the maximum power of i, P i,min is the minimum power value of i; ΔP i (t k ) is the tth k The power change at time i, ΔP i,max is the maximum power change of i, ΔP i,min are the minimum power variation of i; γ(t k ) is the tth k The relaxation penalty variable at the time, γ∈[0,1]; V Hyo,min is the minimum value of the relaxation penalty range of the storage capacity state, is the minimum soft constraint value of storage capacity state, v Hyo,min is the minimum value of the relaxation penalty range of the storage capacity state, V(t k ) is the tth k Storage capacity status at the moment; is the maximum soft constraint value of storage capacity, v Hyo,max is the maximum value of the relaxation penalty range of the storage capacity state, V Hyo,max is the maximum value of storage capacity, LOH min is the minimum value of hydrogen storage state, is the soft constraint minimum value of hydrogen storage state, v LOH,min is the minimum value of the relaxation penalty range of the hydrogen storage state, LOH(t k ) is the tth k The hydrogen storage state value at the moment, is the maximum soft constraint value of hydrogen storage state, v LOH,max is the maximum value of the relaxation penalty range of the hydrogen storage state, LOH max is the maximum value of hydrogen storage state; P PV (t k ) is the tth k The real-time photovoltaic power at the moment, P PV,loss (t k ) is the tth k The real-time power of abandoned light at the moment, P Hydro (t k ) is the tth k The real-time hydropower power at the moment, P el (t k ) is the tth k The real-time power of hydrogen production by electrolysis at the moment, P NH3 (t k ) is the tth k Real-time ammonia production at each moment.

[0266] Furthermore, the sampling time of the optimization model of the economic optimization regulation layer is hourly;

[0267] The sampling time of the optimization model of the real-time power optimization control layer is in minutes.

[0268] It can be understood that the device embodiment provided above corresponds to the method embodiment described above, and the corresponding specific contents can be referenced to each other and will not be repeated here.

[0269] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0270] Embodiment 3

[0271] like Fig.10 As shown, the present invention also provides an electronic device, which may be a computer device, a single-chip device, an intelligent mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected via a bus; the memory may be used to store an execution program, and an exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The memory may also be used to store data, which may be called and / or modified when the instructions are executed.

[0272] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in a storage medium to implement the corresponding method flow or corresponding functions, so as to implement the steps of a source-network hydrogen-ammonia double-layer coordinated optimization method based on model predictive control in the above-mentioned embodiment.

[0273] Embodiment 4

[0274] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in the electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The processor loads and executes one or more instructions stored in the storage medium, which can implement the steps of a source network hydrogen-ammonia dual-layer coordinated optimization method based on model predictive control in the above embodiment.

[0275] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0276] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0277] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0278] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0279] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A source-grid hydrogen-ammonia double-layer coordination optimization method based on model predictive control, characterized in that: include: Establishing a source-grid hydrogen-ammonia double-layer coordination optimization model based on model predictive control, wherein the double-layer coordination optimization model includes: an economic optimization regulation layer optimization model and a real-time power optimization regulation layer optimization model; Inputting the predicted power of new energy at the predicted time into the optimization model of the economic optimization regulation layer to obtain the economic optimization result; Inputting the real-time power of new energy in a preset time period and the economic optimization result into the optimization model of the real-time power optimization control layer to obtain the power optimization result; According to the power optimization results, optimized operation and control of the source-grid hydrogen-ammonia combined system under all operating conditions at the predicted time are carried out.

2. The method according to claim 1, characterized in that The new energy predicted power at the predicted time is input into the optimization model of the economic optimization regulation layer to obtain the economic optimization result, including: The predicted power of new energy at the predicted time is input into the optimization model of the economic optimization regulation layer, and the optimization model of the economic optimization regulation layer is solved by using mathematical programming optimization theory to obtain the economic optimization power of photovoltaic power generation, the economic optimization power of hydropower, the economic optimization power of electrolysis hydrogen production, the economic optimization power of power grid electricity sales, the economic optimization power of power grid electricity purchase, the economic optimization production rate of synthetic ammonia, the storage capacity state and the hydrogen storage state value; The economically optimized power of photovoltaic power generation, the economically optimized power of hydropower, the economically optimized power of electrolytic hydrogen production, the economically optimized power sales of the power grid, the economically optimized power purchase of the power grid, the economically optimized production rate of synthetic ammonia, the storage capacity status and the hydrogen storage status value are the economic optimization results.

3. The method according to claim 1, characterized in that The economic optimization and regulation layer optimization model includes: objective function and constraint conditions; The objective function of the optimization model of the economic optimization control layer is constructed with the goal of maximizing the benefits of ammonia and minimizing the system cost; The constraints of the optimization model of the economic optimization and regulation layer include: power balance constraints, new energy power constraints, hydropower storage capacity constraints, synthetic ammonia production rate constraints, synthetic ammonia ramp constraints, grid interactive power purchase and sales constraints, hydrogen storage state constraints and electrolysis hydrogen production operation power constraints.

4. The method according to claim 3, characterized in that The objective function of the optimization model of the economic optimization regulation layer includes: Ammonia sales revenue function, grid interaction cost function, power generation cost function, electrolyzer operation and maintenance cost function, and hydrogen storage cost function.

5. The method according to claim 1, characterized in that The calculation formula of the objective function of the optimization model of the economic optimization regulation layer includes: In the above formula, f is the objective function of the optimization model of the economic optimization regulation layer, J NH3 is the revenue function of selling ammonia, J grid is the grid interaction cost function, J pg is the power generation cost function, J el is the electrolyzer operation and maintenance cost function, J hs is the hydrogen storage cost function.

6. The method according to claim 5, characterized in that The calculation formula of the ammonia sales revenue function includes: The calculation formula of the interaction cost function of the power grid includes: The calculation formula of the power generation cost function includes: The calculation formula of the electrolytic cell operation and maintenance cost function includes: The calculation formula of the hydrogen storage cost function includes: In the above formula, t∈[1,T eco ], T eco Optimize the total sampling time of the model for economic optimization and regulation layer; NH3 is the revenue function of selling ammonia, C NH3 (t) is the selling price of ammonia at the tth moment, C NH3,o&m (t) is the conversion cost of hydrogen to ammonia at time t, n NH3,eco (t) is the economic optimization production rate of synthetic ammonia at the tth moment, ΔT1 is the sampling time interval of the optimization model of the economic optimization control layer; J grid is the grid interaction cost function, C gb is the electricity purchase price, δ gs,eco (t) is the power sales status of the power grid at the tth moment, C gs is the electricity price, δ gb,eco (t) is the power purchasing status of the power grid at the tth moment, P gs,eco (t) is the economically optimized power sales power of the power grid at the tth moment, P gb,eco (t) is the economically optimized power purchase power of the power grid at the tth moment; J pg is the power generation cost function, C PV is the photovoltaic power generation cost coefficient, P PV,eco (t) is the economic optimization power of photovoltaic power generation at the tth moment, C Hydro is the hydropower generation cost coefficient, P Hydro,eco (t) is the economic optimization power of hydropower at the tth moment, ε pena,PV is the light abandonment penalty coefficient, P PV,loss,eco (t) is the economic optimization power of abandoned light at the tth moment; J el is the electrolyzer operation and maintenance cost function, C el,o&m is the operation and maintenance cost coefficient of hydrogen production by electrolysis, δ el,eco (t) is the operating state of hydrogen production by electrolysis at the tth moment, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, C el,on is the startup cost coefficient of the electrolytic hydrogen production unit, χ el,eco (t) is the number of electrolytic hydrogen production units in operation at the tth moment; J hs is the hydrogen storage cost function, C sto is the hydrogen storage cost coefficient, n sto,eco (t) is the hydrogen storage rate at the tth moment.

7. The method according to claim 6, characterized in that The calculation formula for the number of operating electrolytic hydrogen production units includes: The calculation formula of the hydrogen storage rate includes: In the above formula, χ el,eco (t) is the number of electrolytic hydrogen production units in operation at the tth moment, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, P el,N is the rated power of the electrolytic hydrogen production unit, χ el,eco (t-1) is the number of electrolytic hydrogen production units in operation at the t-1th moment; n sto,eco (t) is the hydrogen storage rate at time t, a H2 is the hydrogen production rate coefficient of electrolysis, ε htn is the hydrogen consumption rate coefficient for synthetic ammonia, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t.

8. The method according to claim 3, characterized in that The calculation formula of the power balance constraint includes: The calculation formula of the new energy power constraint includes: The calculation formula for the hydropower storage capacity constraint includes: The calculation formula for the synthetic ammonia production rate constraint includes: The calculation formula of the synthetic ammonia ramp constraint includes: The calculation formula of the grid interactive power purchase and sale constraint includes: The calculation formula of the hydrogen storage state constraint includes: The calculation formula for the operating power constraint of hydrogen production by electrolysis includes: In the above formula, t∈[1,T eco ], T eco is the total sampling time of the optimization model of the economic optimization regulation layer; ΔT1 is the sampling time interval of the optimization model of the economic optimization regulation layer, P PV,eco (t) is the economic optimization power of photovoltaic power generation at the tth moment, P Hydro,eco (t) is the optimal power of hydropower economics at the tth moment, P grid (t) is the grid interaction power, P el,eco (t) is the economic optimization power of hydrogen production by electrolysis at the tth moment, P NH3,eco (t) is the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system at the tth moment, P gb,eco (t) is the economically optimized power purchase power of the power grid at the tth moment, P gs,eco (t) is the economically optimized power sales power of the power grid at the tth moment; P PV,for is the photovoltaic power prediction, P Hydro,min is the minimum value of hydropower power; P Hydro,max is the maximum value of hydropower power; V Hydro,min is the minimum value of storage capacity, V Hydro,max is the maximum value of storage capacity, V Hyo,eco (t) is the storage capacity at the tth moment, β is the conversion coefficient between hydropower and water consumption, H max is the maximum storage capacity; n NH3,min is the minimum rate of synthetic ammonia production, n NH3,max is the maximum rate of synthetic ammonia production, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t; Δn NH3,eco (t) is the change in the synthetic ammonia production rate at time t, Δn NH3,min is the minimum change in the synthetic ammonia production rate, Δn NH3,max is the maximum value of synthetic ammonia production rate; δ gb,eco (t) is the power purchase status of the power grid at the tth moment, δ gs,eco (t) is the power sales status of the power grid at the tth moment, P gs,min is the minimum power sold, P gs,max is the maximum power sold, P gb,min is the minimum power purchase, P gb,max is the maximum power purchase; LOH min is the minimum value of hydrogen storage state, LOH max is the maximum value of hydrogen storage state, S max is the maximum hydrogen storage capacity, n sto,eco (t) is the hydrogen storage rate at the tth moment, LOH(t) is the hydrogen storage state value at the tth moment; P el,min is the minimum power of the electrolyzer, P el,max is the maximum power of the electrolyzer, ΔP el,min is the minimum value of the electrolytic cell operating power change, ΔP el,max is the maximum value of the electrolytic cell operating power change, ΔP el,eco (t) is the change value of the electrolytic cell operating power at the tth moment, P el,eco (t-1) is the economically optimized power of hydrogen production by electrolysis at the t-1th moment.

9. The method according to claim 8, characterized in that The calculation formula for the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system includes: In the above formula, P NH3,eco (t) is the economic optimization power of the synthetic ammonia source network hydrogen-ammonia combined system at the tth moment, k is the synthetic ammonia power coefficient, n NH3,eco (t) is the economically optimized production rate of synthetic ammonia at time t.

10. The method according to claim 1, characterized in that The step of inputting the real-time power of the new energy in the preset time period and the economic optimization result into the optimization model of the real-time power optimization control layer to obtain the power optimization result includes: Input the real-time power of new energy in a preset time period and the economic optimization result into the input of the optimization model of the real-time power optimization control layer, and output the photovoltaic operation reference power, hydropower operation reference power, electrolysis hydrogen production operation reference power and grid interaction operation reference power values; The photovoltaic operation reference power, the hydropower operation reference power, the electrolysis hydrogen production operation reference power and the grid interaction operation reference power values ​​are the power optimization results.

11. The method according to claim 1, characterized in that: The real-time power optimization control layer optimization model includes: objective function and constraint conditions; The objective function of the optimization model of the real-time power optimization control layer is constructed by using the power optimization sub-objective, the dynamic response speed difference of each device and the relaxation constraint penalty term; The constraints of the optimization model of the real-time power optimization control layer include: operating power constraints of the source-grid hydrogen-ammonia combined system, power change constraints, state constraints of the source-grid hydrogen-ammonia combined system and real-time power balance equation constraints.

12. The method according to claim 1, characterized in that The calculation formula of the objective function of the optimization model of the real-time power optimization control layer includes: In the above formula, J MPC is the objective function of the optimization model of the real-time power optimization control layer; i∈Z, Z={PV,Hydro,el,grid,NH3}, PV is photovoltaic power generation, Hydro is hydropower generation, el is hydrogen production by electrolysis of water, grid is grid interaction, and NH3 is synthetic ammonia; N c ={0,1,…,N c },N c is the control step length; κ1 is the output weight coefficient, P i is the power of i, P i (t k+j |t k ) is based on t k Always P i In t k+j Prediction of the moment, P i,ref (t k ) is the tth k The economic optimization control layer of the source-grid hydrogen-ammonia joint system at the moment is input into the real-time power control layer power, r i is the power change weight coefficient of i, ΔP i is the power change of i, ΔP i (t k+j |t k ) is based on t k Time to ΔP i In t k+j Prediction of the moment, g i is the power weight coefficient of i, ξ pena is the relaxation penalty coefficient, γ(t k ) is the tth k Relaxation penalty variable at time, γ∈[0,1]; T L Optimizing a set of discrete moments for real-time power regulation; in, is the power optimization sub-goal, is the dynamic response speed difference of each device, is the penalty term for relaxing constraints.

13. The method according to claim 11, characterized in that The calculation formula for the operating power constraint of the source-grid hydrogen-ammonia combined system includes: P i,min ≤P i (t k )≤P i,max The calculation formula of the power variation constraint includes: ΔP i,min ≤ΔP i (t k )≤ΔP i,max The calculation formula of the state constraint of the source-grid hydrogen-ammonia combined system includes: The calculation formula of the real-time power balance equation constraint includes: In the above formula, Z = {PV, Hydro, el, grid, NH3}, PV is photovoltaic power generation, Hydro is hydroelectric power generation, el is hydrogen production by water electrolysis, grid is grid interaction, NH3 is synthetic ammonia, T L Optimizing discrete time sets for real-time power control; P i (t k ) is the tth k The power at time i, P i,max is the maximum power of i, P i,min is the minimum power value of i; ΔP i (t k ) is the tth k The power change at time i, ΔP i,max is the maximum power change of i, ΔP i,min are the minimum power variation of i; γ(t k ) is the tth k The relaxation penalty variable at the time, γ∈[0,1]; V Hyo,min is the minimum value of the relaxation penalty range of the storage capacity state, is the minimum soft constraint value of the storage capacity state, v Hyo,min is the minimum value of the relaxation penalty range of the storage capacity state, V(t k ) is the tth k Storage capacity status at the moment; is the maximum soft constraint value of storage capacity, v Hyo,max is the maximum value of the relaxation penalty range of the storage capacity state, V Hyo,max is the maximum value of storage capacity, LOH min is the minimum value of hydrogen storage state, is the soft constraint minimum value of hydrogen storage state, v LOH,min is the minimum value of the relaxation penalty range of the hydrogen storage state, LOH(t k ) is the tth k The hydrogen storage state value at the moment, is the maximum soft constraint value of hydrogen storage state, v LOH,max is the maximum value of the relaxation penalty range of the hydrogen storage state, LOH max is the maximum value of hydrogen storage state; P PV (t k ) is the tth k The real-time photovoltaic power at the moment, P PV,loss (t k ) is the tth k The real-time power of abandoned light at the moment, P Hydro (t k ) is the tth k The real-time hydropower power at the moment, P el (t k ) is the tth k The real-time power of hydrogen production by electrolysis at the moment, P NH3 (t k ) is the tth k Real-time ammonia production at each moment.

14. The method according to claim 1, characterized in that The sampling time of the optimization model of the economic optimization regulation layer is hourly; The sampling time of the optimization model of the real-time power optimization control layer is in the order of minutes.

15. A source-grid hydrogen-ammonia double-layer coordination optimization device based on model predictive control, characterized in that: include: An establishing unit is used to establish a source-grid hydrogen-ammonia double-layer coordinated optimization model based on model predictive control, wherein the double-layer coordinated optimization model includes: an economic optimization regulation layer optimization model and a real-time power optimization regulation layer optimization model; A first acquisition unit is used to input the predicted power of new energy at the predicted time into the optimization model of the economic optimization regulation layer to obtain an economic optimization result; A second acquisition unit is used to input the real-time power of the new energy in a preset time period and the economic optimization result into the optimization model of the real-time power optimization control layer to obtain the power optimization result; The optimization unit is used to optimize the operation and control of the whole working condition of the source-grid hydrogen-ammonia combined system at the predicted time according to the power optimization result.

16. An electronic device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the source-grid hydrogen-ammonia dual-layer coordinated optimization method based on model predictive control as described in any one of claims 1 to 14 is implemented.

17. A readable storage medium, characterized in that: An execution program is stored thereon, and when the execution program is executed, the source-grid hydrogen-ammonia double-layer coordinated optimization method based on model predictive control as described in any one of claims 1 to 14 is implemented.

Citation Information

Cited By

  • Multi-time scale electro-hydrogen-ammonia coupling system double-layer time sequence operation simulation method and system

    CN120470908B