kaiser_param

Computation of the parameters of a Kaiser filter.

Namespace: dsp::filter

Prototype

tuple<float, int> kaiser_param(float atten_db, float df)

Parameters

atten_dbAttenuation in dB in the stop-band (should be a positive value).
dfTransition bandwidth (normalized to the sampling frequency)

Returns

\(\beta,n\)

Description

This function will compute, for a Kaiser filter, the \(\beta\) parameter and the required order for a specified attenuation and transition bandwidth.

\[ n = (A - 7.95) / (2.285 \cdot 2 \pi d_f) \]

\[ \beta = \begin{cases} 0.1102 (A - 8.7) & \mbox{si } A > 50\textrm{ dB} \\ 0.5842 \cdot (A - 21)^{0.4} + 0.07886 \cdot (A - 21) & \mbox{si } 21 \textrm{ dB} \leq A \leq 50\textrm{ dB}\\ 0 & \mbox{sinon} \end{cases} \]

Example

// Parameters for 60 dB of transition,
// and a transition bandwidth of  one tenth of the sampling frequency.
let [β, n] = kaiser_param(60, 0.1);

See also

window_kaiser(), window_kaiser1()