Tokamak discharge modeling system based on bidirectional long short-term memory neural network

By using a tokamak discharge modeling system based on a bidirectional long short-term memory neural network, contextual information is extracted directly from tokamak discharge experimental data for end-to-end modeling. This solves the problems of low accuracy and slow speed in existing tokamak discharge modeling and achieves efficient long-scale modeling.

CN115544882BActive Publication Date: 2026-04-14HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-08
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing tokamak discharge modeling methods suffer from low accuracy, low computational efficiency, and difficulty in performing high-fidelity modeling over long time scales. Ensemble modeling relies on complex physical processes, and machine learning models that only utilize forward information result in inaccurate modeling.

Method used

A tokamak discharge modeling system based on a bidirectional long short-term memory neural network is adopted. Through a data transfer module, a batch data access input module, a training custom parameter module, and a data visualization module, combined with the bidirectional long short-term memory neural network module, contextual information is directly extracted from the tokamak discharge experimental data for end-to-end modeling, avoiding the derivation of complex physical processes.

Benefits of technology

It achieves fast and accurate tokamak discharge modeling, improves the modeling accuracy of loop voltage Vloop and electron density ne, overcomes the challenge of long-term full-process discharge modeling, and is faster and more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115544882B_ABST
    Figure CN115544882B_ABST
Patent Text Reader

Abstract

The application discloses a tokamak discharge modeling system based on a bidirectional long short-term memory neural network, which is composed of multiple modules, and the modules are low-coupling functional units.The modules at least include a data transfer module, a Batch data access input module, a training self-defined parameter module, a bidirectional long short-term memory neural network modeling module and a data visualization module.The whole system architecture is mainly divided into two paths, namely data training and data modeling.Using the visualization technology, the tokamak discharge experiment personnel can refer to the discharge modeling results and visualize the model training process.The application can one-key type in the experiment proposal stage to model the whole process of the tokamak discharge curve in advance, so that the experiment personnel and the proposal design personnel can check the validity and rationality of the proposal.The application can also be used for assisting data discovery after the experiment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a tokamak discharge modeling system based on a bidirectional long short-term memory neural network, specifically a system that calculates the value at the current time point from both ends based on the characteristics of the bidirectional long short-term memory neural network. The aim is to use this system to preview the proposal for tokamak discharge modeling, providing a reference for subsequent discharge experiments and assisting in the analysis of tokamak experimental data. This invention belongs to the fields of machine learning and nuclear fusion physics. Background Technology

[0002] Utilizing nuclear fusion energy is a crucial pathway for humanity to ultimately solve its energy problem. Currently, aside from geothermal and fission energy, almost all energy sources available to humankind originate from solar nuclear fusion reactions. The primary raw material for nuclear fusion is deuterium from seawater, while the fusion product is the inert element helium. Nuclear fusion eliminates the issues of raw materials and nuclear waste. Once humanity masters controlled nuclear fusion technology, it may be able to solve the energy problem once and for all.

[0003] There are several different types of research devices for nuclear fusion energy, and the tokamak is one of them. A tokamak is a toroidal container that uses magnetic confinement to achieve magnetic fusion. Achieving stable plasma equilibrium requires helical magnetic field lines moving around the toroidal surface. It is one of the most extensively researched candidate types for producing controlled thermonuclear fusion energy and is considered the most likely device to achieve controlled nuclear fusion reactions. Typical small to medium-sized tokamak discharge experiments use deuterium-helium plasma to simulate deuterium-tritium plasma discharge processes, primarily to study how to effectively achieve long-term, high-energy plasma confinement.

[0004] A search of existing patents revealed almost no patents on the entire process of tokamak discharge. The existing literature consists mostly of studies on the entire process of tokamak discharge that use ensemble modeling methods and a small number of studies that use machine learning models based solely on forward information.

