SPL 08 Observer and Observer Based Compensator
SPL 08 Observer and Observer Based Compensator
Unggul Wasiwitono
Outline
1 Observers
2 Reduced-Order Observer
3 Observer-Based Compensator
Observers
Observers
For the n-dimensional linear time-invariant state equation
we define a linear state observer to also be an n-dimensional linear state equation that
accepts u(t) and y(t) as inputs and whose state represents the estimate of x(t).
which looks like a copy of the state equation (1) driven by an error term y (t) − ŷ (t) that
enters the dynamics through an n × p observer gain matrix L.
x̂0
+
+ x̂˙ (t) Z x̂ (t) ŷ (t) −
B Σ C Σ
+
+
A
x̂ (t)
L
Observer
The error term y (t) − ŷ (t) is intended to drive the state estimate x̂(t) to the actual state
x(t) over time.
Define the estimation error x̃ (t) = x (t) − x̂ (t) in terms of which we derive the error
dynamics
for which the initial state is given by x̃0 = x (0) − x̂ (0) = x0 − x̂0
Since the error dynamics specify a homogeneous linear state equation, if we could
initialize the observer by x̂ (0) = x̂0 = x0 to yield zero initial error x̃ (0) = 0, then x̃ (t) ≡ 0
and thus x̂ (t) = x (t) for all t ≥ 0
However, since the initial state x(0) = x0 , is presumably unknown, we cannot achieve
perfect estimation, so we set our sights on generating an asymptotically convergent
estimate starting with any initial error.
be asymptotically stable.
The error dynamics will be asymptotically stable if and only if the matrix A − LC that
governs the error dynamics has strictly negative real-part eigenvalues.
The problem of choosing the observer gain vector L to place the eigenvalues of
A − LC at desirable locations
is equivalent
to the fundamental problem of choosing the state feedback gain matrix LT to locate
the eigenvalues of AT − C T LT .
Theorem 1
For any symmetric set of n complex numbers {µ1 , µ2 , · · · , µn }, there exists an observer
gain matrix L such that σ(A − LC) = {µ1 , µ2 , · · · , µn } if and only if the pair (A, C) is
observable.
α (s) = (s − µ1 ) (s − µ2 ) · · · (s − µn )
= sn + αn−1 sn−1 + · · · + α2 s2 + α1 s + α0
0 0 ··· 0 −α0
1 0 ··· 0 −α1
AOCF − LOCF COCF =
0 1 ··· 0 −α2
.. .. .. ..
..
. . . . .
0 0 ··· 1 −αn−1
Bass-Gura Formula
Given the observable pair (A, C), that corresponding to the controllable pair (AT , C T ),
is such that
sI − AT − LT C T = sn + αn−1 sn−1 + · · · + α2 s2 + α1 s + α0
Bass-Gura Formula
is symmetric
Bass-Gura Formula
we obtain the Bass-Gura formula for the observer gain vector, that is,
−1
a1 a2 ··· an−1 1 α0 − a0
a2 a3 ··· 1 0 α1 − a1
.. .. .. ..
L =
.. Q(A, C)
α2 − a2
. . . . .
..
an−1 1 ··· 0 0 .
1 0 ··· 0 0 αn−1 − an−1
Example
ẋ1 (t) 0 1 0 x1 (t) 0
ẋ2 (t) = 0 0 1 x2 (t) + 0 u (t)
ẋ3 (t) −4 −4 −1 x2 (t) 1
x1 (t)
y (t) = 1 0 0 x2 (t)
x2 (t)
Example
so that the desired characteristic polynomial and associated polynomial coefficients are
α (s) = (s + 1) (s + 2) (s + 3)
= s3 + 6s2 + 11s + 6
Example
Checking
−5 1 0
A − LC = −2 0 1
16 −4 −1
has eigenvalue {−1, −2, −3}. The asymptotic state observer is given by
˙
x̂1 (t) −5 1 0 x̂1 (t) 0 5
x̂˙ 2 (t) = −2 0 1 x̂2 (t) + 0 u (t) + 2 y (t)
x̂˙ 3 (t) 16 −4 −1 x̂3 (t) 1 −20
Example
Ackermann’s Formula
Given the observable pair (A, C), that corresponding to the controllable pair (AT , C T ),
−1
LT = 0 0 · · · 0 1 P(A T
T , CT )α A
Using
n n−1 2 T
α AT = AT + αn−1 AT + · · · + α2 AT + α1 AT + α0 I = [α (A)]
T
= [α (A)]
T
we obtain α AT = α (A), which along with
h iT h i−1
−1
P(A T , CT )
T
= P(AT , CT ) = Q−1
(A, C)
Ackermann’s Formula
gives
0
0
..
L= α (A) Q−1
(A, C)
.
0
1
Reduced-Order Observer
Reduced-Order Observer
The observer design presented earlier has dimension equal to that of the original state
equation and therefore is referred to as a full-order observer.
Suppose that the state vector can be decomposed into
x1 (t)
x (t) =
x2 (t)
Reduced-Order Observer
That x1 (t) is determined directly from y(t), we consider an estimate of the form
in which w(t) is generated by the following (n − p)-dimensional state equation having y(t)
and u(t) as inputs, that is,
ẇ (t) = Jw (t) + N y (t) + M u (t)
As in the full-order observer case, we consider the estimation error
x̃1 (t) x1 (t) − x̂1 (t)
x̃ (t) = =
x̃2 (t) x2 (t) − x̂2 (t)
Since x̂1 (t) ≡ x1 (t), we have x̃1 (t) ≡ 0, and we need only consider the dynamics
governing x̃2 (t), that is,
Reduced-Order Observer
By substituting
Reduced-Order Observer
J = A22 − LA12
N = A21 + JL − LA11
M = B2 − LB1
which results in
x̃˙ 2 (t) = J x̃2 (t) = (A22 − LA12 ) x̃2 (t)
To ensure that x̃2 (t) tends to zero as time tends to infinity for all x̃2 (0), its required that
J = A22 − LA12 has strictly negative real-part eigenvalues.
U. Wasiwitono [Linear System Control] - Observers and Observer-Based Compensators
26 / 46
Observers Reduced-Order Observer Observer-Based Compensator Steady-State Tracking with Observer-Based Compensator
Reduced-Order Observer
Proposition 2
The pair (A22 , A12 ) is observable if and only if the pair
A11 A12
, I 0
A21 A22
is observable.
Example
Upon selecting desired eigenvalues {−5, −5} yielding the desired characteristic
polynomial
α (s) = s2 + 10s + 25
Example
Ackermann’s formula gives the observer gain vector
0
L = α (A22 ) Q−1
2 1
2 ! −1
0 1 0 1 1 0 1 0 0 9
= + 10 · + 25 · =
−4 −1 −4 −1 0 1 0 1 1 12
With
−9 1
J = A22 − LA12 =
−16 −1
−69
N = A21 + JL − LA11 =
−160
0
M = B2 − LB1 =
1
Example
Observer-Based Compensator
Observer-Based Compensator
1 Controllability of the pair (A, B) is necessary and sufficient for arbitrary eigenvalue placement
by state feedback
u (t) = −Kx (t) + r (t)
2 Observability of the pair (A, C) is necessary and sufficient for state estimation via
What happens if we combine these results by replacing the true state vector x(t) in
the state feedback control law with the state estimate x̂ (t) produced by the observer
to yield
Observer-Based Compensator
r (t) + u (t) y (t)
Σ Plant x(t)
−
x̂0
+
+ x̂˙ (t) Z x̂ (t) ŷ (t) −
B Σ C Σ
+
+
K A
L
x̂ (t)
Observer
U. Wasiwitono [Linear System Control] - Observers and Observer-Based Compensators
33 / 46
Observers Reduced-Order Observer Observer-Based Compensator Steady-State Tracking with Observer-Based Compensator
Observer-Based Compensator
This interconnection of a state feedback control law and a state observer results in a
dynamic observer-based compensator given by the state equation
or
Observer-Based Compensator
The feedback interconnection of the open-loop state equation and the observer-based
compensator yields the 2n-dimensional closedloop state equation
ẋ (t) A −BK x (t) B
= + r (t)
x̂˙ (t) LC A − BK − LC x̂ (t) B
x (0) x0
=
x̂ (0) x̂0
x (t)
y (t) = C 0
x̂ (t)
Although the gain matrices K and L can be chosen to solve their respective eigenvalue
placement problems, it is not yet clear how this relates to closed-loop stability, which involves
the 2n eigenvalues of
A −BK
LC A − BK − LC
U. Wasiwitono [Linear System Control] - Observers and Observer-Based Compensators
35 / 46
Observers Reduced-Order Observer Observer-Based Compensator Steady-State Tracking with Observer-Based Compensator
Observer-Based Compensator
To investigate further, we consider the coordinate transformation
x (t) I 0 x (t) x (t) I 0 x (t)
= ; =
x̃ (t) I −I x̂ (t) x̂ (t) I −I x̃ (t)
which has the effect of replacing the observer state x̂ (t) with the observer error x̃ (t) as
part of the 2n-dimensional closed-loop state vector.
This transformation satisfies T −1 = T
Observer-Based Compensator
and
Observer-Based Compensator
This indicates that the 2n closed-loop eigenvalues can be placed by separately and
independently locating eigenvalues of A − BK and A − LC via choice of the gain
matrices K and L, respectively.
Observer-Based Compensator
We generally require the observer error to converge faster than the desired closed-loop
transient response dynamics. Therefore, we choose the eigenvalues of A − LC to be about 10
times farther to the left in the complex plane than the (dominant) eigenvalues of A − BK.
which is exactly the same closed-loop transfer function that results from a direct
application of state feedback.
Transfer functions in general characterize input-output behavior for zero initial state.
replace the observer state x̂ (t) with the observer error x̃ (t) = x (t) − x̂ (t), the observer
error dynamics are given by
x̃˙ (t) = (A − LC) x̃ (t)
This leads to
ẋ (t) A − BK BkI −BK x (t) 0
ξ˙ (t) = −C 0 0 ξ (t) + 1 r (t)
x̃˙ (t) 0 0 A − BK − LC x̃ (t) 0
x (t)
y (t) = C 0 0 ξ (t)
x̃ (t)