Tokamak poloidal field coil feedforward current design method and system

CN122735600BActive Publication Date: 2026-10-30HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611178059.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-10-30
Estimated Expiration
2046-08-05

AI Technical Summary

Technical Problem

然而,前向建模主要从执行器信号预测等离子体响应,并不直接给出为了达到预定边界应当设置的极向场线圈前馈电流;强化学习方法通常依赖仿真器和奖励函数,其训练效果受仿真精度和奖励设计影响

Benefits of technology

[0023]与现有技术相比,本发明具有以下有益效果:本发明根据待设计放电的状态序列生成多路极向场线圈前馈电流,各时刻的计算可利用整段目标演化信息。生成结果经分阶段、分线圈的幅值和变化率限制后,再利用自由边界磁平衡求解结果验证目标边界误差和壁间隙。满足判据的轨迹可作为等离子体控制系统的初始前馈输入,并由实时反馈控制在放电过程中继续修正。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122735600B_ABST
    Figure CN122735600B_ABST
Patent Text Reader

Abstract

The application discloses a tokamak poloidal field coil feedforward current design method and system, and belongs to the fields of machine learning, tokamak plasma control and magnetic fluid balance calculation. A state sequence is composed of boundary control points, plasma centers and plasma currents of historical discharges, and poloidal field coil currents measured by experiments are used as expert actions to train a neural network model with learnable position coding and without setting causal masks. For a discharge to be designed, the model generates multiple poloidal field coil feedforward currents offline according to the state sequence, and filters the currents according to current amplitudes and current change rates of rising sections, flat sections and falling sections. The filtered currents are input into a free boundary balance solver after being mapped to coils, and convergence, boundary control point errors and wall gaps are used as verification criteria. The application reduces the workload of manually adjusting poloidal field feedforward waveforms, and currents meeting the criteria can be loaded to an initial feedforward trajectory of a plasma control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of machine learning, tokamak plasma control and magnetohydrodynamic balance calculation, and specifically relates to a tokamak poloidal field coil feedforward current design method and system. Background Technology

[0002] Plasma position, shape, and current control in tokamak discharge typically involves two levels: real-time feedback control and feedforward control. Feedback control corrects errors in real time during the discharge process based on magnetic measurement signals, while the feedforward current waveform of the poloidal field coil is usually written into the plasma control system before the discharge to drive the entire discharge process toward the predetermined plasma boundary and plasma current evolution.

[0003] In actual experimental preparation, new discharge schemes often require starting from historical reference shots, with experimenters repeatedly adjusting the current waveforms of multiple poloidal field coils to meet various requirements such as target boundaries, plasma current, coil power supply, and device protection. This process relies on experience, is time-consuming, and involves model mismatch and manual parameter tuning costs between different experimental rounds or under different operating conditions.

[0004] Existing physical model-based solutions typically require iterative solutions through free boundary equilibrium, external circuit models, conductor structure models, or linearized response models. These solutions can support shape control and discharge scheme design, but each new target scenario may still require experts to reset constraints, initial values, and optimization parameters.

[0005] Data-driven methods have been applied to tasks such as tokamak discharge prediction, outermost closed magnetic surface evolution modeling, magnetic balance reconstruction acceleration, and reinforcement learning control. However, forward modeling mainly predicts plasma response from actuator signals and does not directly provide the poloidal coil feedforward current that should be set to reach the predetermined boundary; reinforcement learning methods typically rely on simulators and reward functions, and their training performance is affected by simulation accuracy and reward design.

[0006] Therefore, there is a need for a method that utilizes expert currents from historical successful discharges to generate multi-channel poloidal coil feedforward currents offline based on a complete target plasma state sequence without relying on a plasma simulator during training, and then filters the generated currents through device operation constraints and physical consistency verification. Summary of the Invention

[0007] The purpose of this invention is to reduce the dependence of tokamak poloidal field coil feedforward current on manual adjustment, and to provide a method and system for generating multiple poloidal field coil feedforward currents from plasma state sequences and performing operational constraint filtering and physical consistency verification before loading them into the plasma control system.

[0008] To achieve the above objectives, this invention uses the poloidal coil currents obtained from experimental measurements during historical tokamak discharges as expert actions, and the plasma boundary control points, plasma centroids, and plasma currents at the same time as states, constructing a state-to-action sequence imitation learning problem. After training, given the target state sequence of the discharge to be designed, the model outputs multiple poloidal coil feedforward currents at once.

[0009] The method includes historical discharge data alignment, Transformer neural network model behavior cloning training, offline feedforward generation of state sequences, current amplitude and phased rate of change filtering, complete coil set mapping, physical consistency verification, and initial feedforward trajectory output.

