Discrete-Time Filter Design by Windowing: Quote of The Day

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 16

Discrete-Time Filter Design by Windowing

Quote of the Day


In mathematics you don't understand things.
You just get used to them.
Johann von Neumann

Content and Figures are from Discrete-Time Signal Processing, 2e by Oppenheim, Shafer, and Buck, 1999-2000 Prentice Hall Inc.

Filter Design by Windowing


Simplest way of designing FIR filters
Method is all discrete-time no continuous-time involved
Start with ideal frequency response

1
j
j n
j
j n
Hd e hd ne
hd n
H
e
e
d
d

Choose ideal frequency response as desired response


Most ideal impulse responses are of infinite length
The easiest way to obtain a causal FIR filter from ideal is
hd n 0 n M
hn
else
0
More generally
hn hd nwn

Copyright (C) 2005 Gner Arslan

where

1 0nM
else
0

wn

351M Digital Signal Processing

Windowing in Frequency Domain


Windowed frequency response

H e j

1
j
j

H
e
W
e
d
d

The windowed version is smeared version of desired response

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


Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

Properties of Windows
Prefer windows that concentrate around DC in frequency
Less smearing, closer approximation

Prefer window that has minimal span in time


Less coefficient in designed filter, computationally efficient

So we want concentration in time and in frequency


Contradictory requirements

Example: Rectangular window


M
1 e j M 1
j
j n
jM / 2 sin M 1 / 2
W e e

e
sin / 2
1 e j
n0

Demo

Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

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

Large side lobs


-13 dB
Large oscillation
around discontinuities

Simplest window
possible
1 0nM
else
0

wn

Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

Bartlett (Triangular) Window


Medium main lob
8/M

Side lobs
-25 dB

Hamming window
performs better
Simple equation

wn

2n / M
0 n M/2
2 2n / M M / 2 n M
0
else

Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

Hanning Window
Medium main lob
8/M

Side lobs
-31 dB

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

wn 2
M

Copyright (C) 2005 Gner Arslan

0nM
else

351M Digital Signal Processing

Hamming Window
Medium main lob
8/M

Good side lobs


-41 dB

Simpler than Blackman

2n
0.54 0.46 cos

wn
M

Copyright (C) 2005 Gner Arslan

0nM
else

351M Digital Signal Processing

Blackman Window
Large main lob
12/M

Very good side lobs


-57 dB

Complex equation

2n
4n
0.42 0.5 cos
0.08 cos

wn
M
M

0nM
else

Windows Demo

Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

Incorporation of Generalized Linear Phase


Windows are designed with linear phase in mind
Symmetric around M/2

wM n 0 n M
0
else

wn

So their Fourier transform are of the form

W e j We e j e jM / 2

where We e j is a real and even

Will keep symmetry properties of the desired impulse response


Assume symmetric desired response

Hd e j He e j e jM / 2
With symmetric window

1
j
j
j
Ae e
H
e
W
e
d
e

Periodic convolution of real functions


Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

10

Linear-Phase Lowpass filter


Desired frequency response
e jM / 2
c
j
Hlp e
0
c

Corresponding impulse
response
sin c n M / 2
hlp n
n M / 2
Desired response is even
symmetric, use symmetric
window
hn

sin c n M / 2
wn
n M / 2

Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

11

Kaiser Window Filter Design Method


Parameterized equation
forming a set of windows
Parameter to change mainlob width and side-lob area
trade-off

wn

2
n

M
/
2

I0 1

M/2

I0
0

0nM
else

I0(.) represents zeroth-order


modified Bessel function of
1st kind

Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

12

Determining Kaiser Window Parameters


Given filter specifications Kaiser developed empirical equations
Given the peak approximation error or in dB as A=-20log10
and transition band width s p

The shape parameter should be

0.1102 A 8.7

A 50

0.4
0.5842 A 21 0.07886 A 21 21 A 50

0
A 21

The filter order M is determined approximately by


M

Copyright (C) 2005 Gner Arslan

A8
2.285

351M Digital Signal Processing

13

Example: Kaiser Window Design of a Lowpass Filter


Specifications p 0.4, p 0.6, 1 0.01, 2 0.001
Window design methods assume 1 2 0.001
Determine cut-off frequency
Due to the symmetry we can choose it to be c 0.5
Compute
s p 0.2

A 20 log10 60

And Kaiser window parameters


5.653
M 37
Then the impulse response is given as

hn

18
.
5

I0 5.653 1

18.5
sin0.5n 18.5

n 18.5
I0 5.653
0

Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

0nM
else

14

Example Contd

Approximation Error

Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

15

General Frequency Selective Filters


A general multiband impulse response can be written as
hmb n

Nmb

Gk

k 1

Gk 1

sin k n M / 2
n M / 2

Window methods can be applied to multiband filters


Example multiband frequency response
Special cases of
Bandpass
Highpass
Bandstop

Copyright (C) 2005 Gner Arslan

351M Digital Signal Processing

16

You might also like