You are on page 1of 48

Lecture Notes

Fundamentals of Control Systems


Instructor: Assoc. Prof. Dr. Huynh Thai Hoang
Department of Automatic Control
Faculty of Electrical & Electronics Engineering
Ho Chi Minh City University of Technology
Email: hthoang@hcmut.edu.vn
huynhthaihoang@yahoo.com
Homepage: www4.hcmut.edu.vn/~hthoang/

6 December 2013 © H. T. Hoang - www4.hcmut.edu.vn/~hthoang/ 1


Chapter 7

MATHEMATICAL MODEL OF
DISCRETE TIME CONTROL SYSTEMS

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 2


Content

 Introduction to discrete-time
discrete time system
 The Z-transform
 Transfer function of discrete-time system
 State-space equation of discrete-time system

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 3


Introduction to discrete-
discrete-time systems

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 4


Digital control systems

r(kT) u(kT)
(kT) uR(t) y(t)
Computer D/A Plant

yfb(kT)
A/D Sensor

 “Computer” = computational equipments based on


microprocessor technology (microprocessor,
(microprocessor microcontroller
microcontroller,
PC, DSP,…).
 Advantages of digital control system:
 Flexibility
 Easy to implement complex control algorithms
 Computer can control many plants at the same time.

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 5


Discrete control systems

r(kT) Discrete u(kT) uR(t) y(t)


Hold Plant
processing

yfb(kT)
Sampling Sensor

 Discrete control systems are control systems which


have signals at several points being discrete signal.

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 6


Sampling
 Sampling is the reduction of a continuous signal to a discrete
signal.
x(t) x*(t)
 Mathematical expression T
describing the sampling process:
x(t)

X * ( s )   x ( kT )e kTs
k
t
k 0
0
x*(t)
 Shannon’s Theorem:
1 t
f   2 fc
T 0

 If quantization error is negligible, then A/D converters are


approximate the ideal samplers.

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 7


Sampled--data hold
Sampled
Sampled data hold is the reconstruction of discrete signal to
Sampled-data
a continuous signal.
x*(t) xR (t)
ZOH
 Zero-order hold (ZOH): keep
x*(t)
signal unchanged between two
consecutive sampling instants
instants.
t
0
 Transfer function of the ZOH.
ZOH xR(t)

1  e Ts
GZOH ( s )  t
s 0

 If quantization error is negligible, then D/A converters are


approximate the zero-order hold.

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 8


The Z-
Z-transform

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 9


Definition of the Z-
Z-transform
 Consider x(k),
x(k) kk=0
0,1,2,…
12 being a discrete signal
signal. The Z-
Z
transform of x(k) is defined as:

X ( z )  Z x (k )   x ( k ) z k

k  
where:
 z  eTs (s is the Laplace variable, T is the sampling period)
 X(z) : Z-transform of x(k).
Z
Notation: x ( k )  X ( z )

 If x(k) = 0,  k < 0 then X ( z )  Z x ( k )   x ( k ) z k
k 0

 Region Of Convergence (ROC): set of z such that X(z) is finite.


6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 10
An interpretation of the Z-
Z-transform
 Suppose x(t) being a continuous signal, sample x(t) at the
sampling periode T , we have a discrete signal x(k) = x(kT).

 The mathematic model of the process of sampling x(t)



X * ( s )   x (kT )e kTs (1)
k 0

 The Z-transform of the sequence x(k) = x(kT).



X ( z )   x ( k ) z k (2)
k 0

 Due to z  eTs, the right hand-side of the expression (1) and


(2) are identical. So performing Z-transform of a signal is
equivalent to discretizing this signal.

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 11


Properties of the Z-
Z-transform
Given x(k) and y(k) being two sequences which have the Z-
transforms:
Z x ( k )  X ( z ) Z y ( k )  Y ( z )
 Linearity: Z ax ( k )  by ( k )  aX ( z )  bY ( z )
 Ti
Time shifting:
hifti Z x ( k  k0 )  z  k0
X ( z)
 Scale in Z-domain: Z a k x (k )  X (a 1 z )

Z kx ( k )   z
 Derivative in Z-domain:
dX ( z )
dz
 Initial-value theorem: x (0)  lim X ( z )
z 

 Fi l l theorem:
Final-value th x ( )  lim(1  z 1 ) X ( z )
z 1

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 12


The Z-
Z-transform of basic discrete signals
 Dirac impulse:
(k)
1 if k  0
 (k )   1
0 if k  0 k

Z  (k
( k )  1
0

 Step
p function: u(k)
1 if k  0 1
u(k )  
0 if k  0 k
0
Z u( k ) 
z
z 1
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 13
The Z-
Z-transform of basic discrete signals (cont’)
 Ramp function: r(k)
kT if k  0
r(k )  
0 if k  0 k
0
Z u( k ) 
Tz
z  12
 Exponential
p function:
x(k)
e -akT if k  0
x(k )  
0 if k  0 k
0
Z x ( k ) 
z
z  e aT
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 14
Discrete transfer function

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 15


Derive transfer function (TF) from difference equation

u(k) y(k)
Discrete system

 The input-output
input output relation ship of a discrete system can be
described by the difference equation:

a0 y ( k  n )  a1 y ( k  n  1)  ...  an 1 y ( k  1)  an y ( k ) 
b0u( k  m)  b1u( k  m  1)  ...  bm1u( k  1)  bmu( k )
where n>m, n is the order of the system.

 Taking the Z
Z-transform
transform the two sides of the above equation:
a0 z nY ( z )  a1 z n 1Y ( z )  ...  an 1 zY ( z )  anY ( z ) 
b0 z mU ( z )  b1 z m 1U ( z )  ...  bm1 zU ( z )  bmU ( z )
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 16
Derive TF from difference equation (con’t
(con’t))
 Taking the ratio Y(z)/U(z) to obtain the transfer function:

Y ( z ) b0 z m  b1 z m 1  ...  bm 1 z  bm
G( z)  
U ( z ) a0 z n  a1 z n 1  ...  an 1 z  an

 The above transfer function can be transformed into the


equivalent form:
 ( n m ) 1  m 1 m
Y ( z) z [b0  b1 z  ...  bm 1 z  bm z ]
G( z)  
U ( z) a0  a1 z 1  ...  an 1 z n 1  an z n

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 17


Derive TF from difference equation _ Example
 Consider a system described by the difference equation.
equation
Derive its transfer function:

y ( k  3)  2 y ( k  2)  5 y ( k  1)  3 y ( k )  2u( k  2)  u( k )

 Solution: Taking
g the Z-transform the difference equation:
q

z 3Y ( z )  2 z 2Y ( z )  5zY ( z )  3Y ( z )  2 z 2U ( z )  U ( z )

Y ( z) 2z2  1
 G( z)   3
U ( z ) z  2 z 2  5z  3

Y ( z) z 1 ( 2  z 2 )
 G( z)  
U ( z ) 1  2 z 1  5z 2  3z 3
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 18
Calculate transfer function from block diagram
R(s) Y(s)
+ GC(z) ZOH G(s)
 T

H(s)

Y ( z) GC ( z )G ( z )
 The closed-loop TF: Gk ( z )  
R ( z ) 1  GC ( z )GH ( z )
where
GC (z ) : TF of the controller, derive from difference equation

 G ( s )   G ( s ) H ( s ) 
1
G ( z )  (1  z )Z 1
  GH ( z )  (1  z )Z  
 s   s 
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 19
Calculate TF from block diagram – Example 1
 Find the closed-loop
closed loop transfer function of the system:
R(s) Y(s)
+ ZOH G(s)

T  0.5
3
G (s) 
s2

1  G(s)  1  3 
Solution: G ( z )  (1  z )Z    (1  z )Z  
 s   s (
(ss  2) 
20.5
1 3 z (1  e )
 (1  z )
2 ( z  1)( z  e 2
20.5
)

 0.948  a  z (1  e  aT )
G( z) 
z  0.368 Z   aT
 s ( s  a )  ( z  1)( z  e )
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 20
Calculate transfer function from block diagram – Example 1 (cont’)

 The closed-loop transfer function:

0.948
G( z)
Gk ( z )   z  0.368
1  G( z) 0.948
1
z  0.368
 0.948
Gk ( z ) 
z  0.580

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 21


Calculate TF from block diagram – Example 2
 Calculate the transfer function of the system:
R(s) Y(s)
+ ZOH G(s)
T  0.5

H(s)

3e  s 1
Given that G( s)  H ( s) 
s3 s 1
 Solution:
Th closed-loop
The l dl t
transfer
f function:
f ti

G( z)
Gk ( z ) 
1  GH ( z )
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 22
Calculate TF from block diagram – Example 2 (cont’)

1  G( s)  3e  s
 G ( z )  (1  z )Z   G( s) 
 s  ( s  3)
1  3 e s

 (1  z )Z  
 s( s  3) 
30.5
1 2 z (1  e )
 (1  z ) z
( z  1)( z  e 30.5 )


0.777
G( z)  2  a   aT
z (1  e T )
z ( z  0.223) Z   aT
 s ( s  a )  ( z  1)( z  e )
z  eTs  e0.5 s
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 23
Calculate TF from block diagram – Example 2 (cont’)

 G ( s) H ( s) 
1 3e  s
 GH ( z )  (1  z )Z   G ( s) 
 s  ( s  3)
s
1  3 e 
 (1  z )Z   H (s) 
1
 s ( s  3)( s  1)  ( s  1)
1 2 z ( Az  B)
 3(1  z ) z
( z  1)( z  e 30.5 )( z  e 10.5 )
(1  e 30.5 )  3(1  e 0.5 )
A  0.0673
3(1  3)  1  z ( Az  B)
Z    aT bT
 30.5
s ( s  a )( s  b )  ( z  1)( z  e )( z  e )
3e 30.5 (1  e 0.5 )  e 0.5 (1  e ) aT
B b(1  e  0).0346
a(1  e bT )
3(1  3) A
ab(b  a)

0 .202 z  0. 104
aeaT (1  e bT )  be bT (1  e aT )
GH ( z )  2
z ( z  0.223)( zB  0.607) ab(b  a)
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 24
Calculate TF from block diagram – Example 2 (cont’)

 Th closed-loop
The l dl t
transfer
f function:
f ti

0.777
Gk ( z ) 
G( z) z 2
( z  0. 223)

1  GH ( z ) 0.202 z  0.104
1 2
z ( z  0.223)( z  0.607)


0.777( z  0.607)
Gk ( z )  4
z  0.83z 3  0.135z 2  0.202 z  0.104
0.777
G( z)  2
z ( z  0.223)
0.202 z  0.104
GH ( z )  2
G
z ( z  0.223)( z  0.607)

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 25


Calculate TF from block diagram – Example 3
 Calculate the closed-loop
closed loop transfer function of the system:
R(s) e(k) u(k) Y(s)
+ GC(z) ZOH G(s)
T=0.2

H(s)

5e 0.2 s
Given that: G( s)  H ( s )  0.1
s2
The controller is described by the difference equation:

u( k )  10e( k )  2e( k  1)

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 26


Calculate TF from block diagram – Example 3 (cont’)

 Solution:
The closed-loop transfer function:

GC ( z )G ( z )
Gk ( z ) 
1  GC ( z )GH ( z )
 The TF of the controller is calculated from the difference
equation:

u( k )  10e( k )  2e( k  1)
 U ( z )  10 E ( z )  2 z 1E ( z )

U ( z)
 GC ( z )   10  2 z 1
E ( z)
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 27
Calculate TF from block diagram – Example 3 (cont’)

1  G ( s)  0.2 s
 G ( z )  (1  z )Z   G ( s) 
5e
 s  s2
0.2 s
1  5e
5e  1 1 ( 0. 2) 2
z ( z  1)
 (1  z )Z  3   5(1  z ) z
 s  2 ( z  1 ) 3


0.1( z  1)
G( z) 
z ( z  1) 2
1 G (s) H ( s) 
 GH ( z )  (1  z )Z   H ( s )  0.1
 s 
1  G ( s) 
 0.1(1  z )Z    1  T z ( z  1)
2
 s  Z  3
 s  2( z  1)
3


0.01( z  1)
GH ( z ) 
z ( z  1) 2 z  eTs  e0.2 s
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 28
Calculate TF from block diagram – Example 3 (cont’)

 Th closed-loop
The l dl t
transfer
f function:
f ti
10 z  2   0.1( z  1) 
  . 2 
GC ( z )G ( z )  z  z ( z  1) 
Gk ( z )  
1  GC ( z )GH ( z ) 10 z  2   0.01( z  1) 
1  . 2 
 z  z ( z  1 ) 

 z 2  0.8 z  0.2
Gk ( z )  4 1
z  2 z  1.1z  0.08 z  0.02 C
3 2 G ( z )  10  2 z
0.1( z  1)
G( z) 
z ( z  1) 2
0.01( z  1)
GH ( z ) 
z ( z  1) 2
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 29
State--space model of discrete system
State

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 30


The discrete state space (SS) equation
 The state
state-space
space model of a discrete system is a set of first
first-
order difference equations of the form:

 x( k  1)  Ad x( k )  Bd r ( k )

 y ( k )  Cd x( k )
where:
h

 x1 ( k )   a11 a12  a1n   b1 


 x (k ) a a  a  b 
x(k )   2  Ad   21 22 2n 
Bd   2 
        
     
 n 
x (k )  n1 n 2
a a  a nn  bn 
C d  c1 c 2  c n 
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 31
Derive SS equation from difference equation
 Case 1: The right-hand
right hand side of the difference equation
does not involve the differences of the input:
a0 y ( k  n)  a1 y ( k  n  1)  ...  an 1 y ( k  1)  an y ( k )  b0u ( k )

 Define the state variables:


 The first state variable is the x1 ( k )  y ( k )
output
t t off the
th system;
t x2 ( k )  x1 ( k  1)
 The ith state variable (i=2..n)
x3 ( k )  x2 ( k  1)
iss set
se too be oonee sa
sample
p e time-
e
advanced of the (i1)th state 
variable. xn ( k )  xn 1 ( k  1)

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 32


Derive SS equation from difference equation
Case 1 (cont’)
(cont )
 x( k  1)  Ad x( k )  Bd u( k )
 The state equations:
q 
 y ( k )  Cd x ( k )
where:
 0 1 0  0  0
 x1 ( k )   0 0 1  0   0 
 x (k )    
x( k )   2  Ad        B   
     d 0
   0a 0 0  1  b 
 xn ( k )    n  an 1  an 2  
a1   0
 a0 a0 a0 a0   a0 

Cd  1 0  0 0
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 33
Derive SS equation from difference equation – Case 1 example

 Write the state equations of the system described by:


2 y ( k  3)  y ( k  2)  5 y ( k  1)  4 y ( k )  3u ( k )
 x1 ( k )  y ( k )

 Define the state variables:  x2 ( k )  x1 ( k  1)
 x (k )  x ( k  1)
 3 2

 x( k  1)  Ad x( k )  Bd r ( k )
 The state equations:
q 
 y ( k )  Cd x( k )
where: 00
0 0  Bd  0   0 
b0  
0 1 0 1
Ad  0 0 1  0 0 1  1.5
a3 a2 a1   a0
     2  2.5  0.5
a0 a0 a0 Cd  1 0 0
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 34
Derive SS equation from difference equation
 Case 2: The right
right-hand
hand side of the difference equation
involve the differences of the input:
a0 y ( k  n)  a1 y ( k  n  1)  ...  an 1 y ( k  1)  an y ( k ) 
b0u ( k  n  1)  b1u ( k  n  2)  ...  bn 2u ( k  1)  bn 1u ( k )
 Define the state variable:
 The first state variable is
x1 ( k )  y ( k )
the output
p of the system;
y ;
 The ith state variable (i=2..n) x2 ( k )  x1 ( k  1)  1u( k )
is set to be one sample x3 ( k )  x2 ( k  1)   2 u ( k )
time-advanced (i 1)th
time ad anced of the (i1) 
state variable minus a
quantity
q ypproportional
p to the xn ( k )  xn 1 ( k  1)   n 1u( k )
input
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 35
Derive SS equation from difference equation
Case 2 (cont’)
(cont )
 x( k  1)  Ad x( k )  Bd u( k )
 The state equation: 
 y ( k )  Cd x ( k )
where:
 0 1 0  0 
 1 
 x1 ( k )   0 0 1  0   
 x (k )    2
x(k )   2  A       B   
   d   d
0 0 0  1  
   a    n 1 
 n 
x ( k ) a a
 n  n 1  n 2   1  a
  n 
 0
a a 0 a 0 a 0

Cd  1 0  0 0
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 36
Derive SS equation from difference equation
Case 2 (cont’)
The coefficient i in the vector Bd are defined as:
b0
1 
a0
b1  a11
2 
a0
b2  a1 2  a2 1
3 
a0

bn 1  a1 n 1  a2  n 2    an 11
n 
a0
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 37
Derive SS equation from difference equation – Case 2 example

 Write the state equations of the system described by:


2 y ( k  3)  y ( k  2)  5 y ( k  1)  4 y ( k )  u( k  2)  3u( k )
 x1 ( k )  y ( k )

 Define the state variables:  x2 ( k )  x1 ( k  1)  1r ( k )
 x ( k )  x ( k  1)   r ( k )
 3 2 2

 x( k  1)  Ad x( k )  Bd u( k )
 The state equations: 
 y ( k )  Cd x( k )
where:  1 
0 1 0 0 1 0  Bd    2 
 
Ad  0 0 1  0 0 1    3 
a3 a2 a1  
     2  2.5  0.5
a0 a0 a0 Cd  1 0 0
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 38
Derive SS from difference equation – Case 2 example (cont’)

 The ffi i t i in
Th coefficient i th
the vector
t Bd are calculated
l l t d as:
 b0 1
 1  a  2  0.5
 0
 b1  a11 0  1  0.5
 2    0.25
 a0 2
   b2  a1 2  a2 1  3  1  ( 0.25)  5  0.5  0.375
 3
 a0 2

 0.5 
 Bd    0.25
 
 0.375 

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 39


Formulation of SS from block diagram
r(t) e(t) e(kT) eR(t) y(t)
+ ZOH G(s)

T

 Step 1: Write the state space equations of the open-loop


continuous
ti system:
t
eR(t) y(t)  x (t )  Ax(t )  BeR (t )

G(s)  y (t )  Cx(t )
 Step 2: Calculate the transient matrix:

 (t )  L [ ( s )]
1

 ( s )  sI  A
-1
where

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 40


Formulation of SS equations from block diagram (cont’)

 Step 3: Discretizing the open-loop continuous SS equation:


e(kT) y(kT)
ZOH G(s)

 Ad   (T )
 x[( k  1)T ]  Ad x( kT )  Bd eR ( kT )  T

 y ( kT )  Cd x( kT ) 0
with  Bd   ( ) Bd

Cd  C
 Step 4: Write the closed-loop discrete state equations (which
has input signal r(kT))

 x[( k  1)T ]  Ad  Bd Cd x( kT )  Bd r ( kT )



 y ( kT )  Cd x( kT )
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 41
Formulation of SS equations from block diagram – Example

 F
Formulate
l t the
th SS equations
ti d
describing
ibi the
th system:
t

r(t) e(t) e(kT) eR(t) 1 x2 1 x1 K y(t)


+ ZOH
T sa s

where a = 2, T = 0.5, K = 10

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 42


Formulation of state equations from block diagram – Example (cont’)

 Solution:
eR(t) 1 x2 1 x1 10 y(t)
 Step 1:
s2 s
X 2( s )
X 1 (s)   sX 1 ( s )  X 2( s )  x1 (t )  x 2 (t )
s
E R ( s)   x2 (t )  2 x2 (t ) e R (t )
X 2 ( s)  ( s  2) X 2 ( s )  E R ( s )
s2

 x1 (t )  0 1   x1 (t )  0
 x (t )  0  2  x (t )  1 eR (t )
 2      2  
 A B
 x1 (t ) 
y (t )  10 x1 (t )  10 0
  x2 (t )
C
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 43
Formulation of state equations from block diagram – Example (cont’)

 Step 2: Calculate the transient matrix


1 1
 1 0 0 1    s  1  
 ( s )  sI  A   s      
-1
     
 0 1  0  2    0 s  2  
1 1 
1  s  2 1  s s ( s  2) 
    
s ( s  2)  0 s  1 
0
 s  2 
 1 1    1  1  1  1 
     L   L  
   s ( s  2)  
 (t )  L 1[ ( s )]  L 1  s s ( s  2)      
s
 0 1   1  1  
0 L   
 s  2    s  2 
 1  2t 
 1 (1  e )
 (t )  2
0 2t 
 e 
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 44
Formulation of state equations from block diagram – Example (cont’)

 open  x[(k  1)T ]  Ad x(kT )  Bd eR (kT )


Step 3: Discretizing the open-
loop continuous state equations:  y (kT )  Cd x(kT )

 1 2t   1  20.5 
1 (1  e ) 1 (1  e ) 1 0.316
Ad   (T )   2    2  
0  2t    20.5   0 0 . 368 
 e  t T 0 e 

T 
1  2  0  T  1  2  
T
 1 (1  e )     (1  e ) 
Bd    ( ) Bd    2   d     2 d 
0  0  2  1  0  e 2  
 e     
0

T
  e  2
  0.5 e 20.5 1 
  2     2 
  2 2    2 2 2
2   0.092
0.316
 e 2   e  20.5
1   
      
 2 0  2 2 

Cd  C  10 0

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 45


Formulation of state equations from block diagram – Example (cont’)

 Step 4: The closed-loop discrete state equations:


 x[( k  1)T ]  Ad  Bd Cd x( kT )  Bd r ( kT )

 y ( kT )  Cd x( kT )

1 0.316 0.092  0.080 0.316


where Ad  Bd Cd       10 0   
 0 0 . 368   0 . 316    3 . 160 0 . 368 
 Conclusion: The closed-loop state equation is:

 x1 ( k  1)   0.080 0.316  x1 ( k )  0.092


 x ( k  1)    3.160 0.368  x ( k )  0.316 r ( k )
 2    2   
 x1 (k ) 
y (k )  10 0. 
 2 
x ( k )
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 46
Calculate transfer function from state equation
 Given the state equation

 x( k  1)  Ad x( k )  Bd u( k )

 y ( k )  Cd x( k )

 Th corresponding
The di transfer
t f function
f ti is:
i
Y ( z)
G( z)   Cd ( zI  Ad ) 1 Bd
U ( z)

6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 47


Calculate transfer function from state equation - Example

 Calculate the TF of the system described by the SS equation:


 x(k  1)  Ad x(k )  Bd u (k )

 y ( k )  C d x( k )
 1 0 
Cd  1 0
0
Ad    Bd   
  0 . 7  0 . 1  2
 Solution: The transfer function is:
G ( z )  Cd ( zI  Ad ) 1 Bd
1
  1 0  0 1  0
 1 0 z       
 2
  0 1   0 .7  0 . 1   
 G( z)  2
z 2  0.1z  0.7
6 December 2013 © H. T. Hoàng - www4.hcmut.edu.vn/~hthoang/ 48

You might also like