You are on page 1of 64

TTK4115

Lecture 3
Discretization, controllability, state feedback

Morten O. Alver (based on slides by Morten D. Pedersen)

TTK4115 (MOA) Lecture 3 1 / 64


This lecture

1. Significance of eigenvalues/vectors: suspended magnet

2. Discretization

3. Controllability

Controllability tests

Controllability indices

Controllability in practice

4. State feedback

Pole placement

TTK4115 (MOA) Lecture 3 2 / 64


Topic

1. Significance of eigenvalues/vectors: suspended magnet

2. Discretization

3. Controllability

Controllability tests

Controllability indices

Controllability in practice

4. State feedback

Pole placement

TTK4115 (MOA) Lecture 3 3 / 64


Suspended magnet

Nonlinear system
A magnet (mass m) is hovering below a stationary magnet, with the stationary magnet imposing
an attractive force on the hovering magnet.
z1 : the vertical speed of the hovering magnet (positive downwards)
z2 : its distance from the stationary magnet (positive downwards).
The vertical magnetic force on the hovering magnet equals −(ku /z22 )f , where f is the input signal
and ku is a constant. Neglecting air resistance, the vertical dynamics of the hovering magnet are
described by the following nonlinear equations:

ku f
ż1 =g −
mz22
ż2 =z1

where g (9.8 ms−2 ) is the gravity constant.

TTK4115 (MOA) Lecture 3 4 / 64


Suspended magnet

Linearized system
gmx 2
We define a reference distance xr and a reference input u0 = k r such that the magnet is in
u
equilibrium when z1 = 0 and z2 = xr . Using the state variables: x1 = z1 and x2 = z2 − xr , we get
the following linearized system:

A B
z" }| #{  z" }| #{
2g ku

  
ẋ1 0 xr
x1 mxr2
= + u
ẋ2 1 0 x2 0

TTK4115 (MOA) Lecture 3 5 / 64


Suspended magnet

Eigenvalues
We find the system’s eigenvalues by solving |λI − A| = 0:
q
2g
λ1 : xr
q
λ2 : − 2g x r

As one of the eigenvalues has a positive real value, the system’s response will tend to ”blow up”.

Intuitively: if the magnet drops slightly below the equilibrium point, the magnetic force gets weaker,
leading the magnet to drop further. If the magnet rises above the equilibrium, the force grows
stronger, leading the magnet to rise further.

TTK4115 (MOA) Lecture 3 6 / 64


Suspended magnet

Eigenvectors
" q # " q #
2g 2g

v1 = xr , v2 = xr
1 1

What do the eigenvectors mean?


An eigenvector vi is a (relative) combination of state values such that Avi is proportional to vi .

For this system: the eigenvectors are combinations of speed (x1 ) and position (x2 ) that excite a
proportional response.
q
v1 : above or below equilibrium, moving away at a speed 2g xr
times the distance.
q
v2 : above or below equilibrium, moving toward it at a speed 2g x
times the distance.
r

TTK4115 (MOA) Lecture 3 7 / 64


Eigenvectors in the phase plane

TTK4115 (MOA) Lecture 3 8 / 64


Topic

1. Significance of eigenvalues/vectors: suspended magnet

2. Discretization

3. Controllability

Controllability tests

Controllability indices

Controllability in practice

4. State feedback

Pole placement

TTK4115 (MOA) Lecture 3 9 / 64


Analog state space model
The continuous state space model is analog1 :

ẋ = Ax + Bu
y = Cx + Du

To simulate it as is would require an analog computer.

Discretization
Discretization is a necessary step for computer simulation. A recursive model is sought:

x[k + 1] = Ad x[k] + Bd u[k]


y[k] = Cx[k] + Du[k]

Many methods are available for obtaining a discretized model. We examine the two most common
methods: Exact and Euler discretization.

Approach
Realize Discretize Recursion
TF −−−−→ CLTI −
−−−−−
→ DLTI −−−−−−→ Solution

1
Some systems are discrete by nature, such as financial systems or discrete filters. Most plants will however be continuous as
they are based on a physical model.
TTK4115 (MOA) Lecture 3 10 / 64
LTI solution
The exact solution of the LTI system forms the theoretical basis of exact discretization.

