You are on page 1of 4

C - T e c h n o l o g i e s

Zero-Dimensional Combustion
Simulation in Real Time
by Oliver Philipp, Robert Hoepler, Cornelius Chucholowski, Tesis Dynaware
The development and validation of engine control device functions relies more and more on
modern simulation and modelling techniques. The en-Dyna Themos models not only provide a
realistic description of the physical behaviour of the entire internal combustion engine, they
also satisfy the need for high computational efficiency mandated by the real-time application
in Software-in-the Loop and Hardware-in-the-Loop environments.

Components of
combustion
engine models

The latest engine technology has a strong impact on


the model-based development and validation of control device functions. Whereas well-known mass-flow
based models were sufficiently accurate in the past,
more detailed model approaches are required nowadays to consider the signals measured by new sensors
or regard the influence of new actuators. A typical
example is the introduction of cylinder pressure sensors on diesel engines. The sensor signals have to be
physically consistent to pass the plausibility checks of
diagnosis functions, for example those demanded by
OBD II (Onboard-Diagnostic System) legislation.
The model presented here maps all of the main
components of modern internal combustion engines,
including the compressor, turbine, EGR valve, particulate filter and oxidizing catalytic converter, to form
Simulink blocks. In this paper, we focus on the simulation of the combustion process within the cylinder
of a diesel engine, which is akin to the model of a
spark-ignition engine not presented here. The chosen
approach is a zero-dimensional description of the
combustion, which takes into account the inert gas
portion from the recycled exhaust gas as well as multiple injections in the cylinder pressure calculation.
It provides the required degree of physical detail
and enables simulation step sizes commonly used in
HiL applications, such as 1 ms and above, whereas

other model approaches either require smaller step


sizes in order to ensure accurate simulation or the
computational cost depends strongly on, for example, the engine speed.
Accuracy and computational performance are
enhanced by an innovative step size control system
that maintains upper limits for the computing time
and a maximum angle increment essential for the
accuracy of the simulation independent of the step
size of the overall simulation.

Engine Modelling Framework


The modelling framework depicted in Figure 1 comprises two main parts:
Simulink block libraries representing all prominent parts of the engine and the vehicle, such as
the cylinder, throttle, manifold, injector and
transmission. This modular structure of fully generic model blocks enables almost all engine
model configurations to be implemented quickly.
A data preparation tool so-called Preprocessing
to derive the model parameters in a fast and
reproducible process from measurements and data
sheet information. For each model block, Preprocessing provides appropriate methods to calculate
the required parameters.

Thermodynamical engine
dynamics
simulation
paves the way
to faster ECU
function development.

32

AutoTechnology 2/2007

C - T e c h n o l o g i e s

Figure 1: Process
for setting up an
HiL/SiL application.

Figure 2 shows a typical engine model with its major components.


The intake part is composed of individual model blocks for the compressor, intercooler and throttle as well as containers between the intercooler and throttle and between the throttle and the engine. The exhaust part consists of models for a turbine, an oxidising catalytic
converter, a number of lambda sensors and a container model located
between the engine and the turbine. The compressor and turbine are
rigidly linked by a shaft. The intake and exhaust manifolds are connected by an EGR valve and an EGR cooler. Each cylinder is modelled
by an individual instance of a generic library block.
The model is adapted to specific requirements by either changing
the number of blocks, for example the cylinder blocks, or rearranging
existing model blocks. For instance, two-stage charging can be realised
by the arrangement of two compressor and turbine blocks connected by
a container block. The operating point-dependent bypass of a compressor or a turbine can be modelled by throttle blocks connected to adjacent containers. In order to exploit the full capability and accuracy of
the model library, it is necessary to have correct model parameters, as
the overall quality of the simulation results is determined by the model

Figure 2: Schematic view of a typical model.


AutoTechnology 2/2007

C - T e c h n o l o g i e s

where kA is the heat transfer coefficient between the


container and its surroundings. This leads to the ordinary differential equation (ODE):
mContainercvTContainer = kA (TContainer TAmbient) +

