You are on page 1of 8

1

Dr. Oishi
Electrical and Computer Engineering
University of British Columbia, BC
http://courses.ece.ubc.ca/360
eece360.ubc@gmail.com
EECE 360
Lecture 28
Chapter 11.1-11.6, 11.9,
11.10
State Feedback
EECE 360, v2.4 EECE 360, v2.4
2
Todays lecture
! Review
! Controllability test
! Ackermanns formula for controller design
! Today
! Observability
! Observerability test
! Observer design through Ackermanns
! Separation principle
! Combining observers and controllers
EECE 360, v2.4
3
Review: Controllability
! The eigenvalues of (A-BK) can be arbitrarily assigned
when the system [A,B,C,D] is controllable.
! A system is controllable if there exists a control u(t)
that can transfer any initial state x(0) to any desired
state x(t) in a finite time T.
! The controllability matrix
must have rank n for the system [A,B,C,D] to be
controllable. (S
C
is full-rank.)
! When S
C
is full-rank, det(S
C
)!0

!
S
C
= [B AB A
2
B ! A
n"1
B]
EECE 360, v2.4
4
Review: Ackermanns Formula
! The state feedback gain matrix
that produces the desired characteristic equation
is given by
where
1
1
( )
n n
n
q s s s ! !
"
= + + + !
1 2 3
[ ] where ( ) ( ) ( ) K k k k u t r t Kx t = ! ! " =
n
[ ]
1
0 0 1 ( ) K S q A
!
= !
C
1 1
1
[ ] and ( )
n n n
n
S B AB A B q A A A I ! !
" "
= = + + + ! !
C

EECE 360, v2.4
5
Output feedback
! Often, it is not feasible or even possible to
measure all components of the state directly
! The output encapsulates a subset of the
states which can be measured.
! For example, in the spring-mass-damper
system, only the position of the mass is
measured
! In this case, the remaining states must be
accurately estimated using an observer
EECE 360, v2.4
6
Output feedback
! Output-based regulation
EECE 360, v2.4
7
Output feedback
! Since the control law acts upon the estimated
value of the state
! The observer must be designed such that the
estimate of the state is guaranteed to
converge to the actual value of the state
! The estimate is a dynamic process which
evolves over time according to
!
u = "K x
!
e = x " x
!
e = x "

x
EECE 360, v2.4
8
Output feedback
! We know that
! And so we create an estimated system
! Which is dependent on the difference between the
actual output and the output value expected based
on the current estimate of the state
! Therefore the error e evolves according to
!
x = Ax + Bu
y = Cx
!


