1. Introduction
In the face of growing environmental concerns and the urgent need to reduce pollutant emissions in the transportation sector, improving the performance of internal combustion engines remains a major challenge. Dual-fuel engines, which combine liquid fuel (such as diesel) with gaseous fuel (such as natural gas), have emerged as a promising solution, offering a satisfactory compromise between energy efficiency and emission reduction. However, accurately evaluating their performance and pollutant emissions (NOx, soot, etc.) remains complex due to the intricacies of the combustion process, especially the thermochemical interactions between the two fuel types [
1,
2,
3]. Moreover, regular engine maintenance often requires stopping the engine and incurring significant costs, which can impact productivity and does not always guarantee the prompt detection of faults. Corrective maintenance typically occurs only after failures have manifested, making it difficult to prevent performance degradation or mechanical damage. In this context, the development of predictive techniques appears as a promising approach to anticipate significant changes in key engine parameters [
2]. With the rapid evolution of modern industrial technologies, equipment systems are becoming increasingly intelligent and automated [
3]. Traditional diesel engine diagnostic techniques primarily rely on external signals, which generally reveal noticeable anomalies only when the degradation has reached an advanced stage [
4]. Consequently, these conventional approaches often fail to deliver timely warnings or early fault detection.
Parameter prediction technology uses data analysis to anticipate potential critical variations and promptly implement corrective actions to prevent them. These forecasts help enhance the reliability and stability of equipment, while particularly reducing damage and maintenance costs associated with failures [
5].
Traditional prediction techniques rely primarily on empirical principles and statistical models, but their accuracy and reliability remain limited [
6]. Deep learning techniques have proven effective in the fields of image and speech processing, which has led to their incorporation into the modeling of diesel engine performance and operation [
6,
7,
8].
To evaluate the performance and efficiency of a diesel engine, key criteria are often considered, such as combustion parameters (e.g., pressure and temperature) and pollutant emissions (e.g., NOx, soot, etc.) [
9]. Due to their cyclic variation and sensitivity to operating conditions, these parameters are useful for detecting potential anomalies in the combustion process [
10]. By accurately anticipating them, it becomes possible to monitor engine operating conditions, quickly identify possible issues, and implement targeted maintenance measures to ensure the engine’s stability, performance, and environmental compliance.
Thus, the evaluation of combustion parameters (such as pressure and temperature) and harmful emissions is an essential tool for diagnostics, real-time management, and optimization of the performance of biofuel-powered engines. Historically, these predictions were based on sophisticated physical models, which were generally computationally intensive and relied on simplifying assumptions [
11,
12]. Today, the development of artificial intelligence, particularly recurrent neural networks (GRU), offers new opportunities for modeling such dynamic systems. The rapid advancement of artificial intelligence (AI), especially deep learning, in recent years has opened up promising avenues for the modeling and prediction of complex phenomena in thermal engines [
13].
Thus, the central objective of this study is to demonstrate the ability of a GRU network to accurately predict, based on this simulated database, key combustion parameters (pressure, temperature) and pollutant emissions (NOx, soot) in relation to the crankshaft angle. This approach offers two advantages:
It significantly reduces the computation time required by CFD simulations while maintaining acceptable accuracy.
It paves the way for real-time applications, such as onboard diagnostics, predictive monitoring, and optimization of dual-fuel engine operation from the design phase.
Thus, this study fits into an innovative approach combining physical modeling and artificial intelligence, aiming to provide an efficient, fast, and accurate solution for predicting the performance and emissions of a dual-fuel engine.
Although research on predicting comprehensive diesel engine parameters is still evolving, several studies have explored related areas. Zhao, R et al. [
14] developed a method using bidirectional convolutional Long Short-Term Memory (LSTM) networks for machinery health monitoring, utilizing time-series data from sensors recording vibration, temperature, and pressure. Their findings indicated superior performance over other machine health monitoring techniques. Saleem et al. [
15] also proposed a convolutional bidirectional LSTM (CBLSTM) network, where a Convolutional Neural Network (CNN) extracts local features from sequential input, followed by bidirectional LSTM to encode temporal information. This model demonstrated strong performance on test data. Alcan et al. [
16] presented a Gated Recurrent Unit (GRU) network-based technique to forecast diesel engine soot emissions, achieving satisfactory prediction performance with normalized root mean square error (NRMSE) values below 0.038 and 0.069 for training and validation, respectively. Zhang et al. [
17] predicted marine diesel engine exhaust gas temperature using LSTM networks, effectively modeling complex temporal correlations. Their study concluded that the LSTM model can produce precise forecasts. Shi et al. [
18] proposed a novel approach integrating LSTM with Mahalanobis Distance (MD) to predict diesel engine performance degradation. Elmaz et al. [
19] created a CNN-LSTM architecture for indoor temperature prediction, where CNNs extracted spatial information and LSTMs modeled temporal correlations. Their CNN-LSTM model outperformed Multi-Layer Perceptron (MLP) and standalone LSTM models over various prediction horizons, showing robustness against error accumulation. Hybrid models have also been explored, such as combining LSTM with decomposition techniques and Grey Wolf Optimizer for parameter tuning, yielding more accurate predictions than single-technique models. Kayaalp et al. [
20] used LSTM to predict turboprop combustion and emissions performance with over 95% accuracy, reducing the need for extensive experimental investigations. Liu, B et al. [
21] developed a CNN-BiGRU model for forecasting diesel engine exhaust temperature, achieving low MAE, MAPE, and MSE values. Hu et al. [
22] employed a CNN-GRU model to calibrate parameters in a 0-D physics-based combustion model, demonstrating improved accuracy in reconstructing the combustion process. Shen et al. [
23] suggested a CNN-LSTM hybrid model for predicting transient NOx emissions, where CNNs extracted spatial features and LSTMs captured temporal dependencies, reporting higher accuracy than conventional techniques. Liu, Y et al. [
24] also developed an attention-LSTM-based model for predicting marine diesel engine exhaust gas temperature.
These studies highlight that recurrent neural networks, particularly their more advanced variants such as GRU, LSTM, BiGRU, and BiLSTM, have demonstrated significant potential in predicting combustion parameters and emissions in thermal engines. However, most existing research has focused on conventional diesel or marine engines, typically using data obtained from sensors or test benches. In contrast, dual-fuel engines remain relatively underexplored in the field of artificial intelligence, especially in the context of simulation-assisted design using computational fluid dynamics (CFD).
The present study aims to fill this gap by proposing an innovative methodology that relies exclusively on validated CFD simulation data to train a GRU-based model. This model is designed to predict key combustion parameters (e.g., pressure and temperature) and pollutant emissions (e.g., NOx and its derivatives) of a methanol–diesel dual-fuel engine as a function of the crankshaft angle. Rather than depending on costly and time-consuming experimental techniques, this approach offers a balanced integration of physical modeling and deep learning, providing a robust, accurate, and flexible tool for monitoring, diagnostics, and optimization of next-generation engines.
3. Dataset and Preprocessing
The dataset used for developing and validating regression models must accurately reflect the engine mechanisms, providing sufficient detail to capture the fluctuations in combustion parameters and harmful emissions in a dual-fuel engine. This study is based on a dataset obtained from simulations conducted at an engine speed of 2000 rpm, using the RNG k-ε turbulence model, with a spray angle set at 63° and a methanol proportion of 25%. These parameters were selected due to the low discrepancy observed between experimental and simulated data regarding cylinder pressure. The simulation experiment was conducted in transient mode, with fine angular resolution (0.2°), aiming to capture transient events throughout the engine cycle. The adjustment of engine parameters is performed for each specific crankshaft position. Each angular phase includes numerous parameters, such as cylinder pressure, temperature, and local pollutant concentrations (NOx, soot, among others). This method allows for monitoring the progression of parameters throughout the entire engine cycle, from intake (−151°) to exhaust (121°). For each crankshaft angle, the parameters are then extracted and stored. The entire database comprises 1370 cases covering 32 combustion and pollutant emission parameters.
3.1. Choice of Input and Output Variables
In engine modeling, parameters related to combustion and pollutant emissions are crucial, particularly for dual-fuel engines. This research focused on pressure, temperature, NOx, and soot emissions due to their direct impact on energy efficiency, overall performance, and pollutant contributions [
47]. These parameters aid in understanding combustion mechanisms and optimizing engine operation for environmental compliance and performance.
Table 5 presents the selected parameters.
3.2. Dataset Partitioning
The dataset was divided into two parts: one for training and the other for testing. The regression model was trained on the training data to identify underlying patterns, while the validation samples were used to evaluate the performance of the selected model. The training dataset can also be split into separate groups for training and validation, with the latter used to fine-tune the algorithmic model. When enough data are available, the “hold-out” technique [
48] is applied to divide the dataset as follows: 70% for training and 30% for testing. However, this technique can lead to overfitting of the regressor, especially when the dataset is insufficient in size. In this context, cross-validation techniques such as sequential K-fold (or temporal K-fold) can be applied. In this technique, the dataset is regularly divided into K parts (or folds). Unlike traditional K-fold, this approach is specifically designed for time-series data, where preserving the data sequence is crucial. It involves segmenting the dataset into K successive subsets while maintaining the chronological order of the observed data.
The sequential K-fold technique involves progressively using an increasing number of folds for training, while the next fold is used for evaluation. For example, in the first iteration, the model is trained on the first data batch and tested on the second. In the next iteration, the first two segments are used for training, while the third is used for testing, and this process repeats. This continues until each segment has been used at least once as a test set, without ever introducing future data into the training process [
49,
50]. In this study, particular attention was given to the choice of the parameter K in sequential K-fold cross-validation, considering the temporal dimension and the data volume. The selection of K is important, as it directly influences the relevance of the model evaluation, the processing time required, and the risk of overfitting. In theory, a higher K value (such as K = 8 or 10) provides a more accurate assessment since the model is tested on a wider range of segments and benefits from multiple trainings on different partitions.
However, this alternative significantly increases the computational load, which can be problematic for complex models, especially those using neural networks [
51]. Furthermore, in the context of time series, an excessively high K selection could lead to smaller, less representative, and noisier test samples, thereby reducing the reliability of the evaluation. Conversely, a too-low K (such as K = 2 or 3) generates larger test sets while decreasing the number of iterations during cross-validation. This could reduce the statistical robustness of the results and provide a less accurate representation of the model’s generalization capability. Thus, the selection of the optimal K is based on a balance between the representativeness of the data analyzed, the amount of information available for training, and the intended generalization. For a dataset of intermediate size, K values ranging between 4 and 6 are often considered appropriate. This study uses four K-fold segments, as illustrated in
Figure 6.
3.3. Normalization
Normalization (or standardization) is an initial data processing step to scale features and reduce model complexity, often required by certain algorithms. Standardizing data to have zero mean and unit variance can improve learning by eliminating discrepancies arising from different scales and distributions [
52]. The transformation is as follows:
where
is the normalized data,
is the original feature vector, m is the mean of the mean of the feature, and σ is its standard deviation.
3.4. Description of the GRU Model
For time-series predictive analysis, recurrent neural networks (RNNs) and their variants are frequently employed. Compared to traditional neural networks, RNNs possess a unique memory structure that allows them to associate the influence of past data with the current learning and training process, leading to more optimal predictions [
53]. However, since only a single tanh unit is used, issues such as vanishing or exploding gradients often arise during the training process. In response to this issue, the Long Short-Term Memory (LSTM) network and the Gated Recurrent Unit (GRU) were developed as improvements over the standard RNN. These architectures are specifically designed to overcome the vanishing gradient problem and enhance the model’s prediction performance.
The LSTM is essentially composed of a forget gate, an input gate, and an output gate. The main function of the forget gate is to discard irrelevant or invalid information. The input gate selects incoming data by retaining only the most relevant information. The output gate is responsible for passing useful information to the next layer [
54]. LSTM enhances the traditional RNN by modifying the internal structure of the neurons and addressing the vanishing gradient problem. However, due to its more complex internal structure, the model incorporates a greater number of activation functions and learnable parameters, which makes training more challenging and slows down prediction speed.
To improve the prediction speed of the model while ensuring prediction accuracy, it is necessary to simplify the model’s internal structure as much as possible, making it easier to understand and implement. Therefore, some researchers have proposed the Gated Recurrent Unit (GRU) network.
The GRU is also considered an activator in the context of recurrent neural networks, proposed as a response to challenges such as long-term memory and gradient issues during backpropagation [
55]. The GRU shares similarities with the LSTM. By optimizing the internal structure of the LSTM network, an update gate is used to replace the functions of the input and forget gates within the network. Consequently, compared to the LSTM, the GRU has a reduced number of parameters [
56]. In the GRU, the reset gate is used to merge information from the previous state with that of the current state to obtain the output for the present state. The update gate retains only the previous hidden state by retrieving the previous hidden state
, the current input
, and the current state information
. It then applies a nonlinear transformation using the activation function to the combined matrix. In other words, this means ignoring some minor information in
and selectively retrieving certain data in
. The basic structure of the GRU is illustrated in
Figure 7, and the corresponding mathematical formulas are presented in Equation (31).
In the formula, , , , , and , respectively, represent the current-time input information, the previous time-time hidden state, the update gate, the reset gate, the candidate hidden state, and the now-time hidden layer output. , , are the matrix of the weight parameters of the GRU neural network. σ is the sigmoid function.
3.5. Regression Metrics
The purpose of model evaluation is to assess its accuracy and efficiency. First, it is essential to examine a model’s generalization ability in order to compare various models and determine whether one outperforms the others. These indicators subsequently help to gradually improve the performance of our models. This study selects four commonly used evaluation metrics in deep learning: Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the Pearson Product-Moment Correlation Coefficient [
57,
58]. The corresponding equations are presented in Equation (32).
In the formula, represents the predicted value and the actual (real) value.
The MSE evaluates the discrepancy between the estimated value and the actual value. The Root Mean Squared Error (RMSE) is defined as the square root of the ratio between the sum of the squared errors—derived from the predicted and actual values—and the number of observations n. The Mean Absolute Error (MAE) is defined as the average of the absolute differences between each predicted value and the actual value. Using the MAE eliminates the issue of errors canceling each other out, enabling a more accurate assessment of the actual magnitude of the prediction error. The Mean Absolute Percentage Error (MAPE) reflects the average error as a percentage of the actual values, thereby allowing for easy comparison across datasets with different scales. Regarding the Pearson correlation coefficient, it is frequently used as a statistical measure of accuracy, as it facilitates the assessment of the strength and direction of the linear relationship between observed and predicted values. A result close to 1 indicates a strong positive correlation, highlighting the effectiveness of the predictive model. Finally, the Kling–Gupta Efficiency (KGE) is a metric that combines three components: bias, correlation, and variability between the predicted and observed series. It provides a more comprehensive evaluation of prediction quality than a single indicator. A KGE value close to 1 demonstrates strong model performance in terms of accuracy, temporal structure, and variability.
3.6. Feature Vector
The input (feature) vector for the GRU model consists of a sequence of parameters (pressure, temperature, NOx, soot) evaluated at specific crankshaft angle steps. Equation (33) represents this organized matrix, capturing engine dynamics over an interval θL (sequence length):
: Pressure at angle step ;
: Temperature at angle step ;
: Emissions at angle step ;
: Soot emissions at angle step.
Each row of this vector represents a set of combustion and emission parameters for a given angle , spanning over . The output vector is a prediction for the next crankshaft angle, , and has the following form:
: Pressure at angle step ;
: Temperature at angle step ;
: NOx emissions at angle step ;
: Soot emissions at angle step .