Singular-perturbation reduction of the PKE+T/H system: set dn/dt=0,
solve algebraically n = Λ·Σλ_i·C_i / (β-ρ). State drops 10 -> 9 (no
n), removes Λ⁻¹ stiffness. Validated against full state on the heatup
scenario:
t [s] |Δn|/n_full T_c err [K]
60 3.7e-5 4e-6
300 3.8e-4 1.9e-4
1200 1.0e-3 2.2e-3
3000 5.0e-4 7.2e-3
Maximum relative error 0.1% on n, peak 7 mK on temperatures over
50 minutes. PJ approximation is excellent for slow heatup transients
(sub-prompt-critical regime).
Files:
- code/src/pke_th_rhs_pj.jl: reduced 9-state RHS
- code/scripts/validate_pj.jl: side-by-side sim
- code/scripts/reach_heatup_pj.jl: TMJets reach with PJ model
(probing T = 60, 300, 1800, 5400 s)
App v2 (Pluto):
- §9b: live ingestion of reach_operation_result.mat with per-
halfspace margins computed from JSON-defined inv2_holds.
- §9c: 2D projection chooser (n, T_f, T_c, T_cold) with reach
tube envelope overlay.
- §9d: PJ heatup reach summary (placeholder until first run lands).
Journal:
- Added 2026-04-20-overnight-prompt-jump.tex with PJ derivation,
validation table, soundness ledger update. apass markers for
the in-progress reach results.
This commit captures state mid-run; next commit will add the
populated reach results once TMJets returns.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 (
code/): 10-state point kinetic equation + thermal-hydraulics PWR model with bounded steam-generator heat removal as the disturbance input. Controllers, linearization, LQR, reach-tube propagator, Lyapunov barrier — all Julia. - Verification artifacts (
reachability/): predicate concretizations (single source of truth inpredicates.json) and the standalone reach analysis writeup (WALKTHROUGH.md). - Research context (
thesis/): the HAHACS PhD proposal. - Lab journal (
journal/): chronological invention log in LaTeX. - Predicate explorer app (
app/): Pluto.jl notebook bridging FRET predicates and continuous-state halfspaces.
Layout
pwr-hybrid-3-demo/
CLAUDE.md AI-facing context and architecture map
docs/
architecture.md How the layers compose
figures/ Shared figures for thesis + talks
fret-pipeline/ FRET → ltlsynt → AIGER → state machine
code/ Plant model, controllers, reach (all Julia)
reachability/ predicates.json + WALKTHROUGH.md
app/ Pluto.jl predicate explorer
journal/ LaTeX lab notebook
hardware/ Ovation HIL artifacts (TBD)
claude_memory/ Short AI-context notes
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 and reach analysis:
cd code
julia --project=. -e 'using Pkg; Pkg.instantiate()' # first time only
julia --project=. scripts/main_mode_sweep.jl # all 5 DRC modes
julia --project=. scripts/reach_operation.jl # operation-mode linear reach
julia --project=. scripts/barrier_lyapunov.jl # Lyapunov barrier
julia --project=. scripts/barrier_compare_OL_CL.jl # OL vs CL barrier
julia --project=. scripts/reach_heatup_nonlinear.jl # nonlinear heatup (10s cap)
Open the predicate explorer:
cd app
julia --project=. -e 'using Pluto; Pluto.run()'
# Browser opens; navigate to predicate_explorer.jl
Soundness note: the current reach tubes are over-approximations
of the LINEAR model, not sound over-approximations of the nonlinear
plant. See reachability/README.md and reachability/WALKTHROUGH.md.
Prerequisites
- Julia 1.10+ (via
juliaup). - Python 3.10+ (FRET pipeline only).
- Spot for
ltlsynt(brew install spot). - Graphviz for
dot(brew install graphviz). - LaTeX (via
latexmk) for the thesis + journal builds.
Further reading
CLAUDE.md— orientation for AI agents working in this repodocs/architecture.md— how the layers composecode/CLAUDE.md— code architecture, conventions, validity rangecode/README.md— usage and dependenciesreachability/README.md— reach scope, soundness statusreachability/WALKTHROUGH.md— standalone analysis writeupjournal/README.md— journal format conventionsjournal/journal.tex— the journal itself, dated entriesthesis/CLAUDE.md— the thesis project structurefret-pipeline/README.md— FRET naming conventions and pipeline details
Description
Languages
Julia
46.5%
TeX
34.5%
Python
17.5%
Shell
1.5%