ẋ = Ax + Bu
y = Cx + Du
Z t
x(t) = eAt x0 + eA(t−τ ) Bu(τ )dτ
0

Sampling
Time is discretized into intervals of duration T : t = kT . Sample index is denoted k.
The state solution from one sample to the next is:
Z (k +1)T
x((k + 1)T ) = eAT x(kT ) + eA[(k +1)T −τ ] Bu(τ )dτ
kT

Here x[k] , x(t)|t=kT serves as an initial condition


The resulting solution is evaluated at x[k + 1] , x(t)|t=(k +1)T .

Piecewise constant input


The input is assumed to stay approximately constant between samples:

u[k ] ' u(t), kT ≤ t < (k + 1)T

TTK4115 (MOA) Lecture 3 11 / 64


Sampled model
!
Z (k +1)T
AT A[(k +1)T −τ ]
x[k + 1] = e x[k ] + e dτ Bu[k]
kT

Substitution rule
Z y (b) Z b dy
F (x)dx = F (y(x)) dx
y(a) a dx

Change of variable: α(τ ) , (k + 1)T − τ, dτ = −dα


Integration limits are simplified:

τ0 = kT → α0 = T , τ1 = (k + 1)T → α1 = 0

along with integrand:


eA[(k +1)T −τ ] → eAα
! !
Z (k +1)T Z T
Bd = eA[(k +1)T −τ ] dτ B= eAα dα B
kT 0

TTK4115 (MOA) Lecture 3 12 / 64


Discretization

Exactly discretized model

