ΣSigmaStudio Ask AI Русский Log in

Filtered NLMS filter

SigmaDSP & SigmaStudio tancy Oct 26, 2016 00:00 19 replies Original on forum ↗
Thread Summary

Thread Summary

The user is implementing FxLMS for ambient noise reduction using the ADAU1452 evaluation board and seeks clarification on the secondary path estimation. The final answer confirms that the secondary path coefficients must be derived experimentally and saved/exported to the main project. The user is advised to use a band-pass filtered noise signal for the secondary path estimation and a 'T connection' block to split the output for analysis.
AI Generated Content
Subscribe
tancy Question
Oct 26, 2016 00:00

Hi! I am interested in using FxLMS for the purpose of ambient noise reduction by active noise cancellation, and I noticed that the filtered NLMS filter had been added to SigmaStudio 3.13. However I can't figured out how it is supposed to work. I am guessing that for a feed forward ANC setup, signal from the reference microphone should go to pin0 and error microphone to pin1 of the FxNLMS. However what does pin2 do and what is the procedure to obtain an estimate of the correction for secondary path? Thanks!

DaveThib Reply
Oct 27, 2016 00:00

Hello,

I was going to start answering this but then realized I needed to know what DSP processor you are working with?

Dave T

tancy Reply
Oct 28, 2016 00:00

Dear Dave,

Thanks for looking into this! I am working with the ADAU1452, in particular, the EVAL-ADAU1452 evaluation board.

CY

DaveThib Reply
Oct 28, 2016 00:00

Hello CY,

The help file is well hidden in the Wiki. I managed to find it.

https://wiki.analog.com/resources/tools-software/sigmastudio/toolbox/Filters/FilteredNLMSFilter

Have you seen this?

Dave T

tancy Reply
Oct 28, 2016 00:00

Dear Dave,

This is the first time I am seeing this help file. I have been to the filter wiki page, but the NLMS filter link there is broken. The info in the link you provided answered my question. Thanks!

CY

DaveThib Reply
Oct 28, 2016 00:00

Hello CY,

That is what I suspected. I did notice that broken link as well. I will see about getting that fixed.

I found the page by clicking on the cell in SigmaStudio to highlight it, then I pressed F1.

Dave T

Amus Reply
Jan 31, 2017 00:00

Hello Dave,

I really need the correct documentation of NLMS for ADAU1761. Could you please give me some references? There are a lot of threads but with different versions and different results. I am working with 3.14 version.

Thanks!!

CMAC Reply
Mar 4, 2017 00:00

Hi Dave T,

Is this the only help file related to the FxLMS block? I am trying to implement an ANC system and was looking for any other documentation that would help with using the block in SigmaStudio.

Any help greatly appreciated.

Regards

C Mac

DaveThib Reply
Mar 13, 2017 00:00

Hello CMAC,

I understand the need for a more comprehensive guide and will work towards that goal. I have put it on the list of items that need attention but I am not certain how soon I can complete the task.

I will try to get at least part of this document soon.

Dave T

CMAC Reply
Mar 14, 2017 00:00

Hi Dave,

Unfortunately its my dissertation project in which the deadline soon . If you could help me with something in particular?

How do I implement the secondary path required for the Filtered Reference Input?

Regards,

Cameron

tancy Reply
Mar 16, 2017 00:00

Hi Cameron,

You can derive the secondary path coefficient experimentally, such as described in http://www.geocities.ws/ranjit_raphael/FXLMS.html (Fig. 8). I found that using white noise does not necessary gave good result for the secondary path estimation due to accumulating errors. If you run into the same problem, you can try replacing the white noise source with a pulse source consisting of the range of the sine components you are interested in.

CMAC Reply
Mar 19, 2017 00:00

Hi Tancy,

Thanks for your reply. As an example, if I was aiming to cancel primary noise between 50-150hz, a noise signal generated within sigma studio put through a band-pass filter set at 50-150hz that is connect to the Filtered Ref input would work? The documentation talks of 'training' the system and computing the co-efficents before updating them when implementing in C. Does the FxLMS block carry this out automatically upon compiling the project?

