0% found this document useful (0 votes)
39 views25 pages

FIR Filters

Uploaded by

M Kaif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views25 pages

FIR Filters

Uploaded by

M Kaif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Finite Impulse Response (FIR)

Filter Design Overview


Introduction
 The term “Filters” originate from frequency-selective filtering

 modify certain frequencies relative to others

 Analysis vs. Design


Analysis Study system behavior
• Pole-zero distribution
• System properties (Causality/Stability)
• Frequency response

Design
Find system coefficients, i.e. M;N;a1; … ;aN; b0; … ;bM,
s.t.
• Practical realization poses causality and stability constraints
• coefficients ak have strict constraints
• Additionally, a linear phase requirement for H(z) may be desirable
Filter Design Overview
 Design of Discrete-Time IIR Filters From Continuous-
Time (Analog) Filters
 Impulse Invariance
 Bilinear Transformation

 Common Discrete-time filters


 Butterworth
 Chebyshev
 Elliptic

 Design of FIR Filters


 Windowing Method
 Frequency Sampling Method
 Optimum Filter Design (Park-McClellan)
Typical low-pass specifications
Parameters

[0;wp] = pass-band

[ws ; p] = stop-band

[wp ; ws ] = transition-band

dp1; dp2 = pass-band ripple; Often expressed in dB via 20log10(1+dp)

ds = stop-band ripple; Often expressed in dB via 20log10(ds)


FIR or IIR ?
• The choice between IIR and FIR usually based on phase considerations

• GLP (generalized linear phase) constraint

FIR with GLP


IIR filters cannot be stable, causal and GLP at same time

If GLP desired : choose FIR


If GLP not desired : IIR can be chosen

IIR with GLP


FIR Filter Design

 Windowing Method
 Truncate (window) the ideal response to make it FIR
FIR Filter Design-Rectangular Windowing
Problems
Magnitude spectra of Rectangular windows of increasing lengths (samples)

Reduction in width of main lobe as M increases


Area under sidelobes remain the same (note Normalized Amplitude plotted here)
FIR Filter Design-Rectangular Windowing
Problems
• Gibbs phenomenon occurs whenever there is truncation
• Increasing ‘M’ does not yield significant result as oscillations
increase without reducing in amplitude
• Transition region becomes smaller with increasing M
• Ripples continue to exist especially at discontinuities

• Problem is due to sharp discontinuity (in time domain) of rectangular


windows
• Solution : Use windows with tapered ends in time domain instead of
sharp discontinuities
Getting Around Sharp Discontinuity of
Rectangular Windows
• No abrupt discontinuity in time-domain response of windows translates to
low amplitude side lobes in frequency domain

• Advantage is the reduced number of ripples

• On the hindsight, tapered window results in a wider transition band

(frequency domain)

• Wider transition band can always be compensated by using larger length

windows (higher order filter, remember filter order = Window length - 1)


Properties of Commonly Used Windows
1, 0  n  M
Rectangular w  n  = 
0, otherwise
 2n / M , 0  n  M / 2, M even

Bartlett (triangular) w  n  =  2 − 2n / M , M / 2  n  M
0,
 otherwise

0.5 − 0.5cos ( 2p n / M ) 0  n  M
Hanning w n = 
0, otherwise

0.54 − 0.46cos ( 2p n / M ) 0  n  M
Hamming w  n  = 
0, otherwise

Blackman w  n  = 0.42 − 0.5cos ( 2p n / M ) + 0.08cos ( 4p n / M ) 0  n  M


0, otherwise
Properties of Commonly Used Windows
Rectangular Hanning

Hamming

Bartlett (triangular)

Blackman
Properties of Commonly Used Windows

Smallest width

Highest amplitude the sharpest transition

high oscillations at discontinuity

Wider transition region (wider main-lobe) compensated by much lower side-


lobes and thus less ripples
Example : Window Comparison

Hanning Window
Hanning Window
Rectangular window

M = 40

Less ripples in Hanning Window at the cost of larger transition band

Transition band reduced by increasing window length


Specifications of Window Design Method

Filter response H(ejw) should not the shaded regions


Properties of Window Design Method (1)

Equal transition bandwidth on both sides of desired (ideal) cut-off


frequency
Properties of Window Design Method (2)

Equal peak approximation error d in passband and stopband


Properties of Window Design Method (3)

Main lobe of window is wider than the width of transition band


Properties of Window Design Method (4)

Peak approximation error d depends on window shape and


independent of window size (filter order)
Design Example
Step 1-Design Example : Choice of Window

d 2 = 0.01; 20 log( 0.01) = −40dB


Hanning, Hamming and Blackman all satisfy the criterion, we can
chose between Hanning and Hamming to have a smaller transition
band as compared to Blackman for same order
Suppose we choose the Hanning Window
Step 2-Design Example : Filter Order

wp ws

d 2 = 0.01; 20 log( 0.01) = −40dB


Suppose we choose the Hanning Window
Width of main lobe = ws – wp = 0.3p – 0.2p = 0.1p = 8p/M ; M = 80
Step 3-Design Example : Specify Ideal
Response Hd(w)
Ideal Filter cut-off frequency

wp ws

Ideal low-pass filter


Step 4-Design Example : Specify Ideal Impulse
Response hd [n]

Non-causal

Make it causal: Delay by M/2


 sin(0.5p (n − 40))
hd [n] =
p (n − 40)
Ideal Filter Coefficients
Step 5-FIR filter coefficients
Ideal Filter Coefficients
 sin(0.5p (n − 40))
hd [n] =
p (n − 40)
0.5 − 0.5cos ( 2p n / M ) 0  n  M
Hanning w  n  = 
0, otherwise

FIR Filter Coefficients



h[n] = hd [n].w[n]
Find frequency response H(ejw) and verify if it meets specifications

Otherwise, repeat the process by changing either filter order,


window type, or by slightly moving the ideal filter band edge freq.

You might also like