You are on page 1of 49

DIGITAL CONTROL - Part II

MIEEC, DEEC, FEUP

Fernando Lobo Pereira

2016-17, 2nd semester

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Index
Part II - State Space Representation, Analysis and Synthesis
1 State Space Representation of Linear Time Invariant Systems.
2 Relation with Transfer Function.
3 Key Background Review - Algebra & Ordinary differential equations.
4 State Space Canonical Forms.
5 State-Transition Operator. Properties and Computation.
6 Controllability
7 Observability
8 Discrete-Time Version of the Previous items
9 Linear State Feedback Control
10 Linear State Feedback Estimation
11 Separation Principle

Key Reference: Ogata, Katsuhiko, Modern Engineering Control,


Prentice Hall, 5th edition, ISBN: 978-0-13-615673-4, Chapters 1, 2,
9, 10.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Linear Time Invariant Dynamic Control Systems
Output: y : [ti , tf ] → R, Input: u : [ti , tf ] → R.
System of order n:
0 0
y (n) +a1 y (n−1) +· · ·+an−1 y +an y = b0 u (n) +b1 u (n−1) +· · ·+bn−1 u +bn u
Xn n
X
(n) (n−i)
(For short: y + ai y = bi u (n−i) )
i=1 i=0
with y (n−1) (ti ) . . . y (ti ) given.
Observation: “Time invariant” ⇔ constant parameters/coefficients
Pn
Y (s) N(s) b s n−i
Transfer Function: = Pn i
= n i=0
U(s) D(s) s + i=1 ai s n−i
Observation: Use Laplace transform & consider y (n−1) (ti ) . . . y (ti )
and u (n−1) (ti ) . . . u(ti ) to be zero.
D(s) is designated by Characteristic Polynomial.
Observation: Analogue considerations apply to discrete time.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
State Variable / First-order Vector-valued Representation
Define the state variable, x, of the system as follows:
x =col(x1 , x2 , · · · , xn ) s.t. ẋi =xi+1 , i =1, . . . , n−1,
X n
ẋn =u − ai xn+1−i
n i=1
X
y= (bi − b0 ai )xn+1−i + b0 u.
i=1
Then y = Cx + Du, ẋ = Ax + Bu where D=[b0 ],
     
0 1 0 ··· 0 0 bn − an b0
 0
 0 1 · 0 
   T bn−1 − an−1 b0
 0  
A= :
 : : ··· : , B = : , C =
    : .

 0 0 0 ··· 1   0  b2 − a2 b0 
−an −an−1 −an−2 · · · −a1 1 b1 − a1 b0
“The state x of the system is the minimum amount of data
required at a given time t0 to determine x(t), ∀t ≥ t0 , once given
the control u(t) for ∀t ≥ t0 .”
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
State Variable / First-order Vector-valued Representation
Diagram representation

By applying the Laplace Transform with x(0) = 0 ∈ Rn , we obtain:

Y (s) = CX (s) + DU(s), and sX (s) = BU(s) + AX (s)

Y (s)
= C [sI − A]−1 B + D
U(s)
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Background Review - Coordinates Change
Let
A ∈ Rn×n be a linear map from Rn into Rn with domain and
range spaces are endowed with the canonical basis
{e1 , . . . , en }.
B = {v1 , . . . , vn } be a new basis for both domain and range
spaces and let the matrix T := [v1 : v2 : . . . : vn ].

Then,
The representation of A : Rn → Rn in the system of
coordinates defined by B is
à = T −1 AT
The representation of the system ẋ(t) = Ax(t) + Bu(t),
y (t) = Cx(t) + Du(t) in the basis B is
y (t) = C̃ x̃ + D̃u, x̃˙ = Ãx̃ + B̃u
where à = T −1 AT , C̃ = CT , B̃ = T −1 B, and D̃ = D.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Background Review - Eigenvalues & eigen-directions

Definition λ̄ and v̄ 6= 0 are, respectively, an eigenvalue and an


associated eigenvector of the matrix A ∈ Rn×n if they satisfy
Av̄ = λ̄v̄


Observation: [A − λ̄I ]v̄ = 0 ⇔ v̄ ∈ N A − λ̄I
⇔ rank(A − λ̄I ) < n, and, thus,

p(λ̄) = det(A − λ̄I ) = 0

Conclusion:The eigenvalues of A are the roots of its characteristic


