Dane Sabo fa45e96fd1 journal: scaffold + 2 retroactive invention-log entries
journal/ directory, LaTeX-based, dated entries, callout boxes for
derivations / decisions / dead ends / limitations, plus an \apass{}
macro for in-line markers when a later deep-pass is needed.

Retroactive A-style entries for 2026-04-17 (controllers, linearization,
LQR, operation-mode linear reach, Lyapunov barrier) and 2026-04-20
(predicates restructure into deadbands+safety+invariants, OL-vs-CL
barrier analysis, mode-obligation taxonomy, heatup-rate-as-halfspace,
mode_boundaries, first Julia nonlinear reach attempt).

Both entries include derivations written out in math, dead-ends I
hit, code snippets with commentary, figure embeds, and terminal
output where it changed what we did next.  The goal is invention-log
depth — readable 4 years from now without the git history to help.

journal/README.md documents the conventions.  journal.tex aggregates
all entries into one PDF via latexmk.

Kept claude_memory/ separate as per earlier agreement — those are
short AI-context notes, different audience.

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

Julia port

Parallel implementation of the plant model (../plant-model/) in Julia, intended as an eventual landing spot for reachability if we outgrow the MATLAB / hand-rolled tooling.

Status

  • src/pke_params.jl, src/pke_th_rhs.jl, src/pke_linearize.jl — functional, match MATLAB term-for-term.
  • controllers/controllers.jl — all five modes ported (null, shutdown, heatup, operation, scram). LQR factory included via MatrixEquations.jl.
  • scripts/sim_sanity.jl — closed-loop simulation matches MATLAB to 3 decimals on the 100% → 80% Q_sg step. passing.
  • scripts/reach_operation.jl stub. ReachabilityAnalysis.jl algorithms blow up on this stiff, badly-conditioned system. See the file header for diagnosis and planned fix (state rescaling).

When to prefer Julia over MATLAB

Today: nowhere. The sanity path exists so we don't regret the eventual port.

Once the reach scaling is resolved:

  • Nonlinear reach for the P controller in operation mode (CORA / JuliaReach territory where MATLAB's linearization doesn't suffice).
  • Heatup reach with its time-varying reference.
  • Parametric studies where MATLAB license fees / CI friction matter.

Running

cd julia-port
julia --project=. -e 'using Pkg; Pkg.instantiate()'
julia --project=. scripts/sim_sanity.jl

First run will precompile the dependency stack (OrdinaryDiffEq, ReachabilityAnalysis, LazySets — a few minutes).