Bd
Ad z }| ! {
z}|{ Z T
x[k + 1] = eAT x[k] + eAα dα B u[k]
0

y[k] = C x[k] + D u[k]


|{z} |{z}
Cd Dd

Discrete time system


This model is exact under the assumption:

u[k ] = u(t), kT ≤ t ≤ (k + 1)T

It is recursive, and very efficient in implementation:

x[k + 1] = Ad x[k] + Bd u[k]


y[k] = Cd x[k] + Dd u[k]

TTK4115 (MOA) Lecture 3 13 / 64


Discretization

Euler discretization
Euler’s method proceeds via the definition of the derivative2 :

x[k + 1] − x[k]
ẋ[k] ≈
T
Thus:
ẋ[k] = Ax[k] + Bu[k] ⇒ x[k + 1] = Ix[k] + T Ax + T Bu

Stability
Euler’s method may be unstable although the underlying plant is stable. This problem gets worse
with larger timesteps. A mathematical criterion for first order systems may be stated as:

|1 + T λ| ≤ 1

Insufficiently stable systems or large timesteps will result in a divergent solution.

2
x[k] = x(kT )
TTK4115 (MOA) Lecture 3 14 / 64
Euler’s Method vs Discretization

x[k + 1] = Ad x[k] + Bd u[k]


xe [k + 1] = xe [k] + T Axe [k] + T Bu[k]

3 x[k+1] = Ad x[k]
x[k+1] = x[k] + T A x[k]
2

1
x[m]

−1

−2

−3
5 10 15 20 25
t[s]

TTK4115 (MOA) Lecture 3 15 / 64


Topic

1. Significance of eigenvalues/vectors: suspended magnet

2. Discretization

3. Controllability

Controllability tests

Controllability indices

Controllability in practice

4. State feedback

Pole placement

TTK4115 (MOA) Lecture 3 16 / 64


Controllability

What do we mean by controllability?


Whether a system can be pushed into any desired state by choosing appropriate input values.
This depends on how the inputs affect the states (B) and how the states affect each other (A).

Definition (6.1 in the Chen book)


A system with the state equation:
ẋ(t) = Ax(t) + Bu(t)
or the pair (A, B) is said to be controllable if for any initial state x(0) = x0 and any final state x1 ,
there exists an input that transfers x0 to x1 in a finite time. Otherwise it is said to be uncontrollable.

Discrete systems (Definition 6.D1)


A discrete time system with the state equation:

x[k + 1] = Ax[k] + Bu[k]

or the pair (A, B) is said to be controllable if for any initial state x[0] = x0 and any final state x1 ,
there exists an input sequence of finite length that transfers x0 to x1 . Otherwise it is said to be
uncontrollable.

TTK4115 (MOA) Lecture 3 17 / 64


Controllability

Example
Consider the single input discrete system:

x[k + 1] = Ax[k] + Bu[k] A ∈ R4×4

4 steps forward
Starting point is x[0]:

x[1] = Ax[0] + Bu[0]


x[2] = Ax[1] + Bu[1] = A(Ax[0] + Bu[0]) + Bu[1]
x[3] = Ax[2] + Bu[2] = A(A(Ax[0] + Bu[0]) + Bu[1]) + Bu[2]
x[4] = Ax[3] + Bu[3] = A(A(A(Ax[0] + Bu[0]) + Bu[1]) + Bu[2]) + Bu[3]

Last step may be written as:

x[4] = A4 x[0] + A3 Bu[0] + A2 Bu[1] + ABu[2] + Bu[3]

TTK4115 (MOA) Lecture 3 18 / 64


The k ’th step is linear in the initial condition and the sequence of inputs
zsr
z }|  {
zir u[3]
z }| {
  u[2] 
x[4] = A4 x[0] + B A2 B A3 B 

AB 
 u[1] 
u[0]

Key idea
A2 B A3 B
 
Iff B AB has full rank, we can choose x[4] as we like with our inputs.

Controllability matrix
Iff the controllability matrix has full rank: rank(C) = n
 
C , B AB . . . A(n−1) B

the state can be placed anywhere with the right sequence of inputs.
Therefore, the system is controllable.

The controllability matrix can be used to test controllability for both discrete time and continuous
systems.

TTK4115 (MOA) Lecture 3 19 / 64


Topic

1. Significance of eigenvalues/vectors: suspended magnet

2. Discretization

3. Controllability

Controllability tests

Controllability indices

Controllability in practice

4. State feedback

Pole placement

TTK4115 (MOA) Lecture 3 20 / 64


Controllability Gramian
Controllability Gramian: definition
Z t T
Wc (t) = eA(t−τ ) BBT eA (t−τ )

0
We will show that the existence of a nonsingular Controllability Gramian is a necessary and
sufficient condition for the system being controllable.

Given an LTI system:


Z t
x(t) = eAt x0 + eA(t−τ ) Bu(τ )dτ
0

Attempt to place the system at x1 at t = t1 :


Z t1
x1 = x(t1 ) = eAt1 x0 + eA(t1 −τ ) Bu(τ )dτ
0

We clearly need the proper input signal u(t) to do this.


If we can find such an input for any x1 and t > 0, the system is controllable.

TTK4115 (MOA) Lecture 3 21 / 64


Place the system at x1 at t = t1
Z t1
x1 = x(t1 ) = eAt1 x0 + eA(t1 −τ ) Bu(τ )dτ
0

We need an input u(t) to do this.


Educated guess:
T
h i
u(t) = −BT eA (t1 −t)
W−1
c (t1 ) e
At1
x0 − x1

Result

Z t1  T
h i
x1 = eAt1 x0 − eA(t1 −τ ) B BT eA (t1 −τ ) W−1
c (t1 ) e
At1
x0 − x1 dτ
0
Wc (t1 )
z }| {
Z t1 
T AT (t1 −τ )
h i
=e At1
x0 − e A(t1 −τ )
BB e dτ W−1
c (t1 ) e
At1
x0 − x1
0
h i
= eAt1 x0 − eAt1 x0 − x1 = x1

This shows that the system is controllable if Wc (t) is invertible for any t > 0.

TTK4115 (MOA) Lecture 3 22 / 64


The gramian and controllability
Want to show: if Wc (t) is singular, the system is not controllable.
Z t T
Wc (t) = eA(t−τ ) BBT eA (t−τ )

0

If Wc (t) is singular for t, a nonzero vector v must exist such that:

0 0
Z tz }| {z }| {
T
T
v Wc (t)v = vT eA(t−τ ) B BT eA (t−τ ) v dτ = 0
0

Say we want to move the system from initial value e−At1 v 6= 0 to 0


Z t1
x1 = 0 = v + eA(t1 −τ ) Bu(τ )dτ
0

Premultiplying by vT :

0
Z t1 z }| {
0=v v+T
vT eA(t1 −τ ) B u(τ )dτ = ||v||2 + 0
0

Which contradicts v 6= 0. So if the system is controllable, Wc (t) cannot be singular.

TTK4115 (MOA) Lecture 3 23 / 64


The gramian and the controllability matrix
Note:
eAt may be expressed as a linear combination of {I, A, . . . , An−1 }
eAt B may be expressed as a linear combination of {B, AB, . . . , An−1 B}

If C does not have full row rank:


There exists a nonzero v such that

vT C = vT [B AB ... An−1 B] = 0

which implies that


vT Ak B = 0 for k = 0, 1, 2, . . . , n − 1
Since eAt B can be expressed as a linear combination of {B, AB, . . . , An−1 B}:

vT eAt B = 0

which implies that Wc (t) cannot be invertible.

Which shows:
If C doesn’t have full rank, Wc (t) cannot be invertible.

TTK4115 (MOA) Lecture 3 24 / 64


The gramian and the controllability matrix

If Wc (t) is not invertible:


There exists a nonzero v such that

vT eAt B = 0 for all t

which implies that for t = 0, vT B = 0.

Differentiating k times and setting t = 0, we get vT Ak B = 0, or:

vT [B AB ... An−1 B] = vT C = 0

which implies that C cannot full row rank.

Which shows:
If Wc (t) is not invertible, C cannot have full row rank.

TTK4115 (MOA) Lecture 3 25 / 64


Equivalent Statements on Controllability

Controllability Gramian
Z t T
Wc (t) = eA(t−τ ) BBT eA (t−τ )

0

Iff Wc (t) is invertible, the system is controllable.

Controllability Matrix
np
z }| {
C= B AB ··· An−1 B }n
Iff the controllability matrix has full rank: rank(C) = n, the system is controllable.

