Soft sensing method for exhaust flow of ammonia engine
A predictive model for the intake flow of an ammonia engine was established by using correlation and LSTM algorithms, which solved the problem of difficult measurement of the exhaust flow of an ammonia engine and achieved high-precision indirect monitoring of exhaust flow. This model is suitable for measuring the exhaust flow of an ammonia engine.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- CSSC POWER INST CO LTD
- Filing Date
- 2025-11-05
- Publication Date
- 2026-07-23
Smart Images

Figure CN2025132764_23072026_PF_FP_ABST
Abstract
Description
A soft measurement method for exhaust flow of ammonia engine Technical Field
[0001] This invention belongs to the field of marine engine soft measurement technology, and in particular relates to a soft measurement method for the exhaust flow of an ammonia engine. Background Technology
[0002] There are two main methods for measuring engine exhaust flow: direct measurement and carbon balance method. Direct measurement involves directly measuring the exhaust flow using a flow meter, or estimating the exhaust flow by measuring the intake and fuel flow rates. The principle behind this method is that by controlling and monitoring the intake and fuel volumes, the exhaust flow can be indirectly estimated through material balance. The carbon balance method calculates the exhaust flow by analyzing key parameters such as the concentration of carbon components in the exhaust. This method typically requires measuring the carbon dioxide (CO) concentration in the exhaust gas and then deriving the exhaust flow based on the carbon source consumption during combustion.
[0003] In marine engines, especially low-speed engines, direct measurement methods are difficult to implement due to the large size of their intake and exhaust pipes and the typically limited installation space for flow meters. To overcome these challenges, marine engines commonly employ the carbon balance method for calculating exhaust flow. By measuring the CO concentration and other key emission components in the exhaust, the carbon balance method can estimate exhaust flow with relatively high accuracy.
[0004] However, the situation is different for ammonia engines. Ammonia, as a carbon-free fuel, produces exhaust gases primarily composed of nitrogen, water vapor, nitrogen oxides (NOx), and potentially escaped ammonia. This is significantly different from the exhaust composition of traditional carbon-based fuel engines (such as diesel and gasoline), making it impossible to use the carbon balance method to calculate exhaust flow in ammonia engines. Because ammonia fuel contains no carbon, exhaust flow cannot be estimated by measuring carbon. This unique characteristic renders the traditional carbon balance method unsuitable for ammonia engines, necessitating the development of new exhaust flow measurement methods suitable for ammonia-fueled engines.
[0005] Developing exhaust flow measurement technology suitable for ammonia engines is of great significance for promoting the widespread application of ammonia as an alternative fuel. Ammonia, as an environmentally friendly fuel, has broad application prospects in ships and other fields, but its unique emission characteristics necessitate innovation in exhaust flow measurement methods. In the future, designing a simple, practical, and economical exhaust flow measurement method for ammonia engines while ensuring measurement accuracy will be a key technical challenge in ammonia fuel engine research. Summary of the Invention
[0006] The purpose of this invention is to provide a soft measurement method for the exhaust flow of ammonia fuel engines in ships, which is not possible to measure using direct measurement methods and carbon balance methods, so that the exhaust flow can be measured.
[0007] To achieve the above objectives, the present invention provides a soft measurement method for ammonia engine exhaust flow rate, comprising the following steps: Data acquisition: acquiring emission data, fuel consumption data, and conventional measurement point data of an ammonia engine in diesel mode, and calculating exhaust flow rate and intake flow rate; Auxiliary variable selection: selecting multiple measurable or extractable variables as pre-input variables for an ammonia engine intake flow rate prediction model; Data preprocessing: removing outlier data and ensuring data scale consistency between different parameters using numerical interpolation methods; Parameter sensitivity analysis: analyzing the contribution of auxiliary variables to the predicted intake flow rate value, and selecting the most influential auxiliary variables as the final model input; Establishing an ammonia engine intake flow rate soft measurement model: establishing an ammonia engine intake flow rate soft measurement model based on a long short-term memory network; Model training and testing: training and testing the ammonia engine intake flow rate soft measurement model, training the model based on the selected auxiliary variables and intake flow rate data in ammonia engine diesel mode, and performing parameter tuning; verifying the trained ammonia engine intake flow rate soft measurement model using independent test data. Application Model: After training and testing the soft measurement model of intake air flow in the diesel mode of the ammonia engine, the soft measurement model can be directly used to predict the intake air flow in the ammonia mode of the ammonia engine; by collecting fuel consumption data in real time, the predicted intake air flow and the collected fuel consumption data are added together to obtain the predicted exhaust flow in the ammonia mode.
[0008] Preferably, in the data acquisition step, data from various measuring points of the engine can be collected using the ammonia engine control system, or data can be acquired by using an online monitoring system through communication with the ammonia engine control system and the emission analyzer.
[0009] Preferably, in the step of selecting auxiliary variables, engine characteristic parameters that are highly correlated with intake air flow can be selected as auxiliary variables, including engine speed, torque, turbocharger speed and turbocharger outlet temperature.
[0010] Preferably, in the data preprocessing step, an interpolation function is used to adjust the data acquired at different sampling rates to ensure they have the same time scale; the formula is as follows: x resampled =interpolate(x,newrate)
[0011] Where interpolate is the interpolation function that estimates the value of new data points between or outside the original data points; x is the original data, which can be time series data; and new_rate is the target sampling rate, which represents the new time interval to which the original data will be resampled.
[0012] Preferably, in the parameter sensitivity analysis step, a global sensitivity analysis method is used to evaluate the degree of influence of each input parameter on the output result; the formula is as follows:
[0013] Where Si is the sensitivity index, Var i (Y) is the output variance caused by the i-th parameter, and Var(Y) is the total output variance.
[0014] Preferably, in the step of establishing a soft measurement model for the intake airflow of an ammonia engine, a Long Short-Term Memory (LSTM) network is introduced with a forget gate, an input gate, and an output gate to control the flow of information. The LSTM network includes an input layer, an LSTM layer, and a fully connected output layer. The input layer accepts data of shape (time step, number of features), where the time step and the number of features are determined by the shape of the normalized training data. The LSTM layer contains 128 units and uses the SELU activation function, returning only the last output of the sequence. A fully connected layer maps the output of the LSTM layer to a space of the same dimension as the target data to produce a prediction result.
[0015] Preferably, in the step of establishing a soft measurement model for the intake airflow of an ammonia engine, the model uses mean squared error as the loss function and is trained using the Adam optimizer; the LSTM unit formula is as follows: f t =σ(W f ·[h t-1 x t ]+b f i t =σ(W i ·[h t-1 x t ]+b i ) o t =σ(W o ·[h t-1 x t ]+b o h t =o t *tanh(C t )
[0016] Where f t i t o t These are the activation vectors for the forget gate, input gate, and output gate, respectively. C t It is a unit state. It is the candidate unit state, x t It is the input for the current time step, h tσ is the hidden state, σ is the activation function, W and b are the weights and biases respectively, the subscript t-1 represents the previous time step, and the subscript t represents the current time step.
[0017] Preferably, in the model training and testing steps, the mean square error between the predicted intake flow rate calculated by the soft sensor model and the measured intake flow rate is used to evaluate the accuracy of the soft sensor model's prediction; the formula is as follows:
[0018] Among them, y i This is the actual value. is the predicted value, and n is the total number of samples.
[0019] Preferably, in the application model step, during bench testing of the ammonia engine, a soft measurement model for intake air flow is built based on diesel mode. The soft measurement model algorithm is deployed in the engine control system or online monitoring system. When the ammonia engine switches to ammonia mode, the three variables with the greatest influence are collected in real time as inputs to the soft measurement model to obtain the real-time predicted intake air flow in ammonia mode. The mean absolute percentage error (MASE) is used to calculate the error between the predicted and actual intake air flow values. The formula for calculating the MASE is:
[0020] Among them, y i This is the actual value. is the predicted value, and n is the total number of samples.
[0021] In summary, this invention offers the following beneficial technical effects: It enables the indirect acquisition of ammonia engine exhaust flow rate using data from other sensor measurement points, even when physical flow meters and carbon balance methods are unavailable for calculating exhaust flow rate. Furthermore, by employing correlation algorithms and Long Short-Term Memory (LSTM) intelligent algorithms, this invention analyzes the mapping relationship between hydrogen engine characteristic parameters and intake flow rate, establishes an ammonia engine intake flow rate prediction model, and then achieves indirect monitoring of the difficult-to-measure hydrogen engine exhaust flow rate by real-time fuel consumption data. Attached Figure Description
[0022] Figure 1 is a schematic diagram of the implementation steps of the soft measurement method for ammonia engine exhaust flow; Figure 2 is a schematic diagram of the LSTM network principle; Figure 3 is a schematic diagram of the sensitivity analysis results of the parameters affecting ammonia engine exhaust flow; Figure 4 is a schematic diagram of the model training error curve; Figure 5 is a schematic diagram of the ammonia engine exhaust flow prediction results. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] This invention discloses a method for monitoring the exhaust flow of an ammonia engine based on soft measurement technology. This method can indirectly obtain the exhaust flow of an ammonia engine using data from other sensor measurement points when physical flow meters and carbon balance methods cannot be used to calculate the exhaust flow. By employing correlation algorithms and Long Short-Term Memory (LSTM) intelligent algorithms, the mapping relationship between the characteristic parameters of the ammonia engine and the intake flow is analyzed, and an ammonia engine intake flow prediction model is established. Then, by collecting fuel consumption data in real time, indirect monitoring of the exhaust flow of an ammonia engine, which is difficult to measure directly, can be achieved. Its key feature is that this method determines the mapping relationship between the characteristic parameters of the ammonia engine and the intake flow through the following steps: 1) Data acquisition: Emission data, fuel consumption data, and conventional measurement point data of the ammonia engine in diesel mode are acquired using bench testing. The exhaust flow of the ammonia engine in diesel mode is calculated using the carbon balance method; the intake flow of the ammonia engine equals the exhaust flow minus the fuel consumption.
[0025] 2) Selection of auxiliary variables: Select appropriate variables as pre-input variables for the ammonia engine intake flow prediction model. Auxiliary variables should be measurable or extractable, and should be as independent as possible from each other to reduce redundancy.
[0026] 3) Data preprocessing: Data preprocessing mainly includes two aspects: first, removing outlier data, and second, ensuring data scale consistency between different parameters by using numerical interpolation methods.
[0027] 4) Parameter sensitivity analysis: Global sensitivity analysis is used to calculate the contribution of each auxiliary variable to the predicted intake flow rate, and the three variables with the greatest influence are selected as the final model input.
[0028] 5) Soft measurement model of ammonia engine intake flow: A soft measurement model of ammonia engine intake flow is established based on a long short-term memory network (LSTM).
[0029] 6) Model training and testing: The soft measurement model of the ammonia engine intake flow is trained and tested. The model is trained based on the selected parameters and the intake flow data of the ammonia engine in diesel mode, and the parameters are optimized. The prediction effect of the trained soft measurement model of the ammonia engine intake flow is verified using independent test data, specifically including mean square error to evaluate the prediction accuracy and reliability.
[0030] 7) Model Application: After training and testing the soft measurement model for intake air flow in the diesel mode of an ammonia engine, the soft measurement model can be directly used for intake air flow prediction in the ammonia mode of an ammonia engine. By collecting fuel consumption (diesel and ammonia) data in real time, the predicted intake air flow is added to the collected fuel consumption data to obtain the predicted exhaust flow in the ammonia mode.
[0031] The following is a detailed explanation of each step: 1) Data acquisition: Bench tests can use the ammonia engine control system to collect data from various measuring points of the engine; or use an online monitoring system to acquire data by communicating with the ammonia engine control system and the emission analyzer.
[0032] 2) Selection of auxiliary variables: Engine characteristic parameters that are highly correlated with intake air flow can be selected as auxiliary variables, such as engine speed, torque, turbocharger speed, turbocharger outlet temperature, etc.
[0033] 3) Data preprocessing: Interpolation functions are used to adjust data acquired at different sampling rates to ensure they have the same time scale. The formula is as follows: x resampled =interpolate(x,newrate)
[0034] Here, `interpolate` is the interpolation function, which estimates the values of new data points between or outside the original data points. `x` is the original data, which can be time-series data, such as sensor readings, collected at certain time intervals (the original sampling rate). `new_rate` is the target sampling rate, representing the new time interval at which the original data will be resampled.
[0035] 4) Parameter Sensitivity Analysis: A global sensitivity analysis method is used to evaluate the impact of each input parameter on the output result. The formula is as follows:
[0036] Where Si is the sensitivity index, Var i (Y) is the output variance caused by the i-th parameter, and Var(Y) is the total output variance.
[0037] 5) Soft Measurement Model of Ammonia Engine Intake Flow: A soft measurement model of ammonia engine intake flow is established based on a Long Short-Term Memory (LSTM) network. LSTM is a special type of recurrent neural network (RNN) used to process and predict long-term dependencies in time series data. Unlike traditional RNNs, LSTM introduces three gating mechanisms (forget gate, input gate, and output gate) to control the flow of information. The main working principle of LSTM is shown in Figure 2, consisting of an input layer, an LSTM layer, and a fully connected output layer. The input layer accepts data of shape (time step, number of features), where the time step and number of features are determined by the shape of the normalized training data. The LSTM layer contains 128 units and uses the SELU activation function, which returns only the last output of the sequence. Finally, a fully connected layer maps the output of the LSTM layer to a space of the same dimension as the target data to produce the prediction result. The model uses mean squared error (MSE) as the loss function and is trained using the Adam optimizer.
[0038] The formula for the LSTM cell is as follows: f t =σ(W f ·[h t-1, x t ]+b f i t =σ(W i ·[h t-1 x t ]+b i ) o t =σ(W o ·[h t-1 x t ]+b o h t =o t *tanh(C t )
[0039] Where f t i t o t These are the activation vectors for the forget gate, input gate, and output gate, respectively, and are C. t Cell state, It is the candidate unit state, x t It is the input for the current time step, h t σ is the hidden state, σ is the activation function, and W and b are the weights and biases, respectively. The subscript t-1 represents the previous time step, and the subscript t represents the current time step.
[0040] 6) Model Training and Testing: The accuracy of the soft sensor model's predictions is evaluated using the mean square error (MSE) between the predicted intake flow rate calculated by the soft sensor model and the measured intake flow rate (the exhaust flow rate calculated based on the carbon balance method). The formula is as follows:
[0041] Among them, y i This is the actual value. is the predicted value, and n is the total number of samples.
[0042] 7) Model Application: During bench testing of the ammonia engine, a soft-sensing model for intake airflow was built based on diesel mode. The soft-sensing model algorithm was deployed in the engine control system or online monitoring system. When the ammonia engine switched to ammonia mode, the three variables with the greatest impact were collected in real time as inputs to the soft-sensing model to obtain the real-time predicted intake airflow in ammonia mode. The predicted exhaust airflow in ammonia mode was obtained by adding the predicted intake airflow to the collected fuel consumption data (diesel and ammonia) in real time. The Mean Absolute Percentage Error (MAPE) was used to calculate the error between the predicted and actual intake airflow values. The formula for calculating the Mean Absolute Percentage Error is:
[0043] Among them, y i This is the actual value. is the predicted value, and n is the total number of samples.
[0044] Application Example: To verify the soft measurement effect of the correlation algorithm and long short-term memory network on engine exhaust flow, due to the lack of ammonia engine test data and the general applicability of this invention to engine exhaust flow prediction, test data collected from the control system of a spark plug ignition compressed natural gas high-speed engine was used as the research object. Some auxiliary variables were selected, such as: speed (SPEED), torque (TORQUE), turbine inlet temperature (T_TRB_I), turbine outlet temperature (T_TRB_O), turbine inlet pressure (P_TRB_I), intercooler inlet pressure (P_IC_I), intercooler outlet pressure (P_IC_O), intercooler inlet temperature (T_IC_I), and intercooler outlet temperature (T_IC_O), to predict engine exhaust flow.
[0045] Auxiliary variables, even within the same sampling time, will have different numbers of data points due to varying sampling frequencies. Therefore, a data resampling method is used to ensure a consistent number of data points. For example, if the number of data points for the intercooler inlet pressure (25520) within the same sampling time is selected as a baseline, resampling can be performed on the other parameters to maintain the same number of data points (25520).
[0046] The sensitivity of exhaust flow rate to different auxiliary variables was analyzed, and the results are as follows: The three parameters that have the greatest impact on exhaust flow rate are: intercooler inlet pressure (P_IC_I), turbine inlet pressure (P_TRB-I), and intercooler outlet pressure (P_IC_O), with sensitivity indices of 0.79, 0.12, and 0.09, respectively (the sensitivity index is between 0 and 1, and the closer it is to 1, the greater the influence of the parameter). The results are shown in Figure 3.
[0047] After the parameter sensitivity analysis, the three most influential auxiliary variables (P_IC_I, P_TRB-I, and P_IC_O) were used as the input parameters of the LSTM model. The acquired experimental data was divided into training and test sets in a 6:4 ratio, with 15312 data points in the training set and 10208 data points in the test set. The loss function curve for the LTSM model training is shown in Figure 4, and the training error reached an order of magnitude of 10. -5 And it has converged, indicating that the model has reached stability.
[0048] The model loss curve converged, and the trained LTSM model was used to predict exhaust flow. The prediction results are shown in Figure 5. The trends of the actual and predicted values are consistent, and the mean absolute percentage error is 2.79%. Figure 5 shows that the LTSM model has a good effect on predicting engine exhaust flow.
[0049] This application relates to the technology for measuring the exhaust flow of marine ammonia fuel engines, belonging to the field of marine engine soft measurement technology. This invention provides a method for measuring engine exhaust flow based on soft measurement technology. By using correlation algorithm and Long Short-Term Memory (LSTM) intelligent algorithm, the mapping relationship between engine characteristic parameters and exhaust flow is analyzed, and an engine exhaust flow prediction model is established to achieve indirect monitoring of the exhaust flow of ammonia engines, which is difficult to measure directly.
[0050] To verify the effectiveness of this method, based on test data from a spark-ignited high-speed natural gas engine, the engine's characteristic parameters were reduced in dimensionality using simulation techniques. This optimized the exhaust flow prediction model structure and improved the model's accuracy, real-time performance, and generalization ability. Comparing the model's predicted values with experimental values, the exhaust flow prediction performance was good, with an average absolute percentage error of ≤3%. The verification results indicate that the method provided by this invention is suitable for predicting engine exhaust flow. This invention is universally applicable to various types of engines, especially when the engine uses carbon-free fuels such as ammonia or hydrogen. This invention can be used to predict intake flow using soft measurement methods, and then exhaust flow can be obtained by real-time fuel consumption monitoring. This invention provides a solution for measuring exhaust flow in zero-carbon engines.
[0051] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A soft measurement method for exhaust flow rate of an ammonia engine, characterized in that, Includes the following steps: Data Acquisition: Acquire emission data, fuel consumption data, and routine measurement point data of the ammonia engine in diesel mode, and calculate exhaust flow and intake flow. Select auxiliary variables: Select multiple measurable or extractable variables as pre-input variables for the ammonia engine intake flow prediction model; Preprocessing data: Remove outlier data and ensure data scale consistency between different parameters using numerical interpolation methods; Parameter sensitivity analysis: Analyze the contribution of auxiliary variables to the predicted intake flow rate, and select the auxiliary variables with the greatest impact as the final model input; Establishing a soft measurement model for the intake flow of an ammonia engine: A soft measurement model for the intake flow of an ammonia engine is established based on a long short-term memory network; Training and testing the model: The soft measurement model of intake flow of ammonia engine was trained and tested. The model was trained based on the selected auxiliary variables and intake flow data of ammonia engine in diesel mode, and the parameters were optimized. The trained soft measurement model for ammonia engine intake flow was validated using independent test data. Application Model: After training and testing the soft measurement model of intake flow in the diesel mode of an ammonia engine, the soft measurement model can be directly used for intake flow prediction in the ammonia mode of an ammonia engine. By collecting fuel consumption data in real time, the predicted intake flow rate is added to the collected fuel consumption data to obtain the predicted exhaust flow rate in ammonia mode.
2. The soft measurement method for exhaust flow of an ammonia engine according to claim 1, characterized in that, In the data acquisition step, data from various measuring points of the engine can be collected using the ammonia engine control system, or data can be acquired by using an online monitoring system through communication with the ammonia engine control system and the emission analyzer.
3. The soft measurement method for exhaust flow of an ammonia engine according to claim 1, characterized in that, In the step of selecting auxiliary variables, engine characteristic parameters that are highly correlated with intake air flow can be selected as auxiliary variables, including engine speed, torque, turbocharger speed and turbocharger outlet temperature.
4. The soft measurement method for exhaust flow of an ammonia engine according to claim 1, characterized in that, In the data preprocessing step, an interpolation function is used to adjust the data acquired at different sampling rates to ensure they have the same time scale; the formula is as follows: x resampled =interpolate(x,newrate) Where interpolate is the interpolation function that estimates the value of new data points between or outside the original data points; x is the original data, which can be time series data; and new_rate is the target sampling rate, which represents the new time interval to which the original data will be resampled.
5. The soft measurement method for exhaust flow of an ammonia engine according to claim 1, characterized in that, In the parameter sensitivity analysis step, a global sensitivity analysis method is used to evaluate the influence of each input parameter on the output result; the formula is as follows: Where Si is the sensitivity index, Var i (Y) is the output variance caused by the i-th parameter, and Var(Y) is the total output variance.
6. The soft measurement method for exhaust flow of an ammonia engine according to claim 1, characterized in that, In the process of establishing a soft measurement model for the intake airflow of an ammonia engine, a Long Short-Term Memory (LSTM) network is used to control the flow of information by introducing a forget gate, an input gate, and an output gate. The LSTM network consists of an input layer, an LSTM layer, and a fully connected output layer. The input layer accepts data of shape (time step, number of features), where the time step and the number of features are determined by the shape of the normalized training data. The LSTM layer contains 128 units and uses the SELU activation function, returning only the last output of the sequence. A fully connected layer maps the output of the LSTM layer to a space of the same dimension as the target data to produce the prediction result.
7. The soft measurement method for exhaust flow of an ammonia engine according to claim 6, characterized in that, In establishing the soft-sensing model for the intake airflow of an ammonia engine, the model uses mean squared error as the loss function and is trained using the Adam optimizer; the LSTM unit formula is as follows: f t =σ(W f ·[h t-1 x t ]+b f i t =σ(W i ·[h t-1 x t ]+b i ) o t =σ(W o ·[h t-1 x t ]+b o h t =o t *tanh(C t ) Where f t i t o t These are the activation vectors for the forget gate, input gate, and output gate, respectively. C t It is a unit state. It is the candidate unit state, x t It is the input for the current time step, h t σ is the hidden state, σ is the activation function, W and b are the weights and biases respectively, the subscript t-1 represents the previous time step, and the subscript t represents the current time step.
8. The soft measurement method for exhaust flow of an ammonia engine according to claim 1, characterized in that, In the training and testing phase of the model, the mean square error between the predicted intake flow rate calculated by the soft sensor model and the measured intake flow rate is used to evaluate the accuracy of the soft sensor model's predictions; the formula is as follows: Among them, y i This is the actual value. is the predicted value, and n is the total number of samples.
9. The soft measurement method for exhaust flow of an ammonia engine according to claim 1, characterized in that, In the application model steps, when the ammonia engine is tested on the bench, the soft measurement model of intake air flow is built based on the diesel mode. The soft measurement model algorithm is deployed in the engine control system or online monitoring system. When the ammonia engine switches to ammonia mode, the three variables with the greatest impact are collected in real time as inputs to the soft measurement model to obtain the real-time predicted intake air flow in ammonia mode. The error between the predicted and actual intake flow rates is calculated using the mean absolute percentage error. The formula for calculating the mean absolute percentage error is: Among them, y i This is the actual value. is the predicted value, and n is the total number of samples.