polynomial, and the eigen-directions associated with the eigenvalue
λ are defined by the maximal linearly independent set of vectors in
N (A − λI ).

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Background Review - Eigenvalues & eigen-directions
Observations
The multiplicity m1 of an eigenvalue λ of matrix A is said the
algebraic multiplicity.
The dimension m2 of the subspace N (A − λI ) is said the
geometric multiplicity. Obviously m2 < m1 .
If m2 = m1 (take the case A = I ), then N (A − λI ) is span by
a set of eigenvectors.
If m2 < m1 , then there is a subspace of N (A − λI ) of
dimension m1 − m2 spanned by m1 − m2 generalized
eigenvectors.
Let λ̄ be an eigenvalue with (algebraic) multiplicity m1 > 1
and v̄ an associated eigenvector with an associated
eigen-space of dimension m̄ > 1. Then, v̄ has m̄ − 1
associated generalized eigenvectors, {v̄ 1 , · · · v̄ m̄−1 }, that may
be computed as follows:
For i = 1, . . . , m̄ − 1, Av̄ i = λ̄v̄ i + v̄ i−1 , where v̄ 0 = v̄ .
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Background Review - Eigenvalues & eigen-directions

Example

If the set of generalized eigenvectors {v̄ 1 , · · · v̄ m̄−1 }, computed as


in the previous slide, is chosen for elements of a basis B to
represent the operator specified by the matrix A in the canonical
basis, then this operator is represented by the m̄ × m̄ Jordan bloc
 
λ̄ 1 0 ... 0 0
 0 λ̄ 1 ... 0 0   
 : : : ... : :  = λ̄Im̄ + 0 Im̄−1
 

 0 0 0 ... λ̄ 1 
 0 0
0 0 0 ... 0 λ̄
in the subspace spanned by {v̄ 1 , · · · v̄ m̄−1 }.

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Background Review - Ordinary differential equations
The Fundamental System of ẋ(t) = Ax(t) is the operator
d
Φ(t, τ ):R×R → Rn×n s.t. dt Φ(t, τ ) = AΦ(t, τ ) & Φ(τ, τ ) = I .
Observations: For any
t1 , t2 , det (Φ(t1 , t2 )) 6= 0 & Φ(t1 , t2 ) = Φ−1 (t2 , t1 ).
t1 , t2 , t3 , Φ(t1 , t3 ) = Φ(t1 , t2 )Φ(t2 , t3 ).
x0 ∈ Rn , x(t) = Φ(t, t0 )x0 is the solution to ẋ = Ax for
t ≥ t0 with x(t0 ) = x0 .
Consider the controlled linear time invariant differential equation
ẋ = Ax + Bu, x(t0 ) = x0
Let x̃ be defined by x = Φ(t, t0 )x̃ .
˙
Then, ẋ(t) = dtd Φ(t, t0 )x̃(t) + Φ(t, t0 )x̃(t) ˙ .
= Ax(t) + Φ(t, t0 )x̃(t)
˙
It follows that x̃(t) = Φ(t0 , t)[ẋ(t) − Ax(t)] = Φ(t0 , t)Bu(t), and,
Z t
after integration, x̃(t) = x̃(t0 ) + Φ(t0 , τ )Bu(τ )dτ . Finally,
t0 Z t
x(t) = Φ(t, t0 )x̃(t) = Φ(t, t0 )x(t0 ) + Φ(t, τ )Bu(τ )dτ .
t0
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Controllable Canonical Form

Define the state variable, x, of the system as follows:


x =col(x1 , x2 , · · · , xn ) s.t. ẋi =xi+1 , i =1, . . . , n−1,
X n
ẋn =u − ai xn+1−i
i=1 n
X
It follows y = (bi − b0 ai )xn+1−i + b0 u.
i=1

Then, y = Cc x + Dc u, ẋ = Ac x + Bc u where Dc =[b0 ],

     
0 1 0 ··· 0 0 bn − an b0
 0
 0 1 ··· 0 
   T bn−1 − an−1 b0
 0  
Ac =
 : : : ··· : , Bc = : , Cc =
    : .

 0 0 0 ··· 1   0  b2 − a2 b0 
−an −an−1 −an−2 · · · −a1 1 b1 − a1 b0

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Observable Canonical Form

Define the state variable, x, of the system as follows:


x =col(x1 , x2 , · · · , xn ) s.t. ẋi =xi−1−an+1−i xn+[bn+1−i−an+1−i b0 ]u,
i =1, . . . , n − 1, xn =y − b0 u,
Xn
It follows that y = (bi − b0 ai )xn+1−i +b0 u.
i=1

Then, y = Co x + Do u, ẋ = Ao x + Bo u where Do =[b0 ],

     
0 0 ··· 0 0 −an bn − an b0 0
1 0 ··· 0 0 0 
 bn−1 − an−1 b0 
 
0
 
T  

:
Ao = : ··· : : :  , Bo =
  :  , Co = : 

0 0 ··· 1 0 −a2   b2 − a2 b0  0
0 0 ··· 0 1 −a1 b1 − a1 b0 1

