Skip to main content
QUICK REVIEW

[Paper Review] A Novel Numerical Algorithms Optimization Method with Machine Learning Frameworks: Application on Real-time Plasmas Equilibrium Reconstruction in EXL-50U Spherical Torus

G. H. Zheng, S. F. Liu|arXiv (Cornell University)|Jan 18, 2026
Magnetic confinement fusion researchPhysics and Astronomy0 citations
TL;DR

The paper introduces PTEFIT, a PyTorch/TensorRT-based GPU-accelerated real-time Grad–Shafranov equilibrium reconstruction algorithm for tokamaks, achieving sub-millisecond per-slice performance and real-time feedback integration on the EXL-50U spherical torus.

ABSTRACT

This work proposes for the first time a novel optimization method for numerical algorithms, which takes advantages of machine learning frameworks PyTorch and TensorRT, leveraging their modularity, low development threshold, and automatic tuning characteristics to achieve a real-time plasmas reconstruction algorithm called PTEFIT as an application in tokamak-based controlled fusion that combines performance, flexibility, and usability. The algorithm has been deployed and routinely operated on the EXL-50U spherical tokamak, with an average inference time of only 0.268ms per time slice at $129 imes 129$ resolution, and has successfully driven feedback control of the maximum radial position of plasmas and isoflux control. We believe that its design philosophy has sufficient potential to accelerate development and optimization in GPU parallel computing, and is expected to be extended to other numerical algorithms.

Motivation & Objective

  • Motivate real-time, high-accuracy tokamak equilibrium reconstruction without sacrificing generality across configurations.
  • Leverage machine learning frameworks to optimize numerical algorithms while retaining physics-based foundations.
  • Provide a modular, GPU-accelerated reconstruction pipeline compatible with EFIT principles.

Proposed method

  • Construct PTEFIT in PyTorch with 21 modular computational units to handle Green’s function generation, current density parameterization, and Grad–Shafranov (G-S) solving.
  • Use Green’s function matrices to relate toroidal current to poloidal field and flux, computed via GPU-accelerated matrix operations.
  • Parameterize J_phi with polynomials of normalized flux and solve a least-squares system using either normal equations or QR decomposition (Gram-Schmidt) without SVD.
  • Transform the G-S equation into a set of parallel tridiagonal problems that are pre-computed for fast GPU solution.
  • Process flux surfaces with a second-order polynomial fit to locate O-points and X-points, enabling precise axis/boundary identification for flux normalization.
  • Compute flux-surface-averaged quantities such as safety factor via efficient GPU-amenable integrals and a bisection-based flux surface vertex search.
  • Optimize to run as CUDA graphs with TensorRT, pre-computing data, and minimizing CPU-GPU data transfers for real-time performance.
Figure 1 : Schematic diagram of the bisection method for finding flux surface vertices. The flux outside the plasmas region need to be filtered first. For each thread, the initial endpoints are located at the magnetic axis and the reconstructed boundary, respectively, and the points on the reconstru
Figure 1 : Schematic diagram of the bisection method for finding flux surface vertices. The flux outside the plasmas region need to be filtered first. For each thread, the initial endpoints are located at the magnetic axis and the reconstructed boundary, respectively, and the points on the reconstru

Experimental results

Research questions

  • RQ1Can a physics-based equilibrium reconstruction be realized entirely within a machine-learning framework to achieve real-time performance without sacrificing EFIT-consistency?
  • RQ2How does a PyTorch/TensorRT-based approach compare to offline EFIT and traditional GPU-accelerated reconstruction in speed and accuracy across various flux surface configurations?
  • RQ3What is the achievable real-time control performance (e.g., R_max and isoflux) when using PTEFIT for feedback control in a tokamak?
  • RQ4Can the method adapt to different tokamak configurations and diagnostics while preserving physical interpretability?
  • RQ5What are the computational trade-offs (normal equations vs QR) for solving the least-squares step in this context?

Key findings

  • PTEFIT achieves an average inference time of 0.268 ms per time slice at 129×129 resolution.
  • PTEFIT is approximately 10,000× faster than offline EFIT and about 2–10× faster than traditional GPU-accelerated reconstruction.
  • PTEFIT demonstrates high consistency with offline EFIT in LCFS reconstruction with deviations around 1 cm in XPT configurations.
  • PTEFIT enables real-time PID feedback control of the maximum plasma radius R_max during ICRF heating experiments.
  • PTEFIT enables isoflux control as a MIMO feedback approach with flux differences maintained near reference points, though VDEs limit one X-point visibility.
  • PTEFIT’s design preserves consistency with EFIT principles while offering lower development effort and broader configurability.
Figure 2 : Comparison of LCFS results obtained by PTEFIT and offline EFIT for XPT configuration reconstruction of shot #13899. Here, $\Delta r_{\min}$ and $\Delta r_{\max}$ are the deviations between the two at the minimum and maximum radial positions of the LCFS, respectively.
Figure 2 : Comparison of LCFS results obtained by PTEFIT and offline EFIT for XPT configuration reconstruction of shot #13899. Here, $\Delta r_{\min}$ and $\Delta r_{\max}$ are the deviations between the two at the minimum and maximum radial positions of the LCFS, respectively.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.