A commonly asked question among filter designers is why should the optimal
design methods be used at all, or, equivalently, how much does the use of
an optimal technique buy over some other conventional methods. This question
is conveniently answered using Figure 1, a figure extracted
from [1] and modified to use the definitions of variables employed in this
technical note. The figure shows the value of the design parameter αα
needed to attain a specific degree of stopband suppression in lowpass filters.
Since the filter order NN and therefore the amount of
computationR=NfsR=Nfs
are directly proportional to αα, it serves as an excellent indicator
for comparisons.
Curves for three design methods are shown, windowing techniques, so-called
“frequency sampling" techniques, and the optimal, equal-ripple design
produced by the Parks-McClellan program. In each case there are some variations
depending on the choice of design parameters other than stopband ripple. For
example, the optimal technique shows a band of results indexed by the amount of
passband ripple (hence δ1δ1) specified. The figure shows that, for
modest degrees of stopband suppression, all of the methods work about
equally well. For high degrees of suppression, however, the optimal technique
allows values of αα to be attained which are on the order of half of
those attainable with the windowing methods and about 60-70% of the
frequency sampling method. Since computation is directly proportional
to αα, these saving are directly translatable into hardware and/or runtime
improvements.
Why, one might ask, is the optimal method significantly better than, say,
the window method? A fuller answer is presently shortly, but a simple one is
that the optimal methods allow the designer to avoid overdesigning portions of
the frequency response about which he or she needn't exert as much control. For
example, recall the design example discussed in the section "Conversion of Specifications" from the module titled "Statement of the Optimal Linear Phase FIR Filter Design Problem".
In that case a set of reasonable specifications was developed which allowed
the magnitude of the
passband ripple to be almost 29 times larger than the stopband ripple. Since
the Parks-McClellan design package allows the design of weighted
equal-ripple filters this disparity can be accommodated.
Window-designed filters,
however, are constrained to have exactly the same passband ripple δ1δ1
as stopband ripple δ2δ2. Effectively the optimal design methods
allow the degrees of freedom in the impulse response to be focused on the
most stressing parts of the frequency response design while the window method
treats all parts equally. The frequency-sampling method falls in between.
More insight into the meaning of the design parameter αα can be gained
by examining all three aforementioned design methods in terms of the inverse
discrete Fourier transform. Suppose that our objective, as it is, is to
synthesize an N-point FIR filter. Suppose further that we
use the approach of specifying the frequency response we desire with equally
spaced samples in the frequency domain and then use the inverse discrete
Fourier transform (DFT) to transform the frequency specification into a
time-domain impulse response. This approach is shown in graphical form in
Figure 2.
Analytically there is a one-to-one relationship between the N points of
an FIR impulse response and the frequency response of the filter measured
at N equally-spaced frequencies between 0 and fsfs Hertz. Specifically it
is straight-forward to show that the impulse response h(k)h(k) and the complex
gains h^nh^n, for 0≤n≤N-10≤n≤N-1, are invertibly related, where
the filter's frequency response is given by
H
(
f
)
=
1
N
∑
n
=
0
N
-
1
h
^
n
s
i
n
π
(
N
f
T
-
n
)
s
i
n
π
(
f
T
-
n
N
)
.
H
(
f
)
=
1
N
∑
n
=
0
N
-
1
h
^
n
s
i
n
π
(
N
f
T
-
n
)
s
i
n
π
(
f
T
-
n
N
)
.
(1)
Thus choosing the complex gains h^nh^n is equivalent to choosing the
impulse response h(k),0≤k≤N-1h(k),0≤k≤N-1, and, through
Equation 1, to the filter frequency response at all values
of ff between 0 and fsfs Hertz. By examining Figure 2 it
can be seen that choosing a frequency response (and hence an impulse response)
can be intuitively viewed as adjusting the gain levers on a graphic equalizer
of the type
now used on home stereos. Each lever sets the gain, denoted here as
h^nh^n, of a filter given by
H
n
(
f
)
=
1
N
s
i
n
π
(
N
f
T
-
n
)
s
i
n
π
(
f
T
-
n
N
)
.
H
n
(
f
)
=
1
N
s
i
n
π
(
N
f
T
-
n
)
s
i
n
π
(
f
T
-
n
N
)
.
(2)
By setting these N gain values optimally the best
possible frequency response is
attained.
The analogy of the graphic equalizer can be followed somewhat further.
Figure 2 suggests that the FIR design problem can be
thought in the terms of the structure shown in Figure 3.
The input signal is applied to all NN of what we'll the basis filters,
where the frequency response of the nn-th filter is given by
Equation 2. As noted earlier these basis filters, so called
because they form the linearly independent set of filters used to
construct H(f)H(f), are frequency-shifted versions of the same fairly
sloppy bandpass filter. These filter outputs are then scaled by the
complex coefficients h^nh^n and then added together to produce the
observable filter output. Thus the basis filters are fixed and the
h^nh^n control the frequency and hence impulse response of the
digital filter. It should be noted that the filter is not usually actually
constructed as shown in Figure 3 but it is a
very convenient analogy when trying to understand the relationships between
the various filter synthesis methods.
Now we shall use the model.
In our quest for the true meaning of αα, consider first the design of
a simple lowpass filter. We desire the cutoff frequency fcfc and the
stopband edge fstfst to be as low
as possible and allow the peak stopband ripple to be quite large. Using the
graphic equalizer model just discussed yields the design shown in
Figure 4. Only one filter, the one centered at DC, is used.
Its gain is set to unity and that of all others is set to zero. The peak
stopband ripple is determined by the first sidelobe of the only active
filter. It can be computed to be about 13 dB below the maximum passband power
level (measured at DC).
What is ΔfΔf in this case? Graphically it can be seen to be somewhat
less than than the frequency interval between DC and the first transmission
zero of Hn(f)Hn(f) which occurs at f=fsNf=fsN. Suppose that
we now rewrite equation 2 from the module titled "Filter Sizing" as
Δ
f
≈
α
f
s
N
.
Δ
f
≈
α
f
s
N
.
(3)
Thus we see that in the simple filter designed in Figure 4
that associated value of αα is slightly less than one.
Now suppose that we attempt to design a better filter, again using the graphic
equalizer method. Our first objective is to reduce the size of the stopband
ripple. To do this we leave h^0h^0 set to
unity and increase the values of
h^1h^1 and h^2h^2 slightly
so that their positive mainlobe values cancel the
negative-going first sidelobe of h^0h^0. All
other filter gain levels will
remain set to zero. The effects of this strategy are seen in
Figure 5.
The first objective, that of reducing the peak stopband ripple, is achieved.
By choosing h^1h^1 and h^2h^2 just right,
the first sidelobe of h^0h^0 can
be effectively cancelled, leaving the other sidelobes to compete for the
peak value. The second effect is less desirable, however. From graphical
inspection it is clear that ΔfΔf, the frequency interval between
fcfc and fstfst, has grown. It now exceeds fsNfsN, thus
making αα greater than unity.
These trends continue as more and more filter gains h^nh^n are allowed to
become non-zero in the quest of further reducing the peak stopband ripple.
The peak is reduced, the ripple structure begins to approach the
Chebyshev equal-ripple firm seen in Figure 1 from the module titled "Statement of the Optimal Linear Phase FIR Filter Design Problem",
and the transition
band stretches out as more filters are used to try to constrain the stopband
frequency response to the stopband ripple goals. The design parameter αα
is just a measure of the number of filters, or, equivalently, the number of
equalizer levers, needed to transit from one gain
level (e.g., the passband) to another (e.g., the stopband) while achieving the
desired passband and stopband ripple performance. Since fsNfsN is
the spacing between the bins of an N-point DFT, the term αα can also
be thought of as the number of DFT bins needed to make a gain transition. This
interpretation is explored next.