Redundant flight control computer
Quad-redundant no_std Rust flight control computer for an unstable launch vehicle, using Byzantine OM(1) agreement and Welch–Lynch clock sync to fly 2,000,000 fault-injected simulations with 0 invariant violations.
[PRJ-04] Live captureFour OS processes fly an unstable rocket over UDP through SIGKILL + reboot (re-integrated in 0.26 s), control-state bit flip (scrubbed in 0.04 s), and network cut.
What I built
Results
[PRJ-04] Measured- Fault flights · 0 violations
- 2,000,000
- Cortex-M4F flash
- 17.4 kB
- 4-replica frame time
- 1.7 µs
- Fault-injected flights inside fault hypothesis (3-replica / 4-replica)1,000,000 each · 0 invariant violations (6.9M total faults, 11,112 sim hours)
- One Byzantine replica (100,000 seeds): 3 replicas vs 4 replicas91,585 violations (91.6%) vs 0 violations (reproducing 3f + 1 bound)
- Actuator voter loss of majority under Byzantine fault (100k seeds)90,848 (90.8%) with 3 replicas · 0 with 4 replicas
- Bounded-exhaustive single-fault and ordered-pair schedules15,660 (triplex) and 33,264 (quad) schedules · 0 violations
- Mutation testing (10 planted protocol bugs behind feature flags)8 / 10 caught (most within 10 seeds; 2 misses documented)
- Bare-metal Cortex-M4F (thumbv7em-none-eabihf) compiled flash footprint17,372 bytes
- Compute latency (4 replicas, 1 frame) and wire message size1.7 µs · 21–45 bytes/message
- Fault masking and recovery bounds (inside hypothesis)0 frames actuator error · exclude ≤ 5 frames · scrub 2 frames · rejoin ≤ 19 frames
Architecture
-
#![no_std], #![forbid(unsafe_code)], zero dependencies: frame sequencer, Welch–Lynch clock sync (≤ 350 µs worst-case skew), mid-value and OM(1) input agreement, Kalman + LQR + integral control law, CRC-32 fixed codec, actuator voter, and membership/scrubbing state machine.
-
Deterministic simulator owning virtual time, drifting clocks, network delivery, sensors, unstable launch vehicle dynamics, 25 fault models, fault-free oracle and invariants, and automatic counterexample shrinker.
-
Multi-process UDP runtime (fcc-replica, fcc-plant, cluster supervisor, SIGKILL integration test) and live ratatui chaos dashboard.
-
Bare-metal thumbv7em-none-eabihf harness confirming 17,372 bytes total flash size.
Design decisions
-
Four replicas over three: the shrinker isolates a 150 ms single-replica Byzantine lie (differing by 1 µrad between peers) that causes a triplex cluster to evict a healthy replica and lose actuator majority without a single malformed packet. Quad + OM(1) relay flies the identical seed clean.
-
Bit-identical deterministic control computation enables exact-match voting at the actuator effector, the final stage before hardware actuation.
-
State scrubbing repairs single-event upsets (bit flips) in two frames via majority-agreed state snapshots without dropping replica membership.
-
All 15 defects discovered during development are logged with seed, root cause, and fix (13 from DST campaigns, 1 from mutation testing, 1 from the live chaos demo).
Figures
2 plots and captures. Select any figure to view it at full resolution.
Limits
What the model assumes and what this work does not show.
Reproduce
Run the tests and regenerate every figure from the repository.
$ cargo test --workspace --release
$ cargo run --release -p fcc-sim -- campaign --n 4 --seeds 0..20000
$ cargo run --release -p fcc-sim -- byzantine --seeds 0..2000
$ cargo run --release -p fcc-tui -- --n 4