# Prediction ofNOx Emissions from a Direct Injection Diesel Engine Using Artificial Neural Network

Authors: J. Mohammadhassani; Sh. Khalilarya; M. Solimanpur; A. Dadvand
Journal: Modelling and Simulation in Engineering
 (2012)

---

## Abstract

In the present study, artificial neural network is used to model the relationship between NOx emissions and operating parameters of a direct injection diesel engine. To provide data for training and testing the network, a 6-inline-cylinder, four-stroke, diesel test engine is used and tested for various engine speeds, mass fuel injection rates, and intake air temperatures. 80% of a total of 144 obtained experimental data is employed for training process. In addition, 10% of the data (randomly selected) is used for network validation and the remaining data is employed for testing the accuracy of the network. The mean square error function is used for evaluating the performance of the network. The results show that the artificial neural network can efficiently be used to predict NOx emissions from the tested engine with about 10% error.


---

## Body

## 1. Introduction

Direct injection diesel engines are used as propulsion systems with low fuel consumption and very high efficiency for automotive applications. Any attempts to use their privileges require considering emissions stringent disciplines which enforce engine manufacturers to tender their productions with lower emissions [1]. Recently, Lenz and Cozzarini [2] have presented statistics showing that the worldwide passenger car and commercial vehicle traffic contribute 20% of the total anthropogenic emissions of nitrogen oxides (NOx). These emissions have damaging effects upon the environment and people. Therefore, how to control the exhaust emissions especially NOx from diesel engines has become an essential subject for researchers of the automotive field in the world.The diesel engine industry has undergone a great technical development in the last few years, creating a number of new strategies such as electronic control units (ECUs) and/or engineering management systems (EMSs) as well as new injection systems [3–7]. They all use some kinds of artificial intelligence (AI) techniques such as artificial neural network (ANN) to process the engine operating conditions and prognosticate the fairly best values of the controlling parameters with the aim of optimizing the engine characteristics.Digital computers have provided a rapid means of performing many calculations involving the ANN methods. Along with the development of high-speed digital computers, the application of the ANN approach could be outspread in a very impressive rate in several fields. One of the major applications of ANN is industrial pollutants control. Kalogirou [8] presented an elaborated review on the recent applications of AI in environmental pollutants control.Neural networks are powerful modeling techniques with the ability of identifying cryptic nonlinear highly complex relationships between their input and output data [9]. ANN describes such relations by updating network weights using a trial-and-error-based arithmetic method and a training algorithm such as Levenberg-Marquardt (LM).A number of studies have been conducted to predict the characteristics of internal combustion engines (ICE) by using ANN approach. This approach has been used by Xu et al. [10] to predict engine systems reliability. The injection characteristics of direct injection (DI) diesel engines have been investigated by Yang et al. [11]. In [12], the effects of NOx and soot level in the case of high-pressure fuel injection have been investigated in a single-cylinder DI diesel engine. ANN has been used to predict the exhaust emissions and performance of a diesel engine taking into account several operating conditions such as the percentage of throttle opening, injection time, engine speed, and fuel compositions as the network inputs [13–15]. However, there is no literature that reports the application of neural network to predict and model NOx emissions in terms of engine speed, intake air temperature, and mass fuel injection (MFI) rate. In this study, NOx emissions from a diesel engine are investigated using ANN. For this purpose, experimental tests have been conducted for 144 engine speeds ranging from 591 to 2308 rpm.


## 2. Experimental Setup

