WorksPhysics and Astronomy
Model-resilient multivariable tokamak feedback control using reinforcement learning
Abstract
Sustaining high-performance plasmas in nuclear fusion reactors requires simultaneous feedback control of multiple plasma parameters to their desired values. However, adjusting individual actuators in tokamaks induces coupled responses in multiple plasma parameters, necessitating coordinated feedback control. To enable intelligent coordination of these shared actuators, we employ reinforcement learning. In this work, we develop a single reinforcement-learning policy that jointly controls the stored energy and safety factor of a plasma in an integrated tokamak simulation environment. The policy coordinates plasma current, heating power, and elongation in response to plasma observations and target values. In particular, the trained policy still responds appropriately to artificially introduced measurement biases and maintains robust control under changes in the underlying physics model. These results indicate that the policy has learned to flexibly regulate the plasma state through observation-based feedback at each control step, rather than simply memorising control trajectories associated with given targets. This suggests that a controller trained entirely in simulation could potentially be transferred to real tokamaks, where measurement noise, biases, and uncertainties in the underlying physics are present. This simulation-based approach offers a route towards developing controllers for future devices such as ITER and for devices with limited experimental data.
Introduction
Tokamaks use magnetic fields to confine a hot plasma in a toroidal configuration. Initiating a discharge and maintaining the desired operating state require plasma current, shape and thermal conditions to be controlled according to the discharge phase. The plasma control system coordinates multiple actuators so that different physical quantities track their respective targets [1, 2]. Because an actuator can affect several quantities, controller design must specify which actuators are adjusted to bring each quantity towards its target [3]. For example, a proportional–integral–derivative (PID) shape controller on DIII-D adjusted shaping-coil voltages in response to flux errors at boundary control points and to X-point position errors [4]. The edge safety factor is used to assess discharge operating limits associated with magnetohydrodynamic stability [5]. Thermal stored energy characterises the plasma’s overall thermal state and serves as a performance indicator [6].
Multiple-input, multiple-output (MIMO) control is difficult because several controlled quantities depend on the same actuators and the plasma response to each actuator varies with the operating point [3, 7]. On DIII-D, joint control of stored energy and toroidal rotation required coordinated changes in neutral-beam power [8]. In feedback loops for individual quantities, control gains are tuned over repeated discharges or adjusted within a discharge as the plasma response changes [9, 10]. However, changing the gain in one loop can alter the response of other controlled quantities through shared actuators, making independent tuning difficult. As the numbers of controlled quantities and actuators increase, more gains and coupling relationships must be considered together. On JET, a shape controller used a singular value decomposition of the linearised response matrix to identify combinations of plasma–wall gaps for feedback [11, 12]. On DIII-D, a controller based on an experimentally identified response model regulated the poloidal flux profile and normalised beta together [13]. When loops request different actions from the same actuator, the final command is chosen according to control priorities and the available actuator range [14]. Joint tracking therefore requires a feedback law that coordinates actuator actions according to the measured plasma state and multiple targets.
Reinforcement learning (RL) provides a way to learn a feedback law through interaction with a controlled system [15]. A policy selects actions from observations and learns from the resulting state changes and rewards [16]. In a tokamak simulator, the plasma model supplies the response to each combination of actuator commands, allowing a single policy to learn how to coordinate the actuators. Tokamak applications of RL include magnetic control of plasma shape on TCV [17], control of tearing-instability risk on DIII-D [18], and performance control through joint regulation of the safety-factor profile and normalised beta in JT-60SA simulations [19]. These studies show that RL policies can meet a range of control objectives in tokamak experiments and simulations. However, during an actual experiment, a tracking error can arise from either a shift in a measurement or a change in the plasma response to the same actuators. The transfer of a policy learned in simulations to experiments requires a more careful understanding how a persistent bias in one measurement affects actuator commands at fixed targets and how a change in the plasma response affects the range of targets a single policy can track.
This study examines whether a policy adjusts its actuators in response to changes in the measured plasma state and over what range of targets it can maintain joint tracking when the plant changes. A single policy trained in an ITER-scale tokamak simulation was evaluated without retraining, with uncertainty in plasma parameters and applied actuator values throughout the tests. Tracking was assessed across fixed targets and from different initial states. The moving target test then varied the targets during operation. In the measurement bias test, a bias was added to the stored energy measurement supplied to the policy. This tested whether the policy adjusted the actuators to bring that measurement back towards its target. The plant shift test changed the plant configuration, including transport and heating conditions, and assessed joint tracking inside and outside the training target domain. These tests assess the potential for a simulation-trained policy to serve as a starting point for multivariable control on real tokamak experiments with limited discharge data.
Simulation environment
Policy training and evaluation use a simulation environment for an ITER-scale deuterium–tritium H-mode plasma. The simulation starts in H-mode and evolves the plasma in response to plasma current, neutral beam power and elongation. TORAX computes core plasma transport [20], and a scaling-based pedestal model provides the boundary conditions for the core profile [21]. The TokaMaker fixed-boundary equilibrium solver supplies the magnetic geometry required for the transport calculation [22], and Gym-TORAX connects the simulation environment to the RL policy [23, 24]. At each control cycle, the policy adjusts the three actuators and the environment calculates the resulting plasma response. The computed thermal stored energy and edge safety factor are included in the observations for the next control cycle. Figure 1 shows this information flow.

Figure 1. Information flow between the simulation environment and the policy. Through Gym-TORAX, the policy adjusts the three actuators: plasma current, beam power and elongation. TORAX evolves the plasma state using heat diffusivities from the transport model, pedestal boundary conditions and fixed-boundary magnetic geometry provided by TokaMaker. The computed thermal stored energy and safety factor are included in the policy’s next observation. Training uses BgB, and the frozen policy is also evaluated with CGM and QLKNN.
TORAX evolves the ion temperature , electron temperature and poloidal flux in the normalised toroidal flux coordinate [20]. Ion and electron energy transport are described by their respective flux-surface-averaged heat transport equations, and the poloidal flux evolves according to the current diffusion equation. Equations (1)–(3) give the ion heat transport, electron heat transport and current diffusion equations, respectively.
Here, is the derivative of volume with respect to the flux coordinate, and – are flux-surface geometric factors. The quantities , , and denote the ion and electron densities, heat diffusivities, heat-convection terms and volumetric heat sources, respectively. The toroidal flux enclosed by the plasma boundary is , is a flux function associated with the toroidal magnetic field, is the electrical conductivity parallel to the magnetic field, and represents the non-inductive current contribution. The heat sources and losses include neutral beam heating, fusion heating, ohmic heating, ion–electron energy exchange, bremsstrahlung and cyclotron radiation. The heat flux terms are calculated using the Bohm/gyro-Bohm (BgB) transport model [25] in the training plant, and the critical-gradient model (CGM) and QLKNN for evaluations with modified plants. The ion temperature-gradient threshold in CGM follows the model of Guo and Romanelli [26], and QLKNN is a neural network model that approximates transport predictions from the quasilinear gyrokinetic code QuaLiKiz [27, 28].
The pedestal model specifies the pressure and position of the pedestal top for the core transport calculation. The model adapts the pedestal-width scaling [21], using the global poloidal beta in . The pressure follows , where is the ballooning-limit pressure gradient at the prescribed magnetic shear and triangularity, and the elongation exponent and proportionality constant are specified for each plant configuration. The electron density follows a prescribed density profile with a change in gradient at the pedestal top. At each computational step, this profile is normalised so that the line-averaged density is a prescribed fraction of the Greenwald density [29, 30]. Since the Greenwald density is proportional to the plasma current, changes in current also affect the thermal state through the density. Particle transport and fuelling are not evolved separately.
The three actuators in this simulation are the plasma current , neutral beam power and elongation ; their permitted ranges and maximum changes per control cycle are listed in Table 1. The current affects flux evolution, equilibrium and the density profile, while elongation affects the plasma boundary and pedestal model; beam power scales a Gaussian heating profile with a fixed spatial shape. Physical actuator dynamics and lower-level current and shape controllers are not modelled separately. TokaMaker receives the current and elongation, together with the on-axis pressure from the preceding TORAX state. The resulting equilibrium supplies the magnetic geometry for TORAX. The magnetic geometry is updated every 5 s and held fixed between updates, while TORAX continues to evolve the poloidal flux. The used for control is calculated from the flux evolved by TORAX on this geometry. For the equilibrium calculation, the plasma boundary is prescribed in the Miller form given in equation (4) [31], where controls the boundary triangularity and sets the elongation.
| Quantity | Description | Min | Max |
| Observation space | |||
| plasma current | 10 MA | 16 MA | |
| neutral-beam power | 0 MW | 100 MW | |
| elongation | 1.65 | 2.00 | |
| stored-energy target | 150 MJ | 448.5 MJ | |
| measured stored energy | – | – | |
| safety-factor target | 2.424 | 5.604 | |
| measured safety factor | – | – | |
| Action space | |||
| plasma-current increment | −0.05 MA | +0.05 MA | |
| neutral-beam-power increment | −5 MW | +5 MW | |
| elongation increment | −0.01 | +0.01 |
Table 1. Observation and action spaces of the policy. The observation of equation (5) consists of the three actuator setpoints, the two targets and the two measured outputs; the action is one increment per actuator, added to the setpoint at each control period.
Open-loop scans of the training plant are used to characterise actuator–output sensitivities and coupling. The scans use nominal plasma parameters and apply the actuator commands directly. With the policy disabled, one actuator is varied while the other two are held at their reference values, and the changes in thermal stored energy and safety factor are measured after settling. Figure 2 shows the average output changes for the specified actuator increments across each scan range. Within these ranges, increasing the current raises the thermal stored energy and lowers the safety factor, whereas increasing the elongation raises both quantities. Changes in beam power primarily affect the thermal stored energy and have a comparatively small effect on the safety factor. To account for this coupling, joint tracking of and is formulated as a multiple-input, multiple-output control problem in which all three actuators are adjusted together.
Figure 2. Open-loop sensitivities of the settled (a) thermal stored energy and (b) edge safety factor to the three actuators in the training plant. The reference settings are MA, and MW. Each scan uses nominal plasma parameters and applies the commanded actuator values directly, varying one actuator while holding the other two fixed. Each bar shows the average output change across the scan range for a change of 1 MA in current, 0.1 in elongation or 20 MW in beam power.
During training and closed-loop evaluation, the simulation introduces uncertainty in plasma parameters such as the effective charge and in the values applied to all three actuators. Bounded random walks updated every 2 s vary the plasma parameters about their nominal values and the applied actuator values about the values requested by the policy. For example, the applied neutral-beam power can fluctuate even when the power command is held fixed, changing the heating delivered to the plasma. Under these conditions, the policy is trained to adjust the actuators according to changing plasma observations rather than simply memorise an actuator combination for each target. The imposed deviations are not supplied directly to the policy, and no additional noise is added to the measurements of the plasma outputs.
The CGM and QLKNN evaluations include uncertainty and use nominal plant configurations that differ from the training configuration. The transport model, pedestal parameters, prescribed density profile and beam absorption fraction are changed together. Changing the beam absorption fraction alters the heating delivered to the plasma at the same beam power; changes in the pedestal and density settings also alter the thermal response to current, elongation and heating. The same policy is applied without retraining to assess joint tracking in the modified plants. The device and plasma conditions, detailed model settings, numerical methods and uncertainty parameters are summarised in Appendix § 8.
Reinforcement-learning control method
Controller formulation and training
The controller regulates the thermal stored energy and edge safety factor by changing the plasma current , neutral-beam power and elongation . Reinforcement learning formulates this task as repeated interaction between a policy and the simulation environment [16]. At control step , the policy selects an action from the observation and receives a reward after the plant advances. Training adjusts the neural-network parameters to maximise the expected discounted return , where weights future rewards. The resulting policy is used as a fixed feedback law during evaluation.
The observation contains seven scalars,
comprising the actuator setpoints, measured outputs and target pair . The policy does not directly observe the plasma profiles, the imposed deviations or time. Its action specifies one increment per actuator. Each setpoint is the running sum of these increments, restricted to the actuator range and maximum change per control period in table 1. The policy therefore receives the current values of the setpoints it has adjusted, as well as the plasma response.
The training target domain is defined by an open-loop scan of the training plant at 100 MW of beam power. Writing the interpolated upper boundary of the settled scan states as gives
Targets are sampled conditionally: is drawn first, and the corresponding scan boundary sets the upper limit for . Figure 3 shows the resulting training-request region.