Best Regards

tancy Reply
Mar 20, 2017 00:00

Hi CMAC,

There is no built-in block to get the secondary path estimate. You will need to obtain/derive the secondary path estimate. The secondary path estimate can be an IIR or FIR filter. If you are obtaining the secondary path estimate experimentally, you will need to write another separate SigmaStudio program and save/export the coefficients to the actual program. Below is a figure showing an example of the FxLMS with a 1024 tap FIR filter (the block with FIR1 label) as the secondary path estimate.

a756dac89842dc96c4f796079b5ff778.png
a756dac89842dc96c4f796079b5ff778.png
a756dac89842dc96c4f796079b5ff778.png-620x221.png
a756dac89842dc96c4f796079b5ff778.png-620x221.png
CMAC Reply
Mar 20, 2017 00:00

Thank you for the prompt response.

If I understood correctly this is the patch required to implement the FxLMS. However, a separate 'offline' project needs to be carried out to calculate the required co-efficents of the FIR filter for the secondary path which are then copied into the table of co-efficents for the filter in the main project file?

The reason for a split on the output being to allow me to take a copy of the boards output anti-noise to be recorded for analysis.

Thanks, Cmac

d26aae4edc13984aaa1f2356ab981cee.png
d26aae4edc13984aaa1f2356ab981cee.png
d26aae4edc13984aaa1f2356ab981cee.png-620x275.png
d26aae4edc13984aaa1f2356ab981cee.png-620x275.png
tancy Reply
Mar 20, 2017 00:00

Dear CMAC,

Yes, another "offline" project/program is required to obtain the coefficients.

You can also use the "T connection" block, which does not use DSP resource, to replace the splitter.

kbug Reply
Mar 22, 2017 00:00

I have another question, are there any plans for adding FxNLMS block for ADAU1442 chip?

CMAC Reply
Mar 22, 2017 00:00

Hi Tancy,

Thanks again for your replies. So for establishing the coefficients for the FIR filter, a separate patch in which a noise signal is generated in sigma studio - fed through the board to the secondary loudspeaker - and then the signal from the error microphone is fed into the FIR filter?

I understand the concept of the secondary path its just the implementation to model FIR impulse response in sigma studio. Any suggestions greatly appreciated.

Regards CMAC

CMAC Reply
Apr 2, 2017 00:00

Hi Tancy,

For what reason do you have the signal invert function after the FIR filter?

Regards

JDWinne Reply
Feb 20, 2018 00:00

Dear @tancy
Based on figure 8 in the link you provided, I've build this setup.

But several problems arise. SigmaStudio won't compile and download to my board (ADAU1466) because of illegal feedback loops detected. Secondly, it is not possible to save the filter coefficients in the LMS filter.
What improvements do you suggest?

Thanks!

2d005c6f485346a8dddcebd48d4d336b.png
2d005c6f485346a8dddcebd48d4d336b.png
2d005c6f485346a8dddcebd48d4d336b.png-620x414.png
2d005c6f485346a8dddcebd48d4d336b.png-620x414.png
tancy Reply
Feb 21, 2018 00:00

Hi JDWinne,

You will need to use a feedback block (see here). I have also attached an example in the diagram below.

Note that the NLMS block is for microphone/echo control type applications and cannot be used for active noise cancellation (ANC). See this thread for example of how the NLMS block is used. For ANC, you can use FxNLMS block as a LMS filter by feeding x into the f(x) "Filtered Reference" input. Also see here for details on implementation of the FxNLMS in SigmaStudio.

As for saving the coefficients, please check this thread. There is a short Perl script at the end of the thread which will extract the coefficients from the save file.

0312.5bd8020dcc31022c3d785047fb377927.png
0312.5bd8020dcc31022c3d785047fb377927.png
0312.5bd8020dcc31022c3d785047fb377927.png-620x422.png
0312.5bd8020dcc31022c3d785047fb377927.png-620x422.png