You are on page 1of 61

MODERN CONTROL SYSTEMS

State Space Representation

Emam Fathy

Department of Electrical and Control Engineering

email: emfmz@aast.edu

http://www.aast.edu/cv.php?disp_unit=346&ser=68525
1
Transfer Function Limitations
𝑂/𝑃(𝑠)
𝑇𝐹 = ฬZIC
𝐼/𝑃(𝑠)

Modern control theory Conventional control


is applicable to: theory is applicable to:
– MIMO systems. – SISO systems.
– linear or nonlinear – Linear.
Systems. – time invariant.
– time invariant or time
varying.
2
State Space Representation

3
Example
 Consider the mechanical system shown in figure. We assume that the
system is linear. The external force u(t) is the input to the system, and
the displacement y(t) of the mass is the output. The displacement y(t)
is measured from the equilibrium position in the absence of the
external force. This system is a single-input, single-output system.

 From the diagram, the system equation is

𝑚𝑦(𝑡)
ሷ + 𝑏𝑦(𝑡)
ሶ + 𝑘𝑦(𝑡) = 𝑢(𝑡)

 This system is of second order. This means that


the system involves two integrators. Let us define
state variables 𝑥1 (𝑡) and 𝑥2 (𝑡) as

𝑥1 𝑡 = 𝑦(𝑡)
𝑥2 𝑡 = 𝑦(𝑡)
ሶ 𝑥ሶ 1 𝑡 = 𝑥2 (𝑡)
Example
𝑥1 𝑡 = 𝑦(𝑡) 𝑥2 𝑡 = 𝑦(𝑡)
ሶ 𝑚𝑦(𝑡)
ሷ + 𝑏𝑦(𝑡)
ሶ + 𝑘𝑦(𝑡) = 𝑢(𝑡)

 Then we obtain
𝑥ሶ 1 𝑡 = 𝑥2 (𝑡)
𝑏 𝑘 1
𝑥ሶ 2 𝑡 = − 𝑦ሶ 𝑡 − 𝑦 𝑡 + 𝑢 (𝑡)
𝑚 𝑚 𝑚
 Or
𝑥ሶ 1 𝑡 = 𝑥2 (𝑡)
𝑏 𝑘 1
𝑥ሶ 2 𝑡 = − 𝑥2 𝑡 − 𝑥1 𝑡 + 𝑢 (𝑡)
𝑚 𝑚 𝑚
 The output equation is
𝑦 𝑡 = 𝑥1 𝑡
Example
𝑏 𝑘 1
𝑥ሶ 1 𝑡 = 𝑥2 (𝑡) 𝑥ሶ 2 𝑡 = − 𝑥2 𝑡 − 𝑥1 𝑡 + 𝑢 (𝑡) 𝑦 𝑡 = 𝑥1 𝑡
𝑚 𝑚 𝑚
• In a vector-matrix form,

 x1 (t )   0 1   x (t )   0 
 x (t )    k b   1    1 u (t )
   x2 (t )   
 2   m m m
 x1 (t ) 
y (t )  1 0 
 2
x (t ) 

x (t )  Ax(t )  Bu (t )
y (t )  Cx (t )
Example(summary)
• The system equation is
𝑚𝑦(𝑡)
ሷ + 𝑏𝑦(𝑡)
ሶ + 𝑘𝑦(𝑡) = 𝑢(𝑡)
• Let 𝑥1 𝑡 = 𝑦(𝑡) 𝑥2 𝑡 = 𝑦(𝑡)

• Then 𝑥ሶ 1 𝑡 = 𝑥2 (𝑡)
𝑏 𝑘 1
𝑥ሶ 2 𝑡 = − 𝑦ሶ 𝑡 − 𝑦 𝑡 + 𝑢 (𝑡)
𝑚 𝑚 𝑚
• Or 𝑥ሶ 1 𝑡 = 𝑥2 (𝑡)
𝑏 𝑘 1
𝑥ሶ 2 𝑡 = − 𝑥2 𝑡 − 𝑥1 𝑡 + 𝑢 (𝑡)
𝑚 𝑚 𝑚
𝑦 𝑡 = 𝑥1 𝑡

 x1 (t )   0 1   x (t )   0 
 x (t )   k b   1    1 u (t )
   x2 (t )  
 2   m m m
 x1 (t ) 
