Copyright © 2005. Shi Ping CUC Chapter 8 FIR Filter Design Content Introduction Properties of...

Preview:

Citation preview

Copyright © 2005. Shi Ping CUC

Chapter 8FIR Filter Design

Content

Introduction

Properties of Linear-Phase FIR Filters

Window Design Techniques

Copyright © 2005. Shi Ping CUC

Introduction

The advantages of the FIR digital filter

The phase response can be exactly linear;

They are relatively easy to design since there are no stability problems;

They are efficient to implement;

The DFT can be used in their implementation.

Copyright © 2005. Shi Ping CUC

Introduction

The advantages of a linear-phase response

Design problem contains only real arithmetic and not complex arithmetic;

Linear-phase filter provide no delay distortion and only a fixed amount of delay;

For the filter of length N (or order N-1) the number of operations are of the order of N/2.

Copyright © 2005. Shi Ping CUC

The basic technique of FIR filter design

Window design techniques;

Frequency sampling design techniques;

Optimal equiripple design techniques.

Introduction

return

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

The system function and frequency response

The system function of FIR filters

Let h(n), n=0,1,…,N-1 be the impulse response of length N. Then the system function is

1

0

)()(N

n

nznhzH

It has (N-1) poles at the origin and N-1 zeros located anywhere in the z-plane.

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

The frequency response of FIR filters

)()(

1

0

)()(

)()(

jjj

M

n

njj

eHeeH

enheH

)( jeH Magnitude response function

Amplitude response function)(H

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

)( jeH )(H The difference between and

)( jeH is always positive and the associated phase response is a discontinuous function.

may be both positive and negative and the associated phase response is a continuous function.

)(H

Consider the following example:

1)2( ,1)1( ,1)0( hhh

Copyright © 2005. Shi Ping CUC

jjj

n

njj

eee

enheH

)cos21(1

)()(

2

2

0

3/2

3/20 )(

0 ,cos21)( jeH

0 )(

cos21)(H

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Linear-phase conditions

)(

)(

)()( )(jj eHeH

d

d )( A constant group delay

1

0

)()(N

n

nznhzHFor

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

)( For

The phase response is through the origin.

The phase response is not through the origin.

)1()( nNhnh

)1()( nNhnh

)( For

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Frequency response of linear-phase FIR filters

1

0

)1(1

0

)1(

1

0

1

0

)()]([

)]1([)()(

N

m

mNN

m

mN

N

n

nN

n

n

zmhzzmh

znNhznhzH

)()( 1)1( zHzzH N

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

)()( 1)1( zHzzH N

1

0

)2

1()

2

1(

)2

1(

1

0

)1(

1)1(

]2

)[(

])[(2

1

)]()([2

1)(

N

n

nN

nN

N

N

n

nNn

N

zznhz

zzznh

zHzzHzH

Copyright © 2005. Shi Ping CUC

Symmetric impulse response )1()( nNhnh

])2

1cos[()(

]2

[)(

)()(

1

0

)2

1(

)12

1()1

2

1(

1

0

)2

1(

nN

nhe

eenhe

zHeH

N

n

Nj

Nj

Nj

N

n

Nj

ez

jj

])2

1cos[()()(

1

0

nN

nhHN

n

)2

1()(

N

2

1

N

Copyright © 2005. Shi Ping CUC

Antisymmetric impulse response )1()( nNhnh

])2

1sin[()(

]2

[)(

)()(

1

0

2)

2

1(

)12

1()1

2

1(

1

0

)2

1(

nN

nhe

eenhe

zHeH

N

n

jN

j

Nj

Nj

N

n

Nj

ez

jj

])2

1sin[()()(

1

0

nN

nhHN

n

2)

2

1()(

N

2

1

N

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Type 1: symmetric impulse response, N is odd

The properties of amplitude function )(H

])2

1cos[()()(

1

0

nN

nhHN

n

)cos()(

)cos()2

1(2)

2

1(

])2

