Method and system for three-dimensional real-time simulation and collaborative control of tokamak plasma
By employing a collaborative control method combining a fast global prediction model and a high-fidelity local analysis model in a tokamak device, the problem of high-precision real-time prediction and control of boundary instabilities such as ELM in a tokamak device was solved, achieving efficient utilization of computing resources and improved early warning capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- COIS (HANGZHOU) ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies struggle to achieve high-precision prediction and control of boundary instabilities such as ELM in tokamak devices while meeting strict real-time constraints. Fast models lack physical constraints and causal analysis, and multi-model schemes lack in-depth information sharing and intelligent scheduling.
A collaborative control method combining a fast global prediction model and a high-fidelity local analysis model is adopted. A multi-rate scheduling strategy is used to use the fast model when the risk is low and to trigger the high-fidelity model when the risk is high. By combining neural operator theory and teacher-guided sampling mechanism, a balance between accuracy and speed is achieved. Physical consistency is ensured through a unified conditional interface and a projection collaboration module.
It significantly improves the prediction accuracy and control reliability of ELM, reduces computational resource consumption, enhances the accuracy and robustness of early warning, ensures causal interpretability and physical consistency, and achieves more than 60% saving of computational resources.
Smart Images

Figure CN122131670A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of three-dimensional real-time simulation and cooperative control methods and systems for tokamak plasma, and more specifically to three-dimensional real-time simulation and cooperative control methods, systems and related transpositions for tokamak plasma. Background Technology
[0002] One of the core challenges in achieving high-performance steady-state plasma confinement in nuclear fusion tokamak devices is the effective prediction and control of boundary instabilities such as Edge Localized Modes (ELMs). Currently, model-based real-time prediction and control require early warning within a millisecond-level time window before ELM events occur, and accordingly actively adjust actuators to suppress or mitigate ELMs.
[0003] However, real-time control of tokamak devices places stringent demands on predictive models: there is a fundamental trade-off between the physical accuracy of predictions, causal interpretability, and computational speed. Existing technologies suffer from the following shortcomings: while high-fidelity models can provide accurate predictions and causal analysis, their computational complexity is high, with a single inference cycle taking far longer than the control cycle; fast models, although fast inference speeds, lack accuracy when dealing with strong nonlinearity and multi-scale turbulence, and lack physical constraints and causal modeling; single model architectures cannot simultaneously meet the differentiated needs of different scenarios; existing multi-model solutions lack a systematic collaborative framework, and there is a lack of deep information sharing and intelligent scheduling among models.
[0004] Therefore, how to significantly improve the prediction accuracy and control reliability of critical events such as ELM while meeting strict real-time constraints is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of the above problems, the present invention is proposed to provide a method and system for three-dimensional real-time simulation and cooperative control of tokamak plasma that overcomes or at least partially solves the above problems.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, embodiments of the present invention provide a method for three-dimensional real-time simulation and cooperative control of tokamak plasma, comprising the following steps: S1: Real-time acquisition of plasma diagnostic data, actuator status, and balance parameters of the tokamak device, and encoding them into a unified format input vector; S2: In each control cycle, the input vector is input to the fast global prediction model to obtain the first plasma three-dimensional physics field prediction result and the first ELM risk assessment result; the first ELM risk assessment result includes at least the ELM hazard level; S3: Based on the first ELM risk assessment result, determine whether the preset triggering condition is met; if the triggering condition is met, execute S4~S5; if the triggering condition is not met, execute S6. S4: Input the input vector into the high-fidelity local analysis model to obtain the second plasma three-dimensional physics field prediction result and the second ELM risk assessment result; the high-fidelity local analysis model is higher than the fast global prediction model in terms of the accuracy of satisfying physical constraints or the causal interpretability. S5: Based on the outputs of steps S2 and S4, generate the final plasma state prediction results and the ELM fusion risk assessment, and generate control commands accordingly to adjust the actuators of the tokamak device; S6: Generate control commands based on the output of step S2 to adjust the actuators of the tokamak device.
[0008] Preferably, the triggering condition in S3 is a combination of any one or more of the following: The ELM risk level in the first ELM risk assessment result exceeds a preset risk threshold; The current control cycle is an integer multiple of the preset heartbeat cycle for enabling the high-fidelity local analysis model.
[0009] Preferably, S5 includes a calibration fusion sub-step: performing temperature scaling calibration and logical weighted fusion on the first ELM risk assessment result and the second ELM risk assessment result to generate the fused ELM risk assessment.
[0010] Preferably, S5 includes a field prediction selection sub-step: the final plasma state prediction result is the second plasma three-dimensional physical field prediction result, or the result after projecting and co-correcting the second plasma three-dimensional physical field prediction result using the output of the fast global prediction model.
[0011] Preferably, the projection co-correction includes one or more of the following operations: Positive constraints are applied to the density and pressure channels in the final plasma state prediction, clamping negative values to zero; An energy upper limit constraint is imposed on the final plasma state prediction, so that the predicted plasma state energy is lower than a preset upper limit. Divergence freedom constraints are applied to the vector field in the final plasma state prediction.
[0012] Preferably, the fast global prediction model is a spectral neural operator, which includes at least: Dense mesh encoders are used to upscale input physics fields to dense latent mesh representations. The spectral neural operator core is used to perform time evolution of the latent grid representation in the frequency domain and integrates an anti-aliasing filter to suppress high-frequency aliasing. Sheaf adhesive layer is used to divide the spatial domain into multiple overlapping subdomains along the circumferential direction, and to make the prediction results of each subdomain consistent in the overlapping area by applying adhesive loss. A decoder is used to restore the glued latent mesh to a physics prediction. The ELM warning head is used to extract global statistical features from the potential grid and output the danger level and remaining time prediction.
[0013] Preferably, the high-fidelity local analysis model is a neural symbolic geometric perception neural operator, which includes at least: The sheaf-like glue consistency regularization module is used to keep the prediction field continuous across overlapping subdomains. A structural causal model is used to call the structural causal model of the high-fidelity local analysis model to perform do-intervention analysis when generating control instructions, so as to evaluate the impact of different control instructions on the risk assessment of the fused ELM. ELM warning head, used to output hazard level and remaining time prediction; The physical hard constraint module is used to apply physical hard constraints on the prediction field by introducing physical residual loss and boundary condition loss based on the drift-reduced magnetohydrodynamic equation during the training and prediction process of neural operators, thereby ensuring the topological conservation of mass, momentum, energy and magnetic field.
[0014] Secondly, embodiments of the present invention provide a plasma control system for a tokamak device, used to execute the aforementioned three-dimensional real-time simulation and cooperative control method for tokamak plasma, including: Multiple plasma diagnostic sensors are used to collect plasma diagnostic data; Multiple plasma actuators, with real-time acquisition of actuator status and balance parameters; A multi-rate scheduling computing device, communicatively connected to the diagnostic sensors and actuators, is configured with: The first processing unit is equipped with the fast global prediction model and is used to execute the S2 step. The second processing unit is equipped with the high-fidelity local analysis model, which is used to determine whether the preset triggering conditions are met based on the first ELM risk assessment results; when the triggering conditions are met, the S4 step is executed. The scheduling and fusion module is used to execute step S5. The control command generation module is used to generate control commands based on the output of the fast global prediction model or the output of the scheduling and fusion module, so as to adjust the actuators of the tokamak device.
[0015] Preferably, the system further includes a unified conditionalization interface module, used to encode the actuator states and balance parameters from different sources into input vectors with unified dimensions, and simultaneously provide them to the fast global prediction model and the high-fidelity local analysis model.
[0016] Preferably, the system is integrated with the tokamak device through a three-layer network architecture, wherein: The equipment layer is used to connect plasma diagnostic sensors and actuators for data acquisition and control command issuance. The control layer is used to load the multi-rate scheduling computing device and perform internal data communication. The monitoring layer is used for system status monitoring, parameter configuration, and / or data archiving.
[0017] The specific beneficial effects of the above-mentioned technical solutions provided in the embodiments of the present invention include at least the following: Regarding the optimal balance between accuracy and speed, the system employs a multi-rate scheduling strategy. In steady-state conditions, it uses a fast global prediction model, while triggering a high-fidelity local analysis model during high-risk events, achieving adaptive allocation of computing resources. Compared to always running the high-fidelity model, the collaborative system can save over 60% of computing resources; and compared to using only the fast model, the collaborative system significantly improves prediction accuracy for high-risk events.
[0018] In terms of generalization ability, both models are based on neural operator theory, exhibiting invariance to discretization methods and the ability to generalize to new geometric configurations. The teacher-guided sampling mechanism transfers risk patterns learned by the fast global prediction model to the high-fidelity local analysis model, further enhancing cross-condition generalization ability. A unified conditional interface ensures consistent responses of both models to control inputs, simplifying system integration work for cross-device migration.
[0019] Regarding ELM early warning capabilities, the hazard level and remaining time outputs from both models are integrated to improve the accuracy and robustness of early warnings. The rapid global prediction model provides quick initial warnings, while the high-fidelity local analysis model provides high-precision confirmation and refinement. The combination of the two reduces the false alarm and missed alarm rates.
[0020] Regarding physical consistency guarantees, the projection coordination module ensures that the fused predictions satisfy fundamental physical constraints such as divergence freedom, positive constraints, and energy targets. Even if some inconsistencies are introduced during the fusion process, the projection operation can correct them, improving the physical reliability of the system.
[0021] Regarding causal interpretability, a high-fidelity local analysis model of structural causality can be invoked for do-intervention analysis when needed, providing decision support based on causality rather than correlation.
[0022] In terms of adaptive resource allocation, the computational intensity is dynamically adjusted based on the real-time risk level to maximize efficiency while ensuring safety. The risk threshold and heartbeat cycle can be configured according to the device's safety requirements and available resources, providing a flexible accuracy-efficiency trade-off mechanism. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0024] Figure 1 This is a diagram illustrating the overall architecture of the collaborative system of the fast global prediction model and the high-fidelity local analysis model provided in this embodiment of the invention. Figure 2 A multi-rate runtime scheduling flowchart provided for embodiments of the present invention; Figure 3 The diagram illustrates the teacher-guided sampling and risk map biasing mechanism provided in this embodiment of the invention, showing the process of generating a spatial risk map from the hazard output of PlasmaFusion Master and combining it with gradient bias terms to form a point sampling distribution.
[0025] Figure 4 The diagram illustrates the calibration fusion head structure and weight learning provided in this embodiment of the invention, showing the temperature scaling calibration, dynamic weight generation of the fusion network, and the weighted fusion process of field prediction and risk indicators.
[0026] Figure 5 The flowchart of the projection coordination module provided in this embodiment of the invention illustrates the sequential operation of divergence projection, positive projection, and energy target projection, and their correction effect on fusion prediction.
[0027] Figure 6 The unified conditionalization interface design diagram provided for embodiments of the present invention illustrates the structure of the actuator encoder and the balance encoder, and how the conditional vector is simultaneously injected into the conditionalization module of the two models.
[0028] Figure 7 The schematic diagram of the closed-loop integration of the collaborative system and the tokamak control system provided in the embodiments of the present invention illustrates the complete closed-loop process from diagnostic data acquisition to control command issuance, as well as the position and role of the collaborative system in it.
[0029] Figure 8 The Data tab interface diagram provided in this embodiment of the invention shows the layout of the plasma parameter configuration panel, the dual-model shared data generation control module, and the physics field preview and histogram visualization module.
[0030] Figure 9 The Training tab interface diagram provided in this embodiment of the invention shows the phased training configuration module (selection and parameter configuration of phases 1-4) and the two-column comparison view displaying Sheaf training metrics, NS training metrics, fusion module training metrics, and end-to-end fine-tuning metrics.
[0031] Figure 10 The Evaluation tab interface diagram provided in this embodiment of the invention shows a three-column layout (left column: Sheaf individual evaluation results, central column: integrated evaluation results and synergistic benefits, right column: NS individual evaluation results), a top evaluation configuration module, a central integration control and parameter configuration module, and a bottom integration detailed output area.
[0032] Figure 11 The Deployment tab interface diagram provided in this embodiment of the invention shows the dual-model export configuration module (joint export of Sheaf, NS, and fusion modules) and the multi-rate scheduling service deployment control module (service configuration, scheduling parameters, projection collaboration configuration, and service health monitoring).
[0033] Figure 12 The Sandbox tab interface diagram provided in this embodiment of the invention shows a three-column layout (left actuator control module, central collaborative status monitoring module, and right prediction result comparison display module), which particularly highlights the real-time visualization of the dual-model collaborative working process, the triggering historical timeline, and resource efficiency monitoring. Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] This invention discloses a three-dimensional real-time simulation and cooperative control method for tokamak plasma. The invention establishes two complementary perspectives: a fast global prediction model (PlasmaFusion Master) provides fast and smooth global predictions, while a high-fidelity local analysis model (PlasmaFusion Pilot) provides high-fidelity local physics analysis. The method includes the following steps: S1: Real-time acquisition of plasma diagnostic data, actuator status, and balance parameters of the tokamak device, and encoding them into a unified format input vector; S2: In each control cycle, the input vector is fed into the fast global prediction model to obtain the first plasma three-dimensional physics field prediction result and the first ELM risk assessment result; the first ELM risk assessment result includes at least the ELM hazard level; S3: Based on the first ELM risk assessment result, determine whether the preset trigger conditions are met; if the trigger conditions are met, execute S4~S5; if the trigger conditions are not met, execute S6. S4: Input the input vector into the high-fidelity local analysis model to obtain the second plasma three-dimensional physics field prediction result and the second ELM risk assessment result; the high-fidelity local analysis model is superior to the fast global prediction model in terms of the accuracy of physical constraint satisfaction or causal interpretability. S5: Based on the outputs of steps S2 and S4, generate the final plasma state prediction results and the ELM fusion risk assessment, and generate control commands accordingly to adjust the actuators of the tokamak device; S6: Generate control commands based on the output of step S2 to adjust the actuators of the tokamak device.
[0036] like Figure 1 The diagram illustrates the parallel structure of the two models and the data flow relationship during fusion. It's important to note that the PlasmaFusion Master acts as a fast propagator in the collaborative system, designed to provide rapid and stable global field prediction and ELM risk assessment within each control cycle. As a fast propagator, the PlasmaFusion Master runs once per control cycle, providing a globally smooth field prediction suitable for rapid situational awareness and outputting the ELM hazard level. and remaining time estimation The inference latency is controlled within three milliseconds to meet high-frequency control requirements. Its spectral neural operator architecture efficiently processes global features in the frequency domain, the anti-aliasing filtering mechanism ensures the smoothness of prediction, and the Sheaf glue layer guarantees consistency across multiple regions.
[0037] PlasmaFusion Pilot acts as a high-fidelity analyzer in the collaborative system, designed to provide accurate local physics analysis and causal interpretability when needed. As a high-fidelity analyzer, PlasmaFusion Pilot is triggered on demand according to a scheduling strategy, providing local physical details and causal interpretability, supporting do-intervention analysis of structural causal models, and providing accurate physical constraint predictions in high-risk regions. Its topology feature extraction module captures topological changes in the physical field, the structural causal model supports causal analysis of control actions, and the projection module ensures that predictions meet strict physical constraints.
[0038] The complementarity of the two models is reflected in several dimensions. In terms of operational frequency, PlasmaFusion Master provides continuous situational awareness with each run, while PlasmaFusion Pilot is triggered on demand to avoid unnecessary computational overhead. Regarding prediction range, PlasmaFusion Master focuses on the smooth evolution of the global field, while PlasmaFusion Pilot focuses on local details in high-risk regions. In terms of physical constraints, PlasmaFusion Master applies physical knowledge using soft constraints and regularization, while PlasmaFusion Pilot uses projection and hard constraints to ensure strict physical consistency. In terms of causal analysis, PlasmaFusion Master lacks causal inference capabilities, while PlasmaFusion Pilot's structural causal model supports do-intervention analysis and counterfactual inference. In terms of applicable scenarios, PlasmaFusion Master is suitable for steady-state monitoring and routine control, while PlasmaFusion Pilot is suitable for high-risk assessment and control decision support.
[0039] This complementary design enables the collaborative system to dynamically allocate computing resources based on real-time status: during low-risk steady-state operation, the fast PlasmaFusion Master is sufficient; when a potential risk is detected, the high-fidelity PlasmaFusion Pilot is triggered for precise analysis, and the collaboration between the two achieves an optimal balance between accuracy and speed.
[0040] The specific implementation architectures of the two models are given below: The fast global prediction model PlasmaFusion Master is a spectral neural operator focused on fast global prediction, which includes at least: Dense mesh encoders are used to upscale input physics fields to dense latent mesh representations. The spectral neural operator core is used to perform time evolution of the latent grid representation in the frequency domain and integrates an anti-aliasing filter to suppress high-frequency aliasing and Gibbs oscillations. Sheaf adhesive layer is used to divide the spatial domain into multiple overlapping subdomains along the circumferential direction, and to make the prediction results of each subdomain consistent in the overlapping area by applying adhesive loss. A decoder is used to restore the glued latent mesh to a physics prediction. The ELM warning head is used to extract global statistical features from potential grids and output the hazard level and remaining time prediction.
[0041] The prediction process for the aforementioned architecture specifically includes: First, the system receives physical field data (such as density, temperature, and electric potential), geometric point sets, actuator vectors (such as heating power and gas injection rate), and equilibrium parameters (such as edge safety factor and cross-sectional elongation ratio). The physical field data is converted into a high-dimensional latent representation space using a dense grid encoder; the equilibrium parameters are then converted into condition vectors by an equilibrium encoder, providing a basis for subsequent operational condition sensing.
[0042] After obtaining the latent representation, the data enters the core of the spectral neural operator. This core transforms the data to the frequency domain through Fourier layers, performs nonlinear operations, and introduces an anti-aliasing filter to effectively suppress high-frequency aliasing. A multi-layer Fourier layer stacked structure is typically used to deeply capture the complex nonlinear characteristics in the evolution of the physical field.
[0043] To ensure global consistency of predictions across different regions in the complex geometry of a tokamak, a Sheaf glue layer is introduced. This layer divides the spatial domain into multiple overlapping subdomains along the circumferential direction, extracts data from the overlapping regions through a constraint mapping, and uses a glue loss function to constrain the consistency of adjacent subdomains in the overlapping regions, thereby avoiding non-physical jumps at the region boundaries.
[0044] The latent mesh, after undergoing consistency constraints, is then restored to the physical field space by the decoder. To further ensure the physical rationality of the prediction results, the system performs post-processing through a projection and repair module: positive projection ensures that density, pressure, etc., are non-negative, divergence-free projection ensures the divergence-free nature of the vector field, and energy target projection and soft energy upper limit are combined to prevent energy divergence. Boundary constraints are also satisfied through boundary condition projection.
[0045] While the physical field evolves, the ELM early warning head compresses the latent representation into a feature vector through global pooling and uses a multilayer perceptron to output the ELM hazard level and remaining time prediction. In addition, through the equilibrium conditionalization mechanism, equilibrium parameter information is injected into the latent representation space, enabling the model to dynamically adjust its prediction behavior according to different plasma equilibrium states, thus possessing stronger operational condition awareness capabilities.
[0046] Finally, the corrected predicted physics field, ELM hazard level, and ELM remaining time prediction are output.
[0047] PlasmaFusion Master's advantages lie in its fast inference speed and stable global prediction capabilities, making it suitable for real-time situational awareness in high-frequency control scenarios.
[0048] The high-fidelity local analysis model PlasmaFusion Pilot is a neural symbolic geometric perception neural operator, which includes at least: The topological feature extraction module based on topological data analysis extracts topological invariants such as Betti number and persistent homology from the physical field. The topological features are injected into the input side or spectral propagation side of the neural operator backbone through feature splicing, modulation or attention guidance, and can be used as regularization terms in training to constrain the prediction results to be consistent with the real physical field in terms of topological structure. The neural operator core is used to learn the mapping from the current field and the actuator to the prediction field; The sheaf-like glue consistency regularization module is used to keep the prediction field continuous across overlapping subdomains. The structural causal model is used to perform do-intervention analysis by calling the structural causal model of the high-fidelity local analysis model when generating control instructions, in order to assess the impact of different control instructions on the risk assessment of the fused ELM. ELM warning head, used to output hazard level and remaining time prediction; The physical hard constraint module is used to apply physical hard constraints on the prediction field by introducing physical residual loss and boundary condition loss based on the drift-reduced magnetohydrodynamic equation during the training and prediction process of neural operators, thereby ensuring the topological conservation of mass, momentum, energy and magnetic field.
[0049] The feature extraction and neural operator injection process specifically includes: Gradient calculation and statistics are performed on the scalar field in the decoded 3D physical field or potential mesh to generate a critical point statistical vector containing field value histograms and gradient histograms; When abnormal operating conditions are detected, based on the sampled point cloud and Rips complex, the continuous homology features are calculated to obtain the topological invariant vectors representing the connected components and loop structure. The critical point statistical vector is fused with the continuous homology feature vector and mapped into a unified topological feature vector through a multilayer perceptron. By utilizing a unified topological feature vector, the spectral domain layer output of the neural operator is dynamically scaled and translated through a feature-by-feature linear modulation mechanism.
[0050] Specifically, the physical hard constraints are implemented through the following loss terms: The residual loss terms of the continuity equation, the vorticity equation, and the pressure equation are used to constrain the evolution of plasma density, velocity, and pressure to conform to the laws of fluid dynamics conservation. The helicity penalty loss term is used to constrain the topological conservation of the predicted magnetic field in the global integral sense; Boundary condition loss term, used to enforce the satisfaction of given physical boundary conditions on the boundaries of the computational domain.
[0051] PlasmaFusion Pilot's advantages lie in its high-fidelity physical constraints and causal interpretability, making it suitable for high-risk scenarios that require precise analysis.
[0052] This invention divides the overall process into a training phase and an inference phase, with fundamental differences in the data flow and module interaction methods between the two phases. Specifically: The training phase is divided into three sub-phases: The single-model independent training sub-stage involves PlasmaFusion Master and PlasmaFusion Pilot being trained independently, each optimizing its own loss function. In this sub-stage, both models use the same training dataset but do not interact. PlasmaFusion Master optimizes the data fitting loss, physical residual loss, glue loss, and ELM loss; PlasmaFusion Pilot optimizes the data fitting loss, physical residual loss, topological loss, structural causality loss, and ELM loss. The training dataset contains the physical field time series, actuator state series, equilibrium parameters, and ELM event labels from historical discharge data. The ELM event labels include information such as whether each snapshot is in the ELM precursor period and the remaining time until the next ELM outbreak. These labels are typically obtained by analyzing physical quantities such as edge pressure gradients and magnetic perturbation signals in historical discharge data, combined with actual observed ELM outbreak timestamps.
[0053] Teacher-guided risk weight generation sub-stage: such as Figure 2 As shown, this demonstrates the process of generating a spatial risk map from the hazard output of PlasmaFusion Master and combining it with gradient bias terms to form a collocation sampling distribution. Its function is to generate a spatial risk weight map using ELM event labels in the training dataset. This risk weight map is applied as a static weight factor to the physical residual evaluation of PlasmaFusion Pilot, so that the latter can concentrate computational resources on the high-risk areas that require the most accurate physical constraints during the training process.
[0054] Specifically, for each sample in the training set, a risk weight is calculated based on its ELM label (whether it is in the ELM precursor stage and the remaining time before the ELM outbreak). The formula is ,in This is an indicator function for the ELM precursor stage. It takes a value of 1 when the sample is in the ELM precursor stage, and 0 otherwise. The remaining time (in control periods) before the ELM outbreak, as labeled in the training data, is incremented by 1 to prevent division by zero. The design logic of this formula is that samples in the ELM precursor phase and those closer to the ELM outbreak time have higher risk weights. These risk weights are then normalized and applied to the physical residual loss; the normalization formula is as follows: This ensures the maximum value of the weight is 1. This risk weight is used as a static weight factor in the calculation of the physical residual loss during the training of PlasmaFusion Pilot. The weighted residual loss is defined as... ,in For a point in space The physical residuals calculated at the point (such as the residuals of equations for conservation of momentum, conservation of energy, and evolution of magnetic fields). The total number of spatial points is represented by this value. By introducing risk weights, the residuals in high-risk regions are given higher weights, making the PlasmaFusion Pilot training focus more on potential ELM triggering regions. This weighting strategy enables the model to learn to more strictly satisfy physical constraints in high-risk regions during training, resulting in higher prediction accuracy for ELM precursor structures during the inference phase. It is important to emphasize that the risk weights at this stage are calculated based on the real ELM labels in the training dataset, rather than the real-time predictions from the PlasmaFusion Master.
[0055] The fusion module training sub-phase: After the two models have been trained independently, their weights are frozen, and only the parameters of the calibration fusion head are trained. This sub-phase uses validation set data to optimize the temperature parameters, fusion weights, and fusion bias by minimizing the fusion loss, consistency loss, and calibration loss. At this point, PlasmaFusion Master and PlasmaFusion Pilot perform forward propagation on the validation set samples, outputting their respective field predictions and risk indicators. The fusion module learns how to optimally combine these outputs.
[0056] Optionally, the training phase may also include an end-to-end fine-tuning sub-phase: unfreezing the parameters of all modules and jointly optimizing them with a smaller learning rate to further improve the synergistic effect.
[0057] Each of the above training sub-stages has a different loss function and optimization objective. These are explained in detail below: During the single-model training phase, PlasmaFusion Master and PlasmaFusion Pilot are trained independently. The loss function of PlasmaFusion Master is... The definitions of data loss, physical residual loss, glue loss, and ELM loss are the same as when using the model alone. The loss function of PlasmaFusion Pilot is... Topological loss Accuracy of constrained topological features, structural causality loss Constrain the consistency of the causal model.
[0058] During the training phase of the fusion module, the weights of both models are frozen, and only the parameters of the calibration fusion head are trained. The collaborative loss function is... Fusion loss Measuring the error between the fused prediction and the actual field. Consistency loss. This measures the consistency of predictions between the two models in overlapping regions, encouraging them to produce similar results in areas where they share common predictions. Calibration loss. The degree to which the confidence level of the prediction matches the actual accuracy after calibration is measured is by the expected calibration error or a similar calibration metric.
[0059] During the end-to-end fine-tuning phase, the parameters of all modules are jointly optimized, and the total loss function is: End-to-end fine-tuning uses a smaller learning rate to optimize synergistic effects while maintaining the performance of individual models.
[0060] The training strategy also includes optimization of multi-rate scheduling parameters. Risk threshold. and heart rate cycle The accuracy-efficiency tradeoff of different parameter combinations can be determined by evaluating them on a validation set. Lower thresholds and shorter cycles offer higher security but consume more computational resources, while higher thresholds and longer cycles save resources but may delay response to risks. The optimal parameters depend on the security requirements and available computational resources of the specific device.
[0061] The goal of the inference phase is to rapidly generate physical field predictions and ELM risk assessments based on current diagnostic data during the real-time operation of the tokamak, providing support for control decisions. During the inference phase, PlasmaFusion Master and PlasmaFusion Pilot run independently and in parallel. Figure 2 The diagram illustrates the execution sequence of PlasmaFusionMaster, trigger condition judgment, on-demand operation of PlasmaFusion Pilot, and fusion and projection operations within each control cycle. The data flow during the inference phase is as follows: S100: Data Acquisition and Conditional Coding: Acquiring the current moment from the tokamak diagnostic system. physical field Geometric point sets Obtain actuator vectors from the control system The equilibrium parameters are obtained from the equilibrium reconstruction module. The actuators and equilibrium parameters are encoded into condition vectors through a unified conditionalization interface. ,in Encode the actuator. Encode the balancing parameters.
[0062] S200: PlasmaFusion Master Real-Time Prediction: In each control cycle, PlasmaFusion Master receives diagnostic data (physical field, geometric point set, actuator vector, equilibrium parameters) at the current moment, performs forward propagation, and outputs a fast field prediction. Risk level and remaining time This step is executed every time during the inference phase, with a delay of approximately 3ms.
[0063] S300: Trigger Condition Judgment and On-Demand Operation of PlasmaFusion Pilot: Employing a multi-rate runtime scheduling mechanism, which serves as the runtime control mechanism for the cooperative system, it determines whether to trigger PlasmaFusionPilot within each control cycle. The design goal of this mechanism is to minimize computational resource consumption while ensuring prediction accuracy, achieving adaptive resource allocation. The trigger condition for PlasmaFusion Pilot is based on a logical OR relationship between a risk threshold and the heartbeat cycle. The trigger judgment formula can be expressed as: when the risk level... Exceeding the risk threshold Triggered at time, or when time step Heartbeat cycle Triggered when the value is an integer multiple of the threshold; otherwise, not triggered. Risk threshold. The typical value range is 0.3 to 0.5. This threshold is determined based on the device's safety margin and computational resource constraints. A lower threshold means triggering PlasmaFusionPilot more frequently to achieve higher safety, while a higher threshold means triggering it less often to conserve computational resources. Heartbeat cycle The typical value range is 10 to 50 steps, ensuring that PlasmaFusion Pilot is run periodically, even during periods of sustained low risk, to update the system status and detect potential gradual risks.
[0064] Runtime process in each control cycle Perform the following steps in order. First, run PlasmaFusion Master, taking the current state and condition vector as input, and outputting a fast field prediction. and level of danger and remaining time Then, the triggering conditions are checked to determine if the risk level exceeds a threshold or if a heartbeat cycle has been reached. If the triggering conditions are met, PlasmaFusion Pilot is run, using a teacher-guided risk weighting mechanism to generate a risk weighting graph. The current state, condition vector, and risk weights are input, and a high-fidelity field prediction is output. and level of danger and remaining time This step adds an extra delay of approximately 3ms. At this point, field prediction selects to use the high-fidelity output of PlasmaFusion Pilot. The ELM risk index generates a fusion risk level by combining the outputs of two models through a calibration fusion head. and remaining time for fusion If the triggering condition is not met, the output of the PlasmaFusion Master will be used directly as the final field prediction. The ELM risk metrics also directly use the output of PlasmaFusion Master. and Next, the final field prediction is physically consistent through a projection coordination module, applying positive projection and energy ceiling projection. Finally, the final prediction and fused risk indicators are passed to the control strategy module for control decisions.
[0065] The multi-rate scheduling strategy enables the collaborative system to dynamically adjust computational intensity based on real-time risk levels. During low-risk steady-state operation, only PlasmaFusion Master runs, with an inference latency of approximately 3ms. During high-risk periods, both models run simultaneously and are fused, resulting in an inference latency of approximately 6ms. Under typical tokamak conditions, by appropriately setting risk thresholds and heartbeat cycles, this embodiment achieves the following performance metrics: steady-state inference latency (PlasmaFusion Master only) < 3ms, high-risk inference latency (PlasmaFusion Master plus PlasmaFusion Pilot) < 6ms, mean absolute error of fused field reconstruction < 3%, and ELM early warning accuracy > 95%, saving over 60% of computational resources compared to always running PlasmaFusion Pilot.
[0066] It is important to emphasize that during the inference phase, the input data for PlasmaFusion Master and PlasmaFusion Pilot is the same. They run in parallel or selectively, and each independently makes predictions about the current state.
[0067] S400: Calibration Fusion and Projection Coordination: If the PlasmaFusion Pilot is triggered, the outputs of the two models are combined through the calibration fusion head to generate a fusion field prediction and a fusion risk index; then, physical constraints are applied through the projection coordination module to output the final prediction. If the PlasmaFusion Pilot is not triggered, the output of the PlasmaFusion Master is used directly as the final prediction.
[0068] S401: The function of the calibration fusion head is to optimally combine the outputs of PlasmaFusion Master and PlasmaFusion Pilot to generate fusion prediction results. This module employs a selective fusion strategy, such as... Figure 4 The diagram illustrates the temperature scaling calibration, dynamic weight generation of the fusion network, and the weighted fusion process of field predictions and risk metrics. For field predictions, the output of either PlasmaFusion Master or PlasmaFusion Pilot is selected based on the triggering conditions; for ELM risk metrics, the calibration outputs of the two models are combined through a logical fusion network. This module receives field predictions from both models. and (When PlasmaFusion Pilot is triggered) and ELM risk indicators Output the final field prediction and integration risk indicators .
[0069] Temperature scaling is a commonly used calibration technique in machine learning, used to adjust the confidence distribution of model outputs. In this invention, temperature scaling is applied to the ELM risk logit outputs of two models. The calibrated risk logit is defined as... and ,in and The temperature parameter is a learnable parameter. A temperature parameter greater than 1 will smooth the predicted distribution, while a temperature parameter less than 1 will sharpen the predicted distribution. The temperature parameter is optimized by minimizing the calibration loss on the validation set, which is typically expressed as binary cross-entropy or negative log-likelihood.
[0070] The selective fusion strategy for field prediction is based on the triggering state of the PlasmaFusion Pilot. When the PlasmaFusion Pilot is not triggered, the fast field prediction of the PlasmaFusion Master is used directly. This ensures low-latency real-time performance. When PlasmaFusion Pilot is triggered, its high-fidelity field prediction is used preferentially. This selective strategy avoids the physical inconsistencies that weighted fusion may introduce, while ensuring that the highest quality predictions are used at critical moments.
[0071] The logical fusion of ELM risk indicators combines the calibrated logit outputs of two models using a lightweight linear model. The fused logit is defined as... ,in , and These are learnable fusion parameters. The input features of the fusion model may include the calibration logit and the logit difference between the two models. and the absolute value of the logit difference These features enable the fusion model to dynamically adjust the fusion weights based on the consistency and differences between the two models. The hazard probability after fusion is calculated using the Sigmoid function: The remaining time fusion adopts a conservative strategy, taking the minimum value predicted by the two models: This ensures that we remain highly vigilant against impending ELM events.
[0072] The parameters for calibrating the fusion head include temperature parameters. and fusion weight and and fusion bias These parameters are optimized after single-model training by freezing the weights of both models and minimizing the fusion loss on the validation set. The fusion loss uses a binary cross-entropy loss, aiming to maximize the prediction accuracy and calibration quality of the fusion model for ELM events.
[0073] S402: The projection coordination module ensures that the fusion prediction meets basic physical constraints. Its operation is performed after calibration fusion and before the final output. This module utilizes the projection capabilities of PlasmaFusion Pilot to correct potential physical inconsistencies in the fusion prediction. The input is the fusion field prediction. The output is the physically consistent final prediction. .like Figure 5 The diagram illustrates the sequential operations of divergence projection, positive projection, and energy target projection, and their effect on correcting the fusion prediction. Specifically, the projection coordination module includes the following core operations: Positive projection coordination is required for physical quantities that must be non-negative. Plasma density and pressure must be physically positive; any negative values that may arise during the fusion process need to be corrected. The projection operation corrects negative values to zero using a clamping function, the specific formula of which is... and This operation ensures the physical acceptability of the final prediction. The channel index for positive projection is configurable, typically configured to apply positive constraints to the density channel (channel 0) and pressure channel (channel 7), with the minimum threshold usually set to 0.
[0074] Energy cap projection is used to prevent energy divergence or anomalous growth in multi-step rolling forecasts. When an energy cap is specified... First, calculate the total energy predicted by fusion. Then determine if it exceeds the upper limit. Then the state field is rescaled using a scaling factor, specifically as follows: Otherwise, keep the original value. The upper limit of energy can be determined based on historical data statistics or set according to the stability analysis of the physical model. The typical range is 1.5 to 3 times the initial energy.
[0075] In scenarios requiring stricter physical constraints, divergence projection cooperation can be optionally implemented. Divergence projection addresses divergence-free constraints on vector fields; for magnetic fields or velocity fields of incompressible fluids, the divergence should be zero. The projection operation is performed by solving the Poisson equation. Obtaining scalar potential Then calculate The corrected vector field strictly satisfies the divergence-free condition. This operation can be selectively enabled when computational costs are high.
[0076] These projection operations can be combined sequentially, typically in the following order: first, positive projection is performed to ensure positive constraints on physical quantities; then, energy upper limit projection is performed to control the total energy level; and optionally, divergence projection is performed last to eliminate non-physical divergence components. The projection coordination module ensures that even if some inconsistencies are introduced during calibration fusion, the final output still meets the basic physical constraints, improving the reliability and physical credibility of the coordinated system.
[0077] S500: Control Decision and Actuator Adjustment: Transmits the final forecast and risk indicators to the control strategy module (such as the model predictive controller), calculates the actuator adjustment amount, and issues control commands.
[0078] As can be seen from the above, the core difference between the training and inference phases lies in the data source and the module interaction method: During the training phase, risk weights are generated based on the real ELM labels of the training dataset and are used to guide the physical residual evaluation of PlasmaFusion Pilot; the two models are trained independently and there is no real-time sequential dependency.
[0079] During the inference phase, PlasmaFusion Master and PlasmaFusion Pilot run in parallel or selectively depending on the triggering conditions. They receive the same real-time diagnostic data, perform forward propagation independently, and combine their outputs through the fusion module. At this time, there is no dynamic generation of risk weights, and the two models run independently.
[0080] The overall data flow of the collaborative system can be described as follows: Input includes time... physical field Geometric point sets and executor vector These inputs are first encoded into condition vectors through a unified conditionalization interface. The conditional vector is simultaneously input into both PlasmaFusion Master and PlasmaFusion Pilot; the former outputs a fast prediction at each step. and level of danger and remaining time The latter triggers high-fidelity prediction output on demand based on the scheduling strategy. and level of danger and remaining time When the PlasmaFusion Pilot is triggered, the output of the PlasmaFusion Master biases the physical collocations of the PlasmaFusion Pilot through a teacher-guided sampling mechanism. The outputs of both are then combined into a fused prediction via a calibration fusion head. Finally, the projection coordination module ensures physical consistency and outputs the final prediction. And fusion risk indicators. When PlasmaFusion Pilot is not triggered, the output of PlasmaFusion Master is directly used as the system output.
[0081] In the data flow described above, both models share the same symbol definitions: Represents a physical field. Represents a geometric point set, Represents the executor vector. The risk level is represented by logit. Indicates an estimate of remaining time. Superscript and These represent the outputs from PlasmaFusion Master and PlasmaFusion Pilot, respectively, with subscripts... and These represent the results after fusion and after projection correction, respectively.
[0082] Both models in the cooperative system need to receive actuator inputs and equilibrium parameters as conditional information to support responses to control actions and generalization to different equilibrium configurations. The conditional inputs consist of two parts: an actuator vector and an equilibrium parameter vector.
[0083] Executor Vector Includes heating power Gas injection rate Resonant magnetic disturbance current These are control variables that directly affect the plasma state evolution. The equilibrium parameter vector includes the edge safety factor. Cross-sectional elongation ratio Triangle deformation degree Normalized specific pressure These are geometric and physical parameters that define the equilibrium configuration of the plasma.
[0084] In the basic implementation, PlasmaFusion Master and PlasmaFusion Pilot process conditional inputs independently. PlasmaFusion Master maps equilibrium parameters to conditional vectors via its internal equilibrium encoder and injects them into the model's latent representation through direct addition or the FiLM mechanism. PlasmaFusion Pilot processes actuator inputs through its structural causal model's actuator encoder and equilibrium parameters through its equilibrium encoder. Both models receive input data in the same format (physics, equilibrium parameters, actuator vectors), but each uses an independent encoder for processing. This design allows each model to optimize its conditionation based on its own architectural characteristics, maintaining independence during both training and inference phases.
[0085] As an optional improved implementation, a unified conditional interface can be introduced to further enhance the coordination between the two models. For example... Figure 6 The diagram illustrates the structure of the actuator encoder and the balance encoder, and how condition vectors are simultaneously injected into the conditionation modules of both models. The core idea of the unified conditionation interface is to allow both models to share the same condition vector encoder, including the actuator encoder. and balanced encoder The unified condition vector is defined as follows: ,in For the executor condition vector, This is a balanced condition vector. This unified condition vector is simultaneously input into the conditionation modules of both models, and injected into the model's internal representation via the FiLM mechanism or other conditionation methods.
[0086] The advantage of a unified conditionalization interface lies in ensuring that both models produce consistent responses to the same control input, simplifying system integration, and avoiding inconsistencies caused by different conditionalization methods. During training, the parameters of the shared encoder can be jointly optimized or optimized separately and then shared; during inference, the same conditional vector ensures better consistency in the outputs of both models. However, the unified conditionalization interface also increases the coupling between models, requiring additional coordination in training strategies and architecture design. Therefore, this interface can be considered an optional improvement, and its activation should be chosen based on the specific application scenario.
[0087] In one embodiment, a decision-making strategy is introduced based on the fusion probability to transform risk scores into actionable alert decisions, while supporting multi-timescale ELM risk assessment.
[0088] (1) Hysteresis strategy to avoid oscillation. To prevent alarm jitter caused by frequent oscillations of the fusion probability near the threshold, a hysteresis strategy is adopted: Alarm trigger threshold:
[0089] Alarm shutdown threshold:
[0090] Minimum alarm interval: Step (5ms) When fusion probability First time exceeding An alarm is triggered when the probability drops to a certain level, and the alarm state remains in effect until the probability drops to a certain level. The following applies: There must be at least an interval between two alarms. step.
[0091] (2) CUSUM persistence detection. The one-sided cumulative sum (CUSUM) algorithm is applied in the logit space to detect the persistent growth trend of risk:
[0092] in The baseline logit under safe conditions (typically -2, corresponding to a probability of 0.12). For drift compensation (typically 0.1). For cumulative sum statistics. When When the value is 5 (typical value), a persistent risk alert is triggered.
[0093] The advantage of CUSUM is that it can detect a sustained increase in risk earlier than the original threshold. Even if the probability of a single step does not exceed the threshold, the cumulative trend will trigger an alert.
[0094] (3) Multi-timescale collaborative evaluation, which serves as an optional extension strategy term. If both models are configured with multi-timescale risk rate prediction heads, the collaborative system can output fused probabilities across multiple timescales:
[0095] in For time-scale indexing. The dynamic fusion weights for each time domain are determined by the fusion gating network based on the difference in confidence between the two models in that time domain.
[0096] Based on multi-time-domain probabilities, implement a tiered early warning strategy: WATCH (Observation): Long Time Domain And it continues in 3 steps → preparation stage WARN: Mid-time domain →Notification Control System ACT (Action): Short Time Domain → Implement mitigation measures immediately (4) Actuator adjustment time rejection. When the predicted fusion remaining time... Below the minimum adjustment time of the actuator Suppress alarm output (typically 10ms) to avoid false alarms that cannot be executed:
[0097] This mechanism ensures that all alarms are actionable and conform to the physical constraints of the actual control system.
[0098] Based on the same inventive concept, embodiments of the present invention also provide a plasma control system for a tokamak device according to a three-dimensional real-time simulation and cooperative control method for tokamak plasma. The technical features of this system are also applicable to the execution steps of the three-dimensional real-time simulation and cooperative control method for tokamak plasma. This includes: Multiple plasma diagnostic sensors are used to collect plasma diagnostic data; Multiple plasma actuators, with real-time acquisition of actuator status and balance parameters; A multi-rate scheduling computing device, communicatively connected to diagnostic sensors and actuators, is configured with: The first processing unit is equipped with a fast global prediction model for executing step S2. The second processing unit is equipped with a high-fidelity local analysis model, which is used to determine whether the preset triggering conditions are met based on the first ELM risk assessment results; when the triggering conditions are met, step S4 is executed. The scheduling and fusion module is used to execute the S5 steps; The control command generation module is used to generate control commands based on the output of the fast global prediction model or the output of the scheduling and fusion module, so as to regulate the actuators of the tokamak device.
[0099] like Figure 7 As shown, this illustrates the complete closed-loop process from diagnostic data acquisition to control command issuance, as well as the position and role of the collaborative system within it.
[0100] This system can be flexibly deployed in tokamak devices of varying sizes (0.5m-3m radius). Its modular design supports edge computing nodes (such as NVIDIA Jetson AGX Orin) for low-latency scenarios, or it can be configured with server clusters for parallel monitoring of multiple discharges in large devices. The system has standard interfaces with existing plasma control systems (PCS), data acquisition and control systems (CODAC), and monitoring and data acquisition systems (SCADA), enabling seamless integration and collaborative operation.
[0101] In one embodiment, the system is suitable for small to large tokamak devices, with key technical specifications including: large radius 0.5-3.0m, plasma current 100kA-2MA, circumferential magnetic field 1.5-8.0T; equipped with auxiliary heating systems (NBI, ECRH, ICRH, LHCD), fuel injection systems, and multiple types of diagnostic systems (magnetic diagnostics, density diagnostics, temperature diagnostics, radiation diagnostics); plasma operating parameters include linear average density (1-10)×10^19^m^-3^, electron temperature 0.5-10keV, normalized specific pressure 1.0-3.5, and energy confinement time 10-500ms.
[0102] In one embodiment, the core hardware of the system includes: a main computing server equipped with multiple GPU accelerator cards (such as four NVIDIA A100s) for parallel execution of two models; GPUs 0-1 run a fast global prediction model, while GPUs 2-3 run a high-fidelity local analysis model on demand; an industrial-grade data acquisition system supports multi-channel analog signals and high-speed digital sampling; an EtherCAT real-time control network enables low-latency communication; and multiple types of actuator drive interfaces support control of NBI, ECRH, gas injection, RMP coils, etc. The system adopts a primary / backup architecture to ensure high availability and is equipped with multi-layered security mechanisms to ensure safe operation of the device. This configuration achieves a steady-state inference latency of <3ms and a high-risk inference latency of <6ms, saving more than 60% of computing resources compared to always running the high-fidelity model.
[0103] In one embodiment, the system is integrated with the tokamak device via a three-layer network architecture, wherein: The equipment layer is used to connect plasma diagnostic sensors and actuators for data acquisition and control command issuance. The control layer is used to load the multi-rate scheduling computing device and perform its internal data communication; The monitoring layer is used for system status monitoring, parameter configuration, and / or data archiving.
[0104] In this embodiment, a three-layer network architecture enables interconnection between diagnostic devices, control actuators, inference servers, and the monitoring system: the device layer uses an EtherCAT real-time control network to connect field diagnostic devices and actuators, with a cycle time of 250μs-1ms; the control layer uses gRPC and RDMA protocols to achieve high-speed data transmission between the inference server, data acquisition server, and controller; and the monitoring layer uses OPC UA, MQTT, and RESTful API to connect the SCADA system, HMI workstation, and data storage server. The system uses the IEEE 1588 PTP protocol to ensure time alignment accuracy of multi-source diagnostic data <100ns.
[0105] In one embodiment, the system employs multi-layered security measures: hardware security includes an emergency stop button, a hardware watchdog timer, and actuator hardware limits; software security includes predictive value boundary checks and control variable change rate limits; and network security includes physical isolation, firewalls, VPN two-factor authentication, and intrusion detection systems.
[0106] The following are five specific examples: System configuration and hardware deployment implementation scenarios: In a typical embodiment, the system is deployed using the multi-GPU collaborative architecture described in the aforementioned "System Devices and Hardware Configuration" section. GPU resource allocation strategy: GPUs 0-1: Run PlasmaFusion Master as a resident service, performing a forward propagation once per control cycle.
[0107] GPU 2-3: Run PlasmaFusion Pilot on demand, executing only when the risk threshold is exceeded or the heartbeat cycle is reached.
[0108] CPU: Runs scheduler, fusion module, projection coordination module and interface services.
[0109] Input physics field It includes the following channels: electron density, electron temperature, ion temperature, electric potential, eddy current, parallel current density, and magnetic field perturbation, for a total of eight channels. Actuator vector. The system has 20 dimensions, including 8 channels for NBI heating power, 4 channels for ECRH heating power, 4 channels for gas injection rate, and 4 channels for RMP coil current. The balance parameters include 6 dimensions: .
[0110] Model network layer configuration: Total number of parameters for PlasmaFusion Master (28M), Total parameters of PlasmaFusion Pilot (45M), the calibration fusion head parameters are approximately 500.
[0111] Training data generation and model training implementation scenarios: Training data was generated using BOUT++ v4.3, covering parameter space parameters including edge safety factor, cross-sectional elongation ratio, triangular deformation degree, normalized specific pressure, heating power, gas injection rate, and RMP coil current. 3500 parameter combinations were selected using LHS sampling, with each combination simulated for 120 ms, resulting in 875,000 training samples. The data was divided into a training set (80%), a validation set (10%), and a test set (10%).
[0112] PlasmaFusion Master was trained for 200 epochs on the aforementioned hardware platform, with a global batch size of 32 and a learning rate of [missing information]. The training took approximately 120 hours, with a validation set loss of 0.032. PlasmaFusion Pilot was trained for 250 epochs on the aforementioned hardware platform, with a global batch size of 16 and a learning rate of [missing information]. It took about 180 hours, with a validation set loss of 0.024.
[0113] Fusion module training: Freeze the weights of both models, train only the calibration fusion head for 100 epochs, batch size 64, learning rate... The process took approximately 3 hours, with a final validation set loss of 0.018. The learned temperature parameters are... and The fusion coefficient is and .
[0114] End-to-end fine-tuning (optional): Unfreeze all modules and use the learning rate. Joint optimization for 20 epochs, taking approximately 20 hours, resulted in a reduction of the total loss from 0.018 to 0.016. The fused field reconstruction error decreased from 4.2% to 3.8%, and the ELM F1 score improved from 92.7% to 94.1%.
[0115] Online inference process and latency analysis implementation scenarios: The online inference phase occurs in each control cycle ( Perform the following steps: Step 1 (Data Acquisition, 0.4ms): Acquire data from the diagnostic system, including Thomson scattering, ECE, and Langmuir probe data. Perform low-pass filtering and downsampling to construct a physical point cloud (typical). (Point), obtain the actuator status and balance parameters.
[0116] Step 2 (Conditional Encoding, 0.1ms): Through the unified conditional interface, the executor encodes and outputs a 32-dimensional vector, the balanced encoding outputs a 32-dimensional vector, and the two are concatenated into a 64-dimensional unified conditional vector.
[0117] Step 3 (Run PlasmaFusion Master, 2.7ms): Perform forward propagation on GPUs 0-1, outputting fast field prediction, hazard level, and remaining time.
[0118] Step 4 (Trigger judgment, <0.01ms): Check whether the risk level exceeds the risk threshold (typically 0.4) or whether the heartbeat cycle has been reached (typically 20 steps).
[0119] Step 5 (Run PlasmaFusion Pilot on demand, condition 2.9ms): If triggered, generate the risk map biased collocation sampling distribution, perform forward propagation on GPU 2-3, and output high-fidelity predictions and risk indicators.
[0120] Step 6 (Calibrate Fusion, condition 0.2ms): If PlasmaFusion Pilot is triggered, apply temperature scaling calibration, dynamically generate weights through the fusion network, and calculate the fusion prediction.
[0121] Step 7 (Projection Coordination, 0.3ms): Apply divergence projection, positive projection and energy target projection in sequence to ensure physical consistency.
[0122] Step 8 (Control Decision, 0.5ms): The final forecast and risk indicators are transmitted to the MPC controller, the actuator adjustment is calculated, and the result is sent out through the fast control interface.
[0123] End-to-end latency: approximately 4.0ms in steady-state mode (PlasmaFusion Master only) and approximately 7.1ms in high-risk mode (cooperative fusion).
[0124] Performance verification and comparison experiment implementation scenarios: The validation dataset includes 500 simulated operating conditions (87,500 samples) in an independent test set and 50 operating conditions from actual data from the EAST device.
[0125] Field reconstruction accuracy (synthetic test set): The NRMSE of the cooperative system fusion prediction is 3.8%, which is 28% higher than that of PlasmaFusionMaster alone (5.3%) and 7% higher than that of PlasmaFusion Pilot alone (4.1%).
[0126] ELM alert performance (synthetic test set): The cooperative system achieved an accuracy of 94.1%, a recall of 92.8%, and an F1 score of 93.4%, with a median alert lead time of 26.3 ms and a 90th percentile of 41.7 ms. Compared to the standalone model, the cooperative system improved the F1 score by 3–4 percentage points.
[0127] Computational resource efficiency: With a risk threshold of 0.4 and a heartbeat cycle of 20 steps, the average PlasmaFusionPilot trigger rate is 23.5%, saving approximately 76% of computational resources compared to running PlasmaFusionPilot continuously.
[0128] Impact of multi-rate scheduling parameters: The risk threshold increased from 0.3 to 0.5, the PlasmaFusion Pilot trigger rate decreased from 35% to 15%, the fusion NRMSE increased from 3.6% to 4.2%, and resource savings increased from 65% to 85%, demonstrating the trade-off between accuracy and efficiency.
[0129] Ablation experiments showed that removing teacher-guided sampling increased NRMSE by 8%, removing uniform conditionalization increased NRMSE by 18%, and removing calibration fusion (replacing it with simple averaging) increased NRMSE by 13%, validating the effectiveness of each synergistic mechanism. Fixed triggering (always running PlasmaFusion Pilot) only brought marginal accuracy improvement (NRMSE 3.6% vs 3.8%) but significantly increased computational cost.
[0130] Actual data verification of the EAST device: In 50 actual discharge conditions, the cooperative system field reconstruction NRMSE was 11.2%, the ELM early warning accuracy was 86.7%, the recall rate was 82.4%, and the average lead time was 21.5ms, meeting the requirements for real-time control.
[0131] Under typical tokamak operating conditions, this embodiment achieves the following performance indicators: steady-state inference delay < 4ms, high-risk inference delay < 7.5ms, fusion field reconstruction error < 4%, and ELM early warning accuracy > 94%. Compared with running PlasmaFusion Pilot continuously, it saves 60% to 85% of computing resources, providing an efficient and reliable technical solution for accurate real-time prediction and control of tokamak plasma turbulence.
[0132] Implementation scenarios for dual-model collaborative monitoring and configuration interface based on PySide6: This embodiment provides a graphical user interface (GUI) built on the PySide6 framework, offering functions such as dual-model collaborative monitoring, multi-rate scheduling control, fusion parameter configuration, and visualization of triggering mechanisms.
[0133] The GUI system adopts the MVC architecture pattern and is built on the PySide6 framework. It includes a data model layer, a view layer, and a controller layer, supporting dual-model collaborative monitoring, fusion parameter configuration, and visualization of trigger mechanisms. The main console interface uses a tabbed design, containing seven functional tabs: Data, Training, Evaluation, Deployment, Demo, PACI, and Sandbox, used for data generation, dual-model training, collaborative evaluation, system deployment, interactive demonstration, pattern recognition, and control strategy testing, respectively. The interface provides two-column or three-column layouts to display the parallel status of the two models, fusion effect comparison, trigger history timeline, and resource efficiency monitoring, such as... Figure 8-12 As shown.
[0134] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0135] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for three-dimensional real-time simulation and cooperative control of tokamak plasma, characterized in that, Includes the following steps: S1: Real-time acquisition of plasma diagnostic data, actuator status, and balance parameters of the tokamak device, and encoding them into a unified format input vector; S2: In each control cycle, the input vector is input to the fast global prediction model to obtain the first plasma three-dimensional physics field prediction result and the first ELM risk assessment result; the first ELM risk assessment result includes at least the ELM hazard level; S3: Based on the first ELM risk assessment result, determine whether the preset triggering condition is met; if the triggering condition is met, execute S4~S5; if the triggering condition is not met, execute S6. S4: Input the input vector into the high-fidelity local analysis model to obtain the second plasma three-dimensional physics field prediction result and the second ELM risk assessment result; the high-fidelity local analysis model is higher than the fast global prediction model in terms of the accuracy of satisfying physical constraints or the causal interpretability. S5: Based on the outputs of steps S2 and S4, generate the final plasma state prediction results and the ELM fusion risk assessment, and generate control commands accordingly to adjust the actuators of the tokamak device; S6: Generate control commands based on the output of step S2 to adjust the actuators of the tokamak device.
2. The tokamak plasma three-dimensional real-time simulation and cooperative control method as described in claim 1, characterized in that, The triggering condition in S3 is a combination of any one or more of the following: The ELM risk level in the first ELM risk assessment result exceeds a preset risk threshold; The current control cycle is an integer multiple of the preset heartbeat cycle for enabling the high-fidelity local analysis model.
3. The tokamak plasma three-dimensional real-time simulation and cooperative control method as described in claim 1, characterized in that, S5 includes a calibration fusion sub-step: performing temperature scaling calibration and logical weighted fusion on the first ELM risk assessment result and the second ELM risk assessment result to generate the fused ELM risk assessment.
4. The tokamak plasma three-dimensional real-time simulation and cooperative control method as described in claim 1, characterized in that, S5 includes a field prediction selection sub-step: the final plasma state prediction result is the second plasma three-dimensional physical field prediction result, or the result after projecting and co-correcting the second plasma three-dimensional physical field prediction result using the output of the fast global prediction model.
5. The three-dimensional real-time simulation and cooperative control method for tokamak plasma as described in claim 1, characterized in that, The projection co-correction includes one or more of the following operations: Positive constraints are applied to the density and pressure channels in the final plasma state prediction, clamping negative values to zero; An energy upper limit constraint is imposed on the final plasma state prediction, so that the predicted plasma state energy is lower than a preset upper limit. Divergence freedom constraints are applied to the vector field in the final plasma state prediction.
6. The three-dimensional real-time simulation and cooperative control method for tokamak plasma as described in claim 1, characterized in that, The fast global prediction model is a spectral neural operator, which includes at least: Dense mesh encoders are used to upscale input physics fields to dense latent mesh representations. The spectral neural operator core is used to perform time evolution of the latent grid representation in the frequency domain and integrates an anti-aliasing filter to suppress high-frequency aliasing. Sheaf adhesive layer is used to divide the spatial domain into multiple overlapping subdomains along the circumferential direction, and to make the prediction results of each subdomain consistent in the overlapping area by applying adhesive loss. A decoder is used to restore the glued latent mesh to a physics prediction. The ELM warning head is used to extract global statistical features from the potential grid and output the danger level and remaining time prediction.
7. The tokamak plasma three-dimensional real-time simulation and cooperative control method as described in claim 1, characterized in that, The high-fidelity local analysis model is a neural symbolic geometric perception neural operator, which includes at least: The sheaf-like glue consistency regularization module is used to keep the prediction field continuous across overlapping subdomains. A structural causal model is used to call the structural causal model of the high-fidelity local analysis model to perform do-intervention analysis when generating control instructions, so as to evaluate the impact of different control instructions on the risk assessment of the fused ELM. ELM warning head, used to output hazard level and remaining time prediction; The physical hard constraint module is used to apply physical hard constraints on the prediction field by introducing physical residual loss and boundary condition loss based on the drift-reduced magnetohydrodynamic equation during the training and prediction process of neural operators, thereby ensuring the topological conservation of mass, momentum, energy and magnetic field.
8. A plasma control system for a tokamak device, used to execute the method according to any one of claims 1 to 7, characterized in that, include: Multiple plasma diagnostic sensors are used to collect plasma diagnostic data; Multiple plasma actuators, with real-time acquisition of actuator status and balance parameters; A multi-rate scheduling computing device, communicatively connected to the diagnostic sensors and actuators, is configured with: The first processing unit is equipped with the fast global prediction model and is used to execute the S2 step. The second processing unit is equipped with the high-fidelity local analysis model, which is used to determine whether the preset triggering conditions are met based on the first ELM risk assessment results; when the triggering conditions are met, the S4 step is executed. The scheduling and fusion module is used to execute step S5. The control command generation module is used to generate control commands based on the output of the fast global prediction model or the output of the scheduling and fusion module, so as to adjust the actuators of the tokamak device.
9. The plasma control system for a tokamak device as described in claim 8, characterized in that, The system also includes a unified conditionalization interface module, which encodes the actuator states and balance parameters from different sources into input vectors with unified dimensions, and provides them to both the fast global prediction model and the high-fidelity local analysis model.
10. The plasma control system for a tokamak device as described in claim 8, characterized in that, The system is integrated with the tokamak device through a three-layer network architecture, wherein: The equipment layer is used to connect plasma diagnostic sensors and actuators for data acquisition and control command issuance. The control layer is used to load the multi-rate scheduling computing device and perform internal data communication. The monitoring layer is used for system status monitoring, parameter configuration, and / or data archiving.