Skip to content

test(fdir): expand edge-case validation for Chi-square gating under extreme sensor dropouts - #33

Merged
rahadbhuiya merged 1 commit into
mainfrom
test/fdir-sensor-dropouts
Nov 16, 2026
Merged

rahadbhuiya merged 1 commit into
mainfrom
test/fdir-sensor-dropouts

Conversation

@rahadbhuiya

Copy link
Copy Markdown
Member

Summary

This PR addresses and closes #30 by expanding comprehensive stress tests and edge-case validation for the Fault Detection, Isolation, and Recovery (FDIR) subsystem and Chi-square / Mahalanobis outlier gating engine.

Changes & Edge Cases Tested

  1. Complete IMU Dropouts / Zero-Readings:

    • Validated that 6-DOF odometry (ESKF) dead-reckons smoothly under extended IMU zero-readings / communication dropouts without panics, numerical instability, or NaN divergence.
    • Verified that subsequent corrupt measurements (e.g. GPS drop to (0,0,0) during blackout) are strictly rejected by the Chi-square gate.
    • Tested multi-sensor FDIR altimeter flatline zero-reading dropouts (0.0m at 200m altitude), verifying that repeated anomalies trigger Gated -> Quarantined -> IgnoredQuarantined while healthy sensors seamlessly sustain state estimation.
  2. High-Frequency Oscillatory Sensor Spikes:

    • Ingested rapid high-frequency alternating bipolar spikes (+/- 1000m, +/- 500m) at 1 kHz, confirming instantaneous quarantine and zero odometry drift across 500+ consecutive spikes.
    • Validated boundary chattering dynamics where alternating noisy spikes progressively degrade the sensor health score.
    • Verified multi-dimensional Mahalanobis gating in LinearKalmanFilter under rapid oscillatory vector spikes.
  3. Corrupted Covariance Inputs:

    • Validated rejection of negative, zero, and non-finite variances across SensorSource, ScalarKalmanFilter, and LinearKalmanFilter with FilterError::InvalidParameter / FilterError::InvalidCovariance.
    • Verified that non-positive definite noise covariance matrices and corrupted observations in ESKF updates return graceful error codes without mutating the filter state.
  4. Quarantined State Transitions & Lifecycle:

    • Validated complete lifecycle transitions: Fused -> Gated -> Quarantined -> IgnoredQuarantined -> Recovered -> Fused.
    • Validated dead-reckoning fallback when all measurement sensors are quarantined.
    • Added helper methods is_sensor_quarantined(), sensor(), and sensor_mut() on MultiSensorFusion1D, and exposed aegis_fusion4_is_sensor_quarantined in C FFI and include/aegis_filter.h.
    • Added update_altimeter() scalar observation method on ErrorStateKalmanFilter.

Verification

  • cargo fmt -- --check: PASS
  • cargo clippy --all-targets --features std,serde,ffi -- -D warnings: PASS
  • cargo clippy --lib --features single-precision,ffi -- -D warnings: PASS
  • cargo test --features std,serde,ffi: All 11 new tests in tests/fdir.rs + all existing suites PASS
  • cargo test --features single-precision,ffi --test fdir: PASS
  • Bare-metal #![no_std] builds (thumbv7em-none-eabihf): PASS

Closes #30

…xtreme sensor dropouts (#30)

- Add comprehensive FDIR integration test suite in tests/fdir.rs
- Validate complete IMU dropouts and zero-readings protecting 6-DOF odometry
- Validate high-frequency oscillatory sensor spikes and health degradation
- Validate corrupted covariance inputs (negative/zero/non-positive definite noise)
- Add update_altimeter scalar observation method to ErrorStateKalmanFilter
- Add is_sensor_quarantined(), sensor(), and sensor_mut() helpers to MultiSensorFusion1D
- Expose aegis_fusion4_is_sensor_quarantined in C FFI and include/aegis_filter.h
- Re-export FloatOps in aegis_filter root

Closes #30
@github-actions github-actions Bot added enhancement New feature or request tests Test suites, coverage, and verification benchmarks labels Nov 16, 2026
@rahadbhuiya rahadbhuiya self-assigned this Nov 16, 2026
@rahadbhuiya
rahadbhuiya merged commit 7bea6c0 into main Nov 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request tests Test suites, coverage, and verification benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(fdir): expand edge-case validation for Chi-square gating under extreme sensor dropouts

1 participant