Sei sulla pagina 1di 91

Chapter 8

FIR 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

Introduction
The basic technique of FIR filter design

Window design techniques;

Frequency sampling design techniques;

Optimal equiripple design techniques.

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

H (z)

N 1

n
h
(
n
)
z

n 0

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

H ( e j )

M 1

j n
h
(
n
)
e

n0

H (e j ) e j ( ) H ( )e j ( )
H ( e j )

Magnitude response function

H ( ) Amplitude response function


Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

The difference between H (e j ) and H ( )

H ( e j ) is always positive and the associated phase


response is a discontinuous function.

H ( ) may be both positive and negative and the

associated phase response is a continuous


function.

Consider the following example:

h(0) 1, h(1) 1, h( 2) 1
Copyright 2005. Shi Ping CUC

H (e ) h( n)e
j

j n

n0

1 e j e j 2 (1 2 cos )e j
j

H (e ) 1 2 cos , 0
0 2 / 3
( )
2 / 3
H ( ) 1 2 cos
( )

Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters


Linear-phase conditions
N 1

For

H ( z ) h( n) z n
n0

H (e ) H ( )e
( )
( )
d ( )

d

j ( )

A constant group delay


Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

For ( )

The phase response is through the origin.

h( n) h( N 1 n)

For ( )

The phase response is not through the origin.

h( n) h( N 1 n)

Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters


Frequency response of linear-phase FIR filters
N 1

H ( z ) h( n) z
n0

N 1

[ h( m )]z

N 1

[ h( N 1 n)]z
n0

( N 1 m )

( N 1 )

m 0

H (z) z

N 1

h(m )z

m 0

( N 1 )

H (z )
Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

H (z) z

( N 1 )

H (z )

1
H ( z ) [ H ( z ) z ( N 1) H ( z 1 )]
2
1 N 1
n
( N 1 ) n
h( n)[ z z
z ]
2 n0
z

N 1 N 1
)
2

h(n)[
n0

N 1
n)
2

z
2

N 1
n)
2

Copyright 2005. Shi Ping CUC

Symmetric impulse response

h( n) h( N 1 n)

H ( e j ) H ( z ) z e j
e

j(

N 1
) N 1
2