[0010] The specific technical solution is as follows: a method for designing the feedforward current of a tokamak poloidal field coil, comprising the following steps:

[0011] Step 1: Obtain the equilibrium reconstruction data and poloidal coil current data of the historical discharge of the tokamak, align them according to the equilibrium reconstruction time, and construct state and action training samples.

[0012] Step 2: Use the state sequence consisting of plasma boundary control points, plasma centroid and plasma current as model input, and use the expert action sequence consisting of measured poloidal coil current as training target.

[0013] Step 3: Use a neural network model with learnable position encoding and without setting a causal mask to perform behavioral cloning training on the training samples to obtain a strategy model that generates a poloidal field coil feedforward current sequence from the state sequence.

[0014] Step 4: Input the state sequence of the discharge to be designed into the strategy model to generate twelve independent pre-programmed poloidal coil currents offline;

[0015] Step 5: Limit the amplitude according to the current amplitude range of each coil, identify the current rising segment, flat top segment and current falling segment according to the plasma current, and filter the twelve current channels moment by moment using the corresponding sub-coil current change rate threshold for each stage.

[0016] Step 6: Map the filtered twelve currents to the complete poloidal field coil set according to the coil circuit relationship of the tokamak device. Input the complete poloidal field coil set into the free boundary equilibrium solver and verify the physical consistency based on the solution convergence, boundary control point error and wall gap. When the preset criteria are met, the filtered twelve currents are determined as the initial feedforward trajectory of the plasma control system.

[0017] In one implementation, the state vector includes eight boundary control points. , Coordinates, plasma centroid , The model employs nineteen channels, including coordinates and plasma current. The training action vectors include the currents PF1 to PF8 and PF11 to PF14, measured experimentally during historical discharges. The model output corresponds to twelve channels of these action vectors, serving as twelve independent pre-programmed poloidal coil currents. For coils in series, they are mapped to the complete coil set according to the device circuit relationships during the physical consistency verification phase.

[0018] In one implementation, the temporal model is a Transformer neural network model with learnable positional encoding and no causal mask. The model consists of a 19-dimensional input projection layer, a learnable positional encoding layer, six pre-normalized encoding layers, and a 12-dimensional output mapping layer. Each encoding layer includes an eight-head self-attention network, a 1024-dimensional feedforward network, a GELU activation function, and a dropout layer with a dropout rate of 0.1. The model has a dimension of 256 and a maximum sequence length of 128.

[0019] In one implementation, the training loss is the mask mean squared error loss, which is calculated only for valid channels, valid time points, and non-padded locations. This process ensures that missing, padded, or inconsistently lengthed samples in the historical database do not incorrectly affect model training.

[0020] In one implementation, the operational constraint filtering includes two types of restrictions: the first type is the current amplitude restriction for each coil; the second type is the current change rate restriction for each coil under different discharge stages. The discharge stage is identified as a current rising segment, a flat-top segment, and a current falling segment based on the plasma current waveform, and the current change rate threshold is determined by the corresponding quantile of the historical training waveform.

[0021] In one implementation, physical consistency verification utilizes the tokamak poloidal field coil and vacuum chamber geometry, inputting the feedforward current satisfying preset operating constraints, the pressure profile function at the target time, and the poloidal current function into a free boundary Grad-Savranov equilibrium solver. The generated feedforward current is judged to meet preset criteria based on solution convergence, boundary control point errors, and wall clearance. This verification is based on static equilibrium calculations of a given profile and does not replace real-time feedback control during the discharge process.

[0022] This invention also provides a tokamak poloidal field coil feedforward current design system, including a data alignment module, a model training module, a feedforward trajectory generation module, an operational constraint filtering module, a coil mapping module, a physical consistency verification module, and a trajectory output module. The data alignment module aligns historical discharge equilibrium reconstruction data with poloidal field coil current data, using experimentally measured poloidal field coil currents as expert actions to construct state and action training samples. The model training module trains a neural network model with learnable position encoding and without causal masks. The feedforward trajectory generation module generates twelve independent pre-programmed poloidal field coil currents based on state sequences. The operational constraint filtering module performs current amplitude limits and phased current change rate filtering. The coil mapping module maps the twelve currents to a complete set of poloidal field coils according to the device circuit relationships. The physical consistency verification module calls a free boundary equilibrium solver and performs physical consistency verification based on solution convergence, boundary control point error, and wall gap. The trajectory output module outputs the initial feedforward trajectory of the plasma control system when preset criteria are met.

