LQG Lecture
LQG Lecture
LQG Lecture
• Answer 1: From a controller standpoint the answer is YES, since we could design a
LQR (constant feedback gain matrix, guaranteed stability, good stability margins,...)
• Answer 2: From the state estimation standpoint the answer is NO, since we only
have a Luenberger observer, which is guaranteed to be stable but not optimal
LQG Control
• Although derived for a specific estimation problem, the Kalman Filter and its derivatives, is
probably the most commonly used estimator in industry
We wish to find:
xˆ = Axˆ + Bu + K F (y - Cxˆ)
xˆ(t0 ) = xˆ0
Find: K F , xˆ0
min J = min E eT Ze
K F ,x 0 K F ,x 0
{ } ì
ï
ïe = x - xˆ
í
ï
ïZ >0
î
LQG Control (Extra)
Markov Process
ìïe = (A - K C )e + w - K v
( )
min heT Z he he (t ) = 0
ï F F
í h e = (A - K FC )he
ïïe(t0 ) = x 0 - xˆ0 = e0
î
he (t ) = 0 he (t0 ) = 0
{ }
e(t ) = (he (t ),Q(t )) E e(t ) = he (t )
{ }
E {xˆ0 - x 0 } = 0 E xˆ0 = E x 0 { }
{
Q(t ) = E éêëe - he ùúû ée - h ù
êë e úû
T
}
Minimization of tr éêëQZ
ù
úû
Q(t ) ³ Q(t )
E ee { T
} = Q(t ) + he heT
ìïQ. = AQ + QAT + W - QC TV -1CQ
ïï
í
ïïQ(t ) = Q
ïî 0
{ }
0
J = E eT Ze = heT Z he + tr éêëQ(t )Z ùúû
Q(t ) º Q(t ) K F = QC TV -1
í
ï
ïQ(t ) = Q1 ³ 0; R1 ³ 0; R2 > 0
ï
î 1
Given an arbitrary continuous matrix K(t). Then for t0 ≤t ≤ t1,
Q(t ) ³ Q(t )
ì
ï T T -1
ïQ = AQ + QA + W - QC V CQ
í
ï
ïQ(t ) = Q0
ï
î 0
The equality holds if : K = QC TV -1
Summary
Given the system:
c. If Q exists, it is ≥ 0 and solution of
ïìïx = Ax + Bu + w
í AQ + QA T + W − QC T V −1CQ = 0
ïïy = Cx + v
î
( unique solution in case b.)
for Q≥0 the following holds: e. If Q exists, the optimal estimator is:
. .
Q = AQ + QA T + W − QC TV −1CQ
xˆ = Axˆ + Bu + K F (y - Cxˆ)
Q(t 0 ) = Q0
K F = QC TV -1
Summary
Kalman Filter Implementation: the discrete case
x0 x k −1 x kP = Ax k −1 + Buk + wk
P0 Pk −1 PkP = APk −1AT + Qk
LQG Control Synthesis • Find the optimal controller u(t) that minimizes:
• Given the LTI stochastic system
{
J = E xT (t f )S (t f )x (t f ) +
ìïx = Ax + Bu + Dw ìïw(t ) é 0,W ù ü
ï
ï ëê ûú
tf
ï ï
ïv(t ) é 0,V ù +ò ( )
ï
x (t )Q(t )x (t ) + u (t )R(t )u(t ) d t ï
í
T T
í ý
ïïy = Cx + v ï êë úû ï
ï
î ï
ïx (t ) êë h0 ,Q0 ùúû
é
t0
ï
þ
ï
î 0 DWDT
Q ³ 0, R > 0, S (t f ) = S f ³ 0
Main Result
LQG Control
{ } { } {
E xTQx = E (x - xˆ + xˆ) Q (x - xˆ + xˆ) = E (x - xˆ) Q (x - xˆ) + 2E (x - xˆ) Qxˆ + E xˆTQxˆ
T T
} { T
} { }
Since noises are uncorrelated: E eTQxˆ = 0 { }
• We know that:
{ } { }
E (x - xˆ) Q (x - xˆ) = E eTQe = tr éêëQ Sùúû
T
• We obtain:
{ }
E x TQx = tr [Q S] + E xˆTQxˆ { }
• Similarly: {
E x Tf S f x f } = tr [S S ] + E {xˆ
f
T
f
S f xˆ f }
ì
ï tf ü
ï é tf ù
ï ï ê ú
J =Eïíò (xˆ Qxˆ + u Ru )dt + xˆf S f xˆf ï
T T T
ý + tr ê ò Q Sdt + S f S f ú
ï ïþïï êt ú
ïï t0
î ëê 0 ûú
ì tf
ï ü
ï
ï ï
J (u ) = E íò (xˆ Qxˆ + u Ru )dt + xˆf S f xˆf ï
ï T T T
ý u = -Kcxˆ K c = R −1 B T S
ï
ï ï
ï
ï t0
î ï
þ
ì
ï .
ïxˆ = Axˆ + Bu + K F h S = A T S + SA + Q − SBR −1 B T S
í
ï
ïh = y - Cxˆ S (t f ) = S f
î
LQG Control
The performance of the closed loop system is computed in a stochastic sense, since the state
vector and the output are now stochastic processes
ée ù ée ù éx - h ù
ê ú
x = ê ú x 0 = êê 0 úú = êê 0 0ú
• The closed loop dynamics are now a
ˆ
x xˆ0 ú ê h0 ú
êë úû ê
ë û ë úû Linear System driven by white noise
éA - K C ù é ù éw ù x = AC x + BC x
ê
x = ê F
0 ú x + êD -K F ú ê ú
êë K FC A - BKc úú ê0 K ú
êë F úû
êv ú
êë úû • The statistics are given by the closed loop
û
covariance matrix
Note: x is the augmented state vector of dimension 2n éQ x Q x ù
x é
{ ù
T
é
ë
é ù
}
Q (t ) = E êëx - E (x )úû ê êëx - E (x )úû ú = êê 11x
ù
û
12 ú
x ú
êëQ21 Q22 úû
ìï éW 0 ù
ï
ï x x x T ê ú T
ïQ = ACQ + Q AC + BC ê 0 V ú BC
í ëê úû
ï
ï
ï
ïQ x (t0 ) = Q0x
î
K F = QC T V −1 Q11x C T K FT − K F VK FT = 0
éQ x ù é ù
ê 11 0 ú = êFilter Riccati Solution 0 ú
ê 0 Qx ú ê 0 Lyapunov Equation Solutionúú
êë 22 úû êë û
LQG Statistics (see Kwakernaak and Sivan, ‘Linear Optimal Control’ , page 95, Theorem 1.50)
é E {e }ù é 0 ù { }
E vT (t )Wv(t ) = tr ïíò
ï
W å v
(w )df ï
ý,
ï
ê 0 ú ê ú ï
ï-¥
î ï
ï
þ
E {x(t0 )} = ê ú =ê ú
êëE {xˆ0 }ûú êë h0 = E {x 0 }úû
+¥
w
f = , R (0) = ò åv (w)df
2p v -¥
LQG Control
-1
K LQG (s ) = -KC (sI - A + BKC + K FC ) K F
éA - K C ù é ù éw ù ée ù ée ù éx - h ù
ê
x = ê F
0 ú x + êD -K F ú ê ú x = êê úú x 0 = êê 0 úú = êê 0 0ú
ú
êë K FC A - BKc úú ê0 K ú
êë F úû
êv ú
êë úû êëxˆúû êëxˆ0 úû êë h0 úû
û
8. LQG Control Examples
LQG Control Commands
LQG Control Commands
LQG Control Examples
é.0025rad 2 / Hz 0 ù
w(t ) := [0, S w ] S w = êê ú
êë 0 0.05rad / sec / Hz úú
2 2
û
• Compute the solution to the associated Lyapunov equation, to get the state vector statistics
AQ + QAT + DWDT = 0
é0 1 ùú é 0 0ù é.0025 0 ù
ê
A= ê ê
,D = ê ú ,W = êê ú
-2 -2ú ú ú
2 1ú .05úú
ëê û ëê û êë 0 û
LQG Control Examples
Example No. 2: Consider now the same controller, but we add a disturbance torque τd, (white
noise with intensity Vd). The output is the angular position with measurement noise vm.
é0 1 ù é 0ù é0 ù
ê
x = ê ú
ú x + ê ú m + êê úú td
ê ú y = éê1 0ùú x + vm ; vm = [0,Vm ]
ë û
êë 0 -a úû êëk úû êë g úû
é 2 ù
ê -a + a + 2b a 2 + b - a a 2 + 2b ú Vd
Q¥ = Vm ê ú b=g
ê a 2 + b - a a 2 + 2b
êë (
-a 3 - 2ab + a 2 + b ) a2 + 2b úú
û Vm
LQG Control Examples
é 2 ù
• ê -a + a + 2b ú
Kalman Filter Gain Matrix: KF = ê ú
ê a 2 + b - a a 2 + 2b ú
ëê ûú
• From the square root of the diagonal terms of Q we can determine the statistics of the reconstruction
error, which are 0.002 rad and 0.06 rad/sec in position and velocity respectively.
The performance of a controller improves with the gain increase. However, high gains excite structural vibrations.
For a PI controller, structural vibrations cannot easily be controlled since the structural deformations are not
directly measured by encoders.
An LQG controller uses a Kalman filter to estimate telescope vibrations, overcoming the difficulty of direct
measurement. The Kalman filter consists of a telescope analytical model that needs to be accurate to produce an
accurate estimate of the telescope structural dynamics.
LQG controllers guarantee wide bandwidth and good wind-disturbance rejection properties; thus, they can
be used for antennas with stringent pointing requirements in the presence of wind disturbances (modeled
as random processes).
For antennas and radio telescopes, the LQG control systems can be implemented in two different ways: at
the telescope rate loop or at the position loop (as any other controller).
The analysis is augmented with the performance of the proportional-and-integral (PI) controller. The latter
analysis is necessary not only for comparison purposes (the PI controller is a standard antenna industry
feature), but also because the implementation of the LQG controller requires preliminary installation of PI
controllers in both rate and position loops.
Remainder: The implementation of the LQG algorithm needs an accurate telescope model, and it can be
obtained from the field test of the telescope.
General Controller Structure
The PP control system consists of a PI controller in the position loop and a PI controller in the rate loop.
A Command Preprocessor (CPP) deals with the rate and acceleration limits imposed at the drives. During tracking, the telescope
motion is within the rate and acceleration limits. However, during slewing, the large position-offset commands exceed the
acceleration limit or both the acceleration and rate limits. When limits are exceeded, the telescope dynamics are no longer linear, and
the telescope becomes unstable, which is observed in the form of limit cycling. The CPP modifies the telescope commands such that
they remain unaltered if they do not exceed the rate and acceleration limits, and it processes the command to the maximum
acceleration and rate limits if the limits are exceeded by the command. The CPP algorithm represents an integrator, rate and
acceleration limits, a variable-gain controller, and a feed-forward gain.
PP Controller
The position-loop model consists of the rate-loop model, PI and feed-forward controllers in azimuth and elevation,
command preprocessors in azimuth and elevation, and rate and acceleration limiters in azimuth and elevation.
The telescope rate limit is 1.0 deg/s, and the acceleration limit is 0.5 deg/s2, both in azimuth and elevation. The PI
controller gains were selected to minimize settling time and servo error in wind gusts. They also guarantee zero
steady-state error for constant rate tracking.
The PL control system consists of the LQG controller in the position loop and the PI Controller in the rate
loop.
In this case, the rate-loop model of the telescope is as shown before in the PP control.
The position loop is similar to the previous one, but the PI controllers are replaced with the LQG controllers. The
LQG controller structure is shown below. The controller includes the estimator, which is an analytical model of the
telescope.
PL
PP
PL Controller
The wind-gust simulations show 0.15-mdeg rms servo error in azimuth and 0.74-mdeg rms servo error
in elevation. These numbers are compared with the PP control system (0.35 mdeg in azimuth and 1.4
mdeg in elevation). This means that the LQG controller improves the servo error in wind over the PI
controller by a factor of 2.3 in azimuth and a factor of 1.9 in elevation.
LP Controller
The LP control system consists of the PID (proportional-integral-derivative) controller in the position loop
and the LQG controller in the rate loop.
The position-loop transfer functions for azimuth and elevation show a wide bandwidth of 200 Hz in azimuth and 20
Hz in elevation. The steady-state error due to rate offsets is zero. The wind-gust simulations for a 12-m/s wind
show 0.012-mdeg rms servo error in azimuth and 0.150-mdeg rms servo error in elevation. These small numbers
show that, as compared with the PP control system, the LQG controller in the rate loop improves the servo error
in wind by a factor of 30 in azimuth and a factor of 10 in elevation.
LL Controller (implemented in 2010)
Finally, consider the complete telescope control system with a LQG controller in the rate and
position loops. This is also a novel configuration in the antenna industry.
The rate loop is the same as for the LP control system. For the given rate loop, the position-loop
controller was designed to minimize the servo error in the wind gusts.
The position-loop characteristics are plotted below, it follows that the system settling time is 0.5 s, and
there is no overshoot in either azimuth or elevation. The bandwidth is 20 Hz in azimuth and 40 Hz in
elevation.
LL Controller
Measurement
input
X0 X k −1 X kP = AX k −1 + BU k + wk
P0 Pk −1 PkP = APk −1AT + Qk
Yk = CXkM + z k
Initial Prev.
State State
Xk PkP H
Xk KG = = AX k −1 + BU k + wk
Pk = [I − KG H ]P P HPkP H T + R
Pk k
X k = X kP + KG [Yk − HX kP ]
Update covariance Update state