Control Principles for Engineered Sysrems 5SMC0
State Feedback Control
Lecturer: Leyla Özkan
Contents
Feedback Control
State Feedback Control
Pole Placement
Disturbance rejection and Reference Tracking
Feedback Control
◮ Feedback Control Mechanism
Feedback controller receives
information from the system,
processes this information and
generates a control signal that
is fed back in order to actuate
it.
◮ Goal of designing a controller is that the system obeys a
certain desired specification such as
◮ Stabilizing the system
◮ Regulating the system around a desired operating condition
◮ Rejecting the effect of disturbances
◮ Tracking a desired trajectory
State Feedback Control
◮ Recall state transition matrix e At and that the eigenvalues of
A are the poles of the system
◮ How can we use u(t) to modify eigenvalues of A and hence
change the system dynamics?
◮
Assume a full
state feedback of
the form
u(t) = Nr − Kx(t)
◮ Assumption The whole state can be measured on line and
control law is just a static gain
State Feedback Control
◮ Consider the single input case u(t) ∈ R
◮ r is a reference signal,
◮ Find the closed loop dynamics for
ẋ(t) = Ax(t) + Bu(t)
= Ax(t) + B [Nr − Kx(t)]
= [A − BK ] x(t) + BNr
y (t) = Cx(t)
◮ Assume r = 0, then the controller changes the dynamics
ẋ(t) = Ax(t) ẋ(t) = [A − BK ] x(t) = Acl x(t)
! "# $ ! "# $
open loop dynamics closed loop dynamics
State Feedback Control
◮ Objective: Find K such that Acl has desired properties;
◮ If A is unstable, then desire Acl stable
◮ Example: Consider
% & % &
2 1 −2
ẋ(t) = x(t) + u(t)
1 2 0
◮ The system is unstable
det(sI − A) = (s − 1)(s − 3), s = 1, s = 3
' (
◮ Define control law u(t) = − k1 k2 x(t) = Kx(t)
◮ Closed loop system
% % & % & &
2 1 −2 ' (
ẋ(t) = Acl x(t) = [A − BK ] x(t) = − k1 k2
1 2 0
% &
2 − 2k1 1 − 2k2
= x(t)
1 2
State Feedback Control
◮ The desired closed loop poles (complex conjugates) can be
placed anywhere in the complex plane by choosing k1 , k2
det(sI − Acl ) = s 2 − (4 + 2k1 )s + 2k2 − 4k1 + 3 = 0
◮ Choose a desired closed loop characteristic equation
det(Acl,des ) = s 2 + 4s + 3, s = −1, , s = −3
◮ Compare the characteristic equations of Acl,des and Acl
)
−(4 + 2k1 ) = 4 k1 = −4
2k2 − 4k1 + 3 = 3 k2 = −8
' (
◮ So K = −4 −8 POLE PLACEMENT
State Feedback Control
◮ Is finding a state feedback control law always straightforward?
◮ Example: Consider
% & % &
1 1 1
ẋ(t) = x(t) + u(t)
0 2 0
' (
and design a controller u(t) = Kx(t) = − k1 k2 with the
same control objective which is stabilization
◮ Closed loop system,
%% & % & &
1 1 1 ' (
ẋ(t) = = [A − BK ] x(t) = − k1 k2 x(t)
0 2 0
% &
1 − k1 1 − k2
= x(t)
0 2
State Feedback Control
◮ The closed loop characteristic equation then becomes
det(sI − Acl ) = (s − 1 + k1 )(s − 2) = 0
◮ Can we place the poles at s = −1 and s = −3 or anywhere in
the complex plane ?
◮ The state feedback controller can modify the pole at s = 1,
but it can not modify the pole at s = 2
System can not be stabilized by state feedback controller
◮ Transform the system to modal canonical form to get insight
% & % & % &
1 0.7071 1 0 1
x(t) = Tz(t), T = , ż = z(t) + u(t)
0 0.7071 0 2 0
◮ z2 is uncontrollable.
State Feedback Control
◮ Observations
◮ The pair (A, B) must be controllable.
◮ Controllable systems allow to assign system modes arbitrarily
in the complex plane.
Pole Placement Theorem:
Let (A, B) ∈ R n×n × R n×m be controllable and let
Λ = {λ1 , λ2 , · · · , λn } be desired*closed loop poles. For any closed
characteristic equation α(s) = nk=1 (s − λk ) there exists a
feedback gain matrix K ∈ R m×n such that the set of eigenvalues of
A − BK exactly is equal to Λ = {λ1 , λ2 , · · · , λn }
◮ Use place in Matlab
State Feedback Control
◮ Example:
% & % &
1 1 1
ẋ(t) = x(t) + u(t)
0 −2 0
◮ Can we stabilize the system?
◮ Closed loop characteristic equation and closed loop dynamics
det(sI − Acl ) = (s − 1 + k1 )(s + 2) = 0
% &
1 − k1 1 − k2
ẋ(t) = x(t)
0 −2
◮ The system is uncontrollable, but it is stabilizable. (Unstable
mode is controllable.)
State Feedback Control
◮ Controllability Normal Form:
◮ Given a system ẋ(t) = Ax(t) + Bu(t) there exists a
transformation (state coordinate change) which transforms the
system into
! " ! "! " ! "
ż1 Ã11 Ã12 z1 B̃1
= + u(t)
ż2 0 Ã22 z2 0
◮ z2 can not be influenced
◮ The eigenvalues of Ã22 are the uncontrollable modes
◮ Use ctrbf in Matlab
State Feedback Control
◮ State Feedback Control for Uncontrollable systems
◮ Transform the system into controllable normal form
! " ! "! " ! "
ż1 Ã11 Ã12 z1 B̃1
= + u(t)
ż2 0 Ã22 z2 0
◮ If K̃ is a feedback gain for the transformed systems, then it
# $
can be partitioned K̃ = K̃1 K̃2 . Then, u(t) = −K̃ z(t)
gives the closed system
! " ! "! "
ż1 Ã11 − B̃1 K̃1 Ã12 − B̃1 K̃2 z1
= +
ż2 0 Ã22 z2
◮ The pair (Ã11 , B̃1 ) is controllable, the modes of (Ã11 − B̃1 K̃1 )
can be arbitrarily assigned.
Take Home Message
◮ Controllability is a necessary condition for pole placement
◮ Given a system ẋ = Ax(t) + Bu(t)
◮ If the pair (A, B) is controllable, the modes of A − BK can be
arbitrarily assigned
◮ If the pair (A, B) is uncontrollable, transform the system to
controllable normal form where (Ã11 , B̃1 ) is controllable. Then,
the modes of (Ã11 − B̃1 K̃1 ) can be assigned arbitrarily.
◮ Assumption: Full state information is available.
Pole Placement-Extension to Higher Order Systems
◮ Can we develop a direct method to calculate K ?
◮ Assume that the original system is given in controller
canonical form
ẋ = Ax(t) + Bu(t)
y = Cx(t)
+ . + .
−an−1 −an−2 ··· −a1 −a0 1
, 1 0 ··· 0 0 / , 0 /
, / , /
, 0 1 ··· 0 0 / , /
A=, /,B = , 0 /
, .. .. .. .. / , .. /
- . . ··· . . 0 - . 0
··· ··· ··· 1 0 0
' (
C = bn−1 bn−2 · · · b1 b0
State Space Representation of Transfer functions-Recap
◮ Given SISO transfer function of the form
Y (s) bn−1 s n−1 + bn−2 s n−2 + · · · + b1 s + b0 Y (s) X (s)
= n n−1
=
U(s) s + an−1 s + · · · + a1 s + a0 X (s) U(s)
X (s) 1
= n n−1
,
U(s) s + an−1 s + · · · + a1 s + a0
Y (s)
= bn−1 s n−1 + bn−2 s n−2 + · · · + b1 s + b0
X (s)
◮ Arranging terms in each transfer function
x (n) + an−1 x (n) + an−2 x (n−2) + · · · + a1 x + a0 = u(t)
y (t) = bn−1 x (n−1) + bn−2 x (n−2) + · · · + b1 ẋ + b0 x
◮ Choosing
x1 = x (n−1) , x2 = x (n−2) , xn−1 = ẋ, xn = x,
Pole Placement-Extension to Higher Order Systems
◮ Derive the closed loop system with
' (
K = k1 k2 · · · kn−1 kn
1+ .
2
2 −an−1 −an−2 ··· −a1 −a0
2
2 ,
2
3, 1 0 ··· 0 0 / /
, 0 1 ··· 0 0 /
ẋ = , /−
2
2 , .
.. .. .. .. /
2
2 - . ··· . . 0
2
4
··· ··· ··· 1 0
+ . 5
1 2
2
, 0 / 2
2
, /' 2
, 0 / (6
, / k1 k2 · · · kn−1 kn x
, .. / 2
2
- . 0 2
2
2
7
0
Pole Placement-Extension to Higher Order Systems
◮ Closed loop system
1+ . + .5
−an−1 −an−2 ··· −a1 −a0 k1 k2 ··· kn−1 kn
2
3 1 0 ··· 0 0 0 0 ··· 0 0 2
6
, 0 1 ··· 0 0 / , . . . . /
ẋ = - . . . . 0−- . . . . 0 x
2
4 .
.
.
. ···
.
.
.
. 0
.
0
. ···
···
.
0
.
0
2
7
··· ··· ··· 1 0 0 0 ··· 0 0
+ −an−1 − k1 −an−2 − k2 ··· −a1 − kn−1 −a0 − kn
.
1 0 ··· 0 0
, 0 1 ··· 0 0 /
ẋ = - . . . . 0x
. . . .
. . ··· . .
··· ··· ··· 1 0
◮ By inspection we we can write the closed loop characteristic
equation
n n−1 n−2
det(sI − A + BK ) = s + (an−1 + k1 )s + (an−2 + k2 )s + · · · + (a1 + kn−1 )s + (a0 + kn )
Pole Placement-Extension to Higher Order Systems
◮ Given the desired closed loop pole locations, calculate the
associated (desired) closed loop characteristic polynomial
α(s) = (s − p1 )(s − p2 )(s − p3 ) · · · (s − pn )
= s n + αn−1 s n−1 + αn−2 s n−2 + · · · + α0
◮ Equate the coefficients of the identical powers of
αn−1 = an−1 + k1 k1 = αn−1 − an−1
αn−2 = an−2 + k2 k2 = αn−2 − an−2
.. ..
.=.
α0 = a0 + k n k n = α0 − a0
' (
◮ K = αn−1 − an−1 αn−2 − an−2 ··· α0 − a0
Bass-Gura Formula
Pole Placement-Extension to Higher Order Systems
◮ Example: Find the controller gain K for the system
+ . + .
−2 −15 −18 1
ẋ = - 1 0 0 0x + - 0 0u
0 1 0 0
so that the desired closed characteristic equation is
α(s) = s 3 + 16s 2 + 39.55S + 53.26
◮ Solution: The system is in already control canonical form.
α2 = 16 a2 = 2 k1 = α2 − a2 = 16 − 2 = 14
α1 = 39.55 a1 = 15 k2 = α1 − a1 = 39.55 − 15 = 24.55
α0 = 53.26 a0 = 18 k3 = α0 − a0 = 53.26 − 18 = 35.26
Pole Placement-Extension to Higher Order Systems
◮ In case the the system is not in control canonical form,
transform it to this form using
x →z x = Tz
◮ Design a state feedback controller for the transformed system
ż = T −1 ATz + T −1 Bu(t)
u(t) = −K̂ z
◮ Then switch back to gains needed for the state x(t)
u(t) = −K̂ z(t)
= −K̂ T −1 x(t)
K = K̂ T −1
Pole Placement-Extension to Higher Order Systems
◮ If the dynamic system has more than one input
u = −Kx
+ .
k11 k12 ··· k1n
, .. .. .. /
, . . ··· . /
,
u=, . /
.. .. /
- .. . ··· . 0
km1 km2 ··· kmn
◮ For fixed closed loop poles, the state feedback gain matrix is
not unique
Pole Placement-Extension to Higher Order Systems
◮ Some options
◮ Set some of the gains to zero.
◮ The state variable corresponding to that column is not needed
so there is no need to measure it.
◮ Select a particular structure for the gain matrix
◮ Relate the gains to proper physical quantities
# &
! " ! " x1
u1 k11 0 k13 0 $ x2 '
= $ '
u2 0 k22 0 k24 % x2 (
x4
Example-Quadruple Tank system
Recall
% −0.3477 0 0.4982 0
&
0 −0.2306 0 0.2877
ẋ = 0 0 −0.4982 0 x+
0 0 0 −0.2877
% 6.3662 0
&
0 9.5493
0 22.2817 u
25.4648 0
% &
1 0 0 0
y= x
0 1 0 0
Example-Quadruple Tank system
◮ Recall the open loop response
% &
∆F1
u= ,
∆F2
+ .
0.0821
, 0.1867 /
x0 = ,
- 0.040 0
/
0.12
◮ The system is stable. Can we achieve faster response?
Example-Quadruple Tank system
◮ Desired closed loop poles
−0.4520, −0.2998, −0.6477, −0.3740
Open Loop
Closed Loop
% &
0.0001 0.0021 0.0016 0.0090
◮ K=
0.0007 0.0002 0.0079 −0.0004
Pole Placement-Disturbance rejection and reference
Tracking
◮ Consider the linear time invariant system
ẋ(t) = Ax(t) + Bu(t) + Ed(t)
˙
where d(t) is is the disturbance modeled by d(t) = Ad d(t)
◮ Consider a reference r (t) with the dynamics r˙(t) = Ar r (t)
◮ Define tracking error e(t) = x(t) − r (t)
◮ The dynamics of tracking error then becomes
ė = ẋ − r˙ = Ax + Bu + Ed − Ar r
= Ax + Bu + Ed − Ar r + Ar − Ar
= A(x − r ) + (A − Ar )r + Bu + Ed
% &
' ( r
= Ae + Bu + Fv , F = A − A r E ,v =
d
Pole Placement-Disturbance Rejection and Reference
Tracking
◮ Consider a linear control law
u(t) = −Ke e − Kr r − Kd d = −Ke e − Kv v
% &
' ( r
Kv = Kr Kd , v =
d
Pole Placement-Disturbance Rejection and Reference
Tracking
◮ At steady state, the error dynamics is
ė = 0 = (A − BKe )ess + (F − BKv )v
ess = −(A − BKe )−1 (F − BKv )v
◮ Reasonable closed loop performance requirements:
◮ The closed loop system should be asymptotically stable
eig (A − BKe ) < 0
◮ A linear combination of steady state error should be zero
y = Css ess
◮ Steady state error zero condition should hold for any v
Css ess = Css (A − BKe )−1 (F − BKv )v = 0
Css (A − BKe )−1 F = Css (A − BKe )−1 BKv
Pole Placement-Disturbance Rejection and Reference
Tracking
◮ If number of outputs are higher than number of inputs ,
overdetermined
◮ If number of outputs are less than number of inputs,
underdetermined
◮ If Css (A − BKe )−1 B is square
' (−1
Kv = Css (A − BKe )−1 B Css (A − BKe )−1 F
Example-Quadruple Tank system
Recall
% −0.3477 0 0.4982 0
&
0 −0.2306 0 0.2877
ẋ = 0 0 −0.4982 0 x+
0 0 0 −0.2877
% 6.3662 0
&
0 9.5493
0 22.2817 u
25.4648 0
% &
1 0 0 0
y= x
0 1 0 0
Example-Quadruple Tank system
◮ Reference tracking
◮ Reference trajectory
r =[ 0.1 0 0 0 ]
◮ Asymptotically stable
error dynamics
eig (A − BKe ) < 0
% &
K = 0.0001
0.0007
0.0021
0.0002
0.0016
0.0079
0.0090
−0.0004
◮ Steady state error condition
' (−1
Kv = Css (A − BKe )−1 B Css (A − BKe )−1 F
% &
0.0105 −0.018 0.0016 0.0090
Kv =
−0.0239 0.0043 0.0079 −0.004
Example-Quadruple Tank system
◮ Reference tracking-Input Profile
Where To Place the Poles?
◮ Choose a dominant closed loop dynamics, ie. second order
system,
s 2 + 2ξωn s + ωn2
◮ Then place the rest of the poles in such a way that they are
much faster than the dominant second order behaviour
◮ Performance criteria for second order systems
◮ Stability, Settling time, percent overshoot, rise time
◮ Rule of Thumb for second order systems
1 + 1.1ξ + 1.4ξ 2
tr = rise time
ωn
3
ts = settling time
ξωn
√−ξπ
PO = 100 ∗ e 1−ξ2 percentage overshoot
Where To Place the Poles?
◮ We should not alter the dynamics of the open loop system
more than is required
◮ Do not choose closed loop poles far from the poles of open
loop poles
◮ Do not choose closed loop poles very negative resulting high
closed loop bandwidth
◮ amplifies noise, uncertainty at high frequencies
◮ Results in a lot of control effort
◮ Evaluate the performance by simulation and iterate
Take Home Message
◮ For the single input case, there are 3 different methods to find
the state feedback gain which is unique
◮ Equating coefficients of the same power of s
◮ Bass-Gura formula
◮ Ackerman?s formula 1
◮ In Matlab, commands place, acker can be used
◮ Pole placement is simple but still heuristic
1
Read the following appendix
Appendix: Pole Placement-Higher Order Systems
◮ Goal: Find K such that
det(sI − (A − BK )) = det(sI − Â) = s n + αn−1 s n−1 + αn−2 s n−2
+ · · · + α1 s + α0
◮ Cayley-Hamilton theorem states that each matrix A satisfies
its own characteristic equation
Φ(Â) = Ân αn−1 Ân−1 + αn−2 Ân−2 + · · · + α0 I
◮ For n = 3
Φ(Â) = αn−1 Ân−1 + αn−2 Ân−2 + · · · + α0 I
8 9
= A3 − A2 BK − ABK Â − BK Â2 + α2 A2 − ABK − BK Â +
α1 Â + α0 I
Appendix: Pole Placement-Higher Order Systems
◮ Using the following identities
Â0 = I
Â1 = A − BK
Â2 = (A − BK )2 = A2 − ABK − BK Â
Â3 = A3 − A2 BK − ABK Â − BK Â2
◮ We get
Φ(Â) = A3 + α2 A2 + α1 A + α0 I − α1 BK − α2 ABK + α2 BK Â
− A2 BK − ABK Â − BK Â2 = 0
Appendix: Pole Placement-Higher Order Systems
Φ(Â) = Φ(A) − α1 BK − α2 ABK + α2 BK Â − A2 BK − ABK Â−
− BK Â2 = 0
◮ Rearranging
Φ(A) = α1 BK − α2 ABK + α2 BK Â − A2 BK − ABK Â − BK Â2
8 9 8 9
= B α1 K + α2 K Â + K Â2 + AB α2 K + K Â + A2 BK
+ .
' ( α1 K + α2 K Â + K Â2
= B AB A2 B - α2 K + K Â 0
K
Appendix: Pole Placement-Higher Order Systems
◮ Since the system is controllable we can take the inverse of the
controllability matrix and write
+ .
' ( α1 K + α2 K Â + K Â2
−1
B AB A2 B Φ(A) = - α2 K + K Â 0
K
' (
◮ Premultiply by 0 0 1
' (' (−1
0 0 1 B AB A2 B Φ(A) =
+ 2
.
' ( α1 K + α2 K Â + K Â
0 0 1 - α2 K + K Â 0=K
K
◮ This is known as Ackerman’s formula
Appendix: Pole Placement-Higher Order Systems
◮ For an arbitrary system of order n , the state feedback gain K
by the Ackermans? formula is
' (' (−1
K= 0 0 1 B AB A2 B · · · An−1 B Φ(A)
◮ where
Φ(Â) = Ân αn−1 Ân−1 + αn−2 Ân−2 + · · · + α0 I
and α are the coefficients of the closed loop characteristic
equation
◮ Use acker in Matlab