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

Designing ANC using NLMS Block

SigmaDSP & SigmaStudio aidantc9 Sep 12, 2025 00:00 8 replies Original on forum ↗
Thread Summary

Thread Summary

The user is troubleshooting an adaptive noise cancellation (ANC) algorithm using the NLMS block in SigmaStudio, which does not seem to adapt when tested with synthetic audio files. The final answer suggests controlling the normalization factor via the alpha parameter and adjusting the time constant of the input energy detector. The user confirms the setup uses digital inputs and aligns the files, but still faces convergence issues, possibly due to the complexity of the noise or the rigid structure of the NLMS block.
AI Generated Content
Subscribe
aidantc9 Question
Sep 12, 2025 00:00

adativeattempt2.dspproj

Hi there,

I’m working on designing an ANC algorithm using the NLMS block in SigmaStudio. However, when I listen to the result, the algorithm doesn’t seem to adapt.

For testing, I’m using synthetic files that are time-aligned and matched in level. I’ve also tested the same files with an NLMS algorithm I implemented in MATLAB, and it works fine there. The test files are about 2 minutes long, so I believe that should be enough time for the algorithm to converge. This makes me think the issue is with my SigmaStudio design.

I’m fairly new to this device and still getting used to the software. I’ve attached my schematic file. For hardware, I’m using the two input jacks: one for the mic signal and one for the noise file, and then outputting to Out 1 and 2 for stereo playback.

Could anyone help me understand why the NLMS block doesn’t seem to be adapting?

Thanks for your help,
aidantc9

Audio Signal Processors

adau1452

anc

software

Version 4.7 Build 0 Rev1831

nlms

sigmastudio

SigmaDSP Audio Processors

Show More

pastedimage1757703766625v1.png
pastedimage1757703766625v1.png
DaveThib Reply
Sep 12, 2025 00:00

Hello aidantic9,

So you have one microphone? Also you have two speakers as you say for stereo output.

Can you provide details and or a picture of the location of the mic and speakers?

Thanks for supplying your project.

I assume you are trying this out on your desk? Is it a really reflective acoustic environment?

Dave T

aidantc9 Reply
Sep 12, 2025 00:00

Hi Dave,

Thank you for the fast reply,

In my setup I’m not using a physical microphone or speakers. I’m testing using two audio files, one as the mic input and the other as the noise input, they are being played from external devices. Does the NLMS block still adapt properly in this kind of purely digital test, or is it expecting the real acoustic path between speaker and mic? I would assume this would not matter but I am not sure.

ChristopherH Reply
Sep 14, 2025 00:00

Hello,

Your schematic is too generic, just I/O connected to the NLMS, so it's impossible to determine why it's not adapting without knowing something about the inputs. Typical one input represents the primary (noise) path connected to the NLMS desired input, and the other input represents the secondary (anti-noise) path connected to the NLMS filter input. In that case if the primary path is shorter than the secondary path you have a causality problem and the NLMS filter would have to go 'back in time' which means it can't adapt/converge

aidantc9 Reply
Sep 15, 2025 00:00

Hi Christopher,

Thank you for your reply. Regarding my inputs: one is a noise file, and the other is a mic file. The mic file is a synthetic file consisting of speech over the noise file. The files are aligned so there is no delay between them.

I tried adding a delay block to the noise signal and varied the delay, but this didn’t seem to help the algorithm converge. I’m not sure what I might be doing wrong here, so I was wondering if you have any suggestions or perhaps an example use case of the NLMS block that I could reference.

Thanks,
aidantc9

ChristopherH Reply
Sep 16, 2025 00:00

Here is an example that uses NLMS to cancel the noise:

NLMS-Speech-Noise.jpg
NLMS-Speech-Noise.jpg
aidantc9 Reply
Sep 16, 2025 00:00

Hi Christopher,

Thanks for sharing. I was able to produce similar results using simulated white noise and speech. I’m still struggling with my specific situation, but it may be due to the complexity of the noise I’m working with.

I plan to try a different implementation, but I suspect the issue stems from the rigid structure of the NLMS algorithm block. I may need to use a DSP that can be programmed directly rather than one that relies on prebuilt blocks. Unless you know of a way to vary more of the parameters of the algorithm like the normalization factor.

Thanks

ChristopherH Reply
Sep 17, 2025 00:00

You can control normalization factor by controlling alpha, using the parameter update:

you can also control the time constant of the input energy detector

NLMS-update-alpha.jpg
NLMS-update-alpha.jpg
aidantc9 Reply
Sep 19, 2025 00:00

Thank you,

This helps a lot,

Aidan