SEEL 4223
DIGITAL SIGNAL
PROCESSING
Chapter 5
LTI System Function
Assoc. Prof. Dr. Musa Mohd Mokji
Nov 2022 Edition
System Function 𝐻(𝑧)
Also called transfer function
It is a function in 𝑧-domain that relates the input signal 𝑥[𝑛] with the output
signal 𝑦[𝑛] where
𝑌 𝑧
𝐻 𝑧 =
𝑋 𝑧
Because 𝐻 𝑧 holds the relationship between 𝑥 𝑛 and 𝑦 𝑛 , difference
equation can be obtained from 𝐻 𝑧
Difference equation is important in designing discrete system because it
will be the last product before the system can be implemented into
hardware. For Analog system, differential equation is obtained from
Laplace transform before it is used to construct the analog circuit (R,L,C
circuit).
2
Example 1
1+𝑧 −1
Obtain difference equation for 𝐻 𝑧 =
1+2𝑧 −1 +0.5𝑧 −2
Solution
𝑌 𝑧
𝐻 𝑧 =
𝑋 𝑧
𝑌 𝑧 1 + 𝑧 −1
=
𝑋 𝑧 1 + 2𝑧 −1 + 0.5𝑧 −2
𝑌 𝑧 1 + 2𝑧 −1 + 0.5𝑧 −2 = 𝑋 𝑧 1 + 𝑧 −1
𝑌 𝑧 + 2𝑧 −1 𝑌 𝑧 + 0.5𝑧 −2 𝑌 𝑧 = 𝑋 𝑧 + 𝑧 −1 𝑋(𝑧)
3
Example 1 (cont.)
Using the delay property of 𝑧-transform, the difference equation is
𝑦 𝑛 + 2𝑦 𝑛 − 1 + 0.5𝑦 𝑛 − 2 = 𝑥 𝑛 + 𝑥 𝑛 − 1
𝑦 𝑛 = 𝑥 𝑛 + 𝑥 𝑛 − 1 − 2𝑦 𝑛 − 1 − 0.5𝑦 𝑛 − 2
Note that the difference equation not only has the current and past
input values but also past output value. In general, the difference
equation can be written as
𝑁 𝑀
𝑎𝑘 𝑦 𝑛 − 𝑘 = 𝑏𝑘 𝑥 𝑛 − 𝑘 , 𝑎𝑜 = 1
𝑘=0 𝑘=0
4
Example 1 (cont.)
When the equation is transformed into 𝑧-domain, we obtain
𝑁 𝑀
𝑌 𝑧 𝑎𝑘 𝑧 −𝑘 = 𝑋(𝑧) 𝑏𝑘 𝑧 −𝑘
𝑘=0 𝑘=0
𝑌 𝑧 σ𝑀
𝑘=0 𝑏𝑘 𝑧
−𝑘
=𝐻 𝑧 = 𝑁
𝑋 𝑧 σ𝑘=0 𝑎𝑘 𝑧 −𝑘
Thus, in order to obtain difference equation from 𝐻(𝑧), make sure
the 𝐻(𝑧) is in the form of above equation.
5
Example 2
𝑧 −1
Find difference equation for 𝐻 𝑧 =
1−𝑧 −1 1−0.5𝑧 −1
Solution
𝑧 −1
𝐻 𝑧 =
1 − 1.5𝑧 −1 + 0.5𝑧 −2
𝑌 𝑧
𝐻 𝑧 =
𝑋 𝑧
𝑌 𝑧 1 − 1.5𝑧 −1 + 0.5𝑧 −2 = 𝑋 𝑧 𝑧 −1
𝑌 𝑧 − 1.5𝑧 −1 𝑌 𝑧 + 0.5𝑧 −2 𝑌 𝑧 = 𝑧 −1 𝑋 𝑧
𝑦 𝑛 − 1.5𝑦 𝑛 − 1 + 0.5𝑦 𝑛 − 2 = 𝑥 𝑛 − 1
6
Example 3
Find difference equation for ℎ 𝑛 = 0.5𝑛 𝑢[𝑛]
Solution
1
𝐻 𝑧 =
1 − 0.5𝑧 −1
𝑌(𝑧) 1
=
𝑋(𝑧) 1 − 0.5𝑧 −1
𝑌 𝑧 1 − 0.5𝑧 −1 = 𝑋(𝑧)
𝑦 𝑛 − 0.5𝑦 𝑛 − 1 = 𝑥[𝑛]
𝑦 𝑛 = 𝑥 𝑛 + 0.5𝑦[𝑛 − 1]
7
Example 4
Find difference equation for ℎ 𝑛 = [1 1 1 1 1 1 1 1 1 1]
Solution
a) Because this is an FIR system, convolution can be used to obtain
the difference equation.
9
𝑦 𝑛 = ℎ 𝑘 𝑥[𝑛 − 𝑘]
𝑘=0
=ℎ 0 𝑥 𝑛 +ℎ 1 𝑥 𝑛−1 +ℎ 2 𝑥 𝑛−2 +ℎ 3 𝑥 𝑛−3 +ℎ 4 𝑥 𝑛−4
+ℎ 5 𝑥 𝑛−5 +ℎ 6 𝑥 𝑛−6 +ℎ 7 𝑥 𝑛−7 +ℎ 8 𝑥 𝑛−8 +ℎ 9 𝑥 𝑛−9
8
Example 4 (cont.)
𝑦 𝑛 =𝑥 𝑛 +𝑥 𝑛−1 +𝑥 𝑛−2 +𝑥 𝑛−3 +𝑥 𝑛−4 +𝑥 𝑛−5
+𝑥 𝑛 − 6 + 𝑥 𝑛 − 7 + 𝑥 𝑛 − 8 + 𝑥[𝑛 − 9]
The sequence of the difference equation is too long. Let’s look at
different technique.
b) Now, rearrange the equation, do z-transform and obtain the
difference equation
ℎ 𝑛 = 1 1 1 1 1 1 1 1 1 1 = 𝑢 𝑛 − 𝑢[𝑛 − 10]
9
Example 4 (cont.)
1 𝑧 −10
𝐻 𝑧 = −1 −
1−𝑧 1 − 𝑧 −1
1 − 𝑧 −10
=
1 − 𝑧 −1
𝑌(𝑧) 1 − 𝑧 −10
=
𝑋(𝑧) 1 − 𝑧 −1
𝑌 𝑧 1 − 𝑧 −1 = 𝑋(𝑧)(1 − 𝑧 −10 )
𝑦 𝑛 − 𝑦 𝑛 − 1 = 𝑥 𝑛 − 𝑥[𝑛 − 10]
𝑦 𝑛 = 𝑥 𝑛 − 𝑥 𝑛 − 10 + 𝑦[𝑛 − 1] → The sequence is shorter.
10
Discrete System Realization
After a filter is designed, it must be realized by developing a signal
flow diagram that describes the filter in terms of operations on
sample sequences.
A given transfer function may be realized in many ways. Consider
how a simple expression such as ax + bx + c could be evaluated –
one could also compute the equivalent x(a + b) + c.
Here, the discussion will be on computing the implementation cost
of several implementation method based on:
• No. of addition
• No. of multiplication
• No. of memory location (or state)
11
Realization Symbols
+ 𝑧 −1
12
Discrete System Realization (cont.)
In general, system function of a system is represents by
𝑌(𝑧) 𝑁(𝑧)
=𝐻 𝑧 = = 𝐻1 𝑧 𝐻2 (𝑧)
𝑋(𝑧) 𝐷(𝑧)
Where
𝐻1 𝑧 = 𝑁 𝑧 = 𝑏0 + 𝑏1 𝑧 −1 + 𝑏2 𝑧 −2 + ⋯ + 𝑏𝑁 𝑧 −𝑀
1 1
𝐻2 𝑧 = =
𝐷(𝑧) 𝑎0 + 𝑎1 𝑧 −1 + 𝑎2 𝑧 −2 + ⋯ + 𝑎𝑀 𝑧 −𝑁
By manipulating above equation, discrete system can be realized
in several ways.
13
FIR: Direct-Form Structure
For FIR system, there will be no past and future output. Thus the
system does not have ℎ2 [𝑛] where it can be represented by
𝑀
𝑦 𝑛 = ℎ 𝑘 𝑥[𝑛 − 𝑘]
𝑘=0
Where ℎ 𝑛 = ℎ1 [𝑛] and 𝑀 + 1 is the length of the ℎ[𝑛]
Based on above equation, there will be 𝑀 number of addition and
𝑀 + 1 number of multiplication. Number of memory needed is 𝑀.
The next figure shows the structure.
14
FIR: Direct-Form Structure
𝑥[𝑛]
𝑧 −1 𝑧 −1 𝑧 −1
ℎ[0] ℎ[1] ℎ[2] ℎ[𝑀 − 1] ℎ[𝑀]
𝑦[𝑛]
+ + + +
15
FIR: Direct-Form Structure (linear phase)
For linear phase FIR system where ℎ[𝑛] is always either symmetry or
anti-symmetry
ℎ 𝑀−𝑛 𝑓𝑜𝑟 𝑇𝑦𝑝𝑒 𝐼 𝑎𝑛𝑑 𝑇𝑦𝑝𝑒 𝐼𝐼
ℎ 𝑛 =ቊ
−ℎ 𝑀 − 𝑛 𝑓𝑜𝑟 𝑇𝑦𝑝𝑒 𝐼𝐼𝐼 𝑎𝑛𝑑 𝑇𝑦𝑝𝑒 𝐼𝑉
Thus,
𝑃
𝑦 𝑛 = ℎ 𝑘 𝑥 𝑘 +𝑥 𝑛−𝑀+𝑘
𝑘=0
𝑀 𝑀−1
Where 𝑃 = for Type I and III (𝑀 even) and 𝑃 = for Type II and IV
2 2
(𝑀 odd).
16
FIR: Direct-Form Structure (linear phase)
From the previous equation:
• The number of multiplications is reduced to 𝑀/2 for 𝑀 even and to
(𝑀 − 1)/2 for 𝑀 odd compared to the previous general FIR system.
• The number of addition and memory needed are similar which
both are 𝑀.
17
FIR: Direct-Form Structure (linear phase)
𝑥[𝑛]
𝑧 −1 𝑧 −1 𝑧 −1 𝑧 −1 𝑧 −1
+ + + +
𝑧 −1 𝑧 −1 𝑧 −1 𝑧 −1 𝑧 −1
ℎ[0] 𝑀−2 𝑀
ℎ[1] ℎ[2] ℎ ℎ
𝑦[𝑛] 2 2
+ + + +
FIR Linear Phase Type I and III realization
18
FIR: Direct-Form Structure (linear phase)
𝑥[𝑛]
𝑧 −1 𝑧 −1 𝑧 −1 𝑧 −1
+ + + +
𝑧 −1 𝑧 −1 𝑧 −1 𝑧 −1 𝑧 −1
ℎ[0] ℎ[1] ℎ[2] 𝑀−1
ℎ
𝑦[𝑛] 2
+ + +
FIR Linear Phase Type II and IV realization
19
Example 5
Draw the second order block diagram for an FIR filter type 1.
Solution
ℎ1
+ 𝑦𝑛
𝑧 −1 𝑧 −1
ℎ0
𝑥𝑛 + = h[2]
20
IIR: Direct Form I
The realization of the system is straight forward where input will go
through 𝐻1 𝑧 first and then the 𝐻2 𝑧
𝑌 𝑧 = 𝑊 𝑧 𝐻2 𝑧 𝑜𝑟 𝑦 𝑛 = 𝑤 𝑛 − 𝑎1 𝑦 𝑛 − 1 − ⋯ − 𝑎𝑀 𝑦[𝑛 − 𝑁]
Where
𝑊 𝑧 = 𝑋 𝑧 𝐻1 𝑧 𝑜𝑟 𝑤 𝑛 = 𝑏0 𝑥 𝑛 + 𝑏1 𝑥 𝑛 − 1 + ⋯ + 𝑏𝑁 𝑥[𝑛 − 𝑀]
ℎ1 [𝑛] ℎ2 [𝑛]
21
IIR: Direct Form I
𝑥[𝑛] 𝑏0 𝑤[𝑛] 𝑦[𝑛]
+ + Number of operation
𝑧 −1 𝑧 −1 and memory:
𝑏1 −𝑎1
+ +
𝑧 −1
• Addition:
𝑧 −1
𝑏2 −𝑎2 𝑀+𝑁
+ +
𝑧 −1 𝑧 −1 • Multiplication:
𝑏3 −𝑎3
+ + 𝑀+𝑁+1
• Memory:
−𝑎𝑁−1
𝑀+𝑁
𝑏𝑀−1
+ +
𝑧 −1 𝑧 −1
𝑏𝑀 −𝑎𝑁
All-zeros system All-poles system
22
IIR: Direct Form II
For Direct Form II, input sequence will go through ℎ2 [𝑛] first and then
ℎ1 [𝑛].
𝑌 𝑧 = 𝑊 𝑧 𝐻1 𝑧 𝑜𝑟 𝑦 𝑛 = 𝑏0 𝑤 𝑛 + 𝑏1 𝑤 𝑛 − 1 + ⋯ + 𝑏𝑁 𝑤[𝑛 − 𝑀]
Where
𝑊 𝑧 = 𝑋 𝑧 𝐻2 𝑧 𝑜𝑟 𝑤 𝑛 = 𝑥 𝑛 − 𝑎1 𝑤 𝑛 − 1 − ⋯ − 𝑎𝑀 𝑤[𝑛 − 𝑁]
ℎ2 [𝑛] ℎ1 [𝑛]
23
IIR: Direct Form II
𝑥[𝑛] 𝑤[𝑛] 𝑏0 𝑦[𝑛]
+ + Number of operation
𝑧 −1 and memory:
−𝑎1 𝑏1
+ + • Addition:
𝑧 −1 𝑀+𝑁
−𝑎2 𝑏2
+ + • Multiplication:
𝑀+𝑁+1
• Memory:
−𝑎𝑁−1 𝑏𝑀−1 𝑀 𝑜𝑟 𝑁
+ +
whichever is higher
𝑧 −1
−𝑎𝑁 𝑏𝑀
24
IIR: Transpose Direct Form II
In this form, Direct Form II is rearranged by:
• Interchange input and output.
• Reverse direction of all branches (arrow)
• Maintain the filter coefficients
ℎ2 [𝑛] ℎ1 [𝑛]
From figure above, this realization seems to be similar to the Direct
Form I where 𝑥 𝑛 will go through ℎ1 [𝑛] first and then 𝐻2 [𝑛]. However
the structure is different as shown in the next figure.
25
IIR: Transpose Direct Form II
𝑥[𝑛] 𝑏0 𝑦[𝑛]
+
Number of operation and
𝑤1 [𝑛]
memory:
𝑧 −1
𝑏1 −𝑎1 • Addition:
+ 𝑀 + 1 𝑜𝑟 𝑁 + 1
𝑤2 [𝑛] whichever is higher
𝑧 −1
𝑏2 −𝑎2 • Multiplication:
+ 𝑀+𝑁+1
𝑏𝑀−1 −𝑎𝑁−1
• Memory:
+
𝑤𝑁 [𝑛]
𝑀 𝑜𝑟 𝑁
whichever is higher
𝑧 −1
𝑏𝑀 −𝑎𝑁
+
26
IIR: Transpose Direct Form II (cont.)
When 𝑀 = 𝑁, the mathematical manipulation of this system is as
follow
𝑦 𝑛 = 𝑏0 𝑥 𝑛 + 𝑤1 𝑛 − 1
𝑤𝑘 𝑛 = 𝑤𝑘+1 𝑛 − 1 + 𝑏𝑘 𝑥 𝑛 − 𝑎𝑘 𝑦 𝑛 , 𝑘 = 1, 2, … , 𝑁 − 1
𝑤𝑁 𝑛 = 𝑏𝑁 𝑥 𝑛 − 𝑎𝑁 𝑦[𝑛]
If 𝑀 > 𝑁, weight 𝑎𝑁+1 𝑡𝑜 𝑎𝑀 are equals to zero.
Otherwise, if 𝑁 > 𝑀, weight 𝑏𝑀+1 𝑡𝑜 𝑏𝑁 are equals to zero.
27
Quiz 1
So far the discussion is only covering the Transposed Direct Form II.
Thus, find the implementation cost for Transposed Direct Form I
28
Example 6
Compute the implementation cost for LTI system below based on
direct form I, direct form II and transposed direct form II
𝑦 𝑛 = 𝑥 𝑛 + 2𝑥 𝑛 − 1 + 𝑥 𝑛 − 2 − 2𝑥 𝑛 − 3 − 3𝑦 𝑛 − 1 − 5𝑦 𝑛 − 2
Solution
From the difference equation, 𝑀 = 3 and 𝑁 = 2. Thus,
Structure Addition Multiplication Memory
Direct Form I 5 6 5
Direct Form II 5 6 3
Transposed Direct Form II 4 6 3
29
Example 6 (cont.)
Structure Values store in the memory
Direct Form I 𝑥 𝑛 − 1 , 𝑥 𝑛 − 2 , 𝑥[𝑛 − 3], 𝑦[𝑛 − 1], 𝑦[𝑛 − 2]
Direct Form II 𝑤[𝑛 − 1], 𝑤[𝑛 − 2], 𝑤[𝑛 − 3]
Transposed Direct
𝑤1 [𝑛 − 1], 𝑤2 [𝑛 − 1], 𝑥[𝑛 − 3]
Form II
30
Cascade Structure
When the order of 𝐻 𝑧 is high, the LTI system is rarely realized as a
direct-form structure because there will be significant error if the
coefficients are only represented by a small number of bits.
The common practice is to decompose the transfer function 𝐻 𝑧
into a cascaded combination of 2nd and/or 1st order transfer
functions, 𝐻𝑘 𝑧 , as below:
𝐾
𝐻 𝑧 = ෑ 𝐻𝑘 𝑧 = 𝐻1 𝑧 𝐻2 𝑧 … 𝐻𝐾 𝑧
𝑘=1
The 2nd order transfer functions can be derived from the conjugate
pair of the poles and zeros.
31
Cascade Structure (cont.)
𝑥𝑛 𝐻1 (𝑧) 𝐻2 (𝑧) 𝐻𝐾 (𝑧) 𝑦𝑛
𝑏𝑘0 + 𝑏𝑘1 𝑧 −1 + 𝑏𝑘2 𝑧 −2
𝐻𝑘 𝑧 = −1 −2 … … 𝑆𝑒𝑐𝑜𝑛𝑑 𝑜𝑟𝑑𝑒𝑟 𝑠𝑦𝑠𝑡𝑒𝑚
1 + 𝑎𝑘1 𝑧 + 𝑎𝑘2 𝑧
𝑏𝑘0 + 𝑏𝑘1 𝑧 −1
𝐻𝑘 𝑧 = … … … … … … … 𝐹𝑖𝑟𝑠𝑡 𝑜𝑟𝑑𝑒𝑟 𝑠𝑦𝑠𝑡𝑒𝑚
1 + 𝑎𝑘1 𝑧 −1
32
Example 7
Given ℎ 𝑛 = 1, 2, 2, 1 , derive the cascade-form transfer function, 𝐻𝑘 𝑧 ,
of the system.
Solution
Since this is a 3rd order system, there will be two cascaded function;
one 1st order and one 2nd order function as below:
𝐻 𝑧 = 1 + 2𝑧 −1 + 2𝑧 −2 + 𝑧 −3 = 𝐻1 𝑧 𝐻2 𝑧
The zeros of the system are:
𝑧1 = −1, 𝑧2 = −0.5 + 𝑗0.866 = 𝑒 𝑗0.33𝜋 , 𝑧3 = −0.5 − 𝑗0.866 = 𝑒 −𝑗0.33𝜋
33
Example 7 (cont.)
Then, the cascade-form function are:
𝐻1 𝑧 = 1 + 𝑧 −1
𝐻2 𝑧 = 1 − 𝑒 𝑗0.67𝜋 𝑧 −1 1 − 𝑒 −𝑗0.67𝜋 𝑧 −1 = 1 − 2 cos 0.67𝜋 𝑧 −1 + 𝑧 −2
= 1 + 𝑧 −1 + 𝑧 −2
𝑥𝑛 𝐻1 (𝑧) 𝐻2 (𝑧) 𝑦𝑛
1 + 𝑧 −1 1 + 𝑧 −1 + 𝑧 −2
34
Example 7 (cont.)
The direct-form realization of the cascade system is as below:
𝐻1 𝑧 𝐻2 𝑧
𝑥𝑛 𝑧 −1 + 𝑦𝑛
𝑧 −1 𝑧 −1
+ +
35
Quiz 2
Repeat example 7 for the LTI system described by the following
difference equation:
𝑦 𝑛 = 𝑥 𝑛 + 𝑥 𝑛 − 1 − 2𝑦 𝑛 − 1 − 2𝑦 𝑛 − 2 − 𝑦 𝑛 − 3
36
References
1) John G. Proakis, Dimitris K Manolakis, “Digital Signal Processing:
Principle, Algorithm and Applications”, Prentice-Hall, 4th edition
(2006).
2) Sanjit K. Mitra, “Digital Signal Processing-A Computer Based
Approach”, McGraw-Hill Companies, 3rd edition (2005).
3) Alan V. Oppenheim, Ronald W. Schafer, “Discrete-Time Signal
Processing”, Prentice-Hall, 3rd edition (2009).
37