[0005] The integrated modeling method for the entire tokamak discharge process utilizes a physics-driven approach. This method requires integrating as many physical processes as possible, including particle transport, equilibrium, boundary physics, and heating. The accuracy of the integrated modeling, according to first-principles calculations, depends primarily on the completeness and rationality of the physical processes involved. Over the past few decades, many ensemble modeling models based on physical models have been developed. However, these models typically involve complex multi-grid partial differential equation numerical solutions, resulting in low computational efficiency and difficulty in parallelization. Furthermore, tokamak systems possess nonlinear, multi-scale, and multi-physics characteristics. High-fidelity, rapid discharge modeling of the entire tokamak discharge process over long timescales, solely based on first-principles calculations, remains a scientific challenge. Machine learning-based tokamak discharge modeling models, relying solely on forward information and simulation results, fail to consider that discharge modeling is actually an offline process with known contextual information, and require the incorporation of simulation results, resulting in lower modeling accuracy and slower speed. High-fidelity, rapid modeling of the entire tokamak discharge process over long periods remains a scientific challenge. Summary of the Invention

[0006] To overcome the shortcomings of existing full-process tokamak discharge modeling, such as inaccurate results, long modeling times, and inability to model long-term full-process discharges, this invention provides a tokamak discharge modeling system based on a bidirectional long short-term memory neural network. This system utilizes the known characteristics of the discharge modeling task context information before modeling, combined with the bidirectional long short-term memory neural network, to achieve high-fidelity full-process tokamak discharge modeling over long time scales.

[0007] The technical solution adopted by this invention to solve its technical problem is: a tokamak discharge modeling system based on a bidirectional long short-term memory (LSTM) neural network, characterized in that it consists of multiple different modules, wherein the different modules refer to loosely coupled functional partitions, and the multiple different modules include at least: a data transfer module, a batch data access input module, a training custom parameter module, a data visualization module, and a bidirectional long short-term memory (LSTM) neural network modeling module; wherein:

[0008] Data transfer module: Maps data from the MDSplus database directly to HDF5 format without going through the Server layer. This process requires rewriting the Server layer driver to directly access the corresponding original data in the MDSplus database and calculate metadata to store in the index database.

[0009] Batch data access input module: Converts HDF5 format data in the data transfer module into input data that the neural network can accept, and performs bucketing operation and parallelized batch data input.

[0010] The custom parameter training module calls the bidirectional long short-term memory neural network modeling module to customize the modeling parameters as needed; it calls the data transfer module to generate the required data; it uses the batch data access input module to input data into the machine learning model; and it trains the machine learning model of the bidirectional long short-term memory neural network with custom parameters.

[0011] Data Visualization Module: The data visualization module visualizes the training process of the custom parameter model and the modeling results of the trained model.

[0012] The modeling module of the bidirectional long short-term memory (LSTM) neural network consists of six superimposed neural network layers: an input layer, four bidirectional LSTM neural network layers, and a fully connected layer. This constitutes the main body of the tokamak discharge modeling work, and the model is used to model the entire discharge system of the tokamak.

[0013] The bidirectional Long Short-Term Memory (LSTM) neural network modeling module employs a stack of six neural network layers: an input layer, four bidirectional LSTM neural network layers, and a fully connected layer. This modeling module is the core of the entire tokamak discharge modeling system. Its main innovation lies in introducing contextual information from the tokamak discharge experiment proposal phase and performing end-to-end model training and inference. Compared to existing "ensemble modeling" work, this system directly extracts the mapping relationship between actuator and diagnostic signals from experimental data, without needing to derive mapping relationships by integrating multiple physical processes such as core transport, tokamak equilibrium, stability, boundary physics, heating, fueling, combustion, and current drive from "first principles" models. The accuracy and reliability of "first principles" models depend on the completeness of the included physical processes. Over the past few decades, complex physical modules have been developed and integrated into ensemble modeling to obtain more realistic modeling results. The typical workflow for tokamak discharge modeling involves using many complex modules and then integrating numerous physical processes using these modules. Furthermore, physical models typically require complex numerical solutions to multi-grid partial differential equations, resulting in low computational efficiency and difficulty in parallelization. This is compounded by the nonlinear, multi-scale, and multi-physics characteristics of tokamak systems. High-fidelity, rapid discharge modeling of the entire tokamak discharge process over long timescales, based solely on "first principles," remains a scientific challenge. The model proposed in this invention, by extracting mapping relationships from experimental data, avoids complex physical concepts and can utilize GPUs for data parallelization, enabling fast and accurate modeling. Compared to existing machine learning-based tokamak modeling, this invention's system utilizes only the contextual information from tokamak discharge experiments and directly constructible actuator data, rather than forward information from actuator signals plus some simulation results. This system simultaneously models the tokamak diagnostic signal based on both forward and backward actuator signals from experimental data at the current time. Therefore, it is relatively faster and yields more accurate results. This modeling module serves as the backend model for training the custom parameter module and is also the core module of this discharge modeling system, generating modeling data that can be visualized by the data visualization module.

