0% found this document useful (0 votes)
12 views36 pages

KOM 3781 Discrete-Time Control Systems: Veysel Gazi

This document discusses different methods for representing discrete-time control systems, including: 1) Difference equations, transfer functions, and state-space models. 2) Graphical representations like signal flow graphs and block diagrams that are easy to visualize and simulate. 3) State-space models using matrix notation to describe the system in terms of states, inputs, and outputs. The document provides examples of converting between transfer function and state-space representations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views36 pages

KOM 3781 Discrete-Time Control Systems: Veysel Gazi

This document discusses different methods for representing discrete-time control systems, including: 1) Difference equations, transfer functions, and state-space models. 2) Graphical representations like signal flow graphs and block diagrams that are easy to visualize and simulate. 3) State-space models using matrix notation to describe the system in terms of states, inputs, and outputs. The document provides examples of converting between transfer function and state-space representations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

KOM 3781

Discrete-Time Control Systems

Veysel Gazi
Lecture 3: Representation of
Discrete-Time Control
Systems
Outline
• Basic operations in discrete-time systems
• Signal Flow Graphs (or Flow Graphs)
• Block (or Simulation) Diagrams
• State-Space (or state variable) Models
Models of Discrete-Time Systems
Difference Equations
u (k ) +  k −1u (k − 1) + +  k − nu (k − n)
=  k e(k ) +  k −1e(k − 1) + +  k − n e( k − n )
Transfer Functions:
U(z) Y(z) Y ( z)
G(z) G( z) =
U ( z)
State-space (or state variable) representation:

x1 y1
u1
x2 y2
u2
⋮ ⋮ ⋮
xn yp
ur

Inputs States Outputs


Models of Discrete-Time Systems
• There are also representations which are easy to
visualize
• Utilizing only basic operations
• Easy to implement or simulate
• Graphical representations
• Signal flow graphs
• Block diagrams

• Control systems can also be composed of several


interconnected components
• Each component with its own transfer function
Block or Simulation Diagrams
f(k–1)
f(k) z-1
T

±af(k)
f(k) ±a

f1(k) ± f2(k)

Σ
f1(k) +

f2(k)
Signal Flow Graphs

z −1
f(k) f(k-1)

±a
f(k) ±af(k)

f1(k) a 1 af1(k) ± bf2(k)


F1(z) aF1(z) ± bF2(z)
±b
f2(k)
F2(z)
Mason’s Gain Formula
1
M=

 M k k

M is the overall transfer function


M k is the transmission of a forward path from input to output

 = 1 −  (individual loop gains )


+  ( products of non − touching loop gains taken 2 at a time)
− ( 3 at a time) +
+ ( 4 at a time)

 k is the value of that part of  that does not touch M k


Flow Graph Example
a2 a4 a6 a8
a1 a3 a10
a5 a7
a9

Suggestion: First find ∆ (the denominator).


a1a3 a4 a6 a8 a10 (1) + a1a9 a10 (1 − a 4 a5 )
M=
1 − (a2 + a4 a5 + a6 a7 a8 ) + a2 a4 a5 + a2 a6 a7 a8
Flow Graph Example
a2 a4 a6 a8
a1 a3 a10
a5 a7
a9

Suggestion: First find ∆ (the denominator).

a1a3 a4 a6 a8 a10 (1) + a1a9 a10 (1 − a 4 a5 )


M=
1 − (a2 + a4 a5 + a6 a7 a8 ) + a2 a4 a5 + a2 a6 a7 a8
Flow Graph Example
a2 a4 a6 a8
a1 a3 a10
a5 a7
a9

Suggestion: Trace the first forward path (dashed lines).

a1a3 a4 a6 a8 a10 (1) + a1a9 a10 (1 − a 4 a5 )


M=
1 − (a2 + a4 a5 + a6 a7 a8 ) + a2 a4 a5 + a2 a6 a7 a8
Flow Graph Example
a2 a4 a6 a8
a1 a3 a10
a5 a7
a9

Suggestion: Trace the second forward path.

a1a3 a4 a6 a8 a10 (1) + a1a9 a10 (1 − a 4 a5 )


