Nonlinear EGR Valve Control
By
Nicholas P. Teske
B.S. (University of New Mexico, Albuquerque) 2002
A report submitted in partial satisfaction of the Requirements for the degree of
Masters of Science, Plan II in Mechanical Engineering at the University of California at Berkeley
Committee in Charge:
Professor J. Karl Hedrick, Chairman Professor Pravin Varaiya
Fall 2003
2
To Sidnee
3
Abstract
Nonlinear EGR Valve Control
by
Nicholas P. Teske
Masters of Science in Mechanical Engineering, Controls
University of California, Berkeley
Professor J. Karl Hedrick, Chair
The
main
function
of
an
exhaust
gas
recirculation
(EGR)
valve
is
to
allow
post
combustion gases to reenter the intake air stream and influence the combustion process.
By doing this, engineers have achieved reduced emissions and increased fuel economy.
There are three main types of EGR valves: pressure differential valves, solenoid driven
valves and variableposition electronic valves.
project.
The latter of the three is the basis of this
Several types of controllers are derived and their performances are compared.
The three
main controllers derived are a PID controller, an Input/State Linearization controller and
a Sliding Mode controller.
Also, an Adaptive Sliding Mode controller is derived for
unknown
parameter
estimation.
Both
Observer are derived and compared.
a
Luenberger
Observer
and
a
Sliding
Mode
After the full controller/observer combination is
designed, it is then converted to C code and run on an external processor.
This is done to
verify the ability of the controller/observer in a hardware setup.
4
Acknowledgements

Professor J. Karl Hedrick, my advisor and professor, for providing the knowledge to 

study the topic of nonlinear control. 
I would also like to thank him for providing the 

funding required to attend such an incredible University. 


Daniel M. Lamberson, my research partner, for everything ranging from help with 

homework to career advice. Good luck as a dad! 


Carlos Zavala for all his help with the hardware in the loop experiment. 


Paul, 
Yvonne 
and 
Lauren 
Teske, 
for 
their 
unconditional 
support 
and 
guidance 
throughout this experience.
5
Contents
Acknowledgements 
5 
List of Tables 
9 
1 Introduction 
10 
1.1 Background 
10 
1.2 Motivation 
11 
1.3 Organization 
12 
2 EGR Valve Model
13
2.1 Introduction 
13 
2.2 Plant 
13 
2.3 System Equations 
14 
2.4 System Nonlinearity 
15 
2.5 Model Uncertainty 
17 
3 Controllers
18
3.1 Introduction 
18 

3.2 PI and PID Control 
19 

3.2.1 System Linearization 
19 

3.2.2 Application of the PID Controller 
20 

3.3 
Input/State Linearization 
21 
3.3.1 Input/State Linearization Controller Design 
21 

3.3.2 Application of Input/State Linearization Controller 
22 

3.4 
Sliding Mode Control 
24 
3.4.1 Sliding Mode Controller Design 
24 

3.4.2 Application of the Sliding Mode Controller 
25 

3.5 
Adaptive Sliding Mode Control 
27 
3.5.1 Adaptive Sliding Mode Controller Design 
28 

3.5.2 Application of the Adaptive Sliding Mode Controller 
29 

3.5.3 Persistency of Excitation Requirement 
31 

3.6 
Conclusion 
32 
4 State Estimation
33
4.1 Introduction 
33 
4.2 Luenberger Observer 
34 
6
4.2.1
Accessibility
34
4.2.2 
Observability 
35 
4.2.3 
Observer Pole Placement 
35 
4.2.4 
Application of the Luenberger Observer 
38 
4.2.4 
Model Uncertainty 
39 
4.3 Sliding Observer 
41 

4.3.1 Observer Design 
42 

4.3.2 Model Uncertainty 
42 

4.3.3 Application of the Sliding Observer 
43 