m
incpTin m
outcpTContainer
m
p ____
T p
pcontainer = _____
m
+

Figure 3: Characteristic map of the Arrhenius coefficient Karrh resulting from Preprocessing.

The simulation of
the combustion is
based on the
laws of thermodynamics

equations and algorithms as well as the parameterisation. Preparing the parameters for a new model
can be a tedious and error-prone task. To alleviate
this work, the model library is accompanied by a
data preparation system called Preprocessing. It calculates the model parameters from standard measurements and data sheet information usually available during engine development [4].
One important step of this process calculates the
characteristic map of the Arrhenius coefficient Karrh,
shown in Figure 3, which is required by the combustion model. An optimisation algorithm adapts the
coefficient for each operating point in such a way
that the sum of the mean combustion torques of the
cylinders in the simulation matches the combustion
torque calculated from the measurement data.
In the same way, heat transfer coefficients and
parameters describing turbine and compressor
blocks, for example, are calculated by Preprocessing.
Many of these calculations are also based on results
of the engine characteristic map measurement.

Gas Dynamics and Combustion


Appropriate simulation of the processes inside the
cylinder in engine control device test applications
requires (i) treatment of the gas dynamics describing
the inflowing and outflowing gas, (ii) calculation of
the heat release and pressure during combustion,
and (iii) determination of the gas composition.
The gas state in the manifolds, for example the
intake and exhaust manifolds, is simulated by container models. These calculate the pressure, temperature and gas composition, presuming the gas to be
ideal.
A realistic temperature calculation considers the
heat loss to the surroundings of each container. The
following approach is used in the model to calculate
the temperature of the exhaust gas from the weighted mean temperature of the inflowing mass flows Tin,

34

This ODE is solved in the presented approach


with a fully implicit integration method in order to
guarantee a stable calculation of the container pressure even in the case of simulation step sizes >1 ms
and small container volumes. If this problem is treated by explicit or partially implicit integration methods, the solution of the ODE may become unstable
[3].
The gas under consideration is composed of O2,
N2, CO2, CxHy, CO, NOx and particles. The composition
of the exhaust mass flow is calculated as a weighted
average of the composition of the inflowing mass
flows.
The simulation of the combustion is based on the
laws of thermodynamics: the gas state in the cylinder is determined by the balance of mass and energy.
It is assumed that the gas state is homogenous in the
entire cylinder, also known as a zero-dimensional
model approach. The calculation of the heat release
and heat losses forms the basis for simulating the
pressure inside the cylinder synchronously to the
crank angle and the resulting cylinder torque. Synchronous in this context denotes that the crank angle is provided by an external source, for example
HiL hardware or a separate model block, to ensure
that the current model calculation uses the present
crank angle.
Using equilibrium thermodynamics, the gas temperature is determined by
Qwall+QcombustionpV+cpm
inTin+cpm
outToutm
cvT

__________________________________
T=

.
mcv

(1)

The time-dependent cylinder volume is determined from the current crank angle and the kinematics of the crank drive [1]. The wall heat transfer
coefficient a used in Qwall = awall (T Twall) is calculated using various simplifying assumptions in accordance with the approach by Woschni [2].
The reaction kinetics of the combustion of fuel is approximated by the following chemical reaction
y
y
CxHy + x + _4O2 xCO2 + _2H2O.

Hence, the heat release dQcombustion/dt during combustion can be represented by the concentration of
CO2
d(c(CO2))
dQ
combustion
_

= 1_x _

mCylinder HFuel
dt
dt

In the approach presented here, the change in the


concentration of CO2 is determined by an Arrhenius
equation, where KArrh is the operating point-dependent Arrhenius parameter [2]:
AutoTechnology 2/2007

C - T e c h n o l o g i e s

d(c(CO
))
_
_
2

= KArrh exp 4650K


c(O2) c(CxHy)
T
dt

The concentrations of O2, H2O, CO2 and CxHy in