The test engine used to conduct the experiments is a heavy duty (HD) six-cylinder, direct-injection, four-stroke diesel engine. The technical specifications of the engine are given in Table1. Standard laboratory procedures are used to measure the engine operating parameters and its tailpipe emissions (see Figure 1). The engine is connected to the data acquisition systems, so that several operating parameters could be simultaneously measured and precisely controlled. The ST10 fuel controller sensor is used to measure the mass fuel injection rate in the range of 0.39–10.31 g/sec. An electrical dynamometer is assembled on the engine and used to measure the speed, brake power, and torque of the engine. The engine speeds are recorded between 591 and 2308 rpm. Simultaneously, other engine properties such as exhaust emissions (NOx, soot, HC, CO, CO2), air-fuel ratio (AFR), and intake air temperature are measured by various connected instruments. The range of variations of the operating parameters and the corresponding values of NOx emissions have been listed in Tables 2 and 3, respectively [16, 17].Table 1
Tehnical specifications of the test engine.
Engine type
OM355 Mercedes-Benz S. 355093
Number of injector holes
4
Injection pressure
195 bar
Max output power
240 hp
Intermediate power speed
1400 rpm
Number of cylinders and layout
6-inline
Compression ratio
16.1 : 1
Injection timing (Deg BTDC)
18
Displacement
11580 cc
Stroke
150 mm
Bore
128 mmTable 2
Range of variations of the operating parameters during the experimental study.
Operating parameter
Unit
Range of variations
N
rpm
[
591
,
2308
]
M
f
g/sec
[
0.39
,
10.31
]
T
°C
[
15.4
,
28.3
]Table 3
Measured NOx emissions with respect to the three operating parameters.
OP* and NOx
EN**
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Engine speed (RPM)
591
592
601
601
602
602
603
604
604
605
606
606
608
611
612
612
615
616
616
617
618
621
623
626
627
628
628
631
631
632
Intake air temperature (°C)
25.5
25.1
23.4
28.3
27.6
17.3
16
20.5
17.3
20.4
15.9
28.1
23.8
21.5
22
24.7
25.3
20.8
20.9
22.5
20.8
27.1
23
22.8
15.9
15.9
26.1
26.6
26.5
23
Mass fuel (g/sec)
0.43
0.43
0.42
0.42
0.41
0.44
0.42
0.41
0.43
0.43
0.42
0.44
0.43
0.39
0.39
0.39
0.39
0.44
0.4
0.43
0.4
0.42
0.47
0.47
0.44
0.43
0.45
0.44
0.46
0.47
NOx (g/kw·hr)
18.96
19.97
21.56
29.01
47.71
18.69
19.42
24.49
21.51
24.09
18.54
29
22.75
21.42
18.26
20.73
20.18
19.13
24.05
25.23
20.45
31.56
22.53
21.64
27.95
24.88
28.74
37.91
28.23
15.14
OP* and NOx
EN**
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Engine speed (RPM)
632
633
636
638
640
645
1389
1391
1396
1396
1397
1398
1398
1399
1399
1399
1399
1400
1401
1401
1401
1401
1402
1402
1402
1402
1402
1403
1403
1403
Intake air temperature (°C)
24.9
22.9
26.2
23.7
18.6
18.6
16
15.8
15.5
15.6
23.3
24.6
23.7
20.4
24.8
21.7
23.8
20
19.3
21.7
19.9
15.8
21.2
19.7
17.2
16.9
25.5
23.8
15.6
19.9
Mass fuel (g/sec)
0.4
0.46
0.44
0.41
0.48
0.49
1.53
1.54
1.48
1.48
2.24
2.34
3.65
6.7
2.33
2.19
2.24
6.72
2.21
2.3
5.03
1.5
6.51
5.02
4.88
491
6.63
0.82
2.2
3.54
NOx (g/kw·hr)
26.7
14.09
39.32
27.04
24.21
23.31
10.21
10.67
11.02
11.25
13.1
13.01
11.98
8.905
12.89
12.7
13.13
8.753
11.6
12.28
11.08
12.6
9.398
11.2
12.63
12.79
10.55
4.43
9.242
9.963
OP* and NOx
EN**
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Engine speed (RPM)
1403
1403
1403
1404
1404
1404
1404
1404
1404
1404
1404
1404
1405
1405
1405
1406
1406
1406
1406
1406
1406
1407
1407
1407
1407
1407
1407
1408
1408
1411
Intake air temperature (°C)
18.9
20.1
25.5
19.6
21.1
15.6
18
15.4
15.4
24.6
17.7
16.7
24.3
15.8
18.3
24.2
15.7
17.5
15.7
16.5
21.6
24.6
15.4
26.9
21.7
17.7
18.6
21.2
18.1
21.4
Mass fuel (g/sec)
3.59
3.54
6.65
2.2
6.52
2.19
6.71
3.55
3.55
3.8
6.67
5.01
0.84
2.18
3.6
0.83
2.17
6.69
3.51
5.02
2.18
0.85
3.5
2.29
2.16
1.51
1.51
6.62
6.7
3.5
NOx (g/kw·hr)
10.23
9.972
10.54
9.466
9.346
9.469
9.565
10.37
10.61
12.51
10.64
12.39
4.055
9.401
10.28
3.935
9.863
10.5
11.05
12.11
12.39
4.105
10.75
12.47
12.53
15.88
16.68
8.118
9.605
11.73
OP* and NOx
EN**
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
Engine speed (RPM)
1411
1412
1414
2001
2002
2005
2055
2104
2106
2148
2154
2194
2194
2195
2196
2196
2198
2200
2200
2200
2200
2200
2201
2201
2201
2201
2201
2201
2201
2203
Intake air temperature (°C)
17.2
21.2
17.5
20.4
17.7
17.9
16.8
17.4
17.6
17.2
17.4
21.3
19.5
25.5
21.9
21.5
24.5
18.3
21
20.5
21
24.2
20.1
19.7
21.2
20.8
19.6
20.2
20.7
21.8
Mass fuel (g/sec)
1.53
3.49
1.54
9.11
9.28
9.21
9.42
9.65
9.59
9.91
9.83
5.64
10
10.04
5.7
8.05
8.34
10.11
10.15
7.5
8.03
8.36
7.66
7.78
7.56
3.85
10.02
9.98
10.03
10.24
NOx (g/kw·hr)
10
11.86
10.03
10.4
12.26
12.13
11.85
11.47
11.49
11.13
11.3
10.96
9.073
10.56
11.06
9.117
9.31
11.06
8.407
11.96
8.99
9.004
10.77
10.73
12.23
10.89
9.169
9.358
9.371
8.712
OP* and NOx
EN**
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Engine speed (RPM)
2203
2204
2204
2205
2205
2205
2205
2206
2207
2207
2207
2207
2207
2208
2210
2210
2211
2215
2250
2254
2303
2304
2305
2308
Intake air temperature (°C)
23.7
20.7
18.5
19.9
20.8
17.3
21.5
20.2
21.8
22.1
21.7
24
24.4
20.9
17.9
24.1
20.8
21.2
19.9
20.5
18.6
18.8
16.4
17.2
Mass fuel (g/sec)
6.3
10.11
10.13
5.98
5.99
10.17
3.77
3.82
5.72
5.72
4.22
4.37
4.42
4.15
10.16
1
3.75
10.1
10.31
10.3
9.01
8.88
9.93
9.92
NOx (g/kw·hr)
8.91
11.64
11.12
9.21
9.354
10.32
12.94
10.67
11.54
11.15
11.55
9.57
9.538
11.11
10.8
5.885
11.83
11.9
11.06
11.41
8.095
7.305
9.631
10.19
*Operating parameter, **experiment number.Figure 1
Schematic of the test engine: (a) fuel tank, (b) air tank, (c) test engine, (d) muffler, (e) emissions analyzer, (f) tachometer, (g) dynamometer, (h) air measuring container, (i) fuel measuring container, (j) transducer, (k) thermometer.


