# Noise cancellation: timing model The three timing stages share one synthetic signal and one ideal, unity-gain sound path at one ear. All computation works offline. The page does not request a microphone or perform acoustic cancellation in the room. ## Late inversion and prediction A 200 Hz tone has a 5 ms period. An inverted copy delayed by 2.5 ms reinforces it: 2× RMS pressure, 4× mean-square pressure, +6.0206 dB. A whole-period delay can cancel a stationary tone. Prediction learns that repetition; independent white-noise samples cannot be inferred from their past. Each source contains five seconds at 48 kHz. The first two seconds fit a 128-tap autocorrelation Wiener predictor with small diagonal regularization; the final three seconds supply measurement, waveform and playback. The source mixes a 200 Hz sine and seeded white noise with square-root component gains. The hiss slider sets nominal power allocation; finite samples differ slightly. Hiss normalization uses training RMS only. No held-out samples determine the learned coefficients. Let response be the complete microphone-to-controller-to-speaker-to-ear delay, and preview the noise’s arrival-time difference at mic and ear. The remaining prediction gap is D = max(0, response − preview), in integer samples. The copied inverse leaves x[n] − x[n−D]. The predictor of x[n] uses only x[n−D−tap]. At D = 0 the sample is known and its inverse cancels exactly. Spare preview becomes a buffer, rather than a read of unavailable future samples. ## The physical microphone control Stage three fixes a plane wave moving left to right at 343 m/s. The source reference plane is 3.43 m upstream of the ear, so the noise needs 10 ms to reach the ear. The microphone slides along that propagation axis between the ear and source. Its distance d from the ear gives preview d / 343. This relation follows from the stated direction and propagation model; arbitrary mic-to-ear spacing in a room does not establish preview. The cancelling speaker remains 0.343 m from the ear: one millisecond of sound travel. Response delay retains this path and adds adjustable electronics. Its stage-three minimum is therefore 1 ms; moving the reference mic does not change response. At 2.5 ms response, 0.8575 m of upstream distance gives 120 samples of preview and a matched arrival. Extra distance adds buffering. The schematic is not to scale. “Follow sample A” slows physical time to three seconds of animation. Cyan A follows the primary path. Gold −A follows the controller and speaker path once A is available; when preview is insufficient, −Â denotes a predicted estimate. The animation labels electronics and speaker travel separately. The arrival readouts use the mic’s observation as time zero. The unity-gain model assumes complete coherence and perfect secondary-path compensation. It excludes reflections, feedback, speaker frequency response, measurement noise, changing geometry and stability limits. It is an educational causality example, not a hardware performance benchmark. ## Playback and plotting `arrival-model.js` constructs the signal, calls the estimator in `dsp.js`, computes the residuals and converts those same samples to playback buffers. A fixed multiplier of 0.30 and one user volume apply to every comparison and source mix. There is no per-result normalization. Linear interpolation handles audio contexts that do not run at 48 kHz. Listening loops the three held-out seconds until Stop, a stage change, a hidden tab or navigation. All three modes start at the same sample. Switching modes uses a short gain ramp; changing a slider crossfades into new residual buffers. The noise realization repeats every three seconds. A loop is not fresh random noise, and the displayed static waveform is a 20 ms excerpt, not an audio playhead. The three waveform rows share a pressure scale, held constant across delay and mode for each mix. The range is at least ±0.36, otherwise rounded up from twice the source peak in the excerpt and preceding 10 ms. Readouts use all 144,000 held-out samples. “Model null” is mathematical zero; values below −80 dB display as <−80 dB. These are simulated ratios, not measured attenuation. ## Sources - [Reference-microphone timing and causality](https://www.mdpi.com/2076-3417/8/11/2291). - [Feedforward-headset causality for different incoming directions, author manuscript](https://opus.lib.uts.edu.au/bitstream/10453/118176/4/Causality%20study%20on%20a%20feedforward%20active%20noise%20control%20headset%20with%20different%20noise%20coming%20directions%20in%20free%20field.pdf). - [MathWorks: physical ANC and secondary-path estimation](https://www.mathworks.com/help/audio/ug/active-noise-control-with-simulink.html). The next experiment, [Move the ear](spatial.html), explicitly switches to an ideal steady pure tone in free space. It tests spatial locality after assuming timing has been solved.