Real-time optimization method for energy consumption in fertilizer production

By constructing a combination of chemical reaction kinetic equations and data-driven models, real-time energy consumption prediction values are generated and dynamically optimized, the energy consumption lag problem caused by multivariable coupling in fertilizer production is solved, real-time optimization of energy consumption and rapid adjustment of parameters are achieved.

CN120233747BActive Publication Date: 2025-08-19YANGLING LINKE ECOLOGICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510706479.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-19
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

Multivariable dynamic coupling during fertilizer production leads to lag in real-time energy consumption optimization, and it is impossible to quickly generate the optimal production parameter combination. The traditional static optimization model cannot adapt to equipment aging and raw material fluctuations, resulting in energy consumption being higher than the theoretical optimal value for a long time.

Method used

A mechanism sub-model based on the kinetic equation of chemical reactions is constructed, combined with the data-driven model and real-time sensor data, and a fusion energy consumption prediction value is generated through the dynamic weight allocation module, and a rolling optimization algorithm is used to generate production parameter adjustment instructions, and a deviation feedback mechanism is set for online fine-tuning.

Benefits of technology

Significantly reduce the energy consumption of fertilizer production, realize real-time decoupling and optimization regulation of multivariate dynamic coupling, quickly generate the optimal production parameter combination, and reduce energy consumption optimization lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120233747B_ABST
    Figure CN120233747B_ABST
Patent Text Reader

Abstract

The real-time optimization method for fertilizer production energy consumption provided by the present application specifically relates to the field of industrial process optimization and control technology based on artificial intelligence. The method constructs a mechanism sub-model based on the chemical reaction kinetics equation and outputs a theoretical energy consumption constraint value; at the same time, the data-driven model receives the temperature, pressure and raw material ratio data collected by the real-time sensor to output a real-time energy consumption prediction value. The theoretical energy consumption constraint value and the real-time energy consumption prediction value are input into the dynamic weight distribution module to generate a fused energy consumption prediction value. Based on the fused energy consumption prediction value, a production parameter adjustment instruction is generated through a rolling optimization algorithm and sent to the production execution system. If the deviation between the data collected after the execution of the adjustment instruction and the fused energy consumption prediction value exceeds a preset threshold, the data-driven model parameters are fine-tuned online. The method solves the technical problem that the dynamic coupling of multiple variables in the fertilizer production process causes the real-time energy consumption optimization to lag and the optimal production parameter combination cannot be quickly generated, thereby significantly reducing the energy consumption of fertilizer production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial process optimization control based on artificial intelligence, and in particular to a real-time optimization method for fertilizer production energy consumption. Background Art

[0002] In recent years, with the intensification of agriculture, the scale of fertilizer production has continued to expand, but high energy consumption has become increasingly prominent. Driven by the "dual carbon" goals, reducing energy consumption in fertilizer manufacturing has become an industry imperative. However, the fertilizer production process involves the dynamic coupling of multiple variables such as temperature, pressure, and raw material ratios, and the existence of nonlinear time-varying correlations between these variables makes it difficult for traditional static optimization models to capture real-time changes in operating conditions. Actual energy consumption has long been 15%-20% higher than the theoretical optimal value, seriously hindering the improvement of corporate energy efficiency.

[0003] Current mainstream approaches primarily rely on offline data modeling (such as LSTM prediction) or static optimization control based on mechanistic equations. The former relies on historical data training and cannot adapt to real-time operating conditions such as equipment aging and raw material fluctuations. While the latter incorporates domain knowledge constraints, it ignores the dynamic coupling effects of variables, causing optimization instructions to lag behind actual production pace. While some research has attempted to integrate data and mechanistic models, fixed weight allocation strategies struggle to balance theoretical constraints with real-time data. Consequently, control delays exceed 10 seconds in dynamic coupling scenarios, making them unable to meet the demands of minute-level real-time optimization.

[0004] In summary, how to solve the technical problem of how to solve the dynamic coupling of multiple variables in the fertilizer production process, which leads to the lag in real-time energy consumption optimization and the inability to quickly generate the optimal production parameter combination, is an urgent problem to be solved. Summary of the Invention

[0005] The main purpose of the present invention is to provide a real-time optimization method for fertilizer production energy consumption, so as to solve the technical problem that the dynamic coupling of multiple variables in the fertilizer production process leads to a lag in real-time energy consumption optimization and an inability to quickly generate the optimal production parameter combination, thereby realizing real-time decoupling and optimization regulation of the dynamic coupling of multiple variables, significantly reducing the energy consumption of fertilizer production and quickly generating the optimal production parameter combination.

[0006] In order to achieve the above object, the present invention provides a real-time optimization method for energy consumption in fertilizer production.

[0007] The present invention provides a method for real-time optimization of energy consumption in fertilizer production, the method comprising:

[0008] Construct a mechanism sub-model based on the chemical reaction kinetics equation and output the theoretical energy consumption constraint value;

[0009] The data-driven model receives temperature, pressure and raw material ratio data collected by real-time sensors and outputs real-time energy consumption prediction values;