y (t )  1 0 
 2
x (t ) 
8
State Space Modeling

• State space equations can be simplified as

x (t )  Ax(t )  Bu (t ) State Equation

y (t )  Cx (t )  Du (t ) Output Equation

Where,
x(t) ------------ State Vector y(t) ----------- Output Vector
A(nxn) ------ System Matrix C(qxn) ------ Output Matrix
B(nxp) ------- Input Matrix D -------------- Feed forward Matrix
u(t) ----------- Input Vector
10
Canonical Forms
 Canonical forms are the standard forms of state space models.

 Each of these canonical form has specific advantages which


makes it convenient for use in particular design technique.

 There are several canonical forms of state space models


– Phase variable canonical form
– Controllable Canonical form
– Observable Canonical form
– Diagonal Canonical form
• Jordan Canonical Form

 It is interesting to note that the dynamics properties of system


remain unchanged whichever the type of representation is
used.
Phase Variable Canonical form
• Obtain the state equation in phase variable form for the
following differential equation, where u(t) is input and y(t) is
output.
𝑑3𝑦 𝑑2𝑦 𝑑𝑦
2 3 +4 2 +6 + 8𝑦 = 10𝑢(𝑡)
𝑑𝑡 𝑑𝑡 𝑑𝑡

• The differential equation is third order, thus there are three


state variables:
𝑥1 = 𝑦 𝑥2 = 𝑦ሶ 𝑥3 = 𝑦ሷ
• And their derivatives are (i.e state equations)
𝑥ሶ 1 = 𝑥2
𝑥ሶ 2 = 𝑥3
𝑥ሶ 3 = −4𝑥1 − 3𝑥2 − 2𝑥3 + 5𝑢(𝑡)
Phase Variable Canonical form
𝑥ሶ1 = 𝑥2 𝑥1 = 𝑦 𝑥2 = 𝑦ሶ 𝑥3 = 𝑦ሷ
𝑥ሶ 2 = 𝑥3
𝑥ሶ 3 = −4𝑥1 − 3𝑥2 − 2𝑥3 + 5𝑢(𝑡)

• In vector matrix form

 x1   0 1 0   x1  0
x    0 0 1   x   0u (t )
 2   2   
 x3   4  3  2  x3  5
 x1 
y (t )  1 0 0 x2 
 x3 
state-space representations
• Consider a system defined by
n n 1 n n 1
y  a1 y    an 1 y  an y  bo u  b1 u    bn 1u  bnu
• where u is the input and y is the output.
• This equation can also be written as
𝑌(𝑠) 𝑏𝑜 𝑠 𝑛 + 𝑏1 𝑠 𝑛−1 + ⋯ + 𝑏𝑛−1 𝑠 + 𝑏𝑛
= 𝑛
𝑈(𝑠) 𝑠 + 𝑎1 𝑠 𝑛−1 + ⋯ + 𝑎𝑛−1 𝑠 + 𝑎𝑛

• We will present state-space representations of the system


defined by above equations in controllable canonical form
and observable canonical form.
Controllable Canonical Form
𝑌(𝑠) 𝑏𝑜 𝑠 𝑛 + 𝑏1 𝑠 𝑛−1 + ⋯ + 𝑏𝑛−1 𝑠 + 𝑏𝑛
= 𝑛
𝑈(𝑠) 𝑠 + 𝑎1 𝑠 𝑛−1 + ⋯ + 𝑎𝑛−1 𝑠 + 𝑎𝑛
 x1   0 1 0  0   x1  0
 x   0 0 1  0   x2  0
 2    
               u
      
 xn 1   0 0 0  1   xn 1  0
 xn   an  an 1  an  2   a1   xn  1

 x1 
