Dane Sabo 02a675c152 reachability: first per-mode reach tube and barrier-cert attempt
Stand up reachability/ with a hand-rolled zonotope propagator for
linear closed-loop systems (reach_linear.m: axis-aligned box hull,
augmented-matrix integration for the disturbance convolution). Use it
in reach_operation.m to discharge the operation-mode safety obligation:
from a +/-0.1 K box on T_avg, under Q_sg in [85%, 100%]*P0, LQR keeps
T_c within 0.03 K of setpoint over 600 s. Safety band is +/-5 K, so
the obligation is satisfied with five orders of margin.

barrier_lyapunov.m attempts the analytic counterpart via a weighted
Lyapunov function. Sweeping the Qbar(T_c) weight, the best quadratic
barrier allows ~33 K deviation on the gamma level set — still outside
the 5 K safety band. This is a fundamental limitation of quadratic
barriers for anisotropic safety specs (thin-slab safe set in a
precursor-heavy state space). Documented in the file: next step for a
tight analytic certificate is SOS polynomial or polytopic barrier,
which need solvers we don't have locally yet.

reach_linear.m started out with a halfwidth-propagation bug (signed
A_step instead of |A_step|); fixed before commit after noticing the
reach envelope exactly matched the initial box on T_c.

Figures saved to docs/figures/. .mat result files gitignored — they
are regenerated in <1s.

Hacker-Split: first end-to-end per-mode reachability artifact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 12:52:37 -04:00

pwr-hybrid-3-demo

Preliminary example for the HAHACS thesis — a verified hybrid controller for a small modular PWR startup. Composes three layers into one demonstrable pipeline:

  • Discrete layer (fret-pipeline/): FRET natural-language requirements → LTL → synthesized AIGER controller → state-machine diagram.
  • Continuous layer (plant-model/): 10-state point kinetic equation + thermal-hydraulics PWR model with bounded steam-generator heat removal as the disturbance input.
  • Research context (thesis/): the HAHACS PhD proposal that motivates and formalizes the methodology.

Layout

pwr-hybrid-3-demo/
  CLAUDE.md                AI-facing context and architecture map
  docs/
    architecture.md        How the discrete and continuous layers compose
    figures/               Shared figures for thesis + talks
  fret-pipeline/           FRET → ltlsynt → AIGER → state machine
  plant-model/             PWR point kinetics + thermal-hydraulics
  reachability/            Continuous-mode verification (TBD)
  hardware/                Ovation HIL artifacts (TBD)
  thesis/                  [submodule] PhD proposal
  presentations/
    2026DICE/              [submodule] DICE 2026 abstract

Quickstart

Clone with submodules:

git clone --recurse-submodules <url>
cd pwr-hybrid-3-demo

Run the controller synthesis pipeline:

cd fret-pipeline
python3 scripts/fret_to_synth.py pwr_hybrid_3.json specs/synthesis_config_v3.json
bash scripts/synthesize.sh specs/synthesis_config_v3.json circuits
python3 scripts/trace_aiger.py circuits/PWR_HYBRID_3_DRC.aag diagrams
dot -Tpng diagrams/PWR_HYBRID_3_DRC_states.dot -o diagrams/PWR_HYBRID_3_DRC_states.png

Run the plant model (MATLAB or GNU Octave in plant-model/):

main

Prerequisites

  • Python 3.10+
  • Spot for ltlsynt (brew install spot)
  • Graphviz for dot (brew install graphviz)
  • MATLAB or GNU Octave for the plant model
  • LaTeX (via latexmk) for the thesis submodule

Further reading

  • CLAUDE.md — orientation for AI agents working in this repo
  • docs/architecture.md — how the layers compose
  • thesis/CLAUDE.md — the thesis project structure
  • fret-pipeline/README.md — FRET naming conventions and pipeline details
  • plant-model/README.md — scenario setup and model equations
Description
No description provided
Readme 6.7 MiB
Languages
Julia 46.5%
TeX 34.5%
Python 17.5%
Shell 1.5%