Hybrid electric vehicle NHemission prediction method based on TCN + Feam + Transform

Through the TCN+Fecam+Transformer model, the problem of unpredictable dynamic changes in NH3 emissions of hybrid vehicles is solved, accurate prediction and optimization control of NH3 emissions are achieved, and environmentally friendly performance of hybrid vehicles is improved.

CN120337411AActive Publication Date: 2025-07-18SOUTHWEST FORESTRY UNIVERSITY

Patent Information

Application Number
CN202510523590.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-07-18
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

The existing prediction methods are difficult to accurately reflect the dynamic changes in NH3 emissions of hybrid vehicles, especially in extreme operating conditions, and cannot provide reliable prediction information for vehicle control systems, and lack effective identification and processing of high-frequency components and periodic changes.

Method used

The TCN+Fecam+Transformer model is adopted to collect time series data from hybrid vehicle sensors, preprocess, and then use TCN to extract features and weight them. The different frequency components are processed in combination with the Fecam mechanism, and then the Transformer model is input to capture the global dependency, train the NH3 emission prediction model, and optimize the emission control strategy.

Benefits of technology

Accurate prediction of NH3 emissions of hybrid vehicles is achieved, the reliability of vehicle control system and the accuracy of emission control strategies are improved, and prediction errors are reduced, especially in extreme operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120337411A_ABST
    Figure CN120337411A_ABST
Patent Text Reader

Abstract

The invention relates to a hybrid electric vehicle NHemission prediction method based on TCN + Fecam + Transform, and relates to the technical field of big data, time series data are collected from various sensors of a hybrid electric vehicle, preprocessing operation is carried out, TCN is used for carrying out feature extraction on the preprocessed time series data, different frequency components are weighted through a Fecam mechanism, and a prediction result is obtained. The method comprises the following steps: weighting features of a TCN model, combining the weighted features with features extracted by the TCN model to form final feature representation, carrying out embedding and position coding on the combined features to adapt to input requirements of the Transform model, inputting the processed features into the Transform model, capturing a global dependency relationship through a self-attention mechanism, and training by using an optimization algorithm to obtain a final feature representation. And fitting an NHemission prediction model, performing NHemission prediction by using the trained model, outputting a prediction result, and optimizing an emission control strategy according to prediction information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and more specifically, to a method for predicting NH3 emissions of hybrid electric vehicles based on TCN + Fecam + Transformer. Background Art

[0002] With the increasing global awareness of environmental protection, ammonia, as an important air pollutant, its emission problem has received more and more attention. NH3 not only affects climate change but also causes water eutrophication, affecting the ecological environment. Therefore, developing an efficient ammonia emission prediction method is of great significance for controlling ammonia emissions, optimizing the working performance of hybrid electric vehicles, and improving their environmental protection level.

[0003] Hybrid electric vehicles have become one of the key technologies to promote the transformation of the automotive industry due to their high energy utilization efficiency and low emission characteristics. However, due to the complex generation and release mechanisms of ammonia under different working conditions, traditional prediction methods often have difficulty accurately reflecting their dynamic changes. Existing prediction models are often based on simplified assumptions or traditional data processing methods, making it difficult to accurately capture the interactions between these complex factors and their subtle effects on NH3 emissions, resulting in a large error between the prediction results and the actual emissions. Especially in extreme working conditions or abnormal situations, existing models are prone to failure and cannot provide reliable prediction information for vehicle control systems.

[0004] In particular, for the high-frequency components and periodic changes in time series data, existing models lack effective identification and processing mechanisms and cannot accurately reflect the dynamic characteristics of NH3 emissions. Summary of the Invention

[0005] In view of the technical problems existing in the prior art, the present invention provides a method for predicting NH3 emissions of hybrid electric vehicles based on TCN + Fecam + Transformer to solve the problems raised in the above background art.

[0006] The technical solution of the present invention to solve the above technical problems is as follows: A method for predicting NH3 emissions of hybrid electric vehicles based on TCN + Fecam + Transformer specifically includes the following steps: Step 101: Collect time series data from various sensors of the hybrid electric vehicle and perform preprocessing operations; Step 102: Use TCN to extract features from the preprocessed time series data and weight different frequency components through the Fecam mechanism; Step 103: Input the extracted features into the Transformer model, capture global dependencies through the self-attention mechanism, and use an optimization algorithm for training to fit the NH3 emission prediction model; Step 104: Use the trained model to predict the NH3 emissions, output the prediction results, and optimize the emission control strategy based on the prediction information.