x 
 2 
y  bn bn 1  b2 b1     bou
 
 xn 1 
 xn 
Controllable Canonical Form (Example)
𝑌(𝑠) 𝑠+3
= 2
𝑈(𝑠) 𝑠 + 3𝑠 + 2

 x1   0 1   x1  0
 x    2  3  x   1u
 2   2   

 x1 
y  3 1 
x2 
Observable Canonical Form
𝑌(𝑠) 𝑏𝑜 𝑠 𝑛 + 𝑏1 𝑠 𝑛−1 + ⋯ + 𝑏𝑛−1 𝑠 + 𝑏𝑛
= 𝑛
𝑈(𝑠) 𝑠 + 𝑎1 𝑠 𝑛−1 + ⋯ + 𝑎𝑛−1 𝑠 + 𝑎𝑛

 x1  0 0   an   x1   bn 
0
 x  1 0  0  an 1   x2  bn 1 
 2  
                u
      

 xn 1  0 0  0  a2   xn 1   b2 
 xn  0 0  1  a1   xn   b1 

 x1 
 x 
 2 
y  0 0  0 1    bo u
 
x
 n 1 

 xn  
𝑦(𝑠) 3𝑠 + 3
= 3
𝑢(𝑠) 𝑠 + 2𝑠 2 + 𝑠 + 3

Controllable form:
0 1 0 0
𝑥ሶ = 0 0 1 𝑥 + 0 𝑢
−3 −1 −2 1

𝑦= 3 3 0 𝑥

Observable form:
−2 1 0 0
𝑥ሶ = −1 0 1 𝑥 + 3 𝑢
−3 0 0 3

𝑦= 1 0 0 𝑥
19
Diagonal Canonical Form
𝑌(𝑠) 𝑏𝑜 𝑠 𝑛 + 𝑏1 𝑠 𝑛−1 + ⋯ + 𝑏𝑛−1 𝑠 + 𝑏𝑛
=
𝑈(𝑠) 𝑠 + 𝑝1 𝑠 + 𝑝2 … … … (𝑠 + 𝑝𝑛 )
𝑐1 𝑐2 𝑐𝑛
= 𝑏𝑜 + + + ⋯+
𝑠 + 𝑝1 𝑠 + 𝑝2 𝑠 + 𝑝1

 x1   p1 0   x1  1
 x2    p2   x2  1
 .        u
   .
   
      
 xn   0  pn   xn  1

 x1 
 x2 
y  c1 c2  cn     bo u
 
 
 n
x
Example

𝑌(𝑠) 𝑠+3
= 2
𝑈(𝑠) 𝑠 + 3𝑠 + 2

𝑠+3 2 1
= = −
(𝑠 + 1)(𝑠 + 2) (𝑠 + 1) (𝑠 + 2)

 x1   1 0   x1  1
 x2    0  2  x2   1u

x 
y  2  1 1 
x2 
Jordan Canonical Form
𝑌(𝑠) 𝑏𝑜 𝑠 𝑛 + 𝑏1 𝑠 𝑛−1 + ⋯ + 𝑏𝑛−1 𝑠 + 𝑏𝑛
=
𝑈(𝑠) 𝑠 + 𝑝1 3 𝑠 + 𝑝2 … … … (𝑠 + 𝑝𝑛 )
𝑐1 𝑐2 𝑐3 𝑐4 𝑐𝑛
= 𝑏𝑜 + 3
+ 2
+ + +⋯+
𝑠 + 𝑝1 𝑠 + 𝑝1 𝑠 + 𝑝1 𝑠 + 𝑝2 𝑠 + 𝑝1

 x1 
 x2 
y  c1 c2  cn     bo u
 
 
 n
x
End of Lec