4.4 
Conclusion 
44 
5 HardwareInTheLoop
46
5.1 Introduction 
46 
5.2 HardwareInTheLoop Setup 
46 
5.3 Controller Code Generation 
47 
5.4 HardwareInTheLoop Simulation 
48 
5.5 HardwareInTheLoop Results 
51 
5.6 Conclusion 
54 
6 Conclusion 
55 
7 Appendices 
57 
Appendix A.) Parameter values used in EGR model 
57 
Appendix B.) Controller/Observer Performance Comparison 
58 
Appendix C.) Simulink Model of System and Controllers 
59 
Appendix D.) Simulink Model Used In the HWIL Setup 
60 
8
References
7
61
List of Figures
Figure 1.) Plant diagram with simplified model 
14 
Figure 2.) Magnetic flux (lambda) in Webers 
16 
Figure 3.) The effect of coil resistance on openloop performance 
17 
Figure 4.) PI control vs. PID control 
20 
Figure 5.) I/S Linearization with an accurate and inaccurate coil resistance 
23 
Figure 6.) Effects of modeling error with a 50% bounded coil resistance parameter 
26 
Figure 7.) The effect on the system input of coil resistance parameter uncertainty 
27 
Figure 8.) Adaptation law converges to 20.5 O, the value of the actual plant 
30 
Figure 9.) Adaptation law does not converge without constant system excitation 
31 
Figure 10.) Estimated states converge to the actual states of the 
37 
Figure 11.) Results with a perfect observer and controller model 
38 
Figure 11.) Loss of parameter convergence due to small model error 
40 
Figure 12.) Model error in observer and controller 
41 
Figure 13.) State variables converge regardless of model error 
43 
Figure 14.) State convergence and acceptable control regardless of model error 
44 
Figure 15.) HardwareIn TheLoop setup 
47 
Figure 16.) Simulink schematic of simulated PWM 
48 
Figure 17.) The intersection of the lines indicates when the voltage is shut off 
49 
Figure 18.) Simulated system performance with PWM 
50 
Figure 19.) Problems with the implementation of the PWM controller 
52 
Figure 20.) 5mm step input with controller running on 
53 
8
List of Tables
Table 1.) System initial conditions 
16 
Table 2.) Model parameter values 
57 
Table 3.) Controller/Observer performance comparison 
58 
9
1 Introduction
1.1 Background
Exhaust
gas
recirculation
(EGR)
systems
have
long
been
used
in
diesel
applications.
They allow post combustion exhaust to reenter the intake stream and mix with the fresh
air/fuel mixture.
The effect is reduced NO _{x} levels by the reduction of overall combustion
temperatures. 
Recently EGR 
has 
been 
applied 
to gasoline engines 
for 
the primary 

purpose 
of 
reducing fuel consumption 
in 
partial 
throttle ranges, 
and 
secondarily, 
in 
reducing the level of NO _{x} produced [5].
EGR requires precise valve control over a wide range of engine operating conditions
combined with reliable operation and maintained tolerances over the life of the vehicle.
As government emission and fuel consumption requirements grow tighter and tighter the
need for higher tolerance EGR valve control arises.
The modern openloop controllers
for 
gasoline 
engine 
EGR 
valves 
will 
soon 
become 
obsolete. 
With 
this precision 

requirement 
the 
need 
for 
closedloop control arises. 
The 
basis 
of 
this 
thesis 
is 
the 
10
exploration
and
application
tolerance EGR valve control.
1.2 Motivation
of
different
control
theories,
all
with
the
goal
of
high
One style of EGR valve that was popular in the past was the pressure differential valve.
It consisted of a diaphragm that would flex due to a pressure difference across it.
The
vacuum source was typically the intake manifold.
This flex would raise and lower a
valve allowing exhaust in the intake manifold.
fairly
well,
over
time
its
performance
would
from the valve and therefore the vehicle.
While the diaphragm could be tuned
degrade
causing
unwanted
performance
One solution to this problem, introduced with the advent of the computer controlled fuel
injection system, used the same diaphragm valve but in a different manner.
A separate
computer controlled valve would regulate the amount of vacuum supplied to one side of
the diaphragm, in effect controlling the valve.
mass produced vehicles to this day.
This setup is still commonly used in many
One issue with this setup is the fact that the computer is not supplied with position data
from the valve.
It simply supplies a specified vacuum and monitors the airtofuel ratio.
The approach taken in this study is the application of an electronic actuator.
By using a
valve position sensor, the computer will then have exact information on the position of
the EGR valve and will be able to control more closely the effect of EGR on the engine.
11
1.3 Organization
Chapter 2 discusses the 3 ^{r}^{d} order plant dynamics and the nonlinearity associated with the
actuator windings.
Chapter 3 compares the performances of several types of controllers.
The controllers
discussed in this thesis are a PI/PID controller, an Input/State Linearization controller and
a Sliding Mode Controller.
Each controller is used to actuate the valve in the same
manner and the performances are compared.
Chapter 3 also investigates the application
of an adaptive controller to account for error in the resistance value of the nonlinear
controller
model.
Very
little
change
in
resistance
causes
large
changes in the plant
dynamics, making it very important to know the exact value of the winding’s resistance.
Chapter 4 looks at the application of two different types of observers: a Luenberger
Observer and a Sliding Observer. The two observer’s performances are compared.
Chapter 5 studies the effect of the controller in a hardware in the loop scenario.
The
controller and observer that were derived in chapters 3 and 4 will be compiled to C code
and run on an external processor.
MATLAB will be used to run a simulation of the valve
that will be controlled by this external processor. Issues and results will be discussed.
12
2 EGR Valve Model
2.1 Introduction
An accurate model is necessary for both the nonlinear controllers and also both the
observers discussed later in this thesis.
This chapter discusses the plant, the system
equations and the nonlinearities of the system.
Also discussed are the effects of small
model changes and the large effects they can have on the system, reinforcing the need for
an accurate model.
2.2 Plant
The valve consists of a simple electric solenoid with a resistive and inductive element.
Figure 1 shows the plant schematic and the simplified model used for analysis:
13
Figure 1.) Plant diagram with simplified model
A voltage (V) is placed across the coil and current (i) is developed in its windings. This
current creates a magnetic field that causes the plunger to rise into the gap, compressing
the spring. The plunger’s motion is a function of the downward force created by the
compressed spring and any upward force from the magnetic field.
2.3 System Equations
The following differential equations [1] describe the EGR valve model in Figure 1.
14
dv
dt
=
È
Í
Î
di
dt
dl
d
x
=
È
Í
Î
i

