You are on page 1of 16

Lecture 3: System Representation

• Transfer Functions

• Graphical Representation

• State Space Representation

• Reading: Chap. 2.7-2.10

Linear Difference Equation Representation

• Input e(k), and output y(k), k=0,1,2,….


• LTI system given by a linear difference equation
y(k) = bn e(k) + bn−1 e(k − 1) + · · · + b0 e(k − n)
−an−1 y(k − 1) − · · · − a0 y(k − n)

• Typically assume zero initial conditions:


y(−1) = y(−2) = . . . = y(−n) = 0
and e(−1) = e(−2) = . . . = e(−n) = 0

1
Transfer Function
• Take the z-transform of the linear difference equation to obtain
Y (z) = bn E(z) + bn−1 z −1 E(z) + · · · + b0 z −n E(z)
−an−1 z −1 Y (z) − · · · − a0 z −n Y (z)
bn +bn−1 z −1 +···+b0 z −n
⇒ Y (z) = 1+an−1 z −1 +···+a0 z−n E(z) = G(z)E(z)

where bn +bn−1 z −1 +···+b0 z−n


G(z) = 1+an−1 z −1 +···+a0 z −n

is called the transfer function of the discrete-time LTI system

z−1
• Exercise: given the transfer function G(z) = (z−2) 2 , what is the

corresponding linear difference equation representation?

Time-Delay Element
• Consider a simple LTI discrete-time system whose output y(k) is
obtained from the input e(k) by a delay of one time step:

• If the input e(k) is obtained by sampling a continuous-time signal at


sampling period T, i.e., e(k)=e(kT), then the above operation is a
time delay element by time T:

• The transfer function of the time-delay element is

• Easily implemented by hardware

2
Series Connection of Time Delay Elements

More complicated connection

Simulation Diagram
• Simulation diagram is a graphical representation of
systems consisting of basic elements of operations:
– Time-delay elements
– Summation
– Multiplication by constant

• Example:
y(k) = 2e(k) − e(k − 1) − y(k − 1)
can be represented by a simulation diagram:

3
Example
y(k) − 4y(k − 1) + 3y(k − 2) = e(k − 1) − 2e(k − 2)
Simulation diagram:

Simulation Diagram for General


Linear Difference Equation
y(k) = bn e(k) + bn−1 e(k − 1) + · · · + b0 e(k − n)
−an−1 y(k − 1) − · · · − a0 y(k − n)
has simulation diagram:

4
Flow Graphs
• Flow graph is an alternative graphical representation of systems
• Basic elements are
– Nodes: representing signals
– Branches: directed line segment connecting nodes, each with a gain
• At each node, signals of all incoming branches are summed and the
result is transmitted to all outgoing branches
• Example:

Previous Example
y(k) = 2e(k) − e(k − 1) − y(k − 1)

Simulation diagram:

Flow graph:

5
Mason’s Formula

• To compute the transfer function from an input node to an output


node in an arbitrary flow graph:
– Compute the determinant ∆ of the flow graph
– Find all forward paths with path gains P1,…,Pk
– For each forward path Pi, i=1,…,k, find the determinant ∆k of a (sub)
signal flow graph obtained from the original one by removing by
branches touching Pi
– Then the transfer function from the input node to the output node is

Determinant of A Graph
∆=1- (sum of all individual loop gains)
+ (sum of gain products of all two non-touching loops)
- (sum of gain products of all three non-touching loops)
+…

Example:

6
Application of the Mason’s Formula

Forward path Forward path gain Pi ∆i

Example

7
Another Example

Transfer function

State Space Representation

• Concept of State Variables

• State-Variable Model

• Relation with Transfer Function Representation

8
External vs Internal Models
• The transfer function representation is an input-output
(I/O, or external) representation

• A modern perspective is the state-variable model


– Systems with identical I/O characteristics may possess
drastically different internal structures
– During system analysis and design, there may be hard
constraints on some internal variables
– Input and output variables are not enough; some extra variables,
state variables, are needed to fully characterize the system
– Internal model

State-Variable Model
Single Input Single Out (SISO) LTI Systems:

x(k + 1) = Ax(k) + Be(k)


y(k) = Cx(k) + De(k)