TTK4115 (MOA) Lecture 3 26 / 64


Controllability

Example
θ m

u
M

TTK4115 (MOA) Lecture 3 27 / 64


Controllability

Example
θ m

u
M

Linearized EOM
0 0 1 0
      
ẋ x 0
 θ̇   0 0 0 1  θ   0 
u
 ẍ  = 
+
− gm 1
   
0 M
0 0   ẋ  
M

g(m+M) 1
θ̈ 0 lM
0 0 θ̇ − lM

TTK4115 (MOA) Lecture 3 28 / 64


Controllability

Linearized EOM: M = 2kg, m = 1kg, l = 1m, g = 10 sm2


      
ẋ 0 0 1 0 x 0
 θ̇   0 0 0  θ
1     0 
u
 ẍ  = 
   + 1
0 −5 0 0   ẋ  
2

θ̈ 0 15 0 0 θ̇ − 21

Controllability Matrix: Full row rank


1 5
0 0
 
2 2
 0 − 21 0 − 15 
A2 B A3 B
 
B AB = 2 
1 5

2
0 2
0 
− 12 0 − 15
2
0

Controllability Gramian: Invertible


Z t T
Wc (t) = eA(t−τ ) BBT eA (t−τ )

0

TTK4115 (MOA) Lecture 3 29 / 64


Controllability

Linearized EOM: M = 2kg, m = 1kg, l = 1m, g = 10 sm2


      
ẋ 0 0 1 0 x 0
 θ̇   0 0 0  θ
1     0 
u
 ẍ  = 
   + 1
0 −5 0 0   ẋ  
2

θ̈ 0 15 0 0 θ̇ − 21

Move the cart from x0 = 0 to x1 = [1, 0, 0, 0]T , t1 = 3s


Let’s use the Gramian:
T
h i
u(t) = −BT eA (t1 −t)
W−1
c (t1 ) e
At1
x0 − x1

Controllability Gramian
Z t T
Wc (t) = eA(t−τ ) BBT eA (t−τ )

0

TTK4115 (MOA) Lecture 3 30 / 64


Controllability

Move the cart from x0 = 0 to x1 = [1, 0, 0, 0]T , t1 = 3s


Let’s use the Gramian:
T
h i
u(t) = −BT eA (t1 −t)
W−1
c (t1 ) e
At1
x0 − x1

t
0.5 1.0 1.5 2.0 2.5 3.0
-2

-4

TTK4115 (MOA) Lecture 3 31 / 64


Controllability

Move the cart from x0 = 0 to x1 = [1, 0, 0, 0]T , t1 = 3s