[0007] In a preferred embodiment, in step 101, collect time series data from various sensors of the hybrid vehicle and perform preprocessing operations. The specific steps are as follows: Step A1: Collect a variety of sensor data during the operation of the hybrid vehicle, including engine speed, vehicle speed, load, fuel consumption, battery power, exhaust temperature, and air quality; Step A2: Preprocessing: Process outliers and missing values, use the moving average method to smooth the time series data to reduce the impact of noise on model training, and normalize all sensor data to scale it to the same range. According to the sampling frequency of the sensor data, ensure that the data of all sensors are aligned in time. For sensor data with inconsistent sampling frequencies, use the interpolation method to align the low-frequency data with the high-frequency data.

[0008] In a preferred embodiment, in step 102, use TCN to extract features from the preprocessed time series data and weight different frequency components through the Fecam mechanism. The specific steps are as follows: Step B1: Feature extraction: Represent the preprocessed time series data as , where represents the sensor data at time step T, construct a TCN model, where TCN is a temporal convolutional network model composed of multiple convolutional layers and residual connections. Set the parameters of the convolutional layer to include the convolutional kernel size of k and the dilation rate of d. The output of TCN is the feature representation . Input the preprocessed time series data X into the TCN model for convolution operation, which further includes the following steps: Step B101: Convolution operation: For the first layer of convolution operation , the specific calculation formula of the dilated convolution is as follows: where, is the feature representation of the first layer, is the convolutional kernel of the first layer, is the bias term of the first layer, is the function of the dilated convolution operation, calculating the convolution of the input X and the convolutional kernel W, is the i-th element of the convolutional kernel, where i is the offset in the convolution operation, d is the dilation rate, k is the size of the convolutional kernel, and t is the index of the current time step; Step B102, Activation function: After the convolution operation, apply the ReLU activation function , where ReLU is the activation function, defined as: , which changes the negative values in the input to zero and retains the positive values, used to introduce non-linearity; Step B103, Residual connection: Add the input and the output through the residual connection to obtain the input of the next layer: , where is the output feature representation of the second-layer convolution, is the feature representation of the first layer, and X represents the preprocessed time series data of the input; Step B104, Repeat convolutional layer: Repeat the above steps to construct a multi-layer TCN. Set the number of layers to L. For the convolution operation of the L-th layer, it is , and perform activation and residual connection: , where is the feature representation of the L-th layer, represents the output of the previous layer, and are the convolutional kernel and bias term of the L-th layer respectively; Step B105, The final output feature representation is: , where is the feature representation after L layers of convolution and activation; Step B2, Frequency domain feature weighting: Use the fast Fourier transform to convert the time domain features into frequency domain features, denoted as , where represents the signal in the frequency domain, FFT represents the Fourier transform operation, and the frequency domain features are divided into high-frequency components and low-frequency components , weight the frequency domain features through the Fecam mechanism, and merge the weighted high-frequency and low-frequency component features with the features extracted by the TCN to form the final feature representation , which further includes the following steps: Step B201, Calculate attention weights: Apply the channel attention mechanism to the frequency domain features, and use the fully connected layer and the activation function to calculate the attention weights. The specific calculation formula is as follows: Weight the high-frequency components:

[0009] Weight the low-frequency components:

[0010] where and are the attention weights of the high-frequency component and the low-frequency component respectively, and are the weight matrices of the high-frequency component and the low-frequency component respectively, and are the bias terms of the high-frequency component and the low-frequency component respectively; Step B202, Weighted frequency domain features: Use the calculated attention weights to weight the high-frequency and low-frequency component features. The specific calculation formula is as follows: where, represents element-wise multiplication, and represent the weighted high-frequency and low-frequency component features respectively, and are the attention weights of the high-frequency component and the low-frequency component respectively; Step B203, Combine the weighted features: Combine the weighted high-frequency and low-frequency features with the features extracted by the TCN to form the final feature representation: ; where, and represent the weighted high-frequency and low-frequency component features respectively, is the feature representation after L layers of convolution and activation.

[0011] In a preferred embodiment, in step 103, the extracted features are input into the Transformer model, the global dependencies are captured through the self-attention mechanism, and the NH3 emission prediction model is fitted using an optimization algorithm. The specific steps are as follows: Step C1, Feature embedding and position encoding: Embed and perform position encoding on the extracted features to meet the input requirements of the Transformer model. The extracted features with dimension represented as are linearly transformed to obtain the input features , and the position encoding P is added to retain the time information of the sequence , where, is the feature dimension, E is the embedded feature representation, is the embedding weight matrix, is the embedding bias, P is the position-based encoding matrix, is the feature representation after adding the position encoding; Step C2, Input to the Transformer model: The basic structure of the Transformer includes a multi-head self-attention mechanism and a feed-forward neural network. The feature Input to the self-attention layer of the Transformer, generate the similarity of query Q, key K, and value V through linear transformation, and adjust the feature representation based on this. Use the multi-head attention mechanism to calculate multiple attention heads in parallel, concatenate the outputs of all heads and perform linear transformation. After each attention layer and feed-forward layer, apply residual connection and layer normalization. Pass the output of the attention layer to the feed-forward neural network, and generate the NH3 emission prediction value through the linear output layer. Further include the following steps: Step C201, calculate the query, key, and value: , , , where, , , are trainable weight matrices, is the feature representation after adding position encoding; Step C202, calculate the attention weight matrix: , where, The operation converts the similarity value into a normalized attention weight, is the similarity between the query and the key, is the dimension of the query and the key, is the scaling factor; Step C203, multi-head self-attention: Use multiple attention heads to calculate in parallel, and enhance the representation ability by concatenating the results. Suppose there are h attention heads, and the output of attention head j is , and the specific calculation formula is: . Concatenate the outputs of all heads together to get the output of multi-head self-attention: , where, is the concatenated output, is the linear transformation matrix, is the output of the h-th attention head; Step C204, feed-forward neural network: Use residual connection and layer normalization after each attention layer and feed-forward layer, and the specific calculation formula is: . Perform non-linear transformation through the feed-forward layer, and the specific calculation formula is: , where, is the output after multi-head self-attention, is the output after being processed by the feed-forward neural network, is the feature representation after adding position encoding, and are the weight matrix and bias vector of the first linear transformation respectively, and are the weight matrix and bias vector of the second linear transformation respectively, represents layer normalization, and ReLU is the activation function; Step C205, Output Layer: The final output of the model is fed into a linear layer for emission prediction. The specific calculation formula is as follows: , where is the final predicted value of NH3 emissions, is the output after being processed by the feedforward neural network, is the weight matrix of the output layer, is the bias term of the output layer; Step C3, Model Training: The mean squared error is used as the loss function, and an optimization algorithm is used to update the model parameters to minimize the loss. The specific calculation formula is as follows: where MSE is the loss function, is the predicted value of the g-th sample, is the actual NH3 emission of this sample, N is the number of samples, is the learning rate, is the gradient of the loss function with respect to the model parameters, is the parameter value of the current iteration, is the updated parameter value.

[0012] In a preferred embodiment, in step 104, the trained model is used to predict the NH3 emissions, the prediction result is output, and the emission control strategy is optimized according to the prediction information. The specific steps are as follows: The new sensor data is input into the trained Transformer model for prediction, and the predicted NH3 emission result is recorded and output , and a target emission is set. When the predicted value is higher than the target emission, emission reduction measures are taken; when the predicted value is lower than the target emission, the emission control measures are reduced. Based on the NH3 emissions predicted by the model, the emission control strategy of the vehicle is formulated and adjusted to reduce the actual emissions.

[0013] The beneficial effects of the present invention are as follows: Collect time series data from various sensors of a hybrid vehicle and perform preprocessing operations. Use TCN to extract features from the preprocessed time series data, and weight different frequency components through the Fecam mechanism. Combine the weighted features with the features extracted by TCN to form the final feature representation. Embed and perform position encoding on the combined features to meet the input requirements of the Transformer model. Input the processed features into the Transformer model to capture global dependencies through the self-attention mechanism. Use an optimization algorithm for training to fit the NH3 emission prediction model. Utilize the trained model to predict the NH3 emission amount, output the prediction result, and optimize the emission control strategy based on the prediction information. By introducing the frequency-enhanced channel attention mechanism, the present invention realizes the accurate identification and processing of high-frequency components in time series data, and combines the advantages of TCN and Transformer to comprehensively capture various complex factors affecting NH3 emissions during the operation of hybrid vehicles. Description of the Drawings

[0014] Figure 1 It is a flowchart of the method of the present invention. Detailed Embodiments

[0015] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present application.

[0016] In the description of the present application, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality" means two or more, unless otherwise specifically defined.

[0017] In the description of the present application, the term "for example" is used to mean "serving as an example, illustration, or explanation". Any embodiment described as "for example" in this application is not necessarily construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to implement and use the present invention. In the following description, details are set forth for purposes of explanation. It should be understood that those of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed in this application.

[0018] Embodiment 1 This embodiment provides a method for predicting NH3 emissions of a hybrid vehicle based on TCN + Fecam + Transformer as shown in Figure 1 Figure [not provided], which specifically includes the following steps: Step 101: Collect time series data from various sensors of the hybrid vehicle and perform preprocessing operations; Step 102: Use TCN to extract features from the preprocessed time series data and weight different frequency components through the Fecam mechanism; Step 103: Input the extracted features into the Transformer model, capture global dependencies through the self-attention mechanism, and use an optimization algorithm for training to fit the NH3 emission prediction model; Step 104: Use the trained model to predict the NH3 emissions, output the prediction results, and optimize the emission control strategy according to the prediction information to improve the environmental performance of the vehicle.

[0019] Preferably, in step 101, collecting time series data from various sensors of the hybrid vehicle and performing preprocessing operations, the specific steps are as follows: Step A1: Collect data from multiple sensors during the operation of the hybrid vehicle, including engine speed, vehicle speed, load, fuel consumption, battery power, exhaust temperature, and air quality; Step A2: Preprocessing: Process outliers and missing values, use the moving average method to smooth the time series data to reduce the impact of noise on model training, and normalize all sensor data to scale them to the same range. According to the sampling frequency of the sensor data, ensure that the data of all sensors are aligned in time. For sensor data with inconsistent sampling frequencies, use the interpolation method to align low-frequency data with high-frequency data.

[0020] Preferably, in step 102, TCN is used to extract features from the preprocessed time series data, and different frequency components are weighted by the Fecam mechanism. The specific steps are as follows: Step B1. Feature extraction: Represent the preprocessed time series data as , where represents the sensor data at time step T. Construct a TCN model. The TCN is a temporal convolutional network model composed of multiple convolutional layers and residual connections. Long-term dependent sequence features are captured through dilated convolution operations. Set the parameters of the convolutional layer to include a kernel size of k and a dilation rate of d, which represents the degree of expansion of the convolution operation and allows the network to capture long-term dependencies. The output of the TCN is the feature representation . Input the preprocessed time series data X into the TCN model for convolution operations, which further includes the following steps: Step B101. Convolution operation: For the first layer of convolution operation, it is . The specific calculation formula for dilated convolution is as follows: where is the feature representation of the first layer, is the convolutional kernel of the first layer, is the bias term of the first layer, is the function of the dilated convolution operation, calculating the convolution of the input X and the convolutional kernel W, is the i-th element of the convolutional kernel, i is the offset in the convolution operation, d is the dilation rate, k is the kernel size, and t is the index of the current time step; Step B102. Activation function: After the convolution operation, apply the ReLU activation function , where ReLU is the activation function, defined as: , changing the negative values in the input to zero and retaining the positive values for introducing non-linearity; Step B103. Residual connection: Add the input and the output through the residual connection to obtain the input of the next layer: , where is the output feature representation of the second layer of convolution, is the feature representation of the first layer, and X represents the input preprocessed time series data; Step B104. Repeat convolutional layer: Repeat the above steps to construct a multi-layer TCN. Set the number of layers to L. For the convolution operation of the L-th layer, it is , and perform activation and residual connection: , where is the feature representation of the L-th layer, represents the output of the previous layer, and They are the convolution kernel and bias term of the L-th layer respectively; Step B105, the final output feature representation is: , where is the feature representation after L layers of convolution and activation; Step B2, frequency domain feature weighting: Use the fast Fourier transform to convert the time domain feature into a frequency domain feature, denoted as , where represents the signal in the frequency domain, FFT represents the Fourier transform operation, and the frequency domain feature is divided into high-frequency components and low-frequency components . In the frequency domain, the frequency domain feature is weighted by the Fecam mechanism. The Fecam mechanism represents the channel attention mechanism, and the weighted high-frequency and low-frequency component features are combined with the features extracted by the TCN to form the final feature representation , which further includes the following steps: Step B201, calculate the attention weight: Apply the channel attention mechanism to the frequency domain feature, and use the fully connected layer and activation function to calculate the attention weight. The specific calculation formula is as follows: Weight the high-frequency components:

[0021] Weight the low-frequency components:

[0022] where and are the attention weights of the high-frequency and low-frequency components respectively, and are the weight matrices of the high-frequency and low-frequency components respectively, and are the bias terms of the high-frequency and low-frequency components respectively; Step B202, weighted frequency domain features: Use the calculated attention weights to weight the high-frequency and low-frequency component features. The specific calculation formula is as follows: where represents element-wise multiplication, and represent the weighted high-frequency and low-frequency component features respectively, and are the attention weights of the high-frequency and low-frequency components respectively; Step B203, merge the weighted features: Merge the weighted high-frequency and low-frequency features with the features extracted by the TCN to form the final feature representation: ; among which, and respectively represent the weighted high - frequency and low - frequency component features, is the feature representation after L - layer convolution and activation.

[0023] Preferably, in step 103, the extracted features are input into the Transformer model, the global dependence relationship is captured through the self - attention mechanism, and an optimization algorithm is used for training to fit the NH3 emission prediction model. The specific steps are as follows: Step C1, Feature Embedding and Position Encoding: The extracted features are embedded and position - encoded to meet the input requirements of the Transformer model. The extracted features with dimension represented as are linearly transformed to obtain the input feature , and the position encoding P is added to retain the time information of the sequence , where is the feature dimension, E is the embedded feature representation, is the embedding weight matrix, is the embedding bias, P is the position - based encoding matrix, is the feature representation after adding the position encoding; Step C2, Input into the Transformer Model: The basic structure of the Transformer includes a multi - head self - attention mechanism and a feed - forward neural network. The feature is input into the self - attention layer of the Transformer. The similarities of the query Q, key K, and value V are generated through linear transformation, and the feature representation is adjusted based on this. The multi - head attention mechanism is used to calculate multiple attention heads in parallel. The outputs of all heads are concatenated and linearly transformed. After each attention layer and feed - forward layer, residual connection and layer normalization are applied. The output of the attention layer is passed to the feed - forward neural network, and the NH3 emission prediction value is generated through the linear output layer. It further includes the following steps: Step C201, Calculate the Query, Key, and Value: , , , where , , are trainable weight matrices, is the feature representation after adding the position encoding; Step C202, Calculate the Attention Weight Matrix , representing the dependence relationship between different time steps: , where operation converts the similarity value into a normalized attention weight, is the similarity between the query and the key, is the dimension of the query and the key, is the scaling factor, which avoids the vanishing gradient caused by too large dot product value. Through weighted averaging of the attention weights and the value matrix V, the self-attention output is obtained: ; Step C203, Multi-Head Self-Attention: Use multiple attention heads to calculate in parallel, and enhance the representation ability by concatenating the results. Suppose there are h attention heads, and the output of attention head j is , and the specific calculation formula is: , concatenate the outputs of all heads together to obtain the output of multi-head self-attention: , where, is the concatenated output, is the linear transformation matrix, is the output of the h-th attention head, is an operation used to concatenate multiple output vectors along a specific dimension; Step C204, Feed-Forward Neural Network: Use residual connection and layer normalization after each attention layer and feed-forward layer. The specific calculation formula is: , perform non-linear transformation through the feed-forward layer to further enhance the model's expression ability. The specific calculation formula is: , where, is the output after multi-head self-attention, is the output after being processed by the feed-forward neural network, is the feature representation after adding positional encoding, and are the weight matrix and bias vector of the first linear transformation respectively, and are the weight matrix and bias vector of the second linear transformation respectively, represents layer normalization, and ReLU is the activation function; Step C205, Output Layer: Pass the final output of the model into the linear layer for emission prediction. The specific calculation formula is: , where, is the final NH3 emission prediction value, is the output after being processed by the feed-forward neural network, is the weight matrix of the output layer, is the bias term of the output layer; Step C3, Model Training: Use the mean squared error as the loss function and update the model parameters using an optimization algorithm to minimize the loss. The specific calculation formula is as follows: where, MSE is the loss function, is the predicted value of the g-th sample, is the actual NH3 emission of this sample, and N is the number of samples. is the learning rate, is the gradient of the loss function with respect to the model parameters, is the parameter value of the current iteration, is the updated parameter value.