## 3. ANN Approach

The building unit of an ANN is a simplified model of the much more complex one known as organic neuron. This model was introduced by the neurophysiologist McCluch and the logician Pitts in 1943 [18], but its learning behavior was first treated extensively in a book by Rosenblatt in 1962 [19].One of the main advantages of ANN is its ability to model complex nonlinear relationships between multiple input variables and the required outputs. Another important advantage of the ANN approach is its fast response, which allows one to use it in more complex procedures including optimization applications. Therefore, it offers the advantage of being fast, accurate, reliable, and powerful in dealing with multivariate problems as well as in the prediction or approximation affairs, especially when numerical and mathematical methods fail [20, 21].To get the best prediction by the network, many parameters should be adjusted such as biases, weights, number of hidden layers, number of hidden layer neurons, and type of transfer function. The biases and weights must be modified in every epoch by using training algorithms such as LM algorithm. The performance of the network is evaluated by comparing the error obtained from converged neural network runs and the measured data. The error of the network is calculated at the end of training, validation, and testing processes based on the differences between the targeted and calculated outputs. The back propagation algorithm is used to minimize the error function, which relates the outputs of each neuron in the output layer and the corresponding desired output. The error function used here is the so-called mean square error (MSE) function given by(1)E=1Q∑p∑k(ypk-fpk)2,
where Q represents training pairs of vectors, k is the index of elements in the output vector, ypk is the kth element of the pth desired pattern (target value) vector, and fpk is the kth element of the output vector when pattern p is introduced as input to the network. Investigations have proved the accuracy and rapid convergence of LM algorithm for training in engineering applications with limited number of experimental data [22, 23]. In the present work, the LM training algorithm is employed, which uses Hessian matrix approximation. In what follows, a detailed description of this algorithm is presented.