[0014] The data transfer module directly transfers the raw data of the MDSplus database to an HDF5 format file, and simultaneously calculates metadata and stores it in the index database.

[0015] A bidirectional long short-term memory (LSTM) neural network is used for full-process tokamak discharge modeling. The main feature of this model is the stacking of four LSMs, with the bidirectional LSM being the key component. The bidirectional LSM effectively utilizes the contextual information from the tokamak discharge experiment, comprehensively calculating the modeling data at the current moment from both the preceding and following data. Existing machine learning models for tokamak discharge modeling only utilize forward information, and existing "first-principles" based models require complex model derivation and evolution. This bidirectional LSM model directly and rapidly extracts the mapping relationship between tokamak actuator signals and diagnostic signals from the experimental data end-to-end. Therefore, this model is faster, more efficient, and more accurate than other models.

[0016] The modeling module of the bidirectional Long Short-Term Memory (LSTM) neural network is specifically as follows:

[0017] Input layer: As the starting point of the entire network, it bidirectionally transforms the 65 input time series signals into input tensors and then distributes the input tensors to the GPU for computation;

[0018] Four bidirectional long short-term memory layers: receiving output data from the input layer;

[0019] The first bidirectional LSTM layer first processes the input 65-dimensional time series data through a bidirectional LSTM weight calculation and then expands it into 512-dimensional output data.

[0020] The second to fourth bidirectional LSTM layers: perform weight calculations and use contextual information to infer the current modeling result;

[0021] Output layer: Converts the outputs of the four stacked bidirectional LSTMs into the output dimension size corresponding to the target signal.

[0022] The architecture of this model differs significantly from both the physical model and existing tokamak discharge modeling. It utilizes the contextual information of discharge modeling without requiring model understanding and derivation based on "first principles".

[0023] The Batch data access input module includes data bucketing and parallel data input of batch data in multiple processes.

[0024] The custom parameter training module allows you to customize the parameters for model training as needed.

[0025] a) Save default parameters and accept user input (modification) parameters, including model stacking method, size and input / output data. At the same time, this operation will call the data transfer module to modify the transferred data and supplement any missing data.

[0026] b) Use user-defined parameters to train the bidirectional neural network model. Based on these parameters, call the Batch data input module to generate data input to the bidirectional long short-term memory neural network for training.

[0027] c) Generate visualized intermediate data for model training, call the visualized model to perform the model training process, and visualize the loss function, accuracy, model structure, etc.

[0028] The implementation steps of this invention are as follows:

[0029] (1) Tokamak discharge modeling based on context information using a machine learning model based on a bidirectional long short-term memory neural network;

[0030] (2) The system consists of a data transfer module, a batch data access input module, a training custom parameter module, a data visualization module, and a bidirectional long short-term memory (LSTM) neural network modeling module.

[0031] (3) The system can perform end-to-end training of models with custom parameters.

[0032] (4) The training process and modeling results of the system model can be visualized by the visualization module.

[0033] (5) The system uses the Batch data access input module to perform bucketing operations and parallelized Batch input.

[0034] (6) The system can automatically convert the raw data files and corresponding metadata of the tokamak MDSplus database into a custom database that can perform high I / O, HDF5 and index database.

[0035] The tokamak discharge modeling system based on a bidirectional long short-term memory (LSTM) neural network utilizes a data-driven modeling approach. It integrates five modeling modules: a data transfer module, a batch data access and input module, a custom parameter training module, a data visualization module, and a modeling module based on a bidirectional LSTM neural network, thus constructing a tokamak discharge modeling system for the entire process.

[0036] The beneficial effects of this invention compared to existing technologies are as follows: The tokamak discharge modeling system based on a bidirectional long short-time memory neural network of this invention adopts the method of a bidirectional long short-time memory neural network, utilizing the contextual information of the tokamak discharge proposal stage, effectively eliminating the shortcomings of inaccurate modeling in machine learning models based solely on forward information, and improving the tokamak loop voltage V by 5% and 1% respectively. loop and electron density n eThe model achieves high average similarity and does not incorporate simulation results or use adaptive sampling, resulting in faster modeling speed. Furthermore, it directly extracts the mapping relationship between input and diagnostic data from experimental data, overcoming the limitation of first-principles-based tokamak simulation systems, which cannot perform accurate, full-process discharge modeling over long time scales. Attached Figure Description

[0037] Figure 1 This is a diagram illustrating the overall modeling architecture of the present invention;

[0038] Figure 2 This is a diagram of the machine learning model architecture of the present invention;

[0039] Figure 3 This is a specific implementation example diagram of the present invention;

[0040] Figure 4 This is a comparison between the modeling results of this invention and those of existing literature that only utilize forward information. Detailed Implementation

[0041] The invention will be further described below with reference to the accompanying drawings and examples.

[0042] like Figure 1 As shown, from bottom to top, they are the modeling module, data transfer module, batch data input module, and module for training custom parameter models.

[0043] Data Transfer Module: This module directly maps the raw data files of the tokamak's original MDSplus database without going through the server layer or the HDF5 data file. It primarily has the following four functions: 1. Reading raw data from the MDSplus database. 2. Identifying the length of the flat-top segment using the slope of the reference signal and the filtered slope of the actual discharge signal. 3. Converting the data to HDF5 format, simultaneously performing data filling, alignment, and filtering operations. 4. Distributed computation and storage of metadata in the index database.

[0044] Batch data input module: This module has two branches: multi-process data processing and bucketed data generation. Data is divided into different buckets according to discharge time and memory capacity using a custom segmentation algorithm. Then, a batch number sequence is generated based on the memory capacity and the number of GPUs. Finally, a multi-process pool is used to generate the corresponding batch sequence input based on the batch number sequence.

[0045] The custom parameter training module provides a secondary development interface, shielding users from the details of model development and allowing for customized training of different parameter models. The main process is as follows: 1. Check if the training conditions are met and call the data transfer module to generate any missing data; 2. The training module automatically calls the Batch data input module for automatic training; 3. Generate the training process data required by the visualization module and call the visualization module to visualize the training process.

[0046] Data Visualization Module: This module has two branches: one is the model training of custom parameters using Tensorboard's visualization training module, and the other is the modeling results of the bidirectional LSTM neural network modeling module and the visualization modeling results provided by the matplotlib package in Python.

[0047] Figure 2 The right side of the image shows the modeling module of the Bidirectional Long Short-Term Memory (BiLSTM) neural network. The main components of the network consist of six main sequentially connected layers: an input layer, four bidirectional long short-term memory layers, and a fully connected layer.

[0048] Input Layer: As the starting point of the entire network, it transforms the 65-channel input time-series signal into an input tensor, and then distributes the input tensor to the GPU for computation. In the diagram, B represents the size of the input batch, L represents the length of the input sequence, and C represents the total number of channels (feature count) in the input sequence.

