Skip to content
  • Verilog · C
  • Nuclear fusion

Formally verifying a nuclear fusion reactor’s laser diagnostics and plasma control

Try Aristotle

Engineers and physicists at the DIII-D National Fusion Facility are verifying safety-critical hardware and software controllers with Aristotle, Harmonic’s AI agent for formal verification. In this case study, we’ll cover three projects that span hardware qualification and software optimization as part of DIII-D’s mission to unlock fusion.

  • On a new laser diagnostic board, Aristotle found and fixed six edge-case bugs before the board was installed.
  • In an existing predictive plasma controller, it found and reproduced 12 bugs and made the forecast 3 times faster.
  • In four hours, it implemented and verified a published plasma control algorithm in C and wrote a Verilog version for an FPGA, later proved equivalent to a fixed-point C model.

About DIII-D

DIII-D

The DIII-D National Fusion Facility, a US Department of Energy Office of Science User Facility, serves as an essential testbed to design, test, and optimize the fusion science and technology solutions needed to achieve commercial fusion energy.

At a glance

  • 6

    Edge-case bugs fixed in a diagnostic board’s logic

  • 3×

    Faster plasma control forecast, same results in testing

  • 4 hours

    From a research paper to C, its proofs, and Verilog

Project 1 · Verification

A laser diagnostic board, fixed before installation

“This is exactly the kind of thing I was hoping it would test for: edge cases and unlikely bugs that would be hard to troubleshoot.”

Matt Watkins

Electrical Engineer, DIII-D National Fusion Facility

DIII-D’s Thomson scattering diagnostic measures the plasma’s electron temperature and density by firing up to 16 lasers through it. Two FPGA designs keep the lasers and the data acquisition in step, and their timing has to be exact. Simulation struggles to cover every signal timescale and input combination. Mitchell Clark, Lead ML Research Engineer at DIII-D, realized that Aristotle could verify a hardware replacement being developed by Matt Watkins, an FPGA engineer in the diagnostics group.

They started with the laser timing card, which has been in service for about two years. Aristotle proved most of the properties it stated, for every input sequence the environment allows, however long the board runs. The rest came back refuted, each with a counterexample.

Matt then gave Aristotle the SystemVerilog and his written description of the new Laser ID board, which tags each data sample with the laser that fired. Aristotle wrote properties from the description and refuted more than half of them. Every refutation came with a counterexample that also runs in simulation.

The next day, Matt went through the refutations one by one and answered Aristotle’s questions about each. Apart from a few places where his description was out of date, they came down to six bugs and one timing limit he accepted. Aristotle fixed the bugs in his RTL and proved every property on the fixed design, except the two that describe that limit.

All six were edge cases. If two lasers fired close together, the board could report the wrong one. And the board triggered two fewer background samples than intended before each shot.

  • 23

    Properties proved on the laser timing card

  • 6

    Edge-case bugs fixed on the new board

  • 28

    Properties proved on its fixed design

  • Under a day

    From the written description to the fixed RTL

The board was deployed on DIII-D the following week. The DIII-D team describes it as the first formally verified control logic deployed on a fusion reactor.

Project 2 · Repair and Verilog port

A plasma controller, fixed, optimized, and ported to verified Verilog

“It’s the first AI I’ve wanted to use.”

David Eldon

Scientist, DIII-D National Fusion Facility

David Eldon, a plasma control physicist at DIII-D, gave Aristotle the C code for a predictive density controller. DIII-D’s gas valves change the plasma’s density with a delay, so the controller forecasts the density that far ahead and acts on the forecast. The original algorithm was developed on a rapid timescale as an advanced prototype. David asked Aristotle to find the bugs and optimize the code.

Aristotle found 12 bugs. The most serious was a timing error in the ring buffer. It filled the forecast window with copies of the latest sample, wiping out the history the forecast depends on. Aristotle fixed the bugs on the controller’s path and made the forecast kernel 3 times faster, with identical results in testing. It proved the optimized routines memory safe.

From the controller’s design paper, Aristotle also wrote a new predictor in C. It proved that each control cycle follows the paper’s equations step by step and that the whole implementation is memory safe.

Ultimately, David wanted the forecast to run on an FPGA. Ring buffers raise safety concerns in real-time systems, so he asked for shift registers instead. Aristotle wrote the Verilog core and a fixed-point C model of it, then proved the two equivalent.

  • 12

    Bugs found and reproduced on the original code

  • 3×

    Faster forecast kernel, same results in testing

  • Proved

    A memory-safe predictor written from the design paper

Project 3 · From paper to hardware

A published plasma control algorithm, implemented and verified in C and Verilog

“What Aristotle really lets us do is condense our time to science.”

Mitchell Clark

Lead ML Research Engineer, DIII-D National Fusion Facility

Mitchell and David chose a 2022 paper on detachment control, which protects the divertor, the part of a tokamak’s wall that takes the plasma’s exhaust heat. A detachment controller regulates the attachment fraction: the ion flux measured at the divertor, as a fraction of what it would be if the plasma were fully attached. David wrote the paper with colleagues for the KSTAR tokamak. The same calculation runs in DIII-D’s plasma control system.

They gave Aristotle the paper and asked for C code that computes the attachment fraction on every cycle of a real-time control system. In four hours, Aristotle implemented the paper’s equations and proved the code free of undefined behavior for any measurement or setting, NaN and infinity included. Aristotle also generated reasonable test waveforms for a key input (ion saturation current) which were only shown in the paper’s figures.

They then asked for Verilog. Aristotle wrote a synthesizable fixed-point version that finishes every control cycle in a constant 435 clock cycles, under 5 µs at 100 MHz. In a follow-up run, Aristotle wrote a fixed-point C model and proved the Verilog equivalent to it.

  • 1

    Research paper as the only input

  • 4.35 µs

    Latency of every control cycle at 100 MHz, proved constant

  • Proved

    Verilog equivalent to a fixed-point C model

D. Eldon et al., “Enhancement of detachment control with simplified real-time modelling on the KSTAR tokamak”, Plasma Phys. Control. Fusion 64, 075002 (2022).

Mitchell Clark presented this work at the IAEA’s AI for Fusion workshop on Nov 9, 2026.

Accelerate your hardware

  1. 01

    Give Aristotle your mission-critical C code and the behavior it should satisfy.

  2. 02

    Aristotle will find bugs, repair them, and prove the repaired code.

  3. 03

    Aristotle will then write Verilog for hardware acceleration and prove it equivalent to a fixed-point C model.