0% found this document useful (0 votes)
40 views44 pages

Real-Time Estimation of Pressure in Diesel Intake Manifolds: Mattias Eriksson

The document presents research on modeling the pressure dynamics of the intake manifold in diesel engines. It explores numerical optimization methods and grey-box modeling approaches to create a parameterized function that describes the intake manifold pressure. The proposed grey-box model has a high maximum error of 43%. Other models are presented for use in simulating specific operating points, with the goal of acceptable accuracy for the most difficult conditions to control. Parameterization methods are also investigated for describing the pressure when differences across throttles are small, as numerical solutions can be unstable in this case.

Uploaded by

11751175
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views44 pages

Real-Time Estimation of Pressure in Diesel Intake Manifolds: Mattias Eriksson

The document presents research on modeling the pressure dynamics of the intake manifold in diesel engines. It explores numerical optimization methods and grey-box modeling approaches to create a parameterized function that describes the intake manifold pressure. The proposed grey-box model has a high maximum error of 43%. Other models are presented for use in simulating specific operating points, with the goal of acceptable accuracy for the most difficult conditions to control. Parameterization methods are also investigated for describing the pressure when differences across throttles are small, as numerical solutions can be unstable in this case.

Uploaded by

11751175
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

2

1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
10
5
0

10

Real-time Estimation of Pressure


in Diesel Intake Manifolds

Mattias Eriksson
Department of Signals and Systems
CHALMERS UNIVERSITY OF TECHNOLOGY

Goteborg, Sweden

SSYX04/2011

Abstract
This master thesis work deals with the task of nding a simple mathematical model
to describe the pressure dynamics of the intake manifold in diesel engines. The
model takes into account the intake throttles for air and exhaust gas recirculation
(EGR).
A good model is essential for the engine control, especially in transient conditions.
The control is performed in real-time, why the computational burden of the calculations must be low.
In this thesis work, a physical model of the dynamics is presented. Numerical
optimization methods are used to nd a solution-set from the model. The solutionset acts as a reference for grey-box modelling, with the aim of creating a closed
parameterized function describing the pressure of the intake manifold.
The proposed grey-box model suers from a high maximum error of 43%.
Other models are presented with the aim of being used in collaboration with simulation of the system. Dierent models are chosen for working points selected to
cover the most dicult conditions to control. For those models, the accuracy is
acceptable.

Keywords: pressure estimation, diesel engine, intake manifold, EGR, optimization, parameterization

iii

Sammanfattning
Detta examensarbete handlar om att hitta en enkel matematisk modell for att beskriva trycket i insugsroret p
a en dieselmotor. Modellen tar hansyn till spjallen for
ing
angsluft och avgas
aterforing (EGR).
En bra modell ar viktig for motorns reglersystem, speciellt under transienta forlopp.
Regleringen sker i realtid, och darfor f
ar inte berakningarna vara kravande i fr
aga
om datorkraft.
I detta arbete presenteras en fysikalisk modell av odesdynamiken. Numerisk optimering anvands for att generera en losningsmangd utifr
an modellen. Losningsmangden
fungerar som en referens for gr
aboxmodellering, med syftet att skapa en sluten
parametriserad function som beskriver trycket i insugsroret.
Den foreslagna gr
aboxmodellen har tyvarr ett alltfor hogt maximalt fel (43%).
Andra modeller presenteras for att anvandas tillsammans med simulering av systemet. Olika modeller avpassass for olika arbetspunkter, valda for att tacka de mest
sv
arstyrda intervallen. For dessa intervall ar noggrannheten acceptabel.

Nyckelord: tryckestimering, dieselmotor, insugsror, EGR, optimering, parametrisering

iv

Preface
This is the report of a master thesis project at Chalmers University of Technology.
The work was conducted at Combine AB, with supervision from the Department of
Signals and Systems at Chalmers.
I would like to thank the engineers at Combine AB, and especially CEO Anders
Movert, for the regular supervision of the work and for giving intelligent inputs
when needed. Thanks also for the high-performance hardware that shortened many
days of heavy simulations.
I would also like to thank my supervisor at Chalmers, docent Torsten Wik, for
guidelines in the work process and creative comments and discussions on the specic
problems to solve.

Ljungskile, September 15, 2011


MATTIAS ERIKSSON

vi

Contents
1 INTRODUCTION

2 NOTATION

3 MODELING

3.1

Gas ow through a nozzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.2

Model of the intake manifold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.3

Boundaries of the dependent variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4 NUMERICAL SOLUTIONS
4.1

10

Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

4.1.1

Analysis of the optimization problem . . . . . . . . . . . . . . . . . . . . . . .

10

4.1.2

Descent algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

4.2

Fixed-point iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.3

Analysis of the algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

5 PARAMETERIZED SOLUTIONS

16

5.1

Properties of the solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

5.2

Limits of g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

5.3

Parameterization of the boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

5.3.1

Parameterization of ow only through the intake-throttle . . . . . . .

19

5.3.2

Parameterization of ow only through the EGR-throttle . . . . . . . .

21

Parameterization of the ow through the intake- and EGR-throttles . . . .

21

5.4.1

22

5.4

Weighted mean of the boundaries . . . . . . . . . . . . . . . . . . . . . . . . . .

6 SIMULATION AND PARAMETERIZATION


6.1

Pressure simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vii

24
24

viii

CONTENTS

6.2

Parameterization of f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

6.3

Simulation combined with parameterization of f . . . . . . . . . . . . . . . . . . . .

25

6.4

Parameterization for small pressure dierences . . . . . . . . . . . . . . . . . . . . . .

27

6.4.1

Parameterization outgoing from the boundaries . . . . . . . . . . . . . . .

27

6.4.2

Parameterization according to level-curves . . . . . . . . . . . . . . . . . . .

28

6.4.3

Combination of gbound and glevel . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

Real-time determination of region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

6.5

7 DISCUSSION

31

