ECT303 DIGITAL SIGNAL
PROCESSING
MODULE 4 - PART I
REALIZATION OF FIR FILTERS
Ms. Neethu Radha Gopan, Asst. Prof., Dept. of ECE, RSET, Kakkanad
Basic Building Blocks for Filter Structures
2
Adder:
Multiplier:
Delay:
Structures for FIR Filters
3
➢ There are mainly 2 different structures for representing FIR Filters :
1. Direct Form (Transversal Structure)
2. Cascade Form
Direct Form
4
➢ The system function of the FIR filter is given by
𝑁−1
Y z
𝐻 𝑧 = = ℎ(𝑛) 𝑧 −𝑛
X 𝑧
𝑛=0
Y z
𝐻 𝑧 = = ℎ 0 + ℎ 1 𝑧 −1 + ℎ 2 𝑧 −2 + ⋯ + ℎ(𝑁 − 1)𝑧 −(𝑁−1)
X 𝑧
𝑌 𝑧 = ℎ 0 𝑋 𝑧 + ℎ 1 𝑧 −1 𝑋 𝑧 + ℎ 2 𝑧 −2 𝑋 𝑧 + ⋯ + ℎ(𝑁 − 1)𝑧 − 𝑁−1 𝑋(𝑧)
➢ Taking inverse transform, we get
y 𝑛 = ℎ 0 𝑥 𝑛 + ℎ 1 𝑥(𝑛 − 1) + ℎ 2 𝑥(𝑛 − 2) + ⋯ + ℎ 𝑁 − 1 𝑥(𝑛 − 𝑁 − 1 )
5
x(n) x(n-1) x(n-2) x(n-(N-2)) x(n-(N-1))
h(0) h(1) h(2) h(N-2) h(N-1)
y(n)
This structure requires N multipliers, N-1 adders & N-1 delay elements
Q. Obtain the direct form realization of the system function
𝐻 𝑧 = 1 + 2 𝑧 −1 − 3 𝑧 −2 − 4 𝑧 −3 + 5𝑧 −4
6
𝑌 𝑧
Soln: 𝐻 𝑧 = = 1 + 2 𝑧 −1 − 3 𝑧 −2 − 4 𝑧 −3 + 5𝑧 −4
𝑋 𝑧
𝑌 𝑧 = 𝑋 𝑧 + 2 𝑧 −1 𝑋(𝑧) − 3 𝑧 −2 𝑋(𝑧) − 4 𝑧 −3 𝑋(𝑧) + 5𝑧 −4 𝑋(𝑧)
Taking inverse, we get
y 𝑛 = 𝑥 𝑛 + 2 𝑥 𝑛 − 1 − 3 𝑥 𝑛 − 2 − 4 𝑥 𝑛 − 3 + 5 𝑥(𝑛 − 4)
x(n) x(n-1) x(n-2) x(n-3) x(n-4)
1 2 -3 -4 5
y(n)
Linear Phase Realization
7
➢ For a linear phase symmetric filter,
ℎ 𝑛 = ℎ(𝑁 − 𝑛 − 1)
➢ Since the impulse response is symmetric about (N-1)/2 , the number of multipliers
required is less.
➢ For N even, the no. of multipliers required is N/2
➢ For N odd, the no. of multipliers required is (N+1)/2
Q) Draw the direct form realization of the linear phase FIR filter using minimum
multipliers, h(n) = {0.5, 0.3, 1, 0.25, 1, 0.3, 0.5}.
8
𝑌 𝑧
Soln: 𝐻 𝑧 = = 0.5 + 0.3 𝑧 −1 + 𝑧 −2 + 0.25 𝑧 −3 + 𝑧 −4 + 0.3 𝑧 −5 + 0.5 𝑧 −6
𝑋 𝑧
𝑌 𝑧 = 0.5𝑋 𝑧 + 0.3 𝑧 −1 𝑋(𝑧) + 𝑧 −2 𝑋(𝑧) + 0.25 𝑧 −3 𝑋(𝑧) + 𝑧 −4 𝑋(𝑧) + 0.3 𝑧 −5 𝑋(𝑧) + 0.5 𝑧 −6 𝑋(𝑧)
𝑌 𝑧 = 0.5 𝑋 𝑧 + 𝑧 −6 𝑋 𝑧 + 0.3 𝑧 −1 𝑋 𝑧 + 𝑧 −5 𝑋 𝑧 + 1[ 𝑧 −2 𝑋 𝑧 + 𝑧 −4 𝑋 𝑧 ] + 0.25 𝑧 −3 𝑋(𝑧)
y 𝑛 = 0.5 𝑥 𝑛 + 𝑥(𝑛 − 6) + 0.3 𝑥 𝑛 − 1 + 𝑥(𝑛 − 5) + 1[ 𝑥 𝑛 − 2 + 𝑥(𝑛 − 4)] + 0.25 𝑥(𝑛 − 3)
N+1 7+1 Adders = N-1=6
Here since N is odd, we require only = = 4 multipliers
2 2 Delay Elements = N-1 = 6
x(n) x(n-1) x(n-2) x(n-3)
x(n-6) x(n-5) x(n-4)
0.5 0.3 1 0.25
y(n)
y 𝑛 = 0.5 𝑥 𝑛 + 𝑥(𝑛 − 6) + 0.3 𝑥 𝑛 − 1 + 𝑥(𝑛 − 5) + 1[ 𝑥 𝑛 − 2 + 𝑥(𝑛 − 4)] + 0.25 𝑥(𝑛 − 3)
9
Q) Realize the linear phase FIR filter using minimum multipliers
1 1 1 1
𝐻 𝑧 =1+ 𝑧 −1 + 𝑧 −2 + 𝑧 −3 + 𝑧 −4 + 𝑧 −5
3 4 4 3
10
𝑌 𝑧 1 −1 1 −2 1 −3 1 −4
Soln: 𝐻 𝑧 = = 1 + 𝑧 + 𝑧 + 𝑧 + 𝑧 + 𝑧 −5
𝑋 𝑧 3 4 4 3
1 −1 1 −2 1 −3 1 −4
𝑌 𝑧 = 𝑋 𝑧 + 𝑧 𝑋 𝑧 + 𝑧 𝑋 𝑧 + 𝑧 𝑋 𝑧 + 𝑧 𝑋(𝑧) + 𝑧 −5 𝑋(𝑧)
3 4 4 3
1 −1 1 −2
𝑌 𝑧 =1 𝑋 𝑧 + 𝑧 −5 𝑋 𝑧 + 𝑧 𝑋 𝑧 + 𝑧 −4 𝑋 𝑧 + [ 𝑧 𝑋 𝑧 + 𝑧 −3 𝑋 𝑧 ]
3 4
1 1
𝑦(𝑛) = 1 𝑥 𝑛 + 𝑥 𝑛 − 5 + 𝑥 𝑛−1 +𝑥 𝑛−4 + [𝑥 𝑛−2 +𝑥 𝑛−3 ]
3 4
N 6
Here since N is even, we require only = = 3 multipliers
2 2
x(n) x(n-1) x(n-2)
x(n-5) x(n-4) x(n-3)
1 1/3 1/4
y(n)
11
Cascade Form
12
➢ The system function can be realized in cascade form by factorizing H(z) into second order
factors, then realizing them in direct form and cascading them.
H(z) = 𝐻1 𝑧 × 𝐻2 𝑧 × ⋯ … .
Q. Obtain the cascade realization of the system function
H(z) = (1 + 2𝑧 −1 − 𝑧 −2 )(1 + 𝑧 −1 − 𝑧 −2 )
13
Soln: H z = 𝐻1 (𝑧)𝐻2 (𝑧)
𝐻1 𝑧 = 1 + 2𝑧 −1 − 𝑧 −2 & 𝐻2 𝑧 = 1 + 𝑧 −1 − 𝑧 −2
𝑌1 𝑧
𝐻1 𝑧 = = 1 + 2𝑧 −1 − 𝑧 −2
𝑋1 𝑧
𝑌1 𝑧 = 𝑋1 𝑧 + 2𝑧 −1 𝑋1 𝑧 − 𝑧 −2 𝑋1 𝑧 −−−− −(1)
𝑌2 𝑧
𝐻2 𝑧 = = 1 + 𝑧 −1 − 𝑧 −2
𝑋2 𝑧
𝑌2 𝑧 = 𝑋2 𝑧 + 𝑧 −1 𝑋2 𝑧 − 𝑧 −2 𝑋2 𝑧 −−−−− −(2)
𝑥1 (𝑛) 1 𝑦1 (𝑛) 𝑥2 (𝑛) 1 𝑦2 (𝑛)
2 1
−1 −1
14
Q. Obtain the cascade realization of the system given by the difference
5
equation 𝑦 𝑛 = 𝑥 𝑛 + 𝑥 𝑛 − 1 + 2𝑥 𝑛 − 2 + 2𝑥(𝑛 − 3)
2
15
Soln: Taking Z transform of the given equation,
5 −1 5 −1
Y z = 𝑋 𝑧 + 𝑧 𝑋 𝑧 + 2𝑧 𝑋 𝑧 + 2𝑧 𝑋 𝑧 = 𝑋 𝑧 (1 + 𝑧 + 2𝑧 −2 + 2𝑧 −3 )
−2 −3
2 2
𝑌 𝑧 5 −1
𝐻 𝑧 = = 1 + 𝑧 + 2𝑧 −2 + 2𝑧 −3 𝑥(𝑛) 1 1 y(𝑛)
𝑋 𝑧 2
1 −1
𝐻 𝑧 = (1 + 2𝑧 −1 )(1 + 𝑧 + 𝑧 −2 )
2
1/2
𝐻1 𝑧 = 1 + 2𝑧 −1 2
1 −1
𝐻2 𝑧 = 1 + 𝑧 + 𝑧 −2
2
1
Q. Obtain the cascade realization with minimum number of multipliers.
1 −1 1 −2
𝐻 𝑧 = (1 + 𝑧 )(1 + 𝑧 + 𝑧 + 𝑧 −3 )
−1
2 2
Soln: Given H(z) is a product of factors that have linear phase symmetry property.
1 −1 1 −2
𝐻 𝑧 = 𝐻1 𝑧 . 𝐻2 𝑧 = (1 + 𝑧 −1 )(1 +
𝑧 + 𝑧 + 𝑧 −3 )
2 2
1 −1
𝐻1 𝑧 = 1. (1 + 𝑧 ) & 𝐻2 𝑧 = 1. (1 + 𝑧 ) + (𝑧 + 𝑧 −2 )
−1 −3
2
𝒙(𝒏)
1
1 1/2
y(𝒏)
16
References
17
1. Proakis J. G. and Manolakis D. G., Digital Signal Processing, 4/e, Pearson Education,
2007.
2. P. Ramesh Babu, Digital Signal Processing, Scitech Publications (India) Pvt Ltd.
18 END of PART -I
THANK YOU!