Soft measurement method for exhaust flow of ammonia engine
By establishing an LSTM-based intake flow prediction model in ammonia engine, the problem that ammonia engine cannot calculate exhaust flow using the carbon balance method is solved, and the precise monitoring of exhaust flow is achieved, supporting the application of ammonia fuel engines.
Patent Information
- Application Number
- CN202510052545.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2045-01-14
AI Technical Summary
Ammonia engines cannot calculate exhaust flow by traditional carbon balance method, and new exhaust flow measurement methods are urgently needed to support the application of ammonia fuel engines.
Using soft measurement methods, by obtaining emission data, fuel consumption data and conventional measurement point data of ammonia engines in diesel mode, selecting appropriate auxiliary variables, establishing an intake flow prediction model based on long and short-term memory network (LSTM), and indirectly Monitor exhaust flow.
In the absence of physical flowmeters and carbon balance method, reliable monitoring of ammonia engine exhaust flow is achieved, measuring accuracy is ensured, and operating procedures are simplified.
Smart Images

Figure CN119479883A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of soft measurement of marine engines, and in particular relates to a soft measurement method for exhaust flow of an ammonia engine. Background Art
[0002] There are two main methods for measuring engine exhaust flow: direct measurement and carbon balance. The direct measurement method directly measures exhaust flow using a flow meter or infers it by measuring intake and fuel flow. The principle behind this method is that by controlling and monitoring intake and fuel quantities, exhaust flow can be indirectly estimated through material balance. The carbon balance method calculates exhaust flow by analyzing key parameters such as the concentration of carbon-containing components in the exhaust. This method typically requires measuring the carbon dioxide (CO2) concentration in the exhaust gas and then inferring the exhaust flow based on the carbon source consumption during the combustion process.
[0003] In marine engines, especially low-speed engines, direct flow measurement is difficult to implement due to the large intake and exhaust pipes and limited space for flowmeters. To overcome these challenges, the carbon balance method is commonly used to calculate exhaust flow in marine engines. By measuring the CO2 concentration and other key emission components in the exhaust, the carbon balance method can provide a relatively accurate estimate of exhaust flow.
[0004] However, the situation is different for ammonia engines. As a carbon-free fuel, ammonia's exhaust primarily consists of nitrogen, water vapor, nitrogen oxides (NOx), and possible ammonia fugitives. This differs significantly from the exhaust composition of engines using traditional carbon-based fuels (such as diesel and gasoline). Therefore, ammonia engines cannot use the carbon balance method to calculate exhaust flow. Because ammonia fuel contains no carbon, exhaust flow cannot be inferred from carbon measurements. This peculiarity 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 crucial for promoting the widespread adoption of ammonia as an alternative fuel. As an environmentally friendly fuel, ammonia holds great promise for applications in marine applications and other sectors. However, its unique emission characteristics require innovative methods for measuring exhaust flow. Designing a simple, highly operational, and economical method for measuring exhaust flow in ammonia engines while ensuring accurate measurement will be a key technical challenge in future ammonia-fueled engine research. Summary of the Invention
[0006] The purpose of the present invention is to provide a soft measurement method for exhaust flow of an ammonia engine for measuring the exhaust flow of a ship ammonia fuel engine that cannot be measured using a direct measurement method and a carbon balance method, so as to measure the exhaust flow.
[0007] In order to achieve the above object, the technical solution of the present invention provides an ammonia engine exhaust flow soft measurement method, which includes the following steps: Data acquisition: Acquire emission data, fuel consumption data and regular measurement point data of the ammonia engine in diesel mode, and calculate exhaust flow and intake flow; Select auxiliary variables: select multiple variables that can be measured or extracted as pre-input variables of the ammonia engine intake flow prediction model; Preprocess data: remove abnormal data and use numerical interpolation to ensure that the data scales between different parameters are consistent; Analyze parameter sensitivity: Analyze the contribution of auxiliary variables to the intake flow prediction value, and select the auxiliary variables with the greatest impact as the final model input; Establish a soft-sensing model for the intake air flow of an ammonia engine: Establish a soft-sensing model for the intake air flow of an ammonia engine based on a long short-term memory network; Training and testing the model: Train and test the ammonia engine intake flow soft-sensor model. The model is trained and parameterized based on selected auxiliary variables and intake flow data from the ammonia engine's diesel mode. Independent test data is used to validate the trained ammonia engine intake flow soft-sensor model. Application model: After completing the training and testing of the intake flow soft-sensing model in the diesel mode of an ammonia engine, the soft-sensing model can be directly used to predict the intake flow in the ammonia mode of an ammonia engine. By collecting fuel consumption data in real time, the predicted intake flow and the collected fuel consumption are added together to obtain the predicted exhaust flow in the ammonia mode.
[0008] Preferably, in the data acquisition step, the ammonia engine control system may be used to collect data from various measuring points of the engine, or an online monitoring system may be used to acquire data by communicating with the ammonia engine control system and an emission analyzer.
[0009] Preferably, in the step of selecting auxiliary variables, engine characteristic parameters with a high correlation with the intake air flow rate may be selected as auxiliary variables, including engine speed, torque, supercharger speed and supercharger outlet temperature.
[0010] Preferably, in the data preprocessing step, an interpolation function is used to adjust the data obtained at different sampling rates so that they have the same time scale; the formula is as follows:
[0011] Where interpolate is an 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; new_rate is the target sampling rate, which represents the new time interval to which the original data is resampled.
[0012] Preferably, in the step of analyzing parameter sensitivity, 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, is the output variance caused by the i-th parameter, is the total output variance.
[0014] Preferably, in the step of establishing the soft-sensing model of the intake flow of the ammonia engine, a long short-term memory network introduces a forget gate, an input gate, and an output gate to control the flow of information. The long short-term memory 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 a SELU activation function to return 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 the ammonia engine intake flow soft-sensing model, the model uses mean square error as the loss function and is trained using the Adam optimizer; the LSTM unit formula is as follows:
[0016] in are the activation vectors of the forget gate, input gate, and output gate, respectively. is the cell state, is the candidate cell state, is the input of the current time step, is the hidden state, is the activation function, and are weight and bias respectively, subscript t-1 represents the previous time step, and subscript t represents the current time step.
[0017] Preferably, in the training and testing model steps, the accuracy of the soft measurement model prediction is evaluated by using the mean square error between the intake flow prediction value calculated by the soft measurement model and the intake flow test value; the formula is as follows:
[0018] in, is the actual value, is the predicted value, is the total number of samples.
[0019] Preferably, in the model application step, when the ammonia engine is bench tested, an intake flow soft measurement model is constructed based on the diesel mode; the soft measurement model algorithm is deployed in the engine control system or the online monitoring system; when the ammonia engine is switched to the ammonia mode, the three variables with the greatest influence are collected in real time as inputs of the soft measurement model to obtain a real-time predicted intake flow in the ammonia mode; the error between the predicted intake flow and the true value is calculated using the mean absolute percentage error; the calculation formula for the mean absolute percentage error is:
[0020] in, is the actual value, is the predicted value, is the total number of samples.
[0021] In summary, the present invention has the following beneficial technical effects: This invention can indirectly measure ammonia engine exhaust flow using data from other sensor points, even when physical flow meters and carbon balance methods are unavailable. By applying a correlation algorithm and a long-short-term memory (LSTM) intelligent algorithm to analyze the mapping relationship between hydrogen engine characteristic parameters and intake flow, the invention establishes an ammonia engine intake flow prediction model. By then collecting fuel consumption in real time, this model enables indirect monitoring of hydrogen engine exhaust flow, which is difficult to measure directly. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Schematic diagram of the implementation steps of the soft-sensing method for exhaust flow of ammonia engines; Figure 2 This is the schematic diagram of the LSTM network; Figure 3 This is a schematic diagram of the sensitivity analysis results of the parameters affecting the exhaust flow of ammonia engines; Figure 4 Schematic diagram of the model training error curve; Figure 5 Schematic diagram of the exhaust flow prediction results of an ammonia engine. DETAILED DESCRIPTION
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0024] An embodiment of the present invention discloses a method for monitoring the exhaust flow of an ammonia engine based on soft-sensing technology. This method can indirectly obtain the exhaust flow of an ammonia engine by utilizing data from other sensor points when neither a physical flow meter nor the carbon balance method can be used to calculate the exhaust flow. By applying a correlation algorithm and a long-short-term memory network (LSTM) intelligent algorithm to analyze the mapping relationship between the characteristic parameters of the ammonia engine and the intake flow, an ammonia engine intake flow prediction model is established. By then collecting fuel consumption in real time, indirect monitoring of the exhaust flow of an ammonia engine, which is difficult to measure directly, can be achieved. This method is characterized in that it 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 are obtained from bench tests for the ammonia engine in diesel mode. The exhaust flow rate of the ammonia engine in diesel mode is calculated using the carbon balance method. The intake flow rate of the ammonia engine is equal to the exhaust flow rate minus the fuel consumption.
[0025] 2) Auxiliary variable selection: Select appropriate variables as pre-input variables for the ammonia engine intake flow prediction model. The auxiliary variables must be measurable or extractable, and the auxiliary variables should be as independent as possible to reduce redundancy.
[0026] 3) Data preprocessing: Data preprocessing mainly includes two aspects: one is to eliminate abnormal data, and the other is to ensure the consistency of data scales between different parameters based on the method of numerical interpolation.
[0027] 4) Parameter sensitivity analysis: Global sensitivity analysis is used to calculate the contribution of each auxiliary variable to the intake flow prediction value, and the three variables with the greatest influence are selected as the final model input.
[0028] 5) Ammonia engine intake flow soft measurement model: A ammonia engine intake flow soft measurement model is established based on the long short-term memory network (LSTM).
[0029] 6) Model training and testing: The ammonia engine intake flow soft-sensor model is trained and tested. The model is trained based on selected parameters and intake flow data in the ammonia engine diesel mode, and the parameters are tuned. Independent test data is used to verify the prediction effect of the trained ammonia engine intake flow soft-sensor model, specifically including the mean square error to evaluate the prediction accuracy and reliability.
[0030] 7) Model Application: After completing the training and testing of the intake air flow soft-sensing model in the diesel mode of an ammonia engine, the soft-sensing model can be directly applied to the intake air flow prediction of an ammonia engine in this mode. By collecting real-time fuel consumption data (diesel and ammonia), 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 describes each step in detail: 1) Data acquisition: The bench test can use the ammonia engine control system to collect data from various engine measurement points; or use the online monitoring system to obtain data by communicating with the ammonia engine control system and emission analyzer.
[0032] 2) Auxiliary variable selection: Engine characteristic parameters with a high correlation with intake flow can be selected as auxiliary variables, such as engine speed, torque, supercharger speed, supercharger outlet temperature, etc.
[0033] 3) Data preprocessing: Use the interpolation function to adjust the data obtained at different sampling rates so that they have the same time scale. The formula is as follows:
[0034] interpolate is the interpolation function, which 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, such as sensor readings, collected at a fixed time interval (the original sampling rate). new_rate is the target sampling rate, which represents the new time interval to 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, is the output variance caused by the i-th parameter, is the total output variance.
[0037] 5) Ammonia Engine Intake Flow Soft-Sensor Model: A soft-sensor model for 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) designed 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 principles of LSTM are as follows: Figure 2As shown in Figure 1, the model consists of an input layer, an LSTM layer, and a fully connected output layer. The input layer accepts data of shape (time steps, number of features), where the time steps 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 only returns the last output of the sequence. Finally, a fully connected layer maps the output of the LSTM layer to a space with the same dimensions as the target data to produce predictions. The model uses mean squared error (MSE) as the loss function and is trained with the Adam optimizer.
[0038] The LSTM unit formula is as follows:
[0039] in They are the activation vectors of the forget gate, input gate, and output gate, respectively. Unit status, is the candidate cell state, is the input of the current time step, is the hidden state, is the activation function, and are 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 sensing model prediction is evaluated by the mean square error (MSE) between the intake flow prediction value calculated by the soft sensing model and the intake flow test value (the exhaust flow calculation value obtained based on the carbon balance method). The formula is as follows:
[0041] in, is the actual value, is the predicted value, is the total number of samples.
[0042] 7) Application of the model: When the ammonia engine is bench tested, the intake flow soft measurement model 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 the ammonia mode, the three variables with the greatest influence are collected in real time as the input of the soft measurement model to obtain the real-time predicted intake flow under the ammonia mode; by collecting the fuel consumption (diesel, ammonia) data in real time, the predicted intake flow is added to the collected fuel consumption to obtain the predicted exhaust flow under the ammonia mode. The mean absolute percentage error (MAPE) is used to calculate the error between the predicted intake flow and the actual value. The calculation formula for the mean absolute percentage error is:
[0043] in, is the actual value, is the predicted value, is the total number of samples.
[0044] Application examples: In order to verify the soft sensing effect of the association algorithm and long short-term memory network on engine exhaust flow, due to the lack of ammonia engine test data and the universal applicability of the present invention to engine exhaust flow prediction, the test data collected by the control system of a spark ignition compressed natural gas high-speed engine was used as the research object, and some auxiliary variables 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) were selected to predict the engine exhaust flow.
[0045] Due to different sampling frequencies, the number of data points for auxiliary variables within the same sampling time is inconsistent. Therefore, data resampling is used to make the number of data points consistent. For example, using 25,520 data points for the intercooler inlet pressure within the same sampling time as the baseline, resampling the remaining parameters to maintain the same number of data points.
[0046] The sensitivity of exhaust flow to different auxiliary variables is analyzed, and the analysis results are as follows: The three parameters that have the greatest impact on exhaust flow are: intercooler inlet pressure (P_IC_I), turbine inlet pressure (P_TRB-I), and intercooler outlet pressure (P_IC_O), with sensitivity indexes of 0.79, 0.12, and 0.09 respectively (the sensitivity index ranges from 0 to 1, and the closer it is to 1, the greater the impact of the parameter). The results are as follows Figure 3 shown.
[0047] After the parameter sensitivity analysis is completed, the three most influential auxiliary variables (P_IC_I, P_TRB-I, and P_IC_O) are used as the input parameters of the LSTM model. The acquired experimental data is divided into training and test sets with a ratio of 6:4. The number of data points in the training set is 15312, and the number of data points in the test set is 10208. The loss function curve of the LTSM model training is as follows: Figure 4 As shown, the magnitude of the training error reaches , and has converged, indicating that the model has reached stability.
[0048] The model loss curve converges, and the exhaust flow rate is predicted using the trained LTSM model. The prediction results are as follows: Figure 5 As shown, the true value is consistent with the predicted value trend, and the mean absolute percentage error is 2.79%. Figure 5 It shows that the LTSM model has a good effect in predicting engine exhaust flow.
[0049] The present application relates to a technology for measuring the exhaust flow of marine ammonia-fueled engines, and belongs to the field of marine engine soft measurement technology. The present invention provides an engine exhaust flow measurement method based on soft measurement technology. By using a correlation algorithm and a long short-term memory network (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 that is difficult to measure directly.
[0050] In order to verify the implementation effect of this method, based on the test data of a natural gas high-speed engine ignited by a spark plug, the engine characteristic parameters were reduced in dimension by simulation, the exhaust flow prediction model structure was optimized, and the accuracy, real-time performance and generalization ability of the prediction model were improved. Comparing the model prediction values with the test values, the exhaust flow prediction effect is good, and the average absolute percentage error of the exhaust flow prediction is ≤3%. The verification results show that the method provided by the present invention is suitable for the prediction of engine exhaust flow. The present invention has universal applicability to various types of engines, especially when the engine uses carbon-free fuels such as ammonia and hydrogen. The present invention can be used to predict the intake flow through a soft measurement method, and then the exhaust flow can be obtained by collecting the fuel consumption in real time. The present invention provides a solution for exhaust flow measurement of zero-carbon engines.
[0051] Finally, it should be noted that the above 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 aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A soft measurement method for exhaust flow of an ammonia engine, characterized in that: The following steps are involved: Data acquisition: Acquire emission data, fuel consumption data and conventional measurement point data of the ammonia engine in diesel mode, and calculate exhaust flow and intake flow; Select auxiliary variables: select multiple variables that can be measured or extracted as pre-input variables of the ammonia engine intake flow prediction model; Preprocess data: remove abnormal data and use numerical interpolation to ensure that the data scales between different parameters are consistent; Analyze parameter sensitivity: Analyze the contribution of auxiliary variables to the intake flow prediction value, and select several auxiliary variables with the greatest impact as the final model input; Establish a soft-sensing model for the intake air flow of an ammonia engine: Establish a soft-sensing model for the intake air flow of an ammonia engine based on a long short-term memory network; Training and testing models: Train and test the soft measurement model of intake air flow of ammonia engines. The model is trained based on the screened auxiliary variables and intake air flow data of ammonia engines in diesel mode, and parameters are tuned. Use independent test data to validate the trained ammonia engine intake air flow soft-sensing model; Application model: After completing the training and testing of the intake flow soft measurement model in the diesel mode of an ammonia engine, the soft measurement model can be directly used to predict the intake flow in the ammonia mode of an ammonia engine; By collecting fuel consumption data in real time, the predicted intake flow rate and the collected fuel consumption are added to obtain the predicted exhaust flow rate under the ammonia mode.
2. The soft measurement method of exhaust flow of an ammonia engine according to claim 1 is characterized in that: In the data acquisition step, the ammonia engine control system may be used to collect data from various measuring points of the engine, or an online monitoring system may be used to acquire data by communicating with the ammonia engine control system and an emission analyzer.
3. The soft measurement method of exhaust flow of an ammonia engine according to claim 1, characterized in that: In the step of selecting the auxiliary variables, engine characteristic parameters with a high correlation with the intake air flow rate may be selected as auxiliary variables, including engine speed, torque, supercharger speed and supercharger outlet temperature.
4. The soft measurement method of exhaust flow of an ammonia engine according to claim 1, characterized in that: In the data preprocessing step, the interpolation function is used to adjust the data obtained at different sampling rates to have the same time scale; the formula is as follows: Where interpolate is an 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; new_rate is the target sampling rate, which represents the new time interval to which the original data is resampled.
5. The soft measurement method of exhaust flow of an ammonia engine according to claim 1, characterized in that: In the step of analyzing parameter sensitivity, 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, is the output variance caused by the i-th parameter, is the total output variance.
6. The soft measurement method of exhaust flow of an ammonia engine according to claim 1, characterized in that: In the steps of establishing the soft-sensing model of the intake flow of an ammonia engine, the long short-term memory network introduces a forget gate, an input gate, and an output gate to control the flow of information. The long short-term memory 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 to return 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.
7. The soft measurement method of exhaust flow of an ammonia engine according to claim 6, characterized in that: In the step of establishing the soft-sensing model of the intake flow of the ammonia engine, the model uses the mean square error as the loss function and uses the Adam optimizer for training; the LSTM unit formula is as follows: in are the activation vectors of the forget gate, input gate, and output gate, respectively. is the cell state, is the candidate cell state, is the input of the current time step, is the hidden state, is the activation function, and are weight and bias respectively, the subscript t-1 represents the previous time step, and the subscript t represents the current time step.
8. The soft measurement method of exhaust flow of an ammonia engine according to claim 1, characterized in that: In the training and testing model steps, the mean square error between the intake flow prediction value calculated by the soft measurement model and the intake flow test value is used to evaluate the accuracy of the soft measurement model prediction; the formula is as follows: in, is the actual value, is the predicted value, is the total number of samples.
9. The soft measurement method of exhaust flow of an ammonia engine according to claim 1, characterized in that: In the application model step, when the ammonia engine is tested on the bench, the intake flow soft measurement model 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 is switched to the ammonia mode, the three variables with the greatest influence are collected in real time as the input of the soft measurement model to obtain the real-time predicted intake flow under the ammonia mode; the error between the predicted value and the actual value of the intake flow is calculated using the mean absolute percentage error; The mean absolute percentage error is calculated as: in, is the actual value, is the predicted value, is the total number of samples.
Citation Information
Patent Citations
Road motor vehicle exhaust emission prediction method based on improved attention bidirectional long-short-term memory network
CN111612254A
Diesel engine NOx emission real-time estimation system
CN112241609A
Marine ammonia fuel engine emission reduction device and control method
CN114790956A
Vehicle NOX emission prediction method and device and storage medium
CN115263505A
Engine exhaust mass flow measurement method and system based on nitrogen balance
CN118130099A