8 CONCLUSION

32

1 INTRODUCTION
Electronic control units are an important part in the design and construction of a
modern car. The benets of control are many, e.g. better performance, handling
and safety. Modern engine control in cars is very much focused on reducing toxic
emissions, but has other objectives as well. The output torque in a diesel-engine is
controlled by the air/fuel-ratio, for example. (Guzzella and Onder 2010)
Among the unwanted pollutants, there are nitrogen oxides (N Ox ). N Ox is created when the temperature in the combustion chamber rises too much. To reduce
the combustion temperature, Exhaust Gas Recirculation (EGR) is used. The idea
is simple; reduce the combustible components in the combustion by recirculating
exhaust gas.
Amstutz and Del Re (1995) proposes a linear sensor-based control for the EGR-ow,
and concludes that the transient operations are not well handled. The sensors are
not good enough to handle fast nonlinear dynamics. A better alternative is modelbased control, which means the controller is based on a model of the system that is
controlled. A good model is the basis for a good control design. A dicult problem
in diesel engines of today is to model the pressure in the intake manifold during
transient conditions. To model the air/fuel-ratio, the ows into the intake manifold
must be known. In the case when the pressure dierences around the intake- and
EGR-throttles are small, a small change in pressure may lead to a signicant change
in the EGR-ow.
The goal for this thesis is to create an algorithm that can be used to estimate the
pressure in the intake-manifold. The estimation is carried out in real-time, so the
computational burden must be small for the control unit.
This thesis is limited to a specic number of connections to the manifold, that is an
intake-throttle, an EGR-throttle and a ow from the manifold to the combustion
chambers. The pressures before the throttles are assumed to be known, as well as the
physical properties of the throttles and the gas-ow to the combusition chambers.
It is sometimes meaningful to let the ow go backwards through the EGR-throttle,
and this case is also covered by this work.
It is generally possible to simulate the system in real-time, by integrating ows
and pressure in discrete time. Problems occur, however, when the dierence in
pressure directly before and after one throttle is small. The integration of the ow
is then unstable, because the integration function has an innite derivative and is not
Lipschitz-continuous. Guzzella and Onder (2010) suggest some possible solutions to
this problem. All of them include changing the fundamental equation from the
pressure ratio to the mass-ow m
by limiting the maximum derivative of the
function.

Chapter 1

Introduction

It is of interest to nd a solution that includes all physical dynamics of the problem.


The methods examined are classied into
Numerical solutions. Iterative methods to nd the solution in real time. Those
solutions suer from the problem of the innite derivative, and they may be
unstable for some conditions. Descent optimization methods and iterative
xpoint methods are used.
Parameterized solutions. Given a large set of solution-points, nd an analytical
function matching those points.
The result of this thesis work shows that numerical methods are possibly unstable,
or tend to have very slow convergence under some conditions. Among the proposed
parameterized solutions, none is suciently good for all possible combinations of
dependent variables. If limited to specic regions for which the dierences in pressure
around the throttles are small, there is however a combination of methods that has
a maximum relative error of 2.5%, which is acceptable. The algorithm then has to
choose method depending on the operating point, which may be tricky.

2 NOTATION
Capital Letters
A
C
F
J
P
Q
R
S
T
U
V

area (m2 )
constant (dimensionless)
Flow rate function (dimensionless)
Jacobian
pressure (Pa)
coecients of 3rd grade polynomial equations
gas constant (J kg1 K1 )
aggregated variable (dimensionless)
temperature (K)
cost-function for optimization (dimensionless)
volume (m3 )

Small Letters
a
b
c
d
e
cp
cv
f
fmax
g
k
m
n
m

p
p
r
t
x1
x2
x

aggregated variable connected to the manifold pressure (dimensionless)


aggregated variable connected to the intake throttle (dimensionless)
aggregated variable connected to the EGR-throttle (dimensionless)
pressure ratio (dimensionless)
relative error (dimensionless)
specic heat at constant pressure (J kg1 K1 )
specic heat at constant volume (J kg1 K1 )
mass ow rate function (dimensionless)
maximum mass ow rate at a throttle (kg s1 )
aggregated function (dimensionless)
parameterization constant (dimensionless)
mass (kg)
iteration number
mass ow rate (kg s1 )
descent direction
parameterization constant (dimensionless)
aggregated function (dimensionless)
time (s)
ow rate at intake throttle (dimensionless)
ow rate at egr throttle (dimensionless)
vector aggregation of x1 and x2
3

Chapter 2

Greek Letters

pressure ratio
step-length
ratio of specic heats, cp /cv
slope in b-c plot
lter factor for xed-point iteration
factor for Gauss-Newton modication
temporary variable in calculation of limits

Subscripts
0
k
T
s
S
c
uc
in
egr
bound
level
comb

xed
iteration
throttle
sample (time)
stagnation (applies to P , T )
critical (applies to the pressure ratio limit for choked ows)
unchoked (ow)
before or directly referring to intake throttle
before or directly referring to the throttle controlling egr
boundary of the bc-plane
level-curves in the bc-plane
combined

Superscripts
(n) sample number (connected to time)

Diacritical marks
approximative

Notation

3 MODELING
3.1 Gas ow through a nozzle
PT , AT
PS

Figure 3.1. Flow through a nozzle.


Consider a gas ow through a nozzle as in Figure 3.1. The gas is suppposed to be
ideal. PT and AT is the pressure and cross-section area, respectively, in the throat
of the nozzle, PS and TS are the stagnation pressure and temperature.
The ow velocity is maximized when the throttle ow equals the velocity of sound
(Heywood 1988). This is called choked ow, and occurs for a pressure ratio lower
than the critical pressure ratio c , dened by
(
c =

PT
PS

2
+1

=
critical

)/(1)
,

(3.1)

where = cp /cv is the specic heat ratio. The critical pressure ratio corresponds to
the maximum ow rate

m
= fmax

AT PS

=
RTS

2
+1

)(+1)/2(1)
.

For unchoked ows, the mass rate is described by

AT PS
m
=
RTS

PT
PS

)1/ {

2
1

PT
PS

)(1)/ )}1/2
,

(3.2)

where R is the gas constant. Equation (3.2) can be reformulated to include choked
ows by
(
m
= fmax f
5

PT
PS

)
(3.3)

Chapter 3

Modeling

where f () takes dierent form depending on the value of the pressure ratio . For
ratios of less than the critical ratio c , f is equal to 1. In the unchoked region
c < 1, f follows the analytical expression hidden in Equation (3.2):
(
)1/2
fuc = C 1/ 1 (1)/
,

(3.4)

where C is a constant, depending on alone:

C=

2
1

2
+1

+1 )1
) 2(1)

2
1

2
+1

+1
) 2(1)

On the other hand, if > 1, meaning that PT > PS , the problem is symmetric, and
the ow will behave the same but ow in the opposite direction. Collecting these
pieces of information gives us the following denition of f :

fuc ()
f () =
fuc (1/)

,
,
,
,

0 < c
c < 1
1 < < 1/c
1/c

(3.5)

f is not dened on the negative real axis, since that reects a negative pressure,
which is physically impossible. The derivative of f will be needed further on. Differenting fuc results in
1
dfuc
2 1

=C
.
(3.6)
1
d

2 1
When 1, dfduc independent of whether it is limit from left or right.
Including choked ows on the derivatives gives

df

duc ()
df

() =

d
dfuc

(1/)

d
0

,
,
,
,
,

0 < c
c < < 1
=1
1 < < 1/c
1/c

A plot of f together with its derivative is shown in Figure 3.2.

3.2 Model of the intake manifold


Figure 3.3 shows the variable denitions for the relevant quantities in the manifold
model. Assume that the manifold pressure P equals that in the throttle throats.
Assume also that the stagnation pressure is constant in the throttle.

3.2 Model of the intake manifold

f
df/d

Figure 3.2.
derivative.

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

The function f () (describing the ow through a nozzle) and its

Pegr
m egr
Pin m in

Aegr

m e
P, V, T

Ain

Figure 3.3. A simplied view of the intake manifold.

The resulting equations are then

m
in
m
egr

)
P
= fmax,in f
P
( in )
P
= fmax,egr f
Pegr

Chapter 3

Modeling

Introducing x1 = f (P/Pin ) and x2 = f (P/Pegr ) gives


m
in = fmax,in x1
m
egr = fmax,egr x2

(3.7)
(3.8)

Applying the ideal gas law in the intake manifold gives


RT
P =
m.
V
Assume that we have adiabatic conditions and that the system is sampled with a
sample time ts . Integrating the pressure using backward Euler from time ts (n 1)
to ts n gives
RT
P (n) = P (n1) + ts
(m
in + m
egr m
e) ,
(3.9)
V
assuming that the mass ows and the temperature are constant on the sampling
interval.
Insert (3.7) and (3.8) into the equation above, and apply to x1 and x2 at time-step
n:
(

x1
x2

)
( (n) )
P
P
= f
=f
= f (a + bx1 + cx2 )
Pin
Pin
(
)
( (n) )
P
P
= f
=f
= f (d(a + bx1 + cx2 )) ,
Pegr
Pegr

(3.10)
(3.11)

where
P (n1) ts RT m
e

Pin
V Pin
ts RT fmax,in
b =
V Pin
ts RT fmax,egr
c =
V Pegr
Pin
.
d =
Pegr

a =

Equation (3.10) and (3.11) form a system of implicit equations, and the objective
of the remaining part of this report is to nd a computationally cheap solution to
this specic problem. Introducing
[ ]
x
x= 1
x2
and

[
] [
]
F1 (x)
f (a + bx1 + cx2 )
F (x) =
=
.
F2 (x)
f (d(a + bx1 + cx2 ))

gives a shorter notation to the problem described by (3.10) and (3.11):


x = F (x) .

(3.12)

3.3 Boundaries of the dependent variables

3.3 Boundaries of the dependent variables


a, b, c, and d all represent combinations of common physical properties. Thus, they
are all real-valued. Table 3.1 shows the possible limits in which the variables are
assumed to stay within.
Table 3.1. Possible intervals for the dependent variables
Variable
a
b
c
d

Interval
(0,2)
(0,20)
(0,20)
(0.5,2)

4 NUMERICAL SOLUTIONS
Our task is to make the solutions to Equation (3.12) available in real-time. This
chapter describes how to solve the problem with numerical methods. The aim is
twofold. Firstly, the generated data will be used as reference for parameterized
solutions. Secondly, if a numerical solution is suciently fast, it may be possible to
use it in real-time as an alternative to a parameterized solution.