[0023] Compared with existing technologies, this invention has the following advantages: This invention generates multi-path poloidal field coil feedforward currents based on the state sequence of the discharge to be designed, and the calculations at each moment can utilize the entire target evolution information. After the generated results are limited by the amplitude and rate of change of each coil in stages, the target boundary error and wall gap are verified using the free boundary magnetic balance solution results. The trajectory that meets the criteria can be used as the initial feedforward input of the plasma control system, and further corrected by real-time feedback control during the discharge process. Attached Figure Description

[0024] Figure 1 This is a schematic diagram illustrating the relationship between the generation of the poloidal field coil feedforward trajectory and the real-time feedback control of the present invention.

[0025] Figure 2 This is a schematic diagram of the overall process of the present invention, from expert demonstration, behavior cloning training, operational constraints to physical consistency verification.

[0026] Figure 3 This is a schematic diagram of the vacuum chamber, first wall, poloidal field coil, internal coil, outermost closed magnetic surface, boundary control point, and plasma centroid of the EAST device.

[0027] Figure 4 This is a schematic diagram of the Transformer neural network model structure with learnable positional encoding and without causal masking.

[0028] Figure 5 This is a time-series comparison chart of the predicted values ​​of the twelve-channel poloidal field coil currents and the historical expert values.

[0029] Figure 6 This is a scatter plot comparing the predicted values ​​of the twelve-channel poloidal field coil current with historical expert values.

[0030] Figure 7 This is a schematic diagram illustrating the physical consistency verification results of the discharge rising segment, flat-top segment, and falling segment. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other. To achieve the above objectives, this invention adopts the following technical solution.

[0032] This invention provides a method for designing the feedforward current of a tokamak poloidal field coil, comprising the following steps:

[0033] Step 1: Obtain the equilibrium reconstruction data and poloidal coil current data of the historical discharge of the tokamak, align them according to the equilibrium reconstruction time, and construct state and action training samples.

[0034] Step 2: Use the state sequence consisting of plasma boundary control points, plasma centroid and plasma current as model input, and use the expert action sequence consisting of measured poloidal coil current as training target.

[0035] Step 3: Use a neural network model with learnable position encoding and without setting a causal mask to perform behavioral cloning training on the training samples to obtain a strategy model that generates a poloidal field coil feedforward current sequence from the state sequence.

[0036] Step 4: Input the state sequence of the discharge to be designed into the strategy model to generate twelve independent pre-programmed poloidal coil currents offline;

[0037] Step 5: Limit the amplitude according to the current amplitude range of each coil, identify the current rising segment, flat top segment and current falling segment according to the plasma current, and filter the twelve current channels moment by moment using the corresponding sub-coil current change rate threshold for each stage.

[0038] Step 6: Map the filtered twelve currents to the complete poloidal field coil set according to the coil circuit relationship of the tokamak device. Input the complete poloidal field coil set into the free boundary equilibrium solver and verify the physical consistency based on the solution convergence, boundary control point error and wall gap. When the preset criteria are met, the filtered twelve currents are determined as the initial feedforward trajectory of the plasma control system.

[0039] Furthermore, the t-th state in the state sequence is Where t represents the equilibrium reconstruction time number, Let represent the t-th state vector, which includes the radial coordinates of the eight boundary control points, the vertical coordinates of the eight boundary control points, the plasma centroid coordinates, and the plasma current; where the coordinates of the k-th boundary control point at time t are... ,in, This represents the radial coordinate of the k-th boundary control point at time t. This represents the vertical coordinate of the k-th boundary control point at time t, and the coordinates of the plasma centroid are... ,in, This represents the radial coordinate of the plasma's center of mass at time t. This represents the vertical coordinate of the plasma mass center at time t, with the subscript c indicating the mass center, and the plasma current is... ,in, The plasma current at time t is represented by PF1 to PF8 and PF11 to PF14, which are twelve independent poloidal coil currents, where PF represents the poloidal coil.

[0040] Furthermore, step 1 also includes: resampling the coil current in a zero-order hold manner to the equilibrium reconstruction time, and resampling the plasma centroid coordinates and plasma current in a linear interpolation manner to the equilibrium reconstruction time; setting a channel mask for missing channels, and setting a padding mask for samples whose length is less than the preset maximum sequence length, so that missing channels and padding positions do not participate in normalization statistics, attention calculation and training loss calculation.

[0041] Furthermore, the neural network model includes a nineteen-dimensional input projection layer, a learnable position encoding layer, multiple neural network model encoding layers, and a twelve-dimensional output mapping layer; the neural network model encoding layer does not set a causal mask, uses all valid states in the state sequence when generating the poloidal coil current at any time, and excludes filling positions by filling mask.

