You are on page 1of 19

Digital Filter Design

(1) Frequency selective filters : spectral shapers


lowpass highpass bandpass bandstop
1. Introduction -- Digital Filter Design
FIR: - windowing
- equiripple design
IIR : - mapping from analog filters
- impulse invariance
(2)Filter Design Techniques
BGL/SNU
4. FIR Filter Design by Windowing
- Given a desired frequency response
evaluate
specification. given the in fall spectrum frequency
resulting the that such or , segment of finite
Therefore, take a practical. not so long, infinitely is
However, coefficients. filter desired the is - Then,
, ) (
e j
d
e H
}

=
t
t
e e
e
t
d e e H n h
n j j
d d
) (
2
1
] [
This process of getting out of is
called Windowing
] [n h
] [n h
d
(1) Design Concept
] [n h
d
] [n h
d
] [n h
d
] [n h
, ) (
e j
e H
4
2. Window based method:
-30 -20 -10 0 10 20 30
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
Ideal LPF e c= t /4
Shifting
-30 -20 -10 0 10 20 30
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
Ideal LPF e c= t /4-shifted
-30 -20 -10 0 10 20 30
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
LPF by Window Design Technique
5
Digital Filter Specifications
For example the magnitude response of a
digital lowpass filter may be given as indicated
below
Figure 7.2
magnitude response of
equivalent analog system
monotonous descent
2 / 1
c
e
passband
tolerance
c
e
stopband
tolerance
passband
cutoff
frequency
stopband
cutoff
frequency
3dB cutoff
frequency
absolute specification
7
Digital Filter Specifications
In the passband we require that
with a deviation


In the stopband we require that
with a deviation
1 ) ( ~
e j
e G
0 ) ( ~
e j
e G
s
o
p
o
p
e e s s 0
t e e s s
s
p p
j
p
e G e e o o
e
s + s s , 1 ) ( 1
t e e o
e
s s s
s s
j
e G , ) (
8
Digital Filter Specifications
Filter specification parameters
- passband edge frequency
- stopband edge frequency
- peak ripple value in the passband
- peak ripple value in the stopband
p
e
s
e
s
o
p
o
9
Digital Filter Specifications
Practical specifications are often given in
terms of loss function (in dB)

Peak passband ripple
dB
Minimum stopband attenuation
dB
) ( log 20 ) (
10
e
e
j
e G = G
) 1 ( log 20
10 p p
o o =
) ( log 20
10 s s
o o =
(3)Filter Specification(LPF)
| ) ( |
e j
e H
1
1 o +
1
1
1 o
2
o
0
p
e t
s
e
e
In some IIR filter design
1
1 o
1
1 2 3
1
2
3
ripple passband :
1
o
ripple passband :
2
o
] , 0 [ band pass
p
e
] , [ band transition
s p
e e
] , [ band stop t e
s
BGL/SNU
1decide specifications according to application
2decide type according to specificationgenerally , if the phase is required ,
choose FIR.
3approach specifications using causal and stable discrete-time system
4choose a software or hardware realization structure, take effects of limited word
length into consideration
H(z) or h[n]
Design steps
Specifications for bandpass and bandstop filters
up and down passband cutoff frequency
up and down stopband cutoff frequency

s s
= =
otherwise
M n
n w n w n h n h
d
, 0
0 , 1
] [ ], [ ] [ ] [
)
2
sin(
)
2
) 1 (
sin(
1
1
) (
) ( ) (
2
1
) ( ) ( ) (
2 /
) 1 (
0
) (
e
e
u
t
e
e
e
e e
t
t
u e u
e e e
+
=

= =
=
- =

+
=

}
M
e
e
e
e e W
d e W e H
e W e H e H
M j
j
M j
M
n
n j j
j j
d
j j
d
j
(2) Rectangular Windowing
e
0
t
t 2
1
2
+ M
t
sidelobe peak
lobe main
0 t
t 2
e
) (
) ( u e j
e W
) (
u j
d
e H
) (
e j
e H
)
(
)
(
e
j
e W
n
n
n
e
e
e
) (
e j
e W
) (
e j
e H
) (
e j
d
e H
c
e
c
e
1
2
+ M
t
0
M
] [n h
d
] [n w
] [n h
e A
) (e e
] [ ] [ ] [ n h n w n h
R d
) ( ) ( ) (
e e e j j
R
j
d
e H e W e H -
Window Design Techniques
Rectangular Window

s s
=
otherwise , 0
1 0 , 1
) (
M n
n w
Exact transition width = e
s
- e
p
= 1.8t/M
Min. stopband attenuation = 21dB
Window Design Techniques
Bartlett Window

Exact transition width = e
s
- e
p
= 6.1t/M
Min. stopband attenuation = 25dB

s s

s s

=
otherwise , 0
1
2
1
,
1
2
2
2
1
0 ,
1
2
) ( M n
M
M
n
M
n
M
n
n w
Window Design Techniques
Hann Window

Exact transition width = e
s
- e
p
= 6.2t/M
Min. stopband attenuation = 44dB

s s
=
otherwise , 0
1 0 )],
1
2
cos( 1 [ 5 0
) (
M n
M-
n
.
n w
Window Design Techniques
Hamming Window

Exact transition width = e
s
- e
p
= 6.6t/M
Min. stopband attenuation = 53dB
MATLAB function: w=hamming (M)

s s
=
otherwise , 0
1 0 )],
1
2
cos( 46 . 0 54 0
) (
M n
M-
n
.
n w
0 5 10 15 20 25 30 35 40 45
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Hamming Window: M=45
Window Design Techniques
Blackman Window

Exact transition width = e
s
- e
p
= 11t/M
Min. stopband attenuation = 74dB

s s +
=
otherwise , 0
1 0 )],
1
4
cos( 08 . 0 )
1
2
cos( 5 . 0 42 0
) (
M n
M-
n
M-
n
.
n w
0 5 10 15 20 25 30 35 40 45
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Blackman Window: M=45

You might also like