h(n)[
n0

j(

j(

N 1
1 )
2

e
2

j(

N 1
1 )
2

N 1
) N 1
2

N 1
h( n) cos[(
n) ]

2
n0

N 1
H ( ) h( n) cos[(
n) ]
2
n0
N 1

N 1
( ) (
)
2

N 1

Copyright 2005. Shi Ping CUC

Antisymmetric impulse response h( n) h( N 1 n)

H ( e j ) H ( z ) z e j
e

j(

N 1
) N 1
2

h(n)[

j(

N 1
1 )
2

n0

j(

e
2

j(

N 1
1 )
2

N 1

) j N 1
2
2

N 1
h( n) sin[(
n) ]

2
n0

N 1
H ( ) h( n) sin[(
n) ]
2
n0
N 1

N 1

( ) (
)
2
2

N 1

Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters


The properties of amplitude function H ( )

Type 1: symmetric impulse response, N is odd

N 1
H ( ) h( n) cos[(
n) ]
2
n0
N 1

N 1 ( N 3) / 2
N 1
H ( ) h(
) 2h( n) cos[(
n) ]
2
2
n0
N 1 ( N 1 ) / 2
N 1
h(
) 2h(
m ) cos( m )
2
2
m 1
N 1
( N 1 ) / 2
n m
a ( n) cos(n)
2
n0

Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters


H ( )

( N 1 ) / 2

a(n) cos(n)
n0

N 1
a ( 0) h(
)
2

The middle sample

N 1
N 1
a ( n) 2h(
n), n 1,2, ,
2
2

Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Type 2: symmetric impulse response, N is even

N 1
H ( ) h( n) cos[(
n) ]
2
n0
N 1

N /2

1
H ( ) b( n) cos[ ( n )]
2
n 1
N
N
b( n) 2h( n), n 1,2, ,
2
2
Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Type 3: antisymmetric impulse response, N is odd

N 1
H ( ) h( n) sin[(
n) ]
2
n0
N 1

H ( )

( N 1 ) / 2

c( n) sin(n)
n 1

N 1
N 1
c( n) 2h(
n), n 1,2, ,
2
2
Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters

Type 4: antisymmetric impulse response, N is even

N 1
H ( ) h( n) sin[(
n) ]
2
n0
N 1

N /2

1
H ( ) d ( n) sin[ ( n )]
2
n 1
N
N
d ( n) 2h( n), n 1,2, ,
2
2
Copyright 2005. Shi Ping CUC

Properties of Linear-Phase FIR Filters


Zero locations of linear-phase FIR filters

H (z) z

( N 1 )

H (z )

If H (z ) has a zero at z z1 re j
Then for linear phase there must be a zero at

1 1 j
z e
z1 r
For a real-valued filter, there must be zeros at

z z1 re j

1 1 j
z e
z1 r
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 H d (e j )
j

e
, | | c
j
H d (e )
0, c | |

hd ( n) F

1
H d (e )
2
j

j n

c sin[ c ( n )]
d
c (n )

w ( n ) RN ( n )
Copyright 2005. Shi Ping CUC

Windowing

hd ( n), 0 n N 1
h( n) hd ( n)w ( n)
otherwise
0,
N 1

N 1
sin c ( n 2 )

, 0 n N 1
c
h( n)
N 1
c (n
)

0,
otherwise

Copyright 2005. Shi Ping CUC

The effect of Window function

1
H (e )
2
j

H d (e j )W (e j ( ) )d
N 1

W (e ) w ( n)e
j

j n

n0

N
N 1
N 1
sin(
)

(
)
j
j n
2
2
W R (e ) e
e
W R ( )e

n0
sin( )
2
N
sin(
)
2
W R ( )

sin( )
2
N 1
j (
)
2

Copyright 2005. Shi Ping CUC

H d (e ) H d ( )e

j(

N 1
)
2

| | c
1,
H d ( )
0, c | |
1
j
H (e )
2
e

j(

N 1
)
2

( )e

1
H ( )
2

j(

N 1
)
2

W R ( )e

j(

N 1
)( )
2

( )W R ( )d H ( )e

j(

N 1
)
2

( )W R ( )d
Copyright 2005. Shi Ping CUC

Window Design Techniques

The conclusion

Since the window w (n) 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.

The periodic convolution produces a smeared version of


the ideal response H d (e j )
j
The main lobe produces a transition band in H (e )
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.

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

This is the simplest window function but provides the


worst performance from the viewpoint of stopband
attenuation. The width of main lobe is 4 / N

w ( n) RN ( n),

W R (e j ) W R ( )e

j (

N 1
)
2

N
sin(
)
2
W R ( )

sin( )
2
Copyright 2005. Shi Ping CUC

Window Design Techniques

Gibbs phenomenon

The truncation of the infinite length hd (n) will


introduce ripples in frequency response H ( ) .
The oscillatory behavior near the band edge of
the filter is called the Gibbs phenomenon.
When the N is increased:
The transition band of the filter will decrease
But the relative amplitude of the peaky values will
remain constant.

Copyright 2005. Shi Ping CUC

Bartlett window
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 8 / N

w ( n)

2
W ( e j )
N

2n
N 1
, 0n
N 1
2
2n
N 1
2
,
n N 1
N 1
2

N
sin

4

sin
2

j(

N 1
)
2

, ( N 1, N 1 N )

Copyright 2005. Shi Ping CUC

Hanning window
This is a raised cosine window function given by:

1
2 n
w ( n) 1 cos
RN ( n )
2
N 1

2
2
W ( ) 0.5W R ( ) 0.25 W R (
) W R (
)
N
N

( N 1)

The width of main lobe is:

8
N
Copyright 2005. Shi Ping CUC

Hamming window
This is a modified version of the raised cosine window.

2 n
w ( n) 0.54 0.46 cos
RN ( n )
N 1

2
2
W ( ) 0.54W R ( ) 0.23 W R (
) W R (
)
N
N

( N 1)

The width of main lobe is:

8
N
Copyright 2005. Shi Ping CUC

Blackman window
This is a 2-order raised cosine window.

2 n
4 n
w ( n) 0.42 0.5 cos
0.08 cos
RN ( n)
N 1
N 1

2
2
W ( ) 0.42W R ( ) 0.25 W R (
) W R (
)
N
N

4
4

0.04 W R (
) W R (
)
N
N

( N 1)
12
The width of main lobe is:
N

Copyright 2005. Shi Ping CUC

Kaiser window
This is one of the most useful and optimum windows.

2
n

I0 1 1

N 1

R ( n)
w ( n)
N
I0 ( )
2

Where I 0 () 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 rectangular window
5.44 Hamming window
8.5 Blackman window
Copyright 2005. Shi Ping CUC

The design equations for Kaiser window


Given p , s , R p , As
The norm transition width:
The filter order N:

s p

As 7.95
N
2.286

0.1102 ( As 8.7)
As 50dB
0.5842( As 21)0.4 0.07886( As 21) 21dB As 50dB
0
As 21dB

Copyright 2005. Shi Ping CUC

Summary of window function characteristics


Window function

Window
name

Peak value The width of


of side lobe
main lobe

Rectangular

-13 dB

Bartlett

-25 dB

Hanning

-31 dB

Hamming

-41 dB

Blackman

-57 dB

12

Filter
Transition
width

1.8

4.2

6.2

6.6

11

N
N
N
N
N

Min.
stopband
attenuation
-21 dB
-25 dB
-44 dB
-53 dB
-74 dB
Copyright 2005. Shi Ping CUC

Window Design Techniques


Design procedure

Given the ideal frequency response H d (e j )

Compute the impulse response hd (n) of ideal filter

Determine the window shape and N from the


minimum stopband attenuation As and the transition
width s p

Compute the impulse response of the designed filter


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

Compute the frequency response H (e j ) of the


designed filter and verify the performance
Copyright 2005. Shi Ping CUC

Window Design Techniques


Examples of FIR linear-phase filter design

Digital FIR lowpass filter

Example
Design a digital FIR lowpass filter:

sample 2 1.5 104 (rad / sec)


p 2 1.5 10 3 (rad / sec)
s 2 3 10 3 (rad / sec)
As 50 dB
Copyright 2005. Shi Ping CUC

Solution:

Compute the digital frequencies

2 p
sample

0.2 ,

2 s
s
0.4
sample

p s
c
0.3 , s p 0.2
2

Derive the frequency response of ideal FIR lowpass filter

j
j

e
,
|

e
, | | 0.3
j
c
H d (e )

0, c | | 0, 0.3 | |

Copyright 2005. Shi Ping CUC

Compute the impulse response of the ideal filter

1
hd ( n)
2

j n

c sin[ c ( n )]
d
c (n )

sin[0.3 ( n )]

(n )

Determine the window shape and N

As 50 dB

Hamming

6.6

0.2 , N 33,
N

N 1

16
2
Copyright 2005. Shi Ping CUC

Compute the impulse response of the designed filter

2 n
w ( n) 0.54 0.46 cos
RN ( n )
N 1

n
0.54 0.46 cos
R33 ( n)
16

sin[0.3 ( n 16)]
hd ( n)
( n 16)
h( n) hd ( n)w ( n)
sin[0.3 ( n 16)]
n

0.54 0.46 cos


R33 ( n)
( n 16)
16

Copyright 2005. Shi Ping CUC

Compute the frequency response of the designed filter

H (e j ) DTFT[h( n)]

Verify the performance of the designed filter

R p 0.073 dB
As 46 dB

It is not satisfied by this design

Let N = 34 and redesign

R p 0.048 dB
As 52 dB
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.

Copyright 2005. Shi Ping CUC

The frequency response of an ideal FIR highpass filters


j

e
, c | |
j
H d (e )
| | c
0,

The impulse response of an ideal FIR highpass filters

1
j
j n
hd ( n)
H
(
e
)
e
d

1 c j ( n )
j ( n )

e
d

e
d

2
sin[ ( n )] sin[ c ( n )]

(n )
(n )
Copyright 2005. Shi Ping CUC

Example

s 0.4 , As 60 dB
Design a digital FIR highpass filter :
p 0.6 , R p 0.5 dB
Solution:

Compute the digital frequencies

s 0.4 , p 0.6
p s
c
0.5 , p s 0.2
2

Copyright 2005. Shi Ping CUC

Determine the window shape and N

As 60 dB

Blackman

11

0.2 , N 55,
N

55 1

27
2

Note: the N must be odd for FIR highpass filters

Derive the impulse response of ideal FIR highpass filter

sin[ ( n )] sin[ c ( n )]
hd ( n)

(n )
(n )
sin[ ( n 27 )] sin[0.5 ( n 27 )]

( n 27)
( n 27 )
Copyright 2005. Shi Ping CUC

Compute the impulse response of the designed filter

2 n
4 n
w ( n) 0.42 0.5 cos
0.08 cos

N 1
N 1

2 n
4 n
0.42 0.5 cos
0.08 cos

54
54

RN ( n)

R55 ( n)

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

Copyright 2005. Shi Ping CUC

Compute the frequency response of the designed filter

H (e j ) DTFT[h( n)]

Verify the performance of the designed filter

R p 0.0039 dB
As 71 dB

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.

c2

c1

c1

c2

Copyright 2005. Shi Ping CUC

The frequency response of an ideal FIR bandpass filters


j

e
, c 1 | | c 2
j
H d (e )
otherwise
0,

The impulse response of an ideal FIR highpass filters

1
j
j n
hd ( n)
H (e )e d

2
c 2
1 c 1 j ( n )
j ( n )

e
d

e
d

c1

2 c 2
sin[ c 2 ( n )] sin[ c1 ( n )]

(n )
(n )
Copyright 2005. Shi Ping CUC

Example
Design a digital FIR bandpass
filter :

s1 0.2 , As1 60 dB
p1 0.35 , R p1 1 dB

p2

0.65 , R p 2 1 dB

s 2 0.8 , As 2 60 dB

Solution:

Compute the digital frequencies

p1 s 1
p2 s2
c1
0.275 , c 2
0.725
2
2
min[( p1 s1 ), ( s 2 p 2 )] 0.15
Copyright 2005. Shi Ping CUC

Determine the window shape and N

As 60 dB

Blackman

11

0.15 , N 74,
N

74 1

36.5
2

Derive the impulse response of ideal FIR bandpass filter

sin[ c 2 ( n )] sin[ c 1 ( n )]
hd ( n)

(n )
(n )
sin[0.725 ( n 36.5)] sin[0.275 ( n 36.5)]

( n 36.5)
( n 36.5)
Copyright 2005. Shi Ping CUC

Compute the impulse response of the designed filter

2 n
4 n
w ( n) 0.42 0.5 cos
0.08 cos
RN ( n)
N 1
N 1

2 n
4 n
0.42 0.5 cos
0.08 cos

73
73

R74 ( n)

h( n) hd ( n)w ( n)
Copyright 2005. Shi Ping CUC

Compute the frequency response of the designed filter

H (e j ) DTFT[h( n)]

Verify the performance of the designed filter

R p1 0.003 dB,

R p 2 0.003 dB

As1 73 dB,

As 2 73 dB

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.

c2

c1

c1

c2

Copyright 2005. Shi Ping CUC

The frequency response of an ideal FIR bandpass filters


j

e
, 0 | | c 1 , c 2 | |
j
H d (e )
otherwise
0,

The impulse response of an ideal FIR highpass filters

1
j
j n
hd ( n)
H (e )e d

2
c1

1 c 2 j ( n )
j ( n )
j ( n )

e
d

e
d

e
d

c 1
c 2

2
sin[ ( n )] sin[ c 2 ( n )] sin[ c 1 ( n )]

(n )
(n )
(n )
Copyright 2005. Shi Ping CUC

Example
Design a digital FIR bandstop filter :

p1 0.3 , R p1 0.5 dB
s1 0.4 , As1 40 dB

s 2 0.6 , As 2 40 dB
p 2 0.7 , R p 2 0.5 dB

Solution:

Compute the digital frequencies

p1 s 1
p2 s2
c1
0.35 , c 2
0.65
2
2
min[( s1 p1 ), ( p 2 s 2 )] 0.1
Copyright 2005. Shi Ping CUC

Determine the window shape and N

As 40 dB

Hanning

6.2
63 1


0.1 , N 62, N 63
31
N
2
Note: the N must be odd for FIR bandstop filters

Derive the impulse response of ideal FIR bandstop filter

sin[ ( n )] sin[ c 2 ( n )] sin[ c1 ( n )]


hd ( n)

(n )
(n )
(n )
sin[ ( n )] sin[0.65 ( n )] sin[0.35 ( n )]

(n )
(n )
(n )
Copyright 2005. Shi Ping CUC

Compute the impulse response of the designed filter

1
2 n
w ( n) 1 cos

2
N 1
1
2 n
1 cos

2
61

RN ( n)

R63 ( n)

h( n) hd ( n)w ( n)
Copyright 2005. Shi Ping CUC

Compute the frequency response of the designed filter

H (e j ) DTFT[h( n)]

Verify the performance of the designed filter

R p1 0.0884 dB,

R p 2 0.0884 dB

As1 44 dB,

As 2 44 dB

It is satisfied by this design

return

Copyright 2005. Shi Ping CUC

Magnitude Response

Amplitude Response

-1

-1
0

2/3
Frequency in pi units

Phase Response

angle in pi units

angle in pi units

Piecewise Phase Response

2/3
Frequency in pi units

1/3

1/3

-2/3
0

2/3
Frequency in pi units

-2/3
0

2/3
Frequency in pi units

return

Copyright 2005. Shi Ping CUC

h(n), N is odd

phase Response

-2

N 10

-4

5
4
3

-6

-8
-10

1
0

0.5
1
1.5
Frequency in pi units

( )
N 1

2
h( n) h( N 1 n)

0 1 2 3 4 5 6 7 8 9 10 n

h(n), N is even
6
5
4
3
2
1
0

0 1 2 3 4 5 6 7 8 9

return

Copyright 2005. Shi Ping CUC

Phase Response

0.5
0
-2

h(n), N is odd

N 10

-4

-6
-8
0

0.5
1
1.5
Frequency in pi units

( )
N 1

,
2
2

0 1 2 3 4 5 6 7 8 9 10 n

h(n), N is even

h( n) h( N 1 n)
0 1 2 3 4 5 6 7 8 9

return

Copyright 2005. Shi Ping CUC

Type-1 Impulse Response

20

10

10
H(w)

5
h(n)

Type-1 Amplitude Response

-10

-5
0

10 n

-20

0.5
1
1.5
frequency in pi units

Type-1 Pole-Zero Plot

Imaginary Part

0, , 2

0.5

10

-0.5
-1
-1

0
Real Part

return

Copyright 2005. Shi Ping CUC

Type-2 Impulse Response

40
20

H(w)

h(n)

10

-20

-5
0

10

Type-2 Pole-Zero Plot


1
Imaginary Part

Type-2 Amplitude Response

0.5

-40

0.5
1
1.5
frequency in pi units

H ( ) | 0

11

-0.5
-1
-1

0
Real Part

return

Copyright 2005. Shi Ping CUC

Type-3 Impulse Response

40

10

20
H(w)

5
h(n)

Type-3 Amplitude Response

-20

-5
0

10 n

-40

0.5
1
1.5
frequency in pi units

Type-3 Pole-Zero Plot

0, , 2

Imaginary Part

1
0.5

H ( ) | 0 , , 2 0

10

-0.5
-1
-1

0
Real Part

return

Copyright 2005. Shi Ping CUC

Type-4 Impulse Response

30
20

H(w)

h(n)

10

Type-4 Amplitude Response

10
0

-5
0

10

-10

0.5
1
1.5
frequency in pi units

Imaginary Part

Type-4 Pole-Zero Plot

0, , 2

1
0.5

H ( ) | 0 0

11

-0.5
-1
-1

0
Real Part

return

Copyright 2005. Shi Ping CUC

jIm[z]

Quadruplet

Re[z]

return

Copyright 2005. Shi Ping CUC

hd (n)
0.2

w ( n ) RN ( n )

0.15

0.1

0.05

-0.05
-10

-5

10

15

20

25

30

return

Copyright 2005. Shi Ping CUC

w ( n ) RN ( n )

hd (n)
0.2

0.15

0.1

0.05

-0.05
-10

-5

10

15

20

25

30

return

Copyright 2005. Shi Ping CUC

N
sin(
)
2
W R ( )

sin( )
2
N 20

20

15

10

2
N

-5
-1

-0.8

-0.6

-0.4

-0.2

0.2

0.4

0.6

0.8

return

Copyright 2005. Shi Ping CUC

W R ( )

H d ( )

N 20 c 0.5

20
15
10
5
0
-5
-1

H ( )

-0.8

-0.6

-0.4

-0.2
0
0.2
frequency in pi units

0.4

0.6

0.8

-0.8

-0.6

-0.4

-0.2
0
0.2
frequency in pi units

0.4

0.6

0.8

2000
1500
1000
500
0
-1

return

Copyright 2005. Shi Ping CUC

W R ( )

N 20,

c 0.5

20
15
10
5
0
-5
-1

H ( )

-0.8

-0.6

-0.4

-0.2
0
0.2
frequency in pi units

0.4

0.6

0.8

-0.8

-0.6

-0.4

-0.2
0
0.2
frequency in pi units

0.4

0.6

0.8

2000
1500
1000
500
0
-1

Copyright 2005. Shi Ping CUC

H ( )

Amplitude response

2000
1500
1000
500
0
-1

H ( e j )

-0.8

-0.6

-0.4

-0.2
0
0.2
frequency in pi units

0.4

0.6

0.8

Magnitude response

2000
1500

s p

1000

500
0
-1

-0.8

-0.6

-0.4

-0.2
0
0.2
frequency in pi units

0.4

0.6

0.8

return

Copyright 2005. Shi Ping CUC

Rectangular window: N=25

Magnitude response

25

0.8

20

0.6

15

0.4

10

0.2

10

15

20

25

Amplitude response
20
10

-0.5
0
0.5
frequency in pi units

Amplitude response of filter: wc=0.5pi


2000

4
N

1500
1000
500

0
-1

0
-1

4
N

0
-0.5
0
0.5
frequency in pi units

-1

-0.5
0
0.5
frequency in pi units

Copyright 2005. Shi Ping CUC

Rectangular window: N=25

Magnitude response

0.8

-10
dB

0.6

-20

0.4

-30

0.2
0

10

15

20

25

-40
-1

Amplitude response

-0.5
0
0.5
frequency in pi units

Magnitude response of filter: wc=0.5pi


0

20

-10
dB

-20

10

1.8
N

-30
0
-1

-40
-0.5
0
0.5
frequency in pi units

-50
-1

-0.5
0
0.5
frequency in pi units

return

Copyright 2005. Shi Ping CUC

N=7

Gibbs

N = 21

2000

2000

1500

1500

1000

1000

500

500

-1

-0.5
0
0.5
frequency in pi units

-1

N = 51
2000

1500

1500

1000

1000

500

500

0
-0.5
0
0.5
frequency in pi units

N = 101

2000

-1

-0.5
0
0.5
frequency in pi units

-1

-0.5
0
0.5
frequency in pi units

Copyright 2005. Shi Ping CUC

Copyright 2005. Shi Ping CUC

return

Copyright 2005. Shi Ping CUC

Triangular window: N=35

Magnitude response
0

1
0.8

-20

dB

0.6
0.4

-40

0.2
0

20

10

20

-60
-1

30

Amplitude response

0
-10
dB

8
N
-0.5
0
0.5
frequency in pi units

4.2
N

-20
-30

0
-1

Magnitude response of filter: wc=0.5pi

15
10

-0.5
0
0.5
frequency in pi units

-40
-1

-0.5
0
0.5
frequency in pi units

return

Copyright 2005. Shi Ping CUC

Hanning window: N=35

Magnitude response
0

1
0.8

-20

dB

0.6
0.4

-40

0.2
0

10

20

-60
-1

30

Amplitude response

-0.5
0
0.5
frequency in pi units

Magnitude response of filter: wc=0.5pi


0

15

5
0
-1

-20

8
N
-0.5
0
0.5
frequency in pi units

dB

10

6.2
N

-40

-60
-1

-0.5
0
0.5
frequency in pi units

return

Copyright 2005. Shi Ping CUC

Hamming window: N=35

Magnitude response
0

1
0.8

-20

dB

0.6
0.4

-40

0.2
0

20

10

20

-60
-1

30

Amplitude response

5
0
-1

Magnitude response of filter: wc=0.5pi


0

15
-20

8
N
-0.5
0
0.5
frequency in pi units

dB

10

-0.5
0
0.5
frequency in pi units

6.6
N

-40

-60
-1

-0.5
0
0.5
frequency in pi units

return

Copyright 2005. Shi Ping CUC

Blackman window: N=35

Magnitude response

0.8

-20
dB

0.6

-40

0.4

-60

0.2
0

10

20

-80
-1

30

Amplitude response

0
-20

10

dB

12
N

-40

-0.5
0
0.5
frequency in pi units

11
N

-60

0
-1

Magnitude response of filter: wc=0.5pi

15

-0.5
0
0.5
frequency in pi units

-80
-1

-0.5
0
0.5
frequency in pi units

return

Copyright 2005. Shi Ping CUC

Kaiser window: N=35,beta=7.865

Magnitude response
0

-20

0.8
dB

0.6
0.4

20

-60
-80

0.2
0

-40

-10

0
n

-100
-1

10

Magnitude response of filter: wc=0.5pi

Amplitude response

0
-20

10

-40

dB

15

10

N

-60
-80

0
-1

-0.5
0
0.5
frequency in pi units

-0.5
0
0.5
frequency in pi units

-100
-1

-0.5
0
0.5
frequency in pi units

Copyright 2005. Shi Ping CUC

Kaiser window: N=35,beta=9.5

Magnitude response
0

-20

0.8
dB

0.6
0.4

20

-60
-80

0.2
0

-40

-10

0
n

-100
-1

10

Magnitude response of filter: wc=0.5pi

Amplitude response

0
-20

10

-40

dB

15

-60
-80

0
-1

-0.5
0
0.5
frequency in pi units

-0.5
0
0.5
frequency in pi units

-100
-1

-0.5
0
0.5
frequency in pi units

return

Copyright 2005. Shi Ping CUC

Ideal Impulse Response

N 33

0.3

0.2

0.8

Hamming Window

0.6

0.1

0.4

0.2
0

10

15

20

25

30 n

Actual Impulse Response

10

15

20

25

30 n

Magnitude Response in dB

0.3

-20
dB

0.2
0.1
0

-40
-60
-80

10

15

20

25

30 n

-100

0.2

0.4

0.6

0.8

1 pi

return

Copyright 2005. Shi Ping CUC

N 34

Ideal Impulse Response


0.3

0.2

0.8

Hamming Window

0.6

0.1

0.4

0.2
0

10

15

20

25

30 n

Actual Impulse Response

10

15

20

25

30 n

Magnitude Response in dB

0.3

-20
dB

0.2
0.1
0

-40
-60
-80

10

15

20

25

30 n

-100

0.2

0.4

0.6

0.8

1 pi

return

Copyright 2005. Shi Ping CUC

Ideal Impulse Response

0.6

N 55
1

0.4

0.8

0.2

0.6

0.4

-0.2
-0.4

0.2
0

10

20

30

40

50 n

Actual Impulse Response

0.6

10

20

30

40

50

Magnitude Response in dB

0
-20

0.4

-40
dB

0.2
0

-60
-80

-0.2
-0.4

Blackman Window

-100
0

10

20

30

40

50 n

-120

0.2

0.4

0.6

0.8

1 pi

return

Copyright 2005. Shi Ping CUC

s1
0

Rp

1 dB

p1

p2

s2

0.2 0.35

0.65

0 .8

( )

As 60 dB

return

Copyright 2005. Shi Ping CUC

Ideal Impulse Response

N 74

0.3

0.2

0.8

0.1

Blackman Window

0.6

0.4

-0.1

0.2

-0.2
0

20

40

60

Actual Impulse Response

40

60

Magnitude Response in dB

0.3

20

-20

0.2

-40
dB

0.1
0
-0.1

-60
-80

-0.2

-100
0

10

20

30

40

50

60

70 n

0.2

0.4

0.6

0.8

1 pi

return

Copyright 2005. Shi Ping CUC

R p 0.5 dB

p1

s1

s2

p2

0 .3

0.4

0.6

0 .7

( )

As 40 dB

return

Copyright 2005. Shi Ping CUC

Ideal Impulse Response

0.8

N 63
1

0.6

0.8

0.4

0.6

0.2

0.4

0
-0.2

0.2
0

10

20

30

40

50

60 n

Actual Impulse Response

0.8

10

20

30

40

50

60 n

Magnitude Response in dB

0
-10

0.6

-20

0.4

dB

-30
-40

0.2

-50

0
-0.2

Hanning Window

-60
0

10

20

30

40

50

60 n

-70

0.2

0.4

0.6

0.8

1 pi

return

Copyright 2005. Shi Ping CUC

Potrebbero piacerti anche