the exhaust gas are calculated from the reaction kinetics, while the concentrations of CO, NOx and particles are determined by characteristic maps.
The ignition delay time of the injected fuel has a
considerable influence on the heat release with respect to time. The delay time between injection and
ignition is considered by [2]:

tdelay = 4.4 10 4 p1.2 exp 4650K


_

The influence of multiple injections on the heat


release rate during combustion, as depicted in Figure 4 for the case of a double injection, is taken into
account by an abrupt change in the concentration of
CxHy in accordance with the quantity of fuel injected.
This assumption is justified by the fact that, during
the simulation, injection signals are evaluated discretely at each time step.
Solving the differential equation (1) requires a
method of high order and low computational effort
to calculate the crank angle-resolved values of temperature, pressure and torque with adequate precision. The approach presented here is based on
DOPRI5, which permits a maximum angle increment
of Da = 2 at a simulation step size of 1 ms and a
maximum engine speed of 6000 rpm to achieve an
accuracy comparable with the explicit Runge-Kutta
method (RK 4) with an increment of Da=1.
An innovative step size control system (SCS) was
designed to enable real-time operation of the model
mandatory for HiL operation. During the combustion
phase, the SCS subdivides one step into several micro-steps [3]. A time-based solution ensures that the
CPU load is almost independent of the engine speed
and leads to sufficient precision of the combustion
process even for step sizes >1 ms. Values such as the
crank shaft-synchronous combustion torque are
mapped to mean values at each simulation step.
An important aspect to be considered is the continuous consideration of the injection signals in HiL
operation. When the measurement technology used
in this scenario is able to continuously pass injection
signals to the model, alterations in the injection signal directly effect the simulation without delay.

Application Scenarios
The presented model facilitates the development
process of an engine control unit (ECU) at various
stages. In controller design, a graphical specification
of the controller function may be interfaced to the
engine model to validate the conceptual design. Parameter studies up to pre-calibration of the controller
before it is run with the real engine can reveal sensitivity to controller parameters. Tests of the ECU on an
HiL test rig take place later in the development, either
for the ECU alone or as a part of a network of controllers for integration tests. In a recent application, a
car manufacturer developed controller functions with
cylinder pressure feedback. At first, it was planned to
test these functions on the real engine. However,
AutoTechnology 2/2007

since an HiL test rig with the presented model was


available, the controller design was tested on the
HiL. The simulation results obtained allowed for an
early optimisation of the controller design and its
parameters. Thus, development results were available
much earlier than expected.

Early optimisation of the controller design and


its parameters

Conclusion
Real-time engine simulation including gas dynamics
and combustion is a key enabler for testing leadingedge engine control device functions and can be applied to design control algorithms at an early stage
of the development process, with the model simulating the engine as a controlled system. The high-fidelity approach presented here includes a zero-dimensional model for the simulation of combustion
that guarantees a realistic calculation of the crankshaft-related combustion torque and the pressure in
the cylinder.
The problem of very small time scales introduced
by treating the combustion process in detail on the
one hand and expensive computations on the other
is solved by an innovative step size control to maintain real-time capability. Hence, the same model is
applicable in SiL and HiL applications for designing
and testing control device functions.

Figure 4: Heat release in the case of double injection.


[1] Pischinger, Rudolf; Kell, Manfred; Sams, Theodor: Thermodynamik der Verbrennungskraftmaschine; Springer Verlag,
Berlin, 2002.
[2] Urlaub, Alfred: Verbrennungsmotoren; Springer Verlag,
Berlin,1995.
[3] Philipp, Oliver, Thalhauser, Josef: A Diesel Engine Model
with Turbocharging, EGR and Cylinder-pressure Calculation for HiL and SiL, 5th IAV Symposium, 2005.
[4] Philipp, Oliver; Rhlich, Stefan: The enDYNA Preprocessing tool for model parameterisation, Simulation und Test in
der Funktions- und Softwareentwicklung fr die Automobilindustrie, 2005.

35

You might also like