input is a scalar: e(k) ∈ ℜ


output is a scalar: y(k) ∈ ℜ
 
x1 (k)
 x2 (k) 
 
state x is a vector: x(k) =  ..  ∈ ℜn
 . 
xn (k)
A, B, C, D are matrices of proper dimensions

The output y(k), k=0,1,… can be uniquely determined from the input e(k), k=0,1,…,
and the initial condition x(0)

9
Example
Consider the system y(k) = 0.5e(k − 2) + 2y(k − 1) − y(k − 2)
or equivalently y(k + 2) = 0.5e(k) + 2y(k + 1) − y(k)
State variables: x1 (k) = y(k), x2 (k) = y(k + 1)
   
x1 (k) y(k)
in vector form: x(k) = = ∈ ℜ2
x2 (k) y(k + 1)

   
0 1 0
System evolution becomes: x(k + 1) = x(k) + e(k)
−1 2 0.5

Output can be recovered as: y(k) = 1 0 x(k)

Transfer Function of State-Variable Model


x(k + 1) = Ax(k) + Be(k)
y(k) = Cx(k) + De(k)
Assuming zero initial condition x(0)=0, what is the transfer function from the
input signal e(k) to the output signal y(k)?

z[X(z) − x(0)] = AX(z) + BE(z)


⇒ Y (z) = CX(z) + DE(z)
Y (z)
⇒ G(z) = E(z)
= C[zI − A]−1 B + D

10
Previous Example
System y(k + 2) = 0.5e(k) + 2y(k + 1) − y(k)
   
State-variable model 0 1 0
x(k + 1) = x(k) + e(k)
−1 2 0.5

y(k) = 1 0 x(k)
Transfer function G(z) = C[zI − A]−1 B + D =?

Numerical Solution of State-Variable Model


x(k + 1) = Ax(k) + Be(k)
y(k) = Cx(k) + De(k)

• Find y(k) for given input e(k) and initial state x(0)
• Recursive solution:
k−1
x(k) = Ak x(0) + j=0 Ak−1−j Be(j)

11
Obtaining State-Variable Model
From Transfer Functions
• Given a general transfer function
bn +bn−1 z −1 +···+b0 z −n bn z n +bn−1 z n−1 +···+b0
G(z) = 1+an−1 z −1 +···+a0 z −n
= z n +an−1 z n−1 +···+a0

how to obtain equivalent state-variable model?

• General procedure
– Draw a simulation diagram of the system (many choices)
– Assign a state variable to each time delay element’s output
– Write the state equation, and the output equation from the diagram

One Possible Way:


bn +bn−1 z −1 +···+b0 z −n
G(z) = 1+an−1 z −1 +···+a0 z −n

y(k) = bn e(k) + bn−1 e(k − 1) + · · · + b0 e(k − n)


−an−1 y(k − 1) − · · · − a0 y(k − n)

12
Example
2z −1 2z
G(z) = 1−2z −1 +z −2 = z 2 −2z+1

Controller Canonical Form:


Simulation Diagram
bn−1 z−1 +···+b0 z −n bn−1 z n−1 +···+b0
G(z) = 1+an−1 z −1 +···+a0 z−n
= z +an−1 zn−1 +···+a0
n

13
Controller Canonical Form:
Flow Graph

Exercise: Check the transfer function from E(z) to Y(z) by Mason’s Formula

Observer Canonical Form: Simulation Diagram


bn−1 z−1 +···+b0 z −n bn−1 z n−1 +···+b0
G(z) = 1+an−1 z−1 +···+a0 z−n
= z +an−1 z n−1 +···+a0
n (bn = 0)

Exercise: write the state-variable model

14
Example
1
G(z) = (z−1)(z−2)

State Variables Model 1: controller canonical form

Alternative State Variable Model (I)


1 1 1
G(z) = (z−1)(z−2)
= z−1
· z−2

15
Alternative State Variable Model (II)
1 1 1
G(z) = (z−1)(z−2)
= z−2
− z−1

Conclusion: A transfer function G(z) can have many different equivalent


state-variable models (A,B,C,D), as long as
G(z) = C[zI − A]−1 B + D

Exercise

State-variable model:

16

You might also like