23
State Space to T.F
• Now Let us convert a space model to a transfer function model.
x (t )  Ax(t )  Bu (t ) (1)

y(t )  Cx(t )  Du(t ) (2)

• Taking Laplace transform of equation (1) and (2) considering


initial conditions to zero.
sX ( s )  AX ( s )  BU ( s ) (3)

Y ( s )  CX ( s )  DU ( s ) (4)

• From equation (3)

( sI  A) X ( s )  BU ( s )

X ( s )  ( sI  A) 1 BU ( s ) (5)
Transfer Matrix (State Space to T.F)
• Substituting equation (5) into equation (4) yields

1
Y ( s )  C ( sI  A) BU ( s )  DU ( s )

Y ( s )  C ( sI  A) 1

B  D U (s)

Y (s)
 C ( sI  A) 1 B  D
U ( s)
Example 3
 Convert the following State Space Model to
Transfer Function Model if K=3, B=1 and
M=10;

 x   0 1   x  0 
     K B      1  f (t )
  v   
 v   M M M 

 x
y (t )  0 1 
v 
Example 3
 Substitute the given values and obtain A, B,
C and D matrices.

 
x  0 1   x  0 

 v   3 1      1  f (t )
   10   v   
10  10 

 x
y (t )  0 1 
v 
Example 3
 0 1  0
A 3 1 B1

 10   10 
10 
D0
C  0 1

Y (s)
 C ( sI  A) 1 B  D
U ( s)
Example 3
 0 1  0
A 3 1 B1

 10   10 
10 
D0
C  0 1

1
  s 0  0 1  0
 0 1  1 
Y (s)
  3 1
U (s)  0 s      10 
  10 10  
Example 3
1
  s 0  0 1  0
 0 1  1 
Y (s)
  3 1
U (s)  0 s      10 
  10 10  
1
 s 1   0
 0 1  3 1 
Y (s)
1
U (s)  s   10 
 10 10  

 1 
 s  10 1  0 
 0 1
Y (s) 1
  1
3
s  10 
U (s) 1 3
s(s  )   
10 10  10 
Example 3
 1 
 s  10 1  0 
 0 1
Y (s) 1
  1
3
s  10 
U (s) 1 3
s(s  )   
10 10  10 

Y (s) 1  3  1
 0
  10 s  
U (s) s(s  1 )  3   10 
10 10

Y (s) 1 s

U ( s ) s ( s  1 )  3 10
10 10
Example 3
Y (s) 1 s

U ( s ) s ( s  1 )  3 10
10 10

Y (s) s

U ( s ) s (10 s  1)  3
Example
 Obtain the transfer function T(s) from
following state space representation.

Answer
34
State Controllability
 A system is completely controllable if there exists an
unconstrained control u(t) that can transfer any initial
state x(to) to any other desired location x(t) in a finite
time, to ≤ t ≤ T.

uncontrollable

controllable
State Controllability
 Controllability Matrix CT


CT  B AB A2 B  An 1 B 

 System is said to be state controllable if

rank (CT )  n
State Controllability (Example)
 Consider the system given below

 1 0  1 
x    x   u
 0  3 0
y  1 2x
State Controllability (Example)
• Controllability matrix CT is obtained as
CT  B AB 
1  1
B  AB   
0  0

• Thus

CT  1  1
0 0 

• Since 𝑟𝑎𝑛𝑘(𝐶𝑇) ≠ 𝑛 therefore system is not completely


state controllable.
State Observability
 A system is completely observable if and only if there exists a
finite time T such that the initial state x(0) can be determined
from the observation history y(t) given the control u(t), 0≤ t ≤ T.

observable
unobservable
State Observability
 Observable Matrix (OT)
 C 
 CA 
Observability Matrix OT   CA2 
  
CAn 1 

 The system is said to be completely state observable if

rank (OT )  n
Example
 Consider the system given below
0 1  0 
x    x   u
 0  2  1 
y  0 4x

 OT is obtained as