[0042] Furthermore, the learnable position encoding layer satisfies ;in, This represents the learnable position embedding matrix. Indicates the maximum sequence length. Indicates model dimension, This represents the i-th learnable position vector. Represent the real number field; where the maximum sequence length is... The model dimension is 128. The length of the input sequence is 256. No greater than 128; the i-th state is superimposed with the i-th learnable position vector, and the learnable position embedding matrix is... It is updated together with other model parameters during the behavior clone training process.

[0043] Furthermore, the behavior cloning training employs a mean squared error loss function. ,in, This represents the mean squared error loss function value for behavioral cloning training. This is a binary index set consisting of valid time points and valid coil channels. This represents the index formed by the t-th valid time point and the i-th valid coil channel. For set The number of valid index entries in the database. This represents the current of the i-th coil predicted by the model at the t-th effective time point. This represents the expert current of the i-th coil at the t-th effective time point in the historical discharge.

[0044] Furthermore, the current change rate threshold is set separately for the coil channel and the discharge stage; the flat-top segment is determined by a preset proportion in which the absolute value of the plasma current reaches the absolute value of the maximum plasma current of the discharge and for a preset duration, the current rising segment is before the flat-top segment and the current falling segment is after the flat-top segment; the current change rate threshold of each stage is determined by the quantile of the current change rate of the historical expert waveform of the corresponding stage in the training set.

[0045] Furthermore, the lower limit and upper limit of the amplitude of the i-th coil are denoted as follows: and Execute at the initial moment ;in, This represents the current of the i-th coil after filtering at the initial moment. Indicates the variable Limit to the lower limit and upper limit The clipping function between; for times t not less than 1, execute sequentially. as well as ;in, This represents the intermediate current after being constrained by the rate of change of current. This represents the current of the i-th coil after filtering at time t. This represents the current of the i-th coil predicted by the model at time t. This indicates the discharge stage at time t. This indicates that the i-th coil is in the discharge phase. The current change rate threshold is below. This represents the time interval between the t-th equilibrium reconstruction time and the previous equilibrium reconstruction time.

[0046] Furthermore, step 6 maintains the pressure profile function at the target time. and polar current function The static free boundary magnetic balance is solved using a complete set of poloidal field coils, and the boundary control point error is the root mean square distance between the eight calculated boundary control points and the eight target boundary control points. The wall gap is the minimum distance between the calculated outermost closed magnetic surface and the device limiter.

[0047] This invention also provides a tokamak poloidal field coil feedforward current design system, including a data alignment module, a model training module, a feedforward trajectory generation module, an operational constraint filtering module, a coil mapping module, a physical consistency verification module, and a trajectory output module. The data alignment module aligns historical discharge equilibrium reconstruction data with poloidal field coil current data, using experimentally measured poloidal field coil currents as expert actions to construct state and action training samples. The model training module trains a neural network model with learnable position encoding and without causal masks. The feedforward trajectory generation module generates twelve independent pre-programmed poloidal field coil currents based on state sequences. The operational constraint filtering module performs current amplitude limits and phased current change rate filtering. The coil mapping module maps the twelve currents to a complete set of poloidal field coils according to the device circuit relationships. The physical consistency verification module calls a free boundary equilibrium solver and performs physical consistency verification based on solution convergence, boundary control point error, and wall gap. The trajectory output module outputs the initial feedforward trajectory of the plasma control system when preset criteria are met.

[0048] like Figure 1 and Figure 2 As shown, this invention includes an offline design layer before discharge and a real-time control layer for discharge. The offline design layer includes: constructing a historical discharge database from historical data, training a Transformer neural network model to obtain a behavior cloning module, filtering current amplitude and staged rate of change, verifying magnetic balance consistency, and generating an initial PF feedforward trajectory. The verified trajectory serves as the initial feedforward input to the plasma control system (PCS). After feedforward and feedback control quantity synthesis, PF current control, tokamak plasma, magnetic measurement and real-time balance reconstruction, and state error calculation, the real-time feedback controller corrects the error during discharge based on the results of magnetic measurement and real-time balance reconstruction. Here, PF represents the poloidal field coil, PCS represents the plasma control system, and FreeGSNKE represents the free boundary equilibrium solver.

[0049] Figure 2 In the text, EAST stands for the fully superconducting tokamak experimental device. (Markov state) plasma characteristics Composition, in which, Represents the radial and vertical coordinates of the i-th boundary control point. Represents plasma current. This represents the coordinates of the plasma's center of mass, with the subscript 'c' indicating the center. Expert action trajectory. This represents the current in the twelve-channel poloidal field coil during historical discharges.