V

Kx
^{d}^{x} =
dt

mg
v

F
f
sgn(
v
)
˘
˙
˚
Ri

dl
d x ˘
1
˙
d x d t
˚
L +
dl
d i
y = x
1
m
(1.)
(2.)
(3.)
(4.)
Conveniently, the variable to be controlled (position) is directly measurable from the
position sensor.
This makes the application of a linear controller fairly easy, but the lack
of
remaining state information makes the application of a nonlinear controller a little
more involved. This will be further discussed in Chapters 3 and 4.
See reference Table 2 in Appendix A for a complete list of parameters and their values.
The parameters were based on models discussed in [2] and [3].
2.4 System Nonlinearity
The magnetic flux (lambda) term is a nonlinear function of current and position and is
given by:
l =
dl
d
dl
x
d
i
(

87.5i
2
= 
87.5
i
+
105i)x
2
+
105
i
=
( i
175 +105
)x
15
(5.)
(6.)
(7.)
This
nonlinearity
emerges
from
two
different
sources.
First
is
the
basic
relationship
between current in the windings and magnetic flux.
The second source of nonlinearity is
from the nonuniform medium in the middle of the coils.
That is, the
further out the
plunger is the more air (and less steel) is in the center of the windings.
Figure 2 is
a
surface plot of the magnetic flux curve used in this analysis.
Figure 2.) Magnetic flux (lambda) in Webers
When x is at 10mm the plunger is fully plunged and the entire medium within the coils is
steel.
Lambda, for this system, was approximated with methods discussed in [1].
1 shows the initial conditions used for this analysis.
Table 1.) System initial conditions.
Table
State 
Initial Value 

Depth of plunger (x) 
0 
[m] 
Velocity of plunger (v) 
0 
[m/s] 
Current in coils (i) 
0.101 [amps] 
16
This puts the EGR valve closed with the spring at its freelength and the coil holding
simply the weight of the plunger.
plant dynamics.
2.5 Model Uncertainty
See Appendix C for the Simulink schematic of the
In order to demonstrate the robustness of the following nonlinear control methods the
parameter R (coil resistance) was chosen to be uncertain.
R, in reality, would probably
be known with some confidence but in the interest of discussion the plant value will be
assumed different than our controller value.
Another reason it is important to be robust
with respect to variations in R is because very little change in R causes large changes in
plant behavior.
Figure 3 represents the difference in openloop response with the coil
resistance set at two different values.
Figure 3.) The effect of coil resistance on openloop performance
As shown, with approximately 15% increase in coil resistance the plunger has moved
2mm less than with the lower resistance.
17
3 Controllers
3.1 Introduction
As stated in the introduction the need for feedback control of the EGR valve will soon
become necessary due to the ever tightening government regulations on emissions and
fuel consumption.
Openloop control meets these current standards, but will soon be
obsolete.
The following section explores a linear controller (PID) and two nonlinear
controllers as a solution to the growing needs of EGR valve control.
In an effort to quantitatively compare the following controllers an error was defined as
follows:
E
1000 * (
x

x
d
)
2
(8.)
This error was evaluated for 100ms at a constant period of 10µs once the system had
reached steady state.
Also, the error was calculated over the same trajectory for all the
controllers; a 7Hz sine wave with 4.5mm bias.
This trajectory represents the fastest
18
response possible from the valve due to physical constraints.
This error definition will let
the performance of the different controllers be compared on the same basis and identify
which controller is actually performing the best.
comparison of all the following controllers.
Refer to Appendix B for a complete
3.2 PI and PID Control
3.2.1 System Linearization
To begin, a PI controller was derived for the system.
The main application of a PI
controller is to a linear system.
A Jacobian Linearization can be performed about an
operating point, but for our application this may be unusable.
We are interested in the
full 
range 
of 
motion 
of 
the 
valve, 
not 
just 
small 
motion 
about 
an operating 
point. 
Regardless, 
a 
Jacobian Linearization 
was 
performed 
around 
the 
following equilibrium 

point. 
x = 0.0045 [m], v = 0 [m/s], i = 0.281 [A] and V = 5.78 [V]
This linearization yielded the following system matrix.
A =
È
12000
Í
Í 5055.08
Í
0
Î


