Skip to content

Function ::kfr_iir_design_f64

function kfr_iir_design_f64(KFR_IIR_PROTOTYPE, KFR_IIR_RESPONSE, int, kfr_f64, kfr_f64, kfr_f64, kfr_f64, kfr_f64, kfr_f64 *, size_t) capi

size_t kfr_iir_design_f64(KFR_IIR_PROTOTYPE prototype, KFR_IIR_RESPONSE response, int order,
                          kfr_f64 rp, kfr_f64 rs, kfr_f64 frequency, kfr_f64 high_frequency,
                          kfr_f64 fs, kfr_f64* sos, size_t sos_capacity)

Designs a digital IIR filter and returns it as second-order sections (double precision).

Parameters
prototype Analog prototype family (see KFR_IIR_PROTOTYPE ).
response Filter response type (see KFR_IIR_RESPONSE ).
order Prototype order. Must be 1..24 for Butterworth and Bessel, and at least 1 otherwise.
rp Passband ripple in dB. Used by Chebyshev I and elliptic only. Must be greater than zero.
rs Stopband attenuation in dB. Used by Chebyshev II and elliptic only. Must be greater than zero.
frequency Cutoff frequency in Hz, or lower edge for band-pass and band-stop.
high_frequency Upper edge in Hz for band-pass and band-stop. Ignored otherwise.
fs Sample rate in Hz. Must be greater than zero.
sos Output buffer receiving 6 * sections scalars (a0, a1, a2, b0, b1, b2) , one group per section. May be NULL . Nothing is written if NULL or if sos_capacity is smaller than the returned count.
sos_capacity Capacity of sos in biquad sections.
Returns
Number of biquad sections, or 0 on error (see kfr_last_error() ).

Fully qualified name: kfr_iir_design_f64(KFR_IIR_PROTOTYPE, KFR_IIR_RESPONSE, int, kfr_f64, kfr_f64, kfr_f64, kfr_f64, kfr_f64, kfr_f64 *, size_t)

Declared at capi.h:1148