← Projects
Redundant avionics [PRJ-04] · 04 / 04

Redundant flight control computer

Independent project 2,000,000 fault-injected flights

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.

Summary

What I built

  1. 01What

    I built a triplex and quad-redundant flight control computer in allocation-free no_std Rust for an aerodynamically unstable launch vehicle.

  2. 02How

    Replicas synchronize clocks with Welch–Lynch midpoint sync, agree on inputs with Byzantine Oral Messages OM(1), run identical Kalman + LQR control on 20 ms frames, and vote on actuator commands. The same core runs as OS processes over UDP and inside a deterministic simulation testing (DST) harness with 25 fault models and automatic counterexample shrinking.

  3. 03Outcome

    Flew 2,000,000 fault-injected simulations (6.9M injected faults) with 0 invariant violations and fits in 17,372 bytes (17.4 kB) of Cortex-M4F flash. With one Byzantine replica across 100,000 seeds, three replicas failed 91.6% of flights while four failed 0%.

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
System

Architecture

  1. 01crates/fcc-core (2,229 LOC)

    #![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.

  2. 02crates/fcc-sim (3,331 LOC)

    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.

  3. 03crates/fcc-node + fcc-tui

    Multi-process UDP runtime (fcc-replica, fcc-plant, cluster supervisor, SIGKILL integration test) and live ratatui chaos dashboard.

  4. 04crates/fcc-embedded

    Bare-metal thumbv7em-none-eabihf harness confirming 17,372 bytes total flash size.

Design decisions

  1. D01

    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.

  2. D02

    Bit-identical deterministic control computation enables exact-match voting at the actuator effector, the final stage before hardware actuation.

  3. D03

    State scrubbing repairs single-event upsets (bit flips) in two frames via majority-agreed state snapshots without dropping replica membership.

  4. D04

    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).

Evidence

Figures

2 plots and captures. Select any figure to view it at full resolution.

[Fig. 01] Pitch response through five sequential faults. Vehicle attitude stays locked to the fault-free oracle through crash, memory corruption, and Byzantine fault injection.
[Fig. 02] Control-outage survival analysis vs simulation. Analytical 0.52 s control-outage survival bound for the unstable pole matches nonlinear simulation within two 20 ms frames.
Scope

Limits

What the model assumes and what this work does not show.

  1. L01

    Message-level fault simulation: 0 violations holds inside the modeled fault hypothesis; 2 of 10 planted mutations (single-peer snapshot acceptance and plain-average clock sync) were analyzed and documented as uncaught by current seeds.

  2. L02

    Actuator voter and vehicle interface are modeled as single fault-free components; flight hardware requires redundant actuation voting.

  3. L03

    Common-mode software defects across identical replicas and startup/re-merging of symmetric network partitions are out of scope.

  4. L04

    Single-axis rigid-body rocket model without bending modes or slosh; desktop UDP demo is soft real-time, not an RTOS.

Run it

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
Next project · 01 / 04

6-DOF powered descent guidance