M=
1 − (a2 + a4 a5 + a6 a7 a8 ) + a2 a4 a5 + a2 a6 a7 a8
Block Diagram Example
b2

g1
+ +
e(k) f1(k) y(k)
g3 T
+ –
g2 +

g2
+
f2(k)
g4 T
+ +
g1
f1 (k ) = g3e(k ) + g1 f1 (k − 1) − g 2 f 2 (k − 1) y (k ) = b2e(k ) + f 2 (k − 1)
f 2 (k ) = g 4 e(k ) + g1 f 2 (k − 1) + g 2 f1 (k − 1)
For this example,
f1 (k ) = g3e(k ) + g1 f1 (k − 1) − g 2 f 2 (k − 1)
f 2 (k ) = g 4 e(k ) + g1 f 2 (k − 1) + g 2 f1 (k − 1)
y (k ) = b2 e(k ) + f 2 (k − 1)

F1 ( z ) = g3 E ( z ) + g1 z −1 F1 ( z ) − g 2 z −1F2 ( z )
F2 ( z ) = g 4 E ( z ) + g1 z −1 F2 ( z ) + g 2 z −1F1 ( z )
Y ( z ) = b2 E ( z ) + z −1 F2 ( z )
After some algebra,
Y ( z) g 4 z + ( g 2 g3 − g1 g 4 )
= b2 +
E( z) ( z − g1 ) 2 + g 2 2
Using Mason’s Gain Formula
b2
M1
gg11
+ +
e(k) f1(k) y(k)
gg33 T
+
M3 -
gg22 +

gg22
+
f2(k)
g4 T
M2 + +
g1g1
Check your results:
−1 −2
M 1 = b2 M 2 = g4 z M 3 = g 2 g3 z
1 =   2 = 1 − g1 z −1 3 = 1
−1 −1 2 −2 2 −2
 = 1 − g1 z − g1 z + g 2 z + g z 1

The numerator is

b2  + g 4 z −1 (1 − g1 z −1 ) + g 2 g3 z −2
After simplification and rearrangement, this yields
an identical result.
• This example shows two different ways to find the
transfer function.
• The structure used in the example is a form of a second-
order digital filter.
State Variables
State-space (or state variable) representation:

x1 y1
u1
x2 y2
u2
⋮ ⋮ ⋮
xn yp
ur

Inputs States Outputs

• The state is essentially the memory about all past inputs.


• Knowledge of the input and the initial state are
sufficient for determining all the response (i.e., the state
and the output) of the system.
State Variables Representation: Notation
Convention: matrices and vectors in bold
Definitions: In this course we
Inputs: ur, a (column) vector u consider single-
Outputs: yp, a (row) vector y input-single-output
States: xn, a (column) vector x (SISO) systems in
A general (non-linear) description is which ur and yp are
x(k + 1) = f [x(k ), u( k )] scalar (not vector)
y (k ) = g[x(k ), u( k )] functions.
A linear time-varying (LTV) system is described by
x(k + 1) = A(k )x(k ) + B(k )u( k )
y (k ) = C(k )x(k ) + D(k )u( k )
If the system is linear and time-invariant (LTI)
x(k + 1) = Ax(k ) + Bu(k )
y (k ) = Cx(k ) + Du(k )
State Space Notation Example
u(k) g(k) y(k)
Consider the difference equation: U(z) G(z) Y(z)

y (k + 3) − 2 y (k + 2) + 3 y (k + 1) − y (k ) = u (k ) → specifies g ( k )
and let
x1 (k ) = y (k )
x2 (k ) = y (k + 1) = x1 (k + 1)
x3 (k ) = y (k + 2) = x2 (k + 1) = x1 (k + 2)
Rewrite the original equation to get
x3 (k + 1) − 2 x3 (k ) + 3 x2 (k ) − x1 (k ) = u (k )
Which we can be written as
x1 (k + 1) = x2 (k )
x2 (k + 1) = x3 (k )
x3 (k + 1) = x1 (k ) − 3 x2 (k ) + 2 x3 (k ) + u (k )
State Space Notation
x(k + 1) = Ax(k ) + Bu(k )
y (k ) = Cx(k ) + Du(k )
In matrix format, these equations become
 x1 (k + 1)  0 1 0   x1 (k )  0 
 x (k + 1)  = 0 0 1   x ( k )  + 0  u ( k )
 2    2   
 x3 (k + 1)  1 −3 2   x3 (k )  1 
