An optimal gas consumption implementation method for preventing pure ammonia engine aftertreatment from burning
By using a long short-term memory network model and dynamic programming algorithm, future operating conditions are predicted and control quantities are optimized, solving the burning problem of the aftertreatment system of a pure ammonia engine under transient operating conditions, achieving optimal gas consumption and temperature control, and improving the economy of the pure ammonia engine.
Patent Information
- Application Number
- CN202611285664.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-10
AI Technical Summary
Pure ammonia engine aftertreatment systems are prone to melting and deterioration of gas consumption and economy under transient operating conditions in commercial vehicles on the road. Existing technologies are difficult to effectively prevent melting and achieve optimal gas consumption.
A long short-term memory network model is used to predict future operating conditions. The exhaust temperature and ammonia concentration after the turbine are calculated by combining the vehicle dynamics and engine universal characteristic model. The catalyst temperature is simulated by a continuous stirred tank reactor model. The optimal control sequence, including throttle opening, gear and air-fuel ratio, is solved by dynamic programming algorithm to ensure that the catalyst temperature does not exceed the threshold and optimize gas consumption.
It effectively prevents the post-processing system from burning under transient conditions, achieves optimal gas consumption, reduces gas consumption by about 2%, avoids erosion caused by sudden temperature rise, and improves economic efficiency.
Smart Images

