Abstract
We describe a method for precisely regulating the gradient magnet power supply (GMPS) at the Fermilab Booster accelerator complex using a neural network trained via reinforcement learning. We demonstrate preliminary results by training a surrogate machine-learning model on real accelerator data to emulate the GMPS, and using this surrogate model in turn to train the neural network for its regulation task. We additionally show how the neural networks to be deployed for control purposes may be compiled to execute on field-programmable gate arrays (FPGAs), and show the first machine-learning based control algorithm implemented on an FPGA for controls at the Fermilab accelerator complex. As there are no surprise latencies on an FPGA, this capability is important for operational stability in complicated environments such as an accelerator facility.
Introduction
Particle accelerators are among the most complex engineering feats on Earth, requiring extreme precision to maintain beam stability. Traditionally, these systems are managed via hand-tuning by experts and standard Proportional-Integral-Derivative (PID) controllers. However, accelerator physics is highly non-linear and operates on timescales (microseconds to milliseconds) far faster than human intervention allows.
At the Fermilab Booster, the Gradient Magnet Power Supply (GMPS) must be precisely regulated to ensure the magnetic field matches the beam's energy during its 15 Hz cycle. Even marginal improvements in this regulation translate directly into higher scientific yields and lower operational costs. The challenge lies in training a complex AI to control a multi-million dollar machine without risking hardware damage during the "trial and error" phase of learning.
System Architecture and Methodology
To address these challenges, researchers developed a real-time AI control system deployed on Field-Programmable Gate Arrays (FPGAs). The architecture integrates the Accelerator Control Network with the GMPS control rack, utilizing programmable logic to process control signals and measurements.
The methodology follows a three-stage strategy to bridge the gap between AI theory and accelerator operations:
- Surrogate Modeling (The Digital Twin): A Long Short-Term Memory (LSTM) neural network was trained on historical accelerator data to emulate the GMPS response. This "safe" environment allows the RL agent to practice millions of control scenarios without physical risk.
- Reinforcement Learning (The Agent): A Deep Q-Network (DQN) acts as the controller, choosing discrete voltage adjustments to minimize regulation error based on the current state of the accelerator.
- FPGA Implementation: Using the
hls4mllibrary, the neural network is compiled into firmware for an Intel Arria 10 FPGA, ensuring deterministic, microsecond-scale latency with massive parallelism.
Data and Surrogate Validation
The study utilizes the BOOSTR dataset, containing cycle-by-cycle time-series data from 54 devices at the Fermilab Booster. The surrogate model was trained on 175,000 time steps to accurately reflect real-world physics, including inductive interference from adjacent subsystems like the Main Injector.
Results and Discussion
The DQN agent demonstrated a twofold improvement in regulation precision compared to existing PID controllers in both training and testing environments. Key performance metrics include:
- Deterministic Latency: The FPGA implementation achieved inference latencies between 2.8 µs and 39.3 µs, well within the 66.7 ms (15 Hz) budget required by the Booster.
- Robustness: The AI successfully compensated for complex environmental disruptions, such as resonant extraction events from the Main Injector.
- Resource Efficiency: The DQN model consumes less than 6% of FPGA resources, suggesting potential for parallel ensemble deployments to further enhance robustness.
Conclusion
This work demonstrates the viability of FPGA-based AI for high-precision accelerator control. While currently validated against a high-fidelity surrogate, future work will focus on live beam control, continuous control algorithms (e.g., DDPG), and online learning to adapt to aging hardware and environmental shifts.
Summary updated