One interactive simulated unit of the canonical oscillator behind SPNM, driven by a noisy rhythmic input. Move the sliders to see it amplify, filter, and lock to the rhythm — or lose it. Three guided examples show what the nonlinearity buys, and what it costs.
This is a simulation of the model's equation, not a hardware measurement or a benchmark. The input is a sinusoid plus white Gaussian noise (fixed random seed; "New noise" changes it), integrated with a 4th-order Runge–Kutta step of 5 ms. Metrics use the second half of the 12 s run. The phase-locking value is |mean ei(θ_out − θ_in)|; "locked" means it is at least 0.9. SNR comes from a least-squares sinusoid fit at the drive frequency.
The optional linear resonator is ż = (−κ + iω₀)z + γu with κ = 0.5 s⁻¹, driven by the same input. On a fixed, clean input the two behave alike (the linear one even filters slightly better at some settings). The nonlinear unit differs in two ways: it regulates its own amplitude when the input strength changes, and it keeps its rhythm through an input dropout. The linear resonator, in turn, follows any input frequency, while the nonlinear unit follows only within its lock range. With the dropout on, the linear resonator is still recovering when the measurement window opens, which lowers its steady-state figures; that slow recovery is itself part of the comparison.