Observation: Ao = AT T T
c , Bo = Cc , Co = Bc .

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Diagonal Canonical Form
Two situations may have to be considered: distinct and multiple
poles.
For distinct poles, define the state variable, x, of the system as
follows:
 
U(s)
x =col(x1 , x2 , · · · , xn ) s.t. ẋi = −pi xi + u, i.e., Xi (s) = s+pi
.
n n
Y (s) X ci X
Since = b0 + , it follows that y = ci xi +b0 u.
U(s) s + pi
i=1 i=1
Then, y = Cd x + Dd u, ẋ = Ad x + Bd u where Dd =[b0 ],

     
−p1 0 ··· 0 0 0 1 c1
 0 −p2 ··· 0 0 0  1  c2 
T 
     
Ad =
 : : ··· : : :  , Bd = :  , Cd = : 
  

 0 0 ··· 0 −pn−1 0  1  cn−1 
0 0 ··· 0 0 −pn 1 cn

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Diagonal Canonical Form (multiple poles)
The definition of the state variable, x, has to reflect the structure
of the matrix A which depends on the algebraic and geometric
multiplicity of the poles and associated null spaces.
The choice of state variables involves eigenvectors and generalized
eigenvectors:
ẋi = −pi xi + xi+1 , i = 1, . . . , nJ−1 , ẋnJ = −pnJ xnJ + u.
This gives rise to a matrix with a diagonal of Jordan blocks.
Example:

−p1
     
1 0 0 0 0 0 c1
 0
 −p1 1 0 0 0 
0
 

 c2 

 0 0 −p1 0 0 0   1 T 
 c3 
A=
 , B = , C = 
 0 0 0 −p1 1 0 
0
 

 c4 

 0 0 0 0 −p1 0   1   c5 
0 0 0 0 0 −p2 1 c6
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
State Transition Matrix - Definition and Notation
Linear Time Invariant (LTI) systems - constant A, B, C & D
Definition. Φ(t, t0 ):Rn →Rn defines the system’s response to:
initial state: x(t)=Φ(t,
Z t t0 )x(t0 ) [impulsive response]
control: x(t)= Φ(t, s)Bu(s)ds [convolution]
t0
control and initial state:
Z t
x(t)=Φ(t, t0 )x(t0 )+ Φ(t, s)Bu(s)ds
t0

Notation. Φ(t, t0 ) = e A(t−t0 ) . Direct extensionZ tof the scalar case:


a(t−t0 )
ẋ =ax+bu, x(t0 )=x0 7→ x(t)=e x0+ e a(t−s) bu(s)ds.
t0
For the matrix-valued case, it follows from series development:

A(t−t0 )
X Ak (t − t0 )k
e :=
k!
k=0

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


State Transition Matrix - Properties

a) Semigroup Property.
Let x(t1 )=Φ(t1 , t0 )x(t0 ) and x(t2 )=Φ(t2 , t1 )x(t1 ).
Then, x(t2 )=Φ(t2 , t0 )x(t0 ), with
Φ(t2 , t0 )x(t0 )=Φ(t2 , t1 )Φ(t1 , t0 )
 
b) det e A(t−t0 ) 6= 0, ∀t ∈ R
c) Let (λ̄, v̄ ) be an eigenvalue & eigenvector (generalized) pair of
A ∈ Rn×n . Then,
i) (λ̄k , v̄ ) also is for Ak .
ii) (e λ̄τ , v̄ ) also is for e Aτ .
d) State space basis change: Ã = T −1 AT ⇒ e Ãτ = T −1 e Aτ T .
e) A = diag (λ1 , . . . , λn ) ⇒ e Aτ = diag (e λ1 τ , . . . , e λn τ ).

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


State Transition Matrix - Properties (cont)

f) Jordan bloc.    τ τ2

λ 1 0 1 1! 2!
Example: A =  0 λ 1  ⇒ e Aτ = e λτ  0 1 1! τ 

0 0 λ 0 0 1
g) Complex eigenvalues. Let n = 2, u(t) = 0, and
(λ = σ + iµ, v = vR + ivI ) & (λ∗ = σ − iµ, v ∗ = vR − ivI ) be
eigenvalue and eigenvector pairs of A.
Let (α, β) be s.t. x0 = x(t0 ) = αv + βv ∗ , then
∗ (t−t )
x(t) = αe λ(t−t0 ) v + βe λ 0
v∗

Change for the state basis {vA , vB } defined by


vA = 12 (v+v ∗ ) = vR , & vB = 2i1 (v−v ∗ ) = vI . Then, A is
represented by:
   
σ −µ Ã(t−t0 ) σ(t−t0 ) cos(µ(t − t0 )) − sin(µ(t − t0 ))
Ã= &e =e
µ σ sin(µ(t − t0 )) cos(µ(t − t0 ))

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