## 4. LM Algorithm

The LM algorithm is a virtual standard in nonlinear optimization which significantly outperforms gradient descent and conjugate gradient methods for medium-sized problems. It is a pseudo-second-order method which means that it works with only function evaluations and gradient information but it estimates the Hessian matrix using the sum of outer products of the gradients (for more details, see [23]). It also fits a curve on a given dataset by finding the optimum parameters β based on a user specified model f such that the final parameters can characterize the target function by minimizing the errors. This is analogous to solving the least squares problem, where we want to minimize the sum of squares between the target values yi and the output of the user model f with the input values xi and the estimated parameter vector β with m number of input data points [24]:
(2)S(β)=∑i=1m(yi-f(xi,β))2.Here,S(β) is the function to be minimized. To start a minimization, the user has to provide an initial guess for the parameter vector, β, which may be critical in convergence if the user model f is high dimensional or nonlinear with a large number of parameters. In many cases, an uninformed standard guess like βT=(1,1,…,1) will work fine; in other cases, the algorithm converges only if the initial guess is already somewhat close to the final solution. At each step, the initial parameters are updated by a small amount in the optimum direction by adding the update delta values, δ, such that
(3)βt+1=βt+δ.To find the update delta value,δ, we need to solve for the approximation of the sum of squares function by setting the gradient equal to zero as follows:
(4)JT[y-(f(xi,β)+Jiδ)]=0.This relation can readily be reduced to(5)JTJiδ=JT[y-f(xi,β)],
where J is the Jacobian matrix or gradient of the function that describes the user model and the superscript T represents its transpose form. Equation (5) yields a set of linear equations in the form Ax=b, where A is a square matrix, x represents the vector of unknown delta values, and b is a known vector of the same length as x. At each step, the delta values can be obtained by solving this set of linear equations. However, the LM algorithm also adds a regularization parameter λ that helps as the dampening factor to produce the final LM equation:
(6)[JTJi+λdiag⁡(JTJi)]δ=JT[y-f(xi,β)].Here,diag(JTJi) stands for the principal diagonal elements of the matrix JTJi. This equation is still a system of linear equations of the form Ax=b and one can use direct solvers to solve for delta values at each step.


## 5. Implementation of the ANN to PredictNOx Emissions

