Skip to content

feat(falcon): v1.122 — RPM-tracked harmonic notches + pre-arm check table (NOTCH-P01 + PREARM-P03) - #282

Merged
avrabe merged 1 commit into
mainfrom
feat/falcon-v1122-notch-prearm
Jul 16, 2026
Merged

feat(falcon): v1.122 — RPM-tracked harmonic notches + pre-arm check table (NOTCH-P01 + PREARM-P03)#282
avrabe merged 1 commit into
mainfrom
feat/falcon-v1122-notch-prearm

Conversation

@avrabe

@avrabe avrabe commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Verify-Filter: (has-tag "v1.122")

Implements NOTCH-P01 + PREARM-P03 (→ implemented; verify PR follows per the two-commit rule) — the final rung of the v1.117–v1.122 infra ladder.

NOTCH-P01 — relay-notch

The PX4 IMU_GYRO_DNF / ArduPilot INS_HNTCH / Betaflight RPM-filter role: per-motor biquad notches (fundamental + 2nd harmonic) tracking achieved eRPM through the same read_motor_rpm seam the rotor-out FDI consumes (jess DD-024: bidir-DShot primary, DroneCAN alternate).

  • Safety posture: absent RPM ⇒ bit-exact unity bypass (Kani-proven — no filtering is safer than a mistracked notch); per-notch Nyquist clamp (at the 250 Hz loop the 2nd harmonic self-limits; proven never to engage outside the band).
  • Measured criteria: ≥ 20 dB at the tracked fundamental across hover-to-full, stepped sweep within 3 dB, < 10° added phase at the rate-loop crossover with the full 4-motor bank engaged — DFT-measured, not asserted from arithmetic.
  • Kani drove two real fixes: proptest/CBMC found +∞ riding through a fully-Nyquist-clamped bank (fixed: bank-boundary sanitize); the NaN side-conditions forced operand sanitization so a poisoned state can't even compute a NaN; and symbolic trig hit libm's rem_pio2_large (>1500-iteration unwinding) — solved with the trig-free band_ok split, unit-pinned to set's engagement.
  • Closed loop: SimBackend gained rotor-line vibration (narrowband at each motor's rotation frequency — broadband can't exercise a notch) + an rpm_telemetry switch; the tracking notch cuts hover motor thrash to < 60% of the bypass baseline (gz plant hovers with an attitude limit-cycle (~1 rad/s roll/pitch, motor thrash 0.1↔1.0) #270's regression-metric shape; the full limit-cycle root-cause stays open in gz plant hovers with an attitude limit-cycle (~1 rad/s roll/pitch, motor thrash 0.1↔1.0) #270).

PREARM-P03 — the check table

"Most crashes are prevented on the ground", as data: 19 rows (estimator/nav integrity incl. the GNSS-P02 divergence flag, config consistency incl. params-from-NVM and geofence sanity, hardware consistency incl. ESC-telemetry-alive and battery takeoff margin, safety state), each with a distinct operator STATUSTEXT reason.

  • Legacy six = rows 0..=5, always required; breadth rows gate once declared (a bench without RC isn't blocked by a link check it can't satisfy; a declared row that fails always blocks).
  • Kani PREFLIGHT-K03/K04: gate exactness + monotonicity (failing any row of an Allowed table can never remain Allowed).
  • Per-row pair tests are table-driven — coverage equals table length by construction; reason-text distinctness asserted.
  • Cold-boot criterion on the real seam: a defaults-fallback parameter load (blank NVM through PARAM-P03's two-slot image) cannot arm, with its distinct reason; after a save + genuine reload it arms.

Gates

cargo test: relay-notch 8 + relay-preflight 6 + falcon-core 56, 0 fail · cargo kani: notch 3/3, preflight 4/4 (incl. the two new) · clippy -D warnings clean · rivet validate PASS · relay-notch enrolled in kani.yml + CI clippy at birth.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG

…able (NOTCH-P01 + PREARM-P03)

NOTCH-P01 — new relay-notch engine (PX4 IMU_GYRO_DNF / ArduPilot
INS_HNTCH / Betaflight RPM-filter parity): per-motor biquad notches at
the rotation fundamental + 2nd harmonic, centers tracking ACHIEVED
eRPM via the same read_motor_rpm seam the FDI consumes (jess DD-024:
bidir-DShot primary). Absent RPM => bit-exact unity bypass (no
filtering is safer than a mistracked notch); per-notch Nyquist clamp.
Measured (not asserted): >= 20 dB at the tracked fundamental across
the hover-to-full band, sweep within 3 dB, < 10 deg added phase at the
rate-loop crossover with the FULL 4-motor bank engaged. Kani
NOTCH-K01..K03 drove two real fixes: operand sanitization (no
intermediate can even COMPUTE a NaN from a poisoned state — CBMC's
side-conditions now prove it) and the trig-free band_ok split (libm's
rem_pio2_large unwinds >1500 iterations on symbolic args). falcon-core
wires the bank into the CONTROL-path gyro ahead of the LPF (estimator
stays raw); SimBackend gained rotor-LINE vibration + an rpm_telemetry
switch; the closed-loop oracle shows the tracking notch cutting hover
motor thrash to < 60% of the bypass baseline under injected rotor
vibration (#270's regression-metric shape).

PREARM-P03 — the pre-arm breadth as a TABLE (data, not conditionals):
19 rows spanning estimator/nav integrity, configuration consistency,
hardware consistency, and safety state, each with a DISTINCT
operator-readable STATUSTEXT reason. The legacy six checks are rows
0..=5 (always required); breadth rows gate once DECLARED (a bench
without RC is not blocked by a link check it cannot satisfy; a
declared row that fails ALWAYS blocks). Kani PREFLIGHT-K03/K04: the
gate is exact and MONOTONE (failing any row of an Allowed table can
never remain Allowed). Per-row pair tests are table-driven — coverage
equals the table length by construction. FlightSupervisor populates
every self-feedable row per step (ESC telemetry declare-on-first-
sight), integrations feed the rest via set_check; command(Arm) now
gates on the table. Cold-boot criterion rides the REAL PARAM-P03
two-slot NVM seam: defaults-fallback cannot arm (distinct reason);
after save + genuine reload it can.

Gate hygiene: relay-notch enrolled in kani.yml + CI clippy at birth.

SWREQ-FALCON-NOTCH-P01 + SWREQ-FALCON-PREARM-P03 -> implemented (the
verify PR follows per the two-commit rule).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG
@avrabe
avrabe merged commit fe29d37 into main Jul 16, 2026
59 checks passed
@avrabe
avrabe deleted the feat/falcon-v1122-notch-prearm branch July 16, 2026 07:37
avrabe added a commit that referenced this pull request Jul 16, 2026
Code-free promotion per the two-commit rule. Evidence on merged main
(fe29d37, impl PR #282 merged on a fully green rollup) plus a clean-room
pass: 8 falsifiable claims verified cold, 8/8 CONFIRMED (suites, both
Kani sets, gate wiring, the control-path filter placement, and the
cold-boot NVM criterion's LoadOutcome assertions all independently
re-checked).

New FV-FALCON-NOTCH-001 + FV-FALCON-PREARM-003 (ids grepped free).
SWREQ-FALCON-NOTCH-P01 + SWREQ-FALCON-PREARM-P03: implemented → verified.

This closes the v1.117–v1.122 infrastructure ladder.


Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant