Verified estimation gallery

3 filters — linear Kalman, matrix EKF, quaternion AHRS — each proven (Lean, sorryAx-free), simulated as a working filter on the real Forge-emitted kernels, and run on silicon (Verilog/Verilator bit-exact). One math source per kernel; no numpy in any estimator.

Linear Kalman tracker (constant velocity) all checks pass

A textbook predict→update Kalman filter — cuts position noise and recovers the unmeasured velocity from position measurements alone.

emit

32 compiled targets

prove (Lean, sorryAx-free)

  • kalman2d_cov_predict_psd ✓ clean — the predicted covariance F·P·Fᵀ+Q stays positive-semidefinite axiom trail
  • kalman2d_joseph_psd ✓ clean — the Joseph covariance update preserves PSD for any gain axiom trail

simulate — the real emitted kernels

quantityresult
filter RMS vs measurement RMS0.525 / 0.934 ratio 0.56 < 0.6
recovered velocity (never measured)0.516 ≈ 0.5
max |filter − NumPy-KF|1.1e-16 < 1e-9

silicon

kalman2d_predict.cov_predict — Verilog/Verilator bit-exact

full report →

EKF localization (range-only, two beacons) all checks pass

A nonlinear Extended Kalman Filter — range-only trilateration to two beacons; the gain K = P·Hᵀ·(H·P·Hᵀ+R)⁻¹ exercises the matrix-inverse operator.

emit

100 compiled targets

prove (Lean, sorryAx-free)

  • ekf_range_nonneg ✓ clean — the range measurement √((lx-x)²+(ly-y)²) is ≥ 0 axiom trail
  • kalman2d_innovation_cov_psd ✓ clean — the innovation covariance H·P·Hᵀ+R stays positive-semidefinite axiom trail
  • kalman2d_matrix_joseph_psd ✓ clean — the Joseph covariance update A·P·Aᵀ+W preserves PSD for any gain axiom trail

simulate — the real emitted kernels

quantityresult
EKF position RMSE vs dead-reckoning0.479 / 2.993 ratio 0.16 < 0.6
max |EKF − NumPy-EKF|4.2e-15 < 1e-9

silicon

complementary_filter.fuse, weighted_fusion.fuse3, kalman2d_update_matrix.update_cov — Verilog/Verilator bit-exact

full report →

Mahony AHRS (quaternion attitude) all checks pass

A complementary attitude filter fusing a biased gyroscope with an accelerometer; every quaternion op is a shipped kernel and the state is re-normalised onto the unit sphere each step.

emit

18 compiled targets

prove (Lean, sorryAx-free)

  • quat_normalize_unit ✓ clean — ‖normalize(q)‖² = 1 — the state stays a unit quaternion (sorryAx-free) axiom trail

simulate — the real emitted kernels

quantityresult
Mahony attitude error vs gyro-only2.38° / 18.44° ratio 0.13 < 0.3
max |‖q‖ − 1| over the run2.2e-16 < 1e-12

silicon

quat_mul, quat_rotate_vec — Verilog/Verilator bit-exact

full report →