[0050] Behavioral cloning strategy is denoted as ,in Indicates model parameters, Represents the input state sequence. Indicates the length of the input sequence; This indicates the action predicted by the model.

[0051] Behavioral cloning training uses the mean squared error (MSE) loss function. ,in, This represents the value of the loss function. This represents the set of binary indices consisting of valid time points and valid coil channels. Represents a set The number of valid index entries in the database. This represents the t-th time point and the i-th coil channel. This indicates the model predicts the current. Indicates the current of historical experts, superscript This represents the expert current in historical discharges.

[0052] Operating constraints include current amplitude constraints. and current change rate constraint ,in, This indicates the coil current used for constraint in the diagram. Indicates the corresponding discharge stage and coil channel The rate of change threshold below, subscript here For stage indexing; This indicates the safety control action after being filtered by current amplitude and rate of change constraints.

[0053] In the physical conformity verification, the fixed plasma profile given by EFIT includes and ,in Indicates polar magnetic flux. This represents the derivative of the pressure profile function with respect to the pole magnetic flux. This represents the derivative of the poloidal current function with respect to the poloidal magnetic flux. FreeGSNKE represents the free boundary equilibrium solver, whose solution equations are written as follows: ,in Denotes the elliptic operator in the Grad-Shafranov equations. Represents the permeability of free space. Represents radial coordinates. EFIT in the diagram. Indicates the balanced reconstruction result, FreeGSNKE This represents the boundary control point results obtained by solving the predicted current using FreeGSNKE.

[0054] For each historical discharge, the moment of equilibrium reconstruction for that discharge is taken as a unified time reference. The poloidal coil currents are aligned using a zero-order hold method; the plasma centroid coordinates and plasma currents are aligned using a linear interpolation method; the boundary control points are directly given by the equilibrium reconstruction results. For missing, filled, or quality-unsatisfactory data, channel masks and time masks are set.

[0055] In one embodiment, the effective proportion of each channel is not less than 95%, the median interval of the equilibrium reconstruction time is less than 0.3 seconds, and each discharge contains at least 20 effective time points. Discharges that pass the quality threshold are divided into training set, validation set, and test set according to the number of discharges. The same discharge belongs to only one of the datasets, and the normalized statistics are calculated only from the training set.

[0056] In this embodiment, Figure 3 The equilibrium reconstruction result of historical discharge 134925 at 10.36 s is used as an example to illustrate the positional relationship between the geometry of the EAST device, the poloidal field coils, the boundary control points, and the plasma centroid. Figure 3 As shown, the vacuum chamber represents the vacuum boundary of the tokamak device, the first wall represents the plasma surface structure inside the vacuum chamber, PF1 to PF14 represent the poloidal field coils, IC1 and IC2 represent the internal coils of the device, and LCFS represents the outermost closed magnetic surface. ) represents the coordinates of the i-th boundary control point, ( The coordinates of the plasma centroid are represented by ). A single state consists of the R and Z coordinates of eight boundary control points, the R and Z coordinates of the plasma centroid, and the plasma current, for a total of nineteen channels. The training target is the twelve poloidal field coil currents (PF1 to PF8 and PF11 to PF14) obtained from experimental measurements during historical discharges. The model output consists of twelve independent pre-programmed currents corresponding to each channel.

[0057] The discharge sequences that pass quality screening do not exceed 128 equilibrium reconstruction time points. Sequences shorter than 128 are padded to 128 at the end, and a padding mask is used to prevent the padded positions from participating in attention and loss calculations. Each 19-dimensional state is mapped to a 256-dimensional state token by a linear input projection layer, and then added element-wise to the corresponding learnable location vector. Figure 4In this context, `token` represents the state token, `padding` represents the padding position, `Linear` represents the linear projection layer, and `input state sequence` represents the input state sequence. This indicates that the input sequence contains There are 19 state channels at each time step. The learnable position vectors are trained together with other model parameters, independent of the physical time of the balanced reconstruction.

[0058] like Figure 4 As shown, the Transformer neural network model contains six pre-normalized encoding layers. Each encoding layer contains an eight-head self-attention network, a feedforward network of dimension 1024, a GELU Gaussian error linear unit activation function, residual connections, and a dropout layer with a dropout rate of 0.1. Figure 4 In this context, LN represents layer normalization, FFN represents feedforward network, dropout represents random deactivation, and norm_first represents pre-layer normalization. Indicates model dimension, This represents the key vector dimension of a single attention head. The encoder output is converted from a linear output mapping layer to twelve-channel normalized current, and then denormalized to practical engineering current units.

