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

Symmetric Adaptive Decorrelation. More...

Functions

void spr_sad_ffsad (int n, float y1[], float y2[], float e1[], float e2[], float u1[], float u2[], float w1[], float w2[], int lw1, int lw2, float mu1, float mu2)
 
void spr_sad_fbsad (int n, float y1[], float y2[], float u1[], float u2[], float w1[], float w2[], int lw1, int lw2, float mu1, float mu2)
 

Detailed Description

Symmetric Adaptive Decorrelation.

Author
Stefaan Van Gerven
Date
19 May 1992

ffsad() calculates both the intermediate decorrelated signals e1, e2 and the finally reconstructed signals u1, u2 for the SAD-algorithm. Filter coefficients are updated, with exception of the zeroth order coefficients which are assumed to remain 0.

fbsad() calculates the finally reconstructed signals u1, u2 for the SAD-algorithm. Filter coefficients are updated, with exception of the zeroth order coefficients which are assumed to remain 0.

formulas:

    e1[i] = y1[i] - SUM(w1[j]*y2[i-j]) with SUM j: 0:lw1
    e2[i] = y2[i] - SUM(w2[j]*y1[i-j]) with SUM j: 0:lw2
    w1[j] = w1[j] + 2*mu*e1[i]*e2[i-j] with j: 1:lw1  w1[0]=0
    w2[j] = w2[j] + 2*mu*e2[i]*e1[i-j] with j: 1:lw2  w2[0]=0

arguments:

    - n number of outputs to be computed
    - y1[] first "mixed" signal (input)
    - y2[] second "mixed" signal (input)
    - e1[] first error signal, intermediate result (in-output)
    - e2[] second error signal, intermediate result (in-output)
    - u1[] first reconstructed signal, final result (in-output)
    - u2[] second reconstructed signal, final result (in-output)
    - w1[] filter coefficients for first filter (in-output)
    - w2[] filter coefficients for second filter (in-output)
    - lw1 filter length of first filter (0:lw1) (input)
    - lw2 filter length of second filter (0:lw2) (input)
    - mu1 adaptation constant for first filter (input)
    - mu2 adaptation constant for second filter (input)
    - norm specifies to use normalisation or not (input)
    - adap specifies to adapt coefficients or not

remarks:

    - the non-adaptation of the zeroth order coefficient makes
      things more straightforward to implement, however it can be
      added in feefdforward with an extra computational cost in
      the postprocesing, the feedback requires more attention but
      rearranging some terms makes things possible
    - y1[], y[2] are addressed with negative coefficients, beware
      of correct initialization
    - e1[] e2[] are not used in the feedback implementation, since
      no intermediate results are computed there, in feedforward
      they are addressed with negative coefficients for decorrela-
      tion purposes, so beware of correct initialization
    - u1[] u2[] are addressed with negative coefficients too, in
      the feedforward this is because of the IIR-nature of the
      postprocessing filter, in the feedback for decorrelation
      purposes so again beware of correct initialization
    - w1[] and w2[] should be initialized too
Revision History:
Future
options for: adaptation or not, full normalization and zeroth order coefficients