Periodic control

Waveform synthesis stores one canceling period and updates it in sync with the noise source.

This Essex-style controller does not model broadband dynamics the way FXLMS does. Instead, it learns a waveform table over one period and replays that table synchronously. That makes it efficient and effective for strongly periodic disturbances with a reliable sync relationship.

Core Equations

If $w_j(n)$ is the stored value at the current phase position, then:

\[y(n) = w_j(n)\]

The implementation supports the two update modes described in the reconstructed notes:

\[w_j(n+1) = w_j(n) - \mu \operatorname{sign}(e(n))\]

and

\[w_j(n+1) = w_j(n) - \mu e(n)\]

In practice, the updated table slot is offset by a delay term so the learned waveform aligns with the secondary-path lag.

Benchmark Interpretation

The LMS update mode outperforms the sign-error mode in the reported periodic benchmark. Both modes are useful only when the disturbance really is periodic and synchronized. Once the source drifts or contains substantial broadband energy, performance falls off quickly.

Running RMS

The periodic LMS mode converges gradually rather than instantly, but it keeps improving when the source remains phase-locked.

Waveform LMS running RMS plot.

Step-size sweep

The waveform controller benefits from larger step sizes up to a practical limit, but the real constraint is still source synchrony.

Waveform LMS step sweep plot.

Tuning Notes

Using It From C++

#include "anc/waveform_synthesis_controller.h"

anc::WaveformSynthesisConfig config;
config.periodSamples = 64;
config.delaySamples = 1;
config.stepSize = 0.03;
config.updateMode = anc::WaveformUpdateMode::kLms;

anc::WaveformSynthesisController controller(config);

for (double error : errorSignal) {
  const double control = controller.synthesize();
  sendToActuator(control);
  controller.adapt(error);
}

CLI Reproduction

build\Debug\anc_cli.exe `
  --algorithm waveform-lms `
  --summary analysis_output\raw\waveform_lms_periodic_summary.csv `
  --timeseries analysis_output\raw\waveform_lms_periodic_timeseries.csv `
  --period-samples 64 `
  --delay-samples 1 `
  --step-size 0.03