[0024] Preferably, in step 104, the trained model is used to predict the NH3 emission, the prediction result is output, and the emission control strategy is optimized according to the prediction information. The specific steps are as follows: The new sensor data is input into the trained Transformer model for prediction, and the predicted NH3 emission result is recorded and output. and a target emission is set When the predicted value is higher than the target emission, emission reduction measures are taken to adjust the engine operating mode; when the predicted value is lower than the target emission, the emission control measures are reduced to improve the fuel economy and battery usage efficiency of the vehicle. The emission control strategy of the vehicle is formulated and adjusted based on the NH3 emission predicted by the model to reduce the actual emission.

[0025] It should be noted that in the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0026] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can be implemented in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

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

[0028] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the function specified in one or more of the processes and / or blocks Figure 1 of the process or processes and / or blocks Figure 1 specified.

[0029] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the function specified in one or more of the processes and / or blocks Figure 1 of the process or processes and / or blocks Figure 1 specified.

[0030] Although the preferred embodiments of the present invention have been described, additional changes and modifications can be made by those skilled in the art once they learn of the basic inventive concept. Therefore, the appended claims are intended to be construed to cover the preferred embodiments as well as all changes and modifications that fall within the scope of the present invention.

[0031] It is obvious that those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.

Claims

1. A prediction method for NH3 emissions of hybrid electric vehicles based on TCN + Fecam + Transformer, characterized in that, Specifically, it includes the following steps: Step 101: Collect time series data from various sensors of a hybrid vehicle and perform preprocessing operations; Step 102: Use TCN to extract features from the preprocessed time series data and weight different frequency components through the Fecam mechanism; Step 103: Input the extracted features into the Transformer model, capture global dependencies through the self-attention mechanism, and use an optimization algorithm for training to fit the NH3 emission prediction model; Step 104: Use the trained model to predict the NH3 emissions, output the prediction results, and optimize the emission control strategy according to the prediction information.

2. A method for predicting NH3 emissions of a hybrid vehicle based on TCN+Fecam+Transformer according to claim 1, characterized in that: In the said Step 101, collecting time series data from various sensors of a hybrid vehicle and performing preprocessing operations, the specific steps are as follows: Step A1: Collect various sensor data during the operation of the hybrid vehicle, including engine speed, vehicle speed, load, fuel consumption, battery power, exhaust temperature, and air quality; Step A2: Preprocessing: Handle outliers and missing values, use the moving average method to smooth the time series data to reduce the impact of noise on model training, and normalize all sensor data to scale it to the same range. According to the sampling frequency of the sensor data, ensure that the data of all sensors are aligned in time. For sensor data with inconsistent sampling frequencies, use the interpolation method to align the low-frequency data with the high-frequency data.

3. A method for predicting NH3 emissions of a hybrid vehicle based on TCN + Fecam + Transformer according to claim 1, characterized in that, In the said Step 102, using TCN to extract features from the preprocessed time series data and weight different frequency components through the Fecam mechanism, the specific steps are as follows: Step B1, Feature Extraction: Represent the preprocessed time series data as , where represents the sensor data at time step T. Construct a TCN model, where the TCN is a temporal convolutional network model composed of multiple convolutional layers and residual connections. Set the parameters of the convolutional layer to include a kernel size of k and a dilation rate of d. The output of the TCN is a feature representation . Input the preprocessed time series data X into the TCN model for convolutional operations; Step B2, Frequency-domain feature weighting: Use the fast Fourier transform to convert the time-domain features into frequency-domain features, expressed as , where represents the signal in the frequency domain, FFT represents the Fourier transform operation, and the frequency-domain features are divided into high-frequency components and low-frequency components . Weight the frequency-domain features through the Fecam mechanism, and merge the weighted high-frequency and low-frequency component features with the features extracted by TCN to form the final feature representation .