1
0
89.75
0
˘
˙
˙
152.76 ˙
˚
383.34

The real parts of the eigenvalues of this A matrix are all negative, indicating that the
system is stable at this operating point.
Using this linearization the closed loop poles can
be placed based on the desired performance.
19
3.2.2 Application of the PID Controller
After 
the 
PI 
controller 
was 
designed 
and 
implemented 
it 
was 
found 
that 
the 
linear 
controller was not able to control the nonlinear system to the desired performance. 
The 
nonlinearities of the system overpowered the ability of the PI controller away from the
operating point.
To address this problem derivative control was added.
The derivative
term causes the controller to increase control effort initially, reducing the error more
quickly than with just the proportional and integral terms.
adding derivative control.
Figure 4 shows the effect of
Figure 4.) PI control vs. PID control
As shown, the PID controller controlled fairly well.
for the PID control was 10.6.
The error as defined by equation (8)
20
The only problem with PID control is that the derivative term can be very hard to deal
with.
When differentiating a sensor output any noise in the signal is amplified.
For this
system a perfect sensor was assumed.
Also, with the small error signals, large gains were
needed to attain the necessary actuation.
These large gains will also amplify any noise
from the position sensor.
nonlinear controllers.
The two preceding issues were significant enough to consider
3.3 Input/State Linearization
The next methodology used to derive a controller was Input/Output Linearization.
The
object of I/O Linearization is to use the control input to cancel out the nonlinearities of
the system and then control the system with a synthetic input to achieve the desired
output.
3.3.1 Input/State Linearization Controller Design
The following are the first three derivatives of the output, x, which yield the input (V) in
the third derivative.
&&& y =

K
m
v
+
(

y = x
y& = x& = v
Ê Á 
dl 
i 
Kx 
F f 
sgn( 
ˆ )˜ 
1 

 
 mg 
 
v 

Ë 
d 
x 
¯ 
m 

3 
+ 
105 
i 
2 
 
Kx 
 
 
F 
sgn( 
) 
) 
1 

mg 
f 
v 

 
) 
Ê Á ˜ Á V Ê 1 ˆ 
 
Ri 
 
dl 
d x ˆ ˜ 
1 
 
m 1 
d 
( 
F f 
sgn( 
v 
) 
) 

Ë m ¯ Ë 
d x d t 
¯ L + 
dl 
m 
d 
t 

d 
i 

21 
=
i
&& y
=
(
&& = 
y
2 +
v &
87.5
210
i
262
i
(9.)
(10.)
(11.)
(12.)
= u
(13.)
Since the system is a thirdorder system with a relative degree of three, Input/State and
Input/Output
Linearization
are
essentially
the
same
analyses
[6].
Typically
I/S
Linearization is not ideal for tracking control because the output is chosen to make the
system a desired relative degree [6].
For this system it was convenient that the ideal
output happened to be the parameter of interest. This is not always the case.
The
following
equations
feedback), respectively.
represent
the
input,
V,
and
K 
d 
( F 
f 
sgn( v 
) ) 

u + 
v 
+ 

m 
d 
t 
+ 
Ri 
 

ab 
1 

a = 
( 
 
262 
i 
2 
+ 
210 ) i 

m 

b = 
1 

L  
(175 i  
105) 
x 

1 
(z 
1 
 x 
d 
)  K 
2 
(z 2 
 x& 
d 
)  K 3 
(87.5
(z
3
V =
u = K
the
synthetic
i
2

105 )
i v
 x&& ) +&x&&
