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

NLMS block in sigmastudio

SigmaDSP & SigmaStudio sss36 Jul 31, 2013 00:00 5 replies Original on forum ↗
Thread Summary

Thread Summary

The user is implementing FxNLMS on the ADAU1446 evaluation board to estimate the secondary transfer function offline using a sine wave at 500 Hz instead of white noise. The final solution involves using a Perl script to extract and save the FIR filter coefficients from the NLMS block's RAM to a text file. The script can be run using Cygwin. An alternative method for extracting coefficients is to use the parameters window in Sigma Studio to copy and save them, then reformat for use in an FIR filter.
AI Generated Content
Subscribe
sss36 Question
Jul 31, 2013 00:00

Hi,

I am working on ANC project. I am trying to implement FxNLMS on ADAU1446 evaluation board. I am thinking of using NLMS block available in sigma studio to estimate the secondary transfer function offline. To estimate this secondary transfer function ideally we need white noise generator but for the timing I am using sine wave with freq 500Hz. The block diagram is as follows

This design uses ADAU1446 dsp core internal coefficients as seen in compiler window. I am just wondering Is there any way I can access these FIR filter coefficients?

My second question is how can I access error signal from NLMS block?

Audio Signal Processors

adau1446

SigmaDSP Audio Processors

b4b7be025b5b948a24d0b3db2a6265a5.jpg
b4b7be025b5b948a24d0b3db2a6265a5.jpg
b4b7be025b5b948a24d0b3db2a6265a5.jpg-450x253.jpg
b4b7be025b5b948a24d0b3db2a6265a5.jpg-450x253.jpg
ADIApproved Reply
Jul 31, 2013 00:00

You can monitor the FIR coefficients using the parameter view of the Capture window. Just click the IC 1 : Params tab at the bottom of the capture window to see the full parameter RAM, including coefficients. You can click the refresh button to read the register values with the hardware connected to the computer.

Note... zm1 stands for "delay by 1", so zm1 is the first tap, zm2 is the second tap, et cetera.

I don't know of any way to access the error signal, since that is stored in modulo data memory, which is not accessible via the control port.

b45f21ac992b1807cfe6e0bab5dc76ee.jpg
b45f21ac992b1807cfe6e0bab5dc76ee.jpg
b45f21ac992b1807cfe6e0bab5dc76ee.jpg-450x309.jpg
b45f21ac992b1807cfe6e0bab5dc76ee.jpg-450x309.jpg
sss36 Reply
Aug 1, 2013 00:00

Thanks Brett

Is there easy way of bulk copy and paste fir coefficient from NLMS ram to FIR filter in sigma studio?

ADIApproved Reply
Aug 1, 2013 00:00

I think the filter was meant to be adaptive, so we didn't really make provisions for copy-pasting coefficients. We thought people would just use the adaptive function and not really concern themselves with the coefficients.

One way you could get a text file of the coefficients is to use the parameters window I described above. Click and shift-click to highlight a group of rows in the table, then right click and choose an option like "Copy to Clipboard" or "Save to File" to save the coefficients in a text file. This gets you at least part of the way to your goal. You'll then need to re-format the data so you can paste it back into an FIR filter.

Our FIR filter GUI does have an option to load coefficients from a text file, as long as the values are formatted properly.

sss36 Reply
Aug 1, 2013 00:00

Thanks Brett.

I made small perl script to solve the problem. Attached is script for other people.

Store data in ram.txt. The fir filter coefficients will be saved in FirFiltCoeff.txt.

Cygwin command: perl filter_coeff_sigmastudio.pl

5cf8e325a4e257cd5dbed4641c88ba0b.jpg
5cf8e325a4e257cd5dbed4641c88ba0b.jpg
5cf8e325a4e257cd5dbed4641c88ba0b.jpg-450x253.jpg
5cf8e325a4e257cd5dbed4641c88ba0b.jpg-450x253.jpg
ADIApproved Reply
Aug 1, 2013 00:00

Great, thanks! I have been meaning to learn Perl...