[0010] Inputting the theoretical energy consumption constraint value and the real-time energy consumption prediction value into a dynamic weight allocation module to generate a fused energy consumption prediction value;

[0011] Based on the fused energy consumption prediction value, a production parameter adjustment instruction is generated through a rolling optimization algorithm and sent to a production execution system;

[0012] When the deviation between the adjusted temperature, pressure and raw material ratio data collected by the production execution system after executing the adjustment instruction and the fusion energy consumption prediction value exceeds a preset threshold, the parameters of the data-driven model are fine-tuned online.

[0013] Specifically, the mechanism sub-model is constructed based on the chemical reaction kinetics equation to output the theoretical energy consumption constraint value, including:

[0014] According to the Arrhenius equation of urea synthesis reaction, the reaction rate boundary conditions of temperature, pressure and raw material concentration are set;

[0015] Based on the reaction rate boundary conditions, the theoretical energy consumption constraint value is calculated by solving the chemical equilibrium equation.

[0016] Specifically, the data-driven model receives temperature, pressure, and raw material ratio data collected by real-time sensors and outputs real-time energy consumption prediction values, including:

[0017] Inputting the temperature, pressure and raw material ratio data into a time series graph neural network to extract multivariate dynamic coupling characteristics;

[0018] Based on the dynamic coupling feature, a real-time energy consumption prediction value having the same dimension as the theoretical energy consumption constraint value is output through a fully connected layer.

[0019] Specifically, the step of inputting the theoretical energy consumption constraint value and the real-time energy consumption prediction value into a dynamic weight allocation module to generate a fused energy consumption prediction value includes:

[0020] According to the real-time working condition error, the weight coefficient α of the mechanism sub-model and the weight coefficient β of the data-driven model are calculated through the attention mechanism, where α+β=1;

[0021] Based on the weight coefficients α and β, the theoretical energy consumption constraint value and the real-time energy consumption prediction value are weighted and summed to generate the fused energy consumption prediction value.

[0022] Specifically, the step of generating a production parameter adjustment instruction through a rolling optimization algorithm and sending the instruction to the production execution system includes:

[0023] Update the dynamic Bayesian optimization objective function every 5 minutes based on the fusion energy consumption prediction value within the rolling time window, where the duration of the rolling time window is 2 hours;

[0024] The current optimal temperature setting value and raw material flow rate are solved by the objective function, and a production parameter adjustment instruction is generated and sent to the production execution system.

[0025] Specifically, when the deviation between the adjusted temperature, pressure and raw material ratio data collected by the production execution system after executing the adjustment instruction and the fusion energy consumption prediction value exceeds a preset threshold, it includes:

[0026] Calculate the real-time energy consumption value through the energy consumption metering equation according to the adjusted temperature, pressure and raw material ratio data;

[0027] The absolute value of the relative deviation between the real-time energy consumption actual value and the fused energy consumption prediction value is calculated, and online fine-tuning is triggered when the absolute value exceeds 5%.

[0028] Specifically, the online fine-tuning of the parameters of the data-driven model includes:

[0029] Freezing the parameters of the mechanism sub-model and the hidden layer parameters of the data-driven model;

[0030] Calculating the gradient of the output layer parameters of the data-driven model based on the adjusted temperature, pressure and raw material ratio data;

[0031] The output layer parameters are updated according to the gradient until the absolute value of the relative deviation between the real-time energy consumption actual value and the fused energy consumption prediction value is less than 5%.

[0032] The present application provides a real-time optimization method for fertilizer production energy consumption. The method first constructs a mechanism sub-model based on the chemical reaction kinetics equation to output a theoretical energy consumption constraint value, providing a theoretical benchmark for energy consumption optimization. At the same time, a data-driven model is used to receive temperature, pressure and raw material ratio data collected by real-time sensors, and output a real-time energy consumption prediction value to reflect the actual production energy consumption status. The above-mentioned theoretical energy consumption constraint value and the real-time energy consumption prediction value are input into the dynamic weight distribution module to generate a fused energy consumption prediction value. Based on this fused value, a production parameter adjustment instruction is generated by a rolling optimization algorithm and sent to the production execution system. If, after the adjustment instruction is executed, the deviation between the collected adjusted data and the fused energy consumption prediction value exceeds a preset threshold, the data-driven model parameters are fine-tuned online to achieve dynamic and precise optimization of energy consumption. This method solves the technical problem that the dynamic coupling of multiple variables in the fertilizer production process leads to a lag in real-time energy consumption optimization and the inability to quickly generate the optimal production parameter combination, thereby significantly reducing the energy consumption of fertilizer production. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:

[0034] Figure 1 Schematic diagram of the process flow of the real-time optimization method for fertilizer production energy consumption provided in this application.

[0035] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0036] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] The terms "first," "second," "third," "fourth," and so forth (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the present invention described herein can be practiced in sequences other than those illustrated or described herein.

[0038] In the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0039] The present application provides a real-time optimization method for fertilizer production energy consumption. This method constructs a mechanism sub-model based on the chemical reaction kinetics equation to obtain theoretical energy consumption constraint values, laying the theoretical foundation for energy consumption optimization. It also uses a data-driven model combined with real-time sensor data to output real-time energy consumption forecast values, reflecting the actual production energy consumption dynamics. The two are then input into a dynamic weight distribution module to generate a fused energy consumption forecast value. Based on this, a rolling optimization algorithm is used to generate production parameter adjustment instructions, which are then fed back to the production end. If the data deviation exceeds the threshold after execution, the model parameters are fine-tuned.

[0040] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0041] Figure 1 The flowchart of the real-time optimization method for fertilizer production energy consumption provided in this application is as follows: Figure 1 As shown, the real-time optimization method for fertilizer production energy consumption provided in this embodiment includes:

[0042] S101: Construct a mechanism sub-model based on the chemical reaction kinetics equation and output the theoretical energy consumption constraint value.

[0043] Specifically, the mechanism sub-model is constructed based on the chemical reaction kinetics equation to output the theoretical energy consumption constraint value, including:

[0044] According to the Arrhenius equation of urea synthesis reaction, the reaction rate boundary conditions of temperature, pressure and raw material concentration are set;

[0045] Based on the reaction rate boundary conditions, the theoretical energy consumption constraint value is calculated by solving the chemical equilibrium equation.

[0046] The specific implementation steps of step S101 are as follows:

[0047] 1. Establish the Arrhenius equation for urea synthesis reaction:

[0048] According to the ammonia in urea synthesis reaction ( ) and carbon dioxide ( ) chemical reaction kinetics, the Arrhenius equation is constructed as follows:

[0049] ;

[0050] in:

[0051] is the reaction rate constant (mol·L -1 ·s -1 );

[0052] is the pre-exponential factor (mol·L -1 ·s -1 );

[0053] is the activation energy (J·mol -1 );

[0054] R is the ideal gas constant (8.314 J·mol-1 ·K -1 ), T is the reaction temperature (K).

[0055] In the urea synthesis reaction, A takes the value mol·L -1 ·s -1 , E a Value J.mol -1 .

[0056] 2. Set the reaction rate boundary conditions:

[0057] 2.1 Temperature boundary conditions: According to the requirements of the urea synthesis process, the reaction temperature range is set to 170℃ to 220℃, and the temperature data in the reactor is collected in real time through a temperature sensor.

[0058] 2.2 Pressure boundary conditions: According to the pressure resistance design of the reactor, the reaction pressure range is set to 10 MPa to 25 MPa, and the pressure data is collected in real time through the pressure sensor.

[0059] 2.3 Raw material concentration boundary conditions: According to the stoichiometric ratio of urea synthesis, the molar concentration ratio of ammonia to carbon dioxide in the raw material is set to 3.0:1 to 4.5:1, and the raw material ratio is monitored in real time by a flow meter.

[0060] 3. Calculate the theoretical energy consumption constraint value:

[0061] Based on the above boundary conditions, the material balance and energy balance equations are combined through the chemical balance equation:

[0062] 3.1 Material balance equation:

[0063] .

[0064] in, and are the real-time concentrations of ammonia and carbon dioxide (mol / L), respectively, and [N2] is the concentration of urea generated by the reaction.

[0065] 3.2 Energy balance equation:

[0066] .

[0067] in, is the theoretical energy consumption (kJ / h), is the enthalpy change of urea synthesis reaction (-117 kJ / mol), is the heat capacity of the reaction system (1.8 kJ·K -1 kg -1 ), dT / dt is the rate of temperature change.

[0068] Solve the above equations together to obtain the theoretical energy consumption constraint value , and use it as the output of the mechanism sub-model.

[0069] 4. Structure and input and output definitions of the mechanism sub-model:

[0070] Input layer: real-time data of temperature (T), pressure (P), ammonia concentration ([NH3]), and carbon dioxide concentration ([CO2]).

[0071] Computational layer: Contains numerical solution modules for the Arrhenius equation, material balance equation, and energy balance equation, and uses the fourth-order Runge-Kutta method to solve differential equations.

[0072] Output layer: theoretical energy consumption constraint value (kJ / h).

[0073] Step S101 accurately calculates the theoretical energy consumption constraint by establishing the Arrhenius equation and chemical equilibrium equation for the urea synthesis reaction, incorporating real-time boundary conditions of temperature, pressure, and feedstock concentration. This step addresses the significant deviation between static theoretical values and actual production, a problem encountered in traditional mechanism models due to their neglect of dynamic operating conditions. It provides a reliable theoretical constraint benchmark for the subsequent dynamic weight allocation module, laying the foundation for real-time optimization of multivariable coupled systems.

[0074] S102: Receive temperature, pressure and raw material ratio data collected by real-time sensors through a data-driven model, and output a real-time energy consumption prediction value.

[0075] Specifically, the data-driven model receives temperature, pressure, and raw material ratio data collected by real-time sensors and outputs real-time energy consumption prediction values, including:

[0076] Inputting the temperature, pressure and raw material ratio data into a time series graph neural network to extract multivariate dynamic coupling characteristics;

[0077] Based on the dynamic coupling feature, a real-time energy consumption prediction value having the same dimension as the theoretical energy consumption constraint value is output through a fully connected layer.

[0078] The specific implementation steps of step S102 are as follows:

[0079] 1. Real-time data preprocessing:

[0080] 1.1 The real-time data of the urea synthesis reactor are collected through the temperature sensor (PT100 type), pressure sensor (piezoresistive type, range 0-30 MPa) and raw material flow meter (electromagnetic flow meter, accuracy ±0.5%), including temperature (T, unit: ℃), pressure (P, unit: MPa), ammonia flow ( , unit: m³ / h), carbon dioxide flow rate ( , unit: m³ / h).

[0081] 1.2 Perform normalization on the above data:

[0082] .

[0083] Where x is the original data value, and They are the minimum and maximum values of temperature (170-220°C), pressure (10-25 MPa), ammonia flow rate (0.5-2.0 m³ / h), and carbon dioxide flow rate (0.2-1.0 m³ / h) in the historical data.

[0084] 2. Build a Temporal Graph Neural Network (TGNN) model:

[0085] 2.1 Input layer structure:

[0086] The input data is time series data with a time window length of 10 minutes (time step t=10). Each time step contains 4 nodes (temperature, pressure, ammonia flow, carbon dioxide flow), and the node feature dimension is 4.

[0087] 2.2 Graph structure definition:

[0088] Temperature, pressure, ammonia flow, and carbon dioxide flow are used as graph nodes. The Pearson correlation coefficient is used to calculate the dynamic correlation between variables in historical data. If the absolute value of the correlation coefficient between two variables is greater than 0.6, an edge connection is established.

[0089] 2.3 Graph Convolution Layer:

[0090] The GraphSAGE algorithm is used to perform graph convolution operations and aggregate adjacent node information:

[0091] .

[0092] in, For node v in Layer characteristics, For the The layer can be trained weight matrix, σ is the ReLU activation function, is the neighbor set of node v, is the feature mean of neighbor nodes, Represents the concatenation of the node's own features and the mean of its neighbors.

[0093] 2.4 Timing Processing Layer:

[0094] The node features output by the graph convolution are input into the gated recurrent unit (GRU) to capture the temporal dynamic features:

[0095] ;

[0096] ;

[0097] ;

[0098] .

[0099] in, and They are update gate and reset gate respectively. is a candidate hidden state, is the final hidden state, It is the node feature output by the graph convolution layer. is the trainable weight matrix of the update gate, is the trainable weight matrix of the reset gate, is the trainable weight matrix of the candidate hidden state.

[0100] 2.5 Fully connected output layer:

[0101] The hidden state (dimension 64) output by the GRU is input into the fully connected layer (number of neurons 32→16→1), the activation function is a linear function, and the real-time energy consumption prediction value (unit: kJ / h) is output, which is consistent with the dimension of the theoretical energy consumption constraint value in step S101.

[0102] 3. Model training and online inference:

[0103] 3.1 Training phase:

[0104] A historical dataset (containing 10,000 sets of samples of temperature, pressure, raw material flow, and corresponding actual energy consumption values) is used for supervised training, and the loss function is the mean square error (MSE):

[0105] .

[0106] in, represents the total number of samples, is the real-time energy consumption prediction value of the i-th sample, is the actual real-time energy consumption value of the i-th sample.

[0107] The optimizer uses Adam, the initial learning rate is 0.001, the batch size is 256, and the training iterations are 500.

[0108] 3.2 Online Reasoning Phase:

[0109] Receive sensor data every 30 seconds, update the time series data window, and output real-time energy consumption prediction values through the trained TGNN model.

[0110] Step S102 integrates the dynamic coupling relationships and time dependencies of multiple variables through a time-series graph neural network, addressing the inaccuracy of traditional data-driven models due to their neglect of nonlinear relationships between variables. Through a specific model structure (e.g., GraphSAGE+GRU), parameter settings (time step t=10, graph edge weight threshold >0.6), and training methods (Adam optimizer, MSE loss function), experiments have shown that this model reduces the relative error of energy consumption prediction in a urea production scenario from 8.2% compared to a traditional LSTM model to 3.5%, providing a high-precision real-time prediction benchmark for the dynamic weight allocation module.

[0111] S103: Input the theoretical energy consumption constraint value and the real-time energy consumption prediction value into a dynamic weight allocation module to generate a fused energy consumption prediction value.

[0112] Specifically, the step of inputting the theoretical energy consumption constraint value and the real-time energy consumption prediction value into a dynamic weight allocation module to generate a fused energy consumption prediction value includes:

[0113] According to the real-time working condition error, the weight coefficient α of the mechanism sub-model and the weight coefficient β of the data-driven model are calculated through the attention mechanism, where α+β=1;

[0114] Based on the weight coefficients α and β, the theoretical energy consumption constraint value and the real-time energy consumption prediction value are weighted and summed to generate the fused energy consumption prediction value.

[0115] The specific implementation steps of step S103 are as follows:

[0116] 1. Calculate real-time working condition error:

[0117] 1.1 Definition of error vector :

[0118] Obtain the current sensor data from the production execution system in real time, including temperature T 实际 (Unit: °C), pressure P 实际 (Unit: MPa), ammonia flow rate Q NH3,实际 (Unit: m³ / h), carbon dioxide flow rate Q CO2,实际 (Unit: m³ / h).

[0119] The above data are compared with the theoretical value (T 理论 、P 理论 , Q NH3,理论 , Q CO2,理论 ) Calculate the absolute error item by item and construct the error vector:

[0120] =[|T 实际 T 理论 ∣,∣P 实际 P 理论 ∣,∣Q NH3,实际 Q NH3,理论 ∣,∣Q CO2,实际 Q CO2,理论 ∣].

[0121] 1.2 Normalization processing:

[0122] Error vector Perform maximum-minimum normalization so that the value range of each dimension is between [0,1]:

[0123] .

[0124] in, and is the minimum and maximum value of the i-th error in the historical data (e.g., the temperature error range is 0-50°C, which corresponds to 0-1 after normalization).

[0125] 2. Calculate the weight coefficients α and β based on the multi-head attention mechanism:

[0126] 2.1 Attention Mechanism Structure:

[0127] Using Scaled Dot-Product Attention, define the following input:

[0128] Query vector: current error vector .

[0129] Key vector (Key): historical error matrix , which consists of 100 sets of error vectors in the past 2 hours (N=100).

[0130] Value vector: weight coefficient α of the mechanism sub-model corresponding to the historical moment 历史 and the data-driven model weight coefficient β 历史 The combination matrix .

[0131] 2.2 Attention score calculation:

[0132] .

[0133] in, =4 is the dimension of the key vector, = 2 is used for scaling to prevent gradient explosion.

[0134] 2.3 Multi-Head Attention (Multi-Head=2):

[0135] Linearly project the query, key, and value into two head spaces, calculate the attention independently, and then concatenate the results:

[0136] .

[0137] The output dimension of each head is 2, and finally passes through the linear layer Mapped to weight coefficients [α, β].

[0138] 2.4 Weight Normalization:

[0139] Use the softmax function to ensure that α+β=1:

[0140] , β=1- ;

[0141] in, and is the raw attention score, and The generation of is a direct result of the multi-head attention output.

[0142] 3. Generate fusion energy consumption prediction value:

[0143] 3.1 Weighted sum operation:

[0144] The theoretical energy consumption constraint value Q output by the mechanism sub-model 理论 (from step S101) and the real-time energy consumption prediction value Q output by the data-driven model 预测 (From step S102) Fusion by weight:

[0145] .

[0146] 3.2 Dimension consistency check:

[0147] Ensure Q 理论 With Q 预测 The dimensions are the same (unit: kJ / h). If they are inconsistent, they are aligned through a linear transformation layer:

[0148] .

[0149] Among them, W align ∈ is a trainable parameter, b align ∈ is the bias term.

[0150] 4. Structure of dynamic weight allocation module:

[0151] 4.1 Input layer: receiving theoretical energy consumption constraint value Q 理论 (scalar) and real-time energy consumption prediction value Q 预测 (scalar).

[0152] 4.2 Attention calculation layer: Contains 2 multi-head attention modules, and the parameter dimensions are as follows:

[0153] Query the projection matrix W Q ∈ , key projection matrix W K ∈ , value projection matrix W V ∈ .

[0154] 4.3 Output layer: Generate fusion energy consumption prediction value Q 融合 ∈ , directly input into the rolling optimization module of step S104.

[0155] Step S103 dynamically assigns weights to the mechanistic model and the data-driven model through a multi-head attention mechanism, addressing the limitations of traditional static weighting methods, which are unable to adapt to sudden changes in operating conditions (such as a sudden drop in reaction rate due to raw material impurities). Experiments have shown that under abnormal operating conditions with a ±15% fluctuation in urea synthesis pressure, this module can adjust α from 0.7 to 0.3 within 3 seconds, reducing the deviation between the fused prediction and actual energy consumption from 12% to 4%.

[0156] S104: Based on the fused energy consumption prediction value, a production parameter adjustment instruction is generated through a rolling optimization algorithm and sent to a production execution system.

[0157] Specifically, the step of generating a production parameter adjustment instruction through a rolling optimization algorithm and sending the instruction to the production execution system includes:

[0158] Update the dynamic Bayesian optimization objective function every 5 minutes based on the fusion energy consumption prediction value within the rolling time window, where the duration of the rolling time window is 2 hours;

[0159] The current optimal temperature setting value and raw material flow rate are solved by the objective function, and a production parameter adjustment instruction is generated and sent to the production execution system.

[0160] The specific implementation steps of step S104 are as follows:

[0161] 1. Rolling time window data management:

[0162] 1.1 Time window definition: The fusion energy consumption prediction value sequence within the last 2 hours is intercepted every 5 minutes to form the time window data. The time window contains 24 data points (2 hours × 60 minutes / 5 minutes), denoted as { }.

[0163] 1.2 Data update rules: When new data points When it arrives, remove the oldest data point , keeping the window length fixed at 24 points.

[0164] 2. Dynamic Bayesian optimization objective function construction:

[0165] 2.1 Objective Function Form: Based on the Gaussian Process (GP) agent model, the optimization objective is defined as minimizing the expected energy consumption in the next 5 minutes:

[0166] .

[0167] in, is the temperature setting value (℃), =[Q NH3 ,Q CO2 ] is the flow rate of ammonia and carbon dioxide (m³ / h), =0.5 is the risk trade-off coefficient, represents the conditional mathematical expectation, represents the conditional variance, It is the predicted value of fusion energy consumption in the next 5 minutes.

[0168] 2.2 Gaussian process model parameters:

[0169] Kernel function: A combination of radial basis function (RBF kernel) and white noise kernel:

[0170] .

[0171] in, =1.2 is the signal variance, =0.8 is the length scale, =0.1 is the noise variance, and δ is the Dirac function.

[0172] Input features: temperature setpoint, ammonia flow rate, carbon dioxide flow rate, a total of 3 dimensions.

[0173] 3. Constraint setting:

[0174] Temperature constraint: According to the safety regulations of the reactor, the set temperature range is 170℃≤T设定 ≤220℃.

[0175] Raw material flow constraint: ammonia flow Q NH3 ∈[0.5,2.0]m³ / h, carbon dioxide flow rate Q CO2 ∈[0.2,1.0]m³ / h.

[0176] Dynamic constraints: Temperature change rate within adjacent time windows ≤ 5°C / 5 minutes, flow rate change rate ≤ 0.3 m³ / h / 5 minutes.

[0177] 4. Optimal parameter solution:

[0178] 4.1 Optimization algorithm: Bayesian optimization guided by the expected improvement (EI) acquisition function:

[0179] .

[0180] in, is the minimum energy consumption observation value in the current time window, stands for conditional mathematical expectation.

[0181] 4.2 Solution process:

[0182] 4.2.1 Initialization: Randomly sample 50 groups (T 设定 ,Q NH3 ,Q CO2 ) as the initial data set.

[0183] 4.2.2 Iterative Optimization:

[0184] Step 1: Fit the target function f(x) using Gaussian process.

[0185] Step 2: Maximize the EI acquisition function through the L-BFGS-B algorithm to obtain the candidate solution x 候选 .

[0186] Step 3: Evaluate f(x 候选 ), update the dataset.

[0187] Repeat steps 1-3 until 50 iterations or the objective function change rate is <1%.

[0188] 4.2.3 Output the optimal solution: Select the parameter combination with the smallest f(x) from the final data set ( ).

[0189] 5.Generate production parameter adjustment instructions:

[0190] 5.1 Command encoding: Convert optimal parameters into Modbus RTU protocol commands:

[0191] Temperature setting command: Function code 06, register address 0x0001, data value ×10 (integer, resolution 0.1°C).

[0192] Ammonia flow setting instruction: Function code 16, register address 0x0010, data value ×1000 (integer, resolution 0.001 m³ / h).

[0193] 5.2 Sending commands: Send command packets to the production execution system (such as Siemens SIMATIC PCS 7) via the OPC UA protocol. The response timeout is set to 3 seconds, and the system will retransmit the command three times if it fails.

[0194] Step S104 solves the instruction lag problem caused by time-varying operating conditions in traditional static optimization models by combining a rolling time window with dynamic Bayesian optimization. Experiments show that under a ±10% pressure fluctuation in the urea synthesis reactor, this step can adjust the temperature setpoint to the optimal value within 5 minutes (with an error of ±0.5°C), and the ammonia flow control accuracy reaches ±0.05 m³ / h, reducing energy consumption by 12.7% compared to traditional PID control. By specifying the Gaussian process kernel parameters ( =1.2, =0.8), constraint conditions (temperature change rate ≤ 5°C / 5 minutes), and protocol instruction format (Modbus RTU) ensure that technical personnel in this field can directly implement the rolling optimization process and achieve real-time optimal control of multivariable coupled systems.

[0195] S105: When the deviation between the adjusted temperature, pressure and raw material ratio data collected by the production execution system after executing the adjustment instruction and the fusion energy consumption prediction value exceeds a preset threshold, the parameters of the data-driven model are fine-tuned online.

[0196] Specifically, when the deviation between the adjusted temperature, pressure and raw material ratio data collected by the production execution system after executing the adjustment instruction and the fusion energy consumption prediction value exceeds a preset threshold, it includes:

[0197] Calculate the real-time energy consumption value through the energy consumption metering equation according to the adjusted temperature, pressure and raw material ratio data;

[0198] The absolute value of the relative deviation between the real-time energy consumption actual value and the fused energy consumption prediction value is calculated, and online fine-tuning is triggered when the absolute value exceeds 5%.

[0199] Specifically, the online fine-tuning of the parameters of the data-driven model includes:

[0200] Freezing the parameters of the mechanism sub-model and the hidden layer parameters of the data-driven model;

[0201] Calculating the gradient of the output layer parameters of the data-driven model based on the adjusted temperature, pressure and raw material ratio data;

[0202] The output layer parameters are updated according to the gradient until the absolute value of the relative deviation between the real-time energy consumption actual value and the fused energy consumption prediction value is less than 5%.

[0203] The specific implementation steps of step S105 are as follows:

[0204] 1. Real-time energy consumption actual value calculation

[0205] 1.1 Data Collection:

[0206] Read adjusted real-time data from the Modbus TCP interface of the production execution system, including:

[0207] Reactor temperature T 实际 (Unit: °C, accuracy ±0.5 °C, acquisition frequency 1 Hz);

[0208] Reactor pressure P 实际 (Unit: MPa, range 0-30MPa, accuracy ±0.1%);

[0209] Ammonia flow Q NH3,实际 (Unit: m³ / h, electromagnetic flowmeter, accuracy ±0.5%);

[0210] Carbon dioxide flow Q CO2,实际 (Unit: m³ / h, Coriolis flowmeter, accuracy ±0.2%).

[0211] 1.2 Energy consumption measurement equation:

[0212] Based on the first law of thermodynamics, the real-time energy consumption value Q 实际 (kJ / h) is calculated as follows:

[0213] .

[0214] in:

[0215] = −117 kJ / mol: Molar enthalpy change of the urea synthesis reaction (negative value for exothermicity).

[0216] : Urea production rate (mol / h), measured by chromatographic analyzer of the material at the reactor outlet.

[0217] =1.8kJ\cdotpK-1 \cdotpkg -1 : Average specific heat capacity of the reaction system.

[0218] : Temperature change rate (K / h), calculated by the difference of temperature sensor data.

[0219] 2. Deviation calculation and fine-tuning trigger

[0220] 2.1 Calculation of relative deviation:

[0221] The real-time energy consumption actual value Q 实际 Combined with the fusion energy consumption prediction value Q generated in step S103 融合 contrast:

[0222] Deviation = ×100%.

[0223] Trigger condition: If the absolute value of the deviation is greater than 5%, online fine-tuning of the data-driven model is triggered.

[0224] Example: If Q 实际 =1000kJ / h, Q 融合 =950kJ / h, the deviation is 5%, no triggering; if

[0225] Q 融合 =940kJ / h, the deviation is 6%, triggering fine-tuning.

[0226] 3. Online fine-tuning of data-driven models

[0227] 3.1 Parameter freezing rules:

[0228] Mechanism submodel parameter freeze: stop updating the activation energy E in the Arrhenius equation a , pre-exponential factor A, enthalpy change ΔH of the chemical equilibrium equation r .

[0229] Data-driven model hidden layer freezing:

[0230] GraphSAGE weight matrix of the temporal graph neural network (TGNN) and the hidden state parameters of the GRU layer Fixed and unchanged.

[0231] Freezing range: the input layer of TGNN to the output layer of the last GRU.

[0232] 3.2 Output layer gradient calculation and update:

[0233] Loss Function: Mean Squared Error (MSE)

[0234] .

[0235] Where N is the number of samples in the current batch (the default is 32 sets of continuous time series data).

[0236] Optimizer: Stochastic Gradient Descent (SGD) with learning rate η = 0.001 and momentum μ = 0.9.

[0237] Gradient calculation:

[0238] Forward propagation: Input the adjusted temperature, pressure, and raw material ratio data into TGNN, and only calculate the predicted value Q of the output layer (fully connected layer) 预测 .

[0239] Back propagation: Calculate the loss function for the output layer weight W 输出 ∈ and bias b 输出 ∈ Gradient .

[0240] Parameter update:

[0241] ;

[0242] .

[0243] Termination conditions:

[0244] Fine-tuning continues until the absolute value of the relative deviation is ≤5% or the maximum number of iterations (100) is reached.

[0245] 4. Model structure and data flow

[0246] 4.1 Online fine-tuning structure of data-driven model (TGNN):

[0247] Input layer: Frozen hidden layer output (dimension 64), from the final hidden state of the GRU.

[0248] Trainable output layer: single-layer fully connected network with parameter W 输出 and b 输出 .

[0249] Output: Real-time energy consumption prediction value Q 预测 (scalar).

[0250] Data flow example:

[0251] Enter adjusted data: T 实际 =185℃, P 实际 =15.2MPa, Q NH3,实际 =1.2m³ / h, Q CO2,实际 =0.5m³ / h.

[0252] Frozen TGNN hidden layer output feature vector: h GRU ∈ .

[0253] Output layer calculation: .

[0254] Step S105, through dynamic parameter freezing and directed gradient updates, addresses the problem of prediction inaccuracy in data-driven models caused by sudden operating conditions (such as feedstock impurities or equipment aging). Experiments show that under abnormal operating conditions with a 20% surge in ammonia flow, this step can reduce the prediction error from 7.3% to 3.8% within 10 iterations (approximately 30 seconds). Freezing the hidden layer parameters also mitigates the risk of model overfitting. The specified loss function (MSE), optimizer parameters (SGD, η=0.001), and freezing range (GraphSAGE and GRU layers) ensure that technical personnel can directly perform online fine-tuning, ensuring the long-term prediction stability of the multivariable coupled system.

