####
Under the Hood of `kaiserord`

Without `kaiserord`, we would need to implement Kaiser's
formula [115,67] for estimating the Kaiser-window
required to achieve the given filter specs:

where is the desired stop-band attenuation in dB (typical values in audio work are to ). Note that this estimate for becomes too small when the filter pass-band width approaches zero. In the limit of a zero-width pass-band, the frequency response becomes that of the Kaiser window transform itself. A non-zero pass-band width acts as a ``moving average'' lowpass filter on the side-lobes of the window transform, which brings them down in level. The

`kaiserord`estimate assumes some of this side-lobe smoothing is present.

A similar function from [198] for *window
design* (as opposed to filter design^{5.7}) is

where now is the desired

*side-lobe attenuation*in dB (as opposed to stop-band attenuation). A plot showing Kaiser window side-lobe level for various values of is given in Fig.3.28.

Similarly, the filter order is estimated from stop-band attenuation and desired transition width using the empirical formula

(5.13) |

where is in radians between

**0**and .

Without the function `fir1`, we would have to manually
implement the window method of filter design by (1) constructing the
impulse response of the ideal bandpass filter
(a cosine
modulated sinc function), (2) computing the Kaiser window
using
the estimated length and
from above, then finally (3)
windowing the ideal impulse response with the Kaiser window to obtain
the FIR filter coefficients
. A manual design of
this nature will be illustrated in the Hilbert transform example of
§4.6.

**Next Section:**

Comparison to the Optimal Chebyshev FIR Bandpass Filter

**Previous Section:**

Convergence of Remez Exchange