[0049] Four bidirectional long short-time memory layers (BLSTM_0–BLSTM_3): receive output data from the input layer.

[0050] The first bidirectional LSTM layer first uses the weights of a bidirectional LSTM to calculate and expand the input 65-dimensional time series data into 512-dimensional output data.

[0051] The second to fourth bidirectional LSTM layers: perform weight calculations and use contextual information to infer the current modeling result.

[0052] Each LSTM layer is equivalent to Figure 2 The structure in the left subgraph is mainly composed of two basic LSTM layers superimposed, which calculate the output at the current time step from both the forward and backward directions. Compared with other structures, this structure can take advantage of the known context information in offline tokamak discharge modeling.

[0053] Output layer (Fully Connected): This layer converts the outputs of the four stacked bidirectional LSTM layers into an output dimension corresponding to the target signal. In the diagram, "O" represents the output signal dimension.

[0054] This module can be the backend training module for the training process of the custom parameter module, and it is also the core module of the discharge modeling system. It can generate data for the data visualization module to visualize the modeling data.

[0055] File exchange:

[0056] Different modules within the system use different file exchange formats. The data transfer module converts the raw data of the original MDSplus Tree hierarchical structure into HDF5 format files and saves them to a custom database. The raw data conversion process utilizes a multi-process Socket pool. For batch data input, HDF5 data is extracted, loaded into memory, and metadata stored in the index database is read and converted to appropriate parameter ranges before being input into the modeling or training model. The visualization module directly reads files from the disk. For the modeling model, it reads the TensorBoard log file from the disk to visualize the training process; for model result visualization, it reads the modeling result file from the disk, which is directly appended to the original HDF5 file.

[0057] System operation process:

[0058] The data flow of this system is mainly divided into two parts: data training and modeling. The data training process consists of the following steps: 1. The data transfer module generates a custom database consisting of HDF5 and an index database using the original data. 2. The batch module reads the data and generates batch Tensor input data, as well as batch Tensor label data. 3. The model reads the batch Tensor input data and batch Tensor label data to train a custom parameter model. 4. The visualization module reads the log data generated during training and plots a graphical representation of the training process. The data modeling part includes: 1. Reading the corresponding discharge parameters from the HDF5 database or manually setting specific discharge parameters. 2. Generating Tensor input data. 3. Reading the input data and performing modeling. 4. The visualization module reads the modeling results and visualizes them. The modeling module can be called by the custom parameter training module to test the effectiveness of the trained model.

[0059]

Example 1

[0060] The visualized modeling results were first presented using the 81440 gun as test data. The specific process was as follows: 1. Set the discharge parameters; in this example, the active control data of the 81440 gun was used directly as the set parameters. 2. Call the Batch input module to convert the list-type data into Tensor-type input data. 3. Input the input data into the corresponding model to obtain the modeling results.

[0061] Visualization of the modeling results. The EAST tokamak discharge gun #81440 was selected as the test data. The specific process is as follows: 1. The data conversion module is used to convert the data of the corresponding gun in the original database file of the index database into HDF5 format. 2. Actuator parameters are set. In this example, the actuator data of gun #81440 is directly used as the manually set input data. 3. The Batch data access input module is used to access the converted HDF5 data and the corresponding metadata in the index database to convert the data into Tensor type input data of the corresponding distribution. 4. The data from the Batch data access input module is input into the bidirectional long short-term memory neural network modeling module to obtain the modeling results. 5. The visualization module is used to visualize the corresponding modeling results, as shown below. Figure 3 As shown, this system can simultaneously model 11 tokamak diagnostic signals, namely: the actual plasma current I... p Tokamak magnetic axis plasma average electron density n e Plasma energy storage W mhd Tokamak loop voltage V loop Tokamak normalized magnetic specific pressure β n Circumferential magnetic specific pressure β t poloidal magnetic ratio β p , elongation ratio κ, internal sensation l i Safety factor q0, safety factor q at 95% flux level 95 .

