Skip to content

IIR filter and design functions


iir function

template <typename T, typename E1>
expression_handle<T, 1> iir(E1 &&e1, const zpk<T> &params)

Returns template expressions that applies biquad filter to the input.
Param e1 Input expression
Param params IIR filter in ZPK form
Details This overload converts ZPK to biquad coefficients using to_sos function at every call


iir_bandpass function

template <typename T>
zpk<T>
iir_bandpass(const zpk<T> &filter, identity<T> lowfreq,
             identity<T> highfreq, identity<T> fs = T(2.0))

Calculates zero-pole-gain coefficients for the band-pass IIR filter
Param filter Filter type: chebyshev1, chebyshev2, bessel, butterworth
Param lowfreq Low cutoff frequency (Hz)
Param lowfreq High cutoff frequency (Hz)
Param fs Sampling frequency (Hz)
Returns The resulting zpk filter


iir_bandstop function

template <typename T>
zpk<T>
iir_bandstop(const zpk<T> &filter, identity<T> lowfreq,
             identity<T> highfreq, identity<T> fs = T(2.0))

Calculates zero-pole-gain coefficients for the band-stop IIR filter
Param filter Filter type: chebyshev1, chebyshev2, bessel, butterworth
Param lowfreq Low cutoff frequency (Hz)
Param lowfreq High cutoff frequency (Hz)
Param fs Sampling frequency (Hz)
Returns The resulting zpk filter


iir_highpass function

template <typename T>
zpk<T> iir_highpass(const zpk<T> &filter,
                    identity<T> frequency,
                    identity<T> fs = T(2.0))

Calculates zero-pole-gain coefficients for the high-pass IIR filter
Param filter Filter type: chebyshev1, chebyshev2, bessel, butterworth
Param frequency Cutoff frequency (Hz)
Param fs Sampling frequency (Hz)
Returns The resulting zpk filter


iir_lowpass function

template <typename T>
zpk<T> iir_lowpass(const zpk<T> &filter,
                   identity<T> frequency,
                   identity<T> fs = T(2.0))

Calculates zero-pole-gain coefficients for the low-pass IIR filter
Param filter Filter type: chebyshev1, chebyshev2, bessel, butterworth
Param frequency Cutoff frequency (Hz)
Param fs Sampling frequency (Hz)
Returns The resulting zpk filter


Auto-generated from sources, Revision 5191a48df06ea47104ca67db19fa82058d09c20a, https://github.com/kfrlib/kfr/blob/5191a48df06ea47104ca67db19fa82058d09c20a/include/kfr/