[0255] This embodiment provides a real-time optimization method for fertilizer production energy consumption, effectively improving energy conservation and consumption reduction in fertilizer production. This method innovatively integrates mechanism-based and data-driven technologies. First, a mechanism sub-model based on chemical reaction kinetics equations is constructed to accurately output theoretical energy consumption constraints, providing a reliable theoretical boundary for energy consumption optimization. Simultaneously, a data-driven model is built to integrate multidimensional data collected by real-time sensors, such as temperature, pressure, and raw material ratios, to output real-time energy consumption predictions, accurately capturing fluctuations in actual production energy consumption. These data are input into a dynamic weight allocation module to generate a fused energy consumption prediction that combines theoretical reliability with real-time data. Based on this prediction, a rolling optimization algorithm is used to dynamically generate production parameter adjustment instructions, enabling adaptive control of the production process. Furthermore, a deviation feedback mechanism is implemented. When the deviation between the collected data and the fused energy consumption prediction exceeds a preset threshold after executing the adjustment instruction, the data-driven model parameters are fine-tuned online. This creates a closed-loop "prediction-control-feedback-optimization" system, ensuring sustained and stable energy consumption optimization. This method addresses the technical issue of dynamic coupling of multiple variables in the fertilizer production process, which leads to lags in real-time energy consumption optimization and the inability to quickly generate optimal production parameter combinations. This significantly reduces fertilizer production energy consumption.

[0256] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the apparatus disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0257] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0258] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for real-time optimization of fertilizer production energy consumption, characterized in that: include: A mechanism sub-model is constructed based on the chemical reaction kinetics equation to output the theoretical energy consumption constraint value. Specifically, the model includes: setting reaction rate boundary conditions of temperature, pressure, and raw material concentration according to the Arrhenius equation of the urea synthesis reaction; and solving the theoretical energy consumption constraint value through the chemical equilibrium equation based on the reaction rate boundary conditions; The data-driven model receives temperature, pressure and raw material ratio data collected by real-time sensors and outputs real-time energy consumption prediction values; According to the real-time working condition error, the weight coefficient α of the mechanism sub-model and the weight coefficient β of the data-driven model are calculated through the attention mechanism, where α+β=1; Based on the weight coefficients α and β, the theoretical energy consumption constraint value and the real-time energy consumption prediction value are weighted and summed to generate a fused energy consumption prediction value; Based on the fused energy consumption prediction value, a production parameter adjustment instruction is generated through a rolling optimization algorithm and sent to a production execution system; When the deviation between the adjusted temperature, pressure and raw material ratio data collected by the production execution system after executing the adjustment instruction and the fusion energy consumption prediction value exceeds a preset threshold, the parameters of the data-driven model are fine-tuned online.

2. The method according to claim 1, characterized in that The data-driven model receives temperature, pressure, and raw material ratio data collected by real-time sensors and outputs real-time energy consumption prediction values, including: Inputting the temperature, pressure and raw material ratio data into a time series graph neural network to extract multivariate dynamic coupling characteristics; Based on the dynamic coupling feature, a real-time energy consumption prediction value having the same dimension as the theoretical energy consumption constraint value is output through a fully connected layer.

3. The method according to claim 1, characterized in that The step of generating a production parameter adjustment instruction by a rolling optimization algorithm and sending the instruction to the production execution system includes: Update the dynamic Bayesian optimization objective function every 5 minutes based on the fusion energy consumption prediction value within the rolling time window, where the duration of the rolling time window is 2 hours; The current optimal temperature setting value and raw material flow rate are solved by the objective function, and a production parameter adjustment instruction is generated and sent to the production execution system.

4. The method according to claim 1, wherein When the deviation between the adjusted temperature, pressure and raw material ratio data collected by the production execution system after executing the adjustment instruction and the fusion energy consumption prediction value exceeds a preset threshold, it includes: Calculate the real-time energy consumption value through the energy consumption metering equation according to the adjusted temperature, pressure and raw material ratio data; The absolute value of the relative deviation between the real-time energy consumption actual value and the fused energy consumption prediction value is calculated, and online fine-tuning is triggered when the absolute value exceeds 5%.

5. The method according to claim 4, characterized in that The online fine-tuning of the parameters of the data-driven model includes: Freezing the parameters of the mechanism sub-model and the hidden layer parameters of the data-driven model; Calculating the gradient of the output layer parameters of the data-driven model based on the adjusted temperature, pressure and raw material ratio data; The output layer parameters are updated according to the gradient until the absolute value of the relative deviation between the real-time energy consumption actual value and the fused energy consumption prediction value is less than 5%.

Citation Information

Patent Citations

  • Fertilizer production intelligent low-energy-consumption control method capable of comprehensively utilizing flue gas waste heat

    CN116294538A

  • Regulation and control method and system for raw material ratio and parameter combination in nitrogen-phosphorus-potassium ternary fertilizer production

    CN119596872A