0% found this document useful (0 votes)
344 views

Design of Linear-Phase FIR Filters Using Windows

This document discusses the design of linear-phase FIR filters using windowing. It begins by introducing FIR filters and their design process. It then explains that multiplying the impulse response of an ideal filter by a symmetric window function results in a linear-phase FIR filter. The key steps are to start with the desired frequency response, take the inverse DTFT to get the impulse response, then multiply it by an appropriate window function to truncate it. Different window shapes provide tradeoffs between main lobe width and side lobe peaks, which impact the filter's transition bandwidth and ripple behavior.

Uploaded by

suma_motade
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
344 views

Design of Linear-Phase FIR Filters Using Windows

This document discusses the design of linear-phase FIR filters using windowing. It begins by introducing FIR filters and their design process. It then explains that multiplying the impulse response of an ideal filter by a symmetric window function results in a linear-phase FIR filter. The key steps are to start with the desired frequency response, take the inverse DTFT to get the impulse response, then multiply it by an appropriate window function to truncate it. Different window shapes provide tradeoffs between main lobe width and side lobe peaks, which impact the filter's transition bandwidth and ripple behavior.

Uploaded by

suma_motade
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

Design of Linear-Phase

FIR Filters Using


Windows

Design of Digital Filters


LTI Systems
h(n)

FIR

Determine
coefficients of
h(n) [or P(z)
and Q(z)]

IIR

With rational transfer


function
P( z )
H ( z)
Q( z )

No rational transfer
function
H ( z)

P( z )
Q( z )

Design of digital filters


Design Stages
1. Specifications Application dependent
2. Design h(n) Determine coefficients of h(n)
3. Realization Direct form I,II, cascade and
parallel
4. Implementation Programming in Matlab/C,
DSP, ASIC,

Design of FIR filters


. Windowing
3

Motivation: impulse response of ideal-lowpass filter


IDTFT of ideal low-pass filter:
1
c
X ( )
0 c

x(n) 1 X ( )e jn d 1 e jn d
2
2
1
e j c n e j c n
j n c
x( n)
[e ]c
j 2n
j 2n

x ( n)

sin c n
n

Motivation: impulse response of


ideal low-pass filter

Multiply by a
rectangular window

It can be shown that if we have a linear-phase ideal filter and we


multiply it by a symmetric window function, we end up with a linearphase FIR filter.
5

Design of FIR filters using windows


The steps in the design of FIR filters using
windows are as follows:
1. Start with the desired frequency response
results in the sinc function in time domain H d ( )
2. Compute IDTFT {H d ( )} hd (n)
3. Determine the appropriate window function w(n)
4. Calculate h(n) h (n) w(n)
d

A finite-length window function


6

DesiredFrequencyResponseofthesystemis

CorrespondingUnitsampleresponseis

ThisUnitsampleresponseisinfiniteinduration&must
betruncatedatsomepointn=M1,totakeFIRfilterof
lengthequaltoM

ButabrupttruncationoftheFourierseriesresultsinoscillationsin
thepassbandandstopband.
TheseoscillationsareduetoslowconvergenceofFourierseries
andthiseffectisknownasGibbsphenomenon.

Toreducetheseoscillations,theFouriercoefficientsofthefilter
aremodifiedbymultiplyingtheinfiniteimpulseresponsewitha
finiteweighingsequencew(n).

GibbsPhenomenonOscillatorybehaviourinthe
magnituderesponsesofcausalFIRfiltersobtainedby
truncatingtheimpulseresponsecoefficientsofidealfilters.
Asthelengthofthelowpassfilterisincreased,thenumber
ofripplesinbothpassbandandstopbandincreases,witha
correspondingdecreaseintheripplewidths.
Heightofthelargestripplesremainthesameindependent
oflength.
Gibbsphenomenoncanbereducedeither:
1. Usingawindowthattaperssmoothlytozeroateachend,or
2.Providingasmoothtransitionfrompassbandtostopbandinthe
magnitudespecifications

Role of Gibbs phenomenon

Rectangular
Window

W(n)shouldbeassmallaspossible.Thisminimizescomputation
intheimplementationofthefilter.

W e jw
1 e

1 e jw

jw M 1

w n e jwn e jwn

jwM 2

n0

sin w M 1 2
sin w 2

H e jw
Thefrequencyresponseofthefiltercan
jw
H d e
beobtainedbyconvolutionofand