4. A method for predicting NH3 emissions of a hybrid vehicle based on TCN+Fecam+Transformer according to claim 2, characterized in that, In the feature extraction of Step B1, input the preprocessed time series data X into the TCN model for convolution operations, which further includes the following steps: Step B101, Convolution operation: For the first layer of convolution operation, , the specific calculation formula of the dilated convolution is as follows: ; Among them, is the feature representation of the first layer, is the convolution kernel of the first layer, is the bias term of the first layer, is the function of the dilated convolution operation, calculating the convolution of the input X and the convolution kernel W, is the i-th element of the convolution kernel, where i is the offset in the convolution operation, d is the dilation rate, k is the size of the convolution kernel, and t is the index of the current time step; Step B102, Activation Function: After the convolution operation, apply the ReLU activation function , where ReLU is the activation function, defined as: , which turns negative values in the input to zero and retains positive values for introducing non-linearity; Step B103, Residual Connection: Add the input and the output through residual connection to obtain the input of the next layer: , where is the output feature representation of the second-layer convolution, is the feature representation of the first layer, and X represents the preprocessed time series data of the input; Step B104, Repeated Convolutional Layer: Repeat the above steps to construct a multi-layer TCN with the number of layers set to L. For the convolutional operation of the L-th layer, it is , and activation and residual connection are performed: , where is the feature representation of the L-th layer, represents the output of the previous layer, and are the convolutional kernel and bias term of the L-th layer respectively; Step B105, the final output feature representation is: , where is the feature representation after L layers of convolution and activation.

5. A method for predicting NH3 emissions of a hybrid vehicle based on TCN+Fecam+Transformer according to claim 2, characterized in that, In the frequency domain feature weighting in step B2, the frequency domain features are weighted by the Fecam mechanism, and the weighted high-frequency and low-frequency component features are combined with the features extracted by the TCN to form the final feature representation. , which further includes the following steps: Step B201, calculating attention weights: Apply the channel attention mechanism to the frequency-domain features, and use a fully connected layer and an activation function to calculate the attention weights. The specific calculation formula is as follows: Weight the high-frequency components: ; Weight the low-frequency components: ; Among them, and are the attention weights of the high-frequency component and the low-frequency component respectively, and are the weight matrices of the high-frequency component and the low-frequency component respectively, and are the bias terms of the high-frequency component and the low-frequency component respectively; Step B202: Weighted frequency domain features: Use the calculated attention weights to weight the high-frequency and low-frequency component features, and the specific calculation formula is as follows: ; ; Among them, represents element-wise multiplication, and represent the weighted high-frequency and low-frequency component features respectively, and are the attention weights of the high-frequency component and the low-frequency component respectively; Step B203, Merge the weighted features: Merge the weighted high-frequency and low-frequency features with the features extracted by TCN to form the final feature representation: ; where and respectively represent the weighted high-frequency and low-frequency component features, is the feature representation after L layers of convolution and activation.

6. A method for predicting NH3 emissions of a hybrid vehicle based on TCN+Fecam+Transformer according to claim 1, wherein In the said Step 103, input the extracted features into the Transformer model, capture global dependencies through the self-attention mechanism, and use an optimization algorithm for training to fit the NH3 emission prediction model, the specific steps are as follows: Step C1, Feature Embedding and Position Encoding: Embed and perform position encoding on the extracted features to meet the input requirements of the Transformer model. Represent the dimension of the extracted features as and obtain the input feature after linear transformation. Then add the position encoding P to retain the temporal information of the sequence . Among them, is the feature dimension, E is the feature representation after embedding, is the embedding weight matrix, is the embedding bias, P is the position-based encoding matrix, is the feature representation after adding the position encoding;​ Step C2, input into the Transformer model: The basic structure of the Transformer includes a multi-head self-attention mechanism and a feed-forward neural network. Input the features into the self-attention layer of the Transformer, generate the similarities of the query Q, key K, and value V through linear transformation, and adjust the feature representation based on this. Use the multi-head attention mechanism to calculate multiple attention heads in parallel, concatenate the outputs of all heads and perform linear transformation. After each attention layer and feed-forward layer, apply residual connection and layer normalization. Pass the output of the attention layer to the feed-forward neural network, and generate the NH3 emission prediction value through the linear output layer; Step C3: Model training: Use the mean squared error as the loss function and use an optimization algorithm to update the model parameters to minimize the loss, and the specific calculation formula is as follows: ; ; where MSE is the loss function, is the predicted value of the g-th sample, is the actual NH3 emission of this sample, and N is the number of samples, is the learning rate, is the gradient of the loss function with respect to the model parameters, is the parameter value at the current iteration, is the updated parameter value.

