Digital Signal Processing Reference
In-Depth Information
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
0
0.25
p
0.5
p
0.75
p
p
0
0.25
p
0.5
p
0.75
p
p
(a)
(b)
and two of these alternations occur at the stop-band edge frequencies
Ω
s
and
π
. In other words, Fig. 15.18(a) satisfies the alternation theorem.
Figure 15.18(b) shows the frequency response of a type II FIR filter with
length
N
=
20. The degree
L
of cos(
Ω
) in polynomial
ε
(
Ω
) is given by
L
=
(20
−
2)
/
2
=
9. Based on the alternation theorem, there should be at least
L
+
2
=
11 alternations in polynomial
ε
(
Ω
). In Fig. 15.18(b), we observe 12
alternations in
H
(
Ω
), which exceed the minimum required number of alterna-
tions. Therefore, Fig. 15.18(b) satisfies the alternation theorem.
Fig. 15.18. Magnitude spectrum
of lowpass FIR filters. (a) Type I
FIR filter of length
N
= 13.
(b) Type II FIR filter of length
N
= 20.
15.5.2 Parks-McClellan algorithm
In this section we present steps of the Parks-McClellan algorithm for designing
optimal filters. In this discussion, we will consider only type I filters. Algorithms
for other types of filters can be obtained in the same manner. To derive the
Parks-McClellan algorithm, the approximated error function in Eq. (15.49b) is
expressed as follows:
G
(
Ω
)
+
ε
(
Ω
)
W
(
Ω
)
≈
H
d
(
Ω
)
.
(15.50)
For type I filters, we obtain
G
(
Ω
) from Table 14.2 as follows:
(
N
−
1)
/
2
N
−
1
2
N
−
1
2
G
(
Ω
)
=
h
+
2
h
−
k
cos(
Ω
k
)
.
k
=
1
Since we are interested in calculating (
N
−
1)
/
2
+
1, or
L
+
1, coefficients
of
h
[
k
]in
G
(
Ω
) and the value of the maximum error
ε
max
, we pick
L
+
2
Search WWH ::
Custom Search