eqlms_rrrf

Least mean-squares equalization object

Variants: eqlms_cccf, eqlms_rrrf

Public Functions

eqlms_rrrf eqlms_rrrf_create(float * _h, unsigned int _n)
eqlms_rrrf eqlms_rrrf_create_rnyquist(int _type, unsigned int _k, unsigned int _m, float _beta, float _dt)
eqlms_rrrf eqlms_rrrf_create_lowpass(unsigned int _n, float _fc)
eqlms_rrrf eqlms_rrrf_recreate(eqlms_rrrf _q, float * _h, unsigned int _n)
eqlms_rrrf eqlms_rrrf_copy(eqlms_rrrf _q)
int eqlms_rrrf_destroy(eqlms_rrrf _q)
int eqlms_rrrf_reset(eqlms_rrrf _q)
int eqlms_rrrf_print(eqlms_rrrf _q)
float eqlms_rrrf_get_bw(eqlms_rrrf _q)
int eqlms_rrrf_set_bw(eqlms_rrrf _q, float _lambda)
unsigned int eqlms_rrrf_get_length(eqlms_rrrf _q)
const float * eqlms_rrrf_get_coefficients(eqlms_rrrf _q)
int eqlms_rrrf_copy_coefficients(eqlms_rrrf _q, float * _w)
void eqlms_rrrf_get_weights(eqlms_rrrf _q, float * _w)
int eqlms_rrrf_push(eqlms_rrrf _q, float _x)
int eqlms_rrrf_push_block(eqlms_rrrf _q, float * _x, unsigned int _n)
int eqlms_rrrf_execute(eqlms_rrrf _q, float * _y)
int eqlms_rrrf_decim_execute(eqlms_rrrf _q, float * _x, float * _y, unsigned int _k)
int eqlms_rrrf_execute_block(eqlms_rrrf _q, unsigned int _k, float * _x, unsigned int _n, float * _y)
int eqlms_rrrf_step(eqlms_rrrf _q, float _d, float _d_hat)
int eqlms_rrrf_step_blind(eqlms_rrrf _q, float _d_hat)
int eqlms_rrrf_train(eqlms_rrrf _q, float * _w, float * _x, float * _d, unsigned int _n)

Interfaces

eqlms_rrrf eqlms_rrrf_create(float * _h, unsigned int _n)

Create LMS EQ initialized with external coefficients

  • _h : filter coefficients; set to NULL for {1,0,0...}, shape: (_n, 1)
  • _n : filter length

eqlms_rrrf eqlms_rrrf_create_rnyquist(int _type, unsigned int _k, unsigned int _m, float _beta, float _dt)

Create LMS EQ initialized with square-root Nyquist prototype filter as initial set of coefficients. This is useful for applications where the baseline matched filter is a good starting point, but where equalization is needed to properly remove inter-symbol interference. The filter length is \(2 k m + 1\)

  • _type : filter type (e.g. LIQUID_FIRFILT_RRC)
  • _k : samples/symbol
  • _m : filter delay (symbols)
  • _beta : rolloff factor (0 < beta <= 1)
  • _dt : fractional sample delay

eqlms_rrrf eqlms_rrrf_create_lowpass(unsigned int _n, float _fc)

Create LMS EQ initialized with low-pass filter

  • _n : filter length
  • _fc : filter cut-off normalized to sample rate, 0 < _fc <= 0.5

eqlms_rrrf eqlms_rrrf_recreate(eqlms_rrrf _q, float * _h, unsigned int _n)

Recreate LMS EQ initialized with external coefficients

  • _q : old equalization object
  • _h : filter coefficients; set to NULL for {1,0,0...}, shape: (_n, 1)
  • _n : filter length

eqlms_rrrf eqlms_rrrf_copy(eqlms_rrrf _q)

Copy object including all internal objects and state

int eqlms_rrrf_destroy(eqlms_rrrf _q)

Destroy equalizer object, freeing all internal memory

int eqlms_rrrf_reset(eqlms_rrrf _q)

Reset equalizer object, clearing internal state

int eqlms_rrrf_print(eqlms_rrrf _q)

Print equalizer internal state

float eqlms_rrrf_get_bw(eqlms_rrrf _q)

Get equalizer learning rate

int eqlms_rrrf_set_bw(eqlms_rrrf _q, float _lambda)

Set equalizer learning rate

  • _q : equalizer object
  • _lambda : learning rate, 0 < _lambda

unsigned int eqlms_rrrf_get_length(eqlms_rrrf _q)

Get length of equalizer object (number of internal coefficients)

const float * eqlms_rrrf_get_coefficients(eqlms_rrrf _q)

Get pointer to coefficients array

int eqlms_rrrf_copy_coefficients(eqlms_rrrf _q, float * _w)

Copy internal coefficients to external buffer

  • _q : filter object
  • _w : pointer to output coefficients array, shape: (_n, 1)

void eqlms_rrrf_get_weights(eqlms_rrrf _q, float * _w)

Get equalizer's internal coefficients

Warning: This method is deprecated. use eqlms_xxxt_copy_coefficients(...) instead

  • _q : filter object
  • _w : pointer to output coefficients array, shape: (_n, 1)

int eqlms_rrrf_push(eqlms_rrrf _q, float _x)

Push sample into equalizer internal buffer

  • _q : equalizer object
  • _x : input sample

int eqlms_rrrf_push_block(eqlms_rrrf _q, float * _x, unsigned int _n)

Push block of samples into internal buffer of equalizer object

  • _q : equalizer object
  • _x : input sample array, shape: (_n, 1)
  • _n : input sample array length

int eqlms_rrrf_execute(eqlms_rrrf _q, float * _y)

Execute internal dot product and return result

  • _q : equalizer object
  • _y : output sample

int eqlms_rrrf_decim_execute(eqlms_rrrf _q, float * _x, float * _y, unsigned int _k)

Execute equalizer as decimator

  • _q : equalizer object
  • _x : input sample array, shape: (_k, 1)
  • _y : output sample
  • _k : down-sampling rate

int eqlms_rrrf_execute_block(eqlms_rrrf _q, unsigned int _k, float * _x, unsigned int _n, float * _y)

Execute equalizer with block of samples using constant modulus algorithm, operating on a decimation rate of _k samples.

  • _q : equalizer object
  • _k : down-sampling rate
  • _x : input sample array, shape: (_n, 1)
  • _n : input sample array length
  • _y : output sample array, shape: (_n, 1)

int eqlms_rrrf_step(eqlms_rrrf _q, float _d, float _d_hat)

Step through one cycle of equalizer training

  • _q : equalizer object
  • _d : desired output
  • _d_hat : actual output

int eqlms_rrrf_step_blind(eqlms_rrrf _q, float _d_hat)

Step through one cycle of equalizer training (blind)

  • _q : equalizer object
  • _d_hat : actual output

int eqlms_rrrf_train(eqlms_rrrf _q, float * _w, float * _x, float * _d, unsigned int _n)

Train equalizer object on group of samples

Warning: This method is deprecated. method provides complexity with little benefit

  • _q : equalizer object
  • _w : input/output weights, shape: (_p, 1)
  • _x : received sample vector, shape: (_n, 1)
  • _d : desired output vector, shape: (_n, 1)
  • _n : input, output vector length