7. A method for predicting NH3 emissions of a hybrid vehicle based on TCN+Fecam+Transformer according to claim 6, characterized in that The step C2 is input into the Transformer model to obtain the features which are input into the self-attention layer of the Transformer. The similarities of the query Q, key K, and value V are generated through linear transformation, and the feature representation is adjusted based on this. The multi-head attention mechanism is used to calculate multiple attention heads in parallel. The outputs of all heads are concatenated and linearly transformed. After each attention layer and feed-forward layer, residual connection and layer normalization are applied. The output of the attention layer is passed to the feed-forward neural network, and the NH3 emission prediction value is generated through the linear output layer. It further includes the following steps: Step C201: Calculate the query, key, and value: , , , where , , are trainable weight matrices, is the feature representation after adding positional encoding; Step C202, calculate the attention weight matrix , where The operation converts the similarity value into a normalized attention weight is the similarity between the query and the key is the dimension of the query and the key is the scaling factor; Step C203, Multi-Head Self-Attention: Use multiple attention heads to calculate in parallel and enhance the representation ability by concatenating the results. Suppose there are h attention heads, and the output of attention head j is , and the specific calculation formula is: . Concatenate the outputs of all heads to obtain the output of multi-head self-attention: , where is the concatenated output, is the linear transformation matrix, is the output of the h-th attention head; Step C204, Feed - forward Neural Network: Residual connections and layer normalization are used after each attention layer and feed - forward layer. The specific calculation formula is: , and a non - linear transformation is performed through the feed - forward layer. The specific calculation formula is: , where is the output after multi - head self - attention, is the output after being processed by the feed - forward neural network, is the feature representation after adding position encoding, and are the weight matrix and bias vector of the first linear transformation respectively, and are the weight matrix and bias vector of the second linear transformation respectively, represents layer normalization, and ReLU is the activation function; Step C205, Output Layer: The final output of the model is fed into a linear layer for emission prediction. The specific calculation formula is as follows: , where is the final NH3 emission prediction value, is the output after being processed by the feedforward neural network, is the weight matrix of the output layer, is the bias term of the output layer.

8. A method for predicting NH3 emissions of a hybrid vehicle based on TCN + Fecam + Transformer according to claim 1, characterized in that, In step 104, the trained model is used to predict the NH3 emission, and the prediction result is output. According to the prediction information, the emission control strategy is optimized. The specific steps are as follows: The new sensor data is input into the trained Transformer model for prediction, and the predicted NH3 emission result is recorded and output , and a target emission is set . When the predicted value is higher than the target emission, emission reduction measures are taken; When the predicted value is lower than the target emission, reduce the emission control measures, and formulate and adjust the vehicle's emission control strategy based on the NH3 emissions predicted by the model to reduce the actual emissions.

Citation Information

Patent Citations

  • Transform and TCN combined model-based intelligent load prediction method

    CN116613740A

  • Motor imagery electroencephalogram signal classification system based on TimesNet and convolutional neural network

    CN118094317A

  • Vehicle interactive perception trajectory prediction system and method based on graph convolution

    CN118570763A

  • Gasoline car emission prediction method based on XGBoost-SVR combined model

    CN119227874A

  • Method for improving the coincidence time resolution of pet system based on stft

    US20240159927A1

Cited By

  • Feedback force prediction method and device in virtual operation process

    CN121075559A