A B

 x1 (k ) 
y (k ) = 1 0 0  x2 ( k )  + 0  u ( k )
C  x3 (k )  D

0 1 0  0 
A = 0 0 1  B = 0  C = 1 0 0 D = 0
1 −3 2  1 
Transfer Function to State Space Format

bn −1 z n −1 + bn − 2 z n − 2 + + b1 z + b0
G( z) = n −1
z + an −1 z + + a1 z + a0
n

Rewrite and expand to get the following


−1 −2 − n +1 −n
Y ( z) bn −1 z + bn − 2 z + + b1 z + b0 z E( z)
= G( z) =
U ( z) 1 + an −1 z −1 + + a1 z − n +1 + a0 z − n E(z)
Identify the numerator, Y(z), and the denominator U(z)
with the expressions
Y ( z ) = (bn −1 z −1 + + b1 z − n +1 + b0 z − n ) E ( z )
−1 − n +1 −n
U ( z ) = (1 + an −1 z + + a1 z + a0 z ) E ( z )
Transfer Function to State Space Format
Write the denominator first as:
U ( z ) = E ( z ) + an −1 z −1 E ( z ) + + a1 z − n +1E ( z ) + a0 z − n E ( z )
Then, as the inverse transform:
u (k ) = e(k ) + an −1e(k − 1) + + a1e(k − n + 1) + a0e(k − n)
Identify the state variables:
x1 (k ) = e(k − n)
x2 (k ) = e(k − n + 1) = x1 (k + 1)
x3 (k ) = e(k − n + 2) = x2 (k + 1) = x1 (k + 2)

xn (k ) = e(k − 1) = xn −1 (k + 1) = = x1 (k + n − 1) xn (k + 1) = e(k )
Substituting the state variables into the difference equation:
xn (k + 1) = u (k ) − an −1e(k − 1) − − a1e(k − n + 1) − a0e(k − n)
= u (k ) − an −1 xn (k ) − − a1 x2 (k ) − a0 x1 (k )
Transfer Function to State Space Format
From the preceding slide
xn (k + 1) = −a0 x1 (k ) − − an −1 xn (k ) + u (k )
Listing in state equations format
x1 (k + 1) = x2 (k )
x2 (k + 1) = x3 (k )

xn −1 (k + 1) = xn (k )
xn (k + 1) = −a0 x1 (k ) − − an −1 xn (k ) + u (k )
Which may be written in matrix form.
Transfer Function to State Space Format
Express in matrix form: A B
 x1 (k + 1)   0 1 0 0   x1 (k )  0 
 x (k + 1)   0 0 1 0 0   x2 (k )  0 
 2    
      
 =   +   u (k )
   0 1 0    
 xn −1 (k + 1)   0 0 0 1   xn −1 ( k )  0 
      
 n
x ( k + 1)   −a0 −a1 −an − 2 −an −1   xn (k )  1 
 x1 (k ) 
Repeat the  x (k ) 
C  2  D
procedure  
y (k ) = b0 b1 bn − 2 bn −1    + [0]u (k )
for the  
numerator:  xn −1 (k ) 
 
 n 
Phase variable or
x ( k )
bn −1 z n −1 + bn − 2 z n − 2 + + b1 z + b0 controllable
G( z) =
z n + an −1 z n −1 + + a1 z + a0 canonical form
Signal Flow Graphs
We can use previous results to construct a signal flow graph.
First, multiply the numerator and denominator of G(z) by z-n
Y ( z) bn −1 z −1 + bn − 2 z −2 + + b1 z − n +1 + b0 z − n E ( z )
= G( z) =
U ( z) 1 + an −1 z −1 + + a1 z − n +1 + a0 z − n E ( z )
Again, associate Y(z) with numerator, U(z) with denominator
U ( z ) = E ( z ) + an −1 z −1 E ( z ) + + a1 z − n +1E ( z ) + a0 z − n E ( z )
−1 −n
Y ( z ) = E ( z )(bn −1 z + + b0 z )
The first equation may be rewritten as
E ( z ) = U ( z ) − an −1 z −1 E ( z ) − − a0 z − n E ( z )
Also, we have
Y ( z ) = bn −1 z −1 E ( z ) + + b0 z − n E ( z )
Signal Flow Graphs
The equations for E(z) and Y(z) yield the flow graph
Y ( z ) = bn −1 z −1 E ( z ) + + b0 z − n E ( z )

