You are on page 1of 17

Modern Control

State Estimation: Full-order Observers

Pablo Zometa – Mechatronics Department – GIU Berlin 1


State estimation problem

To implement a full-state feedback controller, we need all state


variables in the vector x. In general, we do not have information of
the full state x of a system. We do have measurements that are
represented by the output variable y.

In general, a system follows an unknown dynamic ẋ = f (x, u),


which is approximated by x̂˙ = Ax̂ + Bu.

u x y
ẋ = f (x, u) C


−K Observer

Pablo Zometa – Mechatronics Department – GIU Berlin 2


Open-loop estimation
If we had exact knowledge of the system dynamics, (i.e., our model
ẋ = Ax + Bu exactly predicts the future values of x(t)), and exact
knowledge of the initial state x(0), then, we can estimate the state
of the system at any time t by:
Z t
x̂(t) = x(0) + Ax(τ ) + Bu(τ )dτ
0

Unfortunately, in real applications, neither the model is exact, nor


the initial state is known exactly. So, the above integration will
make the value x̂(t) diverge from the true system state x(t).

In general, we cannot really known the true value of x(t). All we


can do is to get a good estimation x̂(t), such that the state
estimation error x̃(t) = x̂(t) − x(t) remains small.

Pablo Zometa – Mechatronics Department – GIU Berlin 3


Open-loop state estimation

u x y
Plant: ẋ = f (x, u) C

x̂ ŷ
Model: ẋ = Ax + Bu C

Pablo Zometa – Mechatronics Department – GIU Berlin 4


Open-loop state estimation
Lets assume for a moment that we have perfect knowledge of the
system dynamics. The dynamics of the error x̃ = x̂ − x is
x̃˙ = x̂˙ − ẋ
= Ax̂ + Bu − (Ax + Bu)
= A(x̂ − x)
x̃˙ = Ax̃, with x̃(0) = x̂(0) − x(0)
The initial error in the state estimation x̃(0) may be large. If this
system is stable (as determined by A), then the error will converge
to zero at the same rate as the dynamics of ẋ = Ax.
In general, we want to
lim x̃(t) → 0
t→∞

independently of if A is stable, and a faster rate than the natural


dynamics of the system. To achieve that, we need to rely on
feedback.
Pablo Zometa – Mechatronics Department – GIU Berlin 5
Example: linearized pendulum
The equations of motion for an ideal pendulum are:

τ g 1
θ̈ + sin θ = τ,
ℓ mℓ2
ℓ with the state variables x = [θ θ̇], and the input
u = τ (torque applied by a motor). We can
θ represent this nonlinear system (our plant) as
m
ẋ = f (x, u). The output y = θ is measured trough
an encoder on the motor.
A linearized model around the equilibrium point at the bottom is:
   
0 1 0
ẋ = Ax + Bu = x + 1 u,
− gℓ 0 mℓ2

and C = [1 0], D = 0.

Pablo Zometa – Mechatronics Department – GIU Berlin 6


Example: linearized pendulum, open-loop estimation
The true state of the system is given by x = [θ θ̇]T , and the state
ˆ
estimation x̂ = [θ̂ θ̇]T . The initial condition is x̂(0) = x(0) = [0.2 0]T .

0.2

0
θ̂
−0.2 θ
0 1 2 3 4 5 6 7 8 9 10

0
˙
θ̂
−2 θ̇
0 1 2 3 4 5 6 7 8 9 10
Pablo Zometa – Mechatronics Department – GIU Berlin 7
Example: linearized pendulum, open-loop estimation

Same as before, but the initial condition is x̂(0) = x(0) = [0.5 0]T .
0.5

0
θ̂
−0.5 θ
0 1 2 3 4 5 6 7 8 9 10

0
˙
θ̂
−5 θ̇
0 1 2 3 4 5 6 7 8 9 10

Pablo Zometa – Mechatronics Department – GIU Berlin 8


Example: linearized pendulum, open-loop estimation
The initial condition of the estimation x̂(0) = [0 0]T , differs from the
true initial state x(0) = [0.5 0]T .
0.5

0
θ̂
−0.5 θ
0 0.5 1 1.5 2 2.5 3

0
˙
θ̂
−5 θ̇
0 0.5 1 1.5 2 2.5 3

Pablo Zometa – Mechatronics Department – GIU Berlin 9


State estimation: Full-order observer
Although we have no knowledge of the full state x, we in general
know the output variable y through measurements. Recall that the
state and output are related by the algebraic equation y = Cx
(assuming for simplicity D = 0).

Similarly, we can build an estimation of the output ŷ from our


estimated state x̂, i.e., ŷ = C x̂. By feeding back this difference in
the error dynamics we get:
x̂˙ = Ax̂ + Bu + L(y − C x̂)
where L = [l1 , l2 , . . . , ln ]T . The dynamics of the error x̃ are thus
x̃˙ = x̂˙ − ẋ
= Ax̂ + Bu + L(y − C x̂) − (Ax + Bu)
= A(x̂ − x) + L(Cx − C x̂)
= Ax̃ − LC x̃
˙x̃ = (A − LC)x̃
Pablo Zometa – Mechatronics Department – GIU Berlin 10
State estimation: Full-order observer (cont.)
Note that this new error dynamic