The neural network toolbox of MATLAB 7.8 is used to form the ANN. Simple and detailed structures of the employed ANN have been shown in Figures2 and 3, respectively. According to the Kolmogorov theory, multilayer perceptron algorithms can approximate any complex and nonlinear relation between input and output data, among which the three-layer algorithm is the simplest but efficient one. The three layers include the input layer, the hidden layer, and the output layer. Each layer involves some neurons which should be properly determined. The number of input and output parameters of the system determines the number of neurons in the input and output layers of the network, respectively. Thus, the input layer has three neurons while the output layer has only one neuron. It should be noted that in the present work, nominal 19 neurons (determined by trial and error) are used in the hidden layer.Figure 2
Simple structure of used ANN.Figure 3
Detailed structure of the used ANN.The number of data patterns required for training the network should be chosen in such a way that the network is properly trained and in the meantime adequate data is remained for testing the network. In addition, it is essential to set aside some data patterns for validating the network during the process. About 80% of the total 144 experimental data (i.e., 116 data) is used for training the network and 10% (i.e., 14 data) of the data is used for validation. The remainder data is left for testing the network. Neural network requires that the range of both the input and output values lies between 0 and 1. For this purpose the following formula is used to normalize these values [25]:
(7)Vnorm⁡=Va-Vmin⁡Vmax⁡-Vmin⁡×(Vh-Vl)+Vl,
where Vnorm is the normalized value and Va is the actual value of the data. Vmin and Vmax are the minimum and maximum values of the experimental data, respectively. Also, the values of Vh and Vl are set to be 0 and 1, respectively.There are various types of transfer functions such as logsig, tansig, purelin, among others. In the present work, the logsig transfer function is used in both the hidden and output layers. This function is defined as(8)logsig(n)=11+e-n,
where n is the weighted sum of the input.


## 6. Results and Discussions

The artificial neural network is used to predict theNOx emissions from a direct injection diesel engine using LM training algorithm. Technical specifications of the test engine are given in Table 1. The input data of the network are the measured operating parameters of the engine such as mass fuel injection rate, intake air temperature, and speed of engine whose range of variations is given in Table 2.A MATLAB program has been developed to first obtain the desired correlations for training, validation, and testing stages of the network. Then, the accuracy of the network is evaluated through the comparison of the predicted values ofNOx emissions with the experimentally measured ones. The total 144 measured engine’s operating parameters and the corresponding values of NOx emissions are listed in Table 3.Figures2 and 3 show the simple and detailed structures of the ANN employed, respectively. These figures demonstrate the three layers of the network, namely, input layer, hidden layer, and output layer. The operating parameters of the engine are fed into the network as inputs and NOx emissions leave the network as outputs. Note that W in Figure 3 represents the weight of the layer.Figure4 shows a regression analysis between the network response (outputs) and the corresponding targets. According to this figure, the training process has been properly performed, where the correlation factor between outputs and targets is 0.91972. Figures 5 and 6 show the validation and testing results of the network, respectively. It is observed from these figures that the ANN represents the best accuracy in modeling the NOx emissions with correlation factors of 0.98222 and 0.89123, respectively, for the network validation and testing.Figure 4
Training outputs versus targets with correlation factorR=0.91972.Figure 5
Validation outputs versus targets, with correlation factorR=0.98222.Figure 6
Testing outputs versus targets with correlation factorR=0.89123.The results show that the ANN with LM training algorithm is an appropriate technique, which can accurately predictNOx emissions for different engine operating parameters including engine speed, intake air temperature, and mass fuel rate. A comparison between the predicted and the measured values of NOx emissions are depicted in Figure 7. There is a good agreement between the predicted values using the neural network model and the measured values obtained from experimental tests. It may be noted that, for medium engine speeds, the agreement is more considerable than that for the medium speeds. For medium speeds the MSE is less than 8%.Figure 7
A comparison of the predicted and measuredNOx emissions for different operating conditions.


## 7. Conclusions

The operating parameters involving speed, intake air temperature, and mass fuel rate of a DI diesel engine have been used to train the ANN to predictNOx emissions from the engine. The results of this research reveal that a three-layer neural network along with LM training algorithm leads to a desirable mapping between the inputs and outputs of the network case. The proposed ANN model for prediction of the NOx emissions gives the correlation factors of 0.92, 0.98, and 0.89 for training, validating, and testing the network, respectively. It is concluded that, ANN model is a potentially feasible tool for prediction of NOx emissions from a diesel engine with respect to the engine operating parameters, especially in medium engine speeds.



---

*Source: 830365-2012-06-28.xml*