1. Introduction
Increasingly stringent pollutant emission standards and the fuel economy requirements put high demands on research into the efficiency of internal combustion engines (ICEs) [
1,
2]. OEMs are currently developing innovative strategies for future high-efficiency engines able to address this challenge, such as engine boosting and downsizing [
3], low-temperature combustions (LTCs) [
4], water injection [
5,
6] and lean [
7,
8] and/or EGR-diluted mixtures [
9]. However, during the engine calibration process, the optimization of the efficiency and emissions requires engine parameters to be adjusted through extensive activities [
10]. Moreover, the fine control of important operation variables can sometimes be hard to reach due to the inherent limitations of the measuring instruments [
11,
12].
Currently, machine learning (ML) approaches are widely used to solve problems in the automotive field, thanks to their ability to identify the intrinsic relationship between the input parameters and the engine response [
13,
14], with lower computational costs and faster operations than traditional methods [
15,
16]. ML algorithms demonstrated excellent results in predicting engine parameters such as pressure [
17], fuel consumption [
18], exhaust gas temperature [
19], power [
20] and emissions [
21].
Considering the latter, Yaopeng Li et al. [
21] employed an artificial neural network (ANN) with a genetic algorithm (GA) to optimize a direct dual fuel stratification (DDFS) strategy, starting from a numerical model of a light-duty diesel engine based on the General Motors 1.9 L platform. The optimized parameters (i.e., in-cylinder pressure and temperature, EGR rate, injection timing of fuels) were validated across a wide operating range. The performance was compared to that of a GA-CFD (computational fluid dynamics) approach. The ANN–GA method allowed improved fuel efficiency and lower nitrogen oxide (NOx) emissions to be obtained with lower computational time (over 75% of computational time saving). Samrendra K. Singh et al. [
22] combined a genetic algorithm with a machine learning technique called support vector regression (SVR) on a database of computational fluid dynamics simulations to develop a next-generation exhaust after-treatment system for diesel engines. The novel mixer design’s main goal was to speed up the overall evaporation of the diesel emission fluid (DEF). While it was discovered that the evaporation rate predicted by the SVR and CFD (baseline) was within 7.5%, the suggested technique (CFD + SVR + GA) demonstrated an overall gain of 13.1%. Ruomiao Yang et al. [
23] compared the performance of a random forest (RF) model and artificial neural network (ANN) in predicting the fuel consumption and emissions of a one-dimensional (1D) computational fluid dynamics (CFD) spark-ignition (SI) engine. To assess the performance of the established machine models, the engine performance in 2000 steady-state conditions was collected using a validated model at various spark timings (from −40 to 0 CA aTDC), engine speeds (from 1000 to 4000 rpm) and loads (from low- to high-level by adjusting the intake pressure from 0.5 to 1 bar). Both approaches were evaluated as able to assist the engine combustion analysis; however, ANN performed best, perhaps because the responses linked to engine combustion were better characterized by several interrelated mathematical functions.
Within this context, this work evaluates the possibility of applying the artificial neural network (ANN) technique to predict the pollutant emissions, i.e., nitrogen oxides (NOx), of an internal combustion engine (ICE). Tests were carried out on a single-cylinder spark-ignition (SI) engine with optical access at 1000 rpm and conditions of lean mixture, towards which automotive research is moving [
24]. Starting from the internal in-cylinder pressure signals and the images of the flame front evolution captured using a high-speed camera, the aim is to compare the performance of the tested ANN architecture in predicting the NOx emission trend with the experimental data recorded using a fast NOx-λ probe. In contrast to other methods, an artificial neural network that has been fine-tuned using experimental data may allow for the real-time evaluation of vehicle performance during running tests while also guaranteeing a greater level of input data reliability. Due to their close links to the investigated pollutant, both aforementioned variables were used to predict NOx [
25]. The nitrogen oxide formation mechanism is a well-known mechanism that depends on three main factors, namely in-cylinder temperature, oxygen availability and residence time [
25]. Unfortunately, the in-cylinder temperature of the burned zone cannot be experimentally estimated; however, the combustion speed and phasing suggest that the faster or the more advanced the combustion, the higher the peak in-cylinder pressure and temperature, which would augment the NOx rate of production. Through optical analysis, it is possible to gather extensive information on temperature and pressure rises and, consequently, on the synthesis of NOx by observing the formation and evolution of the flame front during the first stage of kernel formation.
The analysis of the flame front evolution was obtained by post-processing the grey-level images coming from a high-speed camera, whereas the in-cylinder pressure signal, coming from a piezoelectric transducer placed inside the engine chamber, was acquired using a fast combustion analysis system. The post-processing analysis was performed by using a Mask R-CNN (region-based convolutional neural network) approach [
26,
27], i.e., a convolutional neural network based on Faster R-CNN capable of detecting targets and performing semantic segmentation at the same time [
28,
29].
In a prior work of the same research group [
30], the Mask R-CNN algorithm proved to be capable of detecting the kernel formation in advance and identifying combustions as regular rather than as anomalies, as in the case of other conventional approaches [
31].
The NOx prediction was performed by a NARX (nonlinear autoregressive with external input) approach [
32,
33], i.e., a recurrent dynamic neural network used to model nonlinear dynamic systems and applied in time series [
15,
34].
In a previous work of the same research group [
15], the forecasting performance of NARX was compared to that of FFANN [
35,
36]. In that work, the networks predicted the flow rate of GDI pumps intended for automotive applications. The results showed that the FFANN networks were not able to offer good predictions when the input data were closely related to the time component, while NARX was able to predict the time course of the flow with greater precision. By reducing the input parameters to the model, i.e., excluding the less influential ones from the analysis, the predictive capabilities of NARX are also increased, thus leading to a significant reduction in the data that can be processed. Based on these considerations, NARX has been chosen as the method for the prediction of time series, i.e., NOx, in the present work. The results of this work showed the proposed model’s ability to reproduce the experimental trend of the analyzed pollutant emissions. In particular, the prediction showed percentual errors always lower than 2%, with a maximum peak at about 1.6. The outcomes made it possible to thoroughly examine how the input factors affected the NOx forecast. For this reason, in the second part of the work, a sensitivity analysis using the Shapley value [
37,
38,
39] was performed in order to explain the results, identify the most important input factors for the NOx prediction and assess the viability of using this methodology in practical settings.
4. Results and Discussions
Table 4 displays the quantities through which the forecasting performance of the NARX structure was evaluated. The standard deviation
σ of the observed series allows the evaluation of the variability of the target data, and it is used to understand the RMSE of the proposed neural architecture. Generally speaking, considering the specific λ value, the lower the
σ, the lower the RMSE. On average, for each λ, a higher RMSE value corresponds to observed data characterized by higher variability. In any case, the RMSE value is always lower than the acceptable threshold of 5 [
15], thus highlighting the quality of the forecasting performance. In particular, it is worth highlighting that at λ = 1.4, the RMSE of the analyzed series is close to the unit despite the highest
σ recorded. This occurrence could be related to the nature of the input parameters, namely Pcyl and the R
eq.
To correlate the quality of the NOx prediction with such quantities,
Table 5 reports the mean values of the 28 consecutive combustion processes used for the training sessions, which are a function of Pcyl, namely
CoVAPmax,
COVPmax and
CoVIMEP. Concerning the
CoVIMEP, since such a quantity is a function of the IMEP, expressed as
, it could be helpful to also consider such a parameter to analyze the nature of the analyzed data.
CoV is expressed by the following relation (Equation (2)):
that is, equal to the standard deviation (
σ) over the mean value (
µ) of the analyzed quantities. In addition to the
CoV values, the standard deviations of the equivalent flame radius
σReq when R
eq is equal to 9 and 20 mm are also considered. For sake of completeness,
Figure 12 reports the equivalent flame radius of the combustion events analyzed at each λ value.
From
Table 5, it is possible to observe that the parameters connected to the in-cylinder pressure may influence the NOx prediction more than the ones related to the equivalent flame radius. In other words, the NOx prediction seems to be affected by the stability (
CoVAPmax,
CoVPmax,
CoVIMEP) of the process rather than the first part of the combustion formation and evolution (
σReq=9mm,
σReq=20mm). As a matter of fact, even if the resulting bundles are wider the leaner the mixture [
30], the lowest RMSE recorded at λ = 1.4 could be related to the lowest value of
CoVPmax,
CoVIMEP, while the highest RMSE at λ = 1.5 could be related to the highest values of such quantities. The lower influence of the first part of the combustion can be expected, since the NOx production is more influenced by the part of combustion between 50 and 5% of the mass fraction burned.
Figure 13 shows the experimental predicted trends of all the cases analyzed, and
Table 6 reports the deviation of the prediction from the target, namely the percentual error (%Err = (|Target − Predicted|/Target) × 100). From a qualitative point of view, the proposed model is able to reproduce the experimental trend. In particular, the prediction always shows a %Err lower than 2%, with maximum peak at %Err
max = 1.61 (at λ = 1.5). The tested model can be considered as a valid alternative for the NOx prediction since the accuracy of the Horiba MEXA-720 used to record the NOx emissions is equal to 2.5%. In other words, the prediction is always lower than 65% of the measurement error of the fast NOx analyzer. The higher %Err shown at λ = 1.5 can be related to the higher variability of the observed data used for the training session.
Based on the results of the previous analysis,
Figure 14 shows the results of the sensitivity analysis carried out by means of the average absolute Shapley values. As is possible to observe, in all the λ cases analyzed, IMEP influences the NOx prediction more than the other input parameters. Furthermore, the parameters CAD aEoD
Req=9mm and CAD aEoD
Req=20mm are more influential than the ones related to the in-cylinder pressure, such as APmax and Pmax. Such a result confirms the prediction shown in the previous paragraph, thus testifying the greatest impact of IMEP on the NOx prediction and, at the same time, the right choice of input parameters connected to the equivalent flame radius. In any case, it is worth highlighting the impact of the other parameters related to P
cyl, i.e., APmax and Pmax. As a consequence of this, the methodology proposed in the previous paragraph could be exported to metal engines in which it is not possible to acquire images relating to the flame front evolution.