Escolar Documentos
Profissional Documentos
Cultura Documentos
7.0 Introduction
7.1 Design of Discrete-Time IIR Filters From
Continuous-Time Filters
7.2 Design of FIR Filters by Windowing
7.3 Examples of FIR Filters Design by the Kaiser
Window Method
7.4 Optimum Approximations of FIR Filters
7.5 Examples of FIR Equiripple Approximation
7.6 Comments on IIR and FIR Discrete-Time
Filters
1
Filter Design Techniques
7.0 Introduction
2
Introduction
Frequency-selective filters pass only certain
frequencies
Any discrete-time system that modifies certain
frequencies is called a filter.
We concetrate on design of causal Frequency-
selective filters
3
Stages of Filter Design
The specification of the desired properties of the
system.
The approximation of the specifications using a
causal discrete-time system.
The realization of the system.
Our focus is on second step
Specifications are typically given in the frequency
domain.
4
Frequency-Selective Filters
Ideal lowpass filter
( )
< <
<
=
t w w
w w
e H
c
c
jw
lp
, 0
, 1
5
0
c
w
c
w t t t 2 t 2
( )
jw
e H
1
( ) < < = n
n
n w
n h
c
lp
,
sin
t
Frequency-Selective Filters
Ideal highpass filter
( )
0,
1,
c
jw
hp
c
w w
H e
w w t
<
=
< <
0
6
c
w
c
w t t t 2 t 2
( )
jw
e H
1
( ) | |
sin
,
c
hp
w n
h n n n
n
o
t
= < <
Frequency-Selective Filters
Ideal bandpass filter
( )
<
=
others
w w w
e H
c c jw
bp
, 0
, 1
2 1
0
7
1
c
w
1
c
w t t
( )
jw
e H
1
2
c
w
2
c
w
Frequency-Selective Filters
Ideal bandstop filter
( )
<
=
others
w w w
e H
c c jw
bs
, 1
, 0
2 1
0
8
1
c
w
1
c
w t t
( )
jw
e H
1
2
c
w
2
c
w
If input is bandlimited and sampling frequency is
high enough to avoid aliasing, then overall system
behave as a continuous-time system:
( )
( )
> O
< O
= O
O
T
T e H
j H
T j
eff
t
t
, 0
,
9
Linear time-invariant discrete-time system
( )
,
eff
jw
w
H H j w
T
e t
| |
= <
|
\ .
continuous-time specifications are converted to discrete
time specifications by:
T w O =
Example 7.1 Determining Specifications for a
Discrete-Time Filter
Specifications of the continuous-time filter:
1. passband
2. stopband
( ) ( ) 2000 2 0 01 . 0 1 01 . 0 1 t s O s + < O < for j H
eff
( ) ( ) O s < O 3000 2 001 . 0 t for j H
eff
10
s T
4
10
=
( )
max
1
2 2
2
2 5000
f
T T
t
t t
t
= =
=
( )
( )
> O
< O
= O
O
T
T e H
j H
T j
eff
t
t
, 0
,
Example 7.1 Determining Specifications for a
Discrete-Time Filter
Specifications of the continuous-time filter:
1. passband
2. stopband
( ) ( ) 2000 2 0 01 . 0 1 01 . 0 1 t s O s + < O < for j H
eff
( ) ( ) O s < O 3000 2 001 . 0 t for j H
eff
11
s T
4
10
=
( )
max
1
2 2
2
2 5000
f
T T
t
t t
t
= =
=
1
0.01 o =
2
0.001 o =
2 (2000)
p
t O =
2 (3000)
s
t O =
Example 7.1 Determining Specifications for a Discrete-
Time Filter
s T
4
10
=
T e =O
12
Specifications of the
discrete-time filter in
e
1
0.01 o =
2
0.001 o =
2 (2000)
p
t O =
2 (3000)
s
t O =
0.4
p
e t =
0.6
s
e t =
Filter Design Constraints
Designing IIR filters is to find the approximation by a
rational function of z.
The poles of the system function must lie inside the
unit circle(stability, causality).
Designing FIR filters is to find the polynomial
approximation.
FIR filters are often required to be linear-phase.
13
Filter Design Techniques
7.1 Design of Discrete-Time IIR Filters
From Continuous-Time Filters
14
7.1 Design of Discrete-Time IIR Filters From Continuous-
Time Filters
The traditional approach to the design of
discrete-time IIR filters involves the
transformation of a continuous-time filter into a
discrete filter meeting prescribed specification.
15
Three Reasons
1. The art of continuous-time IIR filter design is
highly advanced, and since useful results can
be achieved, it is advantageous to use the
design procedures already developed for
continuous-time filters.
16
Three Reasons
2. Many useful continuous-time IIR design
method have relatively simple closed form
design formulas. Therefore, discrete-time IIR
filter design methods based on such standard
continuous-time design formulas are rather
simple to carry out.
17
Three Reasons
3. The standard approximation methods that
work well for continuous-time IIR filters do
not lead to simple closed-form design
formulas when these methods are applied
directly to the discrete-time IIR case.
18
Steps of DT filter design by transforming a prototype
continuous-time filter
The specifications for the continuous-time filter
are obtained by a transformation of the
specifications for the desired discrete-time filter.
Find the system function of the continuous-time
filter.
Transform the continuous-time filter to derive
the system function of the discrete-time filter.
19
Constraints of Transformation
to preserve the essential properties of the
frequency response, the imaginary axis of the s-
plane is mapped onto the unit circle of the z-
plane.
jw
e z j s = O =
20
plane s
plane z
Im Im
Re Re
Constraints of Transformation
In order to preserve the property of stability, If
the continuous system has poles only in the
let half of the s-plane, then the discrete-time
filter must have poles only inside the unit
circle.
21
plane s
Im
Re
plane z Im
Re
7.1.1 Filter Design by Impulse
Invariance
The impulse response of discrete-time system is
defined by sampling the impulse response of a
continuous-time system.
| | ( )
d c d
nT h T n h =
22
( )
d c
T j H if t > O = O , 0 ( ) t s
|
|
.
|
\
|
= w
T
w
j H e H then
d
c
jw
,
t < O = w for T w
d
( )
=
|
|
.
|
\
|
+ =
k
d d
c
jw
k
T
j
T
w
j H e H
t 2
Relationship of
frequencies
23
< O < < < O = , , t e t e
d
T
relation between frequencies
S plane
Z plane
-
3 /
d
T t
jO
/
d
T t
/
d
T t
( )
=
|
|
.
|
\
|
+ =
k
d d
c
jw
k
T
j
T
w
j H e H
t 2
Relationship of
frequencies
( )
d c
T j H if t > O = O , 0
( ) t s
|
|
.
|
\
|
= w
T
w
j H e H then
d
c
jw
,
Aliasing in the Impulse Invariance
24
( )
=
|
|
.
|
\
|
+ =
k
d d
c
jw
k
T
j
T
w
j H e H
t 2
( )
d c
T j H if t > O = O , 0
( )
,
jw
c
d
w
then H e H j
T
w t
| |
=
|
\ .
s
periodic sampling
[ ] ( ) | ( )
c t nT c
x n x t x nT
=
= =
25
Tsample period; fs=1/T:sample rate
s=2/T:sample rate
( ) ( )
=
=
n
nT t t s o
( ) ( ) ( ) ( ) ( ) ( ) ( )
s c c c
n n
x t x t s t x t t nT x nT t nT o o
= =
= = =
Review
26
Time domain
) (t x
Complex frequency
domain
}
A
= dt e t x s X
st
) ( ) (
Laplace transform
O + = j s o
f t 2 = O
s pl ane
o
jO
0
Relation between Laplace Transform
and Z-transform
Review
27
}
O
= O dt e t x j X
t j
) ( ) (
Fourier Transform
frequency domain
s- pl ane
o
jO
0
A
= dt e t x s X
st
) ( ) (
28
( ) ( ) ( ) ( ) ( )
n n
x n x t t nT x nT t nT o o
=
= =
For discrete-time signal
( ) ( )
st
n
x nT t nT e dt o
}
( ) ( )
snT sT
n
x nT e X e
=
= =
[ ( )] ( )
st
x n x n e dt
=
} L
sT
z e
( ) ( )
n
n
x n z X z
=
= =
z-transform
of discrete-
time signal
the Laplace transform
29
( ) sT j T T j T j
z e e e e re
o o e + O O
= = = =
=
n
n
z n x z X ) ( ) (
so
T
r e
T
o
e
=
= O
relation between
s z and
Laplace transform continuous time signal
z-transform discrete-time signal
relation
[ ( )] ( ) ( )
snT sT
n
x n x nT e X e
=
= =
L
sT
z e
let
30
2
s
T f f e t = O =
DTFT :
Discrete Time
Fourier Transform
( ) sT j T T j T j
z e e e e re
o o e + O O
= = = =
( ) ( )
j j n
n
X e x n e
e e
=
=
S plane
Z plane
-
3 /
s
T t
jO
/
s
T t
/
s
T t
1
|
j j
r
z re e
e e
=
= =
31
2 2
s s
T f f f e t t
'
= O = =
z
plane
Re[ ] z
Im[ ] z
0
r
e
0 2 / 2
0 2
2
s
s s
s s
f
f
t
t
O =
O O
: O
0
0 2
2 4
t
t
t t
: e
s
f f f
'
jO
s pl ane
o
0
2
2
s
s
f
T
t
t =
s
T
t
3
s
T
t
3
s
T
t
> O
< O
= O
O
T
T e H
j H
T j
eff
t
t
, 0
,
32
discrete-time filter design by impulse invariance
t < O = w for T w
d
( )
=
|
|
.
|
\
|
+ =
k
d d
c
jw
k
T
j
T
w
j H e H
t 2
( )
d c
T j H if t > O = O , 0
( )
,
jw
c
d
w
then H e H j w
T
t
| |
= <
|
\ .
33
< O < < < O = , , t e t e
d
T
relation between frequencies
S plane
Z plane
-
3 /
d
T t
jO
/
d
T t
/
d
T t
( )
=
|
|
.
|
\
|
+ =
k
d d
c
jw
k
T
j
T
w
j H e H
t 2
Relationship of
frequencies
( )
d c
T j H if t > O = O , 0
( ) t s
|
|
.
|
\
|
= w
T
w
j H e H then
d
c
jw
,
periodic sampling
[ ] ( ) | ( )
c t nT c
x n x t x nT
=
= =
( ) ( ) ( ) ( ) ( )
1 1 2
*
2 2
s c c s
k
X j X j S j X j k d
T
t
u o u u
t t
=
O = O O = O O
}
34
Tsample period; fs=1/T:sample rate
s=2/T:sample rate
( ) ( )
=
=
n
nT t t s o
( ) ( ) ( ) ( ) ( ) ( ) ( )
s c c c
n n
x t x t s t x t t nT x nT t nT o o
= =
= = =
( ) ( )
2
s
k
S j k
T
t
o
=
O = O O
( ) ( )
1
c s
k
X j k
T
=
= O O
Review
proof of
35
Tsample period; fs=1/T:sample rate;s=2/T:sample rate
( ) ( )
=
=
n
nT t t s o
( ) ( )
2
s
k
S j k
T
t
o
=
O = O O
Review
( ) ( )
2
s
k
S j k
T
t
o
=
O = O O
s
jk t
k
n
a e
O
=
=
s(t)T
1
s
jk t
n
e
T
O
=
=
2 ( )
s
jk t F
s
e k to
O
O O
periodic sampling
36
( ) ( ) ( ) ( ) ( ) ( ) ( )
s c c c
n n
x t x t s t x t t nT x nT t nT o o
= =
= = =
( )
j Tn
c
k
x nT e
O
=
=
( ) ( )
( )
j t
s c
n
X j x nT t nT e dt o
O
=
O =
}
[ ] ( ) | ( )
c t nT c
x n x t x nT
=
= =
( )
( )
j j n
c
n
X e x nT e
e e
=
=
( ) ( ) ( )
j j T
s T
X j X e X e
e
e
O
=O
O = =
( ) ( )
1
( )
j T
c s
k
X e X j k
T
O
=
= O O
1 2
( )
c
k
j
k
X X j
T T T
e
e
e t
=
| |
| |
=
| |
\ .
\ .
2
s
T
t
O =
( ) 0,
j T
if X e
T
t
O
= O>
1
( )
c
j
then X X j
T T
e
e
e
| |
=
|
\ .
( ) ( ) ( )
1
s c s
k
X j X j k
T
=
O = O O
[ ] ( ) | ( )
c t nT c
x n x t x nT
=
= =
| | ( )
d c d
nT h T n h =
37
discrete-time filter design by impulse invariance
( )
=
|
|
.
|
\
|
+ =
k
d d
c
jw
k
T
j
T
w
j H e H
t 2
( )
d c
T j H if t > O = O , 0
( )
,
jw
c
d
w
then H e H j w
T
t
| |
= <
|
\ .
1 2
( )
c
k
j
k
X X j
T T T
e
e
e t
=
| |
| |
=
| |
\ .
\ .
1
( )
c
j
X X j
T T
e
e
e
| |
=
|
\ .
1 2
( )
c
k
j
k
H H j
T T T
e
e
e t
=
| |
| |
=
| |
\ .
\ .
1
( )
c
j
H H j
T T
e
e
e
| |
=
|
\ .
[ ] ( )
c
h n h nT =
Steps of DT filter design by transforming a prototype
continuous-time filter
Obtain the specifications for continuous-time
filter by transforming the specifications for the
desired discrete-time filter.
Find the system function of the continuous-time
filter.
Transform the continuous-time filter to derive
the system function of the discrete-time filter.
38
Transformation from discrete to continuous
In the impulse invariance design procedure,
the transformation is
Assuming the aliasing involved in the
transformation is neglected, the relationship
of transformation is
39
( ) t s
|
|
.
|
\
|
= w
T
w
j H e H
d
c
jw
,
d
T w = O
Steps of DT filter design by transforming a prototype
continuous-time filter
Obtain the specifications for continuous-time
filter by transforming the specifications for the
desired discrete-time filter.
Find the system function of the continuous-time
filter.
Transform the continuous-time filter to derive
the system function of the discrete-time filter.
40
Continuous-time IIR filters
Butterworth filters
Chebyshev Type I filters
Chebyshev Type II filters
Elliptic filters
41
Steps of DT filter design by transforming a prototype
continuous-time filter
Obtain the specifications for continuous-time
filter by transforming the specifications for the
desired discrete-time filter.
Find the system function of the continuous-time
filter.
Transform the continuous-time filter to derive
the system function of the discrete-time filter.
42
Transformation from continuous to discrete
43
( )
=
=
N
k
k
k
s s
A
s H
1
( )
<
>
=
=
0 , 0
0 ,
1
t
t e A
t h
N
k
t s
k
c
k
:
k d
s T
k
pole s s z e
two requirements for transformation
= =
| | ( ) | | ( ) | |
= =
= = =
N
k
n
T s
k d
N
k
nT s
k d c d
n u e A T n u e A T t h T n h
d k d k
1 1
( )
=
=
N
k
T s
k d
z e
A T
z H
d k
1
1
1
Example 7.2 Impulse Invariance with a
Butterworth Filter
Specifications for the discrete-time filter:
44
( )
( ) t t
t
s s s
s s s s
w e H
w e H
jw
jw
3 . 0 , 17783 . 0
2 . 0 0 , 1 89125 . 0
O = O = =
d d
T w T let 1
Assume the effect of aliasing is negligible
( )
( ) O s s O
s O s s O s
t
t
3 . 0 , 17783 . 0
2 . 0 0 , 1 89125 . 0
j H
j H
c
c
Example 7.2 Impulse Invariance with a
Butterworth Filter
45
( )
( )
0.89125 1, 0 0.2
0.17783, 0.3
c
c
H j
H j
t
t
s O s s O s
O s s O
( )
( )
0.2 0.89125
0.3 0.17783
c
c
H j
H j
t
t
>
s
0.3t
0.2t
2
2
0.2 1
1
0.89125
N
c
t
| |
| |
+ =
|
|
O
\ .
\ .
2
2
0.3 1
1
0.17783
N
c
t
| |
| |
+ =
|
|
O
\ .
\ .
( )
( )
2
2
1
1
N
c
c
H j
j j
O =
+ O O
( )
( )
2
2
1
1
N
c
c
j j
H j
+ O O =
O
Example 7.2 Impulse Invariance with a
Butterworth Filter
46
( )
( )
2
2
1
1
N
c
c
H j
j j
O =
+ O O
2
2
0.2 1
1 1.25893
0.89125
N
c
t
| |
| |
+ = =
|
|
|
O
\ .
\ .
7032 . 0 , 6 = O =
c
N
2
2
0.3 1
1 31.62204
0.17783
N
c
t
| |
| |
+ = =
|
|
|
O
\ .
\ .
2
0.2
0.25893
N
c
t
| |
=
|
O
\ .
2
0.3
30.62204
N
c
t
| |
=
|
O
\ .
2
3
118.26378
2
N
| |
=
|
\ .
70470 . 0 , 8858 . 5 = O =
c
N
( )
( )
0.2 0.89125
0.3 0.17783
c
c
H j
H j
t
t
>
s
Example 7.2 Impulse Invariance with a
Butterworth Filter
( )
( )
2
2
1
1
N c
c
H j
j j
O =
+ O O
47
( ) ( ) ( )
( )
2
2
1
1
N
c c c
c
H s H s H s
s j
= =
+ O
0,1, , 2 1 k N =
( )
( )( )
2 2 1
1 2
1 ,
k
j N k N
N
c c
s j e
t +
= O = O
6, 0.7032
c
N = O =
0.182 0.679, j
0.497 0.497, j
0.679 0.182 j
Plole pairs:
( )
c
H s
Example 7.2 Impulse Invariance with a
Butterworth Filter
48
( )
( )( )( ) 4945 . 0 3585 . 1 4945 . 0 9945 . 0 4945 . 0 3640 . 0
12093 . 0
2 2 2
+ + + + + +
=
s s s s s s
s H
c
( ) ( ) ( )
( )
2
2
2 2 2
1
1
N
N N N
c
c
c c c
c
H s H s H s
s
s j
O
= = =
+O
+ O
0.182 0.679, j 0.497 0.497, j
0.679 0.182 j
Plole pairs:
( )
c
H s
( )
( ) ( ) ( )
0.12093
0.182 0.679 0.182 0.679 0.497 0.497
c
H s
s j s j s j
=
+ + + +
( ) ( )( )
1
0.497 0.497 0.679 0.182 0.679 0.182 s j s j s j
+ + + + +
6
0.7032
N
c
O =
Example 7.2 Impulse Invariance with a
Butterworth Filter
1
d
T =
49
1 1
1 2 1 2
1
1 2
0.2871 0.4466 2.1428 1.1455
1 1.2971 0.6949 1 1.0691 0.3699
1.8557 0.6303
1 0.9972 0.2570
z z
z z z z
z
z z
+
= +
+ +
+
+
( )
( ) ( ) ( )
0.12093
0.182 0.679 0.182 0.679 0.497 0.497
c
H s
s j s j s j
=
+ + + +
( ) ( )( )
1
0.497 0.497 0.679 0.182 0.679 0.182 s j s j s j
+ + + + +
1
N
k
k
k
A
s s
=
=
( )
1 1
1 1 1 1
N N
d k k
k k
k d k
s T
s
T A A
H z
e z e z
= =
= =
Basic for Impulse Invariance
To chose an impulse response for the discrete-
time filter that is similar in some sense to the
impulse response of the continuous-time filter.
If the continuous-time filter is bandlimited, then
the discrete-time filter frequency response will
closely approximate the continuous-time
frequency response.
The relationship between continuous-time and
discrete-time frequency is linear; consequently,
except for aliasing, the shape of the frequency
response is preserved.
50
7.1.2 Bilinear Transformation
51
Bilinear transformation can avoid the
problem of aliasing.
Bilinear transformation maps
onto
s O s
t t s s w
( )
1
1
2 1
1
d
c
z
H z H
T z
(
| |
=
(
|
+
\ .
|
|
.
|
\
|
+
1
1
1
1 2
z
z
T
s
d
Bilinear transformation:
| |
c
H s =
|
|
.
|
\
|
+
1
1
1
1 2
z
z
T
s
d
7.1.2 Bilinear Transformation
|
|
.
|
\
|
+
1
1
1
1 2
z
z
T
s
d
52
( )
( )s T
s T
z
d
d
2 1
2 1
+
=
O + = j s o
2 2 1
2 2 1
d d
d d
T j T
T j T
z
O
O + +
=
o
o
O < < any for z 1 0 o
O > > any for z 1 0 o
( )
1 1
2 (1 ) 1
d
T s z z
+ =
( ) { } ( )
1
1 2 ] 1 2
d d
T s z T s
+ =
7.1.2 Bilinear Transformation
O = O j s axis j
53
2 1
2 1
d
d
T j
T j
z
O
O +
= 1 = z
1 2
1 2
d
d
jw
j T
j T
e
+ O
=
O
plane s
Im
Re
plane z Im
Re
2 2 1
2 2 1
d d
d d
T j T
T j T
z
O
O + +
=
o
o
O < < any for z 1 0 o
O > > any for z 1 0 o
O + = j s o
7.1.2 Bilinear Transformation
|
|
.
|
\
|
+
1
1
1
1 2
z
z
T
s
d
54
2 1
1
d
jw
jw
j
T
e
e
| |
O =
|
|
+
\ .
( )
2
tan 2
d
j w
T
=
2 2 sin 2
2cos 2
d
j w
T w
| |
=
|
\ .
( ) 2 tan
2
w
T
d
= O
( ) 2 tan 2
1
d
T w O =
/2 /2 /2
/2 /2 /2
2 ( )
( )
d
jw jw jw
jw jw jw
T
e e e
e e e
| |
=
|
|
+
\ .
55
|
.
|
\
|
= O
|
|
.
|
\
|
= O
2
tan
2
2
tan
2
:
s
d
s
p
d
p
T
T
prewarp
e
e
|
.
|
\
|
= O
O =
2
tan
2
) ( ) (
e
e
d
T
c
j
j H e H
relation between frequency response of H
c
(s), H(z)
O
e
e
O
Comments on the Bilinear Transformation
It avoids the problem of aliasing encountered
with the use of impulse invariance.
It is nonlinear compression of frequency axis.
56
S plane
Z plane
-
3 /
d
T t
jO
/
d
T t
/
d
T t
( ) 2 tan
2
w
T
d
= O
( ) 2 tan 2
1
d
T w O =
Comments on the Bilinear Transformation
The design of discrete-time filters using bilinear
transformation is useful only when this
compression can be tolerated or compensated for,
as the case of filters that approximate ideal
piecewise-constant magnitude-response
characteristics.
57
0
c
w
c
w t t t 2 t 2
( )
jw
e H
1
Bilinear Transformation of
58
|
|
.
|
\
|
+
1
1
1
1 2
z
z
T
s
d
( ) 2 tan
2
w
T
d
= O
s
e
o
j
e
o O
( )
2
tan 2
d
w
T
o
o O =
d
T
eo
+ +
+
=
z z
z z z z
z
z H
( ) ( ) ( )
( )
2
2
2 2 2
1
1
N
N N N
c
c
c c c
c
H s H s H s
s
s j
O
= = =
+O
+ O
0.1998 0.7401, j
0.5418 0.5418, j 0.7401 0.1998 j
Plole pairs:
( )
c
H s
|
|
.
|
\
|
+
1
1
1
1 2
z
z
T
s
d
Ex. 7.3 frequency response of discrete-
time filter
66
Example 7.4 Butterworth Approximation (Hw)
67
( )
( ) t t
t
s s s
s s s
w e H
w e H
jw
jw
6 . 0 , 001 . 0
4 . 0 , 01 . 1 99 . 0
14 = N order
Example 7.4 frequency response
68
69
Chebyshev filters
C
Chebyshev filter (type I)
) / ( 1
1
| ) ( |
2
2
2
c N
c
V
j H
O O +
= O
c
) cos cos( ) (
1
x N x V
N
=
c
O
1
c 1
Chebyshev polynomial
Chebyshev filter (type II)
1
2
2
2
)] / ( [ 1
1
| ) ( |
O O +
= O
c N
c
V
j H
c
1
c
c
O
Example 7.5 Chebyshev Type I , II Approximation
70
( )
( ) t t
t
s s s
s s s
w e H
w e H
jw
jw
6 . 0 , 001 . 0
4 . 0 , 01 . 1 99 . 0
8 = N order
Type I
Type II
Example 7.5 frequency response of
Chebyshev
71
Type I
Type II
72
E
elliptic filters
Elliptic filter
) ( 1
1
| ) ( |
2 2
2
O +
= O
N
c
U
j H
c
s
O
p
O
1
1
1 o
2
o
Jacobian elliptic function
Example 7.6 Elliptic Approximation
73
( )
( ) t t
t
s s s
s s s
w e H
w e H
jw
jw
6 . 0 , 001 . 0
4 . 0 , 01 . 1 99 . 0
6 = N order
Example 7.6 frequency response of
Elliptic
74
75
*Comparison of Butterworth, Chebyshev, elliptic filters: Example
-Given specification
t e
e
0.4 | | .01 1 | ) ( | 99 . 0 s s s
j
e H
t e t
e
s s s | | 0.6 0.001 | ) ( |
j
e H
t e t e o o 6 . 0 , 4 . 0 001 . 0 , 01 . 0
s 2 1
= = = =
p
) (
s
e
-Order
Butterworth Filter : N=14. ( max flat)
Chebyshev Filter : N=8. ( Cheby 1, Cheby 2)
Elliptic Filter : N=6 ( equiripple)
B
C
E
76
-Pole-zero plot (analog)
-Pole-zero plot (digital)
B C1 C2 E
B C1 C2 E
(14) (8)
77
-Magnitude
-Group delay
B
C1
C2
E
B
C1
C2
E
t 4 . 0 t 6 . 0
t
t 4 . 0 t 6 . 0
t
5
20
7.2 Design of FIR Filters by Windowing
FIR filters are designed based on directly
approximating the desired frequency response
of the discrete-time system.
Most techniques for approximating the
magnitude response of an FIR system assume a
linear phase constraint.
78
Window Method
An ideal desired frequency response
79
( ) | |
=
n
jwn
d
jw
d
e n h e H
| | ( )
}
=
t
t
t
dw e e H n h
jwn jw
d d
2
1
Many idealized systems are defined by
piecewise-constant frequency response with
discontinuities at the boundaries. As a result,
these systems have impulse responses that
are noncausal and infinitely long.
( )
< <
<
=
t w w
w w
e H
c
c
jw
lp
, 0
, 1
( )
sin
c
lp
w n
h n
n t
=
0
c
w
c
w t t
( )
jw
e H
1
Window Method
80
| |
| |
s s
=
otherwise
M n n h
n h
d
, 0
0 ,
| | | | | | n w n h n h
d
=
| |
s s
=
otherwise
M n
n w
, 0
0 , 1
( ) ( )
( )
( )
}
=
t
t
u
u
t
d e W e H e H
w j jw
d
jw
2
1
The most straightforward approach to
obtaining a causal FIR approximation is to
truncate the ideal impulse response.
Windowing in Frequency Domain
Windowed frequency response
81
( ) ( )
( )
( ) u
t
=
u e e
t
t
e
}
d e W e H
2
1
e H
j j
d
j
The windowed version is smeared version
of desired response
Window Method
82
( ) ( )
( )
( )
( )
1
2
j w
jw j jw
d d
H e H e W e d H e
t
u
u
t
u
t
= =
}
If
| | s s = n n w 1
( ) | | ( )
=
= =
k n
jwn jw
k w e n w e W t o t 2 2
0
c
w
c
w t t
( )
jw
e H
1
0
5
10 5 10 15 15
2t
2t
2t 4t 4t 6t
e
( )
jw
W e
Choice of Window
is as short as possible in duration. This
minimizes computation in the implementation of
the filter.
83
| | n w
approximates an impulse. ( )
jw
e W
( )
| |
0
M
jw jwn jwn
n n
W e w n e e
= =
= =
( )
( )
( )
1
2
sin 1 2
1
1 sin 2
jw M
jwM
jw
w M
e
e
e w
+
+ (
= =
| |
s s
=
otherwise
M n
n w
, 0
0 , 1
1 M +
2
1 M
t
+
2
1 M
t
+
( )
jw
W e
Window Method
84
( ) ( )
( )
( ) ( )
jw
d
w j jw
d
jw
e H d e W e H e H = =
}
t
t
u
u
t 2
1
then would look like , except
where changes very abruptly.
( )
jw
e H ( )
jw
d
e H
( )
jw
d
e H
| | n w ( )
jw
e W
0 = w
If is chosen so that is concentrated
in a narrow band of frequencies around
0
c
w
c
w t
t
( )
jw
d
H e
1
1 M +
2
1 M
t
+
2
1 M
t
+
( )
jw
W e
Rectangular Window
for the rectangular window has a
generalized linear phase.
85
( )
jw
e W
As M increases, the width of the main lobe
decreases.
( )
4 1
m
w
M t A = +
While the width of each lobe decreases with
M, the peak amplitudes of the main lobe and
the side lobes grow such that the area under
each lobe is a constant.
( )
( )
( )
2
sin 1 2
sin 2
jw jwM
w M
W e e
w
+ (
=
1 M +
2
1 M
t
+
2
1 M
t
+
1
M
M
t
+
1
M
M
t
+
Rectangular Window
86
will oscillate at
the discontinuity.
( )
( )
( )
}
t
t
u
u d e W e H
w j jw
d
The oscillations occur more rapidly, but
do not decrease in magnitude as M
increases.
The Gibbs phenomenon can be
moderated through the use of a less
abrupt truncation of the Fourier series.
Rectangular Window
By tapering the window smoothly to zero at
each end, the height of the side lobes can be
diminished.
The expense is a wider main lobe and thus a
wider transition at the discontinuity.
87
7.2 Design of FIR Filters by Windowing
Method
To design an ilowpass FIR Filters
88
( )
< <
<
=
t w w
w w
e H
c
c
jw
lp
, 0
, 1
( )
sin
c
lp
w n
h n
n t
=
0
c
w
c
w t t
( )
jw
e H
1
Review
| | | | | |
d
h n h n w n =
| |
1, 0
0,
n M
w n
otherwise
s s
( ) ( )
( )
( )
}
=
t
t
u
u
t
d e W e H e H
w j jw
d
jw
2
1
1 M +
2
1 M
t
+
2
1 M
t
+
( )
jw
W e
( )
( )
sin 2
2
c
w n M
n M t
(
0
2 M 0
2 M 0
M
M
2 M
0 M
7.2.1 Properties of Commonly Used Windows
Rectangular
89
| |
s s
=
otherwise
M n
n w
, 0
0 , 1
| |
s s
s s
=
otherwise
M n M M n
M n M n
n w
, 0
2 , 2 2
2 0 , 2
Bartlett (triangular)
7.2.1 Properties of Commonly Used Windows
Hanning
90
| |
( )
s s
=
otherwise
M n M n
n w
, 0
0 , 2 cos 5 . 0 5 . 0 t
| |
( )
s s
=
otherwise
M n M n
n w
, 0
0 , 2 cos 46 . 0 54 . 0 t
Hamming
7.2.1 Properties of Commonly Used Windows
Blackman
91
| |
( )
( )
s s +
=
otherwise
M n M n
M n
n w
, 0
0 , 4 cos 08 . 0
2 cos 5 . 0 42 . 0
t
t
7.2.1 Properties of Commonly Used Windows
92
93
Frequency Spectrum of Windows
(a) Rectangular, (b) Bartlett,
(c) Hanning, (d) Hamming,
(e) Blackman , (M=50)
(a)-(e) attenuation of sidelobe increases,
width of mainlobe increases.
7.2.1 Properties of Commonly Used Windows
94
biggesthigh oscillations
at discontinuity
smallestthe sharpest transition
Table 7.1
7.2.2 Incorporation of Generalized Linear Phase
In designing FIR filters, it is desirable to obtain
causal systems with a generalized linear phase
response.
95
| |
| |
s s
=
otherwise
M n n M w
n w
, 0
0 ,
The above five windows are all
symmetric about the point ,i.e., 2 M
7.2.2 Incorporation of Generalized Linear Phase
Their Fourier transforms are of the form
96
( ) ( )
2 M jw jw
e
jw
e e W e W
=
( ) w of function even and real a is e W
jw
e
| | | | | | causal n w n h n h
d
: =
| | | | | | | | | |
d d d
if h M n h n h n h n w n = =
( ) ( )
2 M jw jw
e
jw
e e A e H
=
| | | |
: h M n h n generalized linear phase =
2 M
M
7.2.2 Incorporation of Generalized Linear Phase
| | | | | | | | | |
| | | | phase linear d generalize n h n M h
n w n h n h n h n M h if
d d d
: =
= =
97
( ) ( )
2 M jw jw
o
jw
e e jA e H
=
2 M
M
Frequency Domain Representation
98
| | | | n h n M h if
d d
=
( ) ( )
2 M jw jw
e
jw
d
e e H e H
=
( )
( )
( )
1
2
jw
d
j w
j
H e H W d e e
t
t
u
u
u
t
| |
=
|
\ .
}
( )
( )
( )
1
2
e e
j w
jw jw
e
where A H W d e e e
t
t
u
u
t
| |
=
|
\ .
}
( )
( ) ( )
2
2
1
2
e e
j w j w M
j j M
H W d e e e e
t
t
u u
u u
u
t
| |
=
|
\ .
}
( ) ( )
2 M jw jw
e
jw
e e W e W
=
| | | |
w n w M n =
( )
2 jw jwM
e
A e e
=
| | | | | |
d
h n h n w n =
Example 7.7 Linear-Phase Lowpass Filter
The desired frequency response is
99
( )
s <
<
=
t w w
w w e
e H
c
c
jwM
jw
lp
, 0
,
2
| |
lp
h M n =
| |
( ) | |
( )
| | n w
M n
M n w
n h
c
2
2 sin
=
t
| |
( )
( )
2
1
2
sin 2
2
c
c
lp
c
w
w
jwM jwn
h n dw
w n M
for n
n M
e e
t
t
=
(
= < <
}
2 M
( )
( ) t o
o
s s s
s s >
w w e H
w w e H
s
jw
p
jw
0 1
magnitude frequency response
100
p
w
s
w
( )
( )
1 0
jw
p p
jw
s s
H e w w
H e w w
o
o t
> s s
s s s
s p
w w w A =
10
20log
p p
o o =
( )
0.1 0.15
jw
H e w t t s s s
( )
1 0.05 0 0.25
jw
H e w t > s s
0.1
s p
w w w t A = =
10
20log 0.05 26
p
dB o = =
10
20log
s s
o o =
20
s
dB o =
7.2.1 Properties of Commonly Used Windows
101
smallestthe sharpest
transition
biggesthigh oscillations
at discontinuity
7.2.3 The Kaiser Window Filter Design Method
102
| |
( )
( )
| |
1 2
2
0
0
1
, 0
0,
I n
n M
w n
I
otherwise
| o o
|
(
(
(
s s
=
2, where M o =
( )
0
: I u zero order modified Bessel function of the first kind
( )
( )
2
0
1
2
1
!
r
r
u
I u
r
=
(
= +
(
(
(
(
(
s s
=
107
p s
w w w = A o
10
log 20 = A
( )
( ) ( )
<
s s +
>
=
21 , 0 . 0
50 21 , 21 07886 . 0 21 5842 . 0
50 , 7 . 8 1102 . 0
4 . 0
A
A A A
A A
|
2
285 . 2
8
=
w
A
M
M=20
Example 7.8 Kaiser Window Design of a Lowpass
Filter
( )
( ) t t
t
s s s
s s s
w e H
w e H
jw
jw
6 . 0 , 001 . 0
4 . 0 , 01 . 1 99 . 0
108 p s
w w w = A
o
10
log 20 = A
( )
( )
( )
( )
( )
1 2
2
0
0
1
sin
, 0
c
I n
w n
n M
n I
| o o
o
t o |
| |
(
|
\ .
s s
| |
0,
h n
otherwise
5 . 18 2 = = M where o
( )
( ) ( )
<
s s +
>
=
21 , 0 . 0
50 21 , 21 07886 . 0 21 5842 . 0
50 , 7 . 8 1102 . 0
4 . 0
A
A A A
A A
|
8
2.285
A
M
w
=
A
Example 7.8 Kaiser Window Design of a Lowpass
Filter
( )
( ) t t
t
s s s
s s s
w e H
w e H
jw
jw
6 . 0 , 001 . 0
4 . 0 , 01 . 1 99 . 0
109
( ) 001 . 0 , min , 001 . 0 , 01 . 0
, 6 . 0 , 4 . 0
: 1
2 1 2 1
= = = =
= =
o o o o o
t t
s p
w w
step
0.5
2
s p
c
w w
cutoff frequency w t
+
= =
2: step
3: step
10
0.2 20log 60
0.5653 37
s p
w w w A
M
t o
|
A = = = =
= =
Example 7.8 Kaiser Window Design of a Lowpass
Filter
( )
( )
2
0
1
2
1
!
r
r
u
I u
r
=
(
= + (
(
110
0.5653 | =
5 . 18 2 = = M where o
( )
( )
( )
( )
( )
1 2
2
0
0
1
sin
, 0
c
I n
w n
n M
n I
| o o
o
t o |
| |
(
|
\ .
s s
| |
0,
h n
otherwise
( )
( ) ( )
<
s s +
>
=
21 , 0 . 0
50 21 , 21 07886 . 0 21 5842 . 0
50 , 7 . 8 1102 . 0
4 . 0
A
A A A
A A
|
8
37
2.285
A
M
w
= ~
A
10
3:
0.2 20log 60
s p
step
w w w A t o A = = = =
Ex. 7.8 Kaiser Window Design of a Lowpass
Filter
111
| |
( )
( )
( )
( )
( )
1 2
2
0
0
1
sin
, 0
c
I n
w n
h n n M
n I
| o o
o
t o |
| |
(
|
\ .
= s s
s s
<
=
t w w e
w w
e H
c
M jw
c
jw
hp
,
, 0
2
( ) ( )
jw
lp
M jw jw
hp
e H e e H =
2
| |
( )
( )
( )
( )
< <
= n
M n
M n w
M n
M n
n h
c
hp
,
2
2 sin
2
2 sin
t t
t
| | | | | |
hp
h n h n w n =
Example 7.9 Kaiser Window Design of a Highpass
Filter
Specifications:
113
( )
( ) t o o
o
s s + s s
s s
w w e H
w w e H
p
jw
s
jw
, 1 1
,
1 1
2
021 . 0 , 5 . 0 , 35 . 0
21 1
= = = = = o o o t t
p s
w w where
24 , 6 . 2 = = M |
By Kaiser window method
Example 7.9 Kaiser Window Design of a Highpass
Filter
Specifications:
114
( )
( ) t o o
o
s s + s s
s s
w w e H
w w e H
p
jw
s
jw
, 1 1
,
1 1
2
021 . 0 , 5 . 0 , 35 . 0
21 1
= = = = = o o o t t
p s
w w where
24 , 6 . 2 = = M |
By Kaiser window method
7.3.2 Discrete-Time Differentiator
115
( ) ( ) t t < < =
w e jw e H
M jw jw
diff
,
2
| |
( )
( )
( )
( )
< <
= n
M n
M n
M n
M n
n h
diff
,
2
2 sin
2
2 cos
2
t
t t
| | | | | | n w n h n h
diff
=
| | | | phase linear d generalize IV type or III type n M h n h : =
Example 7.10 Kaiser Window Design of a
Differentiator
Since kaisers formulas were developed for
frequency responses with simple magnitude
discontinuities, it is not straightforward to
apply them to differentiators.
Suppose
116
4 . 2 10 = = | M
Group Delay
Phase:
Group Delay:
117
2
5
2 2
t t
+ = + w w
M
samples
M
5
2
=
Group Delay
Phase:
Group Delay:
Noninteger delay
118
2 2
5
2 2
t t
+ = + w w
M
samples
M
2
5
2
=
7.4 Optimum Approximations of FIR Filters
Goal: Design a best filter for a given M
In designing a causal type I linear phase FIR filter,
it is convenient first to consider the design of a
zero phase filter.
Then insert a delay sufficient to make it causal.
119
| | | | n h n h
e e
=
7.4 Optimum Approximations of FIR Filters
| | | | n h n h
e e
=
120
( ) | | 2 , M L e n h e A
L
L n
jwn
e
jw
e
= =
=
=
+ =
| |
. 2 samples M L by it delaying
by n h from obtained be can system causal A
e
=
| | | | | | n M h M n h n h
e
= = 2
( ) ( )
2 M jw jw
e
jw
e e A e H
=
7.4 Optimum Approximations of FIR Filters
Designing a filter to meet these specifications is to
find the (L+1) impulse response values
121
| | L n n h
e
s s 0 ,
In Packs-McClellan algorithm,
is fixed, and is variable.
2 1
, , , o o and w w L
s p
( )
2 1
o o or
Packs-McClellan algorithm is the dominant
method for optimum design of FIR filters.
7.4 Optimum Approximations of FIR Filters
( ) ( ) ( ) ( ) w n w T wn
n
cos cos cos cos cos
1
= =
122
( ) ( ) ( ) ( ) 1 cos cos 0 cos cos 0 cos
1
0
= = =
w w T w
( ) ( ) ( ) ( ) w w w T w cos cos cos 1 cos cos 1 cos
1
1
= = =
( ) ( ) 1 cos 2 cos 2 cos
2
2
= = w w T w
( ) ( )
( ) ( ) ( ) w T w T w
w T wn
n n
n
cos cos cos 2
cos cos
2 1
=
=
( ) ( )( ) ( )
( ) w w w w w
w w w w
cos 3 cos 4 cos 1 cos 2 cos 2
cos 2 cos cos 2 3 cos
3 2
= =
=
7.4 Optimum Approximations of FIR Filters
( ) | | | | ( ) ( ) ( )
( )
=
=
= =
=
= = + =
L
k
k
k
w x
L
k
k
k
L
n
e e
jw
e
x a x P where
x P w a wn n h h e A
0
cos
0 1
cos cos 2 0
123
( ) ( ) ( ) ( ) | |
( ) f unction weighting the is w W where
e A e H w W w E
f unction error ion approximat an Def ine
jw
e
jw
d
=
7.4 Optimum Approximations of FIR Filters
124
( )
s s
s s
=
t w w
w w
e H
s
p
jw
d
, 0
0 , 1
( )
s s
s s =
=
t
o
o
w w
w w
K
w W
s
p
, 1
0 ,
1
1
2
Minimax criterion
Within the frequency interval of the passband
and stopband, we seek a frequency response
that minimizes the maximum weighted
approximation error of
125
( )
jw
e
e A
( ) ( ) ( ) ( ) | |
jw
e
jw
d
e A e H w W w E =
| | { }
( ) ( ) w E
F w L n n h
e
e s s
max min
0 :
Other criterions
| | { }
( )
|
.
|
\
|
=
}
s s
t
0 0 :
1
min dw w E H
L n n h
e
126
| | { }
( ) ( )
|
.
|
\
|
=
}
s s
t
0
2
0 :
2
min dw w E H
L n n h
e
| | { }
( ) ( ) w E H
F w L n n h
e
e s s
= max min
0 :
Alternation Theorem
Let denote the closet subset consisting of the
disjoint union of closed subsets of the real axis x.
127
p
F
is an r th-order polynomial. ( )
=
=
r
k
k
k
x a x P
0
denotes a given desired function of x
that is continuous on
( ) x D
P
p
F
is a positive function, continuous on p
F
( ) x W
P
The weighted error is ( ) ( ) ( ) ( ) | | x P x D x W x E
P P P
=
( ) x E E
P
F x
P
e
= max
The maximum error is defined as
Alternation Theorem
A necessary and sufficient condition that be the
unique rth-order polynomial that minimizes is
that exhibit at least (r+2) alternations; i.e.,
there must exist at least (r+2) values in such
that
128
( ) x P
E ( ) x E
P
i
x
P
F
2 2 1 +
< < <
r
x x x
( ) ( ) E x E x E
i P i P
= =
+1
( ) 1 , , 2 , 1 + = r i
and such that
for
Example 7.11 Alternation Theorem and
Polynomials
Each of these polynomials is of fifth order.
The closed subsets of the real axis x referred
to in the theorem are the regions
129
1 1 . 0 1 . 0 1 s s s s x and x
( ) 1 = x W
P
7.4.1 Optimal Type I Lowpass Filters
For Type I lowpass filter
The desired lowpass frequency response
Weighting function
130
( ) ( )
=
=
L
k
k
k
w a w P
0
cos cos
( )
( )
( )
s s s s
s s s s
=
t w w w w
w w w w
w D
s s
p p
p
cos cos 1 , 0
0 1 cos cos , 1
cos
( )
( )
( )
s s s s
s s s s
=
t w w w w
w w w w
K
w W
s s
p p
p
cos cos 1 , 1
0 1 cos cos ,
1
cos
7.4.1 Optimal Type I Lowpass Filters
The weighted approximation error is
The closed subset is
or
131
( ) ( ) ( ) ( ) | | w P w D w W w E
P P P
cos cos cos cos =
t s s s s w w and w w
s p
0
s p
w w and w w cos 1 1 cos cos s s s s
( ) x E
P
7.4.1 Optimal Type I Lowpass Filters
The alternation theorem states that a set of
coefficients will correspond to the filter
representing the unique best approximation
to the ideal lowpass filter with the ratio
fixed at K and with passband and stopband
edge and if and only if exhibits at
least (L+2) alternations on , i.e., if and only
if alternately equals plus and minus its
maximum value at least (L+2) times.
Such approximations are called equiripple
approximations.
132
k
a
2 1
o o
p
w
s
w
) (cos w E
P
P
F
) (cos w E
P
7.4.1 Optimal Type I Lowpass Filters
The alternation theorem states that the
optimum filter must have a minimum of (L+2)
alternations, but does not exclude the
possibility of more than (L+2) alternations.
In fact, for a lowpass filter, the maximum
possible number of alternations is (L+3).
133
7.4.1 Optimal Type I Lowpass Filters
Because all of the filters satisfy the alternation
theorem for L=7 and for the same value
of , it follows that and/or must be
different for each ,since the alternation
theorem states that the optimum filter under
the conditions of the theorem is unique.
134
2 1
o o = K
p
w
s
w
Property for type I lowpass filters from the
alternation theorem
The maximum possible number of alternations of
the error is (L+3)
Alternations will always occur at and
All points with zero slop inside the passband and
all points with zero slop inside stopband will
correspond to alternations; i.e., the filter will be
equiripple, except possibly at and
135
p
w
s
w
0 = w
t = w
7.4.2 Optimal Type II Lowpass Filters
For Type II causal FIR filter:
The filter length (M+1) is even, ie, M is odd
Impulse response is symmetric
The frequency response is
136
| | M n n h s s 0
| | | | n h n M h =
( ) | |
( )
| |
( )
| | ( ) | | ( ) 2 1 , , 2 , 1 , 2 1 2
2
1
cos
2
cos 2
2 1
1
2
2 1
0
2
+ = + =
(
|
.
|
\
|
=
(
|
.
|
\
|
=
+
=
M n n M h n b where
n w n b e
n
M
w n h e e H
M
n
M jw
M
n
M jw jw
=
(
|
.
|
\
|
=
+
=
2 1
0
2 1
1
cos
~
2 cos
2
1
cos
M
n
M
n
wn n b w n w n b
137
( ) ( ) ( ) w P w e e H
M jw jw
cos 2 cos
2
=
( ) ( ) ( ) 2 1 cos
0
= =
=
M L and w a w P where
L
k
k
k
| | | | | | ( ) | | n M h n b n b n b a find
k
+ = 2 1 2
~
7.4.2 Optimal Type II Lowpass Filters
For Type II lowpass filter,
138
( ) ( )
( )
s s
s s
= =
t w w
w w
w
w D e H
s
p
P
jw
d
, 0
0 ,
2 cos
1
cos
( ) ( )
( )
( )
s s
s s
= =
t w w
w w
K
w
w W w W
s
p
P
, 2 cos
0 ,
2 cos
cos
7.4.3 The Park-McClellan Algorithm
From the alternation theorem, the optimum filter
will satisfy the set of equation
139
( ) ( ) ( ) | | ( ) ( ) 2 , , 2 , 1 1
1
+ = =
+
L i e A e H w W
i
jw
e
jw
d
o
( )
jw
e
e A
( )
( )
( )
( )
( )
( )
( )
i i
jw
d
jw
d
jw
d
L
L
L
L L L
L
L
w x where
e H
e H
e H
a
a
w W
x x x
w W
x x x
w W
x x x
L
cos
1
1
1
1
1
1
2
2
1
1
0
2
2
2
2
2 2
2
2
2
2 2
1
1
2
1 1
=
(
(
(
(
(
=
(
(
(
(
(
(
(
(
(
(
(
(
+
+
+
+ + +
o
7.4.3 The Park-McClellan Algorithm
Guessing a set of alternation frequencies
140
( )
( )
( )
( )
[
+
=
=
+
=
+
+
=
=
=
2
1
2
1
1
2
1
cos ,
1
1
L
k i
i
i i
i k
k
L
k
k
k
k
L
k
jw
d k
w x
x x
b where
w W
b
e H b
k
o
( ) 2 , , 2 , 1 + = L i for w
i
s l p l
w w w w = =
+1
,
and
7.4.3 The Park-McClellan Algorithm
141
( ) ( )
( ) | |
( ) | |
( )
( )
2
1
1
1
1
1
1
1
cos , cos
+
+
=
=
+
=
+
=
=
=
=
= =
[
L k k
L
k i
i
i k
k
k k
L
k
k k
k
L
k
k k
jw
e
x x b
x x
d
w x x
x x d
C x x d
w P e A
7.4.3 The Park-McClellan Algorithm
For equiripple lowpass approximation
Filter length: (M+1)
142
( )
p s
w w w where
w
M
= A
A
=
324 . 2
13 log 10
2 1 10
o o
7.5 Examples of FIR Equiripple
Approximation
7.5.1 Lowpass Filter
( )
( ) t t
t
s s s
s s s
w e H
w e H
jw
jw
6 . 0 , 001 . 0
4 . 0 , 01 . 1 99 . 0
143
26 = M
( )
( )
( )
( )
( )
s s
s s
= =
t w w e A
w w e A
w W
w E
w E
error ion approximat unweighted
s
jw
e
p
jw
e
A
, 0
0 , 1
Comments
M=26, Type I filter
The minimum number of alternations is
(L+2)=(M/2+2)=15
7 alternations in passband and 8 alternations
in stopband
The maximum error in passband and
stopband are 0.0116 and 0.0016, which
exceed the specifications.
144
7.5.1 Lowpass Filter
M=27, , Type II filter, zero at z=-1
The maximum error in passband and
stopband are 0.0092 and 0.00092, which
exceed the specifications.
The minimum number of alternations is
(L+2)=(M-1)/2+2=15
7 alternations in passband and 8 alternations
in stopband
145
( ) t = w
Comparison
Kaiser window method require M=38 to meet
or exceed the specifications.
Park-McClellan method require M=27
Window method produce approximately
equal maximum error in passband and
stopband.
Park-McClellan method can weight the error
differently.
146
7.6 Comments on IIR and FIR Discrete-Time
Filters
What type of system is best, IIR or FIR?
Why give so many different design methods?
Which method yields the best result?
147
7.6 Comments on IIR and FIR Discrete-Time
Filters
148
Closed-
Form
Formulas
Generalized
Linear Phase
Order
IIR Yes No Low
FIR No Yes High
7.2.1 Properties of Commonly Used Windows
Their Fourier transforms are concentrated
around
They have a simple functional form that allows
them to be computed easily.
149
0 = w
The Fourier transform of the Bartlett
window can be expressed as a product of
Fourier transforms of rectangular windows.
The Fourier transforms of the other
windows can be expressed as sums of
frequency-shifted Fourier transforms of
rectangular windows.(Problem7.34)