1cos[()(2)

2

1()(

2/)1(

0

2/)1(

1

2/)3(

0

nna

mmN

hN

h

nN

nhN

hH

N

n

N

m

N

n

mnN

2

1

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

)cos()()(2/)1(

0

nnaHN

n

)2

1()0(

N

ha

2

1,,2,1 ),

2

1(2)(

Nnn

Nhna

The middle sample

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Type 2: symmetric impulse response, N is even

])2

1cos[()()(

1

0

nN

nhHN

n

)]2

1(cos[)()(

2/

1

nnbHN

n

2,,2,1 ),

2(2)(

Nnn

Nhnb

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Type 3: antisymmetric impulse response, N is odd

])2

1sin[()()(

1

0

nN

nhHN

n

)sin()()(2/)1(

1

nncHN

n

2

1,,2,1 ),

2

1(2)(

Nnn

Nhnc

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Type 4: antisymmetric impulse response, N is even

])2

1sin[()()(

1

0

nN

nhHN

n

)]2

1(sin[)()(

2/

1

nndHN

n

2,,2,1 ),

2(2)(

Nnn

Nhnd

Copyright © 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Zero locations of linear-phase FIR filters

)()( 1)1( zHzzH N

If has a zero at)(zH jrezz 1

Then for linear phase there must be a zero at

jerz

z 11

1

For a real-valued filter, there must be zeros at

jrezz 1je

rzz

11

1

return

Copyright © 2005. Shi Ping CUC

Window Design Techniques

Basic window design idea

Choose a proper ideal frequency-selective filter (which always has a noncausal, infinite-length impulse response);

Then truncate (window) its impulse response to obtain a linear-phase and causal FIR filter.

The emphasis is on

Selecting an appropriate ideal filter;

Selecting an appropriate windowing function.

Copyright © 2005. Shi Ping CUC

Window Design Techniques

Denote an ideal frequency-selective filter by )( jd eH

|| ,0

|| ,1)(

c

cj

jd

eeH

)(

)](sin[21

)()( 1

nn

deeeHFnhc

ccnjjjdd

c

c

)()( nRnw N

Copyright © 2005. Shi Ping CUC

21

otherwise ,0

10 ),()()()(

N

Nnnhnwnhnh d

d

otherwise ,0

10 ,)

21

(

)2

1(sin

)( NnN

n

Nn

nhc

cc

Windowing

Copyright © 2005. Shi Ping CUC

The effect of Window function

deWeHeH jjd

j )()(21

)( )(

)2

1()

21

(1

0

)()

2sin(

)2

sin()(

N

j

R

NjN

n

njjR eW

N

eeeW

1

0

)()(N

n

njj enweW

)2

sin(

)2

sin()(

N

WR

Copyright © 2005. Shi Ping CUC

)

21

()()(

N

j

dj

d eHeH

|| ,0

|| ,1)(

c

cdH

)2

1()

21

(

))(2

1()

21

(

)()()(21

)()(21

)(

N

j

Rd

Nj

Nj

R

Nj

dj

eHdWHe

deWeHeH

dWHH Rd )()(

21

)(

Copyright © 2005. Shi Ping CUC

Window Design Techniques

The conclusion

The periodic convolution produces a smeared version of the ideal response )( j

d eH

Since the window has a finite length equal to N, its response has a peaky main lobe whose width is proportional to 1/N, and has side lobes of smaller heights.

)(nw

The main lobe produces a transition band in whose width is responsible for the transition width. This width is then proportional to 1/N. The wider the main lobe, the wider will be the transition width.

)( jeH

The side lobes produces ripples that have similar shapes in both the passband and stopband.

Copyright © 2005. Shi Ping CUC

Window Design Techniques

Windowing functions Rectangular window

)2

sin(

)2

sin()(

)()( ),()()

21

(

N

W

eWeWnRnw

R

Nj

Rj

RN

This is the simplest window function but provides the worst performance from the viewpoint of stopband attenuation. The width of main lobe is N/4

Copyright © 2005. Shi Ping CUC

Window Design Techniques

Gibbs phenomenon

The truncation of the infinite length will introduce ripples in frequency response . The oscillatory behavior near the band edge of the filter is called the Gibbs phenomenon.

)(H)(nhd

When the N is increased:The transition band of the filter will decreaseBut the relative amplitude of the peaky values will remain constant.

Copyright © 2005. Shi Ping CUC

Bartlett window

1

2

1 ,

1

22

2

10 ,

1

2

)(Nn

N

N

n

Nn

N

n

nw

)1 ,1( ,

2sin

4sin

2)(

)2

1(

2

NNNe

N

NeW

Nj

j

Since the Gibbs phenomenon results from the fact that the rectangular window has a sudden transition from 0 to 1 (or 1 to 0), Bartlett suggested a more gradual transition in the form of a triangular window. The width of main lobe is N/8

Copyright © 2005. Shi Ping CUC

Hanning window

This is a raised cosine window function given by:

)1(

)2

()2

(25.0)(5.0)(

N

NW

NWWW RRR

The width of main lobe is:N

8

)(1

2cos1

2

1)( nR

N

π nnw N

Copyright © 2005. Shi Ping CUC

Hamming window

)(1

2cos46.054.0)( nR

N

π nnw N

This is a modified version of the raised cosine window.

The width of main lobe is:N

8

)1(

)2

()2

(23.0)(54.0)(

N

NW

NWWW RRR

Copyright © 2005. Shi Ping CUC

Blackman window

)(1

4cos08.0

1

2cos5.042.0)( nR

N

π n

N

π nnw N

This is a 2-order raised cosine window.

The width of main lobe is:N

12

)1(

)4

()4

(04.0

)2

()2

(25.0)(42.0)(

N

NW

NW

NW

NWWW

RR

RRR

Copyright © 2005. Shi Ping CUC

Kaiser window

)()(

12

11

)(0

2

0

nRI

Nn

I

nw N

This is one of the most useful and optimum windows.

Where is the modified zero-order Bessel function, and is a parameter that can be chosen to yield various transition widths and stopband attenuation. This window can provide different transition widths for the same N.

)(0 I

window Blackman 5.8

window Hamming 44.5

windowr rectangula 0

Copyright © 2005. Shi Ping CUC

The design equations for Kaiser window

Given spsp AR , , ,

ps The norm transition width:

286.2

95.7sANThe filter order N:

dB21 0

dB5021dB )21(07886.0)21(5842.0

dB50 )7.8(1102.04.0

s

sss

ss

A

AAA

AA

Copyright © 2005. Shi Ping CUC

Summary of window function characteristics

Window name

Window function Filter

Peak value of side lobe

The width of main lobe

Transition width

Min. stopband attenuation

Rectangular -13 dB -21 dB

Bartlett -25 dB -25 dB

Hanning -31 dB -44 dB

Hamming -41 dB -53 dB

Blackman -57 dB -74 dB

N4

N8

N8

N8

N12

N8.1

N2.4

N2.6

N6.6

N11

Copyright © 2005. Shi Ping CUC

Window Design Techniques

Design procedure

Given the ideal frequency response )( jd eH

Compute the impulse response of ideal filter)(nhd

Determine the window shape and N from the minimum stopband attenuation and the transition width

ps sA

Compute the impulse response of the designed filter)()()( nwnhnh d

Compute the frequency response of the designed filter and verify the performance

)( jeH

Copyright © 2005. Shi Ping CUC

Window Design Techniques

Examples of FIR linear-phase filter design

Digital FIR lowpass filter

Design a digital FIR lowpass filter:

dB 50

sec)/rad(1032

sec)/rad(105.12

sec)/rad(105.12

3

3

4

s

s

p

sample

A

Example

Copyright © 2005. Shi Ping CUC

Solution:

Compute the digital frequencies

2.0 ,3.02

4.02

,2.02

pssp

c

sample

ss

sample

pp

Derive the frequency response of ideal FIR lowpass filter

||3.0 ,0

3.0|| ,

|| ,0

|| ,)(

j

c

cj

jd

eeeH

Copyright © 2005. Shi Ping CUC

Compute the impulse response of the ideal filter

Determine the window shape and N

)(

)](3.0sin[

)(

)](sin[

2

1)(

n

n

n

ndeenh

c

ccnjjd

c

c

dB 50sA

162

1 ,33 ,2.0

6.6

NN

N

Hamming

Copyright © 2005. Shi Ping CUC

Compute the impulse response of the designed filter

)(16

cos46.054.0

)(1

2cos46.054.0)(

33 nRπ n

nRN

π nnw N

)16(

)]16(3.0sin[)(

n

nnhd

)(16

cos46.054.0)16(

)]16(3.0sin[

)()()(

33 nRπ n

n

n

nwnhnh d

Copyright © 2005. Shi Ping CUC

Compute the frequency response of the designed filter

)]([DTFT)( nheH j

Verify the performance of the designed filter

dB 46

dB 073.0

s

p

A

R

It is not satisfied by this design

Let N = 34 and redesign

dB 52

dB 048.0

s

p

A

R

Copyright © 2005. Shi Ping CUC

Window Design Techniques

Digital FIR highpass filter

An ideal FIR highpass filter can be obtained from two ideal FIR lowpass filters, provided they have the same phase response.

0

0 c

0 c

Copyright © 2005. Shi Ping CUC

The frequency response of an ideal FIR highpass filters

c

cj

jd

eeH

|| ,0

|| ,)(

The impulse response of an ideal FIR highpass filters

)(

)](sin[

)(

)](sin[2

1

)(2

1)(

)( )(

n

n

n

n

dede

deeHnh

c

njnj

njjd

c

c

Copyright © 2005. Shi Ping CUC

Example

Design a digital FIR highpass filter :dB 5.0 ,6.0

dB 60 ,4.0

pp

ss

R

A

Solution:

Compute the digital frequencies

2.0 ,5.02

6.0 ,4.0

spsp

c

ps

Copyright © 2005. Shi Ping CUC

Derive the impulse response of ideal FIR highpass filter

)27(

)]27(5.0sin[

)27(

)]27(sin[

)(

)](sin[

)(

)](sin[)(

n

n

n

n

n

n

n

nnh c

d

Determine the window shape and N

272

155 ,55 ,2.0

11

N

N

dB 60sA Blackman

Note: the N must be odd for FIR highpass filters

Copyright © 2005. Shi Ping CUC

Compute the impulse response of the designed filter

)()()( nwnhnh d

)(54

4cos08.0

54

2cos5.042.0

)(1

4cos08.0

1

2cos5.042.0)(

55 nRπ nπ n

nRN

π n

N

π nnw N

Copyright © 2005. Shi Ping CUC

Compute the frequency response of the designed filter

)]([DTFT)( nheH j

Verify the performance of the designed filter

dB 71

dB 0039.0

s

p

A

R

It is satisfied by this design

Copyright © 2005. Shi Ping CUC

Window Design Techniques

Digital FIR bandpass filter

An ideal FIR bandpass filter can be obtained from two ideal FIR lowpass filters, provided they have the same phase response.

0 1c 2c

0 1c

0 2c

Copyright © 2005. Shi Ping CUC

The frequency response of an ideal FIR bandpass filters

otherwise ,0

|| ,)( 21 cc

jj

d

eeH

The impulse response of an ideal FIR highpass filters

)(

)](sin[

)(

)](sin[2

1

)(2

1)(

12

)( )(

2

1

1

2

n

n

n

n

dede

deeHnh

cc

njnj

njjd

c

c

c

c

Copyright © 2005. Shi Ping CUC

Example

Design a digital FIR bandpass filter :

dB 1 ,35.0

dB 60 ,2.0

11

11

pp

ss

R

A

Solution:

Compute the digital frequencies

15.0)](),min[(

725.02

,275.02

2211

222

111

pssp

spc

spc

dB 60 ,8.0

dB 1 ,65.0

22

22

ss

pp

A

R

Copyright © 2005. Shi Ping CUC

Derive the impulse response of ideal FIR bandpass filter

)5.36(

)]5.36(275.0sin[

)5.36(

)]5.36(725.0sin[

)(

)](sin[

)(

)](sin[)( 12

n

n

n

n

n

n

n

nnh cc

d

Determine the window shape and N

5.362

174 ,74 ,15.0

11

N

N

dB 60sA Blackman

Copyright © 2005. Shi Ping CUC

Compute the impulse response of the designed filter

)()()( nwnhnh d

)(73

4cos08.0

73

2cos5.042.0

)(1

4cos08.0

1

2cos5.042.0)(

74 nRπ nπ n

nRN

π n

N

π nnw N

Copyright © 2005. Shi Ping CUC

Compute the frequency response of the designed filter

)]([DTFT)( nheH j

Verify the performance of the designed filter

dB 73 dB, 73

dB 003.0 dB, 003.0

21

21

ss

pp

AA

RR

It is satisfied by this design

Copyright © 2005. Shi Ping CUC

Digital FIR bandstop filter

An ideal FIR bandstop filter can be obtained from three ideal FIR lowpass filters, provided they have the same phase response.

0 1c 2c

0 1c

0 2c

0

Copyright © 2005. Shi Ping CUC

The frequency response of an ideal FIR bandpass filters

otherwise ,0

|| ,|| 0 ,)( 21

cc

jj

d

eeH

The impulse response of an ideal FIR highpass filters

)(

)](sin[

)(

)](sin[

)(

)](sin[2

1

)(2

1)(

12

)( )( )(

2

1

1

2

n

n

n

n

n

n

dedede

deeHnh

cc

njnjnj

njjd

c

c

c

c

Copyright © 2005. Shi Ping CUC

Example

Design a digital FIR bandstop filter :

dB 40 ,4.0

dB 5.0 ,3.0

11

11

ss

pp

A

R

Solution:

Compute the digital frequencies

1.0)](),min[(

65.02

,35.02

2211

222

111

spps

spc

spc

dB 5.0 ,7.0

dB 40 ,6.0

22

22

pp

ss

R

A

Copyright © 2005. Shi Ping CUC

Derive the impulse response of ideal FIR bandstop filter

Determine the window shape and N

312

163 63 ,62 ,1.0

2.6

NN

N

dB 40sA Hanning

)(

)](35.0sin[

)(

)](65.0sin[

)(

)](sin[

)(

)](sin[

)(

)](sin[

)(

)](sin[)( 12

n

n

n

n

n

n

n

n

n

n

n

nnh cc

d

Note: the N must be odd for FIR bandstop filters

Copyright © 2005. Shi Ping CUC

Compute the impulse response of the designed filter

)()()( nwnhnh d

)(61

2cos1

2

1

)(1

2cos1

2

1)(

63 nRπ n

nRN

π nnw N

Copyright © 2005. Shi Ping CUC

Compute the frequency response of the designed filter

)]([DTFT)( nheH j

Verify the performance of the designed filter

dB 44 dB, 44

dB 0884.0 dB, 0884.0

21

21

ss

pp

AA

RR

It is satisfied by this design

return

Copyright © 2005. Shi Ping CUC

0 2/3 1

-1

0

3

Magnitude Response

Frequency in pi units

0 2/3 1

-2/3

0

1/3

Piecewise Phase Response

Frequency in pi units

an

gle

in p

i un

its

0 2/3 1

-1

0

3

Amplitude Response

Frequency in pi units

0 2/3 1

-2/3

0

1/3

Phase Response

Frequency in pi units

an

gle

in p

i un

its

return

Copyright © 2005. Shi Ping CUC

0 0.5 1 1.5 2-10

-8

-6

-4

-2

0phase Response

Frequency in pi units0 1 2 3 4 5 6 7 8 9 10

0

1

2

3

4

5

6

h(n), N is odd

n

0 1 2 3 4 5 6 7 8 90

1

2

3

4

5

6

h(n), N is even

n

10N

return

2

1

)(

N

)1()( nNhnh

Copyright © 2005. Shi Ping CUC

0 0.5 1 1.5 2

-8

-6

-4

-2

00.5

Phase Response

Frequency in pi units0 1 2 3 4 5 6 7 8 9 10

0

h(n), N is odd

n

0 1 2 3 4 5 6 7 8 9

0

h(n), N is even

n

10N

return

2 ,

2

1

)(

N

)1()( nNhnh

Copyright © 2005. Shi Ping CUC

0 5 10

-5

0

5

10

n

h(n

)

Type-1 Impulse Response

0 0.5 1 1.5 2-20

-10

0

10

20

frequency in pi units

H(w

)

Type-1 Amplitude Response

-1 0 1

-1

-0.5

0

0.5

1

Real Part

Ima

gin

ary

Pa

rt

Type-1 Pole-Zero Plot

10

return

2 , ,0 偶对称

Copyright © 2005. Shi Ping CUC

0 5 10

-5

0

5

10

n

h(n

)

Type-2 Impulse Response

0 0.5 1 1.5 2-40

-20

0

20

40

frequency in pi units

H(w

)

Type-2 Amplitude Response

-1 0 1

-1

-0.5

0

0.5

1

Real Part

Ima

gin

ary

Pa

rt

Type-2 Pole-Zero Plot

11

return

奇对称

0|)( H

不能用来设计高通、带阻滤波器

Copyright © 2005. Shi Ping CUC

0 5 10

-5

0

5

10

n

h(n

)

Type-3 Impulse Response

0 0.5 1 1.5 2-40

-20

0

20

40

frequency in pi units

H(w

)

Type-3 Amplitude Response

-1 0 1

-1

-0.5

0

0.5

1

Real Part

Ima

gin

ary

Pa

rt

Type-3 Pole-Zero Plot

10

return

2 , ,0 奇对称0|)( 2,,0 H

不能用来设计低通、高通、带阻滤波器

Copyright © 2005. Shi Ping CUC

0 5 10

-5

0

5

10

n

h(n

)

Type-4 Impulse Response

0 0.5 1 1.5 2-10

0

10

20

30

frequency in pi units

H(w

)

Type-4 Amplitude Response

-1 0 1

-1

-0.5

0

0.5

1

Real Part

Ima

gin

ary

Pa

rt

Type-4 Pole-Zero Plot

11

return

2 , ,0 偶对称0|)( 0H

不能用来设计低通滤波器

Copyright © 2005. Shi Ping CUC

jIm[z]

Re[z]0

return

Quadruplet

Copyright © 2005. Shi Ping CUC

-10 -5 0 5 10 15 20 25 30-0.05

0

0.05

0.1

0.15

0.2

)(nhd

return

)()( nRnw N

Copyright © 2005. Shi Ping CUC

-10 -5 0 5 10 15 20 25 30-0.05

0

0.05

0.1

0.15

0.2

)(nhd

)()( nRnw N

return

Copyright © 2005. Shi Ping CUC

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-5

0

5

10

15

20

)2

sin(

)2

sin()(

N

WR

20N

return

N2

N2

Copyright © 2005. Shi Ping CUC

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-5

0

5

10

15

20

frequency in pi units

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

0

500

1000

1500

2000

frequency in pi units

)(RW

)(H

return

20N)(dH 5.0c

Copyright © 2005. Shi Ping CUC

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-5

0

5

10

15

20

frequency in pi units

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

0

500

1000

1500

2000

frequency in pi units

)(RW

)(H

5.0 ,20 cN

Copyright © 2005. Shi Ping CUC

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

0

500

1000

1500

2000

Amplitude response

frequency in pi units

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

0

500

1000

1500

2000

Magnitude response

frequency in pi units

)(H

)( jeH

return

ps

ps

Copyright © 2005. Shi Ping CUC

0 5 10 15 20 250

0.2

0.4

0.6

0.8

1

Rectangular window: N=25

n-1 -0.5 0 0.5 10

5

10

15

20

25

Magnitude response

frequency in pi units

-1 -0.5 0 0.5 1

0

10

20

Amplitude response

frequency in pi units-1 -0.5 0 0.5 1

0

500

1000

1500

2000

Amplitude response of filter: wc=0.5pi

frequency in pi units

N4

N4

Copyright © 2005. Shi Ping CUC

0 5 10 15 20 250

0.2

0.4

0.6

0.8

1

Rectangular window: N=25

n-1 -0.5 0 0.5 1

-40

-30

-20

-10

0

Magnitude response

frequency in pi units

dB

-1 -0.5 0 0.5 1

0

10

20

Amplitude response

frequency in pi units-1 -0.5 0 0.5 1

-50

-40

-30

-20

-10

0

Magnitude response of filter: wc=0.5pi

frequency in pi units

dB

return

N

8.1

Copyright © 2005. Shi Ping CUC

-1 -0.5 0 0.5 1

0

500

1000

1500

2000

N = 7

frequency in pi units-1 -0.5 0 0.5 1

0

500

1000

1500

2000

N = 21

frequency in pi units

-1 -0.5 0 0.5 1

0

500

1000

1500

2000

N = 51

frequency in pi units-1 -0.5 0 0.5 1

0

500

1000

1500

2000

N = 101

frequency in pi units

Gibbs

Copyright © 2005. Shi Ping CUC

Copyright © 2005. Shi Ping CUCreturn

(a) (b)

Copyright © 2005. Shi Ping CUC

0 10 20 300

0.2

0.4

0.6

0.8

1

Triangular window: N=35

n-1 -0.5 0 0.5 1

-60

-40

-20

0

Magnitude response

frequency in pi units

dB

-1 -0.5 0 0.5 1

0

5

10

15

20Amplitude response

frequency in pi units-1 -0.5 0 0.5 1

-40

-30

-20

-10

0

Magnitude response of filter: wc=0.5pi

frequency in pi units

dB

return

N

8 N

2.4

Copyright © 2005. Shi Ping CUC

0 10 20 300

0.2

0.4

0.6

0.8

1

Hanning window: N=35

n-1 -0.5 0 0.5 1

-60

-40

-20

0

Magnitude response

frequency in pi units

dB

-1 -0.5 0 0.5 10

5

10

15

Amplitude response

frequency in pi units-1 -0.5 0 0.5 1

-60

-40

-20

0

Magnitude response of filter: wc=0.5pi

frequency in pi units

dB

return

N

8 N

2.6

Copyright © 2005. Shi Ping CUC

0 10 20 300

0.2

0.4

0.6

0.8

1

Hamming window: N=35

n-1 -0.5 0 0.5 1

-60

-40

-20

0

Magnitude response

frequency in pi units

dB

-1 -0.5 0 0.5 10

5

10

15

20Amplitude response

frequency in pi units-1 -0.5 0 0.5 1

-60

-40

-20

0

Magnitude response of filter: wc=0.5pi

frequency in pi units

dB

return

N

8 N

6.6

Copyright © 2005. Shi Ping CUC

0 10 20 300

0.2

0.4

0.6

0.8

1

Blackman window: N=35

n-1 -0.5 0 0.5 1

-80

-60

-40

-20

0

Magnitude response

frequency in pi units

dB

-1 -0.5 0 0.5 1

0

5

10

15

Amplitude response

frequency in pi units-1 -0.5 0 0.5 1

-80

-60

-40

-20

0

Magnitude response of filter: wc=0.5pi

frequency in pi units

dB

return

N

12N

11

Copyright © 2005. Shi Ping CUC

-10 0 100

0.2

0.4

0.6

0.8

1

Kaiser window: N=35,beta=7.865

n-1 -0.5 0 0.5 1

-100

-80

-60

-40

-20

0

Magnitude response

frequency in pi units

dB

-1 -0.5 0 0.5 1

0

5

10

15

20Amplitude response

frequency in pi units-1 -0.5 0 0.5 1

-100

-80

-60

-40

-20

0

Magnitude response of filter: wc=0.5pi

frequency in pi units

dB N

10

Copyright © 2005. Shi Ping CUC

-10 0 100

0.2

0.4

0.6

0.8

1

Kaiser window: N=35,beta=9.5

n-1 -0.5 0 0.5 1

-100

-80

-60

-40

-20

0

Magnitude response

frequency in pi units

dB

-1 -0.5 0 0.5 1

0

5

10

15

20Amplitude response

frequency in pi units-1 -0.5 0 0.5 1

-100

-80

-60

-40

-20

0

Magnitude response of filter: wc=0.5pi

frequency in pi units

dB

return

Copyright © 2005. Shi Ping CUC

0 5 10 15 20 25 30

0

0.1

0.2

0.3

Ideal Impulse Response

n 0 5 10 15 20 25 300

0.2

0.4

0.6

0.8

1

Hamming Window

n

0 5 10 15 20 25 30

0

0.1

0.2

0.3

Actual Impulse Response

n 0 0.2 0.4 0.6 0.8 1-100

-80

-60

-40

-20

0Magnitude Response in dB

pi

dB

33N

return

Copyright © 2005. Shi Ping CUC

0 5 10 15 20 25 30

0

0.1

0.2

0.3

Ideal Impulse Response

n 0 5 10 15 20 25 300

0.2

0.4

0.6

0.8

1

Hamming Window

n

0 5 10 15 20 25 30

0

0.1

0.2

0.3

Actual Impulse Response

n 0 0.2 0.4 0.6 0.8 1-100

-80

-60

-40

-20

0Magnitude Response in dB

pi

dB

34N

return

Copyright © 2005. Shi Ping CUC

0 10 20 30 40 50-0.4

-0.2

0

0.2

0.4

0.6Ideal Impulse Response

n 0 10 20 30 40 500

0.2

0.4

0.6

0.8

1

Blackman Window

n

0 10 20 30 40 50-0.4

-0.2

0

0.2

0.4

0.6Actual Impulse Response

n 0 0.2 0.4 0.6 0.8 1-120

-100

-80

-60

-40

-20

0Magnitude Response in dB

pi

dB

55N

return

Copyright © 2005. Shi Ping CUCreturn

1s 1p 2p 2s

pR

sA

0 2.0)(

35.0 65.0 8.0

dB 60

dB 1

1

Copyright © 2005. Shi Ping CUC

0 20 40 60

-0.2

-0.1

0

0.1

0.2

0.3

Ideal Impulse Response

n 0 20 40 600

0.2

0.4

0.6

0.8

1

Blackman Window

n

0 10 20 30 40 50 60 70

-0.2

-0.1

0

0.1

0.2

0.3

Actual Impulse Response

n 0 0.2 0.4 0.6 0.8 1

-100

-80

-60

-40

-20

0Magnitude Response in dB

pi

dB

74N

return

Copyright © 2005. Shi Ping CUCreturn

1s1p 2p2s

pR

sA

0 3.0)(

4.0 6.0 7.0

dB 40

dB .50

1

Copyright © 2005. Shi Ping CUC

0 10 20 30 40 50 60-0.2

0

0.2

0.4

0.6

0.8Ideal Impulse Response

n 0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1

Hanning Window

n

0 10 20 30 40 50 60-0.2

0

0.2

0.4

0.6

0.8Actual Impulse Response

n 0 0.2 0.4 0.6 0.8 1-70

-60

-50

-40

-30

-20

-10

0Magnitude Response in dB

pi

dB

63N

return

Recommended