Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Kaiser window FIR filter design estimation parameters

`[n,Wn,beta,ftype] = kaiserord(f,a,dev)`

`[n,Wn,beta,ftype] = kaiserord(f,a,dev,fs)`

`c = kaiserord(f,a,dev,fs,'cell')`

`[`

returns a filter order `n`

,`Wn`

,`beta`

,`ftype`

] = kaiserord(`f`

,`a`

,`dev`

)`n`

, normalized frequency band edges
`Wn`

, and a shape factor `beta`

that specify a Kaiser
window for use with the `fir1`

function. To design an FIR filter
`b`

that approximately meets the specifications given by
`f`

, `a`

, and `dev`

, use ```
b =
fir1(n,Wn,kaiser(n+1,beta),ftype,'noscale')
```

.

Be careful to distinguish between the meanings of filter length and filter order. The filter

*length*is the number of impulse response samples in the FIR filter. Generally, the impulse response is indexed from*n*= 0 to*n*=*L*– 1, where*L*is the filter length. The filter*order*is the highest power in a Z-transform representation of the filter. For an FIR transfer function, this representation is a polynomial in*z*, where the highest power is*z*^{L–1}and the lowest power is*z*^{0}. The filter order is one less than the length (*L*– 1) and is also equal to the number of zeros of the*z*polynomial.If, in the vector

`dev`

, you specify unequal deviations across bands, the minimum specified deviation is used, since the Kaiser window method is constrained to produce filters with minimum deviation in all of the bands.In some cases,

`kaiserord`

underestimates or overestimates the order`n`

. If the filter does not meet the specifications, try a higher order such as`n+1`

,`n+2`

, and so on, or a try lower order.Results are inaccurate if the cutoff frequencies are near 0 or the Nyquist frequency, or if

`dev`

is large (greater than 10%).

Given a set of specifications in the frequency domain, `kaiserord`

estimates the minimum FIR filter order that will approximately meet the specifications.
`kaiserord`

converts the given filter specifications into passband and
stopband ripples and converts cutoff frequencies into the form needed for windowed FIR filter
design.

`kaiserord`

uses empirically derived formulas for estimating the orders
of lowpass filters, as well as differentiators and Hilbert transformers. Estimates for
multiband filters (such as bandpass filters) are derived from the lowpass design
formulas.

The design formulas that underlie the Kaiser window and its application to FIR filter design are

$$\beta =\{\begin{array}{ll}0.1102(\alpha -8.7),\hfill & \alpha >50\hfill \\ 0.5842{(\alpha -21)}^{0.4}+0.07886(\alpha -21),\hfill & 21\le \alpha \le 50\hfill \\ 0,\hfill & \alpha <21\hfill \end{array}$$

where *α* = –20log_{10}*δ* is the
stopband attenuation expressed in decibels, and

$$n=\frac{\alpha -7.95}{2.285(\Delta \omega )}$$

where *n* is the filter order and Δ*ω* is the width of
the smallest transition region.

[1] Kaiser, James F. “Nonrecursive
Digital Filter Design Using the I_{0}-sinh Window Function.”
*Proceedings of the 1974 IEEE International Symposium on Circuits and
Systems.* 1974, pp. 20–23.

[2] Digital Signal Processing
Committee of the IEEE Acoustics, Speech, and Signal Processing Society, eds.
*Selected Papers in Digital Signal Processing*. Vol. II. New York: IEEE
Press, 1976.

[3] Oppenheim, Alan V., Ronald W.
Schafer, and John R. Buck. *Discrete-Time Signal Processing.* Upper
Saddle River, NJ: Prentice Hall, 1999.