18.09.2014 - Erwin Sitompul

Modern Control
Lecture 2
Dr.-Ing. Erwin Sitompul
President University
http://zitompul.wordpress.com
2 0 1 4
President University
Erwin Sitompul
Modern Control 2/1
Chapter 2
Mathematical Descriptions of Systems
Homework 1: Electrical System
 Derive the state space representation of the following electric
circuit:
R
C2


u(t )
C1
L
vL (t )


Input variable u:
• Input voltage u(t)
Output variable y:
• Inductor voltage vL(t)
President University
Erwin Sitompul
Modern Control 2/2
Chapter 2
Mathematical Descriptions of Systems
Solution of Homework 1: Electrical System
R
C2


u(t )
C1
L
vL (t )


vR  RiR
diL
vL  L
 LiL
dt
dvC
iC  C
 CvC
dt
State variables:
• x1 is the voltage across C1
• x2 is the voltage across C2
• x3 is the current through L
( x1  u) R  C1 x1  C2 x2  0
C2 x2  x3
x1  1 RC1  x1  1 C1  x3  1 RC1  u
x2  1 C2  x3
x1  x2  Lx3
x3  1 L  x1  1 L  x2
President University
Erwin Sitompul
Modern Control 2/3
Chapter 2
Mathematical Descriptions of Systems
Solution of Homework 1: Electrical System
 The state space equation can now be written as:
x1  1 RC1  x1  1 C1  x3  1 RC1  u
x2  1 C2  x3
x3  1 L  x1  1 L  x2
 x1   1 RC1
x    0
 2 
 x3   1 L
1 C1   x1  1 RC1 
0
1 C2   x2    0  u
1 L
0   x3   0 
0
 x1 
y  1 1 0  x2   0  u
 x3 
President University
Erwin Sitompul
Modern Control 2/4
Chapter 2
Mathematical Descriptions of Systems
Example: Transfer Function
 Given the following transfer function
1
Y ( s)  3
U (s)
2
s  a2 s  a1s  a0
and assuming zero initial conditions, construct a state space
equations that can represent the given transfer function.
s 3Y ( s )  a2 s 2Y ( s )  a1sY ( s )  a0Y (s )  U (s )
y (t )  a2 y(t )  a1 y(t )  a0 y(t )  u (t )
x1  y
x2  y
x3  y
x1  x2
x2  x3
x3  y  a0 x1  a1 x2  a2 x3  u (t )
President University
Erwin Sitompul
Modern Control 2/5
Chapter 2
Mathematical Descriptions of Systems
Example: Transfer Function
The state space equation can now be given as:
1
0   x1  0 
 x1   0
x    0
0
1   x2   0 u
2
  
   
 x3   a0 a1 a2   x3  1 
 x1 
1
y  1 0 0  x2   0u
Y
(
s
)

U (s)
3
2
 
s  a2 s  a1s  a0
 x3 
The state space equation can
also be given using block
diagram:
u(t)
y (t )
+
––
–

y(t )

y(t )

a2
a1
a0
President University
Erwin Sitompul
Modern Control 2/6
y(t )
Chapter 4
State Space Solutions and Realizations
Vector Case and Scalar Case
 The general form of state space in vector case, where there are
multiple inputs and multiple outputs, is given as:
x(t )  Ax(t )  Bu(t )
y(t )  C x(t )  Du(t )
 In scalar case, where the input and the output are scalar or single,
the state space is usually written as:
x (t )  Ax (t )  bu (t )
y(t )  c x (t )  du (t )
T
President University
Erwin Sitompul
Modern Control 2/7
Chapter 4
State Space Solutions and Realizations
Solution of State Equations
 Consider the state equations in vector case.
x(t )  Ax(t )  Bu(t )
 Multiplying each term with e–At,
e At x(t )  e At Ax(t )  e At Bu(t )
e At x(t )  e At Ax(t )  e At Bu(t )
d  At
e    Ae At

dt
d  At
 At
e
x
(
t
)

e
Bu(t )


dt
 The last equation will be integrated from 0 to t:
t
e  At x ( )    e  A Bu( ) d
t
0
0
President University
Erwin Sitompul
Modern Control 2/8
Chapter 4
State Space Solutions and Realizations
Solution of State Equations
t
e  At x ( )    e  At Bu( )d
t
0
0
t
e  At x (t )  e  A0 x (0)   e  A Bu( )d
0
t
x (t )  e At x (0)   e A(t  ) Bu( )d
Solution of State
Equations
0
 At t=0, x(t) = x(0) = x0, which are the initial conditions of the
states.
President University
Erwin Sitompul
Modern Control 2/9
Chapter 4
State Space Solutions and Realizations
Solution of Output Equations
 We know substitute the solution of state equations into the output
equations:
y (t )  C x (t )  Du(t )
t
 At