Figure 3. Settled stored energy and edge safety factor from the open-loop current and elongation scans of the training plant at 100 MW. Solid line, interpolated sampling boundary; shaded area, target domain of equation (6). The arrow marks the sampling of a target pair from for a training episode.
Each training episode lasts 200 s, comprising 400 control steps of 0.5 s. Episodes use fixed, stepped and random-walk targets with probabilities 0.4, 0.3 and 0.3, respectively. A failed transport solve or stored energy outside 100 MJ to 700 MJ terminates the episode.
The reward combines the errors in both controlled outputs,
Each factor decreases monotonically with the absolute tracking error. It equals one at zero error and 0.1 at 200 MJ of stored-energy error or 2.0 of safety-factor error; these values set the slopes and . Their product rewards simultaneous reduction of both errors. A failed step receives the reward .
The policy was trained with proximal policy optimisation (PPO) [32] using Stable-Baselines3 [33]. PPO collects trajectories with the current policy and updates an actor network, which selects actions, and a critic network, which estimates future return. Its update rule discourages large policy changes between successive training cycles. The learning algorithm uses the collected observations, actions and rewards without constructing an internal model of the plant dynamics. Observations are standardised using running training statistics. The policy was trained under uncertainty with a budget of 4000 simulated episodes. Table A4 gives the network and optimisation settings. The reported policy comes from a single training run.
Table A4. Network, sampling and optimisation settings of the reported PPO policy. The episode budget is the requested training duration, and the target-mode entries are probabilities. Uncertainty is included throughout training. All evaluations use the policy and observation-standardisation statistics from this single run without further updates.
| Setting | Value |
| Algorithm | proximal policy optimisation (PPO) [32] |
| Parallel environments | 40 |
| Training budget, episodes control steps per episode | |
| Target modes (fixed; step; random walk) | 0.4; 0.3; 0.3 |
| Discount | 0.99 |
| Policy and value network | multilayer perceptron, hidden layers [256, 256] |
| Learning rate | |
| Rollout per environment, minibatch, epochs | 256 steps, 64, 10 |
| Clip range | 0.2 |
| Library versions | Stable-Baselines3 2.9.0, PyTorch 2.12.1 |
Evaluation protocol
Each test case consists of one episode under uncertainty. Evaluation uses deterministic actions with the policy parameters and observation-standardisation statistics frozen. Deterministic actions use the mean of the policy’s action distribution. A terminal value is the mean over the last 20 control steps, or 10 s. The signed relative tracking errors are
with positive values indicating outputs below their targets. Terminal errors use the terminal mean of each output. A target is counted as met when both absolute relative errors are within 5 %; this tolerance is an analysis convention. Where a terminal mean does not describe whether the target is held, the fraction of the terminal window within tolerance and the largest excursion are also reported. All evaluation episodes reached the horizon.
In the measurement-bias test, an offset is added only to the stored energy supplied to the policy. The target and plant equations are unchanged, and the true outputs are recorded independently of the biased observation. The plant-change evaluations use a common target list and additional grids extending outside .
Results
A feedback controller must adjust its actuators in response to changes in either the target or the measured plasma state. To evaluate the control performance under various conditions, we conducted four tests. The fixed-target tests assessed tracking accuracy across target pairs and compared trajectories to a common target from different initial states. The target-change test examined how the policy adjusted its actuators when changed while remained fixed. The measurement-bias test held both targets fixed and examined how the actuator commands changed when a bias was added only to the measurement supplied to the policy. With future tokamak applications in mind, the final simulations assessed how well the policy retained joint tracking without retraining when the transport model and plasma conditions differed from those used in training.
All tests used the same policy without retraining and included uncertainty in plasma parameters and applied actuator values. Terminal errors were calculated from the outputs averaged over the final 10 s, whereas final actuator setpoints were taken from the last control step. A case met the joint tracking criterion if both outputs had absolute relative terminal errors of 5 % or less.
Fixed target test
A single trained policy was evaluated on 100 different fixed target pairs sampled from the training target domain . Table 2 shows the tracking error metrics for different-target controls with a single trained RL policy. Across both outputs and all target pairs, the relative terminal errors gave a root-mean-square error (RMSE) of 3.17 %. The policy thus tracked both outputs accurately for most of the sampled target pairs.
| Quantity | Value |
| (%) | 1.6 |
| (%) | 1.9 |
| (MJ) | 4.1 |
| 0.065 | |
| RMSE (%) | 3.17 |
| Targets with and within 5 % | 85/100 |
Table 2. Terminal tracking errors on the training plant for 100 target pairs sampled from the target domain, one episode each. and are the absolute terminal errors, and the relative errors (equation (8)), and the mean over the targets; RMSE .
Joint tracking failures were more common at higher stored-energy targets, and usually only the safety factor was outside tolerance. In most failed runs, both current and beam power ended at their upper limits. The current could not be raised further to lower an above-target safety factor. Reducing elongation could lower both outputs (Figure 2), but no additional heating was available to offset the drop in stored energy. With the other output on target at these operating points, an error of a given relative magnitude reduces the reward more for than for because the two reward factors are scaled differently. The policy thus appears to have sacrificed some safety-factor accuracy to keep stored energy near target and earn the higher reward.
Tracking from different initial states
In tokamak operation, the plasma state at the start of control can vary between discharges even when the target operating point is the same. The target pair for this test was . Figure 4 shows how the same policy approached this target from 12 initial states with different combinations of and . For example, in case III, reaching the target required a decrease in and an increase in , whereas case VII required the opposite changes. All 12 cases met the joint tracking criterion.

