Table of Contents
Fetching ...

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, X. Gu, Y. P. Zhang, J. Li, Y. Liu, X. C. Lun, L. Xing, J. G. Chen, Z. Y. Chen, Y. Yu, D. Guo, Z. Y. Yang, H. S. Xie, X. M. Song, Y. J. Shi, EXL-50U Team

TL;DR

This work tackles the challenge of real-time plasmas equilibrium reconstruction by introducing PTEFIT, a physics-based, GPU-accelerated pipeline built on PyTorch and TensorRT to deliver EFIT-like reconstructions at real-time speeds. By modularizing the workflow into Green's function generation, LS solutions, Grad-Shafranov solving, flux-surface processing, and optimization, PTEFIT achieves an average per-slice time of $0.268$ ms at a $129\times129$ grid and maintains consistency with offline EFIT within ~1 cm for LCFS metrics. Real-time control demonstrations show PTEFIT enabling PID regulation of the maximum plasma radius $R_{\max}$ and isoflux feedback, highlighting practical impact for tokamak experiments. The results suggest a scalable framework that leverages mutual ML frameworks for numerical optimization and can generalize to other real-time numerical algorithms in fusion and beyond.

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\times 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.

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

TL;DR

This work tackles the challenge of real-time plasmas equilibrium reconstruction by introducing PTEFIT, a physics-based, GPU-accelerated pipeline built on PyTorch and TensorRT to deliver EFIT-like reconstructions at real-time speeds. By modularizing the workflow into Green's function generation, LS solutions, Grad-Shafranov solving, flux-surface processing, and optimization, PTEFIT achieves an average per-slice time of ms at a grid and maintains consistency with offline EFIT within ~1 cm for LCFS metrics. Real-time control demonstrations show PTEFIT enabling PID regulation of the maximum plasma radius and isoflux feedback, highlighting practical impact for tokamak experiments. The results suggest a scalable framework that leverages mutual ML frameworks for numerical optimization and can generalize to other real-time numerical algorithms in fusion and beyond.

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 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.
Paper Structure (14 sections, 12 equations, 5 figures)

This paper contains 14 sections, 12 equations, 5 figures.

Figures (5)

  • 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 reconstructed boundary must be arranged continuously in clockwise or counterclockwise order.
  • 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 3: Distribution of PTEFIT computation time per time slice.
  • Figure 4: Demonstration of PID feedback control effects using the maximum radial position $R_{\max}$ of plasmas provided in real-time by PTEFIT for two shots. (a) Plasmas current waveform. (b) Preset $R_{\max}$ and $R_{\max}$ obtained from PTEFIT real-time reconstruction. (c) ICRF intensity waveform.
  • Figure 5: Schematic diagram of isoflux control for shot #14488. (a) Flux surface distribution at 600 ms. (b) Plasmas current waveform. (c) Temporal evolution of flux at each reference point. (d) Temporal evolution of distance between each reference point and the LCFS. The background is light blue during the isoflux control period.