Topic 07 Fir

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 62

 

Topic 07: Finite Impulse Response Filter Design

Dr. Hilal M. El Misilmani

s e
ea
el
R
lic
ub
rP
Fo

COME 480 − Discrete-time Signals and Systems


Dr. Hilal M. El Misilmani
ot
N
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Lectures Schedule

s e
Lecture Topics

ea
Topic 00 Course description, evaluation and regulations
Topic 01 Introduction to DSP

el
Topic 02 DSP scheme, sampling, signal reconstruction, anti-aliasing filter, quantization
Digital sequences, LTI systems, causal systems, difference equation and impulse

R
Topic 03
responses, BIBO stability, digital convolution
Fourier series & Fourier transform, Discrete Fourier transform, Fast Fourier transform

lic
Topic 04
(decimation in time and frequency methods)
Topic 05
equation using Z-transform
ub
Z-transform, properties, convolution, inverse Z-transform
rP
Difference equations and digital filters, Z-plane pole-zero plot stability, digital filter
Topic 06
frequency response, basic filtering and realization of digital filters
Finite impulse response (FIR) filter design, Fourier transform design, window method,
Fo

Topic 07
design for customer specifications
Infinite impulse response (IIR) filter design, Bilinear transformation (BLT) design method,
Topic 08
digital Butterworth and Chebyshev filter designs
ot

Topic 09 Realization of digital filters, FIR filter realization, IIR filter realization
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 2/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Outline of Topics

s e
ea
1 Finite Impulse Response Filter Design

el
R
2 Fourier Transform Design

lic
3 Window Method ub
rP

4 Design for Customer Specifications in Practice


Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 3/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Current Section

s e
ea
1 Finite Impulse Response Filter Design

el
R
2 Fourier Transform Design

lic
3 Window Method ub
rP

4 Design for Customer Specifications in Practice


Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 4/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Finite Impulse Response Filter Design
An FIR filter is completely specified by the following

e
input-output relationship:

s
ea
k
X
y (n) = bi x(n − i)

el
i=0

R
= b0 x(n) + b1 x(n − 1) + b2 x(n − 2) + · · · + bk x(n − k)

lic
where bi represents FIR filter coefficients and k + 1 denotes
the FIR filter length
ub
rP

Y (z) = b0 X (z) + b1 z −1 X (z) + · · · + bk z −k X (z)


Fo

Hence, the transfer function that depicts the FIR is:


ot

Y (z)
H(z) = = b0 + b1 z −1 + · · · + bk z −k
N

X (z)
Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 5/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 2

s e
ea
Given the following FIR filter,

el
y (n) = 0.1x(n) + 0.25x(n − 1) + 0.2x(n − 2)

R
lic
determine:
1
2
the transfer function
filter length
ub
rP
3 nonzero coefficients
4 impulse response
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 6/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 2

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 7/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Remarks on FIR Filters

s e
ea
1 The transfer function has a constant term, all the other terms
have negative powers of z, and all the poles are at the origin

el
on the z-plane. Hence, FIR filters are always stable. Their

R
impulse responses have only a finite number of terms

lic
2 The FIR filter operations involve only multiplying the filter
ub
inputs by their corresponding coefficients and accumulating
rP
them → the implementation of FIR filters in real time is
straightforward
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 8/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Design Objectives

s e
ea
Y (z) = b0 X (z) + b1 z −1 X (z) + · · · + bk z −k X (z)

el
Y (z)
H(z) = = b0 + b1 z −1 + · · · + bk z −k

R
X (z)

lic
Design Objective ub
rP
To obtain bi coefficients for the FIR filter such that the magnitude
frequency response of the FIR filter H(z) will approximate the
Fo

desired magnitude frequency response, such as that of a lowpass,


highpass, bandpass, or bandstop filter
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 9/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Current Section

s e
ea
1 Finite Impulse Response Filter Design

el
R
2 Fourier Transform Design

lic
3 Window Method ub
rP

4 Design for Customer Specifications in Practice


Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 10/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Fourier Transform Design: Ideal LPF Design

