SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
lms.c File Reference

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)
 

Detailed Description

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
Author
Stefaan Van Gerven
Date
17 Sep 1991
Revision History:
16 Feb 1995 - Frank Schoeters
the seventh parameter to the 'lms()' function is now a float array instead of a single float value; now for every channel a different mu value can be specified.