Online virtual sensing method for hydrogen and ammonia emission of hydrogen internal combustion engine based on lightweight neural network
By constructing a lightweight neural network model, the problems of slow response and high cost of traditional sensors in hydrogen ammonia emission monitoring of hydrogen internal combustion engines are solved, realizing high-precision and low-cost real-time detection of hydrogen ammonia emissions, which can adapt to different operating conditions and environmental changes.
Patent Information
- Application Number
- CN202511223851.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-11-14
AI Technical Summary
In the current technology, hydrogen and ammonia emission monitoring of hydrogen internal combustion engines relies on traditional sensors, which have long response times, high costs, and cannot effectively predict the concentration of hydrogen and ammonia emissions, thus failing to meet the requirements for real-time control.
A lightweight neural network-based online virtual sensing method for hydrogen and ammonia emissions is constructed. The method uses a neural network model with a dual-branch spatiotemporal fusion structure, a fully connected layer, and an output layer to estimate hydrogen and ammonia concentrations in combination with real-time data, thereby replacing traditional sensors and achieving high-precision emission detection.
It reduces equipment costs, avoids the impact of sensor failure, ensures real-time estimation of emission concentrations and efficient system operation, and adapts to different operating conditions and environmental changes.
Smart Images

Figure CN120952070A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle-mounted intelligent sensing and emission control technology, and in particular to an online virtual sensing method for hydrogen ammonia emissions from hydrogen internal combustion engines based on a lightweight neural network. Background Technology
[0002] Hydrogen internal combustion engines, as a green energy technology, are widely used in the automotive, industrial, and power generation sectors, and their emission control is receiving increasing attention. Hydrogen and ammonia, as significant emissions that may be generated during the operation of hydrogen internal combustion engines, directly impact environmental quality and their contribution to air pollution. Therefore, real-time monitoring of hydrogen / ammonia emission concentrations has become a crucial step in ensuring the efficient and clean operation of hydrogen internal combustion engines.
[0003] In emission monitoring of hydrogen internal combustion engines, virtual sensors, as a technology that does not rely on traditional physical sensors, estimate hydrogen / ammonia emission concentrations based on measurable system parameters using mathematical models or machine learning algorithms. Virtual sensor technology offers advantages such as low cost, ease of deployment, and no need for physical sensor maintenance, demonstrating significant application potential in improving emission monitoring accuracy, reducing sensor deployment complexity, and lowering maintenance costs. Particularly in vehicle systems, utilizing lightweight virtual sensors for hydrogen and ammonia emission estimation can effectively reduce the number of traditional sensors, while simultaneously reducing system complexity and cost.
[0004] While virtual sensing technology has achieved some success in predicting NOx (nitrogen oxides) and PM (particulate matter), virtual sensing methods for hydrogen and ammonia emissions remain scarce. Traditional hydrogen / ammonia emission monitoring methods primarily rely on hydrogen / ammonia sensors, which have the following significant drawbacks:
[0005] (1) The response time of hydrogen / ammonia sensors is relatively long, making it difficult to meet the requirements of real-time emission control for hydrogen internal combustion engines. Especially in vehicle systems, the engine load and operating status change frequently, and traditional sensors cannot provide sufficient timely emission data, affecting the accuracy and timeliness of emission control;
[0006] (2) The cost of hydrogen / ammonia sensors is relatively high. For large-scale application systems such as hydrogen internal combustion engines, the use of a large number of sensors will greatly increase the cost of the system, as well as the system complexity and maintenance costs.
[0007] (3) Existing virtual sensing technologies are mostly focused on predicting emissions of traditional pollutants such as NOx and PM, while research on hydrogen and ammonia emissions is relatively scarce, which makes it impossible to effectively predict hydrogen / ammonia emission concentrations. Therefore, this invention proposes an online virtual sensing method for hydrogen and ammonia emissions from hydrogen internal combustion engines based on a lightweight neural network to solve the problems existing in the prior art. Summary of the Invention
[0008] To address the aforementioned problems, the present invention aims to propose an online virtual sensing method for hydrogen and ammonia emissions from hydrogen internal combustion engines based on a lightweight neural network. This method constructs and deploys a simple neural network model with a small number of parameters, inputs engine operating status data, and estimates hydrogen / ammonia concentrations in real time. It replaces traditional sensors to achieve high-precision emission detection, and has advantages such as low cost, embeddability, and high accuracy, thus solving the problems existing in the prior art.
[0009] To achieve the objectives of this invention, the invention is implemented through the following technical solution: an online virtual sensing method for hydrogen ammonia emissions from a hydrogen internal combustion engine based on a lightweight neural network, comprising the following steps:
[0010] Step 1: Construction of a standardized dataset
[0011] By collecting engine operating status data and hydrogen and ammonia emission data during actual vehicle operation and vehicle bench test operation, after data processing, feature data related to hydrogen and ammonia combustion and emission are extracted, and then dimensionality is reduced to 90% information retention rate through principal component analysis to form a standardized dataset.
[0012] Step 2: Construction of a Lightweight Neural Network Model
[0013] A lightweight neural network model is constructed, which consists of a dual-branch spatiotemporal fusion structure, a fully connected layer, and an output layer. The dual branches include a temporal branch and a spatial branch, which are connected to the output layer through the fully connected layer. The model outputs predicted values of hydrogen and ammonia concentrations.
[0014] Step 3: Model Deployment and Real-time Optimization
[0015] The lightweight neural network model is compressed and then compiled into an automotive-grade control chip, while an online learning mechanism is introduced.
[0016] Step 4: Output of Real-Time Emission Estimates
[0017] The automotive-grade control chip receives engine operating status parameters in real time via the CAN FD bus and uses a lightweight neural network model to calculate and output instantaneous concentration values of hydrogen and ammonia.
[0018] A further improvement is that, in step one, the engine operating status data includes cylinder pressure, cylinder temperature, air-fuel ratio, EGR rate, engine speed, and fuel injection pulse width.
[0019] The further improvement lies in the fact that, in step one, data processing includes data denoising, outlier removal, and data standardization.
[0020] A further improvement is made in the following: In step one, the feature data includes time-domain feature data, frequency-domain feature data, and statistical feature data. The time-domain feature data includes maximum combustion pressure, pressure rise rate, combustion start point, combustion end point, indicated mean effective pressure, exhaust temperature, instantaneous excess air coefficient, instantaneous EGR rate, and single-cycle hydrogen or ammonia injection amount. The frequency-domain feature data includes knock frequency energy, combustion resonance main frequency, and cylinder wall temperature fluctuation. The statistical feature data includes cycle variation coefficient, maximum pressure position standard deviation, control deviation, and EGR rate fluctuation range.
[0021] A further improvement is made in step two, where the standardized dataset formed in step one is used to train the constructed lightweight neural network model.
[0022] A further improvement is that in step two, the temporal branch consists of two layers of GRU units, and the spatial branch consists of 1D convolutional layers.
[0023] A further improvement is made in step three, where the automotive-grade control chip is connected to the cloud server via a wireless network. The automotive-grade control chip encrypts and uploads sparse gradients every minute, and the cloud server aggregates the data, performs differential privacy federated learning, and sends out incremental model update packages every ≤60 seconds for global optimization.
[0024] A further improvement is made in step three, where a weight quantization method is used to compress the lightweight neural network model.
[0025] The beneficial effects of this invention are as follows:
[0026] (1) This invention uses a lightweight neural network virtual sensing technology to eliminate traditional hardware sensors and replace expensive hydrogen / ammonia sensors, thereby significantly reducing equipment costs. At the same time, it avoids the impact of sensor failure or aging, reducing maintenance costs and system downtime during long-term operation.
[0027] (2) This invention utilizes a lightweight neural network model composed of a dual-branch spatiotemporal fusion structure, a fully connected layer, and an output layer. Through compression, this model can operate efficiently in automotive-grade control chips, ensuring real-time estimation of emission concentrations. Each calculation cycle requires only a small amount of computing resources, thus ensuring that the system can achieve efficient real-time inference and emission monitoring without affecting the performance of other vehicle systems.
[0028] (3) The present invention introduces an online learning mechanism. Through incremental learning and online optimization, it can learn and adjust according to real-time data, thereby enhancing the system’s adaptability to different working conditions, different driving environments and engine aging. Attached Figure Description
[0029] Figure 1This is a schematic diagram of the steps of the present invention.
[0030] Figure 2 This is a schematic diagram of the workflow of the lightweight neural network model of the present invention. Detailed Implementation
[0031] To enhance understanding of the present invention, the present invention will be further described in detail below with reference to embodiments. These embodiments are only used to explain the present invention and do not constitute a limitation on the scope of protection of the present invention.
[0032] according to Figures 1-2 As shown in the figure, this embodiment proposes an online virtual sensing method for hydrogen ammonia emissions from hydrogen internal combustion engines based on lightweight neural networks, including the following steps:
[0033] Step 1: Construction of a standardized dataset
[0034] By deploying sensors, engine operating status data and hydrogen / ammonia emission data are collected in actual and experimental vehicles. This data includes cylinder pressure (a core parameter measuring the intensity of engine combustion, reflecting pressure changes during combustion and affecting emission characteristics), cylinder temperature (directly affecting combustion temperature distribution, thus influencing hydrogen / ammonia generation and emissions), air-fuel ratio (controlling fuel combustion efficiency, adjusting the ratio of fuel supply to air during combustion), EGR rate (EGR rate adjusts combustion temperature, reducing NOx generation, and also affecting hydrogen / ammonia emission characteristics), engine speed (characterizing the periodicity of power output, playing a crucial role in the dynamic changes of the combustion process), and fuel injection pulse width (directly determining the fuel supply in each combustion cycle, a key parameter for controlling engine combustion). These parameters are acquired in real-time via a CAN FD bus system and aligned with millisecond-level timestamps. A sliding time window algorithm (100ms window length) is used to dynamically match asynchronous signals (e.g., high-frequency 20kHz cylinder pressure waveform with low-frequency 100Hz engine speed signal) to ensure data timing consistency.
[0035] Then data processing is performed, which includes noise reduction, specifically:
[0036] Because the cylinder pressure signal is affected by high-frequency noise, a three-level db4 wavelet transform filter is used to denoise the cylinder pressure signal, filtering out high-frequency noise above 20kHz and retaining key features related to the combustion process.
[0037] Temperature / pressure signals such as cylinder temperature and air-fuel ratio are smoothed using an improved Savitzky-Golay filter. This filter smooths the data (window length 51 points) through cubic polynomial fitting, eliminating random interference and avoiding signal waveform distortion.
[0038] Then, outlier detection is performed to remove abnormal points that exceed physical laws (such as negative cylinder pressure or excessive speed) to ensure data reliability.
[0039] To eliminate differences between different units of measurement, a hierarchical standardization strategy is used to process the data, specifically:
[0040] Nonlinear characteristics such as cylinder pressure waveform: Min-Max normalization is used to normalize it to the [0,1] interval, preserving the dynamic change details of the signal and avoiding information loss;
[0041] Periodic signals such as air-fuel ratio and engine speed: Z-score standardization is used to standardize periodic signals, making the data distribution uniform and helping to accelerate the convergence speed during model training.
[0042] After data processing, characteristic data related to hydrogen-ammonia combustion and emissions are extracted, including time-domain characteristic data, frequency-domain characteristic data, and statistical characteristic data. The time-domain characteristic data includes maximum combustion pressure (reflecting combustion intensity, affecting thermal efficiency and emissions), pressure rise rate (characterizing combustion speed, related to knocking and NOx formation), combustion start point (spark ignition / auto-ignition moment, affecting combustion phase), combustion end point (combustion duration, associated with incomplete combustion risk), indicated mean effective pressure (single-cycle work capacity, reflecting load status), exhaust temperature (directly related to aftertreatment efficiency and ammonia escape risk), instantaneous excess air coefficient (determining oxygen-rich / oxygen-deficient combustion state), and E... The instantaneous GR rate (affecting in-cylinder temperature and NOx formation) and single-cycle hydrogen / ammonia injection quantity (actual fuel supply calculated from engine speed and pulse width) are included. Frequency domain characteristic data include knock frequency energy (hydrogen combustion is prone to knocking, and frequency domain energy can quantify its intensity), combustion resonance main frequency (reflecting combustion stability), and cylinder wall temperature fluctuation (low-frequency fluctuations reflect changes in heat load and affect combustion boundary conditions). Statistical characteristic data include cycle variation coefficient (related to emission fluctuations), standard deviation of maximum pressure position (combustion phase fluctuations, reflecting control accuracy), control deviation (reflecting mixing uniformity), and EGR rate fluctuation range (transient response capability of the EGR system, affecting in-cylinder operating condition consistency).
[0043] After feature extraction, principal component analysis (PCA) is used for dimensionality reduction to retain 90% of the information, reduce redundant information, and improve the efficiency and accuracy of subsequent model training.
[0044] Step 2: Construction of a Lightweight Neural Network Model
[0045] A lightweight neural network model is constructed, which consists of a two-branch spatiotemporal fusion structure, a fully connected layer, and an output layer. Therefore, the model adopts a two-branch spatiotemporal fusion structure to make full use of time series data and spatial feature data to optimize the emission prediction accuracy.
[0046] The network employs a dual-branch architecture, comprising a temporal branch and a spatial branch. The temporal branch processes the temporal features of the input data, focusing on dynamic changes during combustion. It consists of two layers of GRU (Gated Recursive Unit) cells (with ≤16 hidden nodes). The first GRU cell captures the basic temporal features of the input data and extracts preliminary dynamic change information. The second GRU cell further models the temporal features, extracting more complex temporal relationships and enhancing the network's ability to represent temporal features. The spatial branch processes the spatial features of the input data, particularly spatial information related to combustion states under different operating conditions. Specifically, it uses 1D convolutional layers to extract local spatial features of the signal. After extracting temporal and spatial features respectively, the temporal and spatial branches are fused through a fully connected layer and output to the output layer, which generates the final predicted hydrogen / ammonia concentration values.
[0047] After constructing the lightweight neural network model, the standardized dataset from step one is used to train the model. Specifically, the standardized dataset is divided into 7 parts (training set): 2 parts (test set): 1 part (validation set). Training is performed using the training set, with mean squared error as the loss function. The Adam optimizer is used to optimize the model parameters, and batch gradient descent is employed to minimize the loss function. Further optimization of the model's performance is achieved by adjusting hyperparameters such as the learning rate, the number of GRU layers, and the kernel size. During hyperparameter tuning, grid search or random search methods are used to select the optimal combination of hyperparameters.
[0048] After multiple rounds of training and evaluation, a lightweight neural network model was finally obtained, which can accurately predict the emission concentrations of hydrogen and ammonia under given input parameters.
[0049] Step 3: Model Deployment and Real-time Optimization
[0050] The constructed lightweight neural network model is compressed, specifically using weight quantization. The compression aims to reduce storage space, computational resource consumption, and inference speed while maintaining prediction accuracy as much as possible. Weight quantization significantly reduces storage space and computational burden by converting the floating-point weights of the lightweight neural network model into low-precision representations (e.g., 8-bit integers). The compressed lightweight neural network model is then compiled into a format suitable for automotive-grade control chips, ensuring efficient operation in embedded systems. It is then deployed into the automotive control chip to achieve real-time hydrogen / ammonia emission concentration prediction.
[0051] Furthermore, an online learning mechanism is introduced into the overall process. Specifically, the automotive-grade control chip connects to a cloud server via a wireless network, encrypting and uploading sparse gradients every minute (i.e., only uploading the important gradient information in the model) to ensure data privacy and transmission efficiency. This step avoids uploading the entire training data, reducing bandwidth requirements. Correspondingly, the cloud server (pre-configured for model updates) receives gradient data from multiple in-vehicle systems, aggregates it using federated learning technology, and protects the privacy of the uploaded data through differential privacy. Every 60 seconds, the cloud generates an incremental model update package and sends it to the automotive-grade control chip via a wireless network. Upon receiving the incremental update package, the automotive-grade control chip uses the online learning mechanism to perform incremental model updates, adapting to new data and environmental conditions in real time. The incremental update method ensures continuous model optimization without requiring retraining from scratch each time. This real-time optimization capability effectively responds to changes in the environment and operating conditions, improving long-term adaptability and accuracy.
[0052] Step 4: Output of Real-Time Emission Estimates
[0053] After the lightweight neural network model is deployed, the automotive-grade control chip receives engine operating status parameters in real time via the CAN FD bus (the CAN FD bus provides a high-bandwidth data transmission channel to ensure that data from multiple sensors can be transmitted synchronously and efficiently to the automotive-grade control chip, and supports millisecond-level time synchronization to ensure the spatiotemporal consistency of the data), inputs them into the lightweight neural network model for real-time calculation, and outputs the instantaneous concentration values of hydrogen and ammonia.
[0054] Accuracy tests were conducted by comparing the traditional DNN (fully connected network) virtual sensing scheme with that of the traditional DNN. The testing equipment included a Fourier transform infrared (FTIR) analyzer and a chemiluminescence analyzer (CLD). The calculation method was as follows:
[0055] (1) Hydrogen prediction error = (predicted value - FTIR measurement value) / range × 100%;
[0056] (2) Ammonia prediction error = (predicted value - CLD measured value) / range × 100%.
[0057] The results are shown in Table 1 below:
[0058] Table 1
[0059] index This invention Traditional DNN Prediction accuracy Within ±7% ±10%~15%
[0060] As shown in Table 1 above, the hydrogen / ammonia emission prediction accuracy of the present invention is better than that of the traditional DNN model, and its prediction error is controlled within ±7%. It should also be noted that the present invention uses a lightweight neural network model, which has been compressed, and its computing resources are less than 30% of those of the traditional DNN.
[0061] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the present invention without departing from its framework and scope of application, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for online virtual sensing of hydrogen and ammonia emissions from hydrogen internal combustion engines based on lightweight neural networks, characterized in that: Includes the following steps: Step 1: Construction of Standardized Dataset By collecting engine operating status data and hydrogen and ammonia emission data during actual vehicle operation and vehicle bench test operation, after data processing, feature data related to hydrogen and ammonia combustion and emission are extracted, and then dimensionality is reduced to 90% information retention rate through principal component analysis to form a standardized dataset. Step 2: Construction of a Lightweight Neural Network Model A lightweight neural network model is constructed, which consists of a dual-branch spatiotemporal fusion structure, a fully connected layer, and an output layer. The dual branches include a temporal branch and a spatial branch, which are connected to the output layer through the fully connected layer. The model outputs predicted values of hydrogen and ammonia concentrations. Step 3: Model Deployment and Real-time Optimization The lightweight neural network model is compressed and then compiled into an automotive-grade control chip, while an online learning mechanism is introduced. Step 4: Output of Real-Time Emission Estimates The automotive-grade control chip receives engine operating status parameters in real time via the CAN FD bus and uses a lightweight neural network model to calculate and output instantaneous concentration values of hydrogen and ammonia.
2. The online virtual sensing method for hydrogen ammonia emissions from a hydrogen internal combustion engine based on a lightweight neural network according to claim 1, characterized in that: In step one, the engine operating status data includes cylinder pressure, cylinder temperature, air-fuel ratio, EGR rate, engine speed, and fuel injection pulse width.
3. The online virtual sensing method for hydrogen ammonia emissions from a hydrogen internal combustion engine based on a lightweight neural network according to claim 1, characterized in that: In step one, data processing includes data denoising, outlier removal, and data standardization.
4. The online virtual sensing method for hydrogen ammonia emissions from a hydrogen internal combustion engine based on a lightweight neural network according to claim 1, characterized in that: In step one, the characteristic data includes time-domain characteristic data, frequency-domain characteristic data, and statistical characteristic data. The time-domain characteristic data includes maximum combustion pressure, pressure rise rate, combustion start point, combustion end point, indicated mean effective pressure, exhaust temperature, instantaneous excess air coefficient, instantaneous EGR rate, and single-cycle hydrogen or ammonia injection amount. The frequency-domain characteristic data includes knock frequency energy, combustion resonance main frequency, and cylinder wall temperature fluctuation. The statistical characteristic data includes cycle variation coefficient, maximum pressure position standard deviation, control deviation, and EGR rate fluctuation range.
5. The online virtual sensing method for hydrogen ammonia emissions from a hydrogen internal combustion engine based on a lightweight neural network according to claim 1, characterized in that: In step two, the lightweight neural network model is trained using the standardized dataset formed in step one.
6. The online virtual sensing method for hydrogen ammonia emissions from a hydrogen internal combustion engine based on a lightweight neural network according to claim 1, characterized in that: In step two, the temporal branch consists of two layers of GRU units, and the spatial branch consists of 1D convolutional layers.
7. The online virtual sensing method for hydrogen ammonia emissions from a hydrogen internal combustion engine based on a lightweight neural network according to claim 1, characterized in that: In step three, the automotive-grade control chip is connected to the cloud server via a wireless network. The automotive-grade control chip encrypts and uploads sparse gradients every minute. The cloud server aggregates the data, performs differential privacy federated learning, and sends out incremental model update packages every ≤60 seconds for global optimization.
8. The online virtual sensing method for hydrogen ammonia emissions from a hydrogen internal combustion engine based on a lightweight neural network according to claim 1, characterized in that: In step three, a lightweight neural network model is compressed using weight quantization.
Citation Information
Patent Citations
Neural-network-based analog simulation system of vehicle gas emissions
CN107545122A
Coal mine gas concentration prediction method based on parallel structure
CN119416960A
Ammonia injection control system and method for active and passive two-stage SCR aftertreatment of ship ammonia engine
CN120175454A
CNN-GRU-based air quality index prediction method
CN120181321A
Intelligent multi-gas detection module data processing system and method based on NDIR
CN120260734A