Perhaps the most commonly employed error criterion in
signal
processing is the
leastsquares error criterion.
Let
denote some ideal
filter impulse response, possibly
infinitely long, and let
denote the impulse response of a
length
causal FIR filter that we wish to design. The sum of
squared errors is given by

(5.4) 
where
does not depend on
. Note that
.
We can minimize the error by simply matching the first
terms in
the desired impulse response. That is, the optimal leastsquares FIR
filter has the following ``tap'' coefficients:

(5.5) 
The same solution works also for any
norm (§
4.10.1).
That is, the error

(5.6) 
is also minimized by matching the leading
terms of the desired
impulse response.
In the
(leastsquares) case, we have, by the Fourier energy
theorem (§
2.3.8),

(5.7) 
Therefore,
is an optimal
leastsquares
approximation to
when
is given by (
4.5). In
other words, the
frequency response of the filter
is optimal in
the
(leastsquares) sense.
Figure
4.3 shows the
amplitude response of a length
optimal
leastsquares FIR lowpass
filter, for the case in which the
cutoff frequency is onefourth the
sampling rate (
).
We see that, although the
impulse response is optimal in the
leastsquares sense (in fact optimal under any
norm with any
errorweighting), the filter is
quite poor from an audio
perspective. In particular, the stopband gain, in which zero is
desired, is only about 10
dB down. Furthermore, increasing the length
of the filter does not help, as evidenced by the length 71 result in
Fig.
4.4.
Figure:
Amplitude response of a length
FIR lowpassfilter obtained by truncating the ideal impulse response.

It is not the case that a length
FIR filter is too short for
implementing a reasonable audio lowpass filter, as can be seen in
Fig.
4.5. The optimal
Chebyshev lowpass filter in
this figure was designed by the
Matlab statement
hh = firpm(L1,[0 0.5 0.6 1],[1 1 0 0]);
where, in terms of the lowpass design specs defined in §
4.2
above, we are asking for

(passband edge frequency)^{5.5}

(stopband edge frequency)
In this case, the passband and stopband ripple are equally weighted
and thus are minimized equally for the given FIR length
.
^{5.6}
We see that the Chebyshev design has a stopband attenuation better
than 60
dB, no cornerfrequency resonance, and the error is
equiripple in both stopband (visible) and passband (not
visible). Note also that there is a
transition band between
the passband and stopband (specified in the call to
firpm
as being between normalized frequencies 0.5 and 0.6).
The main problem with the leastsquares design examples above is the
absence of a
transition band specification. That is, the
filter specification calls for an infinite rolloff rate from the
passband to the stopband, and this cannot be accomplished by any FIR
filter. (Review Fig.
4.2 for an illustration of more
practical lowpass
filter design specifications.) With a transition
band and a weighting function, leastsquares
FIR filter design can
perform very well in practice. As a rule of thumb, the transition
bandwidth should be at least
, where
is the FIR filter
length in samples. (Recall that the
mainlobe width of a length
rectangular window is
(§
3.1.2).) Such a rule
respects the basic Fourier duality of length in the time domain and
``minimum feature width'' in the
frequency domain.
Next Section: Frequency Sampling Method for
FIR Filter DesignPrevious Section: Lowpass Filter Design Specifications