x̃˙ = (A − LC)x̃

has the same structure as the full-state feedback ẋ = (A − BK)u,


so the same methods used to build K, can be used to build the
matrix L, but using C instead of B.

In general, we select the eigenvalues of A − LC such that


x̃˙ = (A − LC)x̃ is stable, and has faster dynamics than A, i.e.,
x̃(t) → 0 faster relative to rate of change of x(t).

Note that in practice, ẋ = Ax + Bu is only an approximation of


the true dynamics ẋ = f (x, u) of the system. Nevertheless, if the
approximation is good enough, the error dynamics will be stable
and remain small.

Pablo Zometa – Mechatronics Department – GIU Berlin 11


Design of Full-order observer
Using duality arguments, we can directly use e.g., Ackermann’s formula
to find the gain matrix K = LT for the dual system ż = AT z + C T u.
First, we select the desired poles of the closed-loop system, and obtain a
characteristic polynomial Γ(s). For the dual system, the Ackermann
formula gives
K = [0 0 · · · 0 1] C −1 Γ(AT )
with C the controllability matrix of the open-loop pair (AT , C T ), and
Γ(AT ) the characteristic polynomial using the open-loop system matrix
AT as parameter.
By selecting negative poles, stability is guaranteed for the closed loop
system ż = AT z − C T Kz = (AT − C T K)z = Âz. From duality, the
original system can be recovered by taking the transpose of Â, that is:
ÂT = (AT − C T K)T = A − K T C = A − LC, with K T = L
Our original system is x̃˙ = ÂT x̃ = (A − LC)x̃. Because dual systems
have the same eigenvalues, our state estimator is stable.
Recall that Ackermann’s formula only applies if the system in
consideration (i.e., the dual in this case) is controllable. That means, the
original system must be observable.
Pablo Zometa – Mechatronics Department – GIU Berlin 12
Example: linearized pendulum, full-order observer estimation
The initial condition of the estimation x̂(0) = [0 0]T , differs from the
true initial state x(0) = [0.5 0]T .
0.5 θ
θ̂
0

−0.5
0 0.5 1 1.5 2 2.5 3

0
θ̇
˙
−5 θ̂
0 0.5 1 1.5 2 2.5 3

Pablo Zometa – Mechatronics Department – GIU Berlin 13


Separation principle
Consider the system controlled using a full-state feedback control.
The controller uses the estimated state x̂ computed by a full-order
observer. The dynamics of this system are:
ẋ = Ax − BK x̂
= Ax − BK(x − x̃)
= (A − BK)x + BK x̃
which results in the following extended state-space representation
    
ẋ A − BK BK x
˙x̃ = 0 A − LC x̃
The characteristic polynomial of the above system is given by
 
sI − A + BK BK
det
0 sI − A + LC
the determinant of a block triangular matrix satisfies:
det(sI − A + BK) det(sI − A + LC) = Γc (s)Γo (s) = 0
Pablo Zometa – Mechatronics Department – GIU Berlin 14
Separation principle (cont.)

det(sI − A + BK) det(sI − A + LC) = Γc (s)Γo (s) = 0


This implies that the poles of the resulting controller+observer
system are the combination of the controller poles and observer
poles. Each set of poles of the controller can be selected
independently of the poles of the observer, and vice versa. The
selection of the controller poles does not affect the dynamic of the
observer, and vice versa. This is called the separation principle.

u x y
ẋ = f (x, u) C


−K x̂˙ = Ax̂ + Bu + L(y − C x̂)

Pablo Zometa – Mechatronics Department – GIU Berlin 15


Example: linearized pendulum, estimation and control
The initial condition of the estimation x̂(0) = [0 0]T , differs from the
true initial state x(0) = [0.5 0]T . At time t = 1, a full-state feedback
controller is activated.

0.5 θ
θ̂
0

−0.5
0 0.5 1 1.5 2 2.5 3

0
θ̇
˙
−5 θ̂
0 0.5 Pablo Zometa
1 – Mechatronics
1.5Department – 2GIU Berlin 2.5 3 16
Detectable and Stabilizable Systems

Recall from previous lectures, that a system that is not controllable


is said to be stabilizable if all the uncontrollable modes are already
stable, and all the unstable modes are controllable.

A system that is not observable is said to be detectable if all the


unobservable modes are already stable, and all the unstable modes
are observable.

The principles of full-state feedback and full-order observers can be


applied to stabilizable and detectable systems, respectively.
However, only the controllable/observable subsystems are used for
the design of the controller/observer.

Pablo Zometa – Mechatronics Department – GIU Berlin 17

You might also like