H e

jw

H d e jw W e j w d H d e jw

M 1

We

jw

2
M 1

TheFourierTransformofwindowconsistsofacentrallobe
andsidelobes.Thecentrallobecontainsmostoftheenergy
13
ofthewindow.

Windowing in frequency domain


h(n) hd (n) w(n)

H ( ) H d ( ) *W ( )

What condition should we impose on W() so that H ()


looks like Hd() ?
Impulse function in the frequency domain, means an
infinitely-long constant in the time-domain
Larger window means more computation
14

Windowing in Frequency Domain


He
Windowed frequency response

H d e j W e j d

The windowed version is smeared version of desired


response

If w[n]=1 for all n, then W(ej) is pulse train with 2


period
15

Rationale for the shape of the filter


Ideal filter

M 1 N
Rectangular
Window
function
(Oppenheim and Schaffer, 2009)

Filter Specifications
Pass-band:
Stop-band:

0 p
s

Pass-band ripple:

1 p

Stop-band ripple:

2 s

Transition width: s p
What is the ideal situation?

(Oppenheim and Schaffer, 2009)

Filter Specifications

20 log H ( )

Observations
Width of transition is
not sharp!

The width of transition depends


on the width of the main lobe of
the window.
Ripples in the passband / stopband
are proportional to the peaks of side
lobes of the window.

Controlling the width of the main lobe

Q: How can we control the transition width (size of the main lobe)?
A1: using the size of the window

Controlling the width of the main lobe

Q: How can we control the size of transition width (size of the


main lobe)?
A2: Shape of the window; in other words, windows with a fixed
size that have different shapes can have different main lobe width.
Rectangular window Smallest; and Blackman largest main
lobe width

Controlling the peak of the side lobe

Q: How can we control the peak of the side lobes so


that we can get a good ripple behavior in the FIR filter?
A: using the shape of the window

Controlling the peak of the side lobe

Q: Can we control the peak of the side lobes by changing the


size of the window?
A: It can be shown that changes are not significant.
27

Good design strategy


Main lobe
Shape of
width of the
Main lobe
the window
window
Side lobe
Good design strategy:
1) Use shape to control the behavior of the side lobe.
2) Use width to control the behavior of the main lobe.

Dependency

The frequency response of the filterH e jw


depends on the frequency response of window.
Therefore the window chosen for truncating the
infinite impulse response should have some
desirable characteristics
1) The central lobe of frequency response of the
window should contain most of the energy &
should be narrow.
2) The highest sidelobe level of the frequency
response should be small.
3) The side lobes of the frequency response
should decrease in energy rapidly as w tends to
infinity.

Increasing Dimension of Window

Increasing Dimension of Window

The width of the main lobe decreases as M


increases

Rectangular Window
Narrowest main lobe
4/(M+1)
Sharpest transitions at
discontinuities in
frequency

Large side lobes


-13 dB
Large oscillation around
discontinuities

Simplest window
possible

1 0nM
w n
else
0

Bartlett (Triangular) Window


Medium main lobe
8/M

Side lobes
-25 dB

Hamming window
performs better
Simple equation
2n / M
0 n M /2

w n 2 2n / M M / 2 n M

0
else

Hanning Window
Medium main lobe
8/M

Side lobes
-31 dB

Hamming window
performs better
Same complexity as
Hamming
1
2 n
1

cos

w n 2
M

0nM
else

Hamming Window
Medium main lobe
8/M
Good side lobes
-41 dB
Simpler than
Blackman
2 n

0.54 0.46 cos

w n

0nM
else

Blackman Window
Large main lobe
12/M

Very good side lobes


-57 dB

Complex equation

2 n
0.42

0.5cos

0nM
w n
4 n
0.08cos

0
else

Frequency Spectrum of Windows


(a) Rectangular, (b) Bartlett,
(c) Hanning, (d) Hamming,
(e) Blackman , (M=50)
(a)-(e) attenuation of sidelobe increases,
38
width of mainlobe increases.

Sr.
N
o.

Window Type

Rectangular
Window

Bartlett Window
(Triangular)

Hanning
Window

Hamming
Window

Blackman
Window

Weight Equation

Commonly Used Windows


Table 7.1

Biggest, high oscillations at discontinuity

Smallest, the sharpest transition

40

41

You might also like