A( t  )
y(t )  C e x (0)   e
Bu( )d   Du(t )
0


President University
Erwin Sitompul
Solution of
Output
Equations
Modern Control 2/10
Chapter 4
State Space Solutions and Realizations
Solutions of State Space in Frequency Domain
 The solution of state equations and output equations can also be
written in frequency domain:
x(t )  Ax(t )  Bu(t )
s X (s)  x(0)  AX (s)  BU (s)
(s I  A) X (s)  x(0)  BU (s)
X (s)  (s I  A)1 x(0)  (s I  A)1 BU ( s)
Solution of State Equations
y (t )  C x (t )  Du(t )
Y (s)  C X (s)  DU (s)
Y ( s)  C ( s I  A) 1 x (0)  ( s I  A) 1 BU ( s)  DU ( s)
Solution of Output Equations
President University
Erwin Sitompul
Modern Control 2/11
Chapter 4
State Space Solutions and Realizations
Relation between eAt and (sI–A)
 Taylor series expansion of exponential function is given by:
et  1   t 
 2t 2
2!

2
t
2
e At  I  t A  A 
2!

tk k
 A
k 0 k !

 nt n
n!
tn n
 A
n!
Scalar Function
● Exact solution, around t = 0,
infinite number of terms
Vector Function
 t k   ( k 1)
 It can be shown that L    s
so that:
 k !
k



t
k
k
At
L e   L  A    s  ( k 1) A
 k 0 k !  k  0
President University
Erwin Sitompul
Modern Control 2/12
Chapter 4
State Space Solutions and Realizations
Relation between eAt and (sI–A)
 Deriving further,

L e At    s  ( k 1) A
k
k 0
1
2
3
 s I  s A s A 
2
s 1 I

I  s 1 A
 s 1 ( I  s 1 A)1
  s( I  s A) 
1
L e At   ( s I  A)1
President University
1
e At  L1 ( s I  A) 1 
Erwin Sitompul
Modern Control 2/13
Chapter 4
State Space Solutions and Realizations
State Transition Matrix
 Writing again the general form of the state space equations:
x(t )  Ax(t )  Bu(t )
y(t )  C x(t )  Du(t )
 The behavior of x(t) and y(t) can be classified into:
 Homogenous solution (zero input, initial state applied)
 Non-homogenous solution (input applied, initial state applied)
President University
Erwin Sitompul
Modern Control 2/14
Chapter 4
State Space Solutions and Realizations
State Transition Matrix
 Homogenous Solution:
x(t )  Ax(t )
s X (s)  x(0)  AX (s)
x (t )  L1 ( s I  A) 1  x (0)
X ( s)  ( s I  A)1 x (0)
x (t )  e At x(0)
 eAt is called the state transition matrix, able to give the current
state x(t) out of the initial state x(0),
Φ  e At  L1 ( s I  A) 1 
President University
Erwin Sitompul
Modern Control 2/15
Chapter 4
State Space Solutions and Realizations
State Transition Matrix
 Since
x (t )  e At x(0)  Φ(t ) x(0)
 We can write
x (t0 )  e At0 x (0)  x (0)  e At0 x (t0 )
A ( t t )
x (t )  e At e  At0 x (t0 )  e 0 x (t0 )  Φ(t  t0 ) x (t0 )
 Some properties of state transition matrix:
1. Φ (0)  I
1
2.
Φ (t )  Φ (t )
3.
x (0)  Φ ( t ) x (t )
4.
Φ (t2  t1 )Φ (t1  t0 )  Φ (t2  t0 )
5.
Φ (t ) k  Φ (kt )
President University
Erwin Sitompul
Modern Control 2/16
Chapter 4
State Space Solutions and Realizations
State Transition Matrix
 Non-Homogenous Solution:
s X (s)  x(0)  AX (s)  BU (s)
(s I  A) X (s)  x(0)  BU (s)
X (s)  (s I  A)1 x(0)  (s I  A)1 BU ( s)
 Then,
x(t )  L1 ( s I  A) 1  x (0)  L1 ( s I  A) 1 BU ( s) 
t
x (t )  Φ (t ) x (0) 
 Φ(t   ) Bu( )d
0
Homogenous
Solution
President University
Erwin Sitompul
Modern Control 2/17
Chapter 4
State Space Solutions and Realizations
Example 1: Solution of State Equations
0 1
Compute ( s I  A) if A  
.
1

2


1
1 
s
( s I  A)  


1
s

2


 s  2 1
1
( s I  A) 
s 
( s)( s  2)  (1)(1)  1
1
 s2
 s 2  2s  1

1

 s 2  2s  1
President University
1

s 2  2s  1 

s

s 2  2s  1 
Erwin Sitompul
Modern Control 2/18
Chapter 4
State Space Solutions and Realizations
Example 2: Solution of State Equations
0 1
0
x (t )    u (t ), find the solution for x(t).
Given x (t )  