E ( z ) = U ( z ) − an −1 z −1E ( z ) − − a0 z − n E ( z )
Y

bn-1 b1 b0
E z-1 bn-2 bn-3
U ...
z-1 z-1 z-1 z-1
-an-1 -an-3
-an-2 -a1 -a0

Phase variable or controllable canonical form


Signal Flow Graphs
Example:
3z 2 + 5 z + 8 Y ( z) 3 z −1 + 5 z −2 + 8 z −3 E ( z )
G( z) = 3 = =
z +4 z + 7 z + 2 U ( z ) 1 + 4 z −1 + 7 z −2 + 2 z −3 E ( z )
2

E ( z ) = U ( z ) − 4 z −1 E ( z ) − 7 z −2 E ( z ) − 2 z −3 E ( z )
Y ( z ) = 3 z −1 E ( z ) + 5 z −2 E ( z ) + 8 z −3 E ( z )

The flow graph is Y


E 3 8
1 z-1 5
U
-4 z-1 z-1
-7
-2
Transfer Function to State Space Format
3z 2 + 5 z + 8
G( z) = 3
z +4 z 2 + 7 z + 2
Expressing in the “controllable canonical” form:
 x1 (k + 1)   0 1 0   x1 (k )  0 
 x (k + 1)  =  0 0 1   x (k )  + 0  u ( k )
 2    2   
 x3 (k + 1)   −2 −7 −4   x3 ( k )  1 
 x1 (k ) 
y (k ) = 8 5 3  x2 (k )  + 0 u ( k )
 x3 (k ) 
In the preceding cases, D = 0. This results from the fact
that there is no direct connection from the input to the
output (the degree of the numerator is less than the degree
of the denominator in G(z)). If not true, special care is
needed.
Example
0.5 z 3 + 0.7 z 2 − 0.8 z + 0.6 0.5 + 0.7 z −1 − 0.8 z −2 + 0.6 z −3
G( z) = 3 =
z + 0.4 z − 0.3 z + 0.9
2
1 + 0.4 z −1 − 0.3 z −2 + 0.9 z −3
We draw the flow graph as before:
Y
0.5
0.7 –0.8 0.6
U 1 E z -1
x3 z-1 x2 z-1 x1
–0.4
0.3 –0.9
The state equations are:
 x1 (k + 1)   0 1 0   x1 ( k )  0 
 x (k + 1)  =  0 0 1   x (k )  + 0  u (k )
 2    2   
 x3 (k + 1)   −0.9 0.3 −0.4   x3 (k )  1 
y (k ) = 0.6 x1 (k ) − 0.8 x2 (k ) + 0.7 x3 (k ) + 0.5e( k ) not u(k)

x3(k+1) = e(k)
Example
e(k ) = u (k ) − 0.9 x1 (k ) + 0.3 x2 (k ) − 0.4 x3 (k )
Substituting this expression in the output equation we obtain
y (k ) = 0.5e(k ) + 0.6 x1 (k ) − 0.8 x2 (k ) + 0.7 x3 (k )
= 0.5[u (k ) − 0.9 x1 (k ) + 0.3 x2 (k ) − 0.4 x3 (k )]
+ 0.6 x1 (k ) − 0.8 x2 (k ) + 0.7 x3 (k )
= 0.5u (k ) + 0.15 x1 (k ) − 0.65 x2 ( k ) + 0.5 x3 ( k )
So, in matrix form B
A
 x1 (k + 1)   0 1 0   x1 (k )  0 
 x (k + 1)  =  0 0 1   x (k )  + 0  u (k )
 2    2   
 x3 (k + 1)   −0.9 0.3 −0.4   x3 ( k )  1 

