AnsweredAssumed Answered

ADAU1761 Adaptive filter

Question asked by JohnAmpetronic on Jan 9, 2014
Latest reply on Oct 16, 2015 by JohnAmpetronic

Hi All

 

I have been playing with module for a couple of months and I would like to help anyone who starts using it with the results of my tests.  The toolbox documentation leaves a few gaps which I will try to fill here    I would appreciate any comments as I might have got this completely wrong.

 

A standard adaptive filter is shown BELOW together with the assumed pins of the SigmaStudio block.

 

AdativeFilter_std.png

The first green pin on the left hand side (PIN0) is the non-inverting input to the mixer at the output of the NLMS.  The second pin (PIN1) is the input to the FIR filter of the NLMS block.  The third orange pin on the left (PIN2) is the adaption enable pin that controls the filter adaption.  The coefficients can only change when this input is high (not 0). On the right of the block is the NLMS outputs.  The first blue pin (PIN3) is the output of the mixer.  The second pin on the right (PIN4) is the output of the FIR filter. The #taps box controls the number of taps used in the FIR filter.  Alpha is the step-size and TC is the time constant for the normalisation. 

AdativeFilter_ss.png

First - Bretts example circuit for the filter needs a couple of changes

 

1) The adaptive filter length needs to be greater than the delay applied to the noise signal.  The adaptive filter is trying to delay the noise by a similar amount which it cannot do if its length is shorter than the delay block.

 

2) The Alpha (update) coefficient needs to be small - large values will cause the filter to be unstable (try the below circuit with Alpha = 0.1).

 

AdaptDemo.png

 

There is, I think, a bug in the code in that the output of the filter from the orange control port should be 0 before the filter has adapted as the FIR coefficients should all be zero.  This is not the case as there is output from this port even if the filter is never allowed to adapt.

 

You cannot use this block for noise cancellation as that requires an additional FIR filter in the error update path which is internal to the block which is a pity. 

 

If time permits could you alter this block or produce a derivative so that

a)  The FIR coefficients are initialised to zero

b) The adaptive filter alone is implemented.  We can add the mixers etc outside of the block.  This will make debugging much easier and allow noise cancellation and other optimisations to be performed.

 

If any of this wrong please tell me - it might explain why I have problems in my application!

 

Regards

 

John

Outcomes