Topic #16
16.31 Feedback Control
State-Space Systems
Open-loop Estimators
Closed-loop Estimators
Observer Theory (no noise) — Luenberger
IEEE TAC Vol 16, No. 6, pp. 596—602, December 1971.
Estimation Theory (with noise) — Kalman
Copyright 2001 by Jonathan How.
1
Fall 2001 16.31 16—1
Estimators/Observers
Problem: So far we have assumed that we have full access to the
state x(t) when we designed our controllers.
— Most often all of this information is not available.
Usually can only feedback information that is developed from the
sensors measurements.
— Could try “output feedback”
u = Kx ? u =
?
Ky
— Same as the proportional feedback we looked at at the beginning
of the root locus work.
— This type of control is very di?cult to design in general.
Alternative approach: Develop a replica of the dynamic sys-
tem that provides an “estimate” of the system states based on the
measured output of the system.
New plan:
1. Develop estimate of x(t)thatwillbecalled?x(t).
2. Then switch from u = ?Kx(t)tou = ?K?x(t).
Two key questions:
— How do we find ?x(t)?
— Will this new plan work?
Fall 2001 16.31 16—2
Estimation Schemes
Assume that the system model is of the form:
˙x = Ax + Bu , x(0) unknown
y = Cx
where
1. A, B,andC are known.
2. u(t)isknown
3. Measurable outputs are y(t)fromC 6= I
Goal: Develop a dynamic system whose state
?x(t)=x(t)
for all time t ≥ 0. Two primary approaches:
— Open-loop.
— Closed-loop.
Open-loop Estimator
Given that we know the plant matrices and the inputs, we can just
perform a simulation that runs in parallel with the system
˙
?x(t)=A?x + Bu(t)
Then ?x(t) ≡ x(t) ? t provided that ?x(0) = x(0)
Major Problem: We do not know x(0)
Fall 2001 16.31 16—3
Analysis of this case:
˙x(t)=Ax + Bu(t)
˙
?x(t)=A?x + Bu(t)
Define the estimation error ?x(t)=x(t)? ?x(t).
Now want ?x(t)=0? t. (But is this realistic?)
Subtract to get:
d
dt
(x? ?x)=A(x? ?x) ?
˙
?x(t)=A?x
which has the solution
?x(t)=e
At
?x(0)
— Gives the estimation error in terms of the initial error.
Fall 2001 16.31 16—4
Does this guarantee that ?x =0? t?
Or even that ?x → 0ast →∞ ? (which is a more realistic goal).
— Response is fine if ?x(0)=0.Butwhatif?x(0) 6=0?
If A stable, then ?x → 0ast →∞ ,butthedynamicsoftheestima-
tion error are completely determined by the open-loop dynamics of
the system (eigenvalues of A).
— Could be very slow.
— No obvious way to modify the estimation error dynamics.
Open-loopestimationdoesnotseemtobeaverygoodidea.
Closed-loop Estimator
An obvious way to fix this problem is to use the additional informa-
tion available:
— How well does the estimated output match the measured output?
Compare: y = Cx with ?y = C?x
— Then form ?y = y ? ?y ≡ C?x
Fall 2001 16.31 16—5
Approach: Feedback ?y to improve our estimate of the state. Basic
form of the estimator is:
˙
?x(t)=A?x(t)+Bu(t)+L?y(t)
?y(t)=C?x(t)
where L is the user selectable gain matrix.
Analysis:
˙
?x = ˙x?
˙
?x =[Ax + Bu]?[A?x + Bu+ L(y ? ?y)]
= A(x? ?x)?L(Cx?C?x)=A?x?LC?x =(A?LC)?x
So the closed-loop estimation error dynamics are now
˙
?x =(A?LC)?x with solution ?x(t)=e
(A?LC)t
?x(0)
Bottom line: Can select the gain L to attempt to improve the
convergence of the estimation error (and/or speed it up).
— But now must worry about observability of the system model.
Fall 2001 16.31 16—6
Note the similarity:
— Regulator Problem: pick K for A?BK
3 Choose K ∈R
1×n
(SISO) such that the closed-loop poles
det(sI ?A + BK)=Φ
c
(s)
are in the desired locations.
— Estimator Problem: pick L for A?LC
3 Choose L ∈R
n×1
(SISO) such that the closed-loop poles
det(sI ?A + LC)=Φ
o
(s)
are in the desired locations.
Theseproblemsareobviouslyverysimilar—infacttheyarecalled
dual problems.
Fall 2001 16.31 16—7
Estimation Gain Selection
For regulation, were concerned with controllability of (A,B)
For a controllable system we can place the eigenvalues
of A?BK arbitrarily.
For estimation, were concerned with observability of pair (A,C).
For a observable system we can place the eigenvalues
of A?LC arbitrarily.
Test using the observability matrix:
rank M
o
, rank
?
?
?
?
?
?
?
C
CA
CA
2
.
.
.
CA
n?1
?
?
?
?
?
?
?
= n
The procedure for selecting L is very similar to that used for the
regulator design process.
Write the system model in observer canonical form
?
?
˙x
1
˙x
2
˙x
3
?
?
=
?
?
?a
1
1 0
?a
2
0 1
?a
3
00
?
?
?
?
x
1
x
2
x
3
?
?
+
?
?
b
1
b
2
b
3
?
?
u
y =
£
1 00
¤
?
?
x
1
x
2
x
3
?
?
Fall 2001 16.31 16—8
Now very simple to form
A?LC =
?
?
?a
1
1 0
?a
2
0 1
?a
3
00
?
?
?
?
?
l
1
l
2
l
3
?
?
£
1 00
¤
=
?
?
?a
1
?l
1
1 0
?a
2
?l
2
0 1
?a
3
?l
3
00
?
?
— The closed-loop poles of the estimator are at the roots of
det(sI ?A + LC)=s
3
+(a
1
+ l
1
)s
2
+(a
2
+ l
2
)s +(a
3
+ l
3
)=0
So we have the freedom to place the closed-loop poles as desired.
— Task greatly simplified by the selection of the state-space model
used for the design/analysis.
Fall 2001 16.31 16—9
Another approach:
— Note that the poles of (A?LC)and(A?LC)
T
are identical.
— Also we have that (A?LC)
T
= A
T
?C
T
L
T
— So designing L
T
for this transposed system looks like a standard
regulator problem (A?BK)where
A ? A
T
B ? C
T
K ? L
T
So we can use
K
e
= acker(A
T
,C
T
,P) ,L≡ K
T
e
Note that the estimator equivalent of Ackermann’s formula is that
L = Φ
e
(s)M
?1
o
?
?
?
?
?
0
.
.
.
0
1
?
?
?
?
?
Fall 2001 16.31 16—10
Estimators Example
Simple system
A =
?
?11.5
1 ?2
?
,B=
?
1
0
?
,x(0) =
?
?0.5
?1
?
C =
£
1 0
¤
,D=0
— Assume that the initial conditions are not well known.
— System stable, but λ
max
(A)=?0.18
— Test observability:
rank
?
C
CA
?
= rank
?
1 0
?11.5
?
Use open and closed-loop estimators
— Since the initial conditions are not well known, use
?x(0) =
?
0
0
?
Open-loop estimator:
˙
?x = A?x + Bu
?y = C?x
Closed-loop estimator:
˙
?x = A?x + Bu+ L?y = A?x + Bu+ L(y ? ?y)
=(A?LC)?x + Bu+ Ly
?y = C?x
— Which is a dynamic system with poles given by λ
i
(A ? LC)
and which takes the measured plant outputs as an input and
generates an estimate of x.
Fall 2001 16.31 16—11
Typically simulate both systems together for simplicity
Open-loop case:
˙x = Ax + Bu
y = Cx
˙
?x = A?x + Bu
?y = C?x
?
?
˙x
˙
?x
?
=
?
A 0
0 A
??
x
?x
?
+
?
B
B
?
u,
?
x(0)
?x(0)
?
=
?
?
?
?
?
?0.5
?1
0
0
?
?
?
?
?
?
y
?y
?
=
?
C 0
0 C
??
x
?x
?
Closed-loop case:
˙x = Ax + Bu
˙
?x =(A?LC)?x + Bu+ LCx
?
?
˙x
˙
?x
?
=
?
A 0
LC A?LC
??
x
?x
?
+
?
B
B
?
u
Example uses a strong u(t)toshakethingsup
Fall 2001 16.31 16—12
Figure 1: Open-loop estimator. Estimation error converges to zero, but very
slowly.
0 0.5 1 1.5 2 2.5 3 3.5 4
?1
?0.5
0
0.5
1
Open loop estimator
states
time
x1
x2
0 0.5 1 1.5 2 2.5 3 3.5 4
?1
?0.5
0
0.5
1
time
estimation error
Figure 2: Closed-loop estimator. Convergence looks much better.
0 0.5 1 1.5 2 2.5 3 3.5 4
?1
?0.5
0
0.5
1
Closed?loop estimator
states
time
x1
x2
0 0.5 1 1.5 2 2.5 3 3.5 4
?1
?0.5
0
0.5
1
time
estimation error
Fall 2001 16.31 16—13
WheretoputtheEstimatorPoles?
Location heuristics for poles still apply — use Bessel, ITAE, ...
— Maindi?erence: probablywanttomaketheestimatorfaster than
you intend to make the regulator — should enhance the control,
which is based on ?x(t).
— ROT: Factor of 2—3 in the time constant ζω
n
associated with the
regulator poles.
Note: When designing a regulator, were concerned with “band-
width” of the control getting too high ? often results in control
commands that saturate the actuators and/or change rapidly.
Di?erent concerns for the estimator:
— Loop closed inside computer, so saturation not a problem.
— However, the measurements y are often “noisy”, and we need to
be careful how we use them to develop our state estimates.
? High bandwidth estimators tend to accentuate the e?ect of
sensing noise in the estimate.
— State estimates tend to “track” the measurements, which are
fluctuating randomly due to the noise.
? Low bandwidth estimators have lower gains and tend to rely
more heavily on the plant model
— Essentially an open-loop estimator — tends to ignore the mea-
surements and just uses the plant model.
Fall 2001 16.31 16—14
Can also develop an optimal estimator for this type of system.
— Which is apparently what Kalman did one evening in 1958 while
taking the train from Princeton to Baltimore...
— Balances e?ect of the various types of random noise in the
system on the estimator:
˙x = Ax + Bu+ B
w
w
y = Cx+ v
where:
3 w is called “process noise” — models the uncertainty in the
system model.
3 v is called “sensor noise” — models the uncertainty in the
measurements.
A symmetric root locus exists for the optimal estimator.
— Define G
yw
(s)=C(sI ?A)
?1
B
w
≡ N(s)/D(s)
— SRL for the closed-loop poles λ
i
(A?LC) of the estimator which
are the LHP roots of:
D(s)D(?s)±
R
w
R
v
N(s)N(?s)=0
where R
w
and R
v
are, in some sense, associated with the sizes of
the process/sensor noise (spectral density).
— Pick sign to ensure that there are no poles on the jω-axis.
Fall 2001 16.31 16—15
Relative size of the noises determine where the poles will be located.
— Similar to role of control cost in LQR problem.
As R
w
/R
v
→ 0, the n polesgotothe
1. LHP poles of the system
2. Reflection of the RHP poles of the system about the jω-axis.
— The “relatively noisy” sensor case
? Closed-loop estimator essentially reverts back to
the open-loop case (but must be stable).
— Low bandwidth estimator.
As R
w
/R
v
→∞ ,then poles go to
1. LHP zeros (and reflections of the RHP zeros) of G
yw
(s).
2. ∞ along the Butterworth patterns — same as regulator case
— The “relatively clean” sensor case
? Closed-loop estimator poles go to very high band-
width to take full advantage o the information in y.
— High bandwidth estimator.
If you know R
w
and R
v
, then use them in the SRL, but more
often than not we just use them as “tuning” parameters to
develop low → high bandwidth estimators.
— Typically fix R
w
and tune estimator bandwidth using R
v
Fall 2001 16.31 16—16
Final Thoughts
Note that the feedback gain L in the estimator only stabilizes the
estimation error.
— If the system is unstable, then the state estimates will also go to
∞ , with zero error from the actual states.
Estimation is an important concept of its own.
— Not always just “part of the control system”
— Critical issue for guidance and navigation system
More complete discussion requires that we study stochastic pro-
cesses and optimization theory.
Estimation is all about which do you trust more: your
measurements or your model.