Skip to content

filters/notch

A scenario of the Gyro filters, from tools/trace/scenarios/filters/notch.cpp.

✓ pass

  • The clang run (clang 18.1 optimized) matches the committed trace.
  • The gcc run (gcc 13.3 optimized) matches the committed trace.

Shown on

These players show the same trace, with panels chosen to explain it:

Every channel

filters/notch: every channel 1× real time
tone_hz [Hz] tone_hz
output_spectrum -60 dB0 dB (level, dB re 1)

gain_db [dB] [0] [1]
t = 0.000 s / 4.000 s

Keys (with the player focused): Space play/pause · ← → one sample (Shift: ten) · Home/End · [ ] speed

4 s of the dsp/filters scenario notch.cpp, 161 samples every 0.025 s. The panels plot every channel that changes: tone_hz, output_spectrum, gain_db. 4 events are marked. Pass criteria: BB-V1 width_error_hz <= 3.75 Hz.

  1. a unit tone at 50 Hz: the notch passes it
  2. the tone reaches the notch's lower −3 dB edge
  3. the tone crosses f0 = 264 Hz, where the notch's gain is zero
  4. past the upper −3 dB edge: unity gain again
  • ✓ passBB-V1 width_error_hz = 0.472 Hz (<= 3.75), computed by the scenario harness

Constant over the run

  • spectrum_bin_hz = 31.25 Hz
  • notch_hz = 264.2 Hz

All scenarios