A diesel engine nitrogen oxide emission prediction method based on MMoE-LSTM
By decomposing and reconstructing diesel engine nitrogen oxide emission data using the MMoE-LSTM model, the problems of long prediction time and low accuracy in existing prediction methods are solved, and more efficient nitrogen oxide emission prediction is achieved.
Patent Information
- Application Number
- CN202411884968.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Existing methods for predicting nitrogen oxide emissions from diesel engines rely on empirical or semi-empirical assumptions, resulting in long prediction times and high resource consumption. Furthermore, traditional methods ignore the interrelationships between nitrogen oxide emission data, affecting prediction accuracy and efficiency.
A multi-task learning hybrid network of experts (MMoE) combined with a long short-term memory network (LSTM) is used to decompose diesel engine nitrogen oxide emission data into multiple subsequences using CEEMDAN. The data is then reconstructed into high-frequency, low-frequency, and trend components using sample entropy and K-means clustering. An MMoE-LSTM prediction model is constructed to capture the relationships between sub-tasks and long-sequence dependencies.
It improves the accuracy and efficiency of predicting nitrogen oxide emissions from diesel engines, better captures the interrelationships and long-sequence dependencies between tasks, and enhances the performance and generalization ability of the prediction model.
Smart Images

Figure CN119886419B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of diesel engine testing technology, and specifically to a method for predicting nitrogen oxide emissions from diesel engines based on MMoE-LSTM. Background Technology
[0002] According to the 2023 Annual Report on Environmental Management of Mobile Sources in China, the total nitrogen oxide emissions from motor vehicles nationwide reached 5.267 million tons in 2022, with diesel vehicles accounting for over 80% of the total vehicle emissions. Therefore, diesel vehicles are a major source of nitrogen oxide pollution in my country. Selective catalytic reduction (SCR) technology can effectively reduce nitrogen oxide emissions from diesel engines, and predicting nitrogen oxide emissions from diesel engines can help SCR adjust the urea injection volume based on actual nitrogen oxide emissions, thereby reducing nitrogen oxide emissions to meet the China VI emission standards.
[0003] Traditional methods for predicting nitrogen oxide emissions from diesel engines typically rely on the analysis of physicochemical properties and empirical or semi-empirical assumptions. This requires forecasters to have a deep understanding of the complex physical and chemical processes within the diesel engine, thus increasing the time and human resources required for prediction. Therefore, improving the accuracy and efficiency of nitrogen oxide emission prediction has become a pressing technical challenge.
[0004] In recent years, machine learning algorithms have been widely applied in various fields and have achieved good practical results. Because models built through machine learning do not need to consider the complex physical and chemical knowledge of diesel engines, their application in the prediction of diesel engine nitrogen oxide emissions has become increasingly widespread. Considering the nonlinear and unstable characteristics of diesel engine nitrogen oxide emission data, the CEEMDAN method has been used to effectively decompose this data. However, when processing the decomposed nitrogen oxide emission data, traditional methods often predict each component independently, ignoring the interrelationships between components. To solve this problem, this invention introduces the idea of multi-task learning. A major advantage of multi-task learning is its ability to capture the intrinsic relationships between components. In the field of multi-task learning, Multi-Expert Hybrid Network (MMoE) introduces an independent gating network for each task, dynamically selecting different expert combinations based on input features. This design allows different tasks to utilize experts in diverse ways, thereby better capturing the interrelationships between tasks and further improving the performance and efficiency of the prediction model. Furthermore, LSTM networks are now widely used in diesel engine nitrogen oxide emissions. LSTM networks can learn long-sequence dependencies and perform excellently in processing time series data. Therefore, this invention combines MMoE and LSTM to propose a new prediction model that can uncover dependencies and relationships between subtasks in long sequences. Summary of the Invention
[0005] The purpose of this invention is to address the problem of low accuracy in predicting nitrogen oxide emissions from diesel engines by providing a method for predicting nitrogen oxide emissions from diesel engines based on MMoE-LSTM, thereby improving the accuracy of nitrogen oxide emission prediction for diesel engines.
[0006] To achieve the above objectives, this invention provides a method for predicting nitrogen oxide emissions from diesel engines based on MMoE-LSTM, comprising the following steps:
[0007] Step S1: Obtain diesel engine nitrogen oxide emission time series data, and use the fully integrated empirical mode decomposition and adaptive noise method (CEEMDAN) to decompose the diesel engine nitrogen oxide emission time series data into multiple intrinsic mode functions (IMF) and final residuals (RES);
[0008] Step S2: Calculate the entropy value of each intrinsic mode function using the sample entropy method. Based on the calculated entropy value, use the K-means method to classify and aggregate the components, reconstructing them into high-frequency components, low-frequency components, and trend components.
[0009] Step S3: Combine the above three subsequences into a dataset, set the prediction of each subsequence as a subtask, and construct a multi-disciplinary hybrid expert combined long short-term memory network (MMoE-LSTM) prediction model;
[0010] Step S4: Input the dataset into the MMoE-LSTM prediction model to obtain the prediction results for each subtask, i.e., the prediction results for the three components;
[0011] Step S5: Sum the prediction results of the components to obtain the prediction result of nitrogen oxide emissions from diesel engines.
[0012] Optionally, the step of obtaining the CEEMDAN decomposition nitrogen oxide emission time series data in step S1 specifically includes:
[0013] A1: Let x(t) be the original NOx emission data time series, ω n (t) represents the Gaussian white noise added in the nth experiment. The time series of NOx emission data from the nth decomposition can be represented as x. n (t)=x(t)+ε0ω n (t), (n = 1, 2, ..., k), ε0 is the Gaussian white noise weighting coefficient, k is the degree of empirical mode decomposition, EMD k (·) is called the k-th IMF obtained by the Empirical Mode Decomposition (EMD) algorithm;
[0014] The first IMF component was obtained through EMD decomposition. The unique residual signal r1(t) obtained by CEEMDAN decomposition is calculated using the following formula:
[0015]
[0016] A2: Continue adding Gaussian white noise to the residual r1(t), and repeat the above steps to obtain... The new residual r2(t) is calculated using the following formula:
[0017]
[0018] A3: Repeat the above steps to calculate the k-th residual signal and the (k+1)-th IMF component. The calculation formula is as follows:
[0019]
[0020] A4: Until the obtained residual components cannot be further decomposed, at this point, all components of the CEEMDAN decomposition and the final trend term are obtained. Then, the original sequence x(t) is divided into k subsequences and one residual sequence, as shown below:
[0021]
[0022] In the formula: k represents the nth modal component; R(t) represents the final residual signal.
[0023] Optionally, in step S2, the IMFs obtained from CEEMDAN decomposition are reconstructed into high-frequency components, low-frequency components, and trend components. The specific reconstruction steps are as follows:
[0024] B1: For time series data obtained from CEEMDAN decomposition They are arranged in order to form a vector sequence of dimension p, denoted as X. p (i), as shown below:
[0025]
[0026] Define vector X p (i) and X p The distance d[X] between (j) p (i), X p [j] represents the absolute value of the maximum difference among the corresponding elements of the two pairs, calculated using the following formula:
[0027]
[0028] B2: For a given X p (i), Statistics X p (i) and X p The number of j values less than the similarity tolerance r between (j) is denoted as B. i And the ratio is taken as the distance to the number of distances Np, denoted as The calculation formula is as follows:
[0029]
[0030] Based on this, B is defined. p (r):
[0031]
[0032] B3: Increase the dimension to p+1, repeat the above formula, and calculate B. p+1 (r), as shown below:
[0033]
[0034] Since the time series length N is a finite value rather than infinite, the sample entropy is calculated using the following formula:
[0035]
[0036] The sample entropy value of each IMF is calculated using the sample entropy method. Based on this entropy value, the k-means clustering algorithm is used to divide the IMF into high-frequency components, low-frequency components, and trend components according to frequency characteristics.
[0037] Optionally, in step S3, the constructed MMoE-LSTM prediction model is:
[0038] MMoE is a multi-task learning model that uses multiple gating networks to select different expert networks to learn the connections and differences between different tasks. The expression of the MMoE model is as follows:
[0039] y k =h k (f k (x))
[0040] Among them, y k h represents the output of the k-th task. k (·) is the output layer function of the k-th task, f k (x) represents the intermediate result after processing by the expert network. The following is an interpretation of the expert network processing result:
[0041]
[0042] f k (x) is the output f of all expert networks i The weighted sum of (x), with weights Determined by the gating network:
[0043] g k (x) = softmax(W) gk x)
[0044] The output of this gated network is the weights of all the experts, W. gk ∈R n×d This represents a trainable matrix, where n is the number of experts and d is the dimension of the features;
[0045] When constructing the expert network for MMoE, combining it with an LSTM network enables the creation of an expert network capable of memorizing and processing time-series information. This design allows the expert network to better capture and utilize feature relationships between different tasks, thereby improving the model's performance and generalization ability in multi-task learning scenarios. The LSTM network consists of an input gate, an output gate, and a forget gate: the forget gate is responsible for calculating which information in the hidden state and cell state at the current time step should be forgotten or retained; the input gate controls how much of the current input information can enter the cell state, affecting the update of the memory unit; and the output gate determines which information the hidden state at the current time step should contain. The specific calculation process is as follows:
[0046] The forget gate fi determines whether information from the previous cell state needs to be forgotten.
[0047] f t =σ(W f [γ t-1 x t ]+b f ),
[0048] Input gate i t Determine the new information to be added to the cell status. It is composed of input gate i t The generated candidate values;
[0049] i t =σ(W i [γ t-1 x t ]+b i ),
[0050]
[0051] Combined with the forgetting gate f i and output gate i t The output updates the unit state;
[0052]
[0053] Output gate o t Output unit status value; γ t Output in hidden state;
[0054] o t =σ(W o [γ t-1x t ]+b o ),
[0055] γ t =o t tanh(C t ),
[0056] In the formula, x t , represents the input at time step t; γ t-1 and γ t These represent the previous and current states of the hidden layer, respectively; C t-1 and C t These are the previous and current cell storage information, respectively; W f W i W o W C b is the weight matrix; f b i b C b o σ is the offset vector; σ is the sigmoid activation function. Attached Figure Description
[0057] Figure 1 This is a flowchart of the diesel engine nitrogen oxide emission prediction method based on MMoE-LSTM of the present invention;
[0058] Figure 2 This is a diagram showing the CEEMDAN decomposition results in this embodiment;
[0059] Figure 3 This is a diagram showing the sample entropy reconstruction results of this embodiment;
[0060] Figure 4 This is a graph showing the predicted results of the recombination components in this embodiment;
[0061] Figure 5 This is a graph showing the predicted nitrogen oxide emissions of this embodiment. Detailed Implementation
[0062] The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings, which form part of this application and serve to illustrate the principles of the invention together with the embodiments. It should be particularly noted that the drawings are merely illustrative and are not intended to limit the scope of protection of the present invention.
[0063] This invention provides a method for predicting nitrogen oxide emissions from diesel engines based on MMoE-LSTM.
[0064] Reference Figure 1 The process of the present invention is illustrated, specifically comprising the following steps:
[0065] Step S1: Obtain diesel engine nitrogen oxide emission time series data, and decompose the diesel engine nitrogen oxide emission time series data into multiple IMFs using the fully integrated empirical mode decomposition and adaptive noise method (CEEMDAN);
[0066] Step S2: Calculate the entropy value of each IMF using the sample entropy method. Based on the calculated entropy value, perform classification and aggregation using the K-means method to reconstruct it into high-frequency components, low-frequency components, and trend components.
[0067] Step S3: Combine the above three subsequences into a dataset, set the prediction of each subsequence as a subtask, and construct a multi-disciplinary hybrid expert combined with a long short-term memory network prediction model.
[0068] Step S4: Input the dataset into the MMoE-LSTM prediction model to obtain the prediction results for each subtask, i.e., the prediction results for each subsequence;
[0069] Step S5: Accumulate the prediction results of the subsequences to obtain the nitrogen oxide emission prediction results.
[0070] Reference Figure 2 This paper presents the CEEMDAN decomposition results of diesel engine nitrogen oxide time-series data. The specific steps for CEEMDAN decomposition of nitrogen oxide emission time-series data are as follows:
[0071] A1: Let x(t) be the original NOx emission data time series, ω n (t) represents the Gaussian white noise added in the nth experiment. The time series of NOx emission data from the nth decomposition can be represented as x. n (t)=x(t)+ε0ω n (t), (n = 1, 2, ..., k), ε0 is the Gaussian white noise weighting coefficient, and k is the degree of Empirical Mode Decomposition (EMD). k (·) is called the k-th IMF pattern obtained by the EMD algorithm.
[0072] The first IMF component is obtained through EMD decomposition. The unique residual signal r1(t) obtained by CEEMDAN decomposition is calculated using the following formula:
[0073]
[0074] A2: Continue adding Gaussian white noise to the residual r1(t), and repeat the above steps to obtain... The new residual r2(t) is shown below:
[0075]
[0076] A3: Repeat the above steps to calculate the k-th residual signal and the (k+1)-th IMF component, as shown below:
[0077]
[0078] A4: Continue until the obtained residual components cannot be further decomposed. At this point, all components of the CEEMDAN decomposition and the final trend term are obtained. The original sequence x(t) is then divided into k subsequences and one residual sequence, as shown below:
[0079]
[0080] In the formula: k represents the nth modal component; R(t) represents the final residual signal.
[0081] Reference Figure 3 This demonstrates the sample entropy reconstruction results. The multiple subsequences obtained from the decomposition are reconstructed into three meaningful sequences. The specific reconstruction steps are as follows:
[0082] B1: For time series data obtained from CEEMDAN decomposition They are arranged in order to form a vector sequence of dimension p, denoted as X. p (i), as shown below:
[0083]
[0084] Define vector X p (i) and X p The distance d[X] between (j) p (i), X p [j] represents the absolute value of the maximum difference among the corresponding elements of the two pairs, as shown below:
[0085]
[0086] B2: For a given X p (i), Statistics X p (i) and X p The number of j values less than the similarity tolerance r between (j) is denoted as B. i And the ratio is taken as the distance to the number of distances Np, denoted as As shown below:
[0087]
[0088] Based on this, B is defined. p (r):
[0089]
[0090] B3: Increase the dimension to p+1, repeat the above steps, and calculate B.p+1 (r), as shown below:
[0091]
[0092] Since the time series length N is a finite value rather than infinite, the sample entropy can be calculated using the following formula:
[0093]
[0094] The sample entropy value of each IMF is calculated using the sample entropy method. Based on this entropy value, the k-means clustering algorithm is used to divide the IMF into high-frequency components, low-frequency components, and trend components according to frequency characteristics.
[0095] Reference Figure 4 This demonstrates the prediction results of the MMoE-LSTM prediction model for high-frequency components, low-frequency components, and trend components. This embodiment uses the last 20% of the data as validation results. The multi-gate hybrid expert combined with long short-term memory network prediction model is constructed as follows:
[0096] MMoE is a multi-task learning model that uses multiple gating networks to select different expert networks to learn the connections and differences between different tasks. The expression for the MMoE model is as follows:
[0097] y k =h k (f k (x))
[0098] Among them, y k h represents the output of the k-th task. k (·) is the output layer function of the k-th task, f k (x) represents the intermediate result after processing by the expert network. The following is an interpretation of the expert network processing result:
[0099]
[0100] Among them, f k (x) is the weighted sum of the outputs fi(x) of all expert networks, where the weights are... Determined by the gating network:
[0101] g k (x) = softmax(W) gk x)
[0102] The output of this gated network is the weights of all the experts, W. gk ∈R n×d Let d represent a trainable matrix, where n is the number of experts and d is the dimension of the features.
[0103] When constructing the expert network for MMoE, combining it with an LSTM network enables the creation of an expert network capable of memorizing and processing time-series information. This design allows the expert network to better capture and utilize feature correlations between different tasks, thereby improving the model's performance and generalization ability in multi-task learning scenarios. The LSTM network consists of an input gate, an output gate, and a forget gate: the forget gate calculates which information in the hidden state and cell state at the current time step should be forgotten or retained; the input gate controls how much of the current input information can enter the cell state, affecting the update of the memory unit; and the output gate determines which information the hidden state at the current time step should contain. The specific calculation process is as follows:
[0104] The forget gate fi determines whether information from the previous cell state needs to be forgotten.
[0105] f t =σ(W f [γ t-1 x t ]+b f ),
[0106] Input gate i t Determine the new information to be added to the cell status. It is composed of input gate i t The generated candidate values.
[0107] i t =σ(W i [γ t-1 x t ]+b i ),
[0108]
[0109] Combined with the forgetting gate f i and output gate i t The output updates the unit state.
[0110]
[0111] Output gate o t Output unit status value; γ t Output in hidden state.
[0112] o t =σ(W o [γ t-1 x t ]+b o ),
[0113] γ t =o t tanh(C t ),
[0114] In the formula, x t , represents the input at time step t; γ t-1 and γ t C represents the previous and current states of the hidden layer, respectively; t-1 and C t These are the previous and current cell storage information, respectively; W f W i W o W C b is the weight matrix; f b i b C b o σ is the offset vector; σ is the sigmoid activation function.
[0115] Reference Figure 5 This paper presents the final results of the MMoE-LSTM prediction model, with the bottom 20% of the data selected for validation in this embodiment. The high-frequency, low-frequency, and trend prediction results are summed to obtain the predicted nitrogen oxide emissions from diesel engines. It is particularly noted that the data used in this invention was provided by Guangxi Yuchai Machinery Group Co., Ltd.
[0116] The above description is a detailed explanation and illustration of the preferred embodiments of the present invention. However, these descriptions are not intended to limit the scope of protection claimed by the present invention. All equivalent changes or modifications made under the technical teachings of the present invention should fall within the patent protection scope covered by the present invention.
Claims
1. A method for predicting nitrogen oxide emissions from diesel engines based on MMoE-LSTM, characterized in that, Includes the following steps: Step S1: Obtain diesel engine nitrogen oxide emission time series data, and use the fully integrated empirical mode decomposition and adaptive noise method (CEEMDAN) to decompose the diesel engine nitrogen oxide emission time series data into multiple intrinsic mode functions (IMF) and final residuals (RES); Step S2: Calculate the entropy value of each intrinsic mode function using the sample entropy method. Based on the calculated entropy value, use the K-means method to classify and aggregate the data, reconstructing it into three subsequences: high-frequency components, low-frequency components, and trend components. Step S3: Combine the above three subsequences into a dataset, set the prediction of each subsequence as a subtask, and construct a multi-disciplinary hybrid expert combined long short-term memory network (MMoE-LSTM) prediction model; Step S4: Input the dataset into the MMoE-LSTM prediction model to obtain the prediction results for each subtask, i.e., the prediction results for the three components; Step S5: Sum the prediction results of the components to obtain the prediction result of nitrogen oxide emissions from diesel engines; The specific steps for obtaining time-series data on nitrogen oxide emissions from CEEMDAN decomposition are as follows: A1: Note This is the original NOx emission data time series. For the first Gaussian white noise was added in the experiment. The time series of NOx emissions from the secondary decomposition can be represented as follows: , These are the weighting coefficients for Gaussian white noise. For the degree of empirical mode decomposition, The first, known as the Empirical Mode Decomposition (EMD) algorithm, yields the... One IMF; The first IMF component was obtained through EMD decomposition. The unique residual signal is obtained by calculating the CEEMDAN decomposition. The calculation formula is: A2: Continue adding Gaussian white noise to the residuals. In the middle, repeat the above steps to obtain and new residuals The calculation formula is: A3: Repeat the above steps to calculate the... The residual signal and the first indivual The component, calculated using the following formula: A4: Continue decomposing until the obtained residual components cannot be further decomposed. At this point, all components of the CEEMDAN decomposition and the final trend term are obtained, and the original sequence is... Divided into The following is a subsequence and a residual sequence: In the formula: This represents the final residual signal; The process of establishing the MMoE-LSMT model is as follows: MMoE is a multi-task learning model that uses multiple gating networks to select different expert networks to learn the connections and differences between different tasks. The expression of the MMoE model is as follows: in, Indicates the first The output of each task It is the first The output layer function of each task This represents the intermediate result after processing by the expert network. The following section explains the results of the expert network processing: It is the output of all expert networks Weighted summation, weights Determined by the gating network: The output of this gating network is the weights of all the experts. This represents a trainable matrix. It refers to the number of experts. It is the dimension of the feature; When constructing the expert network for MMoE, combining it with an LSTM network enables the creation of an expert network capable of memorizing and processing time-series information. This design allows the expert network to better capture and utilize feature relationships between different tasks, thereby improving the model's performance and generalization ability in multi-task learning scenarios. The LSTM network consists of an input gate, an output gate, and a forget gate: the forget gate is responsible for calculating which information in the hidden state and cell state at the current time step should be forgotten or retained; the input gate controls how much of the current input information can enter the cell state, affecting the update of the memory unit; and the output gate determines which information the hidden state at the current time step should contain. The specific calculation process is as follows: Forgotten Gate This determines whether or not the information in the cell state from the previous time period needs to be forgotten; Input gate Determine the new information to be added to the cell status. It is composed of input gates The generated candidate values; Combined with the Gate of Oblivion and output gate The output updates the unit state; Output gate Output the unit status value; Output in hidden state; In the formula, Indicates time step Input; and These represent the previous and current states of the hidden layer, respectively. and These are the previous and current cell storage information, respectively; This is the weight matrix; It is the offset vector; It is the sigmoid activation function.
2. The method for predicting nitrogen oxide emissions from diesel engines based on MMoE-LSTM according to claim 1, characterized in that: In step S2, the IMFs obtained from CEEMDAN decomposition are reconstructed into high-frequency components, low-frequency components, and trend components. The specific reconstruction steps are as follows: B1: For time series data obtained from CEEMDAN decomposition Form a set of dimensions in order. The vector sequence, denoted as As shown below: Define vector and Distance between The absolute value of the maximum difference among corresponding elements of the two pairs is calculated using the following formula: B2: For a given ,statistics and The similarity tolerance is less than of The number of them is denoted as and the number of distances The ratio is denoted as . The calculation formula is as follows: Define on this basis : B3: Increase dimensionality to Repeat the above formula to calculate the result. As shown below: Due to time series length Since the value is finite rather than infinite, the sample entropy is calculated using the following formula: The sample entropy value of each IMF is calculated using the sample entropy method. Based on this entropy value, the k-means clustering algorithm is used to divide the IMF into high-frequency components, low-frequency components, and trend components according to frequency characteristics.
Citation Information
Patent Citations
Power load prediction method based on modal decomposition and reconstruction and LSTM-MLR hybrid model
CN116362398A
Integrated energy system load prediction method, apparatus and device, and storage medium
CN118627677A