State Transition Matrix - Computation
The most popular methods to compute e Aτ are
Laplace Transform.
e Aτ = L−1 [sI − A]−1


Observation: [sI − A]−1 is n × n matrix with entries


nij (s)
, being L−1 [sI − A]−1 = L−1(aij (s)) ,
  
aij (s)=
dij (s)
i = 1, . . . , n, j = 1, . . . , n.

Diagonal by basis change.


Let T ∈ Rn×n be a basis change matrix whose columns are
the eigenvectors, or, if necessary, also generalized
eigenvectors, of A.
Thus, A = T ΛT −1 , where Λ is a diagonal matrix or a diagonal
of Jordan blocs in case T includes generalized eigenvectors.
Then, e Aτ = Te Λτ T −1 .

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


State Transition Matrix - Computation (cont.)

Cayley-Hamilton. In what follows A ∈ Rn×n . Consider:


n−1
X
If f : R → R has a series development, then f (A) = βi Ai
n−1 i=0
X
If λ is a single eigenvalue of A, then f (λ) = βi λ i
i=0
If multiplicity of λ is q > 1, then
! additional equations of the
n−1
d j f (λ) dj X
form = βi λi , j = 1, . . . , q − 1 have to be
dλj dλj
i=0
added. X n−1
Thus, e Aτ = αi (τ )Ai where αi (τ )’s are given by solving:
i=0 n−1
X
Distinct eigenvalues: e λk τ = αi (τ )λik , k = 1, . . . , n.
i=0
Multiple eigenvalues: If λk has multiplicity mk , then
Pn−1Qj i−j
τ j e λk τ = i=j l=1 − l + 1) αi (τ )λk , j = 0, . . . , mk − 1.
(i
Q0
Convention: l=1 (i − l + 1) = 1.

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Controllability
Definition. A dynamic control system, ẋ = f (t, x, u), with
u(t) ∈ Ω ⊂ Rm and x(t) ∈ Rn , is Controllable if and only if
∀(x0 , x1 ) ∈ Rn × Rn , and ∀t0 , ∃t1 > t0 and a control function
u : [t0 , t1 ] → Ω s.t. x(t0 ) = x0 & x(t1 ) = x1 where x satisfies
ẋ(t) = f (t, x(t), u(t)) for almost all t ∈ [t0 , t1 ].
Observation 1. For time invariant systems, only t1 − t0 matters
and, thus, we can set t0 = 0. Why?
Observation 2. For a Linear Time Invariant system (LTI),
ẋ = Ax + Bu, u ∈ Rm , we can set t0 = 0 and either x(t0 ) or x(t1 )
can be set equal to 0. Why?
Remember that, for LTI control systems,Z t1 we have
x(t1 ) = e A(t1 −t0 ) x(t0 ) + e A(t1 −s) Bu(s)ds
t0
Thus, the arbitrariness of x(t1 ) − e 1 −t0 ) x(t0 )
A(t depends only on
that of either x(t0 ) or x(t1 )!
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Controllability (cont.)
Recall that. from the Cayley-Hamilton theorem, we have
n−1
X
e Aτ = αi (τ )Ai
i=0
Let z = x(t1 ) − e A(t1 −t0 ) x(t0 ) be arbitrary in Rn , x(t0 ) = 0,
n−1
X Z t1
i
τ = t1 − s and m = 1. Thus, z = A B αi (t1 − s)u(s)ds, i.e.,
i=0 t0
n n
∀z ∈ R , ∃β ∈ R , such that z = Mβ (1)
where
M = B AB · · · An−1 B ∈Rn×n is the Controllability
 

Matrix. Z τ
β = col(β1 , . . . , βn ) where βi = αi (t1 − s)u(s)ds,
t0
i = 1, . . . , n
Key Conclusion. A LTI control system is Controllable (i.e.,
condition (1) holds) if and only if the Controllability Matrix M is
of full rank.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Controllability (cont.)

Observation 4. For m > 1, we have


Xn−1 X
m Z τ
i
z= A bj αi (t1 − s)uj (s)ds
i=0 j=1 0
where bj is the j th column of B and uj is the j th component of u.
Now, M ∈ Rn×nm , and (1) is equivalent to “rank of M = n”.
Observation 5. A LTI system with a controllable state space
representation is controllable.
Example: Let (A, B, C , D) be a controllable representation with
A ∈ R4×4 and B ∈ R4×1 . Thus,
     
0 1 0 0 0 0 0 0 1
 0 0 1 0   0   0 0 1 a1 
A=  0 0 0 1  & B = 0  =⇒ M= 0 1 a1 α
    

a4 a3 a2 a1 1 1 a1 α β
for some α and β in R. Obviously rank of M = 4.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Observability
Definition A dynamic control system, ẋ = f (t, x, u), with
y (t) = h(x(t)) ∈ Rk , x(t) ∈ Rn , and u(t) ∈ Ω ⊂ Rm is
Observable if and only if
∀(x, u) the current state (say at time t) can be determined in
finite time (say, the interval [t0 , t]) by using the outputs y .
Observation 1. For time invariant systems, only t − t0 matters
and, thus, we can set t0 = 0. Moreover, we can replace t by any
τ ∈ [t, t0 ] in the definition.
Observation 2. For a Linear Time Invariant system (LTI),
ẋ = Ax + Bu, u ∈ Rm , y = Cx we can set u = 0. Notice that,
since the values of u are
Z known in [t0 , t], we can put
t
ỹ (t) = y (t) − C e A(t−τ ) Bu(τ )dτ = Ce A(t−t0 ) x(t0 ).
t0

Thus, let us consider u ≡ 0, and, thus, we have y (t) = Cx(t) with


C ∈ Rk×n and, usually k < n. To facilitate the analysis, let k = 1
(scalar output).
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Observability (cont.)
Recall that, from the Cayley-Hamilton theorem, we have
n−1
X

e = αi (τ )Ai and, thus, y (t) = αT (t − t0 )Qx(t0 )
i=0
where α(τ ) = col(α1 (τ ), · · · , αn (τ )) and Q is the Observability
Matrix defined by  
C
 CA 
Q=  ··· 

CAn−1
The observation problem can be cast as the following system of n
equations in the n unknown components of x(t0 ). Consider the set
{ti : ti ∈ [t0 , t], i 6= j ⇒ ti 6= tj },
y (ti ) = αT (ti − t0 )Qx(t0 ), i = 1, . . . , n. (2)
Observation 3: For k > 1 consider (2) extended to
yj (ti ) = αT (ti − t0 )Qj x(t0 ), i = 1, . . . , n, j = 1, . . . , k, where Qj is
the observability matrix constructed with line j of C .
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Observability (cont.)
Now, we just need to show that rank of Q = n is necessary and
sufficient condition for the system of equations (2) to have a
unique solution. In other words, from the observations
{y (ti ) : i = 1, . . . , n} we fully determine x(t0 ).
Argument of contradiction (still with k = 1):
Let us assume, that Q has rank n and that ∃ ti , tj with i 6= j s.t.
y (ti ) = y (tj ). Then, we would have α(ti − t0 ) = α(tj − t0 ) since
a) 0 = (α(ti − t0 ) − α(tj − t0 ))T Qx(t0 )
b) x(t0 ) ∈ Rn is arbitrary
However, the system of equations in the Cayley-Hamilton Theorem
specifying the coefficients αk (τ ), k = 0, . . . , n − 1, clearly shows
that this is not possible: From the set of equations provided by the
eigen-values λp , we have - here exemplified for an eigen-value of
multiplicity one -,
e λp (ti −t0 ) −e λp tj (ti −t0 ) = (α(ti −t0 )−α(tj −t0 ))T col(1, λp , · · · λn−1
p ).
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Observability (cont.)