[0062] like Figure 4 The experimental data from the 2016-2018 EAST tokamak device in China, using the 696 gun as the test set, is shown. The results are compared between this invention utilizing contextual information and existing literature's machine learning model based on forward information, using adaptive sampling, and incorporating physical model results. This invention, without using a physical model and adaptive sampling, achieves V... loop and n e The improvements were ~5% and ~1% respectively. This indicates that the modeling results of the present invention are more accurate and reliable.

[0063] Compared to physical "integrated modeling," this invention offers faster modeling speed, more accurate modeling results, and high-fidelity modeling of the entire tokamak discharge evolution over long timescales. Compared to existing models based on feedforward neural networks, this invention considers contextual information rather than just forward information, eliminating the need to incorporate physical modeling results or perform adaptive sampling. Therefore, the results of this invention are more accurate, reliable, and practical.

Claims

1. A tokamak discharge modeling system based on a bidirectional long short-term memory neural network, characterized in that: It consists of multiple different modules, which refer to loosely coupled functional partitions. These multiple different modules include at least: a data transfer module, a batch data access and input module, a training custom parameter module, a data visualization module, and a bidirectional long short-term memory (LSTM) neural network modeling module; wherein: The data transfer module maps data from the MDSplus database directly to HDF5 format without going through the Server layer. This process requires rewriting the Server layer driver to directly access the corresponding original data in the MDSplus database and calculate metadata to store in the index database. The Batch data access input module converts the HDF5 format data in the data transfer module into input data that the neural network can accept, while performing bucketing operations and parallelized batch data input. The custom parameter training module calls the bidirectional long short-term memory neural network modeling module to customize the parameters according to the model being trained; it calls the data transfer module to generate the required data; it uses the batch data access input module to input data into the machine learning model; and it trains the machine learning model of the bidirectional long short-term memory neural network with custom parameters. The data visualization module visualizes the training process of the custom parameter model and the modeling results of the trained model. The modeling module of the bidirectional long short-term memory (LSTM) neural network consists of six superimposed neural network layers: an input layer, four bidirectional LSTM neural network layers, and a fully connected layer. This constitutes the main body of the tokamak discharge modeling work, and the model is used to model the entire discharge system of the tokamak. The modeling module of the bidirectional long short-term memory (LSTM) neural network is specifically as follows: Input layer: As the starting point of the entire network, it bidirectionally transforms the 65 input time series signals into input tensors and then distributes the input tensors to the GPU for computation; Four bidirectional long short-term memory layers: receiving output data from the input layer; The first bidirectional LSTM layer first processes the input 65-dimensional time series data through a bidirectional LSTM weight calculation and then expands it into 512-dimensional output data. The second to fourth bidirectional LSTM layers: perform weight calculations and use contextual information to infer the current modeling result; Output layer: Converts the outputs of the four stacked bidirectional LSTMs into the output dimension size corresponding to the target signal.

2. The tokamak discharge modeling system based on a bidirectional long short-term memory neural network according to claim 1, characterized in that: The data transfer module directly transfers the raw data from the MDSplus database to an HDF5 format file, while simultaneously calculating metadata and storing it in the index database.

3. The tokamak discharge modeling system based on a bidirectional long short-term memory neural network according to claim 1, characterized in that: The Batch data access input module includes data bucketing and parallel data input of batch data in multiple processes.

4. The tokamak discharge modeling system based on a bidirectional long short-term memory neural network according to claim 1, characterized in that: The custom parameter training module allows you to customize the parameters for model training according to your needs. a) Save default parameters and accept user input or modify parameters. Parameters include the model's stacking method, size, and input / output data. This operation will also call the data transfer module to modify the transferred data and supplement any missing data. b) Use user-defined parameters to train the bidirectional neural network model. Based on these parameters, call the Batch data input module to generate data input to the bidirectional long short-term memory neural network for training. c) Generate visualized intermediate data for model training, call the visualized model to perform the model training process, and visualize the loss function, accuracy, and model structure.