SPRAAK
|
Calculates FIR-adaptive filters with LMS-algorithm. More...
Functions | |
void | spr_lms (int n, float d[], float *x[], float e[], float *w[], int lw, float mu[], int nref, int delta, int norm, int adap) |
Calculates FIR-adaptive filters with LMS-algorithm.
lms() calculates the error signal and the updated filter coefficients for the basic and normalised Widrow-LMS for single- and multichannel FIR-adaptive filters formulas:
e[i] = d[i-delta] - SUM( w[iref][j]*x[iref][i-j] ) with SUM j : 0:lw iref : 0:(nref-1) w[iref][j] += 2 * mu[iref] * e[i] * x[iref][i-j] with j : 0:lw iref : 0:(nref-1)
arguments:
- n number of outputs to be computed (input) - d[] desired signals (input) - x[] noise references (input) - e[] error signals (output) - w[] filter coefficients for all channels (in-output) - lw filter length (0:lw) (input) - mu[] (normalised) adaptation constants (input) - nref number of noise references (input) - delta number of delays for signal channel (input) - norm specifies to use normalisation or not (input) - adap specifies to adapt coefficients or not (intput)
remarks:
- x[] is addressed with negative coefficients, beware of correct initialization - d[] is addressed with negative coefficients to allow for a delay, beware of correct initialisation - w[] should be initialized too