Key conclusion: A LTI control system is Observable if and only if


the Observability matrix Q is full rank.

Observation 4: A linear time invariant system with an observable


state representation is observable.
Example: Let (A, B, C , D) be an observable representation with
A ∈ R4×4 and B ∈ R4×1 . Thus,
     
0 0 0 a4 0 0 0 0 1
 1 0 0 a3 
 & C T = 0  =⇒ Q= 0 0 1 a1 
   
A= 0 1 0 a2   0   0 1 a1 α 
0 0 1 a1 1 1 a1 α β
for some α and β in R. Obviously rank of M = 4.
Like in the controllability matrix, β = a3 + a2 a1 + a2 a12 + a13 and
α = a2 a1 + a12 .

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Relation between State-Space Continuum and Discrete
Time LTI Systems
Discrete-time equivalent of the continuum-time LTI control system
Z tb
A(tb −ta )
Recall: x(tb ) = e x(ta ) + e A(tb −s) Bu(s)ds.
ta
Let {ti : i = 0, 1, 2, . . .} be a discrete sequence of times and
u(t) = ui ∀ t ∈ [ti , ti+1 , i = 0, 1, 2, . . .. Then,
Z ti+1
A(ti+1 −ti )
x(ti+1 )=e x(ti ) + e A(ti+1 −s) dsBui .
ti
Rt
Let Φi = e A(ti+1 −ti )
and Ψi = ti i+1e A(ti+1 −s) dsB. Then, by putting
xi = x(ti ), the discrete-time dynamics become:
xi+1 = Φi xi + Ψi ui , x0 = x(0)
If ti+1 − ti is constant, i.e., ti+1 − ti = ∆ (periodic sampling), or
ti = i∆, then, the discrete-time system is LTI, i.e., Φi = Φ and
Ψi = Ψ, for all i:
xi+1 = Φxi + Ψui , x0 = x(0).
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Time Response of Discrete-Time LTI Systems

Exercise: Show by induction that


 
k
Y k−1
X k
Y
xk+1 = Φi x 0 +  Φj  Ψi ui + Ψk uk
i=0 i=0 j=i+1

Recall the induction method: (i) Check for k = 0, 1 or 2; (ii)


Assume it is true for k (write it down!); and (iii) Check that it
holds for k + 1.
Observation: Connect the sum in the second parcel with the
discrete-time convolution!
For LTI Discrete Time Systems, we, obviously have
k
X
k+1
xk+1 = Φ x0 + Φk−i Ψui
i=0

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


From Difference Equations to Discrete-Time State
Representations
The Discrete-Time counterpart to the Continuum-Time LTI
differential equations is the difference equation
n
X n+1
X
yn+1 + an+1−j yj = bn+1−j uj
j=1 j=1

Analogous to continuum time, a state space representation is


chosen by specifying a n dimensional state variable. We just give
the Controllable Canonical Form (CCF) example:
n
X
xi,k+1 = xi+1,k , i = 1, . . . n − 1, xn,k+1 =− ai xn−i+1,k + uk
i=1
Exercise: Show that the above difference equation can be
recovered if
X n
yk = (bi − ai b0 )xn−i+1,k + b0 uk
i=1
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
From Difference Equations to Discrete-Time State
Representations (cont.)

By letting xk = col(xi,k : i = 1, . . . n), the CCF representation is

xk+1 = Ac xk + Bc uk , yk = Cc xk + Dc uk

where Dc =[b0 ], and


     
0 1 0 ··· 0 0 bn − an b0
 0
 0 1 ··· 0 
   T bn−1 − an−1 b0
 0  
Ac =
 : : : ··· : 
, Bc = : , Cc =
   : .

 0 0 0 ··· 1   0   b2 − a2 b0 
−an −an−1 −an−2 · · · −a1 1 b1 − a1 b0

Analogous considerations and procedures follow for other


representation discrete-time systems canonical forms.

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Form Discrete-Time State Representations to z-domain
Transfer Function
From
xk+1 = Axk + Buk , yk = Cxk + Duk
we may write
zX (z) = AX (z) + BU(z), Y (z) = CX (z) + DU(z)
and, thus,
[zI − A]X (z) = BU(z) ⇒ X (z) = [zI − A]−1 BU(z).
Finally,
Y (z) = C [zI − A]−1 B + D U(z).
 

Exercise: Apply the inverse z transform, Z −1 , to obtain the


original LTI difference equation
n
X n+1
X
yn+1 + an+1−j yj = bn+1−j uj
j=1 j=0

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Controllability for Discrete-Time LTI Systems
The definition of controllability migrates trivially for the
discrete-time setting!
Now, we have xk+1 = Axk + PBuk , for any given x0 .
Thus, let z = xk − Ak x0 = ki=0 Ak−i Bui , then, from the fact
that, for any m ≥ n − 1,

R B AB · · · Am B
 
⊆ R (M)

where M = B AB · · · An−1 B is the Controllability


 

Matrix, it is clear that the system is controllable if and only if


rank of M = n.
This means that, it is possible to find a finite sequence of controls
{ui }ki=0 with, at least k = n − 1, such that
X k
k
z = xk − A x0 = Ak−i Bui is arbitrary.
i=0
Again, any system that admits a representation in the CCF is
controllable.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Observability for Discrete-Time LTI Systems
Observability notion migrates directly for the discrete-time setting!
Remark: yk = Cxk = CAk x0 , for any x0 , and null control.
Let ȳ k = lin(y0 , y1 , · · · , yk−1 ). We may write the following system
of k equations in terms of the n unknown components of x0
h i
ȳ k = x0T C T AT C T · · · Ak−1 T C T .


From the fact that, for any m ≥ n,


   
C C
 CA   CA 
N (Q) ⊆ N   · · ·  , where Q =  · · ·
   

CAm−1 CAn−1

is the Observability Matrix, it is clear that the system is


observable if and only if rank of Q = n.
Rank of Q = n ⇔ ∃ {yi : i = 0, · · · n − 1} s.t. x0 is determined.
Again, a system in the Canonical Observable Form is observable.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Linear State Feedback Controllers
Recall the LTI Control System ẋ = Ax + Bu, y = Cx, x ∈ Rn ,
u ∈ Rm , y ∈ Rk , n, m, k ∈ N with the characteristic polynomial
n
X n
Y
p(λ) = λn + ai λn−i = (λ + pi ),
i=1 i=1

whose roots are the poles of the system.


Problem Statement:
Determine the control state feedback matrix K , i.e., u = −Kx,
such that the closed loop system

ẋ = [A − BK ]x, x(0) = x0

has pre-determined arbitrary poles −p̄i . That is,


n
Y n
X n
Y
p̄(λ) = (λ + p̄i ) = λn + αi λn−i = (λ + p̄i ).
i=1 i=1 i=1

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Linear State Feedback Controllers (cont)

Statement: There exists a state feedback matrix


K = [kn kn−1 · · · k1 ] enabling the arbitrary placement of the poles
of the closed loop LTI system if and only if the system is
Controllable.
Proof & Synthesis: The system is Controllable if and only if it can
be represented in the Controllable Canonical Form. In this case,
the last line of the matrix A − BK is

[−an− kn − an−1− kn−1 · · · − a1− k1 ],

where the ai ’s are the coefficients of the characteristic polynomial


of ẋ = Ax.
Thus, it suffices to choose the ki ’s such that ki = αi − ai ,
i = 1, · · · , n.
The same idea holds for LTI discrete time systems.

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Linear State Feedback Controllers (cont)
General approach
Given the closed-loop response requirements, determine the
closed loop poles location, and, as a consequence the closed
loop characteristic polynomial
n−1
X
p̄(λ) = λn + βn−i λi
i=0
 
By letting K = kn kn−1 · · · k1 where the ki ’s are the
entries of K , determine the functions αj , j = 1, . . . n as
follows
n−1
X
n
p̄(λ) = det (λI − A + BK ) = λ + αn−i (k1 , . . . , kn )λi
i=0
To determine the ki ’s, solve the system of n equations
αi (k1 , . . . , kn ) = βi , i = 1, . . . , n.
Observation: For the multiple input and/or output systems, apply
the above for each (input, output) pair.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Linear State Feedback Controllers (cont)

It can be shown that the state feedback matriz K can be


computed via the Ackermann’s formula

M −1 φ(A)
 
K= 0 0 ··· 0 1
where
A is the matrix specifying the system dynamics.
M is the controllability matrix.
φ(·) is the matrix version of the desired closed loop
characteristic polynomial

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Linear State Feedback Controllers (cont)
The state space representation is not in the Controllable Canonical Form
Consider the state space coordinates change to obtain the system
in the Controllable Canonical Form T = MW , where M is the
controllability matrix and
 
an−1 an−2 · · · a1 1
 an−2 an−3 · · · 1 0 
 
W =  : : : :  .
 a1 1 ··· 0 0 
1 0 ··· 0 0
Then, it is easy to see that in the original reference frame we have
K = αn − an αn−1 − an−1 · · · α1 − a1 T −1 ,
 

where the ai ’s and the αi ’s are, respectively, the open-loop and the
closed-loop coefficients of the characteristic polynomial.
Alternative: From the given state space representation derive the
differential control system, and, then, from this obtain a CCF
representation. Apply the
MIEEC, approach
DEEC, FEUP of theCONTROL
DIGITAL previous
- Part slide.
II
Linear State Feedback Controllers (cont)
The system is not Controllable, i.e., rank[M] = q < n
1. Change of coordinates reference to obtain a controllable
subsystem
 
P = f1 · · · fq v1 · · · vn−q ,
where fi , i = 1, . . . , q are q columns of M which form a
linearly independent set, and vi , i = 1, . . . , n − q are n − q
arbitrary vectors such that rank[P] = n. Then,
   
−1 A11 A12 −1 B11  
Â=P AP = , B̂ =P B = , K̂ =KP = K1 K2 .
0 A22 0
Observation: The subsystem (A11 , B11 ) is controllable.
2. We have
det(sI − A + BK ) = det(sI − Â + B̂ K̂ )
= det(sIq − A11 + B11 K1 )det(sIn−q − A22 ).
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Linear Feedback State Estimation
Recall the LTI Control System ẋ = Ax + Bu, y = Cx, x ∈ Rn ,
u ∈ Rm , y ∈ Rk , n, m, k ∈ N.
Now, the state variable is not directly accessible. I has to be
estimated ( x̃) from the input (u) & output (y ) with a state
estimator:

Only the estimator gain matrix Ke has to be computed!


MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Linear Feedback State Estimation (cont.)

Design of the linear state estimator

The dynamics of the linear state estimator are:

x̃˙ = Ax̃ + Bu + Ke [y − C x̃]


Key issue: The error e = x − x̃ should converge to zero as fast as
possible. Preferably, much faster than the dynamics of the
controlled system.

Exercise: Show that the error dynamics are given by

ė = (A − Ke C )e

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Linear Feedback State Estimation (cont.)
Statement: There exists an estimator gain matrix
Ke = ke,n ke,n−1 · · · ke,1
enabling the arbitrary placement of the poles of the error dynamic
system if and only if the system is Observable.
Proof & Synthesis: The system is Observable if and only if it can
be represented in the Observable Canonical Form. In this case, the
last column of the matrix A − Ke C is
 T
−an− ke,n −an−1− ke,n−1 · · · −a1− ke,1 ,
where the ai ’s are the coefficients of the characteristic polynomial
of ẋ = Ax. Thus, it suffices to choose the ke,i ’s such that
ke,i = βi − ai , i = 1, · · · , n, where
n
Y n
X
n
q(λ) = det(λI − (A − Ke C )) = (λ + qi ) = λ + βi λn−i
i=1 i=1
being the −qi ’s, i = 1, . . . , n, are the poles of the error dynamics.
The same idea holds for LTI discrete time systems.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Linear Feedback State Estimation (cont.)
General approach
Given the state estimation error requirements, determine the
poles location of the error dynamics, and, as a consequence
the its characteristic polynomial
n−1
X
q(λ) = λn + βn−i λi
i=0
 T
By letting Ke = ke,n ke,n−1 · · · ke,1 where the ke,i ’s
are the entries of Ke , determine the functions αj , j = 1, . . . n
as follows
n−1
X
q(λ) = det (λI − A + Ke C ) = λn + αn−i (ke,1 , . . . , ke,n )λi
i=0
To determine the ke,i ’s, solve the system of n equations
αi (ke,1 , . . . , ke,n ) = βi , i = 1, . . . , n.
Observation: For the multiple input and/or output systems, apply
the above for each (input, output) pair.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Linear Feedback State Estimation (cont.)

It can be shown that the state feedback matriz Ke can be


computed via the Ackermann’s formula
T
Ke = Φ̃(A)N −1

0 0 ··· 0 1
where
A is the matrix specifying the system dynamics.
Q is the observability matrix.
φ̃(·) is the matrix version of the desired error dynamics
characteristic polynomial

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Linear State Feedback Controllers (cont)
The state space representation is not in the Observable Canonical Form
Consider state space coordinates change to obtain the system in
the Observable Canonical Form (OCF) U = WQ T , where Q is the
observability matrix and
 
an−1 an−2 · · · a1 1
 an−2 an−3 · · · 1 0 
 
W =  : : : :  .
 a1 1 ··· 0 0 
1 0 ··· 0 0
Then, it is easy to see that in the original reference frame we have
T
Ke = U −1 βn − an βn−1 − an−1 · · · β1 − a1

,
where the ai ’s and the βi ’s are the characteristic polynomials
coefficients of, respectively, the system open-loop and the error
dynamics.
Alternative: From state space representation get the differential
control system, and, then, the OCF representation.
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Linear State Feedback Controllers (cont)
The system is not Observable, i.e., rank[Q] = q < n
1. Change of coordinates reference to obtain a observable
subsystem
 
R = f1 · · · fr v1 · · · vn−r ,
where fi , i = 1, . . . , q are r columns of Q which form a
linearly independent set, and vi , i = 1, . . . , n − r are n − r
arbitrary vectors such that rank[R] = n. Then,
   
−1 A11 0   −1 Ke,1
Â=R AR = , Ĉ =CR = C11 0 , K̂e =R Ke =
A21 A22 Ke,2
Observation: The subsystem (C11 , A11 ) is observable.
2. We have
det(sI − A + Ke C ) = det(sI − Â + K̂e Ĉ )
= det(sIr − A11 + Ke,1 C11 )det(sIn−r − A22 ).
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Bringing together state estimation and state feedback
control
Consider the control given by linear feedback of the state estimate
u = −K x̃

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II


Bringing together state estimation and state feedback
control (cont.)
The overall system’s equations are:
ẋ = Ax + Bu, y = Cx
x̃˙ = (A − Ke C )x̃ + Bu + Ke y
u = −K x̃
Since e = x − x̃, i.e., x̃ = x − e, we have
    
ẋ A − BK BK x
=
ė 0 A − Ke C e

Separation Principle: The overall characteristic polynomial is

det (λI − A + BK ) × det (λI − A + Ke C ).

Thus, the feedback control and the state estimator can be


designed independently as far as the controlled system and error
dynamics are decoupled!
MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II
Bringing together state estimation and state feedback
control (cont.)

Transfer Function of the Output Feedback Controller

Let
U(s) = −K X̃ (s), and
s X̃ (s) = (A − Ke C )X̃ (s) + BU(s) + Ke Y (s)
we have
X̃ (s) = (sI − A + Ke C + BK )−1 Ke Y (s)
and, thus,

U(s) = −K (sI − A + Ke C + BK )−1 Ke Y (s).


Exercise: Fill in the gaps in the above deduction.

MIEEC, DEEC, FEUP DIGITAL CONTROL - Part II

You might also like