Let’s use the Gramian:
T
h i
u(t) = −BT eA (t1 −t)
W−1
c (t1 ) e
At1
x0 − x1

x,Θ
1.0

0.8

0.6

0.4

0.2

t
0.5 1.0 1.5 2.0 2.5 3.0

TTK4115 (MOA) Lecture 3 32 / 64


Eigenvector test

Controllability and eigenvectors


Controllability is only possible if every eigenvector of AT is not in the null-space of BT .

Popov-Belevitch-Hautus test
The PBH test gives an elegant test based on this insight.
An LTI system is controllable iff:

rank[A − λI B] = n, for all eigenvalues λ of A

TTK4115 (MOA) Lecture 3 33 / 64


Eigenvector test

Basic idea
If the Controllability matrix has full rank, there is no non-zero vector v such that:

BT
 
T
B A T
CTv = 
 
v = 0
 ... 
T
B (A )T (n−1)

Let q be an eigenvector of AT : AT q = λq
BT
 
BT
 
λBT
BT AT
 
CTq = 
 
q =  .. q

...
  
T T (n−1)
 . 
B (A )
λn−1 BT

Controllability and eigenvectors


Controllability is only possible if every eigenvector of AT is not in the null-space of BT .

TTK4115 (MOA) Lecture 3 34 / 64


Eigenvector test
The Popov-Belevitch-Hautus test
An LTI system is controllable iff:

rank[A − λI B] = n, for all eigenvalues λ of A

Deriving the test


We know that eigenvalues and rank are both unchanged by transposing, so:
 T 
A − λI
rank[A − λI B] = rank T
B

If the latter matrix has rank n, for any non-zero q:


 T 
A − λI
q 6= 0
BT

If q is an eigenvector of AT corresponding to λ, then (AT − λI)q = 0.

If q is also in the null space of BT , then BT q = 0. So [A − λI B] cannot have rank n.

If such an eigenvector q exists, the system is not controllable, and we have shown that the PBH
test is equivalent to that criterion.

TTK4115 (MOA) Lecture 3 35 / 64


Topic

1. Significance of eigenvalues/vectors: suspended magnet

2. Discretization

3. Controllability

Controllability tests

Controllability indices

Controllability in practice

4. State feedback

Pole placement

TTK4115 (MOA) Lecture 3 36 / 64


Controllability indices
System with p inputs
We have n states and p inputs. Let:
 
B= b1 b2 ··· bp

We assume that B has full column rank.

Controllability matrix

An−1 b1 An−1 b2 An−1 bp


 
C= b1 b2 ··· bp Ab1 Ab2 ··· Abp ... ···

C has n · p columns. A maximum of n columns can be linearly independent.

Controllability index
The controllability indices of bi : µi , are the number of linearly independent columns associated
with bi . If C has rank n, these indices sum to:

µ1 + µ2 + · · · + µp = n

The largest µi is the controllability index.

TTK4115 (MOA) Lecture 3 37 / 64


Controllability indices

Example
   
2 0 1 0 1
A= 1 1 0 , B= 0 0 
2 2 1 1 0
Has this controllability matrix:
 
0 1 1 2 3 6
A2 b1 A2 b2
 
C= b1 b2 Ab1 Ab2 = 0 0 0 1 1 3 
1 0 1 2 3 8

From the left, the green columns are the first linearly independent ones.
1 is associated with b1 (column 1), so µ1 = 1.
2 are associated with b2 (columns 2 and 4), so µ2 = 2.
µ1 + µ2 = 1 + 2 = 3 = n, so the system is controllable.
The controllability index of the system is 2.

TTK4115 (MOA) Lecture 3 38 / 64


Controllability indices

Physical significance
The physical significance of the controllability index is not very clear for continous time systems.
For a controllable discrete time system with n states,
If the system has controllability index µ, there exists an input sequence of length µ that can
transfer the system to any other state.
µ may be lower than n, so for these systems we can in fact reach the desired state in fewer
than n steps.

Multi-input controllability
Using controllability indices, we can show that it is sufficient to check the rank of:

C = B AB . . . An−p B
 

to check controllability (where n is the number of states and p is the number of inputs, assuming B
has full column rank).

TTK4115 (MOA) Lecture 3 39 / 64


Two properties to remember

Property 1
Controllability is not affected by an equivalence transformation.