Figure CN123064589A_ABST
Abstract
Description
Technical Field
[0001] This application pertains to the field of commercial vehicles equipped with ammonia engines, and more specifically, relates to a method for achieving optimal gas consumption to prevent the aftertreatment of pure ammonia engines from melting. Background Technology
[0002] Currently, commercial vehicles used for road transport primarily use diesel, natural gas, and methanol as fuel. With the advancement of dual-carbon goals, the development of ammonia engines for road use is gradually underway, and related vehicles must meet emission regulations. In the past, pure ammonia engines were mostly used in the marine sector, where operating conditions were relatively stable. However, when ammonia engines are applied to commercial vehicles for road transport, the aftertreatment system operates under transient conditions. The large amount of ammonia gas emitted by the original engine is prone to leakage, which may not only cause abnormal temperature increases or even meltdown of the aftertreatment catalyst but also lead to a deterioration in fuel economy.
[0003] Therefore, how to prevent the aftertreatment system of a pure ammonia engine from melting under transient conditions and achieve optimal gas consumption is an urgent problem to be solved. Summary of the Invention
[0004] In view of the shortcomings of the prior art, the purpose of this application is to provide a method for achieving optimal gas consumption to prevent the aftertreatment system of a pure ammonia engine from melting, which can effectively prevent the aftertreatment system of a pure ammonia engine from melting under transient operating conditions and achieve optimal gas consumption.
[0005] To achieve the above objectives, in a first aspect, this application provides a method for achieving optimal gas consumption to prevent aftertreatment melting in a pure ammonia engine, comprising the following steps: S10, acquire the vehicle's historical driving data, which includes engine speed, engine torque, vehicle speed, road slope angle, and driving distance; S20, the historical driving data is input into a pre-trained long short-term memory network model to predict the predicted vehicle speed sequence and the predicted road slope sequence within a preset time period in the future; S30, based on the predicted vehicle speed sequence and the predicted road slope sequence, the engine speed sequence and engine torque sequence are calculated using the whole vehicle dynamics model. Based on the engine speed sequence and the engine torque sequence, combined with the air-fuel ratio, the exhaust temperature after the turbine and the original exhaust ammonia concentration and nitrogen oxide concentration at each moment are calculated using the engine universal characteristic model. S40, the exhaust temperature after the vortex and the original exhaust ammonia concentration and nitrogen oxide concentration are input into the continuous stirred tank reactor model to calculate the maximum temperature of the catalyst; S50, with the interval where the predicted vehicle speed sequence is located as a constraint, the maximum temperature of the catalyst not exceeding the preset temperature threshold as a limitation condition, and the goal of minimizing total gas consumption, the optimal control quantity sequence of each stage is solved by using dynamic programming algorithm in reverse recursion. The optimal control quantity sequence includes throttle opening, gear and air-fuel ratio, and every time the calculation step is repeated, step S20 is returned to be executed again, and the optimal control quantity at the current moment is output in a rolling time domain manner.
[0006] As a further preferred embodiment, in step S20, the long short-term memory network model includes a forgetting gate, an input gate, an output gate, and cell states, and the calculation formula for the long short-term memory network model is: f_t = sigma(W_f [h_{t-1}, x_t] + b_f) i_t = sigma(W_i [h_{t-1}, x_t] + b_i) C_t = f_t ( ) C_{t-1} + i_t ( ) tanh(W_c [h_{t-1}, x_t] + b_c) o_t = sigma(W_o [h_{t-1}, x_t] + b_o) h_t = o_t ( ) tanh(C_t) in, f_t Output for the forget gate, range [0,1]; sigma Use the Sigmoid activation function; W_f This is the forget gate weight matrix; h_{t-1} The hidden state from the previous moment; x_t The input vector for the current moment includes the normalized vehicle speed and road gradient; b_f This is the forget gate bias vector; i_t The input gate output has a range of [0,1]. W_i The input gate weight matrix; b_i The input gate bias vector; C_t This represents the current state of the cell. C_{t-1} This refers to the cell state at the previous moment; ) represents element-wise multiplication; tanh is the hyperbolic tangent activation function; W_c is the cell state weight matrix; b_c is the cell state bias vector; o_t is the output of the output gate, ranging from [0,1]; W_o is the output gate weight matrix; b_o is the output gate bias vector; h_t is the hidden state at the current time step.
[0007] As a further preferred embodiment, in step S30, the vehicle dynamics model is: F_t = F_f + F_w + F_i + F_j = m g f cos(alpha) + C_d A rho v^2 / 2 + m g sin(alpha) + delta m dv / dt in, F_t As the driving force; F_f F_w is rolling resistance; F_w is air resistance. F_i For slope resistance; F_j To increase resistance; m For the overall vehicle weight; g It is the acceleration due to gravity; f This is the rolling resistance coefficient; alpha The road slope angle; C_d This refers to the air drag coefficient; A For windward area; rho air density; v For vehicle speed; delta This is the rotational mass conversion factor; dv / dt To accelerate the vehicle.
[0008] As a further preferred embodiment, in step S30, the engine universal characteristic model calculates the ammonia mass flow rate based on the gas consumption rate corresponding to the engine speed and torque output, the exhaust temperature after the turbine, and the original exhaust ammonia and nitrogen oxide concentrations, and is corrected according to the actual air-fuel ratio, using the following formula: m_fuel = P_e bsfc(omega_e, T_e, lambda) / (3600 rho_fuel) in, m_fuel This refers to the mass flow rate of ammonia. P_e The engine's effective power is given by ; bsfc(omega_e, T_e, lambda) is the corrected fuel consumption rate, a function of engine speed, torque, and air-fuel ratio; omega_e is the engine speed; T_e is the engine torque; lambda is the excess air coefficient, i.e., the air-fuel ratio. rho_fuel Fuel density.
[0009] As a further preferred embodiment, in step S40, the continuous stirred tank reactor model adopts the homogenization assumption, and the physical and chemical reaction processes in the catalyst are described by a mass conservation equation, which is: d(eps_g w_k,g) / dt = -d(w_k,g m_g) / dz + MG_k,g Sum[nu_i,k r_i(c_k, T_s)] in, eps_g The porosity of the catalyst; w_k,g The mass fraction of exhaust component k; m_g Z represents the exhaust mass flow rate; z represents the axial position of the catalyst. MG_k,g Let k be the molar mass of the exhaust component. nu_i,k Let k be the stoichiometric coefficient of component k in reaction i; r_i(c_k, T_s) Let i be the reaction rate of reaction i; c_k The reactant concentration of exhaust component k; T_s The catalyst support temperature; t For time.
[0010] As a further preferred embodiment, the following chemical reactions and their rate equations are considered in the continuous stirred tank reactor model: NH3 + S NH3(S), rate equation: r1 = k1_ads c_NH3 (1 - theta_NH3) - k1_des theta_NH3 ; 4NH3 + 4NO + O2 -> 4N2 + 6H2O, Rate equation: r2 = k2 c_NO theta_NH3 (1 - theta_NH3) ; 4NH3 + 2NO + 2NO2 -> 4N2 + 6H2O, rate equation: r3 = k3 c_NO c_NO2 theta_ NH3 ; 8NH3 + 6NO2 -> 7N2 + 12H2O, rate equation: r4 = k4 c_NO2 theta_NH3 ; 4NH3 + 3O2 -> 2N2 + 6H2O, rate equation: r5 = k5 c_O2 theta_NH3 ; 2NO + O2 2NO2, rate equation: r6 = k6_f (c_NO)^2 c_O2 - k6_r (c_NO2)^2 ; Where S represents the active sites on the catalyst surface; NH3(S) represents adsorbed NH3. k1_ads The adsorption rate constant is denoted by . k1_ des This is the desorption rate constant; c_NH3 This refers to the concentration of NH3 in the gas phase. theta_NH3 NH3 surface coverage; k2 This is the standard SCR reaction rate constant; c_NO The concentration of NO; k3 This represents the rate constant for the fast SCR reaction; c_NO2 The concentration of NO2; k4 This is the rate constant for a slow SCR reaction; k5 The rate constant for the oxidation of NH3; c_O2 The concentration of O2; k6_f This represents the forward rate constant for the oxidation of NO. k6_r is the rate constant for the reverse reaction of NO oxidation.
[0011] As a further preferred embodiment, in step S50, the objective function of the dynamic programming algorithm is: J (x_0) = min_{u_0,u_1,...,u_{N-1}} Sum_{k=0 to N-1} L(x_k, u_k) + phi(x_N) The constraints are: T_cat(x_k, u_k)<= T_max,for all k in [0, N] in, J (x_0) The optimal total cost, i.e., the minimum total gas consumption, is the starting point from the initial state x_0. x_k Let be the state vector for the k-th stage, including vehicle speed, gear, and after-treatment temperature; u_kLet be the control vector for the k-th stage, which includes throttle opening, gear selection, and air-fuel ratio; L(x_k, u_k) The instantaneous cost of stage k is the gas consumption of that stage. phi(x_N) For the terminal cost function; N This represents the total number of stages; T_cat(x_k, u_k) The highest temperature of the catalyst when u_k is controlled in the k-th stage state x_k; T_max This represents the maximum permissible temperature limit for the aftertreatment catalyst.
[0012] As a further preferred embodiment, in step S50, the dynamic programming algorithm adopts a strategy of reverse optimization and forward solution, specifically including the following steps: Vehicle speed, gear, and after-processing temperature are discretized into finite grid points within a reasonable range; Starting from the Nth stage, all feasible control quantities are traversed for each discrete state point. The next state and post-processing temperature are calculated using the continuous stirred tank reactor model. If the temperature exceeds the preset temperature threshold, the control quantity is excluded. Otherwise, the gas consumption of the stage is calculated and the subsequent optimal cost is accumulated. The control quantity corresponding to the minimum cost is selected as the optimal control quantity for the state point. Starting from the initial state, the optimal control variables for each stage are applied sequentially to obtain a complete sequence of optimal control variables and the corresponding state trajectory.
[0013] As a further preferred embodiment, in step S50, the interval where the predicted vehicle speed sequence is located is the nearby interval of the predicted vehicle speed sequence, and the dynamic programming algorithm traverses the vehicle speed within the nearby interval to reduce computational complexity.
[0014] Secondly, this application provides an optimal gas consumption control system for preventing aftertreatment melting in a pure ammonia engine, employing the optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in any of the above claims, including: The data acquisition module is used to acquire the vehicle's historical driving data, which includes engine speed, engine torque, vehicle speed, road slope angle, and driving distance. The driving condition prediction module is used to input the historical driving data into a pre-trained long short-term memory network model to predict the predicted vehicle speed sequence and the predicted road slope sequence within a preset time period in the future. The vehicle and engine model calculation module is used to calculate the engine speed sequence and engine torque sequence using the vehicle dynamics model based on the predicted vehicle speed sequence and the predicted road slope sequence, and to calculate the exhaust temperature after the turbine, the original exhaust ammonia concentration and the nitrogen oxide concentration at each moment using the engine universal characteristic model based on the engine speed sequence and engine torque sequence and combined with the air-fuel ratio. The post-treatment temperature calculation module is used to input the exhaust temperature after the vortex and the original exhaust ammonia concentration and nitrogen oxide concentration into the continuous stirred tank reactor model to calculate the maximum temperature of the catalyst. The dynamic programming optimization module is used to solve the optimal control quantity sequence for each stage by using the interval where the predicted vehicle speed sequence is located as a constraint, the maximum temperature of the catalyst not exceeding a preset temperature threshold as a restriction condition, and the minimum total gas consumption as the objective. The optimal control quantity sequence includes throttle opening, gear position and air-fuel ratio. The module calls the operating condition prediction module again at every calculation step to output the optimal control quantity at the current moment in a rolling time domain manner.
[0015] The beneficial effects of this application are as follows: By using an LSTM model to predict future vehicle speed and road gradient based on historical driving data, the dynamic programming algorithm is provided with information on future operating conditions. This allows the dynamic programming algorithm to perform global optimization with the goal of minimizing total gas consumption, while ensuring that the after-treatment temperature remains below the target value. This achieves optimal fuel economy while avoiding ablation caused by a sudden temperature rise in the after-treatment system due to excessive ammonia emissions during transient operating conditions. Simultaneously, combined with the predicted information, the dynamic programming algorithm can accelerate uphill and decelerate downhill in advance to reduce speed and torque fluctuations, thereby optimizing the vehicle's speed trajectory and saving fuel. Furthermore, re-executing prediction and optimization at every calculation step forms rolling time-domain optimization, preventing the accumulation of prediction and model errors and ensuring the accuracy of control output. Through these methods, this approach can control the temperature of the after-treatment catalyst below a preset temperature threshold under transient operating conditions of pure ammonia engines used in roads, effectively preventing after-treatment system melting and achieving optimal gas consumption. Compared to traditional strategies, the operating condition distribution is closer to the optimal fuel consumption range of universal characteristics, thus reducing gas consumption. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the model framework provided in the embodiments of this application; Figure 2 This is a diagram illustrating the steps of the reverse dynamic programming solution provided in this application embodiment; Figure 3 This is a schematic diagram illustrating the burn-off caused by a sudden rise in post-processing temperature when this strategy is not adopted, provided in an embodiment of this application. Figure 4 This is a schematic diagram illustrating how the post-processing temperature is controlled within a reasonable range after adopting this strategy, as provided in an embodiment of this application. Figure 5 This is a comparison diagram of the operating condition distribution of the strategy provided in this application embodiment (left figure) and the traditional PID strategy (right figure). Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0018] This application provides an algorithm that utilizes LSTM prediction and dynamic programming to avoid after-treatment system ablation. This method uses historical road information and driving data to obtain the vehicle's driving conditions over a future period. Then, combining this with dynamic programming, it seeks the optimal air-fuel ratio control target that avoids high temperatures in the after-treatment system while achieving optimal economy under global driving conditions.
[0019] The core idea of this algorithm is to find the most economical driving method within a given distance that avoids ablation during post-processing. Let the gas consumption under the current operating conditions be A (L / 100km). Here, A varies with the operating conditions. Assume the vehicle is traveling between locations M and N, and divide this distance into multiple segments, each denoted as B1, B2, B3, B4, B5, B6, B7, B8, B9, B1, B1, B9, B1, B1, B2 ... 2,... B n The fuel consumption for each distance segment is recorded as A1, A2... A n The total consumption at locations M and N is (A1B1 + A2B2 + ... + A n B n Let C be the minimum value of C. This algorithm can calculate the minimum value of C, provide the most economical and reasonable driving advice at each moment, and obtain the most economical driving plan, which is the most cost-effective driving plan from point M to point N. At the same time, this optimal driving is based on the maximum temperature limit of post-processing.
[0020] This involves determining the optimal vehicle driving behavior (such as acceleration, braking, and gear shifting) and the relevant control rhythm of the ECU (such as air-fuel ratio) for each time period, in order to obtain the most economical driving method suitable for each road and avoid after-treatment.
[0021] To achieve the above objectives, this embodiment employs the following technical solution: It utilizes the multi-stage global optimization approach of dynamic programming, incorporating the predictive characteristics of future operating conditions to find control decisions that optimize global energy consumption. By using LSTM to predict future operating conditions and a dynamic programming algorithm, it achieves early acceleration uphill and early deceleration downhill, thereby reducing speed fluctuations and torque fluctuations. Furthermore, in the DP planning nodes, the post-processing temperature is consistently kept below the target value. This method optimizes the vehicle's speed trajectory, thereby achieving fuel savings and reduced energy consumption.
[0022] The LSTM algorithm is used to predict future vehicle driving conditions based on existing vehicle driving data, including but not limited to engine speed, engine torque, vehicle speed, road inclination angle, and road distance; as well as the fuel consumption and exhaust temperature corresponding to different engine air-fuel ratios. The core idea of the dynamic programming algorithm is "reverse optimization, forward solution," which decomposes the original multi-stage decision problem into multiple coupled sub-problems. The optimal decisions for each stage are obtained through reverse recursion, thus yielding a sequence of optimal solutions for the entire multi-stage decision problem.
[0023] The following section details the model framework ( Figure 1 ) and related algorithms.
[0024] (1) LSTM Model The model predicts future vehicle speeds and gradients based on historical vehicle speed and gradient information.
[0025] LSTM (Long Short-Term Memory) is an improved form of Recurrent Neural Network (RNN). By introducing a gating mechanism, it effectively avoids the gradient explosion and vanishing problems found in traditional RNNs. The memory cell architecture of LSTM consists of four core components: input gate, output gate, forget gate, and cell state, employing both sigmoid and tanh activation functions.
[0026] f_t = sigma(W_f [h_{t-1}, x_t] + b_f) (1) Where f_t is the forget gate output, dimensionless, in the range [0,1]; sigma is the sigmoid activation function, sigma(x)=1 / (1+e^(-x)); W_f is the forget gate weight matrix; h_{t-1} is the hidden state at the previous time step; x_t is the input vector at the current time step (normalized vehicle speed, slope, etc.); b_f is the forget gate bias vector.
[0027] i_t = sigma(W_i [h_{t-1}, x_t] + b_i) (2) Where i_t is the input gate output, dimensionless, in the range [0,1]; W_i is the input gate weight matrix; b_i is the input gate bias vector; h_{t-1} is the hidden state at the previous time step; and x_t is the input vector at the current time step.
[0028] C_t = f_t ( ) C_{t-1} + i_t ( ) tanh(W_c [h_{t-1}, x_t] + b_c) (3) Where C_t represents the current cell state; C_{t-1} represents the previous cell state; ) represents element-wise multiplication (Hadamard product); tanh is the hyperbolic tangent activation function, tanh(x)=(e^xe^(-x)) / (e^x+e^(-x)); W_c is the cell state weight matrix; b_c is the cell state bias vector.
[0029] o_t = sigma(W_o [h_{t-1}, x_t] + b_o);h_t = o_t ( ) tanh(C_t) (4) Where o_t is the output of the output gate, dimensionless, ranging from [0,1]; W_o is the output gate weight matrix; b_o is the output gate bias vector; h_t is the hidden state at the current time step (LSTM output); C_t is the cell state at the current time step; ) represents element-wise multiplication (Hadamard product).
[0030] The input vector xt of the LSTM model contains historical vehicle speed and road gradient information, which needs to be normalized (mapped to the interval [0,1] or [-1,1]). The final output of the model is Yt = Wy. ht + by represents the normalized predicted vehicle speed and gradient sequence, which is then denormalized to obtain the physical quantities. In this embodiment, the LSTM model predicts the vehicle speed and road gradient information for the next 40 seconds based on existing vehicle driving data (including historical information such as engine speed, torque, vehicle speed, road inclination angle, and driving distance).
[0031] (2) Vehicle Model The model converts future vehicle speed and gradient information into engine speed, torque, and gear information.
[0032] The vehicle adopts a one-dimensional longitudinal dynamics model oriented towards control, considering air resistance, rolling resistance, and gradient resistance. F_t = F_f + F_w + F_i + F_j = m g f cos(alpha) + C_d A rho v^2 / 2 + m g sin(alpha) + delta m dv / dt (5) Where F_t is the driving force, N; F_f is the rolling resistance, F_f = m g f cos(alpha), N; F_w is the air resistance, F_w = C_d A rho v^2 / 2, N; F_i is the slope resistance, F_i = m g sin(alpha), N; F_j is the acceleration resistance, F_j = delta m dv / dt, N; m is the vehicle mass, kg; g is the acceleration due to gravity, m / s²; f is the rolling resistance coefficient, dimensionless; alpha is the road slope angle, rad; C_d is the air resistance coefficient, dimensionless; A is the frontal area, m²; rho is the air density, kg / m³; v is the vehicle speed, m / s; delta is the rotational mass conversion factor, dimensionless; dv / dt is the vehicle acceleration, m / s².
[0033] The vehicle dynamics model transforms the future vehicle speed and gradient information predicted by LSTM into engine speed, torque, and transmission gear requirements, providing input for subsequent engine modeling and DP optimization.
[0034] (3) Engine Model The model converts speed and torque information into information on exhaust NH3 / NOx, after-vortex temperature, and gas consumption.
[0035] The engine employs a steady-state model based on a universal characteristic map. Different combustion modes (such as stoichiometric combustion and lean combustion) use different map data. Each map takes engine speed and torque as input and outputs the corresponding air-fuel ratio (or ammonia consumption rate), exhaust temperature after the turbine, and original exhaust NH3 / NOx concentration. Based on this, corrections are made according to the actual air-fuel ratio. m_fuel = P_e bsfc(omega_e, T_e, lambda) / (3600 rho_fuel) (6) Where m_fuel is the mass flow rate of fuel (ammonia), kg / s; P_e is the effective power of the engine, P_e = T_e omega_e / 9550, kW; bsfc(omega_e, T_e, lambda) is the corrected fuel consumption rate, a function of engine speed, torque, and air-fuel ratio, g / (kW) h); omega_e is the engine speed, r / min; T_e is the engine torque, N. m; lambda is the excess air coefficient (air-fuel ratio), dimensionless; rho_fuel is the fuel density, kg / m³. 3 .
[0036] The map data was obtained through engine bench testing and calibration, covering a speed-torque grid across the entire operating range. Bilinear interpolation was used between the map grid points to obtain the output values under continuous operating conditions.
[0037] (4) CSTR model The model converts the original exhaust NH3 / NOx and vortex back temperature information into T4 / T5 / T61 / T62 / T7 temperature information.
[0038] The CSTR (Continuous Stirred-Tank Reactor) model utilizes the homogenization assumption to solve the relevant partial differential equations within the catalyst. It describes the physical and chemical reaction processes within the catalyst using the mass conservation equation.
[0039] d(eps_g w_k,g) / dt = -d(w_k,g m_g) / dz + MG_k,g Sum[nu_i,k r_i(c_k, T_s)] (7) Where eps_g is the catalyst porosity, dimensionless; w_k,g is the mass fraction of exhaust component k, dimensionless; m_g is the exhaust mass flow rate, kg / s; z is the axial position of the catalyst, m; MG_k,g is the molar mass of exhaust component k, kg / mol; nu_i,k is the stoichiometric coefficient of component k in reaction i, dimensionless; r_i(c_k, T_s) is the reaction rate of reaction i, mol / (m 3 s); c_k is the reactant concentration of exhaust component k, mol / m3; T_s is the catalyst support temperature, K; t is time, s.
[0040] dc_k / dt = -d(c_k v) / dz + Sum[nu_i,k r_i(c_k, T_s)] (8) Where c_k is the concentration of exhaust component k, mol / m3; v is the exhaust linear velocity, m / s; nu_i,k is the stoichiometric coefficient of component k in reaction i, dimensionless; r_i(c_k, T_s) is the reaction rate of reaction i, mol / (m 3 s).
[0041] The model considers the following core chemical reactions, including NH3 adsorption / desorption, standard SCR reaction, fast SCR reaction, slow SCR reaction, and NH3 oxidation reaction. The key reaction equations are as follows: NH3 + S <=> NH3(S) [Adsorption / Desorption] (9) Rate equation: r1 = k1_ads c_NH3 (1 - theta_NH3) - k1_des theta_NH3 Where S represents the active sites on the catalyst surface; NH3(S) represents the adsorbed NH3; k1_ads is the adsorption rate constant, m 3 / (mol k1_des is the desorption rate constant, 1 / s; c_NH3 is the gaseous NH3 concentration, mol / m³. 3 Theta_NH3 is the surface coverage of NH3, which is dimensionless.
[0042] 4NH3 + 4NO + O2 -> 4N2 + 6H2O [Standard SCR](10) Rate equation: r2 = k2 c_NO theta_NH3 (1 - theta_NH3) Where k2 is the standard SCR reaction rate constant, m 3 / (mol s); c_NO is the concentration of NO, mol / m3; theta_NH3 is the surface coverage of NH3, dimensionless.
[0043] 4NH3 + 2NO + 2NO2 -> 4N2 + 6H2O [Fast SCR](11) Rate equation: r3 = k3 c_NO c_NO2 theta_NH3 Where k3 is the rate constant of the fast SCR reaction, (m3)2 / (mol2) s); c_NO is the concentration of NO, mol / m 3 c_NO2 represents the concentration of NO2, in mol / m³. 3 Theta_NH3 is the surface coverage of NH3, which is dimensionless.
[0044] 8NH3 + 6NO2 -> 7N2 + 12H2O [Slow SCR](12) Rate equation: r4 = k4 c_NO2 theta_NH3 Where k4 is the rate constant of the slow SCR reaction, m 3 / (mol s); c_NO2 is the concentration of NO2, mol / m 3 Theta_NH3 is the surface coverage of NH3, which is dimensionless.
[0045] 4NH3 + 3O2 -> 2N2 + 6H2O [NH3 is oxidized to N2](13) Rate equation: r5 = k5 c_O2 theta_NH3 Where k5 is the rate constant for the oxidation of NH3, m 3 / (mol s); c_O2 is the concentration of O2, mol / m 3 Theta_NH3 is the surface coverage of NH3, which is dimensionless.
[0046] 2NO + O2 <=> 2NO2 [NO oxidation] (14) Rate equation: r6 = k6_f (c_NO)^2 c_O2 - k6_r (c_NO2)^2 Where k6_f is the forward rate constant for NO oxidation, (m3)2 / (mol2) s); k6_r is the rate constant for the reverse reaction of NO oxidation, m3 / (mol) c_NO is the concentration of NO, mol / m3; c_NO2 is the concentration of NO2, mol / m3; c_O2 is the concentration of O2, mol / m3. 3 .
[0047] (5) DP optimization After obtaining the future sequence by solving the LSTM model, DP optimization is used to solve the sequence with optimal engine gas consumption under the boundary condition that the post-processing temperature is below the upper limit.
[0048] Every calculation step, all the above models will be calculated again to prevent the accumulation of prediction and model errors.
[0049] The core idea of Dynamic Programming (DP) is based on the Bellman optimality principle: an optimal policy has the following property, that is, regardless of the initial state and initial decision, all the remaining decisions must constitute an optimal policy with respect to the subsequent state formed by the first decision.
[0050] The above principle is applied to the optimal gas consumption problem under the aftertreatment temperature constraint of the pure ammonia engine in this patent, and a DP search architecture is established. The given travel distance is divided into N stages, each denoted as ds1, ds2, ..., dsN, and the corresponding gas consumption is denoted as J1, J2, ..., JN. The goal of DP is to find the control sequence that minimizes the total gas consumption under the constraint of the maximum aftertreatment temperature limit Tmax.
[0051] J (x_0) = min_{u_0,u_1,...,u_{N-1}} Sum_{k=0 to N-1} L(x_k, u_k) + phi(x_N) (15) Among them, J (x_0) represents the optimal total cost (minimum total gas consumption) starting from the initial state x_0, L; x_k is the state vector of the k-th stage (vehicle speed, gear, aftertreatment temperature, etc.); u_k is the control vector of the k-th stage (throttle opening, gear selection, air-fuel ratio, etc.); L(x_k, u_k) is the instantaneous cost (stage gas consumption) of the k-th stage, L; phi(x_N) is the terminal cost function, L; N is the total number of stages.
[0052] s.t.T_cat(x_k, u_k)<= T_max,for all k in [0, N] (16) Where T_cat(x_k, u_k) is the highest temperature of the catalyst when u_k is controlled in the k-th stage state x_k, deg C; T_max is the highest temperature limit allowed by the post-treatment catalyst (e.g. 651.8 deg C), deg C.
[0053] The dynamic programming (DP) solution employs a strategy of reverse optimization and forward solving: first, it recursively calculates the optimal cost function from the endpoint N back to the starting point 0, working from each state point to the endpoint; then, starting from the starting point, it searches forward along the gradient direction of the optimal cost function to obtain the optimal control decision sequence for each stage. Specifically, it includes the following steps (…). Figure 2 ): (1) State discretization: Discretize continuous state variables such as vehicle speed, gear, and after-treatment temperature into finite grid points within a reasonable range; (2) Reverse recursion: Starting from the Nth stage, for each discrete state point, traverse all feasible control variables, use the CSTR model to calculate the next state and post-processing temperature, if the temperature exceeds the limit, exclude the control; otherwise, calculate the gas consumption of the stage and accumulate the subsequent optimal cost, and select the control corresponding to the minimum cost as the optimal control for that state point. (3) Forward solution: Starting from the initial state, the optimal control decisions of each stage are applied in sequence to obtain the complete optimal control sequence and the corresponding state trajectory.
[0054] During DP search, it is unnecessary to traverse all possible vehicle speeds; instead, the search is limited to the interval near the vehicle speed predicted by LSTM, thus significantly reducing computational complexity. Every one computational step (e.g., 1 second), all the above models (LSTM prediction, vehicle model, engine model, CSTR model, and DP optimization) are re-executed, forming a rolling horizontal optimization to prevent the accumulation of prediction and model errors.
[0055] The following examples illustrate this: Based on existing actual road spectrum information (including vehicle speed, road slope, etc.), the actual parameters of the LSTM model are calculated by simulation, and the accuracy of the model is verified by existing data, so that the LSTM module can accurately predict vehicle speed and road slope information in the next 40 seconds.
[0056] Based on actual road driving, let the current time be T0, and input the vehicle speed and road slope signal at time T0 into the model.
[0057] Based on the input at time T0, the LSTM module predicts the vehicle speed and road gradient information from time T1 to T40.
[0058] The solution is obtained by dynamic programming, which determines the optimal air consumption, engine torque, speed, gear, and air-fuel ratio signals required for the vehicle to reach its speed and position at time T40 from T39, while ensuring that the after-processing does not exceed the temperature limit.
[0059] The dynamic programming solution is used to obtain the engine torque, speed, and gear signal from time T39 to time T40, as well as the actual operation signals required: brake, accelerator, and gear signals.
[0060] Iteratively calculate all driving steps T38—T39, T37—T38…T0—T1, and continuously output the most economical overall driving scheme without overheating the post-processor.
[0061] like Figure 3 As shown, without this patented strategy, a sudden temperature rise will occur during the universal test, causing the EGP to burn out, as shown by the protruding point of T_ASC-C in the figure below (e.g., the position circled in red in the figure below).
[0062] like Figure 4 As shown in the figure above, after using this strategy, the overall temperature increase in the operating condition circled in red did not reach 651.8℃, and was kept within a reasonable range.
[0063] At the same time, such as Figure 5 As shown, by applying this patented strategy, compared to the traditional PID strategy, the operating condition distribution will be closer to the optimal BSFuel region of the universal characteristics, thereby reducing gas consumption. Different road profiles will result in different outcomes; in mountainous road conditions with frequent ups and downs, gas consumption can be reduced by approximately 2%.
[0064] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for achieving optimal gas consumption to prevent aftertreatment melting in a pure ammonia engine, characterized in that, Includes the following steps: S10, acquire the vehicle's historical driving data, which includes engine speed, engine torque, vehicle speed, road slope angle, and driving distance; S20, the historical driving data is input into a pre-trained long short-term memory network model to predict the predicted vehicle speed sequence and the predicted road slope sequence within a preset time period in the future; S30, based on the predicted vehicle speed sequence and the predicted road slope sequence, the engine speed sequence and engine torque sequence are calculated using the whole vehicle dynamics model. Based on the engine speed sequence and the engine torque sequence, combined with the air-fuel ratio, the exhaust temperature after the turbine and the original exhaust ammonia concentration and nitrogen oxide concentration at each moment are calculated using the engine universal characteristic model. S40, the exhaust temperature after the vortex and the original exhaust ammonia concentration and nitrogen oxide concentration are input into the continuous stirred tank reactor model to calculate the maximum temperature of the catalyst; S50, with the interval where the predicted vehicle speed sequence is located as a constraint, the maximum temperature of the catalyst not exceeding the preset temperature threshold as a limitation condition, and the goal of minimizing total gas consumption, the optimal control quantity sequence of each stage is solved by reverse recursion using a dynamic programming algorithm. The optimal control quantity sequence includes throttle opening, gear and air-fuel ratio. Every time the calculation step is completed, step S20 is returned to be re-executed, and the optimal control quantity at the current moment is output in a rolling time domain manner.
2. The optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in claim 1, characterized in that, In step S20, the long short-term memory network model includes a forgetting gate, an input gate, an output gate, and cell states. The calculation formula for the long short-term memory network model is as follows: f_t = sigma(W_f [h_{t-1}, x_t] + b_f) i_t = sigma(W_i [h_{t-1}, x_t] + b_i) C_t = f_t ( C_{t-1} + i_t ( ) tanh(W_c [h_{t-1}, x_t] + b_c) o_t = sigma(W_o [h_{t-1}, x_t] + b_o) h_t = o_t ( tanh(C_t) in, f_t Output for the forget gate, range [0,1]; sigma Use the Sigmoid activation function; W_f This is the forget gate weight matrix; h_{t-1} The hidden state from the previous moment; x_t The input vector for the current moment includes the normalized vehicle speed and road gradient; b_f This is the forget gate bias vector; i_t The input gate output has a range of [0,1]. W_i The input gate weight matrix; b_i The input gate bias vector; C_t This represents the current state of the cell. C_{t-1} This refers to the cell state at the previous moment; ) represents element-wise multiplication; tanh is the hyperbolic tangent activation function; W_c is the cell state weight matrix; b_c is the cell state bias vector; o_t is the output of the output gate, ranging from [0,1]; W_o is the output gate weight matrix; b_o is the output gate bias vector; h_t is the hidden state at the current time step.
3. The optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in claim 1, characterized in that, In step S30, the vehicle dynamics model is as follows: F_t = F_f + F_w + F_i + F_j = m g f cos(alpha) + C_d A rho v^2 / 2 + m g sin(alpha) + delta m dv / dt in, F_t As the driving force; F_f F_w is rolling resistance; F_w is air resistance. F_i For slope resistance; F_j To increase resistance; m For the overall vehicle weight; g It is the acceleration due to gravity; f This is the rolling resistance coefficient; alpha The road slope angle; C_d This refers to the air drag coefficient; A For windward area; rho air density; v For vehicle speed; delta This is the rotational mass conversion factor; dv / dt To accelerate the vehicle.
4. The optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in claim 1, characterized in that, In step S30, the engine universal characteristic model calculates the ammonia mass flow rate based on the gas consumption rate corresponding to the engine speed and torque output, the exhaust temperature after the turbine, and the original exhaust ammonia and nitrogen oxide concentrations, and is corrected according to the actual air-fuel ratio, using the following formula: m_fuel = P_e bsfc(omega_e, T_e, lambda) / (3600 rho_fuel) in, m_fuel This refers to the mass flow rate of ammonia. P_e The engine's effective power is given by ; bsfc(omega_e, T_e, lambda) is the corrected fuel consumption rate, a function of engine speed, torque, and air-fuel ratio; omega_e is the engine speed; T_e is the engine torque; lambda is the excess air coefficient, i.e., the air-fuel ratio. rho_fuel Fuel density.
5. The optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in claim 1, characterized in that, In step S40, the continuous stirred tank reactor model adopts the homogenization assumption and describes the physical and chemical reaction processes in the catalyst through a mass conservation equation, which is: d(eps_g w_k,g) / dt = -d(w_k,g m_g) / dz + MG_k,g Sum[nu_i,k r_i(c_k, T_ s)] in, eps_g The porosity of the catalyst; w_k,g The mass fraction of exhaust component k; m_g Z represents the exhaust mass flow rate; z represents the axial position of the catalyst. MG_k,g Let k be the molar mass of the exhaust component. nu_i,k Let k be the stoichiometric coefficient of component k in reaction i; r_i(c_k, T_s) Let i be the reaction rate of reaction i; c_k The reactant concentration of exhaust component k; T_s The catalyst support temperature; t For time.
6. The optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in claim 5, characterized in that, The following chemical reactions and their rate equations are considered in the continuous stirred tank reactor model: NH3 + S NH3(S), rate equation: r1 = k1_ads c_NH3 (1 - theta_NH3) - k1_des theta_NH3 ; 4NH3 + 4NO + O2 -> 4N2 + 6H2O, Rate equation: r2 = k2 c_NO theta_NH3 (1 - theta_NH3) ; 4NH3 + 2NO + 2NO2 -> 4N2 + 6H2O, rate equation: r3 = k3 c_NO c_NO2 theta_NH3 ; 8NH3 + 6NO2 -> 7N2 + 12H2O, rate equation: r4 = k4 c_NO2 theta_NH3 ; 4NH3 + 3O2 -> 2N2 + 6H2O, rate equation: r5 = k5 c_O2 theta_NH3 ; 2NO + O2 2NO2, rate equation: r6 = k6_f (c_NO)^2 c_O2 - k6_r (c_NO2)^2 ; Where S represents the active sites on the catalyst surface; NH3(S) represents adsorbed NH3. k1_ads The adsorption rate constant is denoted by . k1_des This is the desorption rate constant; c_NH3 This refers to the concentration of NH3 in the gas phase. theta_NH3 NH3 surface coverage; k2 This is the standard SCR reaction rate constant; c_NO The concentration of NO; k3 This represents the rate constant for the fast SCR reaction; c_NO2 The concentration of NO2; k4 This is the rate constant for a slow SCR reaction; k5 The rate constant for the oxidation of NH3; c_O2 The concentration of O2; k6_f This represents the forward rate constant for the oxidation of NO. k6_r is the rate constant for the reverse reaction of NO oxidation.
7. The optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in claim 1, characterized in that, In step S50, the objective function of the dynamic programming algorithm is: J (x_0) = min_{u_0,u_1,...,u_{N-1}} Sum_{k=0 to N-1} L(x_k, u_k) + phi(x_ N) The constraints are: T_cat(x_k, u_k)<= T_max,for all k in [0, N] in, J (x_0) The optimal total cost, i.e., the minimum total gas consumption, is the starting point from the initial state x_0. x_k Let be the state vector for the k-th stage, including vehicle speed, gear, and after-treatment temperature; u_k Let be the control vector for the k-th stage, which includes throttle opening, gear selection, and air-fuel ratio; L(x_k, u_k) The instantaneous cost of stage k is the gas consumption of that stage. phi(x_N) For the terminal cost function; N This represents the total number of stages; T_cat(x_k, u_k) The highest temperature of the catalyst when u_k is controlled in the k-th stage state x_k; T_ max This represents the maximum permissible temperature limit for the aftertreatment catalyst.
8. The optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in claim 7, characterized in that, In step S50, the dynamic programming algorithm adopts a strategy of reverse optimization and forward solution, specifically including the following steps: Vehicle speed, gear, and after-processing temperature are discretized into finite grid points within a reasonable range; Starting from the Nth stage, all feasible control quantities are traversed for each discrete state point. The next state and post-processing temperature are calculated using the continuous stirred tank reactor model. If the temperature exceeds the preset temperature threshold, the control quantity is excluded. Otherwise, the gas consumption of the stage is calculated and the subsequent optimal cost is accumulated. The control quantity corresponding to the minimum cost is selected as the optimal control quantity for the state point. Starting from the initial state, the optimal control variables for each stage are applied sequentially to obtain a complete sequence of optimal control variables and the corresponding state trajectory.
9. The optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in claim 1, characterized in that, In step S50, the interval where the predicted vehicle speed sequence is located is the nearby interval of the predicted vehicle speed sequence. The dynamic programming algorithm traverses the vehicle speed within the nearby interval to reduce computational complexity.
10. An optimal gas consumption control system for preventing aftertreatment melting in a pure ammonia engine, characterized in that, The optimal gas consumption method for preventing aftertreatment melting in a pure ammonia engine as described in any one of claims 1 to 9 includes: The data acquisition module is used to acquire the vehicle's historical driving data, which includes engine speed, engine torque, vehicle speed, road slope angle, and driving distance. The driving condition prediction module is used to input the historical driving data into a pre-trained long short-term memory network model to predict the predicted vehicle speed sequence and the predicted road slope sequence within a preset time period in the future. The vehicle and engine model calculation module is used to calculate the engine speed sequence and engine torque sequence using the vehicle dynamics model based on the predicted vehicle speed sequence and the predicted road slope sequence, and to calculate the exhaust temperature after the turbine, the original exhaust ammonia concentration and the nitrogen oxide concentration at each moment using the engine universal characteristic model based on the engine speed sequence and engine torque sequence and combined with the air-fuel ratio. The post-treatment temperature calculation module is used to input the exhaust temperature after the vortex and the original exhaust ammonia concentration and nitrogen oxide concentration into the continuous stirred tank reactor model to calculate the maximum temperature of the catalyst. The dynamic programming optimization module is used to solve the optimal control quantity sequence for each stage by using the interval where the predicted vehicle speed sequence is located as a constraint, the maximum temperature of the catalyst not exceeding a preset temperature threshold as a restriction condition, and the minimum total gas consumption as the objective. The optimal control quantity sequence includes throttle opening, gear position and air-fuel ratio. The module calls the operating condition prediction module again at every calculation step to output the optimal control quantity at the current moment in a rolling time domain manner.
