firfarrow_rrrf

Finite impulse response (FIR) Farrow filter for timing delay

Variants: firfarrow_crcf, firfarrow_rrrf

Public Functions

firfarrow_rrrf firfarrow_rrrf_create(unsigned int _h_len, unsigned int _p, float _fc, float _as)
int firfarrow_rrrf_destroy(firfarrow_rrrf _q)
int firfarrow_rrrf_print(firfarrow_rrrf _q)
int firfarrow_rrrf_reset(firfarrow_rrrf _q)
int firfarrow_rrrf_push(firfarrow_rrrf _q, float _x)
int firfarrow_rrrf_set_delay(firfarrow_rrrf _q, float _mu)
int firfarrow_rrrf_execute(firfarrow_rrrf _q, float * _y)
int firfarrow_rrrf_execute_block(firfarrow_rrrf _q, float * _x, unsigned int _n, float * _y)
unsigned int firfarrow_rrrf_get_length(firfarrow_rrrf _q)
int firfarrow_rrrf_get_coefficients(firfarrow_rrrf _q, float * _h)
int firfarrow_rrrf_freqresponse(firfarrow_rrrf _q, float _fc, float complex * _H)
float firfarrow_rrrf_groupdelay(firfarrow_rrrf _q, float _fc)

Interfaces

firfarrow_rrrf firfarrow_rrrf_create(unsigned int _h_len, unsigned int _p, float _fc, float _as)

Create firfarrow object

  • _h_len : filter length, 2 <= _h_len
  • _p : polynomial order, 1 <= _p
  • _fc : filter cutoff frequency, 0 <= _fc <= 0.5
  • _as : stopband attenuation [dB], 0 < _as

int firfarrow_rrrf_destroy(firfarrow_rrrf _q)

Destroy firfarrow object, freeing all internal memory

int firfarrow_rrrf_print(firfarrow_rrrf _q)

Print firfarrow object's internal properties

int firfarrow_rrrf_reset(firfarrow_rrrf _q)

Reset firfarrow object's internal state

int firfarrow_rrrf_push(firfarrow_rrrf _q, float _x)

Push sample into firfarrow object

  • _q : firfarrow object
  • _x : input sample

int firfarrow_rrrf_set_delay(firfarrow_rrrf _q, float _mu)

Set fractional delay of firfarrow object

  • _q : firfarrow object
  • _mu : fractional sample delay, -1 <= _mu <= 1

int firfarrow_rrrf_execute(firfarrow_rrrf _q, float * _y)

Execute firfarrow internal dot product

  • _q : firfarrow object
  • _y : output sample pointer

int firfarrow_rrrf_execute_block(firfarrow_rrrf _q, float * _x, unsigned int _n, float * _y)

Execute firfarrow filter on block of samples. In-place operation is permitted (the input and output arrays may share the same pointer)

  • _q : firfarrow object
  • _x : input array, shape: (_n, 1)
  • _n : input, output array size
  • _y : output array, shape: (_n, 1)

unsigned int firfarrow_rrrf_get_length(firfarrow_rrrf _q)

Get length of firfarrow object (number of filter taps)

int firfarrow_rrrf_get_coefficients(firfarrow_rrrf _q, float * _h)

Get coefficients of firfarrow object

  • _q : firfarrow object
  • _h : output coefficients pointer, shape: (_h_len, 1)

int firfarrow_rrrf_freqresponse(firfarrow_rrrf _q, float _fc, float complex * _H)

Compute complex frequency response

  • _q : filter object
  • _fc : frequency
  • _H : output frequency response

float firfarrow_rrrf_groupdelay(firfarrow_rrrf _q, float _fc)

Compute group delay [samples]

  • _q : filter object
  • _fc : frequency