Professional Documents
Culture Documents
Observers Intro2 1
Observers Intro2 1
– stability
– convergence rate
– command following
– disturbance rejection
– noise immunity ....
ẋ = Ax + B(−Kx + v) = (A − BK) x + Bv
| {z }
Ac
93
94
Perry
c Y.Li
• If σi are in conjugate pair (i.e. for complex poles, α ± jβ), then ā0 , ā1 , . . . , ān−1 are real
numbers; and vice versa.
• If any of the polynomial coefficients is non-positive (negative or zero), then one or more of
the roots have nonnegative real parts.
University of Minnesota ME 8281: Advanced Control Systems Design, 2001-2012 95
u = −Kx + v
K = [k0 , k1 , k2 ]
ẋ = Ax + B(−Kx + v) = (A − BK) x + Bv
| {z }
Ac
with
0 1 0
Ac = 0 0 1
−(a0 + k0 ) −(a1 + k1 ) −(a2 + k2 )
Thus, to place poles at σ1 , . . . , σn , choose
ā0 = a0 + k0 ⇒ k0 = ā0 − a0
ā1 = a1 + k1 ⇒ k1 = ā1 − a1
..
.
ān−1 = an−1 + kn−1 ⇒ kn−1 = ān−1 − an−1
det(λI − T −1 AT ) = det(λT −1 T − T −1 AT )
= det(T )det(T −1 )det(λI − A)
= det(λI − A)
96
Perry
c Y.Li
Theorem For the single input LTI system, ẋ = Ax + Bu, there is an invertible transformation
T that converts the system into controller canonical form if and only if the system is controllable.
Proof:
• “Only if”: If the system is not controllable, then using Kalman decomposition, there are modes
that are not affected by control. Thus, eigenvalues associated with those modes cannot be
changed. This means that we cannot transform the system into controller canonical form,
since otherwise, we can arbitrarily place the eigenvalues.
T = [v1 | v2 | v3 ]
0 1 0 0
A = T 0 0 1 T −1 ; B = T 0
−a0 −a1 −a2 1
This says that v3 = B.
Note that Az is determined completely by the characteristic equation of A.
0 1 0
AT = T 0 0 1 (4.1)
−a0 −a1 −a2
Now consider each column of (4.1) at a time, starting from the last. This says that:
A · v3 = v2 − a2 v3 , ⇒ v2 = Av3 + a2 v3 = AB + a2 B
Having found v2 , we can find v1 from the 2nd column from (4.1). This says,
A · v2 = v1 − a1 v3 ,
⇒ v1 = Av2 + a1 v3 = A2 B + a2 AB + a1 B
• Now we check if the first column in (4.1) is consistent with the v1 , v2 and v3 we had found.
It says:
A · v1 + a0 v3 = 0.
Is this true? The LHS is:
A · v1 + ao v3 =A3 B + a2 A2 B + a1 AB + a0 B
=(A3 + a2 A2 + a1 A + a0 I)B
Since ψ(s) = s3 +a2 s2 +a1 s+a0 is the characteristic polynomial of A, by the Cayley Hamilton
Theorem, ψ(A) = 0, so A3 + a2 A2 + a1 A + a0 I = 0. Hence, A · v1 + a0 v3 = 0.
University of Minnesota ME 8281: Advanced Control Systems Design, 2001-2012 97
• To complete the proof, we need to show that if the system is controllable, then T is non-
singular. Notice that
2
a1 a2 1
T = v1 v2 v3 = B AB A B a2 1 0
1 0 0
ψA (s) = det(sI − A)
• Define the target closed loop characteristic equation ψAc (s) = Πni=1 (s − σi ), where σi are the
desired pole locations.
vn = b
vn−1 = Avn + an−1 b
..
.
vk = Avk+1 + ak b
u = Kz z + v
u = Kx + v; K = Kz T −1 .
Example:
−1 2 −2 1 5
ẋ = 1 −2 4 x + 0u x(0) = 2
−5 −1 3 0 −1
y= 1 0 0 x
The open loop system is unstable, as A has eigenvalues −4.4641, 2.4641 and 2. The system response
to a unit step input is shown in Fig. 4.1.
• Characteristic equation of A
ψA (s) = s3 − 15s + 22 = 0
• Desired closed loop pole locations : (−2, −3, −4). Closed loop characteristic equation
6 5
x 10 x 10
2 7
0 6
5
−2
4
Output
States
−4
3
−6
x1 2
x2
−8 1
x3
−10 0
0 1 2 3 4 5 0 1 2 3 4 5
Time(sec) Time(sec)
• T = v1 v2 v3 . Using the procedure detailed above,
1 −1 −2
v3 = B = 0 v2 = 1 v1 = −23
0 −5 −11
−2 −1 1
T = −23 1 0
−11 −5 0
• Comparing the coefficients of ψA and ψAc , we obtain the gain vector Kz in transformed
coordinates
Kz = 2 41 9
• Feedback control
u = −Kx + v
where v is an exogenous input. In our example, v = 1 is the reference input, and the feedback
law is implemented as:
u = −Kx + gv
where g is a gain to be selected for reference tracking. Here it is selected as −11.98 to
compensate for the DC gain. As seen from Fig. 4.2, the output y reaches the target value of
1.
University of Minnesota ME 8281: Advanced Control Systems Design, 2001-2012 99
12 5
x1
10 4
x2
8 x3 3
6 2
Output
States
4 1
2 0
0 −1
−2 −2
−4 −3
0 1 2 3 4 5 0 1 2 3 4 5
Time(sec) Time(sec)
10
−10
Control input
−20
−30
−40
−50
−60
−70
0 2 4 6 8
Time(sec)
ẋ = −x + u
y=x
Innerloop
v1 v u y
g xdot x
C
− −
k
Outerloop
11 11
x 10 x 10
20 20
x1 x1
x2 x2
15 15 Open loop system with control
x x3
3 u1 = 1 and u2 = 1
10 10
States
States
0 0
−5 −5
0 2 4 6 8 0 2 4 6 8
Time(sec) Time(sec)
12
x 10
2
u1 = 1 and u2 = 1
Output
0.5
0
0 2 4 6 8
Time(sec)
• What the Hautus Keymann Theorem says is that it is possible after preliminary state feedback
using a matrix F . In fact, generally, most F matrices will make Ā = A − BF has distinct
eigenvalues. This makes it possible to avoid the parasitic situation mentioned above, so that
one can find g ∈ <m so that (Ā, Bg) is controllable.
Generally, eigenvalue assignment for a multiple input system is not unique. There will be
some possibilities of choosing the eigenvectors also. However, for the purpose of this class, we shall
use the optimal control technique to resolve the issue of choosing appropriate feedback gain K in
u = −Kx + v. The idea is that K will be picked based on some performance criteria, not to just
to be placed exactly at some a-priori determined locations.
Remark: LQ method can be used for approximates pole assignment (see later chapter).
Example:
−1 1 0 0 0
A = 1 −3 1 B = 1 1
0 1 −1 0 1
We see from Fig. 4.4 that the nominal system is unstable, and also the system is uncontrollable
by open loop step inputs. Let B = [b1 b2 ], then we see that (A, b1 ) is not controllable. We choose
102
Perry
c Y.Li
5 2
x1
x2
4 After implementing two−loop state feedback
x3 1.5
3
After implementing
1
two−loop state feedback
Output
States
2
0.5
1
0
0
−1 −0.5
0 2 4 6 8 0 2 4 6 8
Time(sec) Time(sec)
−5
Control Input
−15
u1
−20 u2
−25
0 2 4 6 8
Time(sec)
K = Kz T −1 = 0 9 −2
Note that for α = 0, Hα (t0 , t1 ) = Wc,[t0 ,t1 ] , the controllability (to zero) grammian.
Theorem If A(·) and B(·) are piecewise continuous and if there exists T > 0, hM ≥ hm > 0
s.t. for all t ≥ 0,
0 < hm I ≤ H0 (t, t + T ) ≤ hM I
then for any α > 0, the linear state feedback,
Example: Consider a subsystem having vibrational modes, which need to be damped out,
ẋ = A(t)x + B(t)u
y = Cx
0 −ω(t) 0
A(t) = B=
ω(t) 0 2 + 0.5 sin(0.5t)
C= 1 0
4 4
x
1
3 3
x2
2 2
1 1
States
Output
0 0
−1 −1
−2 −2
−3 −3
−4 −4
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
15 15
x
1
10 x2 10
5 5
Output
States
0 0
−5 −5
−10 −10
−15 −15
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.7: Nominal system state (left) and output (right) with open loop control
2 2
x1
x2
1.5 1.5
1 1
Output
States
0.5 0.5
0 0
−0.5 −0.5
−1 −1
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.8: Closed loop system state (left) and output (right) for α = 0.2
University of Minnesota ME 8281: Advanced Control Systems Design, 2001-2012 105
3.5 2
x1
3 x2
1.5
2.5
2 1
Output
States
1.5
1 0.5
0.5
0
0
−0.5 −0.5
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.9: Closed loop system state (left) and output (right) for α = 1.8
0.6 40
0.4
30
0.2
Control Input
Control Input
20
0
−0.2
10
−0.4
0
−0.6
−0.8 −10
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.10: Control input for α = 0.2 (left) and α = 1.8 (right)
3 1
0.5
E1 E1
2
0
1 −0.5
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
5 0.9
0.8
4.5
E2 E2 0.7
4
0.6
3.5 0.5
0 5 10 15 20 25 30 35 40 45 50
0 10 20 30 40 50
Time(sec) Time(sec)
2 20
x1 x1
x2 x2
|| x(t)eα t || tends to zero
1.5
|| x(t)eα t || tends to zero 15
1
exponential term
exponential term
10
0.5
5
0
0
−0.5
−1 −5
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Use MATLAB’s quad to compute the time-varying Hα (t, t + 4π). Here, the simulation is carried
out for α = 0.2, 1.8. Fig. 4.6 shows the unforced system, while Fig. 4.7 shows the nominal system
subject to unit step input. Figures 4.8 - 4.10 show the response of the closed loop state feedback
system. It is clear that the nominal system is unstable by itself, and the state feedback stabilizes
the closed loop system.
Remarks:
• Hα can be computed beforehand.
The least norm solution that steers a state x(t0 ) to x(t1 ) = 0 with respect to the cost function:
Z t1
J[t0 ,t1 ] = uT (τ )u(τ )exp(4α(τ − t0 ))dτ
t0
is:
u(τ ) = −e−4α(τ −t0 ) B T (τ )Φ(t0 , τ )T Hα (t0 , t1 )−1 x(t0 ).
and when evaluated at τ = t0 ,
Thus, the proposed control law is the least norm control evaluated at τ = t0 . By relating
this to a moving horizon [t0 , t1 ] = [t, t + T ], where t continuously increases, the proposed
control law is the moving horizon version of the least norm control. This avoids the difficulty
of receding horizon control where the control gain can become infinite when t → tf .
• Proof is based on a Lyapunov analysis typical of nonlinear control, and can be found in
[Desoer and Callier, 1990, p. 231]
University of Minnesota ME 8281: Advanced Control Systems Design, 2001-2012 107
ẋ = Ax + Bu
y = Cx
The observer problem is that given y(t) and u(t) can we determine the state x(t)?
Openloop observer
Suppose that A has eigenvalues on the LHP (stable). Then an open loop obsever is a simulation:
x̂˙ = Ax̂ + Bu
ė = Ae
(A − LC)T = AT − C T LT
We know how to do this, since this is the state feedback problem for:
ẋ = AT x + C T u, u = v − LT C.
108
Perry
c Y.Li
The condition in which the eigenvalues can be placed arbitrarily is that (AT , C T ) is controllable.
However, from the PBH test, it is clear that:
λI − A
AT CT
rank λI − = rank
C
the LHS is the controllability test, and the RHS is the observability test. Thus, the observer eigen-
values can be placed arbitrarily iff (A, C) is observable.
ẍ + 2ζωn ẋ + ωn2 x = u
where u = 3 + 0.5 sin(0.75t) is the control input, and ζ = 1, ωn = 1rad/s. The state space
representation of the system is
d x 0 1 0
= + u
dt ẋ −1 −2 1
y= 0 1 x
The observer gain L is computed by placing the observer poles at (−0.25 − 0.5).
0.875
L=
−1.25
See Fig. 4.13 for the plots of the observer states following and catching up with the actual system
states.
3.5 2.5
Actual system
3 2 Observer
2.5
1.5
Velocity
2
Position
1
1.5
0.5
1
Actual system
0.5 Observer 0
0 −0.5
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
ė = (A − LC)e
• Let ν(t) := y(t) − C x̂(t) be the innovation. Since ν(t) = Ce(t), the transfer function from
u(t) to ν(t) is 0.
• This has the significance that feedback control of the innovation of the form
where A − BK is stable, and Q(s) is any stable controller (i.e. Q(s) itself does not have any
unstable poles), is necessarily stable. In fact, any stabilizing controller is of this form! (see
Goodwin et al. Section 18.6 for proof of necessity)
where
Both T1 (s) and T2 (s) have the same denominator, which is the characteristic polynomial of
the observer dynamics, Ψobs (s) = det(sI − A + LC).
• With Y (s) given by Go (s)U (s) where Go (s) = C(sI − A)−1 B is the open loop plant model,
the transfer function from u(t) to X̂(t) is
i.e. the same as the open loop transfer function, from u(t) to x(t). In this sense, the observer
is unbiased.
text2 text3
text4
text1
As seen from Fig. 4.15, there is no effect of control u on the error e, and if the gain vector L is
designed (by separation principle, see below) such that the roots of characteristic polynomial
ψA−LC (s) = det(sI − A + LC)
are in the LHP, then the error tends asymptotically to zero. This means the observer has estimated
the system states to some acceptable level of accuracy. Now, the gain vector K can be designed to
implement feedback using the observer state:
u = v − K x̂
where v is an exogenous control.
• Separation principle - the set of eigenvalues of the complete system is the union of the
eigenvalues of the state feedback system and the eigenvalues of the observer system. Hence,
state feedback and observer can in principle be designed separately.
eigenvalues = eig(A − BK) ∪ eig(A − LC)
University of Minnesota ME 8281: Advanced Control Systems Design, 2001-2012 111
u x y-
ẋ = Ax + Bu C
- -
−
- x̂˙ = Ax̂ + Bu − LCe x̂- C h
-
- ?
?
?
u x y-
ẋ = Ax + Bu C
- -
e
ė = (A − LC)e
-
• Using observer state feedback, the transfer function from v to x is the same as in state
feedback system:
X(s) = (sI − (A − BK))−1 BV (s)
To see how the innovation process is used in observer state feedback, let us first look at the
transfer function form of the state feedback law. From (4.3), we can write
x̂˙ = (A − LC)x̂ + Bu + Ly
The expression for P (s) has been simplified using a matrix inversion lemma, see Goodwin, p. 522.
The nominal plant TF is
Cadj(sI − A)B B0 (s)
G0 (s) = =
det(sI − A) A0 (s)
The closed loop transfer function from V (s) to Y (s) is
Y (s) B0 (s)E(s)
=
V (s) A0 (s)L(s) + B0 (s)P (s)
B0 (s)
=
det(sI − A + BK)
B0 (s)
=
F (s)
From (4.4), we have
Therefore
A0 (s) B0 (s)
ν(s) = Y (s) − U (s)
E(s) E(s)
Augmenting (4.5) with innovation process (see Fig. 4.16),
v -hu x y
ẋ = Ax + Bu C
- - -
−6
h K
−6
- x̂ - − h
- ?
Q(s) - x̂˙ = Ax̂ + Bu − Lν C
6
ν(s)
Then
L(s) P (s) A0 (s) B0 (s)
U (s) = V (s) − Y (s) + Qu (s) Y (s) − U (s)
E(s) E(s) E(s) E(s)
The nominal sensitivity functions which define the robustness and performance criteria are
modified affinely by Qu (s):
For plants the are open loop stable with tolerable pole locations, we can set K − 0 so that
F (s) = A0 (s)
L(s) = E(s)
P (s) = 0
so that
B0 (s)
S0 (s) = 1 − Qu (s)
E(s)
B0 (s)
T0 (s) = Qu (s)
E(s)
Thus the design of Qu (s)(or Q(s)) can be used to directly influence the sensitivity functions.
ẍ + 2ζωn ẋ + ωn2 x = u
where u = 3 + 0.5 sin(0.75t) is the control input, and ζ = 1, ωn = 1rad/s. The state space
representation of the system is
d x 0 1 0
= + u
dt ẋ −1 −2 1
y= 0 1 x
The observer gain L is computed by placing the observer poles at (−0.25 − 0.5).
0.875
L=
−1.25
ẋ = Ax + B(u + d)
y = Cx
Assume that disturbance d(t) is unknown, but we know that it satisfies some differential equations.
This implies that d(t) is generated by an exo-system.
ẋd = Ad xd
d = Cd x d
Since,
Adj(sI − Ad )
D(s) = Cd (sI − Ad )−1 xd (0) = Cd xd (0)
det(sI − Ad )
where xd (0) is iniital value of xd (t = 0). Thus, the disturbance generating polynomial is nothing
but the characteristic polynomial of Ad ,
Γd (s) = det(sI − Ad )
Γd (s) = det(sI − Ad ) = s2 + ω 2
u = −d + v − Kx
where K is the state feedback gain. However, d(t) is generally unknown. Thus, we estimate it using
an observer. First, augment the plant model.
ẋ A BCd x B
= + u
ẋd 0 Ad xd 0
x
y= C 0
xd
Notice that the augmented system is not controllable from u. Nevertheless, if d has effect on y,
it is observable from y.
Thus, we can design an observer for the augmented system, and use the observer state for
feedback:
d x̂ A BCd x̂ B L1 x̂
= + u+ y− C 0
dt xˆd 0 Ad x̂d 0 L2 x̂d
x̂
u = −Cd x̂d + v − K x̂ = v − K Cd
x̂d
116
Perry
c Y.Li
where L = [LT1 , LT2 ]T is the observer gain. The controller can be simplified to be:
d x̂ A − BK − L1 C 0 x̂
=
x
dt d −L 2 C Ad x̂ d
−B L1 v
−
0 L2 y
x̂
u = − K Cd +v
x̂d
The y(t) → u(t) controller transfer function Gyu (s) has, as poles, eigenvalues of A − BK − L1 C
and of Ad . Since Γd (s) = det(sI − Ad ) the disturbance generating polynomial, the controller has
Γd (s) in its denominator.
This is exactly the Internal Model Principle.
Example: For the system
0 1 0
ẋ = x+ u
−1 −2 1
y= 0 1
The disturbance is a sinusoidal signal d(t) = sin(0.5t). The reference input is a constant step
v(t) = 3. The gains were designed to be:
K= 5 3
T T
L = LT1 LT2 = 2.2 0.44 2.498 −0.746
with observer poles at (−0.6 − 0.5 − 1.7 − 1.4). Figures 4.17 - 4.19 show the simulation results.
For a reference signal v(t) = 3 + 0.5 sin 0.75t, the results are shown in Figures 4.20 - 4.22. In this
case,
K = 0.75 2
T T
L = LT1 LT2 = −13.2272 6.7 8.2828 14.493
4 4
3 3
States
States
2 2
x with disturbance
1
0 0
−1 −1
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.17: States of (left)open loop system and (right)observer state feedback
4 4
with disturbance
without disurbance. 3.5
3.5 3
2.5
Output
Output
3 2
1.5
2.5 1
after disturbance estimation
0.5 without disturbance
2 0
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.18: Output of (left)open loop system and (right)observer state feedback
6 4
Disturbance signals
2
2 actual disturbance signal
1
0
0
open loop
−2
observer state feedback −1
disturbance signal
−4 −2
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
5 4
4 x1
3
3
observer state x after disturbance estimation
States
2 1
States
2
1 observer state x2 after disturbance estimate
1
x
2
0
0
−1 −1
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.20: States of (left)open loop system and (right)observer state feedback
4.5 4
with disturbance
without disturbance 3.5
4
3
3.5
2.5
Output
Output
3 2
1.5
2.5 after disturbance estimation
1 without disturbance
2
0.5
1.5 0
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.21: Output of (left)open loop system and (right)observer state feedback
6 4
3
4
disturbance estimate
Disturbance signals
Control Input
2
2
actual disturbance signal
1
0
0
open loop
−2
observer state feedback −1
disturbance signal
−4 −2
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
ẋ = Ax + Bu + Bd
y = Cx
ẋa = ATd xa + CdT y(t)
Notice that xa need not be estimated since it is generated by the controller itself!
The transfer function of the controller is: C(s) =
−1
sI − A + BKo + LC BKo L
Ko Ka
0 sI − Ad CdT
from which it is clear that the its denominator has Γd (s) = det(sI − Ad ) in it. i.e. the Internal
Model Principle.
An intuitive way of understanding this approach:
For concreteness, assume that the disturbance d(t) is a sinusoid with frequency ω.
• Suppose that the closed loop system is stable. This means that for any bounded input, any
internal signals will also be bounded.
• For the sake of contradiction, if some residual sinusoidal response in y(t) still remains:
α(s, 0)
Y (s) =
s2 + ω 2
Ka α(s, 0)
U (s) = −Ka Xa (s) =
s2 + ω 2
The time response of xa (t) is of the form
• Since d(t) is a bounded sinusoidal signal, xa (t) must also be bounded. This must mean that
y(t) does not contain sinusoidal components with frequency ω.
120
Perry
c Y.Li
4 4
x1 without disturbance
3
3
2 x1 after augmented state feedback
x1 without disturbance
States
States
1
x with disturbance x2 after augmented state feedback
1
0
1 x2 with disturbance
x2 without disturbance
−1 x2 without disturbance
0
−2
−1 −3
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.23: States of (left)open loop system and (right)augmented state feedback
The most usual case is to combat constant disturbances using integral control. In this case, the
augmented state is: Z t
xa (t) = y(τ )dτ.
0
It is clear that if the output converges to some steady value, y(t) → y∞ , y∞ must be 0. Or otherwise
xa (t) will be unbounded.
Example: Consider the same example as before. But this time, we do not use an observer to
estimate the disturbance. The dynamics is augmented to include a filter. The gains were selected
as:
T
L = 5.7 2.3
with the closed loop poles at (−2.1 − 1.2 − 2.3 − 0.6). The results are shown in Figures
4.23 - 4.25 for a constant reference input v(t) = 3. The filter state contains the frequency of the
disturbance signal, and hence the feedback law contains that frequency. Hence the control signal
cancels out the disturbance. This is seen from the output, which does not contain any sinusoidal
component.
University of Minnesota ME 8281: Advanced Control Systems Design, 2001-2012 121
4 3.5
with disturbance
without disurbance.
3
3.5
2.5
Output
Output
3 2
1.5
2.5 without disturbance
1 after augmented state feedback
2 0.5
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)
Figure 4.24: Output of (left)open loop system and (right)augmented state feedback
50 4
disturbance signal disturbance signal
open loop filter state
40 augmented state feedback 3
Filter state accurately captures
30 the frequency component of
Control Input
2 the disturbance
States
20
1
10
0
0
−10 −1
0 10 20 30 40 50 0 10 20 30 40 50
Time(sec) Time(sec)