A focused human operator needs about a second to react to anything. PACMAN, a control framework built at the U.S. Department of Energy’s Princeton Plasma Physics Laboratory and Princeton University, finishes a full pass in roughly 20 milliseconds, then starts over and does it again for the length of the shot.
That gap is the entire reason the software exists. In some fusion systems, particles hotter than the core of the sun can go unstable in a few thousandths of a second, which is not a timescale anyone is going to hand-fly.
The researchers ran PACMAN on a real machine, the DOE’s DIII-D National Fusion Facility tokamak in San Diego, across five separate experiments. The design and first results are in a new paper in the journal Nuclear Fusion. The name stands for Prediction And Control using MAchiNe learning, which is the kind of backronym that tells you physicists wanted the joke first.
The instability it sees coming 200 milliseconds early
The most useful result in the set involves tearing modes. Conventional controllers can’t identify that instability until it has already started, which means they’re always cleaning up rather than preventing.
“Then they try to suppress it, and that can come with a lot of performance degradation,” said co-lead author Hiro Farre Kaga, a graduate student in the Princeton Program in Plasma Physics, a joint program of Princeton University and PPPL. “In one of the experiments we present, a machine learning model predicts the tearing mode about 200 milliseconds in advance, so the plasma can be changed to avoid it in the first place.”
Two hundred milliseconds is still a blink. But it’s the difference between changing the plasma and rescuing it.
Six gyrotrons, moving at once
The other standout test had PACMAN coordinating all six of DIII-D’s gyrotrons, the systems that heat the plasma with microwave beams. Hitting the complex targets the researchers had picked beforehand meant adjusting the gyrotrons’ power and repositioning their mirrors in real time, together.
“There was no algorithm to find that optimal solution before,” Farre Kaga said. “When the shot ended and we looked at the data, it was doing exactly what we hoped, simultaneously moving all six in an optimal way to reach the goal.”
Four stations on an assembly line
The structure is less exotic than the physics. PACMAN pulls live measurements off the tokamak, including temperature, density and magnetic signals, checks those readings for errors and packs them into one bundle.
AI models then take the measurements they need and estimate what the plasma is doing now or what it’s about to do. Controllers convert those predictions into actions, like turning up a heating beam.
At the last station the framework settles conflicts between controllers, applies hard hardware safety limits and sends the approved commands back to the machine. Because models and controllers run independently, a new component can be dropped in without disturbing the rest.
The result nobody was expecting was a schedule
Machine learning has already shown it can control fusion plasmas. What it hasn’t had is a shared place to live, and most previous efforts were built one at a time with no common structure letting different models work together.
“We developed this framework so that models could communicate, outputs from those models could be shared and we could do exciting physics in one integrated system,” said Andy Rothstein, a graduate student in Princeton University’s Department of Mechanical and Aerospace Engineering and co-lead author of the paper.
Rothstein said the surprise was how much cheaper the second model was than the first. Building the framework and installing model one took months of work.
“Then we went to put in the second model, and it took a couple of days. The testing was easier, and there were far fewer bugs,” he said. “DIII-D is first and foremost a research machine, and sometimes things don’t work out the way you expected. If you can put a model on in a week, you can retrain it and put a new one on the week after. It allows for iteration that wasn’t possible previously.”
Why simulations couldn’t do this job
Fusion could supply a virtually unlimited amount of electricity, and tokamaks are one of several routes people are trying on Earth. They use powerful magnetic fields to confine a plasma, the electrically charged gas often called the fourth state of matter, and keeping fusion going means keeping that plasma hot, dense and stable through constant fiddling with heating equipment, magnets and gas injectors.
Advanced simulations can predict plasma behavior well. They also take days or months to finish, and an entire experiment may last a few minutes.
“That’s great for preparing for the next experiment in a year, but for control we need models that make a decision in the moment,” Farre Kaga said. “Machine learning models can describe the plasma behavior very well, and importantly, they are the only way we have to model the plasma in millisecond times. The speed of these models is what’s key for control.”
What this isn’t
Five experiments on one research tokamak is a demonstration, not deployment, and the team is careful about the claim. The framework’s modular design could carry over to tokamaks with different shapes, sizes and instruments, including machines that haven’t been designed yet, but that’s a belief about the future, not a measured result.
“PACMAN uses a flexible setup where building-block AI algorithms can be put together. You can add a new one, swap one out or run several at once without touching the rest of the system,” said Egemen Kolemen, associate professor of mechanical and aerospace engineering at Princeton University, jointly appointed with the Andlinger Center for Energy and the Environment and PPPL. “That modularity is what turns AI plasma control from a series of one-off demonstrations into infrastructure the whole fusion community can build on.”
Other authors include Ricardo Shousha, Keith Erickson and SangKyeun Kim from PPPL, Jalal-ud-din Butt, Peter Steiner and Azarakhsh Jalalvand from Princeton University, and Takuma Wakatsuki from Japan’s National Institutes for Quantum Science and Technology. The work was supported by the DOE Office of Science using DIII-D under awards DE-FC02-04ER54698, DE-SC0015480 and DE-AC02-09CH11466, and by the National Science Foundation Graduate Research Fellowship under grant DGE-2039656.
The safety limits sit downstream of every model in the stack and apply no matter what an AI recommends, and physicists still comb through the data after each shot to retune the controllers before the next one.
“No matter how sophisticated your controllers, in the end it’s a human operator that sets the parameters for that control,” Farre Kaga said.