C  x1 (k )  D
y (k ) =  0.15 −0.65 0.50   x2 ( k )  + 0.5u ( k )
 x3 (k ) 
Example
Consider the same transfer function:
0.5 z 3 + 0.7 z 2 − 0.8 z + 0.6
G( z) = 3
z + 0.4 z 2 − 0.3 z + 0.9
Utilizing polynomial division one can obtain:
0.5 z 2 − 0.65 z + 0.15
G ( z ) = 0.5 + 3
z + 0.4 z 2 − 0.3 z + 0.9
Then, the state-space form can be expressed as
A B
 x1 (k + 1)   0 1 0   x1 (k )  0 
 x (k + 1)  =  0 0 1   x (k )  + 0  u (k )
 2    2   
 x3 (k + 1)   −0.9 0.3 −0.4   x3 ( k )  1 
C  x1 (k )  D
y (k ) =  0.15 −0.65 0.50   x2 ( k )  + 0.5u ( k )
 x3 (k ) 
Transfer Function to State Space Format

bn −1 z n −1 + bn − 2 z n − 2 + + b1 z + b0
G( z) = n −1
z + an −1 z + + a1 z + a0
n

Rewrite and expand to get the following


−1 −2 − n +1 −n
Y ( z) bn −1 z + bn − 2 z + + b1 z + b0 z
= G( z) =
U ( z) 1 + an −1 z −1 + + a1 z − n +1 + a0 z − n
Identify the numerator, Y(z), and the denominator U(z)
with the expressions
Y ( z )(1 + an −1 z −1 + + a1 z − n +1 + a0 z − n ) =
−1 − n +1 −n
(bn −1 z + + b1 z + b0 z )U ( z )
Transfer Function to State Space Format
Y(z) can be written as
Y ( z ) = − an −1 z −1Y ( z ) − − a1 z − n +1Y ( z ) − a0 z − nY ( z ) +
bn −1 z −1U ( z ) + + b1 z − n +1U ( z ) + b0 z − nU ( z )

Similarly, the sequence y(k) is given by (the difference


equation)
y (k ) = −an −1 y (k − 1) − − a1 y (k − n + 1) − a0 y (k − n) +
bn −1u (k − 1) + + b1u (k − n + 1) + b0u (k − n)
Transfer Function to State Space Format
y (k ) = −an −1 y (k − 1) − − a1 y (k − n + 1) − a0 y (k − n) +
bn −1u (k − 1) + + b1u (k − n + 1) + b0u (k − n)

This can be represented by the block diagram


Transfer Function to State Space Format

x1(k+1) x2(k+1) xn(k+1)

x1(k) x2(k) xn-1(k) xn(k)

Define the state xn (k ) = y (k )


variables as the x1 (k + 1) = − a0 xn (k ) + b0u (k )
outputs of the
x2 (k + 1) = x1 (k ) − a1 xn (k ) + b1u (k )
delays. (See the
figure.)
xn −1 (k + 1) = xn − 2 (k ) − an − 2 xn (k ) + bn − 2u (k )
xn (k + 1) = xn −1 (k ) − an −1 xn (k ) + bn −1u (k )
Transfer Function to State Space Format
Express in matrix form: A B
 x1 (k + 1)  0 0 0 −a0   x1 (k )   b0 
 x (k + 1)  1 0 −a0   x2 (k )   b1 
 2  
  0 1    
 =  +  u (k )
   0 0    
 xn −1 (k + 1)   0 −an − 2   xn −1 (k )  bn − 2 
      
 xn (k + 1)  0 0 1 −an −1   xn (k )   bn −1 
 x1 (k ) 
 x (k ) 
C  2  D
y (k ) =  0 0 0 1  x3 (k )  + [0]u ( k )
 
 
 xn (k )  Observable
canonical form
bn −1 z n −1 + bn − 2 z n − 2 + + b1 z + b0
G( z) =
z n + an −1 z n −1 + + a1 z + a0

You might also like