d
d
input,
u
(state
(14.)
(15.)
(16.)
(17.)
After I/S Linearization was performed the converted controllable canonical states are:
z _{3} =
(
87.5 i
3

105
i
2
z 1 = x
z
2 = v

Kx

mg

F
f
sgn(
v
)
)
1
m
(18.)
(19.)
(20.)
K _{1} , K _{2} and K _{3} were chosen to place the poles at –122.95. This gave the controller desired
performance with minimal actuator saturation.
3.3.2 Application of Input/State Linearization Controller
Robustness to model uncertainty is one of the main problems with I/S Linearization.
The
method is based on the assumption that the model is an accurate representation of the
22
actual plant.
Figure 5 shows the effect of uncertain coil resistance.
In this
case, the
resistance in the plant was 15% more than the actual system.
Figure 5.) I/S Linearization with an accurate and inaccurate coil resistance
With the plant resistance more than the model resistance, not enough current is being
produced and friction is causing the plunger to hang up.
The
error for each plot,
calculated by (8), was 0.0458 and 21.9, respectively.
From these results we can see that
I/S Linearization with a perfect model does achieve near perfect tracking.
But, with 15%
error in the resistance model the error definition increases over 450 times.
This result,
like the PID, was unacceptable.
uncertainty.
The controller must be immune to any coil resistance
23
3.4 Sliding Mode Control
Often with highly nonlinear systems it can be very difficult to find an accurate model.
And in some cases it is necessary to use this uncertain model for control.
Our second
type of nonlinear controller is a Sliding Mode Controller, which allows for bounded error
in parameters while providing low error tracking.
It operates on the simple principle
“push in the opposite direction of the error”.
This principle is achieved by reducing the
higherorder system to a firstorder stabilization problem of a userdefined surface S.
Once the system reaches S the desired control objective will be reached asymptotically
[6].
3.4.1 Sliding Mode Controller Design
In general, surfaces are defined as follows.
With this the surface becomes:
S = x ~ && +
2
lx ~ & + l
2
S =
Ê
Á
Ë
d
dt
= x&& x&&
d
+ l
+
2
ˆ
˜
¯
l
n 1
~
x
(
x&  x&
d
)
+ l
2
(
x  x
d
(21.) 

) 
(22.) 
In order to make this surface attractive it was made to satisfy the following Lyapunov
function candidate.
24
L &
=
SS &
L =
1
2
=  h
S
S
2
= 
h S sgn( S )
(23.)
(24.)
assumed to be bounded with a 50% error and entered in the input with the worstcase
scenario in mind
(
ˆ
R 
0.5
ˆ
R
sgn(
S
))
.
error up to 50% of the modeled value.
This makes the controller immune to coil resistance
3.4.2 Application of the Sliding Mode Controller
Once the controller was applied to the system the robustness ability to model error was
tested.
Figure 6 shows how exceeding the defined boundary causes the system to loose
accuracy.
25
Figure 6.) Effects of modeling error with a 50% bounded coil resistance parameter
The first two plots demonstrate the ability of the controller within the set error bounds.
The third plot shows the plant resistance exceeding the 50% error bounds and friction
starting to cause plunger hangups.
This demonstrates the controller’s robustness up to
the set bounds.
The errors based on (8) for the first two plots were .0222 and .0949,
respectively.
The error associated with the incorrect resistance model is over four times
higher
than
with
the
correct
model.
While
this
is
significantly
higher,
overall
both
controllers perform very well when compared to the 21.9 error associated with the I/S
Linearization controller with only 15% resistance inaccuracy.
complete listing of all the controller errors.
26
Refer to Appendix B for a
While these results are very good, the robustness to uncertainty does cause the controller
to chatter with higher amplitude and frequency.
For our system there was no unmodeled
dynamics so the excess chatter was no problem.
activity from the increase in model uncertainty.
Figure 7 shows the increase in input
Figure 7.) The effect on the system input of coil resistance parameter uncertainty
This
increase
in
input
activity
can
be
difficult
to
implement.
The
following
section
discusses Adaptive Sliding Control, a method used to reduce model uncertainty in an
attempt to reduce control effort.
3.5 Adaptive Sliding Mode Control
The previous section explored three separate ways of applying closedloop control to the
EGR valve.
The last of these, Sliding Mode Control, even presented a method of dealing
27
with model uncertainty.
parameters
over
time,
it
possible premature failure.
While this is very useful because of the possibility of changing
can
cause
unwanted
performance
such
as
excess
heat
and
The following section explores the use of adaptive control to
accurately estimate unknown or changing parameters online, with the end goal being
reduced motor actuation and increasing the overall life of the motor.
If the parameter that
contains the uncertainty is constant or slowly changing, adaptive control can be used to
identify the value of the parameter and reduce the control effort.
3.5.1 Adaptive Sliding Mode Controller Design
For this section the uncertain parameter will be the coil resistance.
The parameter update
law is found by redefining a Lyapunov function candidate with
&
plugging the input (V) into S
yields
L =
1
2
(
S
L &
SS &
=
L & = SS & +
2
+ rDR
2
)
+ rD
r
R
Ê
Á
Ë
DR
D
 R ˜
R &
ˆ
&
ˆ
¯
D
R
& ˆ
S = Riab  Riab h
sgn(
S
)
= DRiab h
& 

plugging S 
back into the Lyapunov function candidate yields 

& 

& 
ˆ 

L 
=  hS sgn( S) 
 D 
R(iabS 
+ 
Rr 
) 

& 

ˆ 
& 

The term 
" 
 D 
R(iabS 
+ 
Rr 
)" 
is then set to zero, making 
L 
ˆ 

= 
R 
 
R 

. 
(29.) 

(30.) 

(31.) 

sgn( 
S 
) 
(32.) 

(33.) 
negative semidefinite and
returning the parameter update law
28
&
ˆ
R = 
iabS
r
with “a” and “b” defined in (26) and (27).
(34.)
Barbalat’s lemma can be used to show that the surface does converge to zero as time goes
& 

& 
ˆ 

to infinity. 
It is known that 
L 
is negative semidefinite because we defined 
R 
to force it 

