iirinterp_crcf

Infinite impulse response (IIR) interpolator

Variants: iirinterp_cccf, iirinterp_crcf, iirinterp_rrrf

Public Functions

iirinterp_crcf iirinterp_crcf_create(unsigned int _M, float * _b, unsigned int _nb, float * _a, unsigned int _na)
iirinterp_crcf iirinterp_crcf_create_default(unsigned int _M, unsigned int _order)
iirinterp_crcf iirinterp_crcf_create_prototype(unsigned int _M, liquid_iirdes_filtertype _ftype, liquid_iirdes_bandtype _btype, liquid_iirdes_format _format, unsigned int _order, float _fc, float _f0, float _ap, float _as)
iirinterp_crcf iirinterp_crcf_copy(iirinterp_crcf _q)
void iirinterp_crcf_destroy(iirinterp_crcf _q)
void iirinterp_crcf_print(iirinterp_crcf _q)
void iirinterp_crcf_reset(iirinterp_crcf _q)
void iirinterp_crcf_execute(iirinterp_crcf _q, float complex _x, float complex * _y)
void iirinterp_crcf_execute_block(iirinterp_crcf _q, float complex * _x, unsigned int _n, float complex * _y)
float iirinterp_crcf_groupdelay(iirinterp_crcf _q, float _fc)

Interfaces

iirinterp_crcf iirinterp_crcf_create(unsigned int _M, float * _b, unsigned int _nb, float * _a, unsigned int _na)

Create infinite impulse response interpolator from external coefficients. Note that the number of feed-forward and feed-back coefficients do not need to be equal, but they do need to be non-zero. Furthermore, the first feed-back coefficient \(a_0\) cannot be equal to zero, otherwise the filter will be invalid as this value is factored out from all coefficients. For stability reasons the number of coefficients should reasonably not exceed about 8 for single-precision floating-point.

  • _M : interpolation factor, 2 <= _M
  • _b : feed-forward coefficients (numerator), shape: (_nb, 1)
  • _nb : number of feed-forward coefficients, 0 < _nb
  • _a : feed-back coefficients (denominator), shape: (_na, 1)
  • _na : number of feed-back coefficients, 0 < _na

iirinterp_crcf iirinterp_crcf_create_default(unsigned int _M, unsigned int _order)

Create interpolator object with default Butterworth prototype

  • _M : interpolation factor, 2 <= _M
  • _order : filter order, 0 < _order

iirinterp_crcf iirinterp_crcf_create_prototype(unsigned int _M, liquid_iirdes_filtertype _ftype, liquid_iirdes_bandtype _btype, liquid_iirdes_format _format, unsigned int _order, float _fc, float _f0, float _ap, float _as)

Create IIR interpolator from prototype

  • _M : interpolation factor, 2 <= _M
  • _ftype : filter type (e.g. LIQUID_IIRDES_BUTTER)
  • _btype : band type (e.g. LIQUID_IIRDES_BANDPASS)
  • _format : coefficients format (e.g. LIQUID_IIRDES_SOS)
  • _order : filter order, 0 < _order
  • _fc : low-pass prototype cut-off frequency, 0 <= _fc <= 0.5
  • _f0 : center frequency (band-pass, band-stop), 0 <= _f0 <= 0.5
  • _ap : pass-band ripple in dB, 0 < _ap
  • _as : stop-band ripple in dB, 0 < _as

iirinterp_crcf iirinterp_crcf_copy(iirinterp_crcf _q)

Copy object including all internal objects and state

void iirinterp_crcf_destroy(iirinterp_crcf _q)

Destroy interpolator object and free internal memory

void iirinterp_crcf_print(iirinterp_crcf _q)

Print interpolator object internals to stdout

void iirinterp_crcf_reset(iirinterp_crcf _q)

Reset interpolator object

void iirinterp_crcf_execute(iirinterp_crcf _q, float complex _x, float complex * _y)

Execute interpolation on single input sample and write \(M\) output samples (\(M\) is the interpolation factor)

  • _q : iirinterp object
  • _x : input sample
  • _y : output sample array, shape: (_M, 1)

void iirinterp_crcf_execute_block(iirinterp_crcf _q, float complex * _x, unsigned int _n, float complex * _y)

Execute interpolation on block of input samples

  • _q : iirinterp object
  • _x : input array, shape: (_n, 1)
  • _n : size of input array
  • _y : output sample array, shape: (_M*_n, 1)

float iirinterp_crcf_groupdelay(iirinterp_crcf _q, float _fc)

Compute and return group delay of object

  • _q : filter object
  • _fc : frequency to evaluate