Skip to content

filters/low_rate

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

✗ fails, as designed

  • 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/low_rate: every channel 1× real time
rotor_hz [Hz] [0] [1] [2] [3]
raw_spectrum -60 dB0 dB (level, dB re 1 rad/s)

filtered_spectrum -60 dB0 dB (level, dB re 1 rad/s)

notch_hz [Hz] [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
notch_weight [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
vibration_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 low_rate.cpp, 161 samples every 0.025 s. The panels plot every channel that changes: rotor_hz, raw_spectrum, filtered_spectrum, notch_hz, notch_weight, vibration_db. 8 events are marked. Pass criteria: BB-I2 vibration_residual_db <= -30 dB (expected to fail); BB-C2 motion_gain_error <= 0.02.

  1. throttle up: every fundamental is below min_hz (100 Hz), so those notches are off
  2. the slowest rotor's fundamental reaches 100 Hz: its notch starts to fade in
  3. a third harmonic passes 0.45·fs: its notch is parked there, off
  4. every fundamental past 150 Hz: their notches are fully on
  5. a second harmonic passes 0.45·fs: its notch is parked there, off
  6. passing hover, where the fixed notches sit
  7. the fastest fundamental passes 0.45·fs: its notch is parked there, off
  8. held at 90 % of maximum speed: fundamentals 500 to 552 Hz
  • ✗ fails, as designedBB-I2 vibration_residual_db = -1.079 dB (<= -30), computed by the scenario harness
  • ✓ passBB-C2 motion_gain_error = 3.40e-4 (<= 0.02), computed by the scenario harness

Constant over the run

  • spectrum_bin_hz = 31.25 Hz
  • vibration_limit = -30 dB

All scenarios