Tokamak Magnetic Control
Control a tokamak's plasma shape, position, and current.
Task & evaluation
- Objective
- Keep plasma shape, position and current within target tolerances.
- Input
- Magnetic measurements and the requested plasma shape and current.
- Output
- Twelve poloidal-field coil voltages at 2 kHz.
- Data
- A simulator of a MAST-U-like tokamak with varying plasma and machine properties.
- Evaluation
- Fraction of episodes maintained within steady-state tolerances: 1 cm shape/gaps and 3% current.
- Research challenge
- Infer the plasma state and correct it despite noise, delays and changing dynamics.
Understanding the task
A fusion plasma must be held in the right shape while its properties change. This task explores how a controller can infer its state from magnetic measurements and adjust surrounding coils fast enough to keep it on target.
Hold a changing plasma in place
A tokamak confines hot plasma with magnetic fields. Changing a coil voltage can affect the plasma’s position, shape and current together. Correcting one error can therefore worsen another, and a sufficiently unstable motion can end the experiment.
One controller faces seven simulated situations: holding shapes, changing current, moving vertically, recovering from a pressure drop and following a combined sequence. The machine is a MAST-U-like simulation, not a demonstration on a real tokamak. Its challenge is sustained feedback: measure, act and correct again as the plasma changes.
From diagnostics to decisions
Measure, learn and control
Choose a stage to see what information the controller can use. This is a model diagram, not a measured plasma trajectory.
The plasma boundary is hidden. The controller must infer its shape from magnetic measurements.
Measured simulation outcomes
Where the 11 successes came from
The classical controller faces seven situations and five starting conditions. Select an outcome to see why survival did or did not count as success.
| Case / seed | 1001 | 1002 | 1003 | 1004 | 1005 |
|---|---|---|---|---|---|
| Diverted hold | |||||
| High-current hold | |||||
| Current ramp | |||||
| P4 shape hold | |||||
| Pressure drop | |||||
| Vertical shift | |||||
| Combined sequence |
11 success + 15 kept with tracking failure + 8 failed to finish + 1 void = 35 attempts.
S = success; K = survived but missed tracking; L = plasma lost; F = solver failure; V = solver void. Error values are cm. One case’s average over surviving episodes cannot reveal every failing episode. Experimental results
Interactive · closed-loop control
Keeping the plasma alive is only the first test
Try weak, balanced and aggressive feedback. Then scrub through the response to a disturbance: the boundary can recover while another success requirement still fails.
Illustrative toy response, not FreeGSNKE or benchmark results. Shapes, feedback gain and disturbance amplitude are schematic; the evaluation thresholds below follow the task.
The real policy sees magnetic diagnostics and targets, not this actual boundary. It estimates the state and commands 12 coil voltages at 2 kHz.
A disturbance occurs at 100 ms. Means are evaluated from 200 ms to the end here, rather than requiring every transient sample to pass.
All five mean errors must pass
Adjust a control to inspect the toy outcome.
Survival and coil-current protection apply over the full horizon. A coil-current violation terminates an episode, even before the scoring window.
Benchmark rule: boundary RMS, inner gap, outer gap and X-point height mean errors ≤ 1 cm; mean relative plasma-current error ≤ 3%. The window starts 100 ms after the last reference change or disturbance, with the final 50 ms as fallback. These are separate gates, not an average across metrics. The toy has no disruption mechanism; a coil-limit case is truncated at its first violation.
Infer the shape from magnetic clues
The controller does not directly see the plasma boundary. It receives magnetic measurements, coil currents and the requested shape, then sends twelve coil-voltage commands every half millisecond. Training consists of simulated trajectories under different plasma properties, measurement noise and actuator delays.
Evaluation introduces unseen variations, including drifting sensors and faulty power supplies. A controller must distinguish a real change in the plasma from a misleading measurement. This is a test of robustness within a simulator; success would still leave the challenge of transferring to a physical machine.
Staying alive is only the first test
A successful episode must finish without a coil-current violation and meet every tracking requirement. After allowing the response to settle, mean boundary, gap and X-point-height errors must each be within 1 cm, and current error within 3%. An X-point is a saddle in the magnetic field that helps determine the plasma’s edge geometry.
For example, errors of 0.8, 0.7, 1.1 and 0.9 cm fail because one exceeds its limit. Averaging them would hide the problem. This explains why survival and success are reported separately: a plasma can remain confined while missing the shape needed for an experiment.
Combine an established controller with learned corrections
The classical reference estimates the plasma shape from magnetic measurements and coordinates the coils to reduce the difference from the target. Separate feedback loops help control current and vertical motion.
The learning starter can add a bounded correction to a conventional PID controller, which responds to the size and history of an error. Learning a correction offers a way to retain stabilizing behavior while improving difficult responses. Alternatively, the model can begin by imitating example commands.
Learn from information that will later be hidden
During training, a training-only evaluator, called a critic, can inspect extra simulator information to judge whether an action helped. The deployed controller cannot use those hidden quantities: it must act from magnetic diagnostics and targets. This separation lets rich simulation feedback guide learning without giving the final policy unrealistic senses.
Tracking remains the bottleneck
The deployable classical reference keeps 26 of 34 scored episodes alive, but only 11 meet all tracking requirements: about 76% survival versus 32% success. One additional attempt is excluded because of a solver void. These limited results do not establish a learned controller’s advantage.
Two cases also expose a machine-and-metric limitation. The shaping coils are connected in symmetric upper–lower pairs; vertical motion can change the magnetic topology, causing the X-point measurement to select a distant saddle. Even a controller with privileged information encounters this issue. A failed score here needs a physical and measurement diagnosis before it can be blamed on learning alone.
| Controller | Successful episodes | Episodes kept |
|---|---|---|
| Hold-current V = R I | 0 / 35 | 0 / 35 |
| Privileged PID · diagnostic only | 2 / 34 | 18 / 34 |
| Deployable shape virtual circuits | 11 / 34 | 26 / 34 |
Compute and resources
Controller construction
Reported measurement
- Time
- ≈105 min
- Hardware
- 112 CPUs for data generation; 1 CPU for Jacobians
- GPU allocation
- Not applicable (CPU stages)
- CPU allocation
- ≈168 CPU-h for data generation only
Generating simulator examples dominates the work needed to construct the controller.
Elapsed time by stage
- Reference Jacobians
- 3 min
- Gain design
- 10 min
- Estimator data generation
- 90 min
- Estimator fitting
- 2 min
Data generation: 236 episodes, about 168 allocated CPU-hours (112 × 1.5 h). Other stages have different or unspecified CPU allocations. Packaging adds seconds.
Classical controller
Reported measurement
- Time
- 0.26 ms median / decision
- Hardware
- Not reported
- GPU allocation
- Not applicable (CPU controller)
Measured decision time under the evaluation protocol.
Controller allowance
Budget / limit
- Time
- 0.5 ms median / decision
- Hardware
- Not reported
- GPU allocation
- Not applicable (latency budget)
The permitted median computation time per decision.
A latency limit, not a measured runtime or a total training budget.
Recover reliably when observations are imperfect
Memory may help identify a drifting sensor or delayed actuator. A useful comparison would test the same controller with and without history under each disturbance, reporting both survival and tracking. Improving nominal accuracy is less convincing if it makes the plasma more fragile when the measurements become unreliable.
References and provenance
Magnetic control of tokamak plasmas through deep reinforcement learning
Demonstrates learned magnetic control on the physical TCV tokamak, motivating this simulated control task.
Towards practical reinforcement learning for tokamak magnetic control
Studies improvements to control accuracy and training efficiency, with simulation and TCV experiments.
FreeGSNKE tokamak simulator
Provides the simulator and public machine examples used to model plasma dynamics.
Task definition and experimental evidence
Documents the simulated controller evaluated here. Its machine and control rate differ from the TCV hardware experiments.
Code links require access to the project’s GitHub repository.
Leaderboard
SimulatedDesign preview · leaderboard values and research histories are simulated.
| # | Method | Type | Feasibility ↑ | Shape RMS ↓ | Current error ↓ | Research time | Run |
|---|---|---|---|---|---|---|---|
| 1 | Agent search | 0.5899 | 0.4661 | 0.6248 | 76 h | ||
| 2 | Agent search | 0.5877 | 0.4678 | 0.6271 | 60 h | ||
| 3 | Full-shape virtual-circuit controller | Reference | 0.5850 | 0.4700 | 0.6300 | — | — |
| 4 | BC-from-PID + SAC | Reference | 0.4797 | 0.5732 | 0.7683 | — | — |
How to read these leaderboard metrics
These leaderboard values and research histories are simulated design examples. The leaderboard is ranked by Feasibility. The research curves show relative improvement in this metric over Full-shape virtual-circuit controller; only accepted new-best results update the retained trajectory. A positive gain means a better result, with the sign adjusted for metrics where lower is better. The task protocol is described in Task & evaluation above. These preview columns and trajectories are not measured benchmark results and must not be compared with the recorded experiments. The leaderboard below is simulated interface data, not a verified tokamak result. The actual score is successful episodes / non-void scored episodes under tokamak-shape-metrics/v2, gated by policy validity and ≤0.5 ms median computation. Survival, training reward and generic leaderboard metrics must not be interpreted as this success rate. The current classical reference achieves 11/34 successes and 26/34 survival on sealed-v0.2 seeds 1001–1005.
- FeasibilityPrimary metric · Higher is better
- Performance under the task’s plasma-control feasibility and success criteria. The criteria include the operational conditions specified by the protocol.
- Shape RMSLower is better
- Root mean squared deviation between the controlled plasma shape and the requested shape.
- Current errorLower is better
- Deviation of the controlled current from the requested current over the evaluated trajectory.
AI4AI research progress
Research trajectory
Runtime–performance frontier
How improvement is measured
Relative improvement over Full-shape virtual-circuit controller in the primary metric; only retained results update the best-so-far curve.
Accepted new-best experiments raise the trajectory. The frontier includes evaluated candidates; trial, partial and stopped experiments are excluded.