[0059] Since the poloidal field coil feedforward trajectory is generated offline in a single operation before discharge, the entire target state for the designed discharge is determined during inference. Therefore, the Transformer neural network model does not use a causal mask. The output at each valid time step uses all valid target states, and the filling positions are excluded by the filling mask.

[0060] Training uses the mask mean square error loss function The effective index set includes channel validity, effective time points, and non-padded locations. The optimizer uses AdamW with an initial learning rate of [missing information]. The weight decay coefficient is The momentum parameters are 0.9 and 0.95, respectively, and the upper bound of the gradient norm is 1.0. Training is performed for 60 cycles, using a one-cycle learning rate scheduler. The warm-up phase accounts for 5% of the total training steps, and the global batch size is 256 shots.

[0061] The model output is first limited according to the allowable current amplitude range of each poloidal field coil. Then, the discharge stage is identified based on the plasma current. When the absolute value of the plasma current reaches 90% of the maximum absolute value of the plasma current of the gun and lasts for no less than 0.3 seconds, the flat-top segment is determined. The current rising segment is before the flat-top segment, and the current falling segment is after the flat-top segment.

[0062] For each coil and each discharge stage, a preset quantile of the absolute value of the rate of change of current is statistically analyzed from the expert waveforms in the training set as a threshold. In one embodiment, the 99.9th quantile is used. Filtering is performed point-by-point in chronological order, and the allowable range of change at the current moment is jointly determined by the current already filtered at the previous moment, the stage threshold, and the interval between adjacent balance reconstruction moments.

[0063] The coil mapping stage converts the twelve independent currents into a complete set of poloidal field coils. In the EAST device embodiment, PF9 is connected in series with PF7, and PF10 is connected in series with PF8; therefore, PF9 carries over the current from PF7, and PF10 carries over the current from PF8. The non-preprogrammed built-in coil currents are set according to the given values ​​in the device machine model file.

[0064] The free boundary magnetic balance calculations in physical consistency verification utilize the device's poloidal field coil geometry, vacuum chamber geometry, and profile functions at the target time. For historical discharge verification, the pressure profile function... and polar current function The equilibrium reconstruction results from the same target time, where Indicates polar magnetic flux. Indicates plasma pressure, This represents the flux function related to the poloidal current; the apostrophe indicates that... Differentiation; for the new discharge scheme, the profile function is provided by a reference discharge or a pre-defined target profile. After the solver converges, according to... Calculate the root mean square distance between the eight boundary control points; where, Indicates the boundary control point error. Indicates the boundary control point number. and They represent the calculated first and second digits respectively. Radial and vertical coordinates of each boundary control point. and They represent the first Radial and vertical coordinates of each target boundary control point. Indicates the goal.

[0065] When the free boundary solver converges, the root mean square distance between boundary control points is not greater than a preset boundary error threshold, and the minimum wall gap is not less than a preset wall gap threshold, the current passes physical consistency verification and is derived according to the channel sequence, engineering units, and time grid specified by the plasma control system. This current is used as the initial feedforward trajectory, and model mismatches and disturbances during the discharge process are corrected by a real-time feedback controller.

[0066] In one EAST data implementation, over 30,000 discharges with balanced reconstruction results were obtained from a historical database. After quality screening, training, validation, and hold-out test sets were formed. During the model selection phase, Transformer neural network models without causal masks, Transformer neural network models with causal masks, Long Short-Term Memory (LSTM) networks, and Multilayer Perceptrons (MLPs) were compared, and settings including learnable position encoding, real-time sinusoidal position encoding, and no position encoding were tested. All schemes were repeatedly trained using eight random seeds under the same data partitioning.

[0067] Under these test conditions, the Transformer neural network model without causal masking and using learnable positional encoding has a mean root mean square error (RMSE) of 0.30 kA and a median coefficient of determination (COP) of 0.987 for the twelve-way coils. When the positional encoding is changed to real-time sinusoidal encoding, the two metrics are 0.31 kA and 0.986, respectively; and without positional encoding, the two metrics are 0.36 kA and 0.984, respectively. For the Transformer neural network model with causal masking, the RMSE ranges from 0.33 kA to 0.34 kA for each scheme, 0.44 kA for the Long Short-Term Memory (LSTM) network, and 0.89 kA to 1.14 kA for the Multilayer Perceptron (MLP). These results are used to determine the model structure of this embodiment.