OT   C 
CA

 Where C  0 4

0 1 
CA  0 4   0  12
0  2 
State Observability (Example)
• Therefore OT is given as

OT  0 4 
0  12

• Since 𝑟𝑎𝑛𝑘(𝑂𝑇) ≠ 𝑛 therefore system is not completely state


observable.
Example
 Check the state controllability, state
observability of the following system

0 1  0 
A  , B   , C  0 1
1 0 1
48
Solution of State
Equations

49
Forced and Unforced Response
 Forced Response, with u(t) as forcing function

 x1   a11 a12   x1   b1 


 x   a      u(t )
 2   21 a22   x2  b2 

 Unforced Response (response due to initial


conditions)
 x1   a11 a12   x1 ( 0 )
 x   a   
a22   x2 ( 0 )
 2   21
Solution of State Equations
 Consider the state equation given below
x (t )  Ax(t ) (1)

 Taking Laplace transform of the equation (1)


sX ( s )  x(0)  AX ( s )
sX ( s )  AX ( s )  x(0)

sI  AX ( s)  x(0)


X ( s )  sI  A x(0)
1

1
X (s)  x ( 0)
sI  A
Solution of State Equations
1
X (s)  x ( 0)
sI  A
 Taking inverse Laplace

x(t )  e At x(0)

 (t )  e At
State Transition Matrix
Example
• Consider RLC Circuit obtain the state transition matrix
ɸ(t).
 1 iL Vo
vc   0   v   1  + +
 i    1
C
 
c
   C u(t ) Vc
 L  R  iL   
  0 - -
L L

R  3, L  1 and C  0.5

vc  0  2 vc  2


 i   1      u(t )
 3  iL   0 
 L 
Example
vc  0  2 vc  2
 i   1      u(t )
 3  iL   0 
 L 
• State transition matrix can be obtained as

  S 0  0  2  
1

 (t )   1[( SI  A)1 ]   1       


  0 S  1  3  

• Which is further simplified as

 S  3 2 
  
1 ( S  1)( S  2 ) ( S  1)( S  2 )
 (t )    
1 S
 
 ( S  1)( S  2) ( S  1)( S  2) 
Example
 S  3 2 
  
1 ( S  1)( S  2 ) ( S  1)( S  2 )
 (t )    
1 S
 
 ( S  1)( S  2) ( S  1)( S  2) 
• Taking the inverse Laplace transform of each element

( 2e  e ) ( 2e  2e )
t 2 t t 2 t
 ( t )   t  2 t t  2t 
 ( e  e ) ( e  2e ) 
Home Work
• Compute the state transition matrix if

 1 0 0

A  0 2 0 
 0 0  3
Solution

 (t )   [( SI  A) ]
1 1
Solution of State Equations
• Consider the state equation with u(t) as forcing function
x (t )  Ax(t )  Bu (t ) (1)
• Taking Laplace transform of the equation (1)

sX ( s )  x(0)  AX ( s )  BU ( s )
sX ( s )  AX ( s )  x(0)  BU ( s )

sI  AX ( s)  x(0)  BU ( s)


x(0)  BU ( s )
X (s) 
sI  A
Solution of State Equations
x(0)  BU ( s)
X (s) 
sI  A
x(0) BU ( s )
X (s)  
sI  A sI  A
• Taking the inverse Laplace transform of above equation.
t
x(t )   (t ) x(0)    (t   )u ( )dt
0

Natural Response
Forced Response
Example
• Obtain the time response of the following system:
 x1   0 1   x1  0
 x    2      u (t )
 3  x2  1
 2 
• Where u(t) is unit step function occurring at t=0.
consider x(0)=0.
Solution

• Calculate the state transition matrix


 (t )   [( SI  A) ]
1 1
Example
• Obtain the state transition equation of the system
t
x(t )   (t ) x(0)    (t   )u ( )dt
0
End of Lec

67
68
88
99
105

You might also like