Assuming an ideal lowpass filter with a normalized cutoff

s e
frequency Ωc , whose magnitude frequency response in terms

ea
of the normalized digital frequency Ω

el
(
1, 0 ≤ |Ω| ≤ Ωc
H(e jΩ ) =

R
0, Ωc ≤ |Ω| ≤ π

lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 11/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Fourier Transform Design: Ideal LPF Design
Z π
1
h(n) = H(e jΩ )e jΩn dΩ for − ∞ < n < ∞

e
2π −π

s
ea
(
jΩ 1, 0 ≤ |Ω| ≤ Ωc
H(e ) =

el
0, Ωc ≤ |Ω| ≤ π

R
(
Ωc
π , n=0

lic
h(n) = sin(Ω c n)
πn , n 6= 0
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 12/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Fourier Transform Design: Ideal LPF Design
Theoretically, h(n) exists for −∞ < n < ∞ and is

e
symmetrical about n = 0 → h(n) = h(−n)

s
ea
The amplitude of the impulse response sequence h(n)
becomes smaller when n increases in both directions

el
The z-transfer function is noncausal

R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 13/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Fourier Transform Design: Ideal LPF Design

The FIR filter design must first be completed by truncating

e
1

s
the infinite-length sequence h(n) to achieve the 2M + 1

ea
dominant coefficients using the coefficient symmetry

el
H(z) = h(M)z M +· · ·+h(1)z 1 +h(0)+h(1)z −1 +· · ·+h(M)z −M

R
lic
2 The truncated impulse response h(n) is then delayed by M
ub
samples to yield the following causal FIR filter, where the
rP
delay operation is given by
Fo

bn = h(n − M), for n = 0, 1, · · · , 2M


H(z) = b0 + b1 z −1 + · · · + b2M z −2M
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 14/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Fourier Transform Design: Ideal LPF Design

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Example 3 Table

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 15/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 2

s e
ea
a. Calculate the filter coefficients for a 3-tap FIR lowpass filter

el
with a cutoff frequency of 800 Hz and a sampling rate of

R
8,000 Hz using the Fourier transform method

lic
b. Determine the transfer function and difference equation of the
designed FIR system ub
c. Compute and plot the magnitude frequency response for
rP

Ω = 0, π/4, π/2, 3π/4, and π radians


Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 16/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 2

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 17/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 2

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 18/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example Notes

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 19/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example Notes

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 20/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example Notes
In general, the FIR filter with symmetric coefficients has a

e
linear phase response (linear function of Ω) as follows

s
ea
∠H(e jΩ ) = −MΩ + possible phase of 180◦

el
R
lic
ub
rP
Fo
ot

The 3-tap FIR filter does not give an acceptable magnitude


N

frequency response
Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 21/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 3-tap (M =1) and 17-tap (M = 8)
The magnitude and phase responses of 3-tap (M = 1) and

e
17-tap (M = 8) FIR lowpass filters with a normalized cutoff

s
ea
frequency Ωc = 0.2π radians

el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 22/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example Notes

e
1 Gibbs effect

s
The oscillations (ripples) exhibited in the passband (main lobe)

ea
and stopband (side lobes) of the magnitude frequency response

el
constitute the Gibbs effect

R
The Gibbs oscillatory behavior originates from the abrupt
truncation of the infinite impulse response

lic
To remedy this problem, window functions are used
2
ub
Using a larger number of the filter coefficients will produce
rP
the sharp roll-off characteristic of the transition band
but may increase computational complexity for implementing
Fo

the designed FIR filter


The phase response is linear in the passband
ot

3
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 23/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 3

s e
ea
a. Calculate the filter coefficients for a 5-tap FIR bandpass filter

el
with a lower cutoff frequency of 2,000 Hz and an upper cutoff

R
frequency of 2,400 Hz and a sampling rate of 8,000 Hz

lic
b. Determine the transfer function and plot the frequency
responses
ub
rP
Table
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 24/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 3

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 25/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 3

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 26/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 3

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 27/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 3

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 28/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example Notes

The magnitude frequency response demonstrates the Gibbs

e
oscillatory behavior existing in the passband and stopband

s
ea
Main lobe and SLL:
The peak of the main lobe in the passband is dropped from 0

el
dB to approximately −10 dB

R
while for the stopband, the lower side lobe in the magnitude

lic
response plot swings approximately between −18 dB and −70
dB ub
and the upper side lobe swings between −25 dB and −68 dB
rP
This is due to the abrupt truncation of the infinite impulse
Fo

sequence h(n)
⇒ The oscillations can be reduced by increasing the number
ot

of coefficients and using a window function, which will be


N

studied next
Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 29/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Current Section

s e
ea
1 Finite Impulse Response Filter Design

el
R
2 Fourier Transform Design

lic
3 Window Method ub
rP

4 Design for Customer Specifications in Practice


Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 30/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Window Method

Developed to remedy the undesirable Gibbs oscillations in the

s e
passband and stopband of the designed FIR filter

ea
Recall that the Gibbs oscillations originate from the abrupt

el
truncation of the infinite-length coefficient sequence

R
Window function is symmetrical and can gradually weight the

lic
designed FIR coefficients down to zeros at both ends for the
range −M ≤ n ≤ M ub
rP
Applying the window sequence to the filter coefficients gives:
Fo

hw (n) = h(n) · w (n)


ot

where w (n) designates the window function


N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 31/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Window Method

s e
ea
el
R
lic
ub
rP
Fo

Figure: Shapes of window functions for the case of 2M + 1 = 81.


ot

Triangular window (O line), Hanning window (+ line) , Hamming window


N

(solid line), Blackman window (dashed line)


Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 32/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Window Method

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Example 4 Example 5

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 33/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Comparison Between Different Window Functions

s e
ea
el
R
lic
ub
rP
The Blackman window offers the lowest side lobe, but with an
increased width of the main lobe
Fo

The Hamming and Hanning windows have a similar narrow


ot

width of the main lobe, but the Hamming window


N

accommodates a lower side lobe than the Hanning window


Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 34/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
FIR filter design via the window method

1 Obtain the FIR filter coefficients h(n) via the Fourier

e
transform method Table

s
ea
2 Multiply the generated FIR filter coefficients by the selected

el
window sequence Window

R
hw (n) = h(n)w (n), n = −M, · · · , 0, 1, · · · , M

lic
ub
where w (n) is chosen to be one of the window functions listed
in Equations
rP

3 Delay the windowed impulse sequence hw (n) by M samples to


Fo

get the windowed FIR filter coefficients


ot

bn = hw (n − M), for n = 0, 1, · · · , 2M
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 35/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 4

s e
Given the calculated filter coefficients:

ea
h(0) = 0.25, h(−1) = h(1) = 0.22508

el
R
h(−2) = h(2) = 0.15915, h(−3) = h(3) = 0.07503

lic
ub
a. Apply the hamming window function to obtain windowed
coefficients hw (n)
rP
b. Plot the impulse response h(n) and windowed impulse
response hw (n)
Fo

Window
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 36/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 4

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 37/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 4

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 38/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example Notes

s e
ea
el
R
lic
ub
rP
Fo

Hamming window does its job and weights the FIR filter
ot

coefficients to zero gradually at both ends ⇒ reduced Gibbs


N

effect in the magnitude frequency response


Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 39/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 5

s e
a. Design a 3-tap FIR lowpass filter with a cutoff frequency of

ea
800 Hz and a sampling rate of 8, 000 Hz using the Hamming

el
window function

R
b. Determine the transfer function and difference equation of the

lic
designed FIR system
ub
c. Compute and plot the magnitude frequency response for
rP
Ω = 0, π/4, π/2, 3π/4, and π radians
Fo

Table Window
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 40/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 5

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 41/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 5

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 42/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 5

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 43/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 6 (Using Matlab)

s e
ea
1 Design a lowpass FIR filter with 25 taps using Matlab. The

el
cutoff frequency of the filter is 2,000 Hz, assuming a sampling

R
frequency of 8,000 Hz.

lic
The rectangular window and Hamming window functions are
used for each design
2
ub
Plot the frequency responses along with those obtained using
rP
the rectangular window and Hamming window for comparison
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 44/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 6 (Using Matlab)

s e
ea
el
R
lic
ub
rP
Fo
ot

Figure: Frequency responses using the rectangular and Hamming windows


N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 45/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Current Section

s e
ea
1 Finite Impulse Response Filter Design

el
R
2 Fourier Transform Design

lic
3 Window Method ub
rP

4 Design for Customer Specifications in Practice


Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 46/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Design for Customer Specifications in Practice

Given the required stopband attenuation and passband ripple

s e
specifications, the appropriate window can be selected based

ea
on the performance of the window functions

el
R
lic
ub
rP
Fo
ot

(a) (b)
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 47/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Design for Customer Specifications in Practice
The normalized transition band is defined as:

s e
|fstop − fpass |

ea
∆f =
fs

el
The passband ripple is defined as:

R
δp (dB) = 20log10 (1 + δp )

lic
The stopband attenuation is defined as:
ub
δs (dB) = −20log10 (δs )
rP

The cutoff frequency used for the design will be chosen at the
Fo

middle of the transition band, determined by:


ot

fpass + fstop
fc =
N

2
Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 48/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 7
A lowpass FIR filter has the following specifications:

e
Passband 0 − 1850 Hz, Stopband 2150 − 4000 Hz

s
Stopband attenuation 20 dB, Passband ripple 1 dB

ea
Sampling rate 8000 Hz

el
Determine the FIR filter length and the cutoff frequency to be

R
used in the design equation

lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 49/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Design for Customer Specifications in Practice

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Example 8 Example 9 Example 10

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 50/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 7
The normalized transition band:

e
|2150 − 1850|

s
∆f = = 0.0375

ea
8000

el
Selecting the rectangular window will result in a passband

R
ripple of 0.74 dB and stopband attenuation of 21 dB

lic
→ This would satisfy the design requirement for a passband
ub
ripple of 1 dB and stopband attenuation of 20 dB.
Next, we determine the length of the filter as:
rP

0.9 0.9
Fo

N= = = 24
∆f 0.0375
ot

We choose the odd number N = 25. The cutoff frequency is


determined by 1850+2150
N

2 = 2000 Hz
Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 51/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 7

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 52/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 8
A highpass FIR filter has the following specifications:

e
Stopband 0 − 1500 Hz, Passband 2500 − 4000 Hz

s
Stopband attenuation 40 dB, Passband ripple 0.1 dB

ea
Sampling rate 8000 Hz

el
Determine the FIR filter length and the cutoff frequency to be

R
used in the design equation

lic
ub
rP
Fo
ot
N

Design Table
Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 53/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 8

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 54/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 8

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 55/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 9
Design a bandpass FIR filter with the following specifications:

e
Lower stopband 0 − 500 Hz, Upper stopband 3500 − 4000 Hz

s
Passband 1600 − 2300 Hz

ea
Stopband attenuation 50 dB, Passband ripple 0.05 dB

el
Sampling rate 8000 Hz

R
lic
ub
rP
Fo
ot
N

Design Table

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 56/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 9

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 57/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 9

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 58/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 9

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 59/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 10
Design a bandstop FIR filter with the following specifications:

e
Lower cutoff freq. 1250 Hz, Lower transition width 1500 Hz

s
Upper cutoff freq. 2850 Hz, Upper transition width 1300 Hz

ea
Stopband attenuation 60 dB, Passband ripple 0.02 dB

el
Sampling rate 8000 Hz

R
lic
ub
rP
Fo
ot
N

Design Table

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 60/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 10

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 61/62
Finite Impulse Response Filter Design
Fourier Transform Design
Window Method
Design for Customer Specifications in Practice

 
Example 10

s e
ea
el
R
lic
ub
rP
Fo
ot
N

Dr. Hilal M. El Misilmani Topic 07: Finite Impulse Response Filter Design 62/62

You might also like