[0068] like Figure 5 and Figure 6 As shown, the Transformer neural network model used in this embodiment generates twelve poloidal field coil currents simultaneously on the test gun. Figure 5 A timeline comparison of a complete discharge is provided. Figure 6 Provide a scatter plot comparison of predicted values ​​and historical expert values ​​in the test set.

[0069] like Figure 7 As shown, after inputting the constrained predicted current into the free boundary equilibrium solver, the solver converges in the rising, flat-top, and falling segment examples, and the calculated boundary remains close to the target boundary, with minimum wall gaps of approximately 5.2 cm, 7.9 cm, and 4.6 cm, respectively. This result illustrates the implementation of the solution convergence, boundary error, and wall gap criteria in physical consistency verification.

[0070] This invention is not limited to the EAST device. For other tokamak devices that possess historical discharge databases, balance reconstruction data, poloidal coil circuit relationships, and free boundary balance solution models, the state dimension, action dimension, coil mapping relationship, and filtering threshold can be adjusted according to the number of coils, independent pre-programmed channels, boundary control point definitions, and power supply constraints.

[0071] This invention can also be implemented as a software system. This system includes a data alignment module, a model training module, a feedforward trajectory generation module, a runtime constraint filtering module, a coil mapping module, a physical consistency verification module, and a trajectory output module. Each module can be deployed on an experimental data server, a computing server, or an offline scheme design terminal for a plasma control system.

[0072] The data alignment module uses the experimentally measured poloidal coil current as the expert action to generate state and action training samples; the model training module trains a Transformer neural network model behavior clone model with learnable position encoding and without causal masking; the feedforward trajectory generation module generates twelve feedforward currents; the runtime constraint filtering module executes current amplitude and rate of change constraints; the coil mapping module forms a complete coil set; the physical consistency verification module calls the free boundary solver and calculates boundary errors and wall gaps; and the trajectory output module exports the initial feedforward trajectory that meets the preset criteria.

[0073] The above embodiments are used to illustrate the present invention and do not limit the scope of protection of the present invention.

Claims

1. A method for designing the feedforward current of a tokamak poloidal field coil, characterized in that, Includes the following steps: Step 1: Obtain the equilibrium reconstruction data and poloidal coil current data of the historical discharge of the tokamak, align them according to the equilibrium reconstruction time, and construct state and action training samples. Step 2: Use the state sequence consisting of plasma boundary control points, plasma centroid and plasma current as model input, and use the expert action sequence consisting of measured poloidal coil current as training target. Step 3: Use a neural network model with learnable position encoding and without setting a causal mask to perform behavioral cloning training on the training samples to obtain a strategy model that generates a poloidal field coil feedforward current sequence from the state sequence. Step 4: Input the state sequence of the discharge to be designed into the strategy model to generate twelve independent pre-programmed poloidal coil currents offline; Step 5: Limit the amplitude according to the current amplitude range of each coil, identify the current rising segment, flat top segment and current falling segment according to the plasma current, and filter the twelve currents at each time step by step using the corresponding sub-coil current change rate threshold for each stage. Step 6: Map the filtered twelve currents to the complete poloidal field coil set according to the coil circuit relationship of the tokamak device. Input the complete poloidal field coil set into the free boundary equilibrium solver and verify the physical consistency based on the solution convergence, boundary control point error and wall gap. When the preset criteria are met, the filtered twelve currents are determined as the initial feedforward trajectory of the plasma control system.

2. The tokamak poloidal field coil feedforward current design method according to claim 1, characterized in that, The t-th state in the state sequence is Where t represents the equilibrium reconstruction time number, Let represent the t-th state vector, which includes the radial coordinates of the eight boundary control points, the vertical coordinates of the eight boundary control points, the plasma centroid coordinates, and the plasma current; where the coordinates of the k-th boundary control point at time t are... ,in, This represents the radial coordinate of the k-th boundary control point at time t. This represents the vertical coordinate of the k-th boundary control point at time t, and the coordinates of the plasma centroid are... ,in, This represents the radial coordinate of the plasma's center of mass at time t. This represents the vertical coordinate of the plasma mass center at time t, with the subscript c indicating the mass center, and the plasma current is... ,in, The plasma current at time t is represented by PF1 to PF8 and PF11 to PF14, which are twelve independent poloidal coil currents, where PF represents the poloidal coil.

3. The tokamak poloidal field coil feedforward current design method according to claim 1, characterized in that, Step 1 further includes: resampling the coil current to the equilibrium reconstruction time in a zero-order hold manner, and resampling the plasma centroid coordinates and plasma current to the equilibrium reconstruction time in a linear interpolation manner; setting a channel mask for missing channels, and setting a padding mask for samples whose length is less than the preset maximum sequence length, so that missing channels and padding positions do not participate in normalization statistics, attention calculation and training loss calculation.

