Professional Documents
Culture Documents
Handout - 7 Implementation of Discrete-Time Systems
Handout - 7 Implementation of Discrete-Time Systems
Implementation of
Discrete-Time Systems
Overview
• Introduction
• Structures of FIR Filters
• Structures of IIR Filters
• Comparison Between FIR and IIR Filters
Introduction
• For a given LSI system with a rational system function like
𝑏0 + 𝑏1 𝑧 −1
𝐻 𝑧 =
1 + 𝑎1 𝑧 −1
the input and output are related by the linear constant
coefficient difference equation (LCCDE)
*𝑦 𝑛 = −𝑎1 𝑦 𝑛 − 1 + 𝑏0 𝑥 𝑛 + 𝑏1 𝑥(𝑛 − 1)
• This system can be directly implemented as follows
𝑏0
𝑥(𝑛) + 𝑦(𝑛)
z-1 z-1
𝑏1 −𝑎1
𝑤(𝑛) 𝑏0
𝑥(𝑛) + + 𝑦(𝑛)
z-1
−𝑎1 𝑏1
A digital filter structure is said to be canonic if the number of delays in the block
diagram representation is equal to the order , Otherwise, it is a noncanonic structure
Introduction
• This second implementation requires only one memory location
to store 𝑤(𝑛 − 1), whereas the first implementation requires
two memory locations, one to store 𝑥(𝑛 − 1) and one to store
𝑦(𝑛 − 1).
• The previous example illustrates that there is more than one
way to implement a system and that the amount of
computation and/or memory required depends on the
implementation.
• In addition, the implementation may affect the sensitivity of the
filter to coefficient quantization and the amount of round-off
noise that appears at the output of the filter.
Structures of FIR Filters
• Finite Impulse Response (FIR) filters (also known as
nonrecursive filters) have a system function of the form:
𝑀
𝐻(𝑧) = 𝑏0 + 𝑏1 𝑧 −1 + ⋯ + 𝑏𝑀 𝑧 𝑀 = 𝑏𝑛 𝑧 −𝑛
𝑛=0
• Hence the impulse response has finite-duration and is given by
𝑏𝑛 0≤𝑛≤𝑀
ℎ(𝑛) = ቊ
0 elsewhere
Block diagram
Structures of FIR Filters
Cascade Form
• The system function of an FIR filter can be expressed as a
product of second-order sections (sos) called biquads:
H ( z ) = b0 + b1 z −1 + + bM z − M
b1 −1 bM − M
= b0 1 + z + + z
b0 b0
K
= b0 (1 + Bk1 z −1 + Bk 2 z −2 ); K = M / 2
k =1
Each of these second-order systems can be realized using the direct-form structure,
example H1(z)=(1−2.5321 z-1 + z-2)
Structures of FIR Filters **
Linear-phase FIR Filters
Length
Type Sequence, 𝒉(𝒏)
(𝑴 + 𝟏)
• Type 1: odd-symmetric
• Length (M +1) = 7
• requires 4 multipliers, whereas a
direct form requires 7 multipliers
• See next slide
• Type 2: even-symmetric
• Length (M +1) = 8
• requires 4 multipliers, whereas a
direct form requires 8 multipliers
B( z ) n
b z −n
b0 + b1 z −1 + + bM z − M
H ( z) = = n =0
= −1 −N
; a0 = 1
A( z ) N
1 + a1 z + + a N z
n
a z −n
n =0
x(n) b0 y(n)
-1
z1/z z-1
-a1 1/z
b1
z1/z
-1
-a2
-1
z
1/z
b2
H1(z) H2(z)
Structures of IIR Filters
Direct Form II
• Using the commutative law of the convolution we can
interchange the two sections in Direct Form I
x(n) b0 y(n)
-1
z1/z z-1
1/z
-a1 b1
z-1 z-1
1/z
-a2 1/z b2
H2(z) H1(z)
x(n) b0 y(n)
z -1
-a1 1/z
b1
z -1
-a2 1/z b2
H(z)
Structures of IIR Filters
Cascade Form
• In this form the system function 𝐻(𝑧) is written as a product of
second-order IIR sections (sos) called biquads.
• This is done by factoring the numerator and denominator
polynomials into their respective roots and then combining
either a complex conjugate root pair or any two real roots into
second-order polynomials.
x(n) b0 y(n)
1/z 1/z
-A1,1 B1,1 -A2,1 B2,1
C0
B1,0
+
-A1,1 1/z B1,1
x(n) -A1,2 y(n)
1/z +
B2,0
-A2,1 1/z B2,1
-A2,2 1/z
Structures of IIR Filters
Matlab Functions
Comparison Between FIR and IIR Filters
FIR Filters IIR Filters
Finite length Infinite Length
No feedback Has feedback
Always stable May be unstable
Not analog equivalent Analog equivalent