Content uploaded by Marco Moser
Author content
All content in this area was uploaded by Marco Moser on May 13, 2022
Content may be subject to copyright.
2021-01-5108 Published 17 Dec 2021
Machine-Learned Emission Model for Diesel
Exhaust On-Board Diagnostics and Data Flow
Processor as Enabler
Marco Moser and Steve Kipping IAV GmbH
Kazuhiro Higuchi DENSO CORPORATION
Hiroyuki Hirayama NSITEXE Inc.
Citation: Moser, M., Kipping, S., Higuchi, K., and Hirayama, H., “Machine-Learned Emission Model for Diesel Exhaust On-Board
Diagnostics and Data Flow Processor as Enabler,” SAE Technical Paper 2021-01-5108, 2021, doi:10.4271/2021-01-5108.
Abstract
Conventional methods of physicochemical models
require various experts and a high measurement
demand to achieve the required model accuracy. With
an additional request for faster development time for diag-
nostic algorithms, this method has reached the limits of
economic feasibility.
Machine learning algorithms are getting more popular
in order to achieve a high model accuracy with an appropriate
economical eort and allow to describe complex problems
using statistical methods. An important point is the indepen-
dence from other modelled variables and the exclusive use of
sensor data and actuator settings.
e concept has already been successfully proven in the
eld of modelling for exhaust gas aertreatment sensors. An
engine-out nitrogen oxide (NOX) emission sensor model based
on polynomial regression was developed, trained, and
transferred onto a conventional automotive electronic control
unit (ECU) and also proves real-time capability. Within this
study several approaches are demonstrated to show the impact
on model accuracy with varying numbers of inputs and poly-
nomial structures. However, with increasing accuracy
demands, these models require additional resources of storage
and computational performance.
One solution is the use of a data ow processor (DFP,
developed by DENSO), which can process parallelizable algo-
rithms very eciently and only requires a fraction of the
computation time compared to a conventional ECU. It has
been shown that the computation time of the proven poly-
nomial regression model on the DFP can be reduced by a
factor of 20.
This paper provides an overview of applications of
machine learning algorithms and oers an outlook of the
advantages of a DFP.
Introduction
Motivation
The rising number of powertrain components leads to
an increasing demand for on-board diagnostics (OBD)
and, as a consequence, to the higher complexity of the
algorithms in automotive electronic control units (ECUs),
which need to beperformed in real time. On top of the more
stringent OBD limits and the upcoming on-board monitoring
(OBM) in future emission, legislations all over the world
demand an even further increased accuracy and therefore add
to this challenge.
Sensors are part of these powertrain components and are
needed to control processes or to detect failures. Sensor
models are required to diagnose these sensors or to provide
an alternative value if no sensor is available. Former sensor
models for the automotive exhaust line were very complex.
Exhaust lines and control strategies get even more complex
(i.e., due to dierent heating modes), emission standards get
tighter; hence, more sensors and models are needed, and
sensor models need to get more accurate while
maintaining robustness.
In addition, there is a high demand for a faster develop-
ment process, which is even more serious for the OBD, since
it is calibrated at the end of the development cycle.
Machine learning algorithms are getting more into the
focus and are increasingly used in ECUs in order to achieve
a high model accuracy with an appropriate economical eort.
An engine-out nitrogen oxide (NOX) emission sensor
model based on polynomial regression was successfully devel-
oped, and a soot model is currently under development. is
paper demonstrates the impact on model accuracy of dierent
© 2021 Moser, Kipping, Higuchi, Hirayama; Published by SAE International. This Open Access article is published under the terms of the Creative Commons Attribution
License (http://creativecommons.org/licenses/by/4.0/), which permits distribution, and reproduction in any medium, provided that the original author(s) and the source
are credited.
Downloaded from SAE International, Friday, May 13, 2022
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS 2
approaches with dierent numbers of inputs, polynomial
degrees, a nd polynomia l combinations of two and three inputs.
It has been proven that it is possible to use machine
learning models in different domains within the ECU.
However, with increasing accuracy demands these models
require additional inputs and enhanced polynomial
complexity and therefore need additional resources of storage
and computational performance of the already limited ECU.
For such purpose DENSO developed a data ow processor
(DFP), which can process parallelizable algorithms very e-
ciently and only requires a fraction of the computation time
compared to a conventional ECU. An evaluation of the poly-
nomial regression model on the DFP shows that the computa-
tion time can bereduced by a factor of 20 and allows to easily
implement multiple models to beperformed in parallel.
With a high number of machine-learned models which
are mostly developed in a highly parallelizable structure, opti-
mized ECUs could bevery helpful to enhance the overall
computation performance.
Literature Review
A function development team of the Hubergroup developed
a neural network for the NOX sensor upstream of the Selective
Cataly tic Reduction (SCR) catalyst since a physical NOX model
did not show sucient accuracy to replace the NOX sensor
and therefore save hardware costs. e trained model is fed
with real data, which were not used for training. e accuracy
of the model increases with an increase of inputs. Failure
tolerances were not considered yet as well as the transfer to
dierent vehicle platforms [1, 2].
In 2016, the Innovative Transportation Research Institute
worked on dierent machine learning approaches to estimate
idling emissions in a gasoline vehicle during a mini durability
run of 1600km with dierent driving patterns. Data from a
portable emission measurement system was used to train CO2,
CO, HC, and NOX emissions. Among the ve dierent models
investigated, the boosted bagged decision tree was identied
to bethe best-t approach [3].
Bosch developed a method to integrate machine learning
know-how into the design of experiments steps to identif y the
most relevant combinations of inputs and achieved an accurate
machine learning model. e Gaussian process regression has
proven to bethe most favorable approach due to their natural
smoothness assumptions and the capability to consider the
temporal history of inputs. Bosch developed a new generation
of control units (Bosch MDG1, from device 3 upwards,
including an Adva nced Modelling Unit) to beable to calculate
the Gaussian regression model in real time [4].
In 2019, PSA Group and IFPEN developed in cooperation
a neural network and an empirical correlation to estimate
NOX emission during real driving conditions to substitute the
upstream NOX sensor [5]. e empirical model was used to
describe the combustible composition in the combustion
chamber and therefore to reduce the number of inputs into
the neural network. e validation was based on a wide
measurement campaign. e design of experiments was used
to train the model with 12 inputs. A network of one layer with
ve neurons was derived to prevent overtting and achieve
sucient accuracy [6].
e dissertation of Lumpp in 2011 describes the develop-
ment of an empirical NOX model with high accuracy. e basis
of the modelling here is a consideration of the processes in
the engine and the formation of relevant variables in the
combustion chamber by modelling with existing measured
variables. ese models are then used as features for the
empirical model. Global expert knowledge is therefore
required to create this NOx model. Furthermore, the inves-
tigations are based on test bench measurements of an engine
test bench. Its signicance for a eet is, therefore, limited [7].
In 2017, the University of Salerno investigated the possi-
bility of using a recurrent neural network (RNN) to model
NOX formation in the engine. e model was designed to adapt
to an existing NOX sensor over runtime (aging). An oxygen
model was created as an important input. ey also dealt with
a compensation of the temporal shis between the sensors.
e test environment consisted of a vehicle on a chassis dyna-
mometer and mainly standard cycles—casting doubt on the
robustness over all environmental variations [8].
Sequenz and Isermann discussed 2011in their paper the
use of “global-local” structures in ECUs for modelling emis-
sions. e aim was to replace the state-of-the-art two-dimen-
sional (2D) map-based approaches. Splitting the feature
dimensions into areas with good predictability is the idea
behind this. e Result is a model of models with dierent
parameter sets. For this evaluation it leads to a too complex
soware st ructure and is therefore not investigated f urther [9].
Outline of this Paper
e objective of this paper was to study the possibilities of
simple polynomial models for exhaust gas sensors that were
parameterized and optimized by machine learning algo-
rithms. Independence from other modelled variables and the
exclusive use of sensor data and actuator settings was a key
point. e goal was to t this model into the most commonly
used automotive control units.
Furthermore, the eciency impact of a new DFP with
such a model was studied.
is paper shows the possibilities of the interplay between
optimizations in the model structure and the machine
learning process and the development of suitable hardware
in order to make optimal use of the new functionalities. A
holistic approach to the interaction of hardware, soware,
and optimization processes is the key to improvements in
automotive control units.
PythonasBasis
Conventional Approach
e development process for new ECU functionalities was
performed in Matlab/Simulink®. Exist ing models can beeasily
adapted or new ideas can besketched and investigated. ECU
measurements were used to validate the simulation environ-
ment. Small errors were tolerated due to the fact that the ECU
functionalities were implemented in a fixed-point
Downloaded from SAE International, Friday, May 13, 2022
3
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS
environment on the ECU, which is a dierent hardware
compared to a discrete calculation on a conventional
personal computer.
However, these models are used to create and analyze
new concepts and also to derive an initial calibration.
Dependent on the data basis and the state of the calibration,
it is also possible to use the models to show the robustness of
a calibration. e bigger the data basis the more reliable is the
information regarding robustness. It helps to have data from
dierent vehicles, driver and test cycles, as well as test trips
from extreme conditions such as altitude and heat.
Especially for OBD reasons, the simulation environment
can also beused to perform tolerance analysis on relevant
sensor signals to prove diagnosis robustness against false
detection. In general, a Monte Carlo simulation is performed
with a huge number of runs to catch the most relevant combi-
nations to sensor tolerances. Dependent on the data basis and
the number of runs, this can bea time-consuming task, which
can take days or even weeks.
Once the models are successfully validated, they can
beimplemented, which means the models are compiled into
machine code and tested furthermore via various test cases.
ECU Code in Python
e current development process for OBD functions consists
of the development, testing, calibration, validation, and trans-
lation of functionalities for an ECU up to the point when it is
ready for implementation. Hence, the compiled les for several
ECU functionalities are already available. So the idea was to
use the machine learning environment for the NOX model,
which is in Python already, instead of getting the calibration
into Matlab and a separate model.
Cython, which combines Python and C and acts as an
interface, was used to implement the existing source code into
Python. e original source les do not need to bechanged
at all. What needs to bedone is the creation of a setup le,
which “cythonizes” the source les and also contains compiler
information. It also handles the data transfer, all the datat ypes,
and the calibration. So the source code needs to bewell known
regarding inputs and outputs and their dataty pes. Aer execu-
tion the output file can be imported in Python as a
regular module.
e advantage of using this approach is that Cython code
itself is approximately three to four times faster than pure
Python code [10]. Compared to the conventional approach, it
is also approximately three to four times faster. So the ultrafast
simulation time (1 h measurement is performed in 0.5 sec)
helps especially for a huge number of data and runs. A
comparison against an ECU measurement reveals that the
accuracy is even increased compared to the conventional
approach. is is because the source code is executed in the
same manner as on the ECU with the correct datatype
and arithmetic.
It also allows a high potential for automation, especially
for auto-generated source code. Nevertheless, the analysis
capabilities in Python are almost endless due to the great
open-source community. Not to mention are the nonexistent
license costs compared to, for example, Matlab®.
However, the drawback is the initial setup, which can
be quite time consuming due to poor documentation.
Furthermore, this approach lacks the ability to change the
functionalities aerward once the source code is dened and
imported. Regarding measurement points, youare limited to
what is dened in t he source code, and it is not possible to add
additional signals as needed.
TestingEnvironment
e relevant ECU functionalities considered for this project
are developed in Matlab/Simulink®. is has the advantage
that new concepts can befast evaluated and benchmarked
against conventional or alternative approaches. It also helps
for further investigations regarding robustness and tolerance
analysis. From there the models are processed with dierent
toolchains into C-Code for ECU integration.
Another benet of Matlab/Simulink® models is that they
can also betransferred easily to rapid prototyping systems
such as ETAS ES910 and therefore betested in a real hardware
environment (Figure 1).
For such purpose, a demonstrator vehicle (mild-hybrid
diesel passenger car with a four-cylinder engine of 1.5 l
displacement) from previous work was used [11].
e aertreatment system consists of a close-coupled (cc)
lean NOX trap (LNT), ccSCR/SDPF combination, and an under-
oor SCR/ASC system and fu llls the EU6d and possible future
legislations. e engine-out NOX sensor, which is modelled
within this investigation, is located upstream of the LNT.
Within this context, the polynomial structure of the
engine-out NOX model was implemented in the demonstrator
vehicle and trained with on-road data. Due to the simple
nature of the polynomial structure (Equation 1), the model
was created within the Matlab/Simulink® environment using
several for-loops in an embedded Matlab function to calculate
the polynomial output instead of writing out the entire poly-
nomial structure. Dependent on the approach and the
maximum number to be combined for each polynomial
product, several for-loops are active.
Various measurements of urban and rural driving were
used to train the model. e preparation and selection of data
for machine learning represents a signicant part of the work
and is not described in this paper. Necessary steps include,
for example, gas-flow-dependent time shifting of sensor
signals to a common point, exclusion of ammonia slip via
FIGURE 1 Demonstrator vehicle with rapid prototyping
hardware for model implementation.
© Moser, Kipping, Higuchi, Hirayama.
Downloaded from SAE International, Friday, May 13, 2022
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS 4
low-pressure EGR, sensor status assessment, and
other considerations.
ModelDevelopment
NOX Sensor
e automotive diesel air path is controlled and diagnosed by
many dierent sensors (e.g., temperature, pressure, mass ow,
and gaseous species). e modelling of mass ow, tempera-
tures, and pressures is fairly simple because of the direct
physical correlation to its surroundings.
For gaseous species the lambda/O2 sensor is most
common. As for the former sensor types, lambda models are
also relatively easy to create. ere are only a few but major
dependencies to values like mass ow, EGR, and fuel mass.
All those sensors can be modelled with sufficient
physical approaches.
e NOX sensor signal on the other hand is much more
complicated to model. e NOX formation is a complex four-
dimensional process with many temporary local eects [12].
Building a reliable model is a costly and time-consuming
eort. e results of the simpler models needed for ECUs are
not sucient for future needs regarding control strategies
and OBD.
Considering this the NOX sensor is chosen to prove the
possibilities of machine-learned models for diesel air and
exhaust path. e acquired insights are applicable to most
other air path sensors.
e NOX sensor used in the demonstrator vehicle is a
state-of-the-art electrochemical sensor [13].
Model Structure
e aim is to install the NOX sensor model in a standard ECU
(e.g., Bosch, DENSO, Delphi, etc.). Knowing the restrictions
of an automotive ECU helps to choose a reasonable model
structure. Some major restrictions for implementation are
•e model structure has to bexed. It is not possible to
change it during runtime.
•e impact on computation time is very important.
Every module in the ECU soware has a determined
time task to nish a single computation of the
entire function.
•e memory is limited. Only a few as possible feedbacks
should beused.
Because the target is to provide an analog output, it is
obvious to choose a regression model for the NOX sensor.
Feedforward models are preferred because of low
memory usage.
With these considerations, polynomial model structures
are used for this investigation. Another benet not to ignore
is the easy disclosure to authorities. As an alternative, neural
networks-like multilayer perceptron (MLP) or recurrent
(RNN) are also possible to implement on a standard ECU, but
they are much more dicult to explain in their behavior and
so they are not the rst choice here. e polynomial structure
used for the regression consists of independent linear terms
whose response to a change in an input is easily understood.
Polynomial models are described by their inputs
(features), the order of the terms, and the input combinations.
A polynomial of at most three input combinations is described
through the equation
p
xy
xx
x
ei
i
e
ee ij
i
ee ij
e
eeeijk
1
1
12
12 2
134
xxx
i
ee ij
ee ijk
e13 34 4
Eq. (1)
where
x are model inputs
y is the oset
i, j, k are the feature combination
e1, e2, e3, e4 are the polynomial degree
The following settings were used to investigate the
polynomial performance:
•e overall number of inputs into the model varied
between 16 and 24.
•e number of input combinations used to calculate a
product of the polynomial structure was either two
or three.
•e maximum order of the products of the polynomial
structure was set to ve.
•Dierent algorithms were taken into account for
model training.
For the size of the model, this results in a wide range. To
visualize the dierent sizes of the model, Tabl e 1 lists the
number of coecients.
All the dierent combinations, which were possible to
beimplemented in the hardware (microcontroller 256 k B) and
able to betrained on the given hardware (PC with 256 GB
RAM), are discussed in the following section.
Model Inputs
e common way to select features for machine learning
models is to take all available signals and do a correlation
TABLE 1 Model setup and related number of coecients as
characteristic value for the model size.
Input combination 2 Input combination 3
Inputs
order 16 20 24 16 20 24
2152 230 324 152 230 324
3 408 630 900 968 1770 2924
4748 1220 1752 3024 5780 9848
5 1280 2000 2880 6880 13,400 23,120
© Moser, Kipping, Higuchi, Hirayama.
Downloaded from SAE International, Friday, May 13, 2022
5
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS
analysis for ltering in respect of the target signal [14]. For
polynomial structures, the additional orders of the signals
and the combination of the signals and their higher orders
are needed for this evaluation.
ere are many signals available in the ECU, which can
beused for features of a NOX model, e.g., raw sensor signals,
ltered sensor signals, modelled sensors, targets and actual
values of actors, modelled mass ows, etc. A sensor is not
available for every useful variable, so it may benecessary to
fall back on a target variable of an actuator or a model. Existing
models are used here as a form of feature engineering, which
bundles information through preprocessing [15].
Fundamental understanding of the physicochemical
system leads to a faster progress in model development, and
that knowledge is available through former modelling
researches [12]. For our investigation, wecount on the most
common ltered sensor signals and target values of actuators.
Signals from models have to be verified. If they are
reliable, they can beused to reduce the dimensions of the
polynomial structure if the model itself combines features of
the machine learning model to a new signal [16]. e use of
models was explicitly not desired for this study, as the models
would have to beevaluated for this purpose.
For the demonstrator car wehave the following veried
signals from the air path to use for modelling the NOX sensor:
•Pressures: environment (p_0), inlet (p_ 2), outlet (p_3),
dierence pressure SCR-DPF (dp_SCRF), rail (p_rail)
•Temperatures: environment (T_0), intake (T_1), inlet
(T_ 2), outlet (T_3), turbine downstream (T_4), engine
(T_e ng), fuel (T_ fu e l)
•Mass ow: fuel (dm_fuel), intake (dm_maf )
•Other: rotation (n_eng), torque (M_eng), injection angle
(phi_fuel), oxygen (lambda), NOX SCR-DPF downstream
(r_NOx2), speed (vs)
•Target values of valves because of not existent actual
feedback: throttle valve (r_e mtv), high- and low-pressure
EGR valve (r_hp, r_lp), exhaust gas ap (r_et)
Figure 2 shows the result of a simple correlation analysis
of all reliable signals to the NOX sensor signal.
e direct correlation of the second NOX sensor and its
combinations with other features is reasonable. e same
applies to mass airow, fuel mass ow, injection angle, rotation
speed, and others. ese features have similar frequencies.
Other signals (e.g., engine temperature) are known to have a
high physical inuence on NOX formation [12] but, because
of their different frequency, are not detectable as high
performers with correlation analysis.
e next step can bean embedded feature selection to
nd not relevant features through direct model learning.
Learning algorithms like Lasso Lars use regularization to
penalize not important features to zero. Aer one model
learning, the most penalized features can be excluded.
erefore the number of features can bereduced even further.
ResultsandDiscussion
e following section considers the variations of the model
structure in terms of number of features, feature combination,
polynomial degree, and choice of optimization algorithm. It
is necessary to solve the conict between the highest possible
accuracy of the model and a resource-saving model structure.
e results show that high accuracy does not necessarily
require the most complex model structure.
Feature Selection
Every evaluated signal enhances the model to more accuracy
but also leads to a bigger structure too—so the number of
features is a trade-o between accuracy and size of the model.
As long as the accuracy of the model is high enough, fewer
inputs are preferable. Correlation analysis, model training
with dierent subsets of features, and expert system analysis
can help to take out the most unimportant features to reduce
the size of the model.
For the evaluation, wechose feature sets of 24, 20, and 16
signals. A set of 24 was the maximum number over all of the
available measurements and 16 was the set of features which
was the minimum set to describe the modelled system.
Figure 3 shows the inuence of the reduction of features
on model size and accuracy. Both models were trained with
FIGURE 2 Correlation to NOX sensor signal (features 24,
pol. order 3, pol. combinations 2).
© Moser, Kipping, Higuchi, Hirayama.
FIGURE 3 Correlation to NOX sensor signal with varying
features 16 and 24 (pol. degree: 5, pol. combinations: 2).
© Moser, Kipping, Higuchi, Hirayama.
Downloaded from SAE International, Friday, May 13, 2022
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS 6
the same dataset and Ridge Regression for the learning algo-
rithm. e model structure was with a combination of two
features and a maximum polynomial degree of 5 for each
polynomial term. e reduction from 24 model inputs to 16
inputs reduces the model size from 2880 to 1280 terms. But,
at the same time, the standard deviation in the NOX model
oset increases from 15.4 ppm to 22.1 ppm.
e nal choice of the model structure depends on the
restrictions of the ECU and the needs for the use case of
the model.
Feature Combination
e correlation analysis shows that the polynomial combina-
tion of features leads to a gain of information for the
NOX model.
e rst rows of the list in Table 2 indicate that a combi-
nation of two or three features to one polynomial term has
high informative content. erefore, it is sensible to use
combinations of at least two features.
For the model integration into the ECU, it is important
not to exceed a certain size of the model. For each combination
order, the number of polynomial terms and thus the structure
doubles (see Equation 1). With the number of features going
up to 24, combinations of 3 features are the acceptable
maximum for a module in a standard ECU to run in the 100
ms time task.
Figure 4 shows an example of a polynomial input combi-
nation of 2 and 3 for 20 features and a polynomial degree of
4. e standard deviation is improved from the combination
of 2 to the combination of 3 features from 21.4 ppm to
15.2 ppm.
e additional polynomial combinations lead to a model
enlargement. For this example the number of polynomial
terms rises from 1220 to 5780. is has to be taken into
account for assessing the best specic solution for the target
ECU. e model with a feature combination of 3 is more than
four times as big as the model with combinations of 2 features,
and for standard ECUs the total number of 5780 terms and
parameters for one module would be a hindrance
for implementation.
Polynomial Degree
e degree of a polynomial is the maximum sum of the expo-
nents of a polynomial term. Table 1 shows a degree of 5in the
third row. Higher degrees are not evaluated because of the
high impact on the size of the polynomial; see Equation 1.
Figure 5 shows an example of a polynomial degree of 2
and 5 for 20 features and a feature combination of 2. e
standard deviation is reduced for the change from degree of
2 to degree of 5 from 31.5 ppm to 19.9 ppm.
e scatter plot of all test points and the histogram of
Figure 5 shows an increase of accuracy—but the higher poly-
nomial degree leads to an increased number of polynomial
terms (degree 2, 230 coecients vs. degree 5, 2000 coe-
cients). On the side the results indicate that, despite the very
small model with a polynomial degree of 2, a usable model
could bebuilt.
Algorithms
is evaluation is a test of dierent useable standard regres-
sion algorithms (e.g., Linear Regression, Ridge Regression,
Lasso Lars, SGD Regressor, and MLP) from Scikit-Learn [17].
e target was not to nd the optimal algorithm, but to prove
that there are different useful algorithms for different
TABLE 2 Sorted correlation to NOX sensor signal (features:
24, pol. order: 5, pol. combinations: 3).
Rank Polynomial term Correlation to NOX
1 r_NOx2 0.85
2 r_et^2*r_NOx2^1 0.84
3 r_et^4*r_NOx2^1 0.84
4 r_et^3*r_NOx2^1 0.84
5 r_et^1*r_1p^1*r_NOx2^1 0.83
6 r_1p^2*r_NOx2^1 0.83
7 r_et^2*r_1p^2*r_NOx2^1 0.83
8 r_et^3*r_1p^1*r_NOx2^1 0.83
9 r_et^1*r_1p^3*r_NOx2^1 0.83
10 r_et^1*r_1p^2*r_NOx2^1 0.83
11 r_1p^4*r_NOx2^1 0.83
12 r_1p^3*r_NOx2^1 0.83
13 r_et^2*r_1p^1*r_NOx2^1 0.83
14 r_et^1*r_NOx2^1 0.83
15 r_1p^1*r_NOx2^1 0.83
16 dm_maf^1*r_et^1*r_1p^1 0.76
17 dm_maf^1*r_et^3*r_1p^1 0.76
18 dm_maf^1*r_1p^2 0.76
19 dm_maf^1*r_et^2*r_1p^2 0.75
20 dm_maf^1*r_et^2*r_1p^1 0.75
21 dm_maf^1*r_et^1*r_1p^2 0.75
22 dm_maf^1*r_et^1*r_1p^3 0.75
23 dm_maf^1*r_1p^3 0.75
24 dm_maf^1*r_1p^4 0.75
25 dm_maf^1*r_et^2 0.74
26 r_lp^1*r_NOx2^2 0.74
© Moser, Kipping, Higuchi, Hirayama.
FIGURE 4 Correlation to NOX sensor signal with varying
polynomial combinations 2 and 3 (features: 20, pol. degree: 4).
© Moser, Kipping, Higuchi, Hirayama.
Downloaded from SAE International, Friday, May 13, 2022
7
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS
problems. e dierent algorithms need specic constructions
of the ECU soware related to the specic optimization of the
weighting factors.
To understand the selection of used algorithms here is a
short description of the tested algorithms:
•Linear Regression: e weighting factors (coecients) of
the polynomial are optimized to minimize the residual
sum of the error between the target sensor and model
approximation. ere is no limit to the value area of the
weighting factors, so it is not optimal for the planning of
a xed-point-based structure for automotive ECUs.
Besides this, this algorithm is sensitive to random errors
in the target.
•Ridge Regression: is algorithm extends the Linear
Regression with an L2-norm regularization. e size of
the coecients is penalized. is results in a set of small
weighting factors, and most of the factors are none zero.
e weak point here is the small quantization dierences
between the coecients which can lead to noise eects
in the model prediction.
•Lasso Lars Regression: is algorithm extends the Linear
Regression with an L1-norm regularization. Weighting
factors near zero are penalized and set to zero.
Correlating features are treated equally with
equiangularity between the weighting factors. is
together tends to give a set of good-natured coecients
concerning the value area. e algorithm can
besensitive to noise eects.
•SGD Regressor: Stochastic Gradient Descent estimates
the gradient of the model error at every new sample. is
makes it t for large datasets of more than 100 k samples.
e regularization is tunable between L1- und L2-norm
so that the set of resulting coecients is adjustable to the
needs of the soware structure inside the ECU.
•MLP: is algorithm is not a polynomial approach like
the others. An MLP is, in general, a neural network. It
serves here as a benchmark.
In the investigations carried out here, the machine
learning algorithms were not optimized with respect to
their parameters so that the results correspond to a basic
series of experiments. The tuning of the so-called hyper-
parameters for the different estimators can be done by
manually varying the parameters or by using approaches
for parameter optimization from Scikit-Learn (e.g.,
GridSearch or HalvingRandomSearch).
For an example this evaluation was done with a polyno-
mial order of 5 and 20 inputs with Ridge Regression and Lasso
Lars as learning algorithms. e 2D histogram in Figure 6
shows a better result for the Ridge Regression algorithm. e
drawback of this algorithm is the granularity of the weighting
factors. Ridge Regression (L2 regu larization) uses much more
weighting factors and tries to use smaller va lues. is can bea
problem for the quantization of computation steps inside
the ECU.
e Lasso Lars algorithm with its L1 regularization tends
to have more weighting factors deactivated with 0—very
important features are favored with higher weighting factors.
e advantage of the algorithm can beseen in Figure 7. Lasso
Lars sets most of the weighting factors (about 10,000) to 0,
which can be seen in the histogram plot (right side, green
plot). The other algorithms show a more or less
equal distribution.
In addition, Lasso Lars a lso provides the smallest average
quantization error (le side, green plot). is means, for the
FIGURE 6 Correlation to NOX sensor signal with dierent
learning algorithms: Ridge and Lasso Lars (features: 20, pol.
degree: 5, pol. combinations: 2).
© Moser, Kipping, Higuchi, Hirayama.
FIGURE 5 Correlation to NOX sensor signal with varying
polynomial degrees 2 and 5 (features: 20, pol.
combinations: 2).
© Moser, Kipping, Higuchi, Hirayama.
FIGURE 7 Quantization error at ECU implementation.
© Moser, Kipping, Higuchi, Hirayama.
Downloaded from SAE International, Friday, May 13, 2022
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS 8
implementation into an ECU, more accuracy of the model
output because of more reliable accuracy of the
model coecients.
Results of Evaluation
Summarizing the different investigations there are the
following results.
Figure 8 shows the accuracy of the dierent learning a lgo-
rithms. Linear Regression, Ridge Regression, Lasso LARS,
and SGD Regressor make use of a polynomial which is easy
to implement in common ECUs.
MLP uses a dierent structure with hidden layers, and
this gives the advantage of much more weighting factors (here
a factor of 3 through 3 hidden nodes). us the algorithm here
primarily serves as a benchmark and is otherwise outside of
the evaluation.
The best results without optimization of the hyper-
parameters produce the Linear Regression algorithm. e
larger the polynomial in terms of degree, feature combination,
and number of inputs, the more accurate the model becomes.
Linear Regression has not had the high number of hyper-
parameters like the other algorithms. us the results of the
learning experiments already represent the optimum of this
algorithm. e disadvantages of the wide value area of the
coecients together with its strong correlation to huge poly-
nomials make it not a favorite for ECU implementation.
Ridge Regression performs even better with the rising
number of inputs, feature order, and input combination.
Depending on the capacity of the ECU, this algorithm has a
good performance for the NOX model, but is not as good as
the simple Linear Regression. e set of hyper-parameters
leaves room for optimization.
Lasso Lars seems to take no advantage of more complex
polynomial structures—the models’ accuracy remains rela-
tively constant. But through its behavior to set many weighting
factors to zero, it is possible to take unimportant inputs out
of the model or reduce computation load by ignoring zero set
computations. ese are the performance gains of Lasso Lars:
The polynomial can remain very simple for the same
model accuracy.
e SGD Regressor has the worst behavior in this test
environment. Because of the large number of hyper-param-
eters and the algorithms’ ability to produce an optimum
between the L1-regularization of Lasso Lars and the
L2-regularization of the Ridge Regression, SGD has the
greatest potential here to provide the optimal
learning procedure.
e MLP shows stable results over the dierent combina-
tions of polynomial order, number of inputs, and input combi-
nations. With enough capacity in the ECU, the algorithm is
a stable candidate for a reliable model.
Figure 9 shows the comparison between the best evalu-
ation performer (polynomial with 24 inputs, degree of 4,
feature combination of 3 and Linear Regression) and worst
performer (polynomial with 16 inputs, degree of 2, feature
combination of 2 and SGD). e big dierence between the
two test sets can beseen in the scatter plot as well as in the
standard deviation (73 ppm vs. 8 ppm). The scatter plot
together with Figure 8 shows that an even larger polynomial
can no longer bring any signicant improvements since the
model already represents the sensor very accurately.
e nal choice of model structure and learning algo-
rithm depends on many factors, and there is more than one
possibility to nd a good model. For this evaluation with no
direct restrictions, the Linear Regression with 24 inputs, input
combination of 3, and polynomial order of 5 leads to the
best result.
For series ECU implementation, a polynomial with 20
inputs, a polynomial degree of 4, and a feature combination
of 2 was favored because of the smaller model structure.
Because of its ability to shrink the parameters to a small
number, Lasso Lars was chosen to calibrate the model.
In Figure 10 a time trace of a measurement of a real street
drive is shown. e high accuracy of the machine-learned
model is clearly visible. e integrated values (“NOX cum”)
show only minor dierences. With such a model, OBD and
system controls are feasible on a high level. is approach is
not limited to engine-out emissions but can also beused for
any other sensor in the powertrain such as an air mass
ow sensor.
FIGURE 8 Accuracy of dierent machine
learning algorithms.
© Moser, Kipping, Higuchi, Hirayama.
FIGURE 9 Comparison between the best and worst
test performers.
© Moser, Kipping, Higuchi, Hirayama.
Downloaded from SAE International, Friday, May 13, 2022
9
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS
Humidity and Air Quality: The
Missing Inputs
It is well known that humidity has an impact on NOX forma-
tion [17, 18]. Especially for high temperatures (>30°C), the
impact can bevery high because the absolute humidity (mass
of water in the intake air) has a wide range. Most of the current
passenger cars do not have a humidity sensor, so this impor-
tant input is missing. e air ow meter itself is sensitive to
absolute humidity, so newer versions of air ow meters have
a humidity sensor implemented [4]. It is very sensible to insta ll
such a sensor in future cars—not only for NOX modelling but
for emission controls too.
Another factor is the intake air quality. Combustion
processes in direct proximity (e.g., trac jam in close areas
of cities or long tunnels) or decomposition processes (e.g.,
swamp areas) can lead to lower oxygen levels which lead to
lower NOX formulation (like an external/outside exhaust gas
recirculation). Current passenger cars are not equipped with
an intake oxygen sensor.
Both disturbances of the NOX formulation result in devia-
tions of the oxygen level in the exhaust gas. It is possible to
detect this deviation and adjust the computation of the NOX
model. Because of insucient data of such environments, it
is not possible to show the eect here.
For ozone, it is possible to have an eect too [19]. e high
reactive gas species could lead to dierent combustion eects.
Because of a missing sensor, this could not be evaluated in
this research.
Adoption of Other Sensors
e model structure is usable for other air path sensors too.
Air ow meter or pressure or temperature sensors are candi-
dates for this kind of modelling.
As an example Figure 11 shows the modelling of a
pressure sensor upstream of the engine. For this model the
specic pressure sensor switched its input status with the NOX
sensor. e accuracy of this model is very high.
e same result is valid for other sensors or actors in the
air path, Figure 12 shows an example for the air ow sensor.
So the same model structure is usable for dierent sensors,
and the building of soware with many parallel models is
easily feasible.
In the end, there is a way to use many machine-learned
models with thousands of parallelizable computational steps.
The disadvantage here is the high load on the central
processing unit (CPU) that has to behandled.
DFPasanEnabler
About DFP
In the automotive eld in recent years, there has been a need
for processors that enable unprecedentedly sophisticated and
complex operations. e CPU, which is widely used today, is
connected to storage devices and I/O devices and is able to
handle various types of control instructions. However, due to
serial processing, there is a problem that real-time perfor-
mance is impaired as the amount of calculation increases. On
the other hand, a graphics processing unit (GPU), which is
FIGURE 11 Model accuracy for pressure sensor
(engine inlet).
© Moser, Kipping, Higuchi, Hirayama.
FIGURE 10 Time trace of NOX model accuracy.
© Moser, Kipping, Higuchi, Hirayama.
FIGURE 12 Model accuracy for the mass air flow sensor.
© Moser, Kipping, Higuchi, Hirayama.
Downloaded from SAE International, Friday, May 13, 2022
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS 10
becoming more and more popular for image processing, is a
processor that can process large-scale routine operations in
parallel at high speed. However, GPU tends to belarge in size
and consumes a large amount of power. In this context, DFP
has been developed as a processor that realizes high-speed
and power-saving processing while minimizing the size by
maximizing the utilization eciency of the parallel processing
mechanism. DFP is designed to beimplemented in a micro-
computer for automotive applications, and it is expected to
beone of the technologies to achieve an unprecedented high-
performance ECU by sharing the role with the CPU.
Architecture and Mechanism
of Parallel Processing
Combination
As shown in Figure 13, a DFP consists of three types of
processor cores: four scalar processing units (SPUs), a vector
processing unit (VPU), and a control core unit (CCU).
e SPU is an operations core and is able to execute
dierent processes independently in parallel (a function
similar to that of a multi-CPU). e VPU is a 512-bit wide
vector operations core, and it can execute up to 16 operations
concurrently if the data length is 32-bit (a function similar to
that of a GPU). e CCU is responsible for dynamically allo-
cating task processing to free SPUs to improve computing
eciency. Fi gu re 14 shows the outline of the parallel processing
ow in the DFP.
Each SPU executes independently assigned task
processing in parallel, and if there is a vector operation
instruction in it, the VPU executes the process in place of the
SPU. Sharing the VPU with each SPU in this way makes it
possible to achieve high throughput. By combining the task
parallelism and the data parallelism by vector operations, the
DFP achieves highly ecient processing while maintaining
the compact size and lower power consumption required for
use in a microcomputer for automotive applications. For the
polynomial models used in this paper, the operation of each
term and the sum of all terms were parallelized and processed
by the VPU. Moreover the entire process was divided into
multiple tasks that were assigned to and executed by indi-
vidual SPUs. is improved the utilization eciency of the
VPU and increased execution speeds.
Execution Time Assessment
e DFP execution time was measured by using the evaluation
board equipped with DFP and by means of clock counter value
at the measurement points on the soware framework. In the
same manner, as a benchmark, the execution time was
measured with an ECU equipped with an existing microcom-
puter for automotive applications (CPU clock frequency of
400 MHz). Figure 15 shows the relationship between predic-
tion error (Root Mean Square Error, RMSE) of NOX model
with dierent polynomial inputs and order and the execution
times of DFP and CPU.
Prediction error decreases by increasing the number of
inputs and order of polynomial model, but as a trade-o, it
can beseen that the CPU execution time increases exponen-
tially. is conrms that the calculation order O of the poly-
nomial model is O((np)c) for the combination of the number
of inputs n, the order p, and the number of combinations c.
On the other hand, the DFP keeps the execution time low by
performing parallel processing even though it was for the
same calculation order. Focusing on the polynomial model
with RMSE = 25 ppm from the viewpoint of OBD purpose,
the CPU execution time was 250 μs, while the DFP execution
time was about 1/20 of this, at 12 μs. is result shows that
the DFP enables large-scale processing such as polynomial
FIGURE 13 Architecture of DFP.
© Moser, Kipping, Higuchi, Hirayama.
FIGURE 14 Overview of parallelization process.
© Moser, Kipping, Higuchi, Hirayama.
FIGURE 15 Result of execution time (DFP vs. CPU).
© Moser, Kipping, Higuchi, Hirayama.
Downloaded from SAE International, Friday, May 13, 2022
11
MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS
models to beexecuted in the ECU w ithout impairing real-time
performance. Furthermore, the result shows that an even more
complex and larger number of models can also behandled.
SummaryConclusion(s)
e target of this work was to evaluate the possibilities of
bringing a machine-learned emission model with high
accuracy to a standard control unit of a passenger car. e
challenge here is to nd an optimum of the conict between
the accuracy of the model and the correlating complexity of
its structure.
is paper shows the possibilities of simple polynomial
models for exhaust gas sensors that were parameterized and
optimized by machine learning algorithms. e goal was to
t this model into area-wide used automotive control units.
Furthermore, the eciency impact of a new DFP with
such a model was studied, and its benets were shown.
For the upcoming regulations for OBM, the need for very
accurate models of engine emissions is increasing. Just as with
the models for air mass and intake pressure already shown
here, models for soot, hydrocarbons, carbon monoxide, form-
aldehyde, carbon dioxide, and oxygen can also becreated with
appropriate emission measurement technology. e problem
here is the measurement data collection of emissions without
existing regular sensors.
Recommendation
e most important recommendation to future implementa-
tions of machine-learned models into automotive control
units is to make use of the developments of processor units
that are optimized for the needs of parallelized structures.
ere is a huge potential to make use of machine learning in
the automotive sector, but the standard control units have too
many restrictions. e real benet from machine-learned
models is to have a high range of structural possibilities and
a high accuracy of mathematical functions (e.g., exponential,
logarithmic, tangential functions).
To enhance the accuracy of machine-learned emission
models, more attention should bepaid to the distribution
of the model features and the target value. The distribu-
tion of input values from sensors and especially from
actors are not always ideal for machine learning. In the
best case, every feature and the target value will beindi-
vidually transformed to get as near as possible to Gaussian
normal distribution.
Optimization of learning algorithms is the next going on
from this evaluation. It is very important to know well the
capabilities and limitations of each learning algorithm to
guarantee a stable model outside the trained data space.
Knowledge about the behavior of interpolation and extrapola-
tion in areas outside the known data range is essential for an
evaluation of the usability of the model in an
automotive application.
For emission models the use of polynomial structures is
relatively safe in the context of approval of emissions regula-
tion from the authorities. For other machine learning
approaches like neural networks (MLP in this evaluation),
there is no procedure at the moment to get an approval. Here
lies a major problem to use machine-learned models. A
process must beagreed upon with the authorities in order to
obtain approval for dierent soware structures. On the
developer side, it should beclaried in advance how such
structures can bevalidated and secured.
Acknowledgments
anks to DENSO for providing the evaluation results for the
DFP, AECC and IPA for providing the car to collect the data
and IAV for supporting this paper.
Contact Information
Marco Moser
Sr. Smart Data Analyst for OBD Functions
IAV GmbH, Carnotstr. 1, 10587 Berlin
Tel: +49(0)30 -399789176
marco.moser@iav.de
Steve Kipping
Function Developer OBD
IAV GmbH, Carnotstr. 1, 10587 Berlin
Tel: +49(0)30-399789247
steve.kipping@iav.de
Kazuhiro Higuchi
Powertrain System Development Div.
DENSO CORPORATION
1-1, Showa-cho, Kariya, Aichi 448-8661, Japan
Tel: +81(0)566-61-4441
kazuhiro.higuchi.j7r@jp.denso.com
Hiroyuki Hirayama
Processor Development Dept.
NSITEXE, Inc.
2-16-4, Kounan, Minato-ku, Tokyo, 108-0075, Japan
Tel: +81(0)3-5783-2415
hiroyuki_hirayama@nsitexe.co.jp
References
1. Huber Group, “Neuronale Netze in Automobilen sollen
NOX-Sensor vor Katalysator in SCR-Systemen ersetzen,”
2009, accessed May 2021, https://www.elektronikpraxis.
vogel.de/neuronale-netze-in-automobilen-sollen-nox-sensor-
vor-katalysator-in-scr-systemen-ersetzen-a-231895/.
2. Huber Group, “Neural Networks in the Automotive
Industry: Huber Group Is Working on Substituting a NOx
Sensor with a Neural Network/Learning Network to Replace
Physical Model,” 2010, accessed August 2021, https://www.
konstant.de/pressefach/huber-group/neura l-net works-in-
the-automotive-industry-huber-group-is-working-on-
substituting-a-nox-sensor-with-a-neural-network-learning-
network-to-replace-physical-model/.
Downloaded from SAE International, Friday, May 13, 2022
© 2021 Mos er, Kipping, Higu chi, Hirayama; Pu blished by SAE Inte rnational. Thi s Open Access art icle is publishe d under the terms of t he Creative Common s Attribution
License (http://creativecommons.org/licenses/by/4.0/), which permits distribution, and reproduction in any medium, provided that the original author(s) and the
source are credited.
Positions and opinions advanced in this work are those of the author(s) and not ne cessarily those of SAE International. Respo nsibility for the content of the work lies
solely with the author(s).
ISSN 0148-7191
12 MACHINE-LEARNED EMISSION MODEL FOR DIESEL EXHAUST ON-BOARD DIAGNOSTICS
3. Li, Q., Qiao, F., and Yu, L., “A Machine Learning Approach
for Light-Duty Vehicle Idling Emission Estimation Based on
Real Driving and Environmental Information,” Environ
Pollut Climate Change 1 (2016): 106.
4. BOSCH, “Modeling a Physical System for System Control and
Calibration,” accessed May 2021, https://www.bosch-ai.com/
research/research-applications/ai-based-dynamic-modeling/.
5. BOSCH, “NOx sensor – Regulation and diagnosis of
cataly tic nitrogen oxide reduction,” accessed August 2021,
https://ww w.bosch-mobility-solutions.com/en/solutions/
exhaust-gas-treatment/nox-sensor/.
6. Rudlo, J., Leroy, T., Ngo, C., and Denys, F., “Schätzung der
NOX-Emissionen moderner Dieselmotoren unter realen
Fahrbedingungen,” MTZ- Motortechnische Zeitschri 80,
no. 2 (2019): 58-62.
7. Lumpp, B.C., “Echtzeitfähige Stickoxidmodellierung zur
Integration im Steuergerät eines Nutzfahrzeug-
Dieselmotors,” Technischen Universität München
(Technical University Munich), 2011, http://nbn-resolving.
de/urn/resolver.pl?urn:nbn:de:bvb:91-
di ss-2 0111212-1083664 -1-3.
8. Arsie, I., Cricchio, A., De Cesare, M., Lazzarini, F. et al.,
“Neural Network Models for Virtual Sensing of NOx
Emissions in Automotive Diesel Engines with Least Square-
Based Adaptation,” Control Engineering Practice 61 (2017):
11-20 , https://doi.org/10.1016/j.conengprac.2017.01.005.
9. Sequenz, H. and Isermann, R., “Emission Model Structures
for an Implementation on Engine Control Units,” IFAC
Proceedings Volumes 44, no. 1 (2011): 11851-11856, https://
doi.or g/10.3182 /2 0110828- 6 -IT-10 02.03131.
10. Cython, “Faster Code via Static Typing,” accessed August
2021, https://cython.readthedocs.io/en/latest/src/quickstart/
cythonize.html.
11. Demuynck, J., Favre, C., Bosteels, D., Randlshofer, G. etal.,
AECC, IPA, IAV, “Integrated Diesel System Achieving Ultra-
Low Urban and Motorway NOX Emissions on the Road,” in
Wiener Motorensymposium, Vienna, 2019.
12. Rezaei, R., Dinkelacker, F., Tilch, B., Delebinski, T. et al.,
“Phenomenological Modeling of Combustion and NOX
Emissions Using Detailed Tabulated Chemistry Methods in
Diesel Engines,” International Journal of Engine Research 17
(2016): 846-856.
13. Todo, Y. et al., “Development of High Accuracy and Quick
Light-o NOx Sensor,” SAE Technical Paper 2018 -01-0334 ,
2018, https://doi.org/10.4271/2018-01-0334.
14. Guyon, I. and Elissee, A., “An Introduction to Variable and
Feature Selection,” J. Mach. Learn. Res. 3 (20 03): 1157-1182 .
15. Zheng, A. and Casari, A., Feature Engineering for Machine
Learning: Principles and Techniques for Data Scientists
(Germany: O’Reilly Media, 2018)
16. Scikit-Learn, “User Guide,” https://scikit-learn.org/stable/
user_guide.html, accessed May 2021.
17. ENVIRON International Corporation, “Humidity and
Temperature Correction Factors for NOx Emissions from
Diesel Engines,” Final Report, 2003.
18. McCormick, R.L., Graboski, M.S., Newlin, A.W., and Ross, J.D.,
“Eect of Humidity on Heavy-Duty Transient Emissions from
Diesel and Natural Gas Engines at High Altitude,” Journal of the
Air & Waste Management Association 47, no. 7 (1997): 784-791,
htt ps://doi.org/10.1080/10 473289.1997.10463937.
19. Liu, Y., Wang, Z., Li, L., Wan, K. et al., “Reaction Mechanism
Reduction for Ozone-Enhanced CH4/Air Combustion by a
Combination of Directed Relation Graph with Error
Propagation, Sensitivity Analysis and Quasi-Steady State
Assumption,” Energies 11 (2018): 1470, https://doi.
org/10. 3390/en11061470.
Downloaded from SAE International, Friday, May 13, 2022