1 2
1 
t
x (t )  e At x (0)   e A(t  ) Bu ( )d
0
e At  L1 ( s I  A) 1 
1 
 s2
2

( s  1) 2 
1 ( s  1)
L 

s 
 1
 ( s  1) 2 (s+1) 2 
(1  t )et
te t 

t
t 
te
(1

t
)
e


President University
Erwin Sitompul
Modern Control 2/19
Chapter 4
State Space Solutions and Realizations
Example 2: Solution of State Equations
Now, we substitute eAt to obtain the solution for x(t):
(1  t )et
x (t )  
t
te

te t 
x (0) 
t 
(1  t )e 
(1  (t   ))e  (t  )
0  (t   )e(t  )
t
(1  t )e t

t
te

President University
(t   )e  ( t  )  0
u ( )d
 ( t  )   
(1  (t   ))e
 1 
 t

 ( t  )
u ( )d 
   (t   )e
t
te 
 0

x
(0)

t 
t

(1  t )e 
  (1  (t   ))e  (t  )u ( )d 
 0

Erwin Sitompul
Modern Control 2/20
Chapter 4
State Space Solutions and Realizations
Example 3: Solution of State Equations
If x(0)=0 and u(t) is a step function, determine x(t).
(1  t )e  t
x (t )  
t
te

 t

 ( t  )
1( )d 
   (t   )e
t
te 
 0

0

t 
t

(1  t )e 
  (1  (t   ))e  (t  )1( )d 
 0



  t
 ( t  )
d 
 x1 (t )     (t   )e


  0


 t
 x2 (t )    (1  (t   ))e  (t  ) d 

  0

President University
Erwin Sitompul
Modern Control 2/21
Chapter 4
State Space Solutions and Realizations
Example 3: Solution of State Equations


  t
 ( t  )
d (t   ) 
 x1 (t )    (t   )e


 0


 t
 x2 (t )    ((t   )  1)e  (t  ) d (t   ) 

  0

 e (t  ) (1  (t   ))  t 
0 


 e (t  ) (t   )  t 
0 

 1  et (1  t ) 


t
e t


d (t   )
 1
d
d (t   )   d
t
t
te
dt


e
(1  t )

t
t
e
dt


e

x1 (t )  1  et (1  t )
x2 (t )  et t
President University
Erwin Sitompul
Modern Control 2/22
Chapter 4
State Space Solutions and Realizations
Example 4: Solution of State Equations
Compute
eAt
 0 1
if A  
 .

1
0


President University
Erwin Sitompul
Modern Control 2/23
Chapter 4
State Space Solutions and Realizations
Example 5: Solution of State Equations
Find
eAt
 1 1 
for A   1
.


2
 2

President University
Erwin Sitompul
Modern Control 2/24
Chapter 4
State Space Solutions and Realizations
Equivalent State Equations
1H

x1

1
1F
x2
u(t )
x2

y(t )
x2

State variables:
• x1 : inductor current iL
• x2 : capacitor voltage vC
diL
vL  L
 x1
dt
vR
iR 
 x2
R
dvC
 x2
iC  C
dt
x2  u  x1
x2  x1  x2
y  x2
 x1  0 1  x1  1 
 x   1 1  x   0 u (t )
 2  
 2 
 x1 
y   0 1  
 x2 
President University
Erwin Sitompul
Modern Control 2/25
Chapter 4
State Space Solutions and Realizations
Homework 2: Equivalent State Equations
1. Prove that for the same system, with different definition of state
variables, we can obtain a state space in the form of:
1H


1
u(t )

x1
1F
x2
y(t )

State variables:
• x1 : current of left loop
• x2 : current of right loop
President University
 x1  1 1  x1  1
   u (t )
 



 x2  1 0  x2  1
 x1 
y  1 1  
 x2 
Erwin Sitompul
Modern Control 2/26
Chapter 4
State Space Solutions and Realizations
Homework 2: Equivalent State Equations
2. Derive a state-space description for the following diagram
President University
Erwin Sitompul
Modern Control 2/27
Chapter 4
State Space Solutions and Realizations
Homework 2A: Equivalent State Equations
1. From Homework 1A, find out whether it is possible to describe
the same circuit with different definition of state variables.
C1
C2


u(t )
x1
R
x2
L
vL (t )


State variables:
• x1 : current of left loop
• x2 : current of right loop
President University
Erwin Sitompul
Modern Control 2/28
Chapter 4
State Space Solutions and Realizations
Homework 2A: Equivalent State Equations
2. Given the following state space, with zero initial conditions,
0 1
 1
x (t )  
x (t )    u (t )

1 2 
1.5
y(t )  1 2 x(t ),
find the solution for y(t) for a unit step input and draw a sketch
of it.
 Deadline: Wednesday, 24 September 2014.
President University
Erwin Sitompul
Modern Control 2/29