All of the discussion to this point has focused on lowpass filters.
Practical applications require other types, of course, including highpass,
bandpass, and bandstop designs. In fact the analysis presented in the
previous sections applies to all of these design criteria and the rules
for filter length estimation can be used almost directly. In general
Equation 1
and Equation 2 from the module titled "Filter Sizing"
apply when one of
the equal ripple specifications dominates all others and when one of the
transition band specifications dominates all others. As a practical matter
this means that δiδi dominates if it is less than one-tenth of all
other rippple specifications and that ΔfiΔfi dominates if it is
simply less than all others. Suppose we define δδ and ΔfΔf by
the equations:
δ
=
m
i
n
{
δ
i
}
, for all pass and stopbands i, and
Δ
f
=
m
i
n
{
Δf
k
}
for all transition bands k
δ
=
m
i
n
{
δ
i
}
, for all pass and stopbands i, and
Δ
f
=
m
i
n
{
Δf
k
}
for all transition bands k
δ
=
min
{
δ
i
}
,
for all pass and stopbands i, and
δ=min{
δ
i
},for all pass and stopbands i, and
(1)
Δ
f
=
min
{
Δ
f
k
}
for all transition bands k
Δf=min{Δ
f
k
}for all transition bands k
(2)If so then equation Equation 1 from the module titled "Filter Sizing"
can be used directly and the
equation for αα becomes
α
=
0
.
22
-
l
o
g
e
δ
π
.
α
=
0
.
22
-
l
o
g
e
δ
π
.
(3)
A final hint - Watch out for the implicit boundary conditions present in
the design of linear phase FIR digital filters in two cases: even order,
symmetric response and odd order, antisymmetrical response. In both of these
cases the underlying equations for the filter's frequency response constrain
it to equal exactly zero at fs2fs2. This is obviously not a problem
for lowpass filters, since the desired gain at fs2fs2 is zero
already. However, in the design of multiband and highpass filters an
inordinate amount of engineering time has been spent trying to design
even-order filters when in fact it is impossible to do so. The Parks-McClellan
algorithm will gamely try, but will fail. As a rule, use odd values of NN
for highpass and multiband filters requiring nonzero response at
fs2fs2 and use even-order filters for differentiators.