Figure 4. Trajectories from twelve initial states towards the common target on the training plant. (a) Full trajectories. Red arrows indicate the direction of approach. Circles labelled I–XII mark the initial states and the star marks the target. (b) Trajectories near the target. Circles mark the final states. Inside the shaded box, each output is within 5 % of its own target.
The trajectories in Figure 4(a) followed two broad paths depending on whether was initially below or above its target. In cases I–VI, the trajectories started at different values of and drew together to the left of the target point as increased. In cases VII–XII, the trajectories generally passed below before approaching the target point as rose and fell.
| Label | (MJ) | (MA) | (MA) | (MW) | ||||
| I | 196 | 15.9 | 1.66 | -1.62 | +4.94 | 15.08 | 13.2 | 1.728 |
| II | 279 | 16.0 | 1.65 | -1.24 | +3.94 | 15.21 | 22.3 | 1.726 |
| III | 352 | 16.0 | 1.65 | -1.34 | +4.57 | 15.22 | 16.7 | 1.732 |
| IV | 213 | 15.9 | 1.76 | -1.42 | +4.27 | 15.35 | 18.2 | 1.716 |
| V | 296 | 16.0 | 1.74 | -0.59 | +4.08 | 14.54 | 34.0 | 1.752 |
| VI | 378 | 16.0 | 1.74 | -0.77 | +4.53 | 14.49 | 30.4 | 1.755 |
| VII | 196 | 13.4 | 1.87 | +0.30 | +2.60 | 14.72 | 44.4 | 1.765 |
| VIII | 277 | 13.4 | 1.86 | -0.28 | +2.20 | 15.05 | 40.3 | 1.734 |
| IX | 338 | 13.4 | 1.86 | -0.57 | +4.25 | 14.63 | 31.4 | 1.758 |
| X | 168 | 11.4 | 1.86 | -0.75 | +3.31 | 15.22 | 31.3 | 1.728 |
| XI | 234 | 11.4 | 1.86 | -0.35 | +3.01 | 14.89 | 37.0 | 1.733 |
| XII | 283 | 11.4 | 1.86 | -0.71 | +3.22 | 14.97 | 33.1 | 1.728 |
Table 3. Tracking the common target from the twelve initial states in Figure 4. The table gives the initial stored energy, plasma current and elongation, the signed relative terminal errors in the two outputs (%), and the final actuator values. Terminal errors use the mean outputs over the final 10 s. Actuator values are taken at the final control step.
Cases III and VI followed the same broad path and reached similar terminal values of and , although case VI ended with lower plasma current and higher beam power and elongation than case III. Although the test specified only the target point and prescribed neither intermediate states nor a sequence of actuator commands, trajectories from different starting points followed two broad paths. This pattern suggests that the policy may have learned to steer the plasma onto one path or the other according to its initial state. Along each path, the policy could reuse a control strategy across cases, reducing the need to learn a separate sequence of actuator commands for every combination of initial state and target.
Moving target test
In the moving-target test, the stored-energy target was modulated within an evaluation scenario, while the target remained fixed, as shown in Figure 5. The policy was trained to maximise the expected discounted return, which gives greater weight to rewards received sooner. After each change, the policy drove stored energy rapidly towards its new target, with each of the three actuator commands changing at or near its maximum permitted rate during part of the response. The safety-factor error peaked in magnitude when stored energy was close to target and then decreased again. Interpreting this temporary deterioration and subsequent recovery in safety-factor tracking requires examining the total reward per step and both component factors.
Figure 5. Moving target test on the training plant. (a) Thermal stored energy and its target (dotted), raised from 200 MJ to 300 MJ at 50 s and returned to 200 MJ at 150 s. (b) Edge safety factor and its fixed target of 3.3 (dotted). Circles mark the largest absolute error after each change. (c) Stored-energy reward factor . (d) Safety-factor reward factor , which falls briefly after each target change and then recovers. (e) Total reward from equation (7). (f) Plasma current . (g) Neutral-beam power . (h) Elongation . Vertical dashed lines mark the target changes, and the shaded bands cover the first 20 s after each change.
Immediately after each target change, the stored-energy error increased, reducing both the stored-energy reward factor and the total reward per step, . The subsequent recovery in was fast enough for the product to rise even as the safety-factor reward factor continued to fall. Once was close to target, the policy adjusted plasma current and elongation in opposite directions as moved back towards its fixed target. The sequence after both steps suggests that the policy learned to recover total reward early by restoring first at a temporary cost to . This trade-off helps explain why, in most fixed-target cases that missed the joint criterion, the policy kept stored energy within tolerance while the safety factor remained outside it (§ 4.1).
Measurement bias test
Within a single tokamak, the stored-energy response to the same injected neutral-beam power can vary with plasma density, impurity concentration and wall conditioning. For example, lithium wall coatings can alter energy confinement [34], impurity concentrations affect radiative losses [35], and plasma density influences the fraction of injected beam power that passes through the plasma without being absorbed [36]. A controller that had simply memorised the actuator setpoints for each target in an idealised simulation would reproduce those setpoints for a given target even if the measured stored energy changed. A policy that uses the measured state for feedback should make opposite corrections depending on whether the measured energy is above or below target. To isolate the policy’s response to such a shift in the feedback signal, the targets and plant configuration were held fixed and a bias was added only to the stored-energy measurement supplied to the policy.
All five tests used the same random-walk sequences to perturb the plasma parameters and applied actuator values, so the actuator responses to different biases could be compared under a common disturbance history. The target pair was fixed at . The reference test (black line in Figure 6) used the unmodified measurement. In each of the other tests, a bias of , , or was added to the stored-energy measurement at 100 s and held constant.
Figure 6. Measurement bias test on the training plant at . (a) Stored energy supplied to the policy, , where is the energy computed by the plant. At 100 s (vertical dashed line), a constant measurement bias of , , 25 MJ or 50 MJ was applied for the shaded interval. The black line shows the reference case with zero bias throughout. (b) Edge safety factor . Dotted lines mark the targets for the two outputs. (c) Plasma current . (d) Neutral-beam power . (e) Elongation .
At 100 s, the measured stored energy rose abruptly for positive biases and fell for negative biases. The trajectories of the three actuators then diverged (Figure 6). The policy reduced beam power and elongation when the measured energy rose above target and increased both when it fell below target. For biases of the same sign, larger biases produced larger changes in both final actuator values relative to the unbiased case. The measured stored energy returned close to 270 MJ. For all five tests, the terminal errors in measured stored energy and were both within 5% of their respective targets (Table 4).
| Bias (MJ) | (MJ) | (%) | |
| none | |||
Table 4. Terminal tracking errors in the measurement bias test at . is the signed error in measured stored energy (MJ), and is the signed safety-factor error. Both are calculated as the target minus the corresponding measurement averaged over the final 10 s. expresses the safety-factor error as a percentage of its target.
The moving target and measurement bias tests show that a single RL policy used both the target and the measured plasma state for feedback. When the stored-energy target changed, the policy coordinated plasma current, neutral-beam power and elongation to reduce the stored-energy error rapidly and then restore tracking. With both targets fixed, the direction and size of the actuator corrections depended on how far the persistently biased energy measurement lay above or below target. The ability to adjust those commands to the measured error could also support tracking when operating conditions change on the same tokamak.
Plant shift test
On a newly commissioned tokamak, or one with limited discharge data, the controller may need to bring the plasma to a target operating point before the response to its actuators has been fully characterised. The plant shift test examined how well the same policy could track thermal stored energy and the edge safety factor without retraining when the plasma response differed from that encountered during training.
The preceding test changed only the stored-energy measurement supplied to the policy. On the other hand, for the plant shift test, the turbulent transport model, pedestal settings, prescribed density profile and absorbed fraction of injected beam power were changed together, altering the plasma response to the actuators. At matched settings of plasma current, beam power and elongation, the open-loop scans gave different values of both and on the training and evaluation plants. The training plant used BgB. For evaluation, one plant used CGM and the other used QLKNN, a neural-network surrogate for the quasilinear gyrokinetic code QuaLiKiz. Figure 7 shows each plant’s scan envelope at a fixed beam power of 100 MW as plasma current and elongation were varied. The CGM envelope lay above the BgB envelope in stored energy at every examined, whereas the QLKNN envelope lay below it at low . Targets were selected on or below each evaluation plant’s envelope. Region 1 contains targets within the training target domain and Region 2 those outside it.
Figure 7. Target grids and scan envelopes for the two evaluation plants. (a) CGM. (b) QLKNN. The blue and red curves are the respective 100 MW scan envelopes of the training plant (BgB) and the evaluation plant. Circles mark Region 1 targets within the training domain (light blue). Triangles mark Region 2 targets in the area below the evaluation envelope and outside (light red).
Since the plants were evaluated on different target grids (Figure 7), Table 5 compares regions within each plant. Joint RMSE changed little between regions on CGM and was higher outside the training domain on QLKNN. At Region 2 targets where beam power stayed at its upper limit throughout the final 10 s, the residual errors differed by plant (Figure 8). The CGM cases had high stored-energy targets, with current also at its upper limit and a larger relative RMSE in than in . The QLKNN cases had relatively high safety-factor targets and elongation at its upper limit. Stored energy ended below target while the safety factor was within tolerance.
Figure 8. Signed relative terminal errors for the target grids in Figure 7. (a) CGM, Region 1. (b) CGM, Region 2. (c) CGM, full grid. (d) QLKNN, Region 1. (e) QLKNN, Region 2. (f) QLKNN, full grid. Dotted circles mark per-target RMSEs of 5, 10 and 25 %, calculated as . Each panel gives the number of targets and the RMSE over both outputs and all targets in that panel.
| Evaluation plant | Region 1 | Region 2 | Full grid |
| CGM | 5.32 | 5.25 | 5.30 |
| QLKNN | 4.07 | 5.44 | 4.25 |
Table 5. Joint RMSE (%) of the relative terminal errors in stored energy and safety factor, calculated as in Table 2. Regions 1 and 2 contain targets inside and outside the training domain, respectively. The full grid includes both regions.
Even outside the training target domain, the joint RMSE remained about 5 % on both evaluation plants without retraining. These results support testing a policy trained in simulation as a starting point for joint control on real tokamak experiments with limited discharge data, before the combination of plasma current, beam power and elongation needed for each target has been mapped experimentally. Tests on such a device could begin at operating points with room to adjust the actuators and then extend towards their limits to identify which output accounts for the residual error.
Conclusion
Combining integrated tokamak simulation with reinforcement learning yielded a MIMO feedback policy for tokamak plasmas. In an ITER-scale simulation, one policy coordinated plasma current, neutral-beam power and elongation to track thermal stored energy and the edge safety factor across a range of operating points. Four tests examined in detail how the RL policy used feedback to track the two targets. The policy tracked multiple fixed target pairs, reached a common target from different initial states and recovered joint tracking after changes in the stored-energy target. With both targets held fixed, the direction of its corrections depended on whether the biased stored-energy measurement was above or below target, and the measurement returned close to target. Under altered transport and heating conditions, the same policy retained joint tracking without retraining at some operating points, including targets outside the training domain.
The same procedure could guide the development of policies for other plasma quantities and actuators. Before a new discharge scenario is attempted, a policy can be trained in simulation and its commands examined at candidate operating points. Using one policy for several targets could reduce the need to design new actuator waveforms for each initial state and target. Simulating a scenario under different plasma conditions can reveal how close each actuator comes to its limit, even at operating points with similar tracking accuracy. For tokamaks with limited discharge data, this comparison could help identify which operating points to test first and which plasma responses to examine. Measurements from those discharges could then be used to check the simulated responses and guide subsequent scenarios over a wider operating range. Linking policy development in simulation with staged testing in tokamak discharges could provide a practical route to sim-to-real transfer of RL feedback control.
Acknowledgements
This research was supported by the Chung-Ang University Graduate Research Scholarship in 2024. This work was supported by a National Research Foundation of Korea (NRF) grant funded by the Korean government (MSIT) (Grant No. RS-2024-00346024). This research was supported by the National Research Foundation (NRF) funded by the Korean government (MSIT) (No. RS-2026-25545529). OpenAI Codex, a generative AI tool, assisted with the writing and English-language editing of this manuscript.
Data availability
The data that support the findings of this study are available from the corresponding author upon reasonable request.
Plant parameters, training settings and uncertainty
The parameters below specify the simulation and controller used in sections 2 and 3. The machine dimensions and magnetic field are common to all configurations, while composition and density settings vary as shown in Table A1. The reference operating point gives the plasma state about which the actuator sensitivities in Figure 2 were measured; it is not a target imposed throughout the evaluations. For the boundary in equation (4), the geometric triangularity equals . Thus the tabulated Miller coefficient and geometric triangularity describe the same boundary but are distinct quantities.
| Quantity | Symbol | Training (BgB) | CGM | QLKNN |
| Major radius | 6.2 m | |||
| Minor radius | 2.0 m | |||
| Toroidal field | 5.3 T | |||
| Boundary shaping coefficient | 0.4 | |||
| Main ion species | – | D:T = 50:50 | ||
| Impurity | – | Ne with trace W | ||
| Effective charge | 2.0 | 2.0 | 1.5 | |
| Line-averaged density | 0.88 | 0.86 | 0.75 | |
| Separatrix density | – | 0.20 | 0.20 | 0.34 |
| Reference operating point (training plant, MA, , MW) | ||||
| Thermal stored energy | 306.0 MJ | – | – | |
| Edge safety factor | 3.34 | – | – | |
| Normalised beta | 1.51 | – | – | |
| Poloidal beta | 0.46 | – | – | |
| Energy confinement time | 3.02 s | – | – | |
| Volume-averaged ion temperature | 7.7 keV | – | – | |
| Central electron temperature | 18.8 keV | – | – | |
| Central ion temperature | 17.7 keV | – | – |
Table A1. Machine, composition and density settings of the ITER-scale D–T H-mode simulations. Columns distinguish the training plant (BgB) from the CGM and QLKNN evaluation configurations; merged entries are common to all. The reference block gives the settled training-plant state used for the actuator sensitivity scan. The Miller boundary coefficient corresponds to geometric triangularity . Density fractions are normalised to the Greenwald density .
Table A2 distinguishes the control period from the update intervals for equilibrium geometry and uncertainty. Its setpoint-change bound describes how far the actuator setpoints can move while the geometry is held. The transport solver uses the stiff-transport stabilisation scheme of Pereverzev and Corrigan [37]. The beam deposition shape remains fixed as the policy changes its power.
| Quantity | Value |
| Timing | |
| Transport time step and control period | 0.5 s |
| Episode duration | 200 s (400 control steps) |
| Equilibrium-update interval | every 10 control steps (5 s) |
| Uncertainty update interval | every 4 control steps (2 s) |
| Largest change of an actuator setpoint within one equilibrium-update interval | 0.5 MA in ; 0.10 in |
| Transport solver | |
| Solver | linear, predictor–corrector (10 corrector steps) |
| Stiff-term stabilisation | Pereverzev–Corrigan (, ) |
| Radial grid | 50 cells; 100 flux surfaces from the equilibrium |
| Outermost surface used as boundary | 0.99 of the boundary flux |
| Equilibrium solver | |
| Boundary and solve | prescribed Miller boundary; fixed-boundary solve |
| Poloidal-flux grid | |
| Solve targets | plasma current; on-axis pressure |
| Heating source | |
| Beam deposition location | 0.0 |
| Beam deposition width | 0.3 |
| Electron heating fraction | 0.7 |
Table A2. Timing, discretisation and solver settings shared by the plant configurations. The equilibrium-update interval determines how long TORAX uses one geometry. The control period and the uncertainty update interval are given separately. Beam deposition parameters define the fixed heating-profile shape; the absorbed fraction is given separately in table A3.
Table A3 identifies the heat-transport closure and coefficients for each plant. The absorbed fraction converts the injected beam power into deposited heating power, so equal need not give equal heating across configurations. This table describes the transport and absorption components of the plant change; the prescribed density settings are in Table A1, and the pedestal dependence is described in § 2. The pedestal-width scaling uses the global poloidal beta from the preceding TORAX state in place of the pedestal-top beta in the original scaling [21].
Table A3. Heat-transport and beam-absorption settings of the training plant (Bohm/gyro-Bohm) and the CGM and QLKNN evaluation configurations. multiplies the inward convective velocity of the Bohm/gyro-Bohm model; is the exponent of the critical-gradient excess, distinct from the pedestal ballooning gradient . ITG, TEM and ETG denote ion-temperature-gradient, trapped-electron and electron-temperature-gradient modes. Unlisted quantities retain the transport-code defaults.
| Model | Parameter | Value |
| Bohm/gyro-Bohm (training plant) | Bohm coefficient | |
| Bohm/gyro-Bohm (training plant) | gyro-Bohm coefficient | |
| Bohm/gyro-Bohm (training plant) | multipliers (all four channels) | 2.0 |
| Bohm/gyro-Bohm (training plant) | convective velocity coefficient | |
| Bohm/gyro-Bohm (training plant) | absorbed beam-power fraction | 0.4 |
| Critical gradient (CGM plant) | ||
| Critical gradient (CGM plant) | stiffness | 3.0 |
| Critical gradient (CGM plant) | critical-gradient exponent | 1.0 |
| Critical gradient (CGM plant) | 1.5 | |
| Critical gradient (CGM plant) | 5.0 | |
| Critical gradient (CGM plant) | absorbed beam-power fraction | 0.85 |
| QLKNN (QLKNN plant) | ||
| QLKNN (QLKNN plant) | ITG, TEM and ETG branches | on |
| QLKNN (QLKNN plant) | absorbed beam-power fraction | 1.0 |
| All | ||
| All | smoothing width | 0.2 |
Table A4 records the architecture and optimisation settings of the PPO run, implemented in Stable-Baselines3 [33] with PyTorch [38]. The episode budget specifies the requested training duration, and the target-mode probabilities determine how often the policy encounters stationary and moving requests. Evaluation reuses the trained policy and frozen observation-standardisation statistics without further optimisation.
Table A5 separates the allowed excursion of each random walk from the standard deviation of an individual Gaussian increment. The bound gives the maximum allowed deviation. Deviations are expressed as fractions of the nominal parameter values or the actuator commands, except for the additive deviation in elongation. Uncertainty acts on plant parameters or applied actuator values, while the measurement-bias test independently changes the stored energy presented to the policy.
| Deviation | Quantity | Bound () | Increment standard deviation |
| effective charge | 0.0432 | 0.00288 | |
| bootstrap-current multiplier | 0.3195 | 0.01420 | |
| electron heat diffusivity | 0.0576 | 0.00288 | |
| ion heat diffusivity | 0.0576 | 0.00288 | |
| applied pedestal temperature | 0.0360 | 0.00288 | |
| applied plasma current | 0.0344 | 0.00258 | |
| applied beam power | 0.0360 | 0.00288 | |
| applied elongation (absolute) | 0.0515 | 0.00430 |
Table A5. Bounded random walks used to model uncertainty in plant parameters and applied actuator values.
Table A5: Bounded random walks used to model uncertainty in plant parameters and applied actuator values. Bounds and standard deviations of the Gaussian increments are given as fractions of the nominal parameter values or the actuator commands, except for elongation, for which both are absolute. All walks use the update interval in table A2. Uncertainty in the heat diffusivities applies only to the training plant. The other entries also apply in the CGM and QLKNN evaluations. The symbol denotes the imposed deviation here and the Miller boundary coefficient in equation (4).
Fixed-target cases outside the joint tolerance
For each target outside the joint tolerance in § 4.1, Table B1 pairs the signed output errors with the final actuator commands. The upper bounds on the final commands were 16 MA for plasma current, 100 MW for neutral-beam power and 2.00 for elongation.
| (MJ) | (%) | (%) | (MA) | (MW) | ||
| 158.61 | 5.390 | +12.71 | -1.66 | 10.15 | 100.0 | 2.000 |
| 165.25 | 5.334 | +12.42 | -1.07 | 10.22 | 100.0 | 2.000 |
| 168.97 | 5.274 | +11.15 | -0.66 | 10.47 | 100.0 | 2.000 |
| 260.50 | 2.942 | -1.01 | +6.00 | 15.83 | 21.1 | 1.768 |
| 285.80 | 3.127 | -0.94 | +5.87 | 16.00 | 34.4 | 1.791 |
| 301.68 | 2.776 | -0.38 | +5.01 | 16.00 | 56.9 | 1.746 |
| 316.74 | 2.425 | +2.86 | -5.39 | 16.00 | 100.0 | 1.665 |
| 325.03 | 2.474 | +2.90 | -8.06 | 16.00 | 100.0 | 1.697 |
| 363.78 | 2.603 | +2.06 | -7.78 | 16.00 | 100.0 | 1.789 |
| 384.29 | 3.340 | +12.16 | -8.60 | 16.00 | 100.0 | 2.000 |
| 398.06 | 3.304 | +1.96 | -6.09 | 16.00 | 100.0 | 2.000 |
| 401.56 | 3.098 | +2.50 | -15.21 | 16.00 | 100.0 | 1.959 |
| 402.69 | 3.609 | +14.28 | -4.27 | 16.00 | 100.0 | 2.000 |
| 406.20 | 3.159 | +0.97 | -11.20 | 16.00 | 100.0 | 1.982 |
| 414.43 | 3.411 | +6.66 | -8.81 | 16.00 | 100.0 | 2.000 |
Table B1. Fixed-target cases outside the joint terminal tolerance on the training plant. All 15 cases are listed with their targets, signed relative terminal errors and final actuator setpoints. Errors follow equation (8) and use outputs averaged over the final 10 s; a positive error indicates an output below its target. Actuator setpoints are taken from the final control step. Bold errors exceed 5 % in magnitude; classification uses unrounded values.
Table B1: Fixed-target cases outside the joint terminal tolerance on the training plant. All 15 cases are listed with their targets, signed relative terminal errors and final actuator setpoints. Errors follow equation (8) and use outputs averaged over the final 10 s; a positive error indicates an output below its target. Actuator setpoints are taken from the final control step. Bold errors exceed 5 % in magnitude; classification uses unrounded values.
References
- [1]Humphreys D, Ambrosino G, de Vries P, Felici F, Kim S H, Jackson G, Kallenbach A, Kolemen E, Lister J, Moreau D, Pironti A, Raupp G, Sauter O, Schuster E, Snipes J, Treutterer W, Walker M, Welander A, Winter A and Zabeo L 2015 Physics of Plasmas 22 021806
- [2]Snipes J A, Bremond S, Campbell D J, Casper T, Douai D, Gribov Y, Humphreys D, Lister J, Loarte A, Pitts R, Sugihara M, Winter A and Zabeo L 2014 Fusion Engineering and Design 89 507–511
- [3]Walker M L, De Vries P, Felici F and Schuster E 2020 Introduction to tokamak plasma control 2020 American Control Conference (ACC) pp 2901–2918DOI
- [4]Humphreys D A, Walker M L, Leuer J A and Ferron J R 2000 Initial implementation of a multi-variable plasma shape and position controller on the DIII-D tokamak Proceedings of the 2000 IEEE International Conference on Control Applications pp 412–418
- [5]Piovesan P, Hanson J M, Martin P, Navratil G A, Turco F, Bialek J, Ferraro N M, La Haye R J, Lanctot M J, Okabayashi M, Paz-Soldan C, Strait E J, Turnbull A D, Zanca P, Baruzzo M, Bolzonella T, Hyatt A W, Jackson G L, Marrelli L, Piron L and Shiraki D 2014 Physical Review Letters 113 045003
- [6]ITER Physics Expert Groups on Confinement and Transport and Confinement Modelling and Database and ITER Physics Basis Editors 1999 Nuclear Fusion 39 2175–2249
- [7]Kim S H and Lister J B 2012 Nuclear Fusion 52 074002
- [8]Scoville J T, Humphreys D A, Ferron J R and Gohil P 2007 Fusion Engineering and Design 82 1045–1050
- [9]Eldon D, Kolemen E, Barton J L, Briesemeister A R, Humphreys D A, Leonard A W, Maingi R, Makowski M A, McLean A G, Moser A L and Stangeby P C 2017 Nuclear Fusion 57 066039
- [10]Lennholm M, Campbell D, Milani F, Puppin S, Sartori F and Tubbing B 1997 Plasma vertical stabilisation at JET using adaptive gain adjustment 17th IEEE/NPSS Symposium on Fusion Engineering vol 1 pp 539–542
- [11]Ambrosino G, Ariola M, Pironti A and Sartori F 2008 IEEE Transactions on Control Systems Technology 16 1101–1111
- [12]Ariola M and Pironti A 2005 IEEE Control Systems Magazine 25 65–75
- [13]Moreau D, Walker M L, Ferron J R, Liu F, Schuster E, Barton J E, Boyer M D, Burrell K H, Flanagan S M, Gohil P, Groebner R J, Holcomb C T, Humphreys D A, Hyatt A W, Johnson R D, La Haye R J, Lohr J, Luce T C, Park J M, Penaflor B G, Shi W, Turco F, Wehner W and ITPA-IOS group members and experts 2013 Nuclear Fusion 53 063020
- [14]Maljaars E and Felici F 2017 Fusion Engineering and Design 122 94–112
- [15]Sutton R S, Barto A G and Williams R J 1992 IEEE Control Systems Magazine 12 19–22
- [16]Kaelbling L P, Littman M L and Moore A W 1996 Journal of Artificial Intelligence Research 4 237–285 (Preprint cs/9605103)
- [17]Degrave J, Felici F, Buchli J et al. 2022 Nature 602 414–419
- [18]Seo J, Kim S K, Jalalvand A, Conlin R, Rothstein A, Abbate J, Erickson K, Wai J, Shousha R and Kolemen E 2024 Nature 626 746–751
- [19]Wakatsuki T, Yoshida M, Narita E, Suzuki T and Hayashi N 2023 Nuclear Fusion 63 076017
- [20]Citrin J, Goodfellow I, Raju A, Chen J, Degrave J, Donner C, Felici F, Hamel P, Huber A, Nikulin D, Pfau D, Tracey B, Riedmiller M and Kohli P 2024 TORAX: A fast and differentiable tokamak transport simulator in JAX (Preprint 2406.06718)
- [21]Onjun T, Bateman G, Kritz A H and Hammett G 2002 Physics of Plasmas 9 5018–5030
- [22]Hansen C, Stewart I G, Burgess D, Pharr M, Guizzo S, Logak F, Nelson A O and Paz-Soldan C 2024 Computer Physics Communications 298 109111
- [23]Mouchamps A, Malherbe A, Bolland A and Ernst D 2026 Software Impacts 27 100829 (Preprint 2510.11283)
- [24]Towers M, Kwiatkowski A, Balis J, De Cola G, Deleu T, Goulão M, Andreas K, Kimmel M, KG A, Perez-Vicente R, Terry J, Pierret A, Schulhoff S, Tai J J, Tan H and Younis O G 2025 Gymnasium: A standard interface for reinforcement learning environments Advances in Neural Information Processing Systems vol 38 pp 163114–163129
- [25]Erba M, Aniel T, Basiuk V, Becoulet A and Litaudon X 1998 Nuclear Fusion 38 1013–1028
- [26]Guo S C and Romanelli F 1993 Physics of Fluids B: Plasma Physics 5 520–533
- [27]van de Plassche K L, Citrin J, Bourdelle C, Camenen Y, Casson F J, Dagnelie V I, Felici F, Ho A, Van Mulders S and JET Contributors 2020 Physics of Plasmas 27 022310
- [28]Citrin J, Bourdelle C, Casson F J, Angioni C, Bonanomi N, Camenen Y, Garbet X, Garzotti L, Görler T, Gürcan O, Koechl F, Imbeaux F, Linder O, van de Plassche K, Strand P, Szepesi G and JET Contributors 2017 Plasma Physics and Controlled Fusion 59 124005
- [29]Greenwald M, Terry J L, Wolfe S M, Ejima S, Bell M G, Kaye S M and Neilson G H 1988 Nuclear Fusion 28 2199–2207
- [30]Greenwald M 2002 Plasma Physics and Controlled Fusion 44 R27–R53
- [31]Miller R L, Chu M S, Greene J M, Lin-Liu Y R and Waltz R E 1998 Physics of Plasmas 5 973–978
- [32]Schulman J, Wolski F, Dhariwal P, Radford A and Klimov O 2017 Proximal policy optimization algorithms (Preprint 1707.06347)arxiv.org/abs/1707.06347
- [33]Raffin A, Hill A, Gleave A, Kanervisto A, Ernestus M and Dormann N 2021 Journal of Machine Learning Research 22 1–8 URL https://jmlr.org/papers/v22/20-1364.html
- [34]Maingi R, Boyle D, Canik J, Kaye S, Skinner C, Allain J, Bell M, Bell R, Gerhardt S, Gray T, Jaworski M, Kaita R, Kugel H, LeBlanc B, Manickam J, Mansfield D, Menard J, Osborne T, Raman R, Roquemore A, Sabbagh S, Snyder P and Soukhanovskii V 2012 Nuclear Fusion 52 083001
- [35]Bernert M, Wischmeier M, Huber A, Reimold F, Lipschultz B, Lowry C, Brezinsek S, Dux R, Eich T, Kallenbach A, Lebschy A, Maggi C, McDermott R, Pütterich T, Wesen S, JET Contributors, EUROfusion MST1 Team and ASDEX Upgrade Team 2017 Nuclear Materials and Energy 12 111–118
- [36]Wang J F, Li Y Y, Wu B, Chen Y Q, Li J, Xu Y J, Chen L X, Hao B L, Zhou D, Huang J, Ding S Y, Yang Z, Hou Y W, Liu X J and Xiang N 2021 Chinese Physics Letters 38 055203
- [37]Pereverzev G V and Corrigan G 2008 Computer Physics Communications 179 579–585
- [38]Paszke A, Gross S, Massa F, Lerer A, Bradbury J, Chanan G, Killeen T, G今回imelshein N, Antiga L, Desmaison A, Kопf A, Yang E, DeVito Z, Rais A, Tejani A, Chilamkurthy S, Steiner B, Fang L, Bai J and Chintala S 2019 PyTorch: An imperative style, high-performance deep learning library Advances in Neural Information Processing Systems vol 32 (Preprint 1912.01703)arxiv.org/abs/1912.01703
Machine contribution statement
This work lists 1 machine contributor.
Codex · AI contributor
- Roles
- Writing — original draftWriting — review & editing
- Verification
- self-declared at submission
Recorded on the work at submission, not per version. Names and roles are shown as submitted; roles use the CRediT taxonomy.