x = A x + Bu + L(y "C x )
!
e = x "

x = Ax " A x + L(Cx "C x )
= (A" LC)e
EECE 360, v2.4
9
! The eigenvalues of (A-LC) can be arbitrarily assigned
when the system is observable.
! A system is observable if there exists a finite time T
such that, given the input u(t), the initial state x(0)
can be determined from the observation history y(t).
e(0)
e(T)
Observability
EECE 360, v2.4
10
! The eigenvalues of (A-LC) can be arbitrarily
assigned when the system [A,B,C,D] is observable.
! A system is observable if there exists a finite time T
such that, given the input u(t), the initial state x(0)
can be determined from the observation history y(t).
! The observability matrix
must have rank n for the system [A,B,C,D] to be
observable. (S
O
is full-rank.)

!
S
O
=
C
CA
CA
2
!
CA
n"1
#
$
%
%
%
%
%
%
&
'
(
(
(
(
(
(
Observability
EECE 360, v2.4
11
! Note that the observer gain L is a matrix of
dimension n x p, where the output matrix C is p x n
! For a SISO system, L is n x 1
! Therefore LC will be an n x n matrix that can be
subtracted, element-wise, from A.
! By contrast, recall that the controller gain K is a
matrix of dimension m x n, where the input matrix B
is m x n
! For a SISO system, K is 1 x n
! Therefore BK will be an n x n matrix that can be
subtracted, element-wise, from A.
Observability vs. Controllability
EECE 360, v2.4
12
! System and input matrices
! Observability matrix
! To test for controllability, |S
O
|=1-0=1
! Therefore the system is observable.
Example: Spring-Mass-Damper
!
A =
0 1
"
k
M
"
b
M
#
$
%
%
&
'
(
(
, C = 1 0 [ ]
!
S
O
=
1 0
0 1
"
#
$
%
&
'
EECE 360, v2.4
13
! The open-loop observer poles are
located where
! With the observer gain L, the closed-
loop poles are located where
! Because the system is observable, the
poles of the closed-loop error dynamics
can be placed anywhere in the complex
plane.
Example: Spring-Mass-Damper
!
0 = s
2
+
b
M
s +
k
M
!
0 = s
2
+
b
M
+ l
1
( )s +
b
M
l
1
+
k
M
+ l
2
( )
EECE 360, v2.4
14
! Controller:
! Regulate x -> 0 by choosing K such that
is stable.
! Controllability matrix S
C
=[B AB A
2
B A
n-1
B]
! Observer:
! Regulate e -> 0 by choosing L such that
is stable.
! Controllability matrix S
O
=[C; CA; CA
2
; ; CA
n-1
]
Observability vs. Controllability
!
x = (A" BK)x
!
e = (A" LC)e
duality
EECE 360, v2.4
15
! Controller:
! Design a control gain K =[k
1
k
2
k
3
k
n
] through
Ackermanns formula
! Observer:
! Design an observer gain L = [l
1
l
2
l
3
l
n
]
T
through
Ackermanns formula
! This takes advantage of the duality between the observer
and controller
Observability vs. Controllability

!
K = 0 0 1 [ ]S
C
"1
q(A)

!
L = q(A)S
O
"1
0 0 1 [ ]
T
EECE 360, v2.4
16
Observer design: Ackermanns
Example: Consider the spring-mass-damper system
! Choose the closed-loop poles of the observer to be 4-10 times
faster than the controller poles
! For now, assume that these poles occur at a desired damping !
and desired natural frequency "
n
, the characteristic equation is
! Compute the observability matrix and its inverse
!
q(s) = s
2
+ 2" #
n
s +#
n
2
!
S
O
=
C
CA
"
#
$
%
&
'
=
1 0
0 1
"
#
$
%
&
'
S
O
(1
=
1 0
0 1
"
#
$
%
&
'
EECE 360, v2.4
17
Ackermanns Formula
! The characteristic equation in terms of A is
!
q(A) = A
2
+ 2" #
n
A+ #
n
2
, therefore the control gain is
L = A
2
+ 2" #
n
A+ #
n
2
I
( )
0 1
1 0
$
%
&
'
(
)
0 1 [ ]
T
=
0 1
*
k
M
*
b
M
$
%
&
'
(
)
2
+ 2" #
n
0 1
*
k
M
*
b
M
$
%
&
'
(
)
+ #
n
2
I
+
,
-
-
.
/
0
0
0 1
1 0
$
%
&
'
(
)
0
1
$
%
&
'
(
)
=
*
k
M
*
b
M
kb
M
2
*
k
M
+
b
2
M
2
$
%
&
'
(
) + 2" #
n
0 1
*
k
M
*
b
M
$
%
&
'
(
)
+ #
n
2
1 0
0 1
$
%
&
'
(
)
+
,
-
-
.
/
0
0
0
1
$
%
&
'
(
)
=
*
b
M
*
k
M
+
b
2
M
2
$
%
&
'
(
) + 2" #
n
1
*
b
M
$
%
&
'
(
)
+ #
n
2
0
1
$
%
&
'
(
)
EECE 360, v2.4
18
Ackermanns Formula
! The observer gain to achieved the desired closed-
loop poles for the error dynamics is
! Note that the observer gain will drive the error
dynamics to the desired closed-loop error dynamics
poles.
!
L =
"
b
M
k
M
+
b
2
M
2
#
$
%
&
'
( + 2) *
n
1
"
b
M
#
$
%
&
'
(
+*
n
2
0
1
#
$
%
&
'
(
L =
2) *
n
"
b
M
*
n
2
"2) *
n
b
M
"
k
M
+
b
2
M
2
#
$
%
&
'
(
EECE 360, v2.4
19
Ackermanns Formula
! The closed-loop system is
! which has poles at 0=|s-(A-LC)|=s
2
+2!"
n
s+"
n
2

!
e = (A" LC)e
=
0 1
"
k
M
"
b
M
#
$
%
&
'
(
"
2) *
n
"
b
M
*
n
2
" 2) *
n
b
M
"
k
M
+
b
2
M
2
#
$
%
&
'
( 1 0 [ ]
+
,
-
-
.
/
0
0
x
=
0 1
"
k
M
"
b
M
#
$
%
&
'
(
"
2) *
n
"
b
M
0
*
n
2
" 2) *
n
b
M
"
k
M
+
b
2
M
2
0
#
$
%
&
'
(
+
,
-
-
.
/
0
0
x
=
"2) *
n
+
b
M
1
*
n
2
+ 2) *
n
"
b
M
( )
b
M
"
b
M
#
$
%
%
&
'
(
(
x
EECE 360, v2.4
20
! Designing controller gains
!
! K = acker(A,B,Pk)
! Designing observer gains
!
! LT = acker(A,C,Pl)
! L = LT
Using Matlab

!
K = 0 0 1 [ ]S
C
"1
q(A)

!
L = q(A)S
O
"1
0 0 1 [ ]
T
Use place for
MIMO systems
** Note that the
transpose of both
A and C required!
EECE 360, v2.4
21
! A system (A,B,C,D) is controllable if its
controllability matrix S
C
is full rank.
! The closed-loop poles of a controllable system
can be placed anywhere in the complex plane.
! Choose the desired pole location, then compute
the gain K required to achieve those locations
! Ackermanns formula for SISO systems (Matlabs
acker)
! Matlabs place for MIMO systems
Controllability Summary
EECE 360, v2.4
22
! A system (A,B,C,D) is observable if its
observability matrix S
O
is full rank.
! The closed-loop poles of the error dynamics of an
observable system can be placed anywhere in the
complex plane.
! This allows arbitrarily fast convergence of the
state estimate to the actual value of the state.
! Choose the desired error pole location, then
compute the gain L required to achieve those
locations
! Ackermanns formula for SISO systems (Matlabs
acker) with transposed matrices
Observability Summary
EECE 360, v2.4
23
Observers/controllers
! The dynamics for dx/dt and de/dt are
coupled
! State dynamics
! Error dynamics
!
x = Ax + Bu, u = "K(x + e)
= (A" BK)x + BKe
!
e = x "

x ,

x = A x + Bu + L(y "C x )
= Ax + Bu " A(x + e) " Bu " LCx + LC(x + e)
= (A" LC)e
EECE 360, v2.4
24
Observers/controllers
! In state-space form, with
! The closed-loop system and observer
dynamics are
! The eigenvalues of this system are
eig(A-BK) and eig(A-LC)
!
x =
x
e
"
#
$
%
&
'
!
x
e
"
#
$
%
&
'
=
A( BK BK
0 A( LC
"
#
$
%
&
'
x
e
"
#
$
%
&
'
EECE 360, v2.4
25
! Although the state dynamics and observer dynamics
are coupled, the controller and the observer can
be designed independently
! Standard procedure:
! Design a controller with gain K to place the roots of (A-BK)
at desired locations in the LHP.
! Design an observer with gain L to place the roots of (A-LC)
at desired locations in the LHP.
! Generally the observer poles are placed such that the
observer dynamics are 4-10 times faster than the
state dynamics.
Separation Principle
**
EECE 360, v2.4
26
! Using the controller and observer
designed previously
Example: Spring-Mass-Damper
!
x
e
"
#
$
%
&
'
=
A( BK BK
0 A( LC
"
#
$
%
&
'
x
e
"
#
$
%
&
'
=
0 1 0 1
)
n
2
2*)
n
)
n
2
(
k
M
2*)
n
(
b
M
0 0 (2* )
n
+
b
M
1
0 0 )
n
2
+ 2* )
n
(
b
M
( )
b
M
b
M
"
#
$
$
$
$
%
&
'
'
'
'
x
M
v
M
e
x
e
v
"
#
$
$
$
$
%
&
'
'
'
'
EECE 360, v2.4
27
! The open-loop system poles are located
where
! With controller gain K and observer gain
L, the closed-loop poles of the extended
system are located where
Example: Spring-Mass-Damper
!
0 = s
2
+
b
M
s +
k
M
!
0 = s
2
+ 2"#
n
s +#
n
2
( )
s
2
+ 2" #
n
s +#
n
2
( )
EECE 360, v2.4
28
! Because the system is controllable and
observable, the closed-loop poles of the
error dynamics and the system
dynamics can be placed arbitrarily.
! However, the further away the closed-
loop poles are placed from the open-
loop poles, the higher the control effort.
! Additionally, excessively high observer
gains can lead to amplification of noise
inherent to the output measurements.
Example: Spring-Mass-Damper
EECE 360, v2.4
29
Summary
! Controllability matrix S
C
to test whether it is
possible to put the poles of the closed-loop
state dynamics in any desired location
! Observability matrix S
O
to test whether it is
possible to put the poles of the closed-loop
error dynamics in any desired location
! Duality of controller (with gain K) and
observer (with gain L)
! Separation principle allows independent
design of the controller and observer

You might also like