Property 2
Controllability is not affected by reordering the columns of B.

TTK4115 (MOA) Lecture 3 40 / 64


Topic

1. Significance of eigenvalues/vectors: suspended magnet

2. Discretization

3. Controllability

Controllability tests

Controllability indices

Controllability in practice

4. State feedback

Pole placement

TTK4115 (MOA) Lecture 3 41 / 64


Controllability in practice

Caveats
Even if the controllability matrix has full rank, this does not mean that the system is easy to control
in practice.
The controller may require too large inputs.
The closed loop response may be higly sensitive to modeling errors in ẋ = Ax + Bu.
The closed loop eigenvalues may have been chosen unrealistically fast.
Fast response requires powerful actuators and an accurate model.
The system may be ”almost uncontrollable” in practice.

TTK4115 (MOA) Lecture 3 42 / 64


Controllable?

Dynamic positioning

Vs
u2 θ
ω
u1
r V

State equation
  d

−m 0 0
   
V̇ V 1/m − sin(θ)/m  
u1
 V̇s  =  0 − dms 0  Vs  +  0 cos(θ)/m 

 u2
ω̇ 0 0 − dJω ω 0 cos(θ)r /J

TTK4115 (MOA) Lecture 3 43 / 64


Controllable?

Dynamic positioning

Vs
u2 θ
ω
u1
r V

Controllability matrix
 
1 sin(θ) d sin(θ) d2 d 2 sin(θ)
− − md2 m2 m3
− m3
 m m
cos(θ)ds2

C= 0 cos(θ) cos(θ)d
− m2 s
 
m
0 0 m3

2
 
r cos(θ) r cos(θ)dω r cos(θ)dω
0 J
0 − J2
0 J3

TTK4115 (MOA) Lecture 3 44 / 64


Controllable?
Dynamic positioning
Vs
u2 θ
ω
u1
r V

Condition number of C
Condition number of C
100

80

60
cond(C)

40

20

0
0 50 100 150 200 250 300 350
θ[deg]

TTK4115 (MOA) Lecture 3 45 / 64


Topic

1. Significance of eigenvalues/vectors: suspended magnet

2. Discretization

3. Controllability

Controllability tests

Controllability indices

Controllability in practice

4. State feedback

Pole placement

TTK4115 (MOA) Lecture 3 46 / 64


Topic

1. Significance of eigenvalues/vectors: suspended magnet

2. Discretization

3. Controllability

Controllability tests

Controllability indices

Controllability in practice

4. State feedback

Pole placement

TTK4115 (MOA) Lecture 3 47 / 64


Open loop and feedback controlled systems
Open loop

State feedback: u = −Kx

TTK4115 (MOA) Lecture 3 48 / 64


State feedback

Closed loop dynamics


u = −Kx
ẋ = Ax + Bu = (A − BK)x

State feedback
Our approach to control:
In the Control systems course you’ve learned about output feedback in monovariable (SISO)
systems.
The output feedback typically uses a reference r for the output y.
Here, we design state feedback controllers - using the full state vector x to calculate u.
If we cannot measure all states, we estimate them (using observer / Kalman filter).
We design controllers that drive x to 0. Why?
I 0 is the equilibrium point of the system ẋ = Ax + Bu.
I We can often define our states and input variables to place the ”point of interest” in 0
I If we need the system to follow a reference 6= 0, we add a feedforward to achieve that (next week).

TTK4115 (MOA) Lecture 3 49 / 64


State feedback

First important point


If the pair {A, b} is controllable, there is a similarity transform x = Px̄ that will transform the
system to controllable canonical form:

Ā b̄
z }| { z }| {
x̄˙ = P−1 AP x̄ + P−1 b u
y = cP x̄
|{z}

Controllable canonical form n = 4


   
−α1 −α2 −α3 −α4 1
 1 0 0 0   0   
Ā = 
  b̄ =   c̄ = n1 n2 n3 n4
0 1 0 0   0 
0 0 1 0 0

s3 n1 + s2 n2 + sn3 + n4
g(s) = c̄(sI − Ā)−1 b̄ =
s4 + s3 α1 + s2 α2 + sα3 + α4

TTK4115 (MOA) Lecture 3 50 / 64


State feedback

First important point


If the pair {A, b} is controllable, there is a similarity transform x = Px̄ that will transform the
system to controllable canonical form:

Ā b̄
z }| { z }| {
x̄˙ = P−1 AP x̄ + P−1 b u
y = cP x̄
|{z}

Transformation
 
1 α1 α2 α3
 0 1 α1 α2 
A2 b 3
 
P= b Ab A b   
| {z } 0 0 1 α1 
C 0 0 0 1
| {z }
C̄ −1

TTK4115 (MOA) Lecture 3 51 / 64


State feedback

Second important point


The pair {(A − bk), b} is only controllable if the pair {A, b} is controllable.
- Feedback cannot produce or destroy controllability.

Reason
Factorize closed loop controllability matrix to obtain:

b (A − bk)b (A − bk)2 b (A − bk)3 b


 
Ck =
−k(A − bk)2 b
 
1 −kb −k(A − bk)b
 2 3
  0 1 −kb −k(A − bk)b 
= b Ab A b A b   
| {z } 0 0 1 −kb 
C 0 0 0 1
| {z }
Never singular

When we multiply a matrix by a full-rank matrix, rank is preserved. Therefore,

rank(Ck ) = rank(C)

TTK4115 (MOA) Lecture 3 52 / 64


State feedback
Third important point
If the pair {A, b} is controllable, we can place the eigenvalues exactly where we want!

Pole placement
Transform the plant to the controllable canonical form. Choose the state feedback:
 
u = k̄x̄, k̄ = η1 − α1 η2 − α2 η3 − α3 η4 − α4

Closed loop dynamics


 
−α1 − (η1 − α1 ) −α2 − (η2 − α2 ) −α3 − (η3 − α3 ) −α4 − (η4 − α4 )
 1 0 0 0 
Ā − b̄k̄ =  
 0 1 0 0 
0 0 1 0

Modified transfer function

s3 n1 + s2 n2 + sn3 + n4
⇒ gk (s) =
s4 + s3 η1 + s2 η2 + sη3 + η4

TTK4115 (MOA) Lecture 3 53 / 64


Example
θ m

u
M

Linearized EOM
0 0 1 0
      
ẋ x 0
 θ̇   0 0 0 1  θ   0 
u
 u̇  = 
+
− gm 1
   
0 M
0 0   ẋ  
M

g(m+M) 1
q̇ 0 lM
0 0 θ̇ − lM

TTK4115 (MOA) Lecture 3 54 / 64


Example
θ m

u
M

Linearized EOM: M = 2kg, m = 1kg, l = 1m, g = 10 sm2


      
ẋ 0 0 1 0 x 0
 θ̇   0 0 0 1   θ   0 
u
 ẍ  = 
    + 1
0 −5 0 0   ẋ  
2

θ̈ 0 15 0 0 θ̇ − 21

TTK4115 (MOA) Lecture 3 55 / 64


Linearized EOM: M = 2kg, m = 1kg, l = 1m, g = 10 sm2
      
ẋ 0 0 1 0 x 0
 θ̇   0 0 0 1   θ   0 
u
 ẍ  = 
    + 1
0 −5 0 0   ẋ  
2

θ̈ 0 15 0 0 θ̇ − 21

Controllability matrix
1 5
0 0
 
2 2
 0 − 21 0 − 15
2

C= 1 5
 Full rank

2
0 2
0 
− 12 0 − 15
2
0

The system is controllable


It can be converted to controllable form!

TTK4115 (MOA) Lecture 3 56 / 64


Linearized EOM: M = 2kg, m = 1kg, l = 1m, g = 10 sm2
      
ẋ 0 0 1 0 x 0
 θ̇   0 0 0  θ
1     0 
u
 ẍ  = 
   + 1
0 −5 0 0   ẋ  
2

θ̈ 0 15 0 0 θ̇ − 21

Characteristic polynomial
 √  √ 
|sI − A| = s4 − 15s2 = s2 − 15 + s 15 + s

α2 = −15, α1,3,4 = 0

Transform

1 5
0 0
    
1 α1 α2 α3 2 2 1 0 −15 0
 0 1 α1 = 0
α2   − 21 0 − 15
2  0
 1 0 −15 
P=C
 
0 0 1 α1   12 0 5
2
0  0 0 1 0 
0 0 0 1 − 12 0 − 15 0 0 0 0 1
2

TTK4115 (MOA) Lecture 3 57 / 64


Characteristic polynomial
 √  √ 
|sI − A| = s4 − 15s2 = s2 − 15 + s 15 + s

α2 = −15, α1,3,4 = 0

Better characteristic polynomial


√  √  √
|sI − A0 | = s2 15 + s 15 + s = s4 + 2 15s3 + 15s2

η1 = 2 15, η2 = 15, η3,4 = 0

Pole placement: u = k̄x̄


   √ 
k̄ = η 1 − α1 η2 − α2 η 3 − α3 η4 − α4 = 2 15 30 0 0

Transformed system
 √ 
−2 15 −15 0 0
 1 0 0 0 
Ā − b̄k̄ =  
 0 1 0 0 
0 0 1 0

TTK4115 (MOA) Lecture 3 58 / 64


Reversion to original system x̄ = P−1 x

x̄˙ = (Ā − b̄k̄)x̄ ⇒ P−1 ẋ = (Ā − b̄k̄)P−1 x ⇒ ẋ = PĀP−1 x − Pb̄k̄P−1 x ⇒ ẋ = (A − bk)x

Transformed gain matrix



k = k̄P−1 =
 
0 −60 0 −4 15

Original state equation: ẋ = Ax


    
ẋ 0 0 1 0 x
 θ̇   0 0 0 1 
 θ
 
 = 
 u̇   0 −5 0 0  u 
q̇ 0 15 0 0 q

Closed loop state equation ẋ = (A − bk)x


    
ẋ 0 0 1 0 x
 θ̇   0 0 0 √1  θ 
 u̇  = 
    
0 25 0 2 √15   u 
q̇ 0 −15 0 −2 15 q

TTK4115 (MOA) Lecture 3 59 / 64


Pole placement

Procedure
1 Calculate the system’s transfer function and controllability matrix.
2 Find transform to controllable canonical form, x = Px̄.
3 Choose gain matrix k̄ such that u = −k̄x̄ leads to the desired poles. Always possible.
4 Transform k̄ back to the original coordinates, k = k̄P−1

TTK4115 (MOA) Lecture 3 60 / 64


Pole placement

Where to place poles Considerations


=(s) Close spacing of eigenvalues: sluggish
response, large u.
r Large σ: fast response, large u.
Large r : fast response, large u.
θ Large θ: greater overshoot
<(s)

TTK4115 (MOA) Lecture 3 61 / 64


Pole placement in MIMO systems

Controllable canonical form: p inputs


−α1 Ip −α2 Ip −α3 Ip −α4 Ip
   
Ip
Ip 0 0 0  0 
Ā =  B̄ = 
 
0 Ip 0 0  0 
0 0 Ip 0 0

G(s) = C(sI − A)−1 B + D


s3 N1 + s2 N2 + sN3 + N4
G(s) = +D
s4 + s3 α1 + s2 α2 + sα3 + α4

TTK4115 (MOA) Lecture 3 62 / 64


Pole placement in MIMO systems

Controllable canonical form: p inputs


−α1 Ip −α2 Ip −α3 Ip −α4 Ip
   
Ip
Ip 0 0 0  0 
Ā =  B̄ = 
 
0 Ip 0 0  0 
0 0 Ip 0 0

Pole placement
 
K̄ = (η1 − α1 )Ip (η2 − α2 )Ip (η3 − α3 )Ip (η4 − α4 )Ip

Ĝ(s) = C(sI − A + BK)−1 B + D


s3 N1 + s2 N2 + sN3 + N4
G(s) = +D
s4 + s3 η1 + s2 η2 + sη3 + η4

TTK4115 (MOA) Lecture 3 63 / 64


MIMO control

Comments
In matlab, use: ”K = place(A,B,eig)”.
Remember to always assign complex eigenvalues in pairs.
MIMO pole placement alters the common denominator of Gsp (s).
It may be difficult to tune the individual outputs.
Only eigenvalues are considered, not input amplitudes.

Linear Quadratic Regulator


The LQR allows more flexibility when specifying system performance. This is the preferred method
for MIMO systems.

TTK4115 (MOA) Lecture 3 64 / 64

You might also like