4.1 Optimization
Introduce the cost-function
U (x) =

)
1
1(
(x F (x))2 =
(x1 F1 (x))2 + (x2 F2 (x))2 .
2
2

(4.1)

If a solution to (3.12) exists, it is equivalent to the solution to the following optimization problem:
minimize
U (x)
2

(4.2)

xR

We also know when a solution is found, when U = 0.

4.1.1 Analysis of the optimization problem


Every parameter choice of a, b, c and d results in a unique cost-function U (x1 , x2 )
to minimize. Figure 4.1 shows a typical cost-function for a specic parameter set,
a = 0, b = 3, c = 8 and d = 0.5. The function is obviously not convex, but seems to
be quasiconvex. If a function is quasiconvex, it has a unique minimum value (Frenk
and Kassay 2001). U is not analytically proved to be quasiconvex for all choices of
parameters, but no exceptions have been found in this thesis work.
A few dierent optimization methods are presented. For this specic problem, the
Gauss-Newton method is the most successful one, but there are problems with convergence for some choices of parameters. A variation of x-point iteration was
implemented with slower but more consistent convergence to the solution.
The optimization terminates when
U 106 .

10

4.1 Optimization

11

Figure 4.1. The cost function U for the parameter set a = 0, b = 3, c = 8 and
d = 0.5. A numerical solution with the Gauss-Newton method is shown to the
right.

4.1.2 Descent algorithms


This is a large class of search algorithms consisting of a number of steps (Andreasson
et al. 2005).
1. Let k = 0. Choose a starting point x0 .
2. Choose a descent direction pk .
3. Choose a step length k , i.e. xk+1 = xk + k pk , such that U (xk+1 ) < U (xk ).
4. If a termination criterion is fullled, then stop. Otherwise, let k = k + 1 and
go to step 2.
For step 2, gradient descent, Newtons method and the Gauss-Newton method was
implemented to nd the descent direction pk . Among those, the Gauss-Newton
method performed the best.

Gradient descent
Gradient descent is probably the most intuitive of the descent methods. The search
direction is simply chosen to be the negative gradient of the cost objective function.
pk = U (x1 , x2 )

12

Chapter 4

Numerical Solutions

The gradient is known analytically, which is good, but the changing topology of U
makes gradient descent a bad choice with a very slow convergence.

Newtons method
Newtons method uses
pk = (2 U (x1 , x2 ))1 U (x1 , x2 )
The Hessian 2 U (x1 , x2 ) is known analytically just like the gradient. However, for
the specic problem dened in (4.2), the Gauss-Newton method is experimentally
proved to have faster convergence, so it is used instead.

Gauss-Newton method
The Gauss-Newton method uses an approximation of the Hessian on functions of
the quadratic form in (4.1). For reasons of simplicity, denote r1 (x) = x1 F1 (x)
and r2 (x) = x2 F2 (x). Let J be the Jacobian matrix dened by
[ dr1 dr1 ] [
]
df
df
(a + bx1 + cx2 )
c d
(a + bx1 + cx2 )
1 b d
dx1
dx2
J = dr2 dr2 =
.
df
df
bd d
(d(a + bx1 + cx2 )) 1 cd d
(d(a + bx1 + cx2 ))
dx1
dx2
2 U J T J, giving

pk = (J T J)1 U (x1 , x2 ) .

In practice, the descent direction pk is generated by solving the equation system


J T Jpk = U .

(4.3)

In the case when J T J is not positive denite, steepest descent is used. If the solution
is not found after 120 iterations, a modication to the descent direction is used. If a
solution is not found after another 300 iterations, xed-point iteration is performed
(section 4.2).
The initial point x0 = [0.1 , 0.1]T was used.
Modification by adding diagonal matrix
The objective function U has something similar to a canyon in the topology close
to the optimal point (Figure 4.1). For some parameter settings, the Gauss-Newton
method creates successive points that alternate between the sides, without nding
the low parts of the objective. If the termination criterion has not been fullled after
120 iterations, a factor is introduced and Equation (4.3) is modied according to

0.5k1 , U (xk1 ) U (xk2 )


200k1 , U (xk1 ) > U (xk2 )
k =
3
10
, k = 300

4.2 Fixed-point iteration

13

(J T J + Ik diag(J T J))pk = U .
This means that the diagonal elements in the J T J-matrix are enforced in each step
and decides the amount of enforcement. is increased if the objective function is
increased from one step to another and is decreased otherwise.
An intuitive explanation for the modication is to avoid steps in the direction where
the partial second derivative of the objective is large. The new iteration will tend
to follow the level curves.

Golden section search


The line search in step 3 is implemented with golden section search, a direct search
method that works for unimodal functions.(Andreasson et al. 2005) This holds if our
original multi-dimensional minimization problem is quasi-convex, which we assume
it is.
The method searches successively smaller intervals, where
the remaining proportion

51
of the original interval for evaluation in each step is 2 0.618.
The termination is based on a criterion on the step-size, see Press et al. (2007).
Figure 4.1 shows an example of the minimization problem for a specic parameter
set using Gauss-Newton for the descent direction pk and Golden section search for
the step-size k .

4.2 Fixed-point iteration


This method is experimentally proved to converge for all possible parameter sets,
even if it normally has a slow convergence. The idea is to simply iterate the implicit
equation by
xn+1 = (1 n )xn + n F (xn ) ,

(4.4)

where n is a lter parameter to prevent instability, F (x) is dened by (3.12). n


is updated in each iteration by
(
n =

3n
1
2nmax

)
0 ,

where the parameters were chosen to be 0 = 103 , nmax = 105 , x0 = [0.1, 0.1]T .

14

Chapter 4

Numerical Solutions

4.3 Analysis of the algorithms


The twofold aim of the numerical algorithms was introduced in the beginning of
this chapter. The rst aim was to generate the values of the solutions to Equation
(3.12), the second to nd a computationally cheap numerical algorithm to run in
real-time. This section is about the algorithms in terms of accuracy and ability to
nd the solution.
Gauss-Newton was run around 14 106 times for dierent parameter settings. It
succeeded to nd the solution in maximum 300 iterations in 99.88 % of the cases.
The resulting number of iterations in the case when a solution was found is shown
in Figure 4.2, and has a mean of 11.5 iterations.
6

x 10

1.8
1.6
1.4

Count

1.2
1
0.8
0.6
0.4
0.2
0

50

100

150
200
Number of iterations

250

300

Figure 4.2. Histogram of the number of iterations to run the Gauss-Newton


optimization algorithm. Mean is 11.5 iterations.
For the rouhgly 16 000 remaining parameter-settings, the xed-point algorithm was
used. The mean is arond 33103 iterations and maximum is around 67103 iterations.
The result is shown as a histogram in Figure 4.3.
Now to the question; is any of these algorithms good enough to run in real-time?
With a mean of more than 30 000 iterations, it is obvious that xed-point iteration is
not good enough. The Gauss-Newton algorithm is not so bad, though, with a mean
of 11.5 iterations. There is no sharp limit of how many iterations that can be carried
out in real-time, but since it usually takes more than 10 iterations, the solution is
considered not good enough. A faster and more accurate solution may be to use
o line generated solution values and nd an analytical function that approximates

4.3 Analysis of the algorithms

15

Figure 4.3. Histogram of the number of iterations to run the xed-point iteration
algorithm. Mean is 33 177 iterations. The reason for the low mean value is that
the spikes to the right are very narrow.
these solutions as accurately as possible.

5 PARAMETERIZED SOLUTIONS
To reduce the complexity of the parameterization, the function to parameterize is
dened as

g(a, b, c, d) = a + bx1 (a, b, c, d) + cx2 (a, b, c, d) ,

(5.1)

where x1 and x2 are solutions to (3.12) for specic choices of a, b, c and d. This
is acceptable since x1 and x2 are easily calculated by using Equations (3.10) and
(3.11).

5.1 Properties of the solution


The result of the numerical calculations is a large number of data-points, specifying
the value of g in those points. One suitable way to present the data is to lock
the values of a and d and plot the surface dened by g as a function of b and c.
Figure 5.1 shows the surface plots for some combinations of a and d (see Figure 5.2
for the corresponding level-curves). Notice that the level curves are straight lines,
which is possible to verify analytically:
Choose a x level g0 , and use Equations (3.10) and (3.11):
g0 = a + bx1 + cx2 = a + bf (g0 ) + cf (dg0 ) .
Rearrange to get
c=

f (g0 )
1
b+
(g0 a) , f (dg0 ) = 0
f (dg0 )
f (dg0 )

(5.2)

which shows the linear dependence between b and c for a x level g0 and constant a
and d. f (dg0 ) = 0 = g0 = 1/d for which the level-curves are straight lines along
the c-axis.

5.2 Limits of g
It is suitable to lock a = a0 and d = d0 to watch the behaviour of g as a function of
b and c. By using the implicit equations (3.10) and (3.11) together with the shape
of f some conclusions are drawn.
b = 0, c = 0:
g(a0 , 0, 0, d0 ) = a0 + 0 x1 + 0 x2 = a0
16

5.2 Limits of g

17

Figure 5.1. The function g as a function of b and c, locked for some values of a
and d. Note that g = a in every origo.
b , c = 0:
g(a0 , b, 0, d0 ) = a0 + bx1 = a0 + bf (a0 + bx1 )
Let = a0 + bx1 , leading to
= a0 + bf () .
Suppose there is a solution lim at the limit when b . So bf () lim a0 ,
b , implying that f () 0 and thus 1.

18

Chapter 5

d = 0.5

d=1

Parameterization

d=2

20

20

20

15

15

15

10

10

10

a=0

10
b

20

10

20

20

20

20

15

15

15

10

10

10

10

20

10

20

10

20

a=1

10

20

10

20

20

20

20

15

15

15

10

10

10

a=2

10

20

10

20

Figure 5.2. Level plots of g as a function of b and c, locked for some values
of a and d. The level curves are straight lines, which is analytically veried by
Equation (5.2).
b = 0, c :
g(a0 , 0, c, d0 ) = a0 + cx2 = a0 + cf (d0 (a0 + cx2 ))
Let = a0 + cx2 ,
= a0 + cf (d0 )
Using the same argument as above gives d0 1, c , concluding that 1/d0 .

5.3 Parameterization of the boundaries

19

b = c, b :
g(a0 , b, b, d0 ) = a0 + bx1 + bx2 = a0 + bf (a0 + bx1 + bx1 ) + bf (d0 (a0 + bx1 + cx2 ))
Let = a0 + bx1 + bx2 to get
= a0 + b(f () + f (d0 ))
( )
As b , f () + f (d0 ) 0. Using Equation (3.5), f () f (d0 ) = f d10 .
For c 1/c , f is monotonic, leading
to the conclusion thatthe arguments
are identical: 1/(d0 ), so 1/ d0 . Since > 0, 1/ d0 as b .
Other solutions may exist in the region { : < c or > 1/c }. Examine both
possibilities, rst f () = f (1/(d0 )) = 1 = d0 < c and 1/(d0 ) < c , so
d0 > 1/(c ) > 1/c2 > 2, which is the largest value we allow for d0 . In the same
way, examine the possibility for f () = f (1/(d0 )) = 1 = d0 < c2 < 0.5, which
is the lowest possible value for d0 .
The limits are concluded for the xed values a0 and d0 :
g = a0 , b = 0, c = 0
g 1, b , c = 0
g 1/d0 , b = 0, c

g 1/ d0 , b = c, b
Those limits are important help when the task is to nd a parameterized solution.
Only solutions that behave correctly in the limits need to be taken into consideration.

5.3 Parameterization of the boundaries


Given a choice of a and d, the boundaries of g are the points on the b-axis and the
c-axis. For choked ows, the ow is known, and f is either -1 or plus 1. Let us now
examine each axis separately.

5.3.1 Parameterization of ow only through the intake-throttle


Since
c=

ts RT fmax,egr
V Pegr

there will be no ow through the EGR-throttle if c = 0. Given that c = 0, there is


a known parameterization. The suggested parameterization is consistent with the

20

Chapter 5

Parameterization

limits discussed in Section 5.2:

gin = g(a, b, c, d)|c=0 =


1
p b
1
(1 a)2e 3 , a 1
p
2
1 + p1 b
1
2ep3 b
1+
(a

1)
, a>1
p
1 + p1 b 2
A simple analysis for the choked ows gives the following conditions on g:

gin = g(a, b, c, d)|c=0 =


a + b , a + b c
a b , a b 1c
The parameters p1 , p2 and p3 are optimized based on minimizing the relative error
of the objective function, since it is very connected to the maximum error of the
pressure in the manifold. Using fminsearch in Matlab for optimizing the parameters
p1 , p2 and p3 with respect to minimum of the relative error gives p1 = 3.755, p2 =
1.851 and p3 = 2.399. The resulting maximum relative error is 2.2 %. See Figure
5.3, where gin is plotted together with the reference points for some dierent values
of a.

2
a=2

1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0

a=0

10
b

12

14

16

18

20

Figure 5.3. The optimized gin (solid line) for a = 0, 0.5, 1, 1.5, and 2 together
with corresponding reference points (dashed line).

5.4 Parameterization of the ow through the intake- and EGR-throttles

21

5.3.2 Parameterization of ow only through the EGR-throttle


Assume that g behaves similarily on the c-axis. Using the knowledge of the limits
for b = 0 a proposal for parameterization is
gegr = g(a, b, c, d)|b=0 =
(
)2ep6 c
1
1
1

a
, a
d 1 p4 cp5 d
(
)2ep6 c
1
1
1
a
+
, a>
d 1 + p4 cp5
d

1
d

1
d

and the conditions for choked ows are in a similar way


gegr = g(a, b, c, d)|b=0 =
a + c , a + c dc
a c , a c 1c d
As it turns out, it does not work very well (maximum error of 12%). That is because
the function does not t well in connection with the choked ows. As an attempt
to adapt to the choked regions, the variables are biased according to the following
condition to make the function smooth with respect to the conditions for choked
ows:
{
max(c /d a, 0) ,
a 1/d
c0 =
max(a 1/(c d), 0) , a 1/d
and

{
g0 =

max(c /d, a) , a 1/d


min( 1c d , a) ,
a 1/d

c is then substituted by c c0 and a is substituted by g0 . An optimization results


in a maximum error of 7.2% with the parameter settings p4 = 2.546, p5 = 1.628 and
p6 = 3.918. Figure 5.4 shows the function for some dierent parameter values.

5.4 Parameterization of the ow through the intakeand EGR-throttles


The idea is to connect the boundaries in a way that gives an approximation of g for
all possible parameter combinations, meaning that there is ow through both the
intake- and the EGR-throttle simultaneously. One idea is to do a weighted mean of
the function values on the boundaries.

22

Chapter 5

Parameterization

a=2
2
d = 0.5
1.5

a = 0.5

0.5

10
c

12

14

16

18

20

2
a=2
d=2
1.5

0.5
a = 0.5
0

10
c

12

14

16

18

20

Figure 5.4.
The optimized gegr (solid line) for d = 0.5 and 2 in two different plots together with corresponding reference points (dotted line). a =
0, 0.5, 1, 1.5, and 2 in each plot.

5.4.1 Weighted mean of the boundaries


Suppose that at least one of b and c are non-zero. Then the function g is
gbound (a, b, c, d) =

b gin (a, b, c, d) + c gegr (a, b, c, d)


,
b+c

(5.3)

where gin and gbound are dened in Section 5.3. Testing on all reference points results
in a maximal error of 43.5% and a mean error of 5.55%. The distribution of the
error is shown in Figure 5.5.

5.4 Parameterization of the ow through the intake- and EGR-throttles

23

x 10

count

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

erel

Figure 5.5. The distribution of the relative error for gbound . Maximum error is
43.5% and mean error is 5.55%.

6 SIMULATION AND PARAMETERIZATION


None of the proposed methods;
Numerical algorithm running in real-time
Parameterized function
works very well. Another alternative might be to simulate the pressure in real-time,
using the measured states of earlier time-samples. This method is used by some
already existing commercial softwares on the market. The problem is that current
solutions do not handle the situation around = 1 well, where another strategy has
to be implemented.
Since methods based on simulation are already in use, a possible algorithm will be
discussed only briey. Focus will be on the sensitive areas, more specically when
at least one of the pressure ratios around the nozzles are between 0.95 and 1/0.95.
In those areas, a function approximation directly on f will be used. In the case
when both pressure coecients are close to 1, the parameterization of f is dicult
to apply, and a parameterized solution based on the boundaries will be used.
We will also reduce the problem according to the fact that back-ow is never allowed
in the intake-throttle. That means that P/Pin is never larger than 1.

6.1 Pressure simulation


Assume that the pressure ratios P/Pin and P/Pegr are far from 1. The pressure in
the manifold is then simulated using Equation (3.9):
P (n) = P (n1) + ts

RT
(m
in + m
egr m
e) .
V

The ows m
in , m
egr and m
e must therefore be simulated as well. To do this correctly,
we need to model not only the parts described in this thesis, but parts in the cylinder
and exhaust system as well. Since this is outside the scope of this study, no details
will be presented. It is worth mentioning, though, that this is a known problem and
that there are solutions implemented in commercial software.
In each sample the pressure ratios are estimated to be able to detect if a pressure
ratio for one of the nozzles approaches 1. If so, the corresponding ow in (3.9) has
to be calculated more carefully. At rst, we assume that only one of the ratios is
close to 1, say P/Pin , while P/Pegr is in a region where simulation is possible.
24

6.2 Parameterization of f

25

6.2 Parameterization of f
Recall the denition of f (), see Equation (3.5). Let
= 1.4. Then, for 0.95 < 1
the function behaves very much like the function k 1 . Extending to negative
ow as well, gives
{
1
k
f () f() =
k 1

, 0.95 < 1
1

(6.1)

, 1 < < 1/0.95

Optimizing according to mean-squared regression leads to k = 2.0278, with a maximum relative error of 1.8%. Figure 6.1 shows f and f in the specic interval.

0.5
f^
f

0.4
0.3
0.2
0.1
0
0.1
0.2
0.3
0.4
0.5
0.95

0.96

0.97

0.98

0.99

1.01

1.02

1.03

1.04

1.05

Figure 6.1. The function f , see Equation (3.5), and f, see (6.1), in the interval
0.95 < < 1/0.95.

6.3 Simulation combined with parameterization of f


Let 0.95 < P/Pin 1 and P/Pegr be far from 1. x2 is then possible to simulate. The
parameterization of f from (6.1) is used to obtain the equation
x1 = f (a + bx1 + cx2 ) = k

1 (a + bx1 + cx2 ) .

Collect terms to get a second-order polynomial equation in x1 :


x21 + bk 2 x1 + k 2 (cx2 + a 1) = 0 .

26

Chapter 6

The solutions are then


bk 2
x1 =

Simulation and Parameterization

b2 k 4
k 2 (cx2 + a 1) .
4

The ow m
in is assumed to be positive, and so must x1 be according to (3.7), so
the positive solution must be chosen. If, for simplicity, x2 is supposed to be correct
by simulation, the relative error in pressure is maximum 0.10% and has a mean of
0.020%.
Now, let P/Pin be far from 1, and thus x1 is simulated. Assume instead that
0.95 < P/Pegr 1. A similar analysis shows that

cdk 2
c 2 d2 k 4
x2 =
+
k 2 (bdx1 + ad 1) .
2
4
A slightly more complicated case is when there is a ow backwards through the
EGR, meaning that 1 < P/Pegr < 1/0.95. Continue to assume that P/Pin < 0.95.
Our polynomial equation will then be one degree higher:
cdx32 + (ad + bdx1 )x22 cdk 2 x2 + k 2 (1 ad bdx1 ) = 0 .
Polynomial identication gives
Q1 = cd , Q2 = ad + bdx1 , Q3 = cdk 2 , Q4 = k 2 (1 ad bdx1 ) .
The three solutions to the cubic equations are known (Weisstein 2011). Let Q1 =
cd = 0 and
S1 = 2Q32 9Q1 Q2 Q3 + 27Q21 Q4
S2 = S12 4(Q22 3Q1 Q3 )3
The possible solutions are then
1
1
( (
( (
)) 3
)) 3
Q2
1
1
1
1
(1)
x2 =

S1 + S2

S1 S2
(6.2)
3Q1 3Q1 2
3Q1 2
(

1
1
)) 3 1 i 3 ( 1 (
)) 3
1+i 3 1(
Q2
(2)
+
S1 + S2

S1 S2 (6.3)
x2 =
3Q1
6Q1
2
6Q1
2
(

1
1
)) 3 1 + i 3 ( 1 (
)) 3
Q2
1i 3 1(
(3)
x2 =
+
S1 + S2
S1 S2 (6.4)

3Q1
6Q1
2
6Q1
2
To know which solution to choose, compare with the solutions calculated by the
numerical algorithms in Chapter 4. Figure 6.2 contains the error with respect to
the reference values. Evidently, (6.4) is the solution to our problem. The maximum
relative error is 0.67% and the mean error is very small, 0.016%.
Now examine the case when Q1 = cd = 0, meaning c = 0 or d = 0. c and d
represent physical properties that in practice never are zero. We may also note that
we consider the case where 1 < d < 1/0.95, so d is never close to zero.

6.4 Parameterization for small pressure dierences

27

1500
1000
500
0

0.5

1.5

2.5

|x(1)
xref
|
2
2
6000
4000
2000
0

10

|x(2)
xref
|
2
2
4

count

x 10

0.5

1.5

2.5

|x(3)
xref
|
2
2

3
3

x 10

(3)

Figure 6.2. Errors for the three possible solutions of the cubic equation. x2 is
obviously the solution.

6.4 Parameterization for small pressure dierences


When both pressure ratios are close to 1, the simplication with f is not enough to
solve the problem analytically. Then a parameterization is used, as was discussed
in chapter 5.
We are now limited to the region where
0.95 < P/Pin 1 and 0.95 < P/Pegr < 1/0.95 .
It turns out that only a small part of the generated reference points satisfy the
condition. Especially, the values of d only take values very close to 1, why the
stepsize between the reference points is decreased to 0.2 in d.

6.4.1 Parameterization outgoing from the boundaries


gbound dened by (5.3) is used in this region, optimized with the result of a new
parameter-setting: p1 = 2.949, p2 = 1.984, p3 = 1.190, p4 = 3.089, p5 = 1.806 and
p6 = 1.192. The maximum error in this region is 3.2%, and the mean error is 1.1%
(see Figure 6.3).

28

Chapter 6

Simulation and Parameterization

400
350
300

count

250
200
150
100
50
0

0.005

0.01

0.015

0.02

0.025

0.03

0.035

erel

Figure 6.3. The distribution of the error of gbound in the region where 0.95 <
P/Pin 1 and 0.95 < P/Peqr < 1/0.95.

6.4.2 Parameterization according to level-curves


Equation (5.2) describes the equation for the level-curves in the bc-plots:
c=

f (g0 )
1
b+
(g0 a) , f (dg0 ) = 0
f (dg0 )
f (dg0 )

The idea behind this parameterization is to include the information about the levelcurves to get an alternative approximation of g. Given values of a, b, c, and d, the
idea is as follows:
Calculate the slope in the b c-plot (see Figure 5.2).
Get the level g by
=

f (g)
.
f (dg)

Getting the -value out of a, b, c and d is the tricky part. Actually, making it
correct means that our problem is solved in general. The easiest approximation is
to assume that all level-curves go through a common point [b0 , c0 ]T . Then,
=

c c0
.
b b0

One idea is to use the origin, but in order to avoid numerical problems arising when
dividing by zero our choice is b0 = c0 = 102 . We have that
=

f (g)
> 0,
f (dg)

6.5 Real-time determination of region

29

and together with the approximation of f dened by (6.1):

1g
=
1 .
1 dg
Note that a result of the approximation above is that we have to assume back-ow
in the EGR, which is not always true. Solve for g and choose the positive solution,

2 1
(2 1)2 2
glevel =
+
+
.
(6.5)
2
4
d

6.4.3 Combination of gbound and glevel


The solution glevel is in general bad, but used in combination with gbound , it turns
out to decrease the error a lot. On the boundaries, gbound is superior compared to
glevel , but in the interior, glevel does help. Let gcomb be a combined solution dened
by
gcomb = plevel glevel + (1 plevel ) gbound ,
(6.6)
where plevel is a ratio determining how much we trust in glevel , dened by

(
)
ln 1 + b2 + c2
.
plevel =
ln (p7 )
Here, p7 is a trust radius, and should be adjusted to achieve the best t.
Optimizing gcomb results in a new set of parameters p1 - p7 : p1 = 3.450, p2 = 1.221,
p3 = 0.1639, p4 = 5.913, p5 = 1.446, p6 = 2.532 and p7 = 76.94. The maximum
relative error of gcomb is 2.51% and mean error is 0.69%, which is a noticeable
improvement. The distribution of the error is shown in Figure 6.4.

6.5 Real-time determination of region


In the proposed solution, the pressure is estimated dierently depending on the value
of the ratios P/Pin and P/Pegr . It is crucial that the algorithm running in real-time
has the ability to detect when a region is changed.

30

Chapter 6

Simulation and Parameterization

800
700
600

count

500
400
300
200
100
0

0.005

0.01

0.015
erel

0.02

0.025

0.03

Figure 6.4. The distribution of the error of gcomb in the region where 0.95 <
P/Pin 1 and 0.95 < P/Peqr < 1/0.95.

7 DISCUSSION
The results in this thesis work are compared to an ideal reality, that is the result
given by the basic equations of ows and pressures. Even if the model and the
reference perfectly agree, a comparison to reality may display a dierence.
In all proposed models, the integration method used is backward Euler, which is
known to cause stability issues in some conditions. Another integration method
will, if the methods of this work are used, probably result in algebraic equations
that are more dicult to solve than the equations resulting from Euler integration.
An interesting approach for a future work is to design a nonlinear observer.
In this work, no details about the simulations have been examined. Simulations
involve the cylinder parts, the exhaust system and possibly a turbocompressor or
heat-exchangers. These simulations may have other complications apart from the
manifold, aecting the ows and the pressures. This has not been taken into account, and in the error calculations the simulation parts are assumed to result in
theoretically correct values.
Concerning the control, is model-based control really necessary, or may other approaches be suitable as well? In Amstutz and Del Re (1995), a linear sensor-based
control method is implemented. One conclusion in the article is that for transient
operations, feedforward controllers tend to yield better results if the plant-model
mismatch is small. Sensors are not fast enough to catch the fast nonlinear dynamics
of the system. So a good model matters.

31

8 CONCLUSION
The goal of this thesis work was to design a model or an algorithm for real-time
estimation of the pressure P in the intake manifold in diesel engines. The pressure
Pin just before the intake-throttle and the pressure Pegr just before the EGR-throttle
are assumed to be known.
Two approaches to fulll that goal have been presented; numerical methods and
parameterization methods.
The numerical methods are designed using dierent techniques. The most successful
method implemented is the Gauss-Newton method for optimization (with a few
modications), which succeeded in 99.9% of the cases tried with a mean of 11.5
iterations. In 88% of the cases, the algorithm used less than 15 iterations. Even
15 iterations are, however, probably too many to run in real-time. The real trouble
is that the nonlinear dynamics makes the solutions very sensitive to small changes
in pressure. The character of the problem is such that it is dicult to design a
numerical method that is guaranteed to converge to a solution in nite time. For
future work, other optimization methods may be tried, for example direct search
methods. The challenge with direct search methods is to try to limit the computation
time, which may be hard. It is also dicult to formally verify the behaviour of such
methods.
Among the parameterizations, none of the proposed solutions is good enough for all
possible conditions. Limited to dierent pressure regions, dierent methods succeed
relatively well, however. The problem is to determine in which region the engine
is operating. Table 8.1 shows the proposed solutions and in which regions they
work. The table also shows that the solution gbound based on parameterization of
the boundaries for the whole denition set does not succeed.
Table 8.1. Summary of the results for the proposed parameterized solutions.
erel,mean and erel,max refer to the absolute relative error in the resulting pressure P
of the intake manifold.
Function
gbound
f
f
f
gcomb

P/Pin
free
(0.95,1]
0.95
0.95
(0.95,1]

P/Pegr
free
0.95 and 1/0.95
(0.95,1]
(1,1/0.95)
(0.95,1/0.95)

erel,mean
5.55%
0.020%
0.0074%
0.019%
0.69%

erel,max
43.5%
0.10%
0.082%
0.10%
2.51%

The overall conclusion is that no general function or algorithm has been found that
satises the conditions on accuracy and complexity. If divided into sub-regions of the
pressure-ratios, the relative error is small. Further investigations have to be made
to nd a solution that could be implemented in real-time with good performance.
32

33

Hopefully, some of these conclusions may serve as inpiration and help for future
work, aiming to nd a method that works in real-time.

34

Chapter 8

Conclusion

Bibliography
Amstutz, A. and Del Re, L. R. (1995). Ego sensor based robust output control of
egr in diesel engines. IEEE Transactions on Control Systems Technology, vol.
3, no. 1.
Andreasson, N., Evgrafov, A. and Patriksson, M. (2005). An Introduction to Continuous Optimization. Studentlitteratur. Lund.
Frenk, J. B. G. and Kassay, G. (2001). Introduction to convex and quasiconvex
analysis. Econometric Institute Report.
Guzzella, L. and Onder, C. H. (2010). Introduction to Modeling and Control of
Internal Combustion Engine Systems. Springer-Verlag. Berlin.
Heywood, J. B. (1988). Internal Combustion Engine Fundamentals. McGraw-Hill.
Publisher. USA.
Press, W. H., Teukolsky, S. A., Vetterling, W. T. and Flannery, B. P. (2007). Numerical Recipes: The Art of Scientific Computing, pp. 492-496. Cambridge
University Press. New York.
Weisstein, E. W. (2011). Cubic formula. http://mathworld.wolfram.com/CubicFormula.html.

35

36

BIBLIOGRAPHY

You might also like