Post Go back to editing

EVAL-ADAU1452 usage of MFxLMS algorithm

Category: Software
Product Number: ADAU1452
Software Version: Version 4.7. Build 0, Rev 1831

We are trying to implement Active Noise Cancelling into a pair of standard headphones using the MFxLMS block in Sigma Studio using an EVAL-ADAU1452RevBZ. We are currently trying to cancel frequencies between 100hz-800hz. We followed the guide that is listed on the filters page here (https://wiki.analog.com/resources/tools-software/sigmastudio/toolbox/filters/mfxlms). We performed the secondary path training by placing the error microphone inside the cup of the headphones and obtained the filter coefficients as seen in the picture below. We have a reference microphone to pick up outside noise on the outside, but it is not currently being used.

After obtaining the secondary path coefficients, we switched the MFxLMS block to runtime mode but we get little to no anti-noise coming out of the output. Below is our schematic design. We are currently trying to cancel out a 300Hz sine tone. Our project sampling rate is 48KHz such as the example and our microphone input and reference tone are being down sampled to 2KHz (the sampling rate the module is listed to operate at). Anti-aliasing filters are included (although we are not positive if they are correct). The anti-noise is then up sampled and interpolated back up to 48KHz and outputted.

We have the following questions after attempting to implement this ourselves:
1. When doing the secondary path training, it states in the documentation that the reference and error microphone should be muted. We found that when the error microphone was muted, the coefficients would stay at 0. When we unmute it, we get coefficients that are all negative in the magnitude of -0.0001. Should we leave the mic unmuted when training the secondary path coefficients? If that is incorrect and we should leave the microphone muted, why are we getting all 0 coefficients? 

2. What should be our expected output at the anti-noise output when the reference signal is a 300Hz sine tone? Should we expect an inverse 300Hz sine tone? Or should we expect to hear silence since the anti-noise is canceling the reference out?

3. In the documentation page of the MFxLMS filter, the downsampler and upsampler had built in anti-aliasing filters. In Sigma Studio version 4.7, these have been removed. We added these back since it appears they are being used in the example on the documentation page. Are the implementation of these LPFs correct?

3. Any other suggestions on what we should do to get the project working.

We have linked the project file below as well for investigation.

Thanks,

Adries

ANC.dspproj

Parents
  • Hello Adries,

    Thanks for the detailed post and for including the project. It will take a little while to "unpack" these questions and set it up to test. We will get back to you on some of these questions. 

    Regarding the filters on the up and down sampling blocks. There were some strange bugs when using them. It would effect the operation of seemingly unrelated signal paths. We did not have the programming resources at that time to figure out how this was happening and since most users were using their own anti-aliasing filters we decided to remove them. If you use the older blocks then be aware of other strange things that might happen. I will have a look at your project. 

    Dave T 

Reply
  • Hello Adries,

    Thanks for the detailed post and for including the project. It will take a little while to "unpack" these questions and set it up to test. We will get back to you on some of these questions. 

    Regarding the filters on the up and down sampling blocks. There were some strange bugs when using them. It would effect the operation of seemingly unrelated signal paths. We did not have the programming resources at that time to figure out how this was happening and since most users were using their own anti-aliasing filters we decided to remove them. If you use the older blocks then be aware of other strange things that might happen. I will have a look at your project. 

    Dave T 

Children
  • Thanks for the quick response  .

    We look forward to your discoveries!

    Cheers,

    Adries

  • Hello  . An update from our side. We read some other discussion forums about ANC and we discovered that our issue may be due to latency. The ADAU-1452 and AD1938 by default run at 48KHz. We did the hardware modifications and got the DSP and codec to run at 192KHz. We tried again (this time playing a sine tone into a microphone as a reference signal) and at the output, the anti-noise starts really quiet and ramps up to really loud. Checking the LMS coefficients, they are all maxed out at -128.

    Is there a reason the filter doesn't converge to a stable value? What can we change so that the filter does converge to a stable value?

    Our setup hardware setup is still the same as the picture above (except the headphones are on my head instead of a basketball). I've attached the updated project here (you will require the modified EVAL-ADAU1452RevBZ in order to run the project which is running at 192KHz now).

    ANC.zip