Skip to content

SCPN Control — Neuro-Symbolic Fusion Controller

SCPN Control


The Problem

Fusion energy is within reach, but real-time plasma control remains a bottleneck. Current tokamak control systems are:

  • Slow — physics loops at 4--10 kHz, limited by Fortran/C legacy code
  • Coupled — tightly bound to specific machines (DIII-D, ITER)
  • GPU-locked — P-EFIT needs CUDA for sub-ms reconstruction
  • No SNN path — no open-source Petri Net → SNN compilation for fusion

scpn-control addresses these with a different architecture.


The Solution

A standalone neuro-symbolic control engine that compiles Stochastic Petri Nets into spiking neural network controllers — with contract-based pre/post-condition checking, sub-ms kernel latency, and zero GPU dependency.

11.9 microsecond kernel step

The Rust control kernel benchmarks at 11.9 µs P50 (Criterion-verified on GitHub Actions ubuntu-latest). This is a single kernel step, not a complete control cycle including I/O, diagnostics, and actuator commands.

Metric scpn-control DIII-D PCS TORAX ITER PCS
Kernel step (P50) 11.9 us 100--250 us (physics cycle) ~ms (sim step) 5--10 ms
Language Rust + Python C/Fortran JAX TBD
GPU required No No Yes TBD
Deployment Research / Alpha Production Offline sim Spec

Caveat: DIII-D PCS timings include I/O, diagnostics, and actuator commands within a full physics cycle. scpn-control's 11.9 µs is a bare kernel call. A fair comparison would require equivalent end-to-end measurement on comparable hardware.

0.39 ms neural equilibrium research path — without GPU

P-EFIT achieves <1 ms on GPU hardware. scpn-control's PCA + MLP surrogate achieves 0.39 ms on CPU only. Not validated against P-EFIT on identical equilibria — the MLP was trained on SPARC geometries, not the DIII-D shapes P-EFIT typically reconstructs.

Full-stack control in one package

Capability Status
Grad-Shafranov equilibrium solver Tested (CI-gated RMSE)
1.5D coupled transport Tested
PID controller Tested
H-infinity controller (Riccati) Tested
MPC (gradient-based, surrogate dynamics) Tested
Spiking neural network controller (pure LIF+NEF engine) Tested (mocked CI; Loihi untested)
Phase dynamics (Kuramoto/UPDE) Tested
WebSocket live telemetry Tested
Contract-based pre/post-condition checking Tested
Native linear GK eigenvalue solver Tested (Cyclone Base Case)
External GK coupling (TGLF/GENE/GS2/CGYRO/QuaLiKiz) Tested (mock subprocess)
Hybrid surrogate+GK validation Tested (OOD + correction + online learning)
GK → UPDE phase bridge Tested
ML disruption prediction (Transformer) Experimental (synthetic data only)
SPI ablation mitigation Experimental
Real-time digital twin Experimental
Neuro-cybernetic controller Experimental
JAX autodiff (transport + GS solver) Tested
QLKNN-10D neural transport Tested
PPO reinforcement learning agent Research benchmark evidence
GPU dispatch (JAX) Tested

Why It Matters

For Fusion Startups

You need real-time control prototyping now, not after a 3-year bespoke development cycle. scpn-control gives you:

  • A tested controller stack with module-specific tests, a 93% coverage gate, and CI-gated bounded validation
  • Five-tier gyrokinetic transport research surfaces with strict boundaries for external-code agreement
  • Runs on commodity hardware (no GPU or data center required)
  • AGPL-3.0 open source; commercial licensing available

Caveat: This is Alpha-stage research software, not a production PCS. Integration with real hardware requires significant additional work.

For National Labs

scpn-control offers a modern alternative for offline analysis and rapid prototyping:

  • Modern Rust + Python stack alongside legacy Fortran
  • Contract-based pre/post-condition checking on control boundaries
  • Digital twin for offline commissioning and algorithm development

For ITER / DEMO (Speculative)

The architecture could support future integration, but:

  • Not currently hardened for ITER CODAC or EPICS
  • Disruption prediction is trained on synthetic data only
  • SPI mitigation physics is experimental, not validated against real disruption databases

Architecture

134 Python modules | 5 Rust crates | 4,000+ collected Python tests | 20 CI jobs
src/scpn_control/
+-- scpn/       Petri Net -> SNN compiler (formal contracts)
+-- core/       GS solver, transport, scaling laws, gyrokinetic (16 GK modules)
+-- control/    PID, MPC, H-inf, SNN, digital twin
+-- phase/      Paper 27 Kuramoto/UPDE engine (9 modules)

scpn-control-rs/
+-- control-types/    PlasmaState, EquilibriumConfig
+-- control-math/     LIF neurons, Boris pusher, Kuramoto
+-- control-core/     GS solver, transport, scaling
+-- control-control/  PID, MPC, H-inf, SNN
+-- control-python/   PyO3 bindings

Live Demo

Streamlit Dashboard: scpn-control.streamlit.app

Real-time 16-layer Kuramoto-Sakaguchi phase sync with global field driver. Interactive controls for coupling strength, oscillator count, and Psi driver.

Phase sync convergence (500 ticks, 16 layers x 50 oscillators):

Phase Sync Convergence


Validation

All benchmarks are CI-reproducible. See VALIDATION.md for scope and limitations.

Validation Method Result Data Source
DIII-D shot replay Reference GEQDSK + disruption-shot archive, checksum gated Manifest + replay gates pass Immutable repository reference artefacts
SPARC equilibrium 8 EFIT reference equilibria < 5% flux error Public GEQDSK files
IPB98(y,2) scaling ITPA multi-machine database 26.6% RMSE Published coefficients
Kuramoto convergence R -> 0.92, V -> 0, lambda < 0 500-tick verified Simulation
Control latency Criterion benchmark (P50/P99) 11.9 / 23.9 us CI ubuntu-latest
Neural equilibrium PCA + MLP vs Picard ground truth 0.39 ms mean Simulation

Important: "DIII-D shot replay" is validated against immutable repository reference artefacts with manifest checksums. It is not a live MDSplus acquisition or facility-control claim. Synthetic fixtures remain only for CI plumbing tests and are not evidence for public physics claims.


Getting Started

pip install scpn-control          # From PyPI
scpn-control demo --steps 1000    # Closed-loop control demo
scpn-control benchmark            # PID vs SNN timing
scpn-control live --zeta 0.5      # Real-time WS phase sync
# Rust acceleration (optional)
cd scpn-control-rs
cargo test --workspace --exclude scpn-control-rs
cd crates/control-python && maturin develop --release

Publications

  • Paper 27: "The Knm Matrix" — 16-layer Kuramoto-Sakaguchi phase dynamics with exogenous global field driver. arXiv:2004.06344
  • Competitive Analysis: Full benchmark comparison against DIII-D PCS, TORAX, FUSE, GENE, JINTRAC, P-EFIT

Licensing

Open Source AGPL-3.0-or-later (strong copyleft); commercial licensing available
Contact protoscience@anulum.li
Organization ANULUM CH & LI
Authors Miroslav Sotek (ORCID)

Next Steps

  1. Try it: pip install scpn-control
  2. See benchmarks: Competitive Analysis
  3. Live demo: scpn-control.streamlit.app
  4. Talk to us: protoscience@anulum.li