ˆ 

that way. 
This guarantees that 
R 
and S are bounded. 
After finding L && , Barbalat’s lemma 
can be used to prove L &&
&
is bounded and L
goes to zero [6]. We know, from section 3.4.1,
& 

ˆ 

that S goes to zero. 
But since 
R 
is a function of S there is no guarantee that DR goes to 
zero, unless that system is constantly excited.
S
has to be nonzero in order for
DR to
converge and persistent excitation provides this nonzero (but still near zero) S.
3.5.2 Application of the Adaptive Sliding Mode Controller
Once the controller was applied to the system the parameter tracking capability was
ˆ 

tested. 
Figure 8 shows the system response with an initial model resistance 
( R 
) 
of 
30.75O and a plant resistance ( R) of 20.5 O.
29
Figure 8.) Adaptation law converges to 20.5 O, the value of the actual plant
As shown, the adaptive parameter eventually converges to the actual value in the plant.
The error associated with (8) for the adaptive sliding mode controller is .0462.
This is a
50% reduction in error when compared to the sliding mode controller with the inaccurate
resistance model.
It should be noted that the adaptive sliding mode controller started
with
an
initial
resistance
with
50%
error
in
order
to
compare
it
the
sliding
mode
controller that also had 50% resistance error.
comparison of all the controller errors.
Refer to Appendix B for a complete
30
3.5.3 Persistency of Excitation Requirement
One issue with adaptive control is the need for persistent excitation.
If the plant were to
receive a step input as opposed to a sinusoid, the adaptation law might not converge due
ˆ
to the lack of system excitation. Figure 9 shows the nonconverging R
with a step input.
Figure 9.) Adaptation law does not converge without constant system excitation
As shown, the parameter update law does not converge to the proper value due to the lack
of system excitation.
This is not a problem for the system because the EGR valve keeps
all states constantly changing as the driver requests varying levels of performance from
the vehicle.
31
3.6 Conclusion
Three different types of controllers were used to control the EGR valve, all yielding
different performance.
First PI control was implemented, but was unable to achieve low
error tracking without the addition a derivative term, D, which is often problematic to
implement.
entire
state
Because of the need for higher tolerance control and also control over the
space, Input/State Linearization was used.
While I/S Linearization could
theoretically
achieve
zero
error
tracking,
with
any
model
error
the
tracking
ability
degraded quickly.
Because of this Sliding Mode Control was introduced.
Sliding Mode
Control offers low error tracking even with model error.
But, the benefit does not come
without 
a 
price. The 
controller 
robustness comes from 
a raised 
level 
of 
actuation. 

Because 
of 
the need 
to lower the 
level 
of actuation while still achieving 
low error 

tracking 
was important, 
Adaptive 
Sliding 
Mode Control 
was introduced. 
Adaptive 

Sliding 
Mode Control 
tracks the 
unknown 
parameter in 
effect reducing 
the 
level 
of 
actuation.
32
4 State Estimation
4.1 Introduction
The
four
control
analyses
performed
above
leave
out a very important issue: sensor
measurements for state information.
A wide range of sensors could be used to collect
state information.
These sensor readings will contain noise and may have to be filtered.
Also, sensors can be expensive and unreliable.
A method of dealing with the lack of state
information is state observers.
Two common deterministic observers are the Luenberger
Observer and the Sliding Observer.
As with the controllers, an error definition is defined to compare the following observers.
The error function is defined as follows:
E
ˆ 
x
x
2
+
ˆ 
v
v
2
+
ˆ
i

i
2
(35.)
This definition allows for the error in each state to be accounted for and compared.
This
error was evaluated for 100ms at a constant period of 10µs.
Also, the error was
calculated over the same desired trajectory for both the observers; a 7Hz sine wave with
4.5mm bias.
This error definition will let the performance of the observers be compared
33
on the same basis and identify which observer is actually predicting more accurate state
information. Refer to Appendix B for a complete comparison of the following abservers.
4.2 Luenberger Observer
The Luenberger Observer is a linear observer that can be applied to a linearized nonlinear
system.
As with the PI control, the nonlinearities can often be too great or the desired
operating range can be too large to usefully implement a linear observer.
The following
analysis discusses the process for the application of a Luenberger Observer to our system.
First, 
the Accessibility 
and Controllability 
around 
the 
equilibrium 
point 
have 
to 
be 

verified. 

4.2.1 Accessibility 

The 
accessibility 
matrix, 
when 
full 
rank 
indicates 
that 
the 
system 
is controllable, 
is 
calculated using Lie brackets [6]. The rank of the following matrix was checked.
C = [f, [f,g], [f,[f,g]]]
(36.)
But we are only concerned about this matrix at the following equilibrium point.
x = 0.0045 [m], v = 0 [m/s], i = 0.281 [A] and V = 5.78 [V]
After applying this equilibrium point the C matrix is now as follows.
È 0 0 
1519.6 

C =  Í Í 1519.6 0 
41480.4 
Í 3.96
Î
322.14

˘
˙
˙
133244 ˙
˚
This matrix is full rank, therefore the system fully accessible at the equilibrium point.
34
4.2.2
Observability
The observability matrix is calculated using Lie derivatives [6].
The following process
was used to find and check the rank of the observability matrix.
The Lie derivative matrix, G, was calculated as follows.
G =
The observability matrix is the gradient of G.
O
= — G
(37.)
(38.)
From observation the system is observable everywhere but at i = 0 [A] and i = 0.8 [A].
Our system is operating at an equilibrium point with i = 0.281 [A].
Also, our system will
never reach zero current because there is always a small amount to hold the valve in the
zero position. Therefore O is full rank and the system is observable.
4.2.3 Observer Pole Placement
Now that we know the system is accessible and observable we can implement the
Luenberger Observer. The following equation shows the form of the observer [8].
35
ˆ 

x& 
ˆ = Ax + BV + L y  Cx [ 
ˆ] 
(39.) 

ˆ 

& 
(40.) 

x 
= ( A  LC) xˆ + Ly + BV 

e& = ( A  LC)e 
(41.) 
If all the eigenvalues of (ALC) have negative real parts the equation is asymptotically
stable.
It should be noted that this means asymptotically stable for the linearized system,
not the nonlinear system. For this system (ALC) is as follows.
Ê
Á
Á
Á
Ë Í Î 5055.08
12000
È
Í
Í

0

1
0
89.75

0
383.34
˘
˙
˙
152.76 ˙
˚

L 1 ˘
È
Í
Í
Í L 3 ˙
Î
˙
˙
˚
2
L
[
1
0
ˆ
˜
]
0 ˜ =
˜
¯

12000
Í 5055.08
Î
Í
Í
È
L 1



L
L
2
3
The characteristic equation of (ALC) is as follows.
l
3
+
(
L
1
+
152 .76)
l
2
+
(152 .76 1
L
+ L
2
+
46406 .6)
l +
34406 .6 1
L
+
152 .76
1
0
0
383.34
˘
˙
˙
152.76 ˙
˚
 
89.75 
 

L 
2 
+ 383 .34 
L
3

104711
We are going to put the real parts of all three of our poles at 100.
This will keep the
poles symmetric about the real axis.
like:
Therefore the characteristic equation needs to look
l
3
+
292.8
l
2
+
68104.4
l +
4882836
=
0
(42.)
To achieve the characteristic equation in (42) L _{1} = 140, L _{2} = 311.41 and L _{3} = 321.
The next step is to apply these gains to the nonlinear system.
The following equations
represent the new Luenberger system that will estimate the states of the original system.
36
ˆ
v
ˆ ˆ x& = v + L 1 
( 
~ 
) 

x 

ˆ 
3 
ˆ 

( 
 87.5 i 
+ 105 i 
2 
 
ˆ kx  
gm ) 

ˆ & i 
m 

ˆ 
ˆ 
ˆ 

V 
 
Ri 
+ (87.5 
i 2 
 105 
i 
v ) ˆ 

= 
+ 

ˆ 

L 
 
(175 
i 
 
x 105) ˆ 
^{~} =
x
y

Cxˆ
+ L
2
(
~
x )
L
3
(
~
x )
(43.)
(44.)
(45.)
(46.)
The following plots show the actual states and the estimated states.
Figure 10.) Estimated states converge to the actual states of the system.
As expected, the estimated states converge to the actual states.
The error defined by (35)
for the Luenberger Observer is 0.
an observer with a perfect model.
This zero error is purely theoretical and is expected for
37
During the simulation the system did not move far from the equilibrium point that was
used to linearize the system and solve for the observer gains.
If the system were to leave
this envelope there would be no performance guarantee.
4.2.4 Application of the Luenberger Observer
The
Luenberger
Observer
is
applied
by
replacing
the
state
information,
previously
collected directly and unrealistically from the plant model, by the observed states.
These
observed states will then be used to calculate the controller output.
The following plot
shows the output of the system with the I/S Linearization controller running on observed
states.
Figure 11.) Results with a perfect observer and controller model
38
As you can see near perfect tracking is achieved.
The error calculated from (8) is 0.0458,
which is identically equal to the I/S Linearization controller with actual state information.
This is to be expected because of the zero error state tracking provided by the Luenberger
Observer with the perfect model.
This assumption of a perfect model is almost never possible, though.
Now that the
control is based on two independent but identical models any error will now have an even
larger effect. Model uncertainty and its effects on control will now be discussed.
4.2.4 Model Uncertainty
The application of the Luenberger Observer to a nonlinear system assumes a perfect
observer 
model. 
Any small 
error 
in 
the 
model 
causes 
the 
estimated 
states 
to 
not 

converge. 
This 
violates 
the 
whole 
basis 
of 
an 
observer; 
to 
predict 
accurate 
state 
information. The following plots show the performance of the observer with a 10% error
in the resistance model of the windings.
39
Figure 11.) Loss of parameter convergence due to small model error
The error defined by (35) is 2.59.
This is a huge increase in error, which is visually
noticeable from Figure 11.
When these estimated states are used with the controller any
deviation from the real states would cause unwanted performance.
The controller would
be driving the system to an incorrect setpoint with minimal error.
This adds an element
of guaranteed error to the system.
The need for accurate state information is crucial. The
following plots show the effect of 10% error in the coil windings resistance model in both
the observer and controller model.
40
Figure 12.) Model error in observer and controller
The model error in the observer causes it to predict flawed state information.
The model
error
in
the
controller
causes
the
incorrect
tracking
of
the
already
incorrect
state
information.
This error buildup leads to poor control and possibly instability.
The error
as defined by (8) is 39.2.
This is an increase in error of over 850 times the perfect model
I/S Linearization controller.
This error increase and the need for guaranteed performance
away from the equilibrium point force us to pursue a different avenue of state estimation.
4.3 Sliding Observer
The Sliding Observer 
is another 
tool used 
to 
predict 
state information. 
The 
major 

difference between 
the 
Sliding Observer 
and 
the Luenberger 
Observer 
is 
the 
Sliding 

41 
Observer’s ability to deal with model uncertainty.
Using the same basis as the Sliding
Mode Controller, the Sliding Observer capitalizes on a discontinuous model.
4.3.1 Observer Design
The Sliding Observer design is similar to the Luenberger design.
In fact, the Luenberger
Observer is the basis for the Sliding Observer.
The following equations represent the
Sliding Observer [4].
ˆ
x& = v + L
ˆ
1
(
~
x
)
+ K
1
sgn(
~
x
)
(47.)
ˆ
v &
ˆ 
3 
ˆ 

( 
 87.5 i 
+ 105 i 
2 
 ˆ kx  
gm ) 

= ˆ & i 
m 

ˆ 
ˆ 
2 
ˆ 

V 
 
Ri 
+ (87.5 
i 
 105 
i 
v ) ˆ 

= 
+ 

ˆ 

L 
 
(175 
i 
 
x 105) ˆ 
+
L
L
2
(
3
(
~
x
~
x
)
)
+
+
K
2
sgn(
~
x )
K
3
sgn(
~
x )
(48.)
(49.)
^{~} =
x
y

Cxˆ
(50.)
As you can see the only difference is the “sign” term at the end of each estimated state.
This “sign” term is the key to dealing with model uncertainty.
The gains L _{1} , L _{2} and L _{3}
are taken directly from the Luenberger observer to place the poles of the linearized
system at 100.
4.3.2 Model Uncertainty
The discontinuous “sign” function changes the sign of a portion of the state estimation,
constantly adjusting states to track the proper value.
Essentially it applies the same
principle as the Sliding Mode controller: “Push in the opposite direction of the error”.
Figure 13 shows the ability of the observer to correctly track states regardless of model
integrity.
42
Figure 13.) State variables converge regardless of model error
The sliding observer is able to accurately track the states.
The error defined by (35) is
0.1467. This is a 94% increase in performance over the Luenberger observer with similar
conditions.
This reduction in error is important because this information will be applied
via a model based controller that requires correct state information.
4.3.3 Application of the Sliding Observer
Now that we have verified that the sliding observer is converging to accurate state
information it can be applied to the Sliding Mode Controller.
It
is applied in the same
fashion as the Luenberger Observer.
The state information, taken directly from the
system and used in the controller, is replaced by the state information produced by the
observer. Figure 14 shows the output of the system with all observed state information.
43
Figure 14.) State convergence and acceptable control regardless of model error
The control with the model error is not perfect, but demonstrates the ability of the sliding
surface controller in dealing with model uncertainty. The error defined by (8) is 4.8.
This
is an 88% increase in performance over the I/S Linearization control with the Luenberger
Observer values. 
This small amount of error stems from the error build up discussed 
earlier. 
4.4 Conclusion
The
application
of
the
nonlinear
controllers
discussed
in
section
3
requires
full
state
information.
To outfit the plant with sensors could be costly and difficult, in addition to
having to deal with noisy data.
Because of these issues, state estimators were used to
44
predict
the
state
information
used
in
the
nonlinear
controllers.
Two
types
of
state
estimators were used, first being the Luenberger Observer.
The Luenberger observer
uses a linear model to calculate the gains that are applied to the nonlinear observer.
This
observer 
will 
predict zeroerror 
state 

Гораздо больше, чем просто документы.
Откройте для себя все, что может предложить Scribd, включая книги и аудиокниги от крупных издательств.
Отменить можно в любой момент.