Tokamak magnetic control system optimization method based on data driving model
By using the data -based machine learning method based on the data -driven model in the Takamak Magnetic field control, using the one -dimensional mobile window self -attention mechanism to directly predict the exterior magnetic surface evolution of the Takamak device. The problem of low sex and efficiency achieves high response speed and high -fidelity real magnetic field control.
Patent Information
- Application Number
- CN202411958206.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing tokamak magnetic field control methods rely on physical simulation codes and are complex and difficult to achieve efficient and accurate magnetic field prediction, especially when processing ultra-long time series data.
Using a data-driven model-based approach, the machine learning model of the one-dimensional moving window self-attention mechanism is used, combined with EFIT simulation calculations, to directly predict the evolution of the outermost closed magnetic surface in the tokamak device and achieve high response speed to the magnetic field. and high-fidelity control.
The exterior closure magnetic surface evolution of more than 95%is achieved, and the predictiveness is predictable to meet the actual application needs. It can quickly and accurately predict the magnetic field position, and seamlessly integrate it with the plasma control system, which improves the efficiency of magnetic field control.
Smart Images

Figure CN119356106A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to tokamak magnetic control in nuclear fusion experiments, belongs to the intersection field of machine learning and nuclear fusion physics, and in particular to a tokamak magnetic control system optimization method based on a data-driven model. Background Art
[0002] Utilizing nuclear fusion energy is a very important way for humans to eventually solve the energy problem. Nuclear fusion energy is one of the energy sources that humans are currently focusing on exploring and developing. The energy volume it contains is very large, and the raw materials and products of nuclear fusion are deuterium in seawater and inert gas helium. Therefore, nuclear fusion will not have the problem of raw material shortage and environmental pollution. Once humans can realize the utilization of nuclear fusion energy through controlled nuclear fusion technology, it may completely solve the remaining energy problems.
[0003] The tokamak device is one of several research devices for different nuclear fusion energy working systems. The core of the tokamak is its D-shaped vacuum chamber. Physicists use the important property that charged particles of plasma can be trapped by large magnetic coils surrounding the vacuum chamber due to the magnetic field to confine hot plasma in the vacuum chamber. Ordinary small and medium-sized tokamak discharge experiments use deuterium and helium plasma to simulate the discharge process of deuterium-tritium plasma. The main purpose is to study how to effectively confine plasma for a long time and at high energy. As an important experimental device for realizing magnetic confinement fusion, one of the core studies of the tokamak is to accurately control the magnetic field distribution required to confine plasma. Accurate control of the magnetic field is crucial to achieving stable plasma equilibrium, but this process is complex and challenging. Traditional magnetic field reconstruction methods rely on physical simulation codes, which need to solve complex Grad-Shafranov equations and require a lot of effort from physicists to adjust and recalibrate when the magnetic field configuration changes. With the development of machine learning (ML) and artificial intelligence (AI) technologies, data-driven methods provide new possibilities for solving this problem. However, existing machine learning models face challenges such as high computational complexity and difficulty in parallelization when processing the ultra-long time series data generated by tokamaks. In addition, the time series characteristics of tokamak magnetic field control data require the model to capture and utilize time series information, which places higher requirements on the design of the model.
[0004] The existing technology does not have a technical solution for direct prediction and modeling of the outermost closed magnetic surface, and the existing literature also mostly uses magnetic field modeling codes to conduct tokamak magnetic field modeling research. Due to the nonlinearity, multi-space scales, multi-physics characteristics, multi-magnetic field actuator inputs, complex internal plasma characteristics, and long time span of the tokamak discharge experiment process, the physical driven magnetic field reconstruction mostly used in existing research is difficult to achieve the prediction of magnetic field evolution under the premise of high precision and high efficiency. Summary of the invention
[0005] In order to overcome the uncertainty caused by the reliance of traditional physical simulation methods on accurate models and assumptions, and the need for physicists to invest a lot of energy and expertise in designing adjustment plans for the changed Tokamak magnetic field structure to adapt to new conditions, the present invention provides a Tokamak magnetic control system optimization method based on a data-driven model, which includes the Tokamak experimental discharge process and the subsequent EFIT (equilibrium solution) simulation calculation, and utilizes the one-dimensional moving window self-attention mechanism to effectively extract multi-scale features from long sequences. The present invention completes the outermost closed magnetic surface response prediction and reconstruction of the outermost closed magnetic surface of the magnetic field control command with high response speed and high fidelity.
[0006] The present invention provides a data-driven model that does not rely on physical simulation codes. The data-driven model combines a prediction model and a proxy model to predict the evolution of the outermost closed magnetic surface in real time. The present invention also provides a special discretization method to achieve dimensionality reduction of the outermost closed magnetic surface and exclude control references so that the model can be seamlessly integrated into the control system. The present invention directly predicts the evolution of the outermost closed magnetic surface without physical simulation.
[0007] From the perspective of physics, the outermost closed magnetic surface is usually represented by the polar coordinate section of the flux surface, which is equivalent to a two-dimensional curve. For a neural network model, it is usually difficult to use a continuous two-dimensional curve as the input or output of the model. How to represent this curve while minimizing information loss and retaining basic features is an important issue. The present invention draws on three classical curve parameterization methods to realize the input and output of two-dimensional curves. The three classical curve parameterization methods are uniform parameterization, cumulative chord length parameterization and centripetal model parameterization.
[0008] In order to achieve the above object, the technical solution adopted by the present invention is:
[0009] A method for optimizing a tokamak magnetic control system based on a data-driven model, training a machine learning model based on a one-dimensional moving window self-attention mechanism to predict the evolution of the outermost closed magnetic surface in a tokamak device, comprising the following steps:
[0010] Step 1, obtaining original controller data of the tokamak device and original data of the measured value of the magnetic field of the actual tokamak device;
[0011] Step 2: Select multiple shot data from the tokamak experiment as training data for the machine learning model, use multiple diagnostic signals and actuator signals as input, and predict the outermost closed magnetic surface;
[0012] Step 3: construct a loss function for the machine learning prediction output and the actual measured output of the tokamak device and calculate the loss, and train the machine learning model through the error back propagation method; the trained machine learning model can realize the direct real-time prediction of the outermost closed magnetic surface;
[0013] Step 4: Couple the machine learning model with the plasma magnetic control system, and use the online machine learning model to directly and accurately predict the future magnetic field of the tokamak device.
[0014] Furthermore, the step 2 uses a polar coordinate centripetal discretization method to represent the discretization of the outermost closed magnetic surface, and retains the data features of the outermost closed magnetic surface.
[0015] Furthermore, the step 2 comprises the following steps:
[0016] Step 2.1: Express the two-dimensional curve data of the original data of the outermost closed magnetic surface as , , n represents the total number of discrete points, represents the coordinates of the i-th discrete point of the outermost closed magnetic surface represented by the discretization of n discrete points, f express and The two-dimensional curve function relationship between them;
[0017] Step 2.2: Place the two-dimensional curve of the original data of the outermost closed magnetic surface in the polar coordinate system, and set the polar angle difference between two consecutive discrete points in the two-dimensional curve in the polar coordinate system. ,in, Represents the coordinates of the 2D curve at the i-th discrete point The polar angle corresponding to the coordinate point in the polar coordinate system; Represents the coordinates of the i-1th discrete point of the two-dimensional curve The point corresponds to the polar angle of the coordinate point in the polar coordinate system;
[0018] Step 2.3: Fix the polar angle difference , discretize the two-dimensional curve of the outermost closed magnetic surface into 360 discrete points ,in, Represents the coordinates of discrete points corresponding to the two-dimensional curve Corresponding to the polar diameter in the polar coordinate system, the two-dimensional curve of the original data of the outermost closed magnetic surface is represented as a one-dimensional array ;
[0019] Step 2.4: Convert the original data of the outermost closed magnetic surface from a two-dimensional curve into a one-dimensional vector through step 2.3, and use the one-dimensional vector as the output of a data-driven machine learning model based on a one-dimensional moving window self-attention mechanism.
[0020] Furthermore, in step 2, 11190 shot data are selected from the tokamak experiment as training data for the machine learning model, and 11 diagnostic signals and 2 actuator signals are used as input to predict the outermost closed magnetic surface.
[0021] Furthermore, in step 3, the input of the machine learning model includes plasma current, normalization parameter β, and poloidal magnetic field coil voltage.
[0022] Beneficial effects:
[0023] Compared with the prior art, the model of the present invention shows a similarity of more than 95% when predicting the evolution of the outermost closed magnetic surface, meeting the needs of practical applications. The model can be used as a simulation environment in reinforcement learning applications, and also provides fast and accurate predictions for tokamak nuclear fusion magnetic field configuration experiments. The model can also be seamlessly integrated with the plasma control system (PCS), which can effectively promote real-time magnetic field control. As a physically enhanced data-driven model, it has the ability to predict future magnetic field evolution and can run without relying on any physical simulation code. It can provide important information about the outermost closed magnetic surface in subsequent time steps, thereby greatly enhancing the efficiency of magnetic field control. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 : is a diagram of the use of the present invention in real-time control; wherein a is a demonstration of the discretization of the outermost closed magnetic surface and its use as the output of the model and the model interaction diagram; b is a control instruction reference diagram in the real-time control process; c is a real-time interaction diagram between the tokamak controller and the tokamak device; a, b, and c are divided and demarcated by dotted lines;
[0025] Figure 2 (a), Figure 2 (b), Figure 2 (c), Figure 2 (d), and Figure 2 (e) are test result diagrams of the present invention with the experimental gun number #73978 on the tokamak; wherein, Figure 2 (a), Figure 2 (b), Figure 2 (c), and Figure 2 (d) represent the predicted result display diagrams of the outermost closed magnetic surface with the gun number #73978 at the time points of 0.5s, 20.0s, 40.0s, and 49.0s, respectively, and Figure 2 (e) is the display of the above four drawing time points in the plasma current image;
[0026] Figure 3 It is a 1-norm result diagram of the data-driven outermost closed magnetic surface direct prediction model of the present invention for the data of the Tokamak experimental shot number within #79342-81692 and the experimental data of the 1094 shot with a longer duration;
[0027] Figure 4This is an infinity-norm result diagram of the data-driven outermost closed magnetic surface direct prediction model of the present invention for the tokamak experimental shot number within #79342-81692 and the experimental data of the 1094 shot with a longer duration. DETAILED DESCRIPTION
[0028] In order to more clearly explain the purpose, technical solution and effective gain of the present invention, the present invention is further described in combination with specific implementation examples and drawings. In addition, the specific implementation examples described below are only used to explain the present invention, but are not limited thereto. Further, the technical features designed in each embodiment of the present invention described below can be combined with each other without conflict.
[0029] The method of using the present invention in real-time control is as follows Figure 1 As shown in FIG. 1 , the present invention discretizes the outermost closed magnetic surface two-dimensional continuous data in a large amount of Tokamak historical data into 360 discrete point data for more efficient training by using the polar coordinate centripetal discretization method, as shown in FIG. Figure 1 As shown in a, the present invention further represents the discrete point data using polar diameters in a polar coordinate system, where: Representative The polar radius of discrete points, Figure 1 Shown are 360 polar diameters r1-r 360 , and then use the processed large amount of tokamak historical data to train a data-driven one-dimensional moving window self-attention model to predict the outermost closed magnetic surface. This model can predict the magnetic field configuration by analyzing the measurement signals of the tokamak device and the actions of the controller; Figure 1 As shown in b, the magnetic field configuration predicted by the above model combined with the target can calculate the error information, and then pass the error information to the controller; Figure 1 As shown in c, the controller can combine the measurement signals from the tokamak device Figure 1 The error information calculated in b gives further action and transmits the action to the tokamak device.
[0030] The present invention provides a method for optimizing a tokamak magnetic control system based on a data-driven model, which predicts the evolution of the outermost closed magnetic surface in the tokamak by training a one-dimensional moving window self-attention model based on data-driven, and specifically comprises the following steps:
[0031] Step 1, raw data acquisition: acquiring the raw controller data of the tokamak and the raw data of the actual measured value of the tokamak magnetic field;
[0032] Step 2, data selection and processing: 11190 shot data were selected from the tokamak experiment as the training data of the model, and the 11 most important diagnostic signals and 2 actuator signals were used as input to predict the outermost closed magnetic surface. The outermost closed magnetic surface was represented as 360 discrete points as output through the polar coordinate centripetal discretization method;
[0033] Step 3: Train the machine learning model: construct a loss function and calculate the loss based on the machine learning prediction output and the actual measured output of the tokamak device, and then train the machine learning model through the error back propagation method; the trained machine learning model can directly predict the outermost closed magnetic surface in real time;
[0034] Step 4: Couple the machine learning model with the plasma magnetic control system: Use the online machine learning model to directly and accurately predict the future magnetic field, thereby providing important information for the plasma magnetic control system and achieving more accurate control of the magnetic field.
[0035] Specifically, the step 2 uses a polar coordinate centripetal discretization method to represent the discretization of the outermost closed magnetic surface, which can retain the data characteristics of the outermost closed magnetic surface to a great extent, and solve the problem that the original data of the outermost closed magnetic surface is difficult to be directly used for the training of the neural network model, and includes the following steps:
[0036] Step 2.1: Express the two-dimensional curve data of the original data of the outermost closed magnetic surface as , , n represents the total number of discrete points, represents the coordinates of the i-th discrete point of the outermost closed magnetic surface represented by the discretization of n discrete points, f express and The two-dimensional curve function relationship between them;
[0037] Step 2.2: Place the two-dimensional curve of the original data of the outermost closed magnetic surface in the polar coordinate system, and set the polar angle difference between two consecutive discrete points in the two-dimensional curve in the polar coordinate system. ,in, Represents the coordinates of the 2D curve at the i-th discrete point The polar angle corresponding to the coordinate point in the polar coordinate system; Represents the coordinates of the i-1th discrete point of the two-dimensional curve The point corresponds to the polar angle of the coordinate point in the polar coordinate system;
[0038] Step 2.3: Fix the polar angle difference , discretize the two-dimensional curve of the outermost closed magnetic surface into 360 discrete points ,in, Represents the coordinates of discrete points corresponding to the two-dimensional curve Corresponding to the polar diameter in the polar coordinate system, the two-dimensional curve of the original data of the outermost closed magnetic surface is represented as a one-dimensional array ;
[0039] Step 2.4: Convert the original data of the outermost closed magnetic surface from a two-dimensional curve into a one-dimensional vector through step 2.3, and use the one-dimensional vector as the output step of a data-driven machine learning model based on a one-dimensional moving window self-attention mechanism.
[0040] The present invention places the outermost closed magnetic surface in a polar coordinate system, fully utilizing its shape feature as a closed curve to transform it into a one-dimensional vector that can be used as the output of a data-driven one-dimensional moving window self-attention model, which will help the model to converge more efficiently and give high-fidelity predictions.
[0041] Specifically, the present invention does not rely on the direct prediction of the evolution of the outermost closed magnetic surface of physical simulation, including: first, the present invention selects 11,190 shots from the EAST tokamak experiment as the entire data set of the experiment, and the data set is divided according to time, wherein 80% of the data is allocated to the training set, and 20% of the data is allocated to the test set and the verification set, and the proportion of the verification set is relatively small. In the non-real-time outermost closed magnetic surface prediction system, a total of 13 signals including basic diagnostic signals and actuator signals from the tokamak are selected as the input of the model, with a total dimension of 24 and a total output dimension of 360, corresponding to different angles of the outermost closed magnetic surface (LCFS) in the polar coordinate system. Unlike this system, in the outermost closed magnetic surface real-time prediction system, the total input dimension is 384, corresponding to the sum of the input and output of 24 dimensions in the non-real-time prediction system, and the output dimension is still 360.
[0042] Furthermore, the machine learning model based on the one-dimensional mobile attention mechanism can efficiently extract multi-scale features of the sequence and calculate quickly.
[0043] Furthermore, the machine learning model based on the one-dimensional mobile attention mechanism is trained using a large amount of tokamak experimental data, so that it can accurately predict the evolution of the magnetic field during the entire discharge process.
[0044] The machine learning model of the present invention is based on a one-dimensional moving window self-attention mechanism and is obtained through training with a large amount of real experimental data of tokamaks, and can realize the direct prediction of the outermost closed magnetic surface of the magnetic field of the tokamak over a long time scale. The two problems solved by the present invention are the data discretization of the outermost closed magnetic surface of the tokamak and the direct prediction of the outermost closed magnetic surface of the tokamak.
[0045] The machine learning model of the present invention utilizes machine learning methods to provide fast and accurate predictions for tokamak nuclear fusion magnetic field configuration experiments. It can also be seamlessly integrated with the plasma control system, and can directly provide very important future magnetic field evolution information for magnetic field control, thereby achieving higher-precision tokamak magnetic field control.
[0046] Specifically, the input of the machine learning model of the present invention includes 11 plasma state signals such as plasma current and electron density, 2 plasma control signals and the current moment magnetic field measurement value. The above input data can accurately predict the magnetic field measurement value at the next moment in real time. The machine learning model inputs a total of 384 signals.
[0047] Example:
[0048] The test result diagrams of the experimental gun number #73978 on the tokamak of the present invention are shown in Figure 2 (a), Figure 2 (b), Figure 2 (c), Figure 2 (d), and Figure 2 (e), wherein PF1-PF14 are the 1st-14th poloidal field coils, IC1-IC2 are the 1st-2nd vacuum chamber fast control coils, the R axis is the radial axis, and the Z axis is the vertical axis. Figures 2 (a), 2 (b), 2 (c), and 2 (d) represent the outermost closed magnetic surface prediction result display diagrams of the gun number #73978 at time points of 0.5s, 20.0s, 40.0s, and 49.0s, respectively, and Figure 2 (e) is the display of the above four plotting time points in the plasma current (Ip) image. The signal value of the magnetic control system of the tokamak at the current moment is set according to the experimental data. The measured value of the outermost magnetic field of the actual tokamak is obtained and represented in a discrete form. All data are preprocessed. Load the learned machine learning model and all data into the video memory, and use the machine learning model to directly calculate the outermost magnetic field at the next moment. Repeatedly load the learned machine learning model and all data into the video memory, and use the machine learning model to directly calculate the outermost magnetic field at the next moment, until the entire sequence is calculated, and save the model prediction results for data visualization.
[0049] like Figure 3 and Figure 4 As shown, in the Hefei "Eastern Super Ring (EAST)" tokamak device, the data of the tokamak experimental gun number within #79342-81692 and the experimental data of the 1094 gun with a longer duration were used as the test set to test the performance of the model on the overall test set. The present invention will use different model evaluation indicators based on the matrix norm to evaluate the accuracy of the model from the spatial and temporal perspectives. Through the accuracy evaluation method based on the relative error matrix 1 norm, the present invention regards the entire outermost closed magnetic surface at a single time step as a whole, which effectively represents its prediction accuracy at a single moment in space. As Figure 3As shown in Figure 2, the average similarity of the test set in the flat-top stage reaches 95.0%, and the average similarity based on the infinite norm reaches 95.3%.
Claims
1. A method for optimizing a tokamak magnetic control system based on a data-driven model, characterized in that: Training a machine learning model based on a one-dimensional moving window self-attention mechanism to predict the evolution of the outermost closed magnetic surface in a tokamak device includes the following steps: Step 1, obtaining original controller data of the tokamak device and original data of the measured value of the magnetic field of the actual tokamak device; Step 2: Select multiple shot data from the tokamak experiment as training data for the machine learning model, use multiple diagnostic signals and actuator signals as input, and predict the outermost closed magnetic surface; Step 3: construct a loss function for the machine learning prediction output and the actual measured output of the tokamak device and calculate the loss, and train the machine learning model through the error back propagation method; the trained machine learning model can realize the direct real-time prediction of the outermost closed magnetic surface; Step 4: Couple the machine learning model with the plasma magnetic control system, and use the online machine learning model to directly and accurately predict the future magnetic field of the tokamak device.
2. A method for optimizing a tokamak magnetic control system based on a data-driven model according to claim 1, characterized in that: The step 2 uses a polar coordinate centripetal discretization method to represent the discretization of the outermost closed magnetic surface, and retains the data features of the outermost closed magnetic surface.
3. A method for optimizing a tokamak magnetic control system based on a data-driven model according to claim 2, characterized in that: The step 2 comprises the following steps: Step 2.1: Express the two-dimensional curve data of the original data of the outermost closed magnetic surface as , , n represents the total number of discrete points, represents the coordinates of the i-th discrete point of the outermost closed magnetic surface represented by the discretization of n discrete points, f express and The two-dimensional curve function relationship between them; Step 2.2: Place the two-dimensional curve of the original data of the outermost closed magnetic surface in the polar coordinate system, and set the polar angle difference between two consecutive discrete points in the two-dimensional curve in the polar coordinate system. ,in, Indicates that the two-dimensional curve is The coordinates of discrete points The polar angle corresponding to the coordinate point in the polar coordinate system; Indicates that the two-dimensional curve is - Coordinates of 1 discrete point The point corresponds to the polar angle of the coordinate point in the polar coordinate system; Step 2.3: Fix the polar angle difference , discretize the two-dimensional curve of the outermost closed magnetic surface into 360 discrete points ,in, Represents the coordinates of discrete points corresponding to the two-dimensional curve Corresponding to the polar diameter in the polar coordinate system, the two-dimensional curve of the original data of the outermost closed magnetic surface is represented as a one-dimensional array ; Step 2.4: Convert the original data of the outermost closed magnetic surface from a two-dimensional curve into a one-dimensional vector through step 2.3, and use the one-dimensional vector as the output of a data-driven machine learning model based on a one-dimensional moving window self-attention mechanism.
4. The method for optimizing a tokamak magnetic control system based on a data-driven model according to claim 1, characterized in that: In step 2, 11190 shot data are selected from the tokamak experiment as training data for the machine learning model, and 11 diagnostic signals and 2 actuator signals are used as input to predict the outermost closed magnetic surface.
5. The method for optimizing a tokamak magnetic control system based on a data-driven model according to claim 1, characterized in that: In step 3, the input of the machine learning model includes plasma current, normalization parameter β, and poloidal magnetic field coil voltage.
Citation Information
Patent Citations
Modeling method for outermost closed magnetic surface of Tokamak magnetic field
CN115510768A
Tokamak fusion reactor first wall heat flux density calculation method
CN116522682A
Simulation method for electron temperature evolution caused by east tokamak radiofrequency wave
US20230268084A1