4. The tokamak poloidal field coil feedforward current design method according to claim 1, characterized in that, The neural network model includes a 19-dimensional input projection layer, a learnable position encoding layer, multiple neural network model encoding layers, and a 12-dimensional output mapping layer. The neural network model encoding layer does not set a causal mask, and uses all valid states in the state sequence when generating the poloidal coil current at any time, and excludes filling positions by filling mask.

5. The tokamak poloidal field coil feedforward current design method according to claim 4, characterized in that, The learnable position encoding layer satisfies ;in, This represents the learnable position embedding matrix. Indicates the maximum sequence length. Indicates model dimension, This represents the i-th learnable position vector. Represent the real number field; where the maximum sequence length is... The model dimension is 128. The length of the input sequence is 256. No greater than 128; the i-th state is superimposed with the i-th learnable position vector, and the learnable position embedding matrix is... It is updated together with other model parameters during the behavior clone training process.

6. The tokamak poloidal field coil feedforward current design method according to claim 1, characterized in that, The behavior cloning training uses a mean squared error loss function. ,in, This represents the mean squared error loss function value for behavioral cloning training. This is a binary index set consisting of valid time points and valid coil channels. This represents the index formed by the t-th valid time point and the i-th valid coil channel. For set The number of valid index entries in the database. This represents the current of the i-th coil predicted by the model at the t-th effective time point. This represents the expert current of the i-th coil at the t-th effective time point in the historical discharge.

7. The tokamak poloidal field coil feedforward current design method according to claim 1, characterized in that, The current change rate threshold is set separately for the coil channel and the discharge stage; The flat-top segment is determined by a preset proportion of the absolute value of the plasma current reaching the absolute value of the maximum discharge plasma current and a preset duration. Before the flat-top segment is the current rising segment, and after the flat-top segment is the current falling segment. The threshold of the rate of change of the sub-coil current in each stage is determined by the quantile of the rate of change of the historical expert waveform current in the corresponding stage in the training set.

8. The tokamak poloidal field coil feedforward current design method according to claim 7, characterized in that, The lower limit and upper limit of the amplitude of the i-th coil are denoted as follows: and Execute at the initial moment ;in, This represents the current of the i-th coil after filtering at the initial moment. Indicates the variable Limit to the lower limit and upper limit The clipping function between; for times t not less than 1, execute sequentially. as well as ;in, This represents the intermediate current after being constrained by the rate of change of current. This represents the current of the i-th coil after filtering at time t. This represents the current of the i-th coil predicted by the model at time t. This indicates the discharge stage at time t. This indicates that the i-th coil is in the discharge phase. The current change rate threshold is below. This represents the time interval between the t-th equilibrium reconstruction time and the previous equilibrium reconstruction time.

9. The tokamak poloidal field coil feedforward current design method according to claim 1, characterized in that, Step 6 maintains the pressure profile function at the target time. and polar current function The static free boundary magnetic balance is solved using a complete set of poloidal field coils, and the boundary control point error is the root mean square distance between the eight calculated boundary control points and the eight target boundary control points. The wall gap is the minimum distance between the calculated outermost closed magnetic surface and the device limiter.

10. A tokamak poloidal field coil feedforward current design system, which implements the tokamak poloidal field coil feedforward current design method according to any one of claims 1-9, characterized in that, The system includes a data alignment module, a model training module, a feedforward trajectory generation module, a runtime constraint filtering module, a coil mapping module, a physical consistency verification module, and a trajectory output module. The data alignment module aligns historical discharge equilibrium reconstruction data with poloidal coil current data, using experimentally measured poloidal coil currents as expert actions to construct state and action training samples. The model training module trains a neural network model with learnable position encoding without causal masks. The feedforward trajectory generation module generates twelve independent pre-programmed poloidal coil currents based on state sequences. The runtime constraint filtering module performs current amplitude limits and phased current change rate filtering. The coil mapping module maps the twelve currents to a complete set of poloidal coils according to the device circuit relationships. The physical consistency verification module calls the free boundary equilibrium solver and performs physical consistency verification based on solution convergence, boundary control point errors, and wall gaps. The trajectory output module outputs the initial feedforward trajectory of the plasma control system when preset criteria are met.

Citation Information

Patent Citations

  • Implementation method, device and equipment of magnetic confinement reaction device and medium

    CN117010314A

  • Tokamak magnetic control system optimization method based on data driving model

    CN119356106A