EE635 - Control System Theory
Jitkomut Songsiri
7. Linear Quadratic Gaussian Control
output feedback
Kalman filter
LQG/LQR
7-1
Output feedback
consider a linear system
x = Ax + Bu,
y = Cx
a state-feedback controller has a form
u(t) = Kx(t)
which requires the availability of the process measurement
when the state variables are not accessible, one can use
u(t) = K x
(t)
where x
(t) is an estimate of x(t) based on the output y
Linear Quadratic Gaussian Control
7-2
Full-order observers
x cannot be fully measured and the goal is to estimate x based on y
our approach is to replicate the process dynamic in x
x
= A
x + Bu
define the state estimation error e = x x
, we can see
e = Ax A
x = Ae
if A is stable, then the error goes to zero asymptotically
if A is unstable, e is unbounded and x
grows further apart from x
to avoid this problem, one can consider a correction term as
x
= A
x + Bu + L(y y),
x
(0) = 0
(feed y back to the estimator)
Linear Quadratic Gaussian Control
7-3
L is a given matrix, called observer gain matrix
the error dynamic now is
e = Ax A
x L(Cx C x
) = (A LC)e,
e(0) = x(0)
the observer error goes to zero if L is chosen such that
A LC is stable
we can make e goes to zero fast if the eigenvalues of A LC can be
arbitrarily assigned
eigenvalues of A LC are same as those of (AT C T LT )
hence, choosing L is the dual of state-feedback design problem for the
pair (AT , C T )
eigenvalues of A LC can be freely reassigned if and only if (A, C)
observable
Linear Quadratic Gaussian Control
7-4
Observer-based controller
closed-loop equations after a state feedback
u(t) = r(t) K x
(t)
where r(t) is reference input, is
x = Ax BK x
+ Br
x
= A
x + L(y y) + Br BK x
or
d x
A
=
LC
dt x
Linear Quadratic Gaussian Control
BK
x
B
+
r
A LC BK x
7-5
Separation principle
change the coordinate
I
I
0
x
x
x
=
=
I x
xx
the dynamics in the new coordinate is
d x
A BK
=
0
dt e
BK
x
I
+
r
A LC e
0
the dynamic of e does not depend on x
closed-loop eigenvalues are
{eig(A BK)} {eig(A LC)}
one can assign eigenvalues of the system and the observer independently
Linear Quadratic Gaussian Control
7-6
Observer of noisy system
in general, the system is corrupted by noise
x = Ax + Bu + w,
y = Cx + v
where w is process noise and v is measurement noise
rewrite the error dynamic of an observer
e = Ax + Bu + w A
x Bu L(Cx + v C x
)
= (A LC)e + w Lv
due to w, v, the estimation will generally not go to zero
one would like the error to remain small by a good choice of L
the optimal choise of L is given by the Kalman gain
Linear Quadratic Gaussian Control
7-7
Kalman filter
assume w, v are uncorrelated zero-mean Gaussian white noise, i.e.,
E w(t)w( ) = W (t ),
E v(t)v( ) = V (t )
E w(t)v( ) = 0
spectral density matrices of w, v are
W 0,
and V 0,
respectively
The optimal observer gain which minimizes Eke(t)k2 is
L = P C V 1
where P is the unique positive-semidefinite solution of the ARE
P A + AP P C V 1CP + W = 0
when using the optimal gain, this system is called the Kalman-Bucy filter
Linear Quadratic Gaussian Control
7-8
A LC is stable as long as the two conditions hold
(A, C) is observable
(A, W ) is controllable
Recall: LQR control with J =
we need to solve ARE
R
0
x(t)Qx(t) + u(t)Ru(t)dt
P A + AP P BR1B P + Q = 0
with conditions
(A, B) controllable to guarantee Jmin <
(A, Q) observable to obtain a unique positive definition P
Duality: Kalmain filter is equivalent to designing an LQR controller on the
dual system (A, C , B , D ) with Q = W , R = V
Linear Quadratic Gaussian Control
7-9
Linear Quadratic Gaussian Control
a combination of optimal state estimation and optimal state feedback
w
u
Plant
B
x
R
A
Linear Quadratic Gaussian Control
L
+
+
y
-
Kalman Filter
LQ regulator
7-10
Example
we design an LQG controller to a spring-mass system
0
0 1
u + w, y = 1 0 x + v
x+
x =
1
1 0
where covariances of w are v are I and 0.1 respectively
we use the parameters
Q = 5C C,
R = 1,
W = I,
V = 0.1
(A, C) observable and (A, W ) controllable
MATLAB codes
n
Q
K
W
L
=
=
=
=
=
2; A = [0 1;-1 0]; B = [0 1]; C = [1 0];
5*C*C; R = 1;
lqr(A,B,Q,R);
eye(n); V = 0.1;
lqe(A,eye(n),C,W,V);
Linear Quadratic Gaussian Control
7-11
closed-loop response to unit step in reference
2.5
output
estimation error
input
2
1.5
1
0.5
0
0.5
1
1.5
0
10
15
20
25
30
t
(a standard LQG does not have an integral action)
Linear Quadratic Gaussian Control
7-12
Robustness properties
LQR-controlled systems if R is diagonal, then
the system will have a gain margin equal to and a phase margin of 60
The input u = Kx can have a complex perturbation
ui = kieji ,
i = 1, 2, . . . , m
m = number of inputs
without causing instability providing
1. i = 0 and 0.5 ki ,
2. ki = 1 and |i| 60,
i = 1, 2, . . . , m
i = 1, 2, . . . , m
LQG-controlled systems LQG-controlled system with a combined Kalman
filter and LQR control law, there are NO guaranteed stability margins
Linear Quadratic Gaussian Control
7-13
Counterexample
we will show that the gain margin of LQG becomes very small as feedback
and observer gains become large
consider an unstable SISO system
x 1
1 1 x1
0
1
=
+
u+
w
x 2
0 1 x2
1
1
y = 1 0 x+v
with parameters in controller and observer design given by
1 1
,
Q=
1 1
Linear Quadratic Gaussian Control
R = 1,
1 1
,
W =
1 1
V =1
7-14
ARE for controller design has the positive definite solution
p11 p12
, p12 = p22 = 2 + 4 + , p11 = (p212 )/2
P =
p12 p22
the LQR gain is
K = R
B P = (2 + 4 + ) 1 1
k k
solving the ARE for observer design, the Kalman gain is
p
1
l
L = (2 + 2 + )
=
1
l
the equations of the controlled system and the observer are
x
x = Ax BK
+ Fw
x
= A
x + Bu + L(Cx + v C x
)
where
Linear Quadratic Gaussian Control
7-15
is the actual input matrix for the system (B
contains an uncertainty)
B
B is the input matrix used in control design
were concerned if the LQG has a robust stability (from uncertainty in B)
= 0 where 6= 1 (so B
=
assume B
6 B)
the eigenvalues of the dynamic matrix
A
LC
BK
(A LC + BK)
satisfies the characteristic equations of the form
s4 + c 3 s3 + c 2 s2 + c 1 s + c 0 = 0
and from Rouths criterion, all ck s must be positive
Linear Quadratic Gaussian Control
7-16
however, we can show that
c1 = l + k 4 + 2( 1)kl,
c0 = 1 + (1 )kl
and the value of can make these two coefficients to change sign:
if > (1 + 1/kl) then c0 < 0
if < [1 (l + k 4)/2lk] then c1 < 0
so the gain margin is smaller as kl becomes larger
increasing l and k relates to increasing Q and W
robustness is enhanced by low weighting on the state and covariance of
process noise
Linear Quadratic Gaussian Control
7-17
References
Lecture note on
Observer-based controller design, David Banjerdphongchai, Chulalongkorn
University
Chapter 9 in
S. Skogestad and I. Postlethwaite, Multivariable Feedback Control:
Analysis and Design, John Wiley & Sons, 1996
Chapter 6 in
R. F. Stengel, Optimal Control and Estimation, Dover, 1994
Linear Quadratic Gaussian Control
7-18