Lect 7
Lect 7
in
Nonlinear Feedback Control
Lecture # 7
Extended Kalman Filter
&
Measurement Noise
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 1/30
Extended Kalman Filter (EKF)
x = f(x, u) + w, y = h(x, u) + v
x = f( x, u) + H(t)[y h( x, u)]
x = x x
P = AP + PA
T
+ QPC
T
R
1
CP, P(t
0
) = P
0
> 0
If (A(t), C(t) is uniformly observable, then P(t) exists for
all t t
0
and satises
0 < p
1
I P(t) p
2
I 0 < p
3
I P
1
(t) p
4
I
See a texbook on optimal control or optimal estimation
H(t) = P(t)C(t)
T
R
1
(t)
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 4/30
Compute A(t) and C(t)
A(t) =
f
x
( x(t), u(t)), C(t) =
h
x
( x(t), u(t))
Solve the Riccati equation
Compute H(t)
H(t) = P(t)C(t)
T
R
1
(t)
Remark: The Riccati equation and the observer equation
have to be solved simultaneously in real time because A(t)
and C(t) depend on x(t) and u(t)
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 5/30
Lemma: The origin of
x = [A(t) H(t)C(t)] x + ( x, t)
is exponentially stable and the solutions of
V = x
T
P
1
x +
x
T
P
1
x + x
T
d
dt
P
1
x
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 6/30
d
dt
P
1
= P
1
PP
1
V = x
T
P
1
(APC
T
R
1
C) x
+ x
T
(A
T
C
T
R
1
CP)P
1
x
x
T
P
1
PP
1
x + 2 x
T
P
1
( + )
V = x
T
P
1
(AP + PA
T
PC
T
R
1
CP
P)P
1
x
x
T
C
T
R
1
C x + 2 x
T
P
1
( + )
= x
T
(P
1
QP
1
+ C
T
R
1
C) x + 2 x
T
P
1
( + )
c
1
x
2
+ c
2
x
3
+ c
3
x (c
3
k
2
)
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 7/30
Stochastic Interpretation: When w(t) and v(t) are
zero-mean, white noise stochastic processes,
uncorrelated, i.e., E{w(t)v
T
()} = 0, t, , and
E{w(t)w
T
()} = Q(t)(t )
E{v(t)v
T
()} = R(t)(t )
then x(t) is an approximation of the minimum variance
estimate that minimizes
E
_
[y(t) h( x(t), u(t))]
T
[y(t) h( x(t), u(t))]
_
and P(t) is an approximation of the covariance matrix
E
_
[ x(t) x(t)][ x(t) x(t)]
T
_
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 8/30
When will the EKF act as HGO?
z = Fz + Gx
1
x = Ax + B(z, x, u)
y = Cx
Assumptions: F is Hurwitz, (0, 0, 0) = 0
State Feedback Control: u = (z, x); (0, 0) = 0, locally
Lipschitz, globally bounded
The system
z = Fz + Gx
1
x = Ax + B(z, x, (z + v, x))
with input v is ISS
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 9/30
The functions [/x]( z, x, u) and [/z]( z, x, u) are
globally bounded
Choose
Q =
_
Q
1
Q
2
Q
T
2
1
2
D
1
Q
3
D
1
_
where Q
1
and Q
3
are positive denite and
D = Diag[1, , . . . ,
r1
]
P =
_
P
1
P
2
D
1
D
1
P
T
2
1
D
1
P
3
D
1
_
P
1
and P
3
are positive denite
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 10/30
The observer can be written as
z = A
11
z + G x
1
+ P
2
D
1
C
T
(y C x)
x = A x + B( z, x, u) +
1
D
1
P
3
D
1
C
T
(y c x)
The gain
1
D
1
P
3
D
1
C
T
has the structure of a high-gain
observer
P
1
, P
2
, P
3
satisfy equations of the form:
P
1
= ()
P
2
= ()
P
3
= ()
Slow variables: (z, x, z, P
1
), Fast variables: ( x, P
2
, P
3
)
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 11/30
For sufciently small , the output feedback controller
recovers the performance of the state feedback controller
as in high-gain observer theory
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 12/30
Noise in Differentiation
x
i
= x
i+1
+
_
i
/
i
_
(y x
1
), 1 i n 1
x
n
= (
n
/
n
)(y x
1
)
estimates the states of the system
x
i
= x
i+1
, 1 i n 1
x
n
= f(x, t)
y = x
1
|x
i
(t) x
i
(t)|
k
n1
e
at/
x
i
(t) x
i
(t) 0 as 0, for t t
1
> t
0
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 13/30
y(t) = u(t) x
i+1
= u
(i)
, 1 i n 1
f(x, t) = u
(n)
(t)
Assume u(t) and u
(i)
(t) (for 1 i n) are bounded
Measurement Noise:
y(t) = u(t) + (t)
Assume (t) is bounded
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 14/30
By the linearity of the observer
x = +
=
A +
Bu,
=
A +
B
A =
1
D
1
()A
o
D(),
B = D
1
()B
o
A
o
=
_
1
1 0
2
0 1 0
.
.
.
.
.
.
.
.
.
n1
0 1
n
0
_
_
, B
o
=
_
2
.
.
.
n1
n
_
_
D() = diag[1, , ,
n1
]
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 15/30
Estimation Error:
x
i+1
u
(i)
= [
i+1
u
(i)
] +
i+1
Scaling:
i
=
1
ni
[
i
u
(i1)
],
i
=
i1
= A
o
Bu
(n)
,
= A
o
+ B
o
B
T
= [0, , 0, 1]
Find the tightest ultimate bound on the estimation error
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 16/30
Lemma: Consider the linear system
z = Mz + Nw,
where M is Hurwitz. Let
K
k
=
_
0
|{exp(M)N}
k
| d, for 1 k n
For all bounded w, |z
k
(t)| is ultimately bounded by
+ K
k
w
c, dependent on k and ,
|z
k
(T)| K
k
w
ni
+
Q
i+1
i
def
= b
i
()
P
i
=
_
0
|{exp(A
o
)B}
i
| d
Q
i
=
_
0
|{exp(A
o
)B
o
}
i
| d
u
(n)
= sup
t0
|u
(n)
(t)|
The bound depends on but not on its derivatives
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 18/30
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1.1
the highgain parameter epsilon
t
h
e
e
r
r
o
r
b
o
u
n
d
opt
i
=
n
i
n i
n
Q
i+1
P
i+1
u
(n)
O
_
n
u
(n)
_
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 19/30
Example [Levant (2003)]: y = u +
u = z [10 sin(0.05x) + 5]
x = cos, =
5
tan,
= c, z = sin
c = f(u, u, u)
is generated by SIMULINK band-limited white noise
generator. The noise power is 10
8
and sampling time is
0.001 sec
Use a third-order high-gain observer (with multiple real
eigenvalues) to estimate the rst and second derivatives
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 20/30
0 2 4 6 8 10
0.02
0.01
0
0.01
0.02
time (s)
n
o
i
s
e
i
n
t
i
m
e
d
o
m
a
i
n
0 2 4 6 8 10
0
0.2
0.4
0.6
0.8
1
frequency
n
o
i
s
e
i
n
f
r
e
q
u
e
n
c
y
d
o
m
a
i
n
opt
1
= 0.0836,
opt
2
= 0.0939, = 0.0887
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 21/30
0 5 10 15 20
5
0
5
highgain estimate of first derivative
0 5 10 15 20
0.5
0
0.5
the error in the estimate of first derivative
0 5 10 15 20
5
0
5
highgain estimate of second derivative
0 5 10 15 20
2
0
2
the error in the estimate of second derivative
13 14 15 16 17 18 19 20
0.5
0
0.5
the error in the estimate of second derivative in steadystate
exact derivative
estimate
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 22/30
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
0
1
2
3
the parameter epsilon
e
s
t
i
m
a
t
i
o
n
e
r
r
o
r
first derivative
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
0
5
10
15
20
the parameter epsilon
e
s
t
i
m
a
t
i
o
n
e
r
r
o
r
second derivative
the error bound
the actual error
the error bound
the actual error
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 23/30
Comparison with a second-order sliding mode observer
0 5 10 15 20
5
0
5
slidingmode estimate of first derivative
0 5 10 15 20
0.5
0
0.5
the error in the estimate of first derivative
0 5 10 15 20
5
0
5
slidingmode estimate of second derivative
0 5 10 15 20
2
0
2
the error in the estimate of second derivative
13 14 15 16 17 18 19 20
0.5
0
0.5
the error in the estimate of second derivative in steadystate
exact derivative
estimate
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 24/30
0 5 10 15 20
5
0
5
highgain estimate of first derivative
0 5 10 15 20
0.5
0
0.5
the error in the estimate of first derivative
0 5 10 15 20
5
0
5
highgain estimate of second derivative
0 5 10 15 20
2
0
2
the error in the estimate of second derivative
13 14 15 16 17 18 19 20
0.5
0
0.5
the error in the estimate of second derivative in steadystate
exact derivative
estimate
0 5 10 15 20
5
0
5
slidingmode estimate of first derivative
0 5 10 15 20
0.5
0
0.5
the error in the estimate of first derivative
0 5 10 15 20
5
0
5
slidingmode estimate of second derivative
0 5 10 15 20
2
0
2
the error in the estimate of second derivative
13 14 15 16 17 18 19 20
0.5
0
0.5
the error in the estimate of second derivative in steadystate
exact derivative
estimate
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 25/30
Noise in Closed-loop Control
Problem Setup: Recall the problem formulation of the
separation principle for the stabilization of a compact
positively invariant set, with one difference
y = Cx + v
where v(t) is measurable bounded function that satises
|v(t)|
The following properties are shown for sufciently small :
All trajectories are bounded
The trajectories come arbitrarily close to
A{x x = 0} as time progresses
Closeness of output feedback and state feedback
trajectories
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 26/30
These results depend on the measurement noise:
Noise magnitude is limited
There is an O(
1/r
) lower bound on
Ultimate boundedness and closeness of trajectories
have lower bounds that depend on class K functions of
Performance Tradeoff:
x(t) x(t) k
1
0
+
k
2
r1
, for t T
x(t) x(t)
c
3
r1
exp
_
c
4
t
_
, for t [0, T]
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 27/30
Switching Observer
0 <
1
<
2
< 1, > 0 (Design parameter)
Use
1
for (y x
1
) [, ]
Use
2
for (y x
1
) [, ]
Issues of Concern:
Existence/uniqueness of solutions
Transient response (peaking) before switching
Transient after switching
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 28/30
Switching Design Features
To avoid overshoot of the switching interval, assign
observer poles to provide monotonic convergence of
(y x
1
) (one eigenvalue much faster than the rest)
after entering the switching interval, delay switching until
the whole vector settles inside a positively invariant
set (a crucial issue is the choice of the delay time)
To avoid peaking after switching, choose
1
= k
r/(r1)
2
, k > 0
so that (y x
1
) remains in [, ] after switching
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 29/30
Closed-Loop Stability Result
The Output feedback control using the switched-gain
high-gain observer achieves the following for sufciently
small :
Regional result (recovers a compact subset of the state
feedback region of attraction)
Boundedness of all trajectories
Ultimate boundedness
Closeness of output feedback and state feedback
trajectories
Again, the results depend on the noise magnitude. The
closed-loop analysis determines the switching parameters
High-Gain ObserversinNonlinear Feedback ControlLecture # 7Extended Kalman Filter&Measurement Noise p. 30/30