170 likes | 312 Views
GPU Architectures for Real-Time Plasma Identification in Tokamak Devices. Thesis advisor Prof. R. Martone. Candidate Francesco Ledda A18/65. Thesis co-advisors Prof. A. Formisano Prof. A. G. Chiariello. DIII - SUN, Italy - 16/05/2013. Table of contents. CUDA for real-time problems
E N D
GPU Architectures for Real-Time Plasma Identification in Tokamak Devices Thesis advisor Prof. R. Martone Candidate Francesco Ledda A18/65 Thesis co-advisors Prof. A. Formisano Prof. A. G. Chiariello DIII - SUN, Italy - 16/05/2013
Table of contents • CUDA for real-time problems • Plasma identification • Formulation and mathematical model • Algorithm analysis for CUDA implementation • Results • Conclusions GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 1
CUDA for real-time problems • CUDA is used to speed-up simulations in different fields • In this work CUDA has been used to achieve the “real-time” requirement (order of centimes of second) in the context of the plasma stability control Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 2
Controlled thermonuclear fusion • The nuclear fusion reactions occur in a plasma • The most promising device for the plasma confinement is the tokamak • The confinement is achieved by combining several magnetic fields: • A toroidal field generated by externals coils • A poloidal field generated by both plasma current and external coils Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 3
MHD 2D equilibrium • The mathematical model to describe the plasma is the set of MHD equations, a combination of Maxwell’s and Navier-Stokes equations Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification • The equilibrium is achieved when the plasma forces (e.g. magnetics, pressure) are balanced • The 2D equilibrium is described by the Grad-Shafranov equation GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 4
Problem description • The first step for plasma control is its identification • The plasma boundary is the outermost closed magnetic surface entirely contained in the vacuum vessel Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification • The magnetic surfaces coincide with the constant level curves of the poloidal flux function • Two possible configurations: limiter and x-point GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 5
Equivalent currents method • Grad-Shafranov equation is not suitable for real-time identification • It is possible to describe the plasma current as a set of equivalent filamentary currents • Critical elements: currents positioning and currents intensities evaluation Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 6
Mathematical Model (1) Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 7
Mathematical Model (2) Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 8
Algorithm flow-chart • It takes most part of total computation • Each element can be evaluated independently • Can be evaluated off-line Green’s matrixes evaluation Algorithm analysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification Equivalent currents positioning Equivalent currents evaluation Plasma equilibrium treatment and classification Flux map evaluation Verify stop conditions • Number of currents • Currents position • Maximum number of iterations GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 9
Algorithm parameters Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 10
X-point equilibrium results (1) • The error is in the order of the centimeter • The CUDA implementation respects the real-time requirement Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification • Most part of the on-line computation is due to the pseudo-inversion GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 11
X-Point equilibrium results (2) Grid and gaps resolution Increasing resolution Improves till high resolution Off-line time increases On-line time increases Both speed-ups increase Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification Number of currents Increasing number of currents Improves Off-line time increases On-line time increases Both speed-up increase Currents base Grid provides better results than circle and ellipse On-line time decreases with ellipse and circle Speed-up similar Currents selection Worsens with currents are close to the boundary. Outer currents more important Not affected Number of singular values There is an optimal range Not affected Number of probes Decreasing number of probes Worsens Off-line time decreases On-line time decreases On-line speed-up decreases % Noise Increasing amount of noise Worsens Further worsening when the number of probes is decreased Not affected Probes weight Best results with uniform weights Not affected GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 12
Limiter equilibrium results Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification • The accuracy is lower • The execution times and speed ups remain on the same value • Same consideration for parameter variations GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 13
Complete plasma scenario Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Results Conclusions Plasma identification GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 14
Conclusions • The feasibility of an effective usage of the CUDA architecture for real-time problems has been proved • The problem should be formulated to fulfill the real-time requirement • A step-by-step analysis of the implementing algorithm is essential, especially to divide on-line and off-line operations Algorithmanalysis for CUDA implementation CUDA for real-time problems Formulation and Mathematical model Conclusions Results Plasma identification GPU Architectures for Real-Time Plasma Identification in Tokamak Devices - Francesco Ledda DIII-SUN, Italy – 16/05/2013 15