Physics-based projection-based star simulator condition generative design
By using generative design based on physical projection, the problems of high computational cost and design fragmentation in stellarator design are solved. It achieves synergistic optimization of plasma boundary configuration and coil structure, improving the physical convergence and engineering feasibility of the design.
Patent Information
- Application Number
- CN202611270362.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-10
AI Technical Summary
Existing stellarator design methods rely on multi-starting-point local search and gradient optimization algorithms, which are computationally expensive and make it difficult to balance the effective exploration of the global parameter space with local physical feasibility. Furthermore, the plasma boundary configuration design and coil structure design are disconnected, making them impractical for engineering applications.
A generative design based on physical projection is adopted. By inversely generating task parameters of the stellarator and breaking them down into system identification configuration data, the gradient descent direction is adjusted using a penalty function evaluation index. Combined with a nonlinear programming projection function to constrain the samples within the mathematical constraint range of magnetohydrodynamic equilibrium, alternating update and iterative calculations of plasma boundary configuration and space coil topology are performed, and a multi-level verification log and active learning feedback mechanism are established.
This reduces the divergence rate and ineffective computational loss in the high-fidelity solution process, ensures that the generated plasma boundary configuration has magnetohydrodynamic convergence, reduces coil engineering design errors, and improves the engineering feasibility and overall optimization efficiency of the design scheme.
Smart Images

Figure CN123069965A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nuclear fusion device design technology, specifically to stellarator conditional generative design based on physical projection. Background Technology
[0002] As a magnetically confined nuclear fusion device, the design of a stellarator's three-dimensional asymmetric magnetic field configuration is a high-dimensional nonlinear optimization problem. Existing stellarator design methods mainly rely on multi-starting-point local search and gradient optimization algorithms. These conventional methods are sensitive to the choice of initial values and require frequent calls to high-fidelity magnetohydrodynamic solvers during parameter optimization, resulting in high computational costs and difficulty in balancing efficient exploration of the global parameter space with local physical feasibility.
[0003] To improve design efficiency, data-driven generative models are increasingly being introduced into the configuration design phase of stellarators. Existing generative models typically only learn the geometric and statistical characteristics of historical design schemes, lacking explicit constraints on the physical equations during the generation process. This makes it impossible for the model to guarantee that the output plasma boundary necessarily satisfies the magnetohydrodynamic equilibrium convergence requirement, and the generated results may deviate from the physically feasible region, thus increasing the computational burden on subsequent verification stages.
[0004] Current design processes generally treat plasma boundary configuration design and external space coil topology design as two separate stages. The lack of prior assessment of coil manufacturing feasibility during the boundary configuration generation stage leads to problems such as spatial structure interference or excessive normal magnetic field matching errors in subsequent coil design stages, resulting in the overall design scheme being unfeasible in engineering. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a conditional generative design for stellarators based on physical projection. This solves the problem that existing data-driven generation models cannot strictly guarantee that the generation results meet the physical constraints of magnetohydrodynamics, and that the separation between plasma boundary configuration design and coil structure design leads to the final solution being unfeasible in engineering.
[0006] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a conditional generative design for stellarators based on physical projection, comprising: The stellarator reverse-generates the task parameters into system identification configuration data, which are then broken down into parameterized control variables, network model input encoding vectors, penalty function evaluation indicators, and judgment threshold conditions. Within the low-dimensional latent space coordinate system, the basic structure of the output boundary space is determined by the input encoding vector of the network model, and superposition correction is performed to output intermediate candidate samples. Within the sampling iteration period, parameterized control variables are used to limit the legal range of the sample evolution space, and the energy residual of the intermediate state is calculated by calling the penalty function evaluation index to adjust the gradient descent direction. For intermediate candidate samples that do not meet the judgment threshold, the sample coordinate points are projected into the feasible region candidate configuration within the range that meets the mathematical constraints of magnetohydrodynamic equilibrium. The final sample is obtained by performing alternating update and iterative calculations of plasma boundary configuration coordinates and space coil topology arrangement on the candidate configurations of the feasible region. The final sample is validated and the validation log is output. The validation log, residual data and intermediate failure node data are merged and a comprehensive scoring calculation is performed to supplement the historical database.
[0007] Furthermore, the stellarator reverse-engineers the task parameters and convert them into system identification configuration data, including: The stellarator inverse generation task parameters are broken down into representation layer hard constraint parameters, generation condition parameters, soft optimization objective parameters, and terminal hard constraint parameters. The hard constraint parameters of the representation layer are transformed into Boolean control variables to construct a pattern mask matrix, the generation condition parameters are assembled into a conditional encoding vector, the soft optimization objective parameters are configured with weight coefficients to construct a scalar energy function, and the terminal hard constraint parameters are encapsulated into constraint expressions. The pattern mask matrix, conditional coding vector, scalar energy function, and constraint expression are encapsulated into a structured design constraint card data object, which is then distributed to computing nodes as system identification configuration data. By decoupling and structurally encapsulating the parameters, a unified data computation benchmark is established, separating the nonlinear algebraic constraints from the physical spatial distribution objectives.
[0008] Furthermore, the construction of the low-dimensional latent space coordinate system includes: Training a geometry-aware autoencoder that includes an encoder network and a decoder network; The harmonic coefficients of the three-dimensional geometry of the plasma boundary are extracted and flattened into a Fourier coefficient vector, which is used as the plasma boundary variable. The plasma boundary variables are fed into the encoder network to reduce the dimension and output the latent variables. The decoder network receives the latent variables and increases the dimension to output the reconstructed plasma boundary variables. A joint loss function containing a spectral smoothing regularization penalty term that includes the high-frequency components of the reconstructed plasma boundary variables is used to update the network weights of the geometry-aware autoencoder using gradients, resulting in a low-dimensional latent space coordinate system. This allows for the restriction of high-frequency spatial deformation while maintaining the legitimacy of the geometric manifold, thereby controlling the stability of cross-resolution structural representations.
[0009] Furthermore, based on the network model's input encoding vector and output boundary space infrastructure, a superposition correction is performed to output intermediate candidate samples, including: Extract the geometrically relevant control vectors from the input encoding vectors of the network model and output the boundary space basic structure; Extract the physical input encoding vector from the input encoding vector of the network model, insert a cross-attention mechanism layer into the denoising network, map the physical input encoding vector to the key vector and value vector, perform attention weighted convergence, and output intermediate latent variables; The intermediate latent variables are input into the decoder network to reconstruct plasma boundary variables as intermediate candidate samples; This enables step-by-step computation from geometric feature generation to high-order physical feature condition adaptation.
[0010] Furthermore, the energy residual of the intermediate state is calculated by calling the penalty function evaluation index to adjust the gradient descent direction, including: Extract the mode mask matrix from the parameterized control variables, and perform element-wise Hadamard product operation using the mode mask matrix and the plasma boundary variables corresponding to the intermediate state candidate samples; Predict the noiseless plasma boundary variable estimate for the current time step, construct the sampling period guiding energy function by calling the penalty function evaluation index, and calculate the intermediate state energy residual; Calculate the mathematical gradient of the guiding energy function during the sampling period, and then superimpose the mathematical gradient as a bias vector into the denoising direction guiding equation of the conditional diffusion model. At the end of the reverse diffusion cycle, the differentiable magnetohydrodynamic solver is invoked to obtain the derivative with respect to the true residual of the equilibrium equation and perform end-of-cycle fine-tuning calculations to adjust the gradient descent direction. Therefore, a proxy network is used to guide the direction of diffusion during the high-noise stage, and the solver residual is introduced at the end of the denoising stage to implement physical calculation intervention, taking into account both the physical convergence probability and the diversity of sample exploration.
[0011] Furthermore, for intermediate candidate samples that do not meet the judgment threshold, the sample coordinate points are projected onto a feasible region candidate configuration that conforms to the mathematical constraints of magnetohydrodynamic equilibrium, including: Extract the plasma boundary variables corresponding to intermediate state candidate samples and construct a nonlinear programming projection function; A joint distance metric is introduced into the nonlinear programming projection function. The joint distance metric is composed of the Euclidean distance between the Fourier coefficients of the plasma boundary variables, the three-dimensional displacement deviation distance of the discrete points on the boundary surface, the deviation distance of the normal vector change, and the numerical weighted sum of the spectral smoothing penalty. Based on the joint distance metric, the sample coordinate points are projected into the magnetic fluid equilibrium mathematical constraint interval that meets the judgment threshold condition to form a candidate configuration of the feasible region; By using a joint distance metric to constrain the projected path, the nonlinear programming process can satisfy physical constraints and maintain the macroscopic structural characteristics of the original input.
[0012] Furthermore, before constructing the nonlinear programming projection function, the following steps are also included: The plasma boundary variables and conditional coding vectors are fed into a learning residual correction network to obtain a prediction compensation residual vector, and the prediction compensation residual vector is superimposed on the original state to obtain a preliminary correction sample. Starting with the initial corrected sample, the differential magnetohydrodynamic solver is invoked to implement truncation backpropagation control and execute projection logic, limiting the upper limit of iteration to a preset minimum value. Extract the divergence breakpoint state parameters of samples that do not meet the convergence criteria, and use them as intermediate failure node data to be backfilled into the historical database. This allows the forward inference structure of the residual network to replace the high-dimensional nonlinear projection iteration process, thereby reducing the resource consumption of online computation.
[0013] Furthermore, alternating update iterative operations are performed on the candidate configurations of the feasible region to update the plasma boundary configuration coordinates and the topology of the space coils, resulting in the final sample, including: For the candidate configurations in the feasible region, the optimal solution for the virtual surface current distribution is obtained, and the normal magnetic field matching error is calculated as the optimal residual value. When the optimal residual value meets the engineering tolerance threshold, the current plasma boundary configuration coordinates are fixed, and the control variables characterizing the topology of the space coil are updated. Lock the updated space coil topology and release the plasma boundary configuration coordinates as active optimization variables to implement gradient updates; An augmented Lagrange objective function containing the inner product of Lagrange multiplier vectors and normal matching residual vectors is constructed to control the alternating update iteration operation until a consistent state is reached to obtain the final sample; By introducing a coil manufacturing feasibility assessment procedure before determining the boundaries, spatial structure interference problems caused by joint optimization of variables are avoided.
[0014] Furthermore, the final sample is validated, and validation logs are output, including: The low-resolution magnetohydrodynamics solver is called to perform the first-order low-fidelity verification on the final sample, and the samples that exceed the preset ratio limit or the preliminary screening threshold are filtered out to obtain low-fidelity failure samples. For samples that pass the first-order low-fidelity verification, the high-resolution three-dimensional magnetohydrodynamic equilibrium solver is called to perform the second-order high-fidelity verification. Samples that trigger the timeout interrupt mechanism or the memory monitoring daemon process and terminate the calculation thread are filtered out as high-fidelity divergence failure samples. The samples that pass the second-order high-fidelity verification are output as the high-constraint design scheme of the stellarator, and a verification log is generated that records the low-fidelity failure samples and the high-fidelity divergence failure samples.
[0015] Furthermore, by merging verification logs, residual data, and intermediate failure node data, a comprehensive scoring calculation is performed to supplement the historical database, including: Extract divergent breakpoint state parameters from intermediate failure node data, extract conflict samples discarded due to violation of physical interference boundaries in alternating update iteration operations, and combine low-fidelity failure samples and high-fidelity divergent failure samples extracted from verification logs as negative samples. The high-constraint design schemes of the output stellarator are set as positive samples, and together they constitute the active learning training dataset. We use binary cross-entropy as the loss function and backpropagate to fine-tune the weight parameters of the feasibility classification network using the active learning training dataset. Based on the extracted residual data, a four-element combination collection evaluation index is constructed, which includes physical performance expectation, cognitive uncertainty, feasibility probability and spatial novelty. The active learning score is calculated, and the conditional encoding vector of the high-value data group is fed back to the input to drive a new round of optimization to supplement the historical database. This allows the classification network's decision boundary to be updated using all positive and negative samples, controlling the parameter distribution direction of subsequent generation model iterations.
[0016] This invention provides a conditional generative design for stellarators based on physical projection. It offers the following advantages: 1. This invention adjusts the gradient descent direction by introducing a penalty function evaluation index within the sampling iteration period and combining it with a nonlinear programming projection function to restrict the coordinate points of intermediate sample to the range of magnetohydrodynamic equilibrium mathematical constraints. This overcomes the defect that pure data-driven models cannot meet strict physical constraints. While maintaining the macroscopic geometric manifold of the sample, it ensures that the generated plasma boundary configuration directly possesses magnetohydrodynamic convergence, thereby reducing the divergence rate and ineffective computational loss in the subsequent high-fidelity solution process.
[0017] 2. After forming the candidate configuration of the feasible domain, this invention performs alternating update and iterative calculations of the plasma boundary configuration coordinates and the spatial coil topology arrangement, and uses the augmented Lagrangian objective function to control the normal magnetic field matching error. The engineering feasibility assessment of the coil is integrated into the boundary configuration generation stage in advance, reducing the error caused by the separation of plasma physics optimization and coil engineering design in the traditional design process, avoiding spatial structure interference caused by independent optimization of variables, and ensuring the engineering manufacturing feasibility of the final design scheme.
[0018] 3. This invention establishes an active learning and backfeeding mechanism based on multi-level verification logs and intermediate failure node data. High and low fidelity failure samples, spatial interference conflict samples, and divergent breakpoint data are used as negative samples and fine-tuned together with positive samples of successful high-constraint design schemes. This fully utilizes non-convergent discarded data in the optimization process to update the judgment boundary. It can continuously correct the parameter distribution direction of subsequent iterations of the model based on indicators such as expected physical performance and feasibility probability, thereby improving the overall optimization efficiency of the system in complex non-convex parameter spaces. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the system architecture of the present invention; Figure 2 This is a schematic diagram of the method flow of the present invention; Figure 3 This is a flowchart of the phased condition generation process based on geometrically perceptual latent space according to the present invention. Figure 4 This is a schematic diagram of the physical constraint pre-embedding principle for the sampling process of the present invention; Figure 5 This is a flowchart of the differentiable projection and rapid correction based on terminal hard constraints of the present invention. Detailed Implementation
[0020] The technical solutions in 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.
[0021] See attached document Figure 1 This invention provides a stellarator conditional generative design system based on physical projection, comprising: a data center module, a unified modeling module, a geometric coding module, a conditional generation module, a physical projection module, a coil co-design module, a high-fidelity authentication module, and an active learning control module.
[0022] The data center module communicates with the unified modeling module. The data center module is configured to uniformly store geometric boundary data, physical evaluation data, coil parameters, solver configuration files, optimized trajectories, and information on failed samples, and maintain the global association and version record of sample identifiers and task attributes during system flow.
[0023] The unified modeling module is connected to the geometry encoding module, the condition generation module, and the physical projection module. The unified modeling module receives external input of physical target parameters, geometric setting conditions, and engineering manufacturing requirements, and parses and breaks down this information into representation layer hard constraint data, generation condition input data, soft optimization target data, and terminal hard constraint check configuration.
[0024] The geometry encoding module utilizes offline data to perform normalization processing on the three-dimensional spatial boundary of the stellarator based on Fourier series. The geometry encoding module includes an autoencoder structure, which is used to extract plasma boundary features to establish a low-dimensional spatial representation, and output latent variables and decoding rules to the computation nodes of the condition generation module.
[0025] The condition generation module includes a geometry generation unit, a physical adaptation unit, and a surrogate evaluation unit. The geometry generation unit extracts data feature distributions based on geometric condition parameters without any physical attributes. The physical adaptation unit loads physical condition parameters onto the distribution established by the geometry generation unit, performs incremental calculations, and outputs generated samples. The surrogate evaluation unit receives process state variables and outputs candidate index parameters and equilibrium convergence probability values.
[0026] The physical projection module is connected to the output of the condition generation module. The physical projection module acquires the generated sampling trajectory and performs function gradient adjustment calculations on the trajectory direction based on the physical energy calculation results. The physical projection module has a differentiable optimization computation path; after the generation process is complete, it performs nonlinear programming operations on candidate samples that deviate from the physical equality or inequality requirements and projects them into the specified constraint domain.
[0027] The coil joint design module receives the configuration boundary results output by the physical projection module. The coil joint design module calls the inner layer current potential calculation program to generate coil matching residual data and feeds it back to the front-end input of the condition generation module, or extracts candidate sample boundary features and performs alternating update iterative calculations of boundary structure displacement and coil size parameters.
[0028] After the high-fidelity certification module is deployed independently and connected to the coil co-design module, it is configured to perform multidimensional free boundary equilibrium calculations, particle trajectory tracking, and finite cross-section coil stress analysis, and output the final certification parameter set.
[0029] The active learning control module acquires feature data and result streams from each computational stage in parallel. Using a pre-defined scoring function, the active learning control module performs descending sorting and hierarchical screening operations on the certified samples, extracting discrepancies that meet set conditions and abnormal convergence breakpoint parameters. This data is then fed back into the data center module to update the base dataset used by the condition generation module and the physical projection module.
[0030] See attached document Figure 2This invention provides a conditional generative design for stellarators based on physical projection, comprising the following steps: S100, the unified modeling module obtains the task parameters generated by the stellarator in reverse engineering, and transforms the task parameters into system identification configuration data according to the data classification rules. This configuration data is divided into parameterized control variables, network model input encoding vectors, penalty function evaluation indicators and judgment threshold conditions, and distributed to the subsequent calculation modules of the system. S200, the condition generation module performs condition generation operations in the low-dimensional latent space coordinate system built by the geometry encoding module. The geometry generation unit first outputs the boundary space basic structure based on the input geometry-related control vectors. The physical adaptation unit then performs superposition correction and outputs intermediate state candidate samples based on the physical input encoding vectors related to the specific pressure and magnetic surface profile. S300, the physical projection module intervenes in the workflow during the sampling iteration cycle of step S200, uses parameterized control variables to limit the legal range of the sample evolution space, and synchronously calls the evaluation index to calculate the intermediate state energy residual of the network, thereby adjusting the gradient descent direction of the sample state evolution. S400, after the condition generation module completes the full cycle generation, the physical projection module extracts the output results containing the deviation state. For candidate samples that have not reached the judgment threshold, a correction function containing the target physical index is constructed with the current state point of the sample as the calculation starting point. The sample coordinate points are projected into the feasible domain candidate configuration within the range that meets the mathematical constraints of magnetohydrodynamic equilibrium. S500, the coil joint design module performs engineering attribute loading operation on the feasible domain candidate configuration output in step S400, executes the separation variable calculation logic, fixes the current plasma boundary configuration coordinates and adjusts the space coil topology arrangement, then locks the space coil topology arrangement and reverses the plasma boundary configuration coordinates, iterates to make the two structures reach a consistent state in terms of normal field error and spatial interference index. The S600 high-fidelity authentication module introduces an independent physical solver to perform numerical calculations on the final sample, which synchronously includes boundary and coil parameters, and outputs verification logs. The active learning control module merges the verification logs with the residual data and intermediate failure node data generated in the above steps, and performs a comprehensive scoring operation on the data based on preset values to filter samples and import them into the data center module to supplement the historical database capacity.
[0031] In the physical projection-based stellarator conditional generative design provided by this invention, the specific implementation of step S100 includes the following sub-steps: S101, the unified modeling module receives the stellarator inverse generation task parameters from external input. These task parameters include plasma physics parameters, geometric boundary parameters, and coil engineering manufacturing requirements. Based on the stellarator's physical characteristics and numerical calculation properties, the unified modeling module breaks down and categorizes these task parameters into representation layer hard constraint parameters, generation condition parameters, soft optimization objective parameters, and terminal hard constraint parameters. By decoupling and classifying the input information, discrete algebraic constraints, continuous physical space distribution objectives, and nonlinear constraints are separated. This aims to reduce the difficulty of solution space mapping caused by differences in the feature scales of multi-source data and avoid gradient calculation oscillations in the subsequent generation model caused by directly splicing all engineering dimensions into the input.
[0032] S102, the unified modeling module performs differentiated algebraic expressions and assignment configurations for the four types of parameters after splitting.
[0033] For the hard constraint parameters of the representation layer, the inherent spatial topological characteristics of the corresponding stellarator are involved, which are related to the number of field periods. The modeling module converts these attribute parameters into Boolean control variables, including star symmetry conditions, curve closure conditions, and Fourier mode truncation orders. It then constructs a mode mask matrix based on these Boolean control variables. For the conventional mathematical expansion of three-dimensional closed surfaces represented by Fourier series, those skilled in the art can use the superposition of standard trigonometric function series of polar and circumferential angles for parameterization. The specific expansion rules and coefficient matrix construction methods are well-known techniques in this field and will not be elaborated upon here.
[0034] In this process, for magnetic surface structures with specific geometric symmetry characteristics, the coefficients of some sine or cosine terms in the Fourier series expansion of the coordinates of the surface points of their boundary shape are physically equal to zero. The unified modeling module constructs a Boolean pattern mask matrix with fixed dimensions based on the input Fourier mode truncation order, and assigns mask values to the coordinate positions of the aforementioned zero-term coefficients in this matrix. In the subsequent feature decoding and 3D structure reconstruction stages of the network, the masking calculation of the corresponding elements is performed in advance, blocking the generation path of illegal geometric configurations from the algebraic expression level.
[0035] For the generation condition parameters, their corresponding target input quantities for the design task involve aspect ratio. Rotational transformation profile Specific pressure variable And quasi-symmetric type indicator codes. Since the number of parameters input by the user in actual computational tasks is variable, the unified modeling module assembles them into a fixed-length conditional encoding vector based on a pre-defined physical quantity sorting dictionary. When a specific missing input parameter is detected, the system adjusts the conditional encoding vector. Zero-padding is performed at the corresponding index positions, and a binary conditional mask vector is generated simultaneously to indicate the availability status of the parameter. For task inputs with a tolerance range, the unified modeling module extracts the upper and lower bound values of the interval according to the given extreme values and concatenates them to the conditional encoding vector. middle.
[0036] For soft optimization target parameters, the corresponding continuous physical residuals or structural complexity indices that need to be minimized include quasi-symmetry error, fast ion loss rate, transport proxy coefficient, and coil geometric complexity. Since the numerical dimensions of the various residual indices are not uniform, the unified modeling module performs normalization mapping on them according to preset specifications and assigns real-valued weight coefficients based on the priority order in the constraint dictionary. The system uses these weight coefficients to sum the normalized indices, constructing a scalar energy function mapped to the real number domain. ,in For plasma boundary variables, Configure variables for the coil. This energy function is configured as a bias weight in the model sampling process to evaluate the local state space and guide the evolution trajectory of the samples.
[0037] For the terminal hard constraint parameters, the corresponding physical verification steps need to satisfy partial differential equations and nonlinear algebraic boundaries, involving magnetohydrodynamic equilibrium convergence criteria, Jacobian determinant positivity criteria, magnetic surface non-self-intersection criteria, and minimum coil spacing limits. The unified modeling module encapsulates these into equality constraint expressions. and inequality constraint expressions Considering the truncation error and finite element mesh resolution in numerical calculations, the system introduces a numerical tolerance threshold in the equality determination operation. When the absolute value of the calculated residual satisfies The equation constraint is then determined to be true. This tolerance threshold... The order of magnitude is set based on a preset single-precision or double-precision floating-point computing environment. The above equality and inequality constraint expressions are configured as projection judgment conditions by the unified modeling module. Generated samples that deviate from these judgment conditions will trigger nonlinear programming projection calculations in subsequent modules.
[0038] In S103, the unified modeling module encapsulates the various parameters, which have undergone algebraic expression and assignment configuration, into structured design constraint card data objects. Each design constraint card data object contains multiple independent data entries. Each data entry, according to the system's underlying protocol's preset data structure definition, stores the corresponding design indicator's category identifier, algebraic relation symbol, expected target value, allowable deviation tolerance, numerical accuracy fidelity level, and computational priority configuration. When the same computational task triggers multi-dimensional target optimization conflicts, the system performs degradation pruning or weight reallocation based on the computational priority configuration recorded in the data object, providing a conflict resolution mechanism.
[0039] S104, the design constraint card data object generated by the unified modeling module is distributed to the corresponding computing nodes via the system's internal communication bus. The pattern mask matrix in the hard constraint parameters of the representation layer is sent to the geometry encoding module as decoding constraints. The generated condition parameters are input to the condition generation module as initial distribution parameters for the network's forward computation. The scalar energy function corresponding to the soft optimization objective parameters... The configuration and the constraint expressions corresponding to the terminal hard constraint parameters are synchronously distributed to the physical projection module and the coil joint design module, and used as the penalty evaluation index and boundary convergence judgment condition for the target search process. See attached document Figure 3 In the physical projection-based stellarator conditional generative design provided by this invention, the specific implementation of step S200 includes the following sub-steps: S201, the geometry encoding module trains a geometry-aware autoencoder using an offline-built stellarator dataset to construct a low-dimensional latent space coordinate system. The geometry-aware autoencoder comprises an encoder network. With decoder network Its network backbone adopts a multilayer perceptron structure. The system transforms the three-dimensional geometry of the stellarator plasma boundary into a free-boundary Fourier series expansion representation, extracts the harmonic coefficients of each order and flattens them into a Fourier coefficient vector, which is used as the plasma boundary variable defined in the aforementioned step S100. Input into the network structure.
[0040] The dimension of the input data is truncated by a preset polar order. With circumferential truncation order Together, they decide that the number of nodes in the network input layer corresponds to the total number of non-zero independent coefficients. The input data, after Z-score normalization preprocessing, is then fed into the encoder network. The system progressively reduces the dimensionality of the latent layer to a preset dimension through fully connected layers. The selection of this preset dimension does not solely depend on the cumulative explained variance of the features. Instead, the system builds a validation set using latent variable manifolds of different dimensions during the offline phase. By jointly comparing the surface geometry efficiency, high-fidelity balance success rate, and key physical index errors after decoding and reconstruction, the optimal dimensionality reduction value is selected after comprehensive evaluation. For example, it can be optimally configured among 64, 96, or 128 dimensions, and the latent variables are output. Subsequently, the decoder network Receive latent variables It also performs layer-by-layer dimensionality-increasing calculations and outputs the reconstructed plasma boundary variables. .
[0041] During latent space construction, the feature manifold must maintain its geometric validity in 3D Euclidean space while satisfying algebraic reconstruction accuracy. The geometric encoding module uses a joint loss function to update the network weights' gradients during model training. The reconstruction loss function of this autoencoder... Defined as: ; in, For the actual sampled plasma boundary variables, For the plasma boundary variables reconstructed by the network; and These represent the coordinate matrices of discrete points on the three-dimensional boundary surface obtained by mapping the true coefficients and reconstructed coefficients through inverse Fourier transform, respectively. and These represent the normal vector matrices of the corresponding discrete points on the surface; This represents the spectral smoothing regularization penalty term applied to the high-frequency components of the reconstructed Fourier coefficients, used to suppress high-frequency geometric wrinkles on the generated surface. This represents a physical proxy operator with low computational cost, used to analyze macroscopic geometric features such as volume and cross-sectional area that can be directly obtained through surface integration, avoiding the need to call time-consuming magnetohydrodynamic solvers; , , , and These represent the loss weight hyperparameters, and their values can be determined within the range of [0.01, 10] using a grid search method to balance the order of magnitude of each constraint term. The discretized numerical calculation process for inversely calculating the 3D surface coordinates and normal vectors using Fourier coefficients can be implemented using standard differential geometry differentiation rules, which is a well-known technique in this field and will not be elaborated upon here.
[0042] S202, after the geometry-aware autoencoder is trained, the geometry generation unit within the conditional generation module freezes the network weights of the encoder and decoder, and trains a conditional diffusion model within the constructed latent space to perform basic geometric feature generation. The geometry generation unit receives geometry-related control vectors from the unified modeling module. As a generation condition, the vector includes geometric properties such as field period number, symmetry type identifier, target aspect ratio, volume, and cross-sectional elongation. The conditional diffusion model employs a U-Net architecture with time-step embedding as the denoising network.
[0043] During the training phase, the geometry generation unit utilizes a large-scale, attribute-free dataset randomly sampled based on geometric analytical equations to obtain its latent variable representations and adds Gaussian noise according to a predefined variance table. Subsequently, a denoising network is used to predict the added noise. The training loss function for this phase is configured as the mean squared error loss between the predicted noise and the actual added noise. During the inference generation phase, the geometry generation unit samples a random noise sequence from a standard normal distribution and assigns a geometrically relevant control vector. The geometrically conditional features are transformed into conditional feature codes through a linear mapping layer and injected into each layer of the denoising network as auxiliary input. Guided by these geometrically conditional features, the denoising network undergoes a preset number of inverse Markov sampling denoising iterations, outputting basic latent variables that satisfy the input geometric constraints. The system expands the coverage of the basic sample library by learning from massive amounts of low-fidelity data to establish a spatial manifold with high geometric validity.
[0044] S203, the physical adaptation unit within the condition generation module performs conditional incremental adaptation operations oriented towards higher-order physical features, based on the latent variable distribution established by the geometry generation unit. The physical adaptation unit receives a physical input encoding vector containing the target specific pressure variable and the rotational transformation profile. And the fidelity identifier variable that identifies the source of the physical calculation accuracy of the sample. The fidelity identifier variable is a categorical discrete value representing the accuracy level of the solver used to obtain the physical training data.
[0045] The physical adaptation unit inserts a cross-attention mechanism layer into the feature map propagation path of the already solidified conditional diffusion model U-Net backbone network. Specifically, the cross-attention mechanism layer is deployed between the downsampling and upsampling modules of the U-Net architecture. The cross-attention mechanism layer uses the feature map as the query vector and maps the physical input encoding vector to key and value vectors, performing attention-weighted convergence. For the fidelity label variable... The physical adaptation unit encodes the identifier vector through a separate fully connected layer and concatenates it with the time-step embedding vector, injecting them together into the residual block of U-Net. The physical adaptation unit then fine-tunes the newly inserted attention network structure layer using a scarce, high-quality dataset that has been validated for convergence by a high-fidelity solver.
[0046] During fine-tuning training, the system performs a random masking and discarding operation on the physical input encoding vector and fidelity identifier with a preset probability, that is, setting them to zero or replacing them with learnable empty features, so that the model learns the unconditionally generated path rules simultaneously during training. At the same time, the learning rate update is maintained at a low level for the original U-Net backbone weights, and the loss function for fine-tuning training is the denoised mean squared error. This operation causes the distribution of the generated latent variables to shift and match the target physical attribute range while maintaining the original geometric validity, and finally outputs intermediate latent variables carrying comprehensive physical conditions.
[0047] In S204, during the reverse Markov sampling iteration of the aforementioned conditional diffusion model, a proxy evaluation unit is deployed in parallel within the system, configured to be invoked in real-time by the physics projection module during time-step evolution. The proxy evaluation unit internally deploys a multi-task physics proxy network, an equilibrium convergence probability network, and an uncertainty quantification network in parallel. The multi-task physics proxy network adopts a multi-branch fully connected architecture, receiving plasma boundary variables of candidate samples as input features, with each branch independently outputting predicted values for aspect ratio, quasi-symmetry error, and physical profile extrema. The equilibrium convergence probability network uses a binary classification output structure, outputting the probability value of successful convergence of the candidate sample in the high-fidelity magnetohydrodynamic equilibrium calculation program through a sigmoid activation function. .
[0048] The uncertainty quantification network is constructed using a deep ensemble method, comprising multiple sub-networks with the same structure but different initial weights. After the system inputs sample features, the mean of the prediction outputs of each sub-network is extracted as the final prediction value, and the variance of the output results of each sub-network is calculated. This variance is then used to quantify the cognitive uncertainty of the model for the current candidate sample. After all denoising time steps have been executed, the condition generation module inputs the final denoising latent variables output by the physical adaptation unit into the decoder network of the geometry encoding module. In the process, the plasma boundary variables for reconstructing intermediate candidate samples are generated. And then transmit it to the subsequent modules.
[0049] See attached document Figure 4 In the physical projection-based stellarator conditional generative design provided by this invention, the specific implementation of step S300 includes the following sub-steps: In S301, the physical projection module intervenes in the computational process within the inverse Markov sampling iteration cycle executed by the condition generation module. It applies algebraic-level hard constraints to the evolution space of the samples using parameterized control variables distributed by the unified modeling module. The physical projection module extracts a mode mask matrix pre-constructed by the unified modeling module. The dimension of this matrix is perfectly aligned with the Fourier coefficient expansion dimension of the plasma boundary variables. The elements within the matrix are marked with Boolean values representing the independent harmonic components allowed to exist while satisfying specific field period numbers and star symmetry.
[0050] In the denoising prediction stage at each time step of the conditional diffusion model, when the denoising network outputs the predicted intermediate-state plasma boundary variables, the physical projection module performs element-wise Hadamard product operations with these plasma boundary variables using the mode mask matrix. From a mathematical perspective, the plasma boundary of the stellarator is parameterized as a spatial Fourier series. The aforementioned masking operation is equivalent to performing directional filtering in the frequency domain, directly setting all algebraic coefficients that violate the fundamental spatial topological validity of the stellarator to zero, such as asymmetric distribution characteristics or non-closed curve components. Because this constraint operation directly cuts off the mapping path of illegal manifolds during the forward propagation of the computational graph, the system avoids wasting model computational power on generating invalid configuration structures that cannot be instantiated and constructed in three-dimensional physical space, ensuring that the plasma boundary variables input to subsequent physical evaluation stages conform to the fundamental geometric specifications.
[0051] S302, the physical projection module synchronously calls the agent evaluation unit built into the condition generation module to obtain the physical evaluation index for the current prediction sample, and uses the evaluation index to construct the sampling period guiding energy function based on the augmented Lagrangian form, thereby obtaining the intermediate state energy residual.
[0052] In the reverse denoising stage of the diffusion process, latent variables in a high-noise state lack clear physical and geometric representations, and directly inputting them into the physics estimator will produce severely distorted gradient calculation results. Therefore, the system first predicts the noiseless plasma boundary variable estimates corresponding to the current time step through a one-step forward inference of the denoising network. Then, a physical energy evaluation calculation is performed within the feature space of the clear sample. The physical projection module will... Input is given to a multi-task physical agent network, a balanced convergence probability network, and an uncertainty quantification network, and outputs various prediction parameters.
[0053] The physical projection module assembles the sampling period guided energy function based on the input design constraint card data object. The specific mathematical expression of this function is defined as follows: in, This represents the sampling period guided energy function with a penalty factor; The estimated value of the noiseless plasma boundary variables predicted by the network at the current time step; This represents the generation of conditional coding vectors; This represents the continuous soft optimization objective residual term calculated for the predictor variable, specifically including the sum of the normalized values of the quasi-symmetric error and the coil geometric complexity; The predicted probability of a sample output by the equilibrium convergence probability network successfully converging in the high-fidelity magnetohydrodynamic equilibrium solver is represented by the introduction of a negative logarithm term. Guide the generated trajectory to shift towards a high-probability region of the physically feasible domain; and These represent the total number of terminal equality constraints and terminal inequality constraints preset by the system, respectively. and Corresponding to the first The equality constraints and the first Algebraic residuals of inequality constraints; Denotes the Lagrange multipliers for the corresponding equality constraint terms; This represents the global penalty factor used to control the intensity of penalties for violations of equations and inequalities; This represents the cognitive uncertainty value of the current candidate sample output by the uncertainty quantification network; and These represent the weights of the probability-guided term and the uncertainty-penalty term, respectively. In some specific implementation environments, and Empirical values can be established in the interval [0.1, 10] through cross-validation; for Lagrange multipliers The system can use the subgradient ascent method to dynamically iterate and update during the recursive process of the sampling time step.
[0054] The physical projection module calculates the guiding energy function. Numerical mathematical gradient of the noisy latent variable state The gradient value is then superimposed as an additional bias vector into the denoising direction guiding equation of the conditional diffusion model. The derivation and calculation logic of the conditional gradient of the score function in the backsampling process of the diffusion model can be implemented by those skilled in the art using standard stochastic differential equation solving theory. The specific derivation and calculation rules are well-known techniques in this field and will not be elaborated upon here.
[0055] In S303, to balance the global search diversity of samples in the latent space with the convergence stability of local physical accuracy, the physical projection module is configured with a timing control strategy to dynamically adjust the weight of the guiding gradient. During the high-noise time step interval in the early stage of the diffusion process, the physical projection module applies a global penalty factor... and the weight of the probability guiding term The initialization is set to a low order of magnitude. At this point, the evolutionary trajectory is mainly dominated by the unconditional statistical prior extracted from the training dataset, allowing the generated samples to perform a wide range of random walks across modalities in the latent space.
[0056] As the denoising time step progresses, the physical projection module increases according to a preset monotonically increasing scheduling function. and The value of , such as the cosine scheduling function or the linear heating function, increases the weight of the physical constraint energy function in the sampling gradient. Simultaneously, for areas entering unknown regions of model extrapolation during early exploration, leading to uncertainty... For samples exceeding the safety threshold, the system applies a positive penalty term weight. The penalty gradient that induces inward contraction exerts a pull-back force, causing it to return to the interpolation region where the agent network has reliable evaluation accuracy.
[0057] Furthermore, to address the accuracy degradation issue of the surrogate model as it approaches the boundary, the physical projection module introduces a multi-fidelity calculation switching mechanism at the end of the denoising cycle. The preset total number of back diffusion time steps is... In the first 0.8 to 0.9 Within the time step interval, the system calls the aforementioned multi-task physics agent network to perform fast guidance with low computational cost; within the remaining time step interval, since the geometric contour of the plasma boundary sample has basically converged, the system stops calling the agent evaluation unit and instead calls the built-in differentiable magnetohydrodynamic solver, such as the DESC differentiable equilibrium program.
[0058] At this point, the physical projection module will predict the plasma boundary variables. The data is expanded into a realistic 3D physical space grid coordinate point set and directly fed into a differentiable magnetohydrodynamics solver. An automatic differentiation mechanism using the computational graph yields the accurate derivative of the true residuals for the equilibrium equations. This accurate derivative is then used as a bias gradient vector and continuously superimposed onto the denoising direction guiding equations for the last few time steps of the conditional diffusion model, until the denoising time steps are completely zero. This replaces the predicted gradient output by the original proxy network for final fine-tuning calculations. This dynamic switching mechanism between timing and computational sources mitigates the mode collapse phenomenon caused by excessively strong physical guidance in the early stages of sampling, increasing the diversity coverage of the final output intermediate candidate samples.
[0059] See attached document Figure 5 In the stellarator conditional generative design based on physical projection provided by the present invention, the specific implementation of step S400 includes the following sub-steps: S401, after the condition generation module completes the full-cycle denoising generation, the physical projection module extracts the plasma boundary variables corresponding to the output intermediate state candidate samples. For candidate samples whose constraint residuals do not reach the judgment threshold, the physical projection module uses the current state point of the sample as the calculation starting point to construct a nonlinear programming projection function to search for the legal configuration closest to the original generated sample within the physically feasible domain.
[0060] From the perspective of mathematical and physical mapping, due to the highly nonlinear mapping relationship between the Fourier coefficients of the plasma boundary and the three-dimensional spatial coordinates, simply constraining the Euclidean distance in the characteristic space can easily lead to small changes in the generated configuration at the coefficient level, but drastic local geometric deformations or surface self-intersections in the real physical three-dimensional space. Therefore, the system introduces surface point displacement, normal vector change, and high-frequency structure penalty terms to construct a joint distance metric, locking the macroscopic geometric contour during projection optimization to maintain the diversity of generated samples. Its optimization problem and objective function configuration are as follows: ; ; in, This represents the design variables that meet the requirements after the projection operation. The independent variable representing plasma boundary optimization during the search process; Represents the original plasma boundary variables output by the generation module; This represents the generation of conditional coding vectors; Represents the penalty weights for the physical objective function; The value of the continuous soft optimization objective residual for this sample; and These represent the algebraic expressions for the system's preset terminal equality constraints and inequality constraints, respectively. This represents the joint distance metric.
[0061] Specifically, a single Fourier coefficient Euclidean distance cannot accurately reflect the degree of deformation in three-dimensional physical space. Therefore, the joint distance metric... The distance is composed of four weighted sums: the first part is the basic Euclidean distance between the Fourier coefficients of the plasma boundary variables; the second part is the three-dimensional displacement deviation distance of the discrete points on the boundary surface extracted by the surface operator; the third part is the deviation distance of the normal vector change of the discrete points on the boundary surface; and the fourth part is the spectral smoothing penalty value calculated for the high-frequency components of the Fourier expansion coefficients. These distance metrics are weighted and integrated according to preset weighting coefficients, such as empirical values determined in the range [0.01, 10] through cross-validation, thereby forcing the projection path to maintain its original macroscopic geometric characteristics while satisfying physical constraints.
[0062] S402, to reduce the computational cost of directly calling the differentiable magnetohydrodynamics solver to perform high-dimensional projection online, the physical projection module is configured with a fast correction mechanism based on residual learning. The physical projection module integrates a learning-based residual correction network. The backbone of this network includes an input layer, several cascaded fully connected hidden layers, and an output layer. Nonlinear activation functions such as ReLU are configured between the hidden layers to perform initial alignment operations before performing high-fidelity optimization.
[0063] During the offline distillation training phase, the system collects the converged projection trajectories from historical design tasks performed by the precise optimizer as the training dataset. The system extracts the trajectory coordinates of the precise projector during the optimization iteration process as off-sample features. And extract the feasible target configuration that the trajectory finally converges as This allows us to calculate the true residual vectors of the two in the Fourier coefficient space. The learning-based residual correction network will concatenate the features of the deviated samples. With the corresponding generative conditional encoding vector As input data.
[0064] After dimension alignment processing at the input layer, the data features flow through a fully connected hidden layer for high-dimensional nonlinear mapping, and finally the output layer outputs the prediction compensation residual vector. The dimensionality of the prediction result is completely consistent with the Fourier expansion dimension of the plasma boundary variables. The offline training of this network uses mean squared error as the loss function, and minimizes the prediction compensation residual through backpropagation. Compared with the true residual The differences between them are used to iteratively update the weight parameters of the nodes within the network.
[0065] During the online calculation phase of the system, the physical projection module will project the original plasma boundary variables. The conditional encoding is fed into a fixed, learned residual correction network to obtain a predicted compensation residual vector, which is then directly superimposed onto the original state to obtain the preliminary corrected sample. This operation replaces some of the complex gradient solving with a forward inference process, absorbs most of the geometric position deviations that violate constraints, and advances the plasma boundary state to the near-neighborhood of the target feasible region in advance.
[0066] S403, Physical projection module for initial sample correction As the starting coordinates for iterative calculations, the built-in magnetohydrodynamic solver with differentiable computational properties is invoked to execute precise projection logic.
[0067] The physical projection module adaptively calls the corresponding numerical optimization algorithm based on the type and number of decision conditions in the input design constraint card. For local optimization tasks containing only a few equality constraints, the system uses the Gauss-Newton method to perform fast convergence calculations; for tasks involving multiple nonlinear inequality constraints and complex objective conflicts, the system calls sequential quadratic programming or augmented Lagrange optimization algorithms. For numerical optimization calculations of nonlinear subproblems, those skilled in the art can use standard nonlinear mathematical programming theory, and its internal trust region step size control and Hessian matrix update logic are well-known technologies in the field, and will not be elaborated here.
[0068] In precise projection calculations, to control the memory consumption of online computation and maintain the stability of the network gradient, the physical projection module implements truncated backpropagation control, limiting the high-fidelity iteration upper limit of the differentiable solver to a preset minimum value, such as a fixed numerical range of 3 to 5 steps based on the system's computing power. Since the learned residual correction network has already completed the main displacement correction in the previous stage, this limited iteration range is sufficient for the solver to obtain the high-precision mathematical gradient of the partial differential equation using the automatic differentiation mechanism, thereby guiding the plasma state parameters to converge into the mathematically feasible region enclosed by the equality and inequality, and finally outputting the candidate configuration of the feasible region.
[0069] For samples that do not meet the convergence criteria within this truncation iteration period, the physical projection module does not perform a simple discard operation. Instead, it extracts and records the failure type label and the corresponding divergence breakpoint state parameters of the sample, and feeds them back into the data center module to update the judgment boundary of the subsequent feasibility classification network and support the sampling and detection strategy of the active learning control module.
[0070] In the stellarator conditional generative design based on physical projection provided by this invention, the specific implementation of step S500 includes the following sub-steps: S501, the coil joint design module receives the feasible region candidate configurations output by the physical projection module. To guide the system away from local solution regions where plasma physical performance meets requirements but engineering manufacturability is poor, a coil-friendliness proxy evaluation mechanism is configured before explicit coil generation. This mechanism does not directly optimize the physical degrees of freedom of all coils, but instead utilizes plasma boundary variables. Solve the inner layer current potential or square magnetic flux problem to obtain the optimal solution for the virtual surface current distribution of the continuous shape. .
[0071] From a physical equivalence perspective, the virtual surface current distribution can be viewed as a continuous limiting state of the discrete coil in spatial distribution. If the continuous surface current corresponding to a certain boundary shape cannot generate the required confinement magnetic field at a low energy cost, the complexity of the discrete physical coil corresponding to that boundary is usually higher. Therefore, the coil co-design module calculates the normal magnetic field matching error generated by the optimal surface current distribution to the target boundary and uses it as the optimal residual value. This value reflects an assessment of the difficulty for an external discrete coil to theoretically reproduce the required constraint magnetic field for a given boundary shape. The coil co-design module will use the optimal residual value. As a feedforward penalty term, it is directly used as a screening indicator for the feasibility of current plasma boundary sample engineering.
[0072] When the residual value exceeds a preset engineering tolerance threshold, the current boundary is directly determined to be a disadvantageous configuration that is difficult for the coil to achieve, and subsequent joint optimization is terminated. Simultaneously, the system feeds back the residual value and corresponding boundary features to the data center module, which is used to update the multi-task physical agent network's prediction weights regarding coil complexity in the next round of active learning iteration. Through this pre-evaluation agent strategy, the system preemptively penalizes specific geometric deformations that lead to high coil complexity, prompting the generation trajectory within the latent space to evolve towards a feasible region that balances plasma constraint and coil manufacturability.
[0073] In S502, for plasma boundaries that have passed the coil-friendly proxy evaluation, the coil joint design module transitions to an explicit boundary and coil joint alternating optimization stage. Because the joint design space formed by the boundary coordinates and spatial coil parameters has a high dimension and exhibits non-convex characteristics, directly performing full-variable synchronous optimization easily leads to local optimum trapping or iterative oscillation problems. Therefore, the system introduces an augmented Lagrangian form of the alternating direction multiplier method to perform collaborative design.
[0074] During the explicit phase of coil topology updates, the coil co-design module fixes the current plasma boundary configuration coordinates. This allows us to treat these parameters as known constants. At this point, the optimization objective transforms into purely optimizing the coil parameters. The system targets the control variables characterizing the coil structure. Targeted update calculations are performed, including but not limited to the coordinates of the three-dimensional control points, length parameters, curvature parameters, and spatial spacing values of the discrete coil. In this fixed boundary calculation step, the optimization evaluation objective is the geometric complexity penalty term of the coil and the space engineering constraint index. At the same time, the normal field error caused by the magnetic field generated by the coil on the fixed plasma boundary is introduced as a matching residual index. The weighted sum of the above indices is minimized through an optimization algorithm.
[0075] S503: After completing one or a preset number of coil parameter updates, the coil co-design module locks the current spatial coil topology arrangement. This transforms the source into a static constraint, initiating a reverse fine-tuning step of the boundary parameters. During this stage, the system converts the plasma boundary configuration coordinates... The variables are released as active optimization variables. The plasma equilibrium, quasi-symmetry index and structural deformation parameters under this boundary are calculated by combining the differentiable magnetohydrodynamic solver. The gradient update is then implemented using these parameters as the objective function to smooth out the boundary physical performance fluctuations or spatial interference caused by the adjustment of the preceding coil structure.
[0076] In the alternating optimization execution architecture, to control the convergence stability of the two sub-problems—fixed boundary optimization and fixed coil optimization—during the iterative process, the system is configured with an augmented Lagrangian objective function for joint alternating optimization. This objective function consists of the sum of four evaluation indices: the first is a comprehensive physical performance index for plasma boundary calculations, mainly covering quasi-symmetry error and magnetohydrodynamic equilibrium residuals; the second is a geometric complexity penalty index for implementing engineering manufacturing specifications for the coils, mainly covering penalties for total coil length, maximum curvature extremum, and minimum spacing; the third is the inner product of the Lagrangian multiplier vector corresponding to algebraic constraints and the normal matching residual vector; and the fourth is the L2 norm squared term of the normal matching residual vector with a global penalty parameter. Among these, the normal matching residual... Specifically, this is represented by the current discrete coil combination control variable. The algebraic deviation between the magnetic field components generated on the given plasma boundary configuration coordinate variable x and the ideally constrained target magnetic field.
[0077] In the execution logic of the coil joint design module, regarding plasma boundary variables... With coil control variables The alternating minimization computation uses a trust region algorithm to limit the step size, preventing excessively large single update amplitudes from disrupting the original magnetic surface nesting structure. Each round completes one full cycle. After alternating updates, the system matches the residuals based on the normal direction. The Lagrange multipliers and global penalty parameters are dynamically updated based on the rate of decrease. When the normal matching residual is detected to be not showing the expected decreasing trend, the system increases the value of the global penalty parameter by a preset amplification factor, for example, by selecting an empirical value in the range [1.5, 3.0].
[0078] The system iteratively executes steps S502 and S503, continuously monitoring the convergence status of the augmented Lagrange objective function. The system employs dual termination criteria to prevent the algorithm from entering an infinite loop: the first is a convergence state determination. When the norm of the normal matching residual vector drops to a preset convergence tolerance threshold, typically configured based on a fraction of ten thousand to a fraction of a thousand of the target magnetic field strength, and the coil curvature and spacing parameters do not trigger physical interference boundaries, the system terminates the alternating cooperative iteration and outputs the final configuration sample set where both structural features are consistent. The second is a maximum iteration period determination. When the number of iterations reaches a preset maximum iteration step limit, such as a constant between 50 and 100 iterations, and the residual tolerance is still not met, the system forcibly blocks the alternating operation process of that sample and marks it as a non-converged sample. For the adaptive shrinkage rule of the trust region radius and the first-order update criterion of the Lagrange multipliers in alternating optimization, those skilled in the art can refer to the sequential optimization theory in standard nonlinear programming for implementation. The basic derivation and calculation process are well-known techniques in this field and will not be elaborated here.
[0079] In the physical projection-based stellarator conditional generative design provided by this invention, the specific implementation of step S600 includes the following sub-steps: S601, the system extracts the final configuration sample set output by the coil joint design module. Under limited computational resource constraints, to balance the sample evaluation scale and solution accuracy, the active learning control module initiates a multi-fidelity screening mechanism to perform a first-order low-fidelity verification on the input configuration sample set. At this stage, the system calls a low-resolution magnetohydrodynamic solver and a coarse-grid vacuum magnetic field tracking operator to map the plasma boundary coordinates and discrete coil parameters of the samples onto a low-density computational grid, performing magnetic surface nesting state verification and basic macroscopic instability assessment.
[0080] In low-fidelity verification, computational efficiency is prioritized. The active learning control module extracts the coarse-grid magnetic axis offset and the residual of the basic quasi-symmetry index from the solver output and executes low-fidelity elimination logic. When the coarse-grid magnetic axis offset of a sample exceeds the preset proportional limit of its small radius, or the residual of the basic quasi-symmetry index is greater than the preset preliminary screening threshold, the sample is directly marked as a low-fidelity failure sample and removed. Through this screening mechanism, the system can filter out configuration samples with geometric self-intersections or topological breaks in the early stages, thereby reducing the computational cost of subsequent high-fidelity calculations.
[0081] In S602, for candidate samples that pass the first-order low-fidelity verification, the active learning control module performs the second-order high-fidelity verification. The system calls the high-resolution three-dimensional magnetohydrodynamic equilibrium solver and the full-space neoclassical transport solver. Based on the given high-fidelity evaluation dimensions, the active learning control module calculates the fast ion loss rate, neoclassical transport flux, and microinstability growth rate of each sample under a fine grid.
[0082] Considering that some anomalous configuration samples may cause internal iteration non-convergence and pipeline computation blockage when solving complex partial differential equations, the active learning control module is configured with a timeout interrupt mechanism and a memory monitoring daemon when calling the high-fidelity solver. When the execution time of a high-fidelity computation task exceeds a preset multiple of the reference convergence time (e.g., 3-5 times the base time), or when the memory or video memory usage of the process shows an abnormal linear increase, the daemon automatically terminates the computation thread of that sample and classifies it as a divergent failure sample. For samples that pass high-fidelity verification and whose physical indicators meet the preset requirements, the system outputs and stores them as the final high-constraint design scheme for the stellarator.
[0083] In S603, the system data center module aggregates all types of data generated throughout the entire pipeline calculation process to perform closed-loop data accumulation and model updates. The data center module extracts divergence breakpoint state parameters recorded by the physical projection module after truncation iteration, conflict samples discarded by the coil joint design module due to violations of physical interference boundaries, and low-fidelity failure samples and high-fidelity divergence failure samples generated by the multi-fidelity screening mechanism. The aforementioned substandard data are uniformly designated as negative samples and assigned a first classification label, while design schemes that pass high-fidelity verification are designated as positive samples and assigned a second classification label. The samples and their corresponding generation conditional encoding vectors together constitute the active learning training dataset.
[0084] The system incorporates a feasibility classification network. The network's backbone consists of an input layer, three cascaded fully connected hidden layers, and an output layer. During data preprocessing, the system standardizes the input conditional encoding vectors, ensuring each dimension follows a zero-mean, unit-variance distribution to eliminate the adverse effects of physical dimension differences on network parameter updates. The input layer receives standardized data with a dimension equal to the conditional encoding vector's dimension. Hidden layers employ non-linear activation functions for feature space mapping and include dropout layers with a fixed dropout rate to suppress overfitting. The output layer uses a sigmoid activation function to output the predicted probability of the configuration corresponding to the input conditional encoding surviving in subsequent physical processes. During network updates, the system uses binary cross-entropy as the loss function and backpropagates the weight parameters of the feasibility classification network using the aforementioned active learning training dataset to fine-tune it, bringing its decision boundary closer to the currently detected true physical feasible domain boundary.
[0085] S604, the active learning control module, based on the updated feasibility classification network and surrogate evaluation unit, performs high-value sample screening and sampling strategy adjustments for the next batch. The system transitions from a funnel-shaped evaluation mechanism to a multi-dimensional, joint active learning scoring strategy.
[0086] Specifically, for the candidate sample set, the active learning control module constructs a four-element combined acquisition and evaluation index that includes physical performance expectation, cognitive uncertainty, feasibility probability, and spatial novelty. First, the system extracts the comprehensive soft optimization objective residual value output by the multi-task physical agent network and takes its negative value to represent the expected physical benefit. Second, it extracts the prediction variance output by the uncertainty quantification network and multiplies it by a preset non-negative uncertainty penalty coefficient to form an uncertainty penalty term, thereby suppressing the system's blind pursuit of the model's extrapolation failure region. Third, it extracts the logarithm of the equilibrium convergence probability output by the feasibility classification network and assigns a probability-guided weight to guide the samples toward the high convergence region of the physical feasible domain. Finally, it calculates the distance metric between the candidate sample features and the known sample set in the historical database as the spatial novelty score and assigns an exploration balance coefficient.
[0087] The active learning control module performs a weighted linear summation of the above four values to obtain the final active learning score for each sample, and then sorts them in descending order. The system prioritizes extracting high-potential samples near the predicted Pareto front, discriminative samples near the feasible region boundary, samples with high surrogate uncertainty but good potential performance, and counterexample samples where the model prediction is inconsistent with the high-fidelity results, as high-value data groups.
[0088] The active learning control module uses the conditional encoding vectors corresponding to the selected high-value data sets as input conditions for the next round of design, feeding them back to the input of the condition generation module to drive a new round of denoising generation and physical projection optimization. The entire system continuously loops this closed loop until the global exit condition is met. The system's global exit condition is configured as follows: when the number of collected positive sample design schemes reaches a preset requirement, or when the total iteration cycle of the active learning closed loop reaches the system's set iteration threshold, the main control program terminates all collaborative design tasks and outputs the design database. For the specific numerical discrete integral format of the partial differential equations in high-resolution three-dimensional magnetohydrodynamic equilibrium, those skilled in the art can implement it based on finite difference or finite element theory, which are well-known techniques in the field and will not be elaborated upon here.
Claims
1. A conditional generative design for stellarators based on physical projection, characterized in that, include: The stellarator reverse-generates the task parameters into system identification configuration data, which are then broken down into parameterized control variables, network model input encoding vectors, penalty function evaluation indicators, and judgment threshold conditions. Within the low-dimensional latent space coordinate system, the basic structure of the output boundary space is output based on the input encoding vector of the network model, and superposition correction is performed to output intermediate candidate samples; During the sampling iteration period, the parameterized control variables are used to limit the legal range of the sample evolution space, and the penalty function evaluation index is called to calculate the energy residual of the intermediate state to adjust the gradient descent direction. For intermediate candidate samples that do not meet the judgment threshold, the sample coordinate points are projected into a feasible domain candidate configuration within the interval that meets the mathematical constraints of magnetohydrodynamic equilibrium. The plasma boundary configuration coordinates and the spatial coil topology are alternately updated and iterated for the candidate configurations of the feasible region to obtain the final sample. The final sample is validated and a validation log is output. The validation log, residual data, and intermediate failure node data are merged to perform a comprehensive scoring calculation to supplement the historical database.
2. The conditional generative design of a stellarator based on physical projection according to claim 1, characterized in that, The stellarator reverse-engineers the task parameters and converts them into system recognition configuration data, including: The stellarator reverse-generates task parameters into representation layer hard constraint parameters, generation condition parameters, soft optimization objective parameters, and terminal hard constraint parameters. The hard constraint parameters of the representation layer are converted into Boolean control variables to construct a pattern mask matrix. The generation condition parameters are assembled into a condition encoding vector. The soft optimization objective parameters are configured with weight coefficients to construct a scalar energy function. The terminal hard constraint parameters are encapsulated into a constraint expression. The pattern mask matrix, the conditional encoding vector, the scalar energy function, and the constraint expression are encapsulated into a structured design constraint card data object, which is then distributed to the computing nodes as the system identification configuration data.
3. The conditional generative design of a stellarator based on physical projection according to claim 2, characterized in that, The construction of the low-dimensional latent space coordinate system includes: Training a geometry-aware autoencoder that includes an encoder network and a decoder network; The harmonic coefficients of the three-dimensional geometry of the plasma boundary are extracted and flattened into a Fourier coefficient vector, which is used as the plasma boundary variable. The plasma boundary variables are fed into the encoder network to reduce the dimension and output latent variables, and the decoder network receives the latent variables to increase the dimension and output the reconstructed plasma boundary variables. The network weights of the geometry-aware autoencoder are updated by gradient using a joint loss function that includes the high-frequency components of the reconstructed plasma boundary variables and a spectral smoothing regularization penalty term, to obtain the low-dimensional latent space coordinate system.
4. The conditional generative design of a stellarator based on physical projection according to claim 3, characterized in that, Based on the input encoding vector of the network model, the output boundary space basic structure is performed, and superposition correction is applied to output intermediate candidate samples, including: Extract the geometrically relevant control vector from the input encoding vector of the network model and output the boundary space basic structure; Extract the physical input encoding vector from the input encoding vector of the network model, insert a cross-attention mechanism layer into the denoising network, map the physical input encoding vector to the key vector and value vector, perform attention weighted convergence, and output intermediate latent variables; The intermediate latent variables are input into the decoder network to reconstruct plasma boundary variables as intermediate candidate samples.
5. The conditional generative design of a stellarator based on physical projection according to claim 3, characterized in that, The intermediate state energy residual is calculated by calling the penalty function evaluation index to adjust the gradient descent direction, including: Extract the mode mask matrix from the parameterized control variables, and perform element-wise Hadamard product operation using the mode mask matrix and the plasma boundary variables corresponding to the intermediate state candidate samples; Predict the noiseless plasma boundary variable estimate for the current time step, construct the sampling period guiding energy function by calling the penalty function evaluation index, and calculate the intermediate state energy residual. Calculate the mathematical gradient value of the sampling period guiding energy function, and superimpose the mathematical gradient value as a bias vector into the denoising direction guiding equation of the conditional diffusion model; At the end of the reverse diffusion cycle, a differentiable magnetohydrodynamic solver is invoked to obtain the accurate derivative of the true residual of the equilibrium equation and perform a final fine-tuning calculation to adjust the gradient descent direction.
6. The conditional generative design of a stellarator based on physical projection according to claim 3, characterized in that, The step of projecting the sample coordinates of intermediate candidate samples that do not meet the judgment threshold into a feasible region candidate configuration within a range that conforms to the mathematical constraints of magnetohydrodynamic equilibrium includes: Extract the plasma boundary variables corresponding to the intermediate state candidate samples and construct a nonlinear programming projection function; A joint distance metric is introduced into the nonlinear programming projection function. The joint distance metric is composed of the Euclidean distance between the Fourier coefficients of the plasma boundary variables, the three-dimensional displacement deviation distance of the discrete points on the boundary surface, the deviation distance of the normal vector change, and the weighted sum of the spectral smoothing penalty value. Based on the joint distance metric, the sample coordinate points are projected into the magnetohydrodynamic equilibrium mathematical constraint interval that meets the judgment threshold condition, forming the candidate configuration of the feasible region.
7. The conditional generative design of a stellarator based on physical projection according to claim 6, characterized in that, Before constructing the nonlinear programming projection function, the following steps are also included: The plasma boundary variables and the conditional encoding vector are fed into a learning residual correction network to obtain a prediction compensation residual vector, and the prediction compensation residual vector is superimposed on the original state to obtain a preliminary correction sample. Using the aforementioned preliminary corrected sample as the starting point for calculation, the differentiable magnetohydrodynamic solver is invoked to implement truncation backpropagation control and execute precise projection logic, limiting the upper limit of iteration to a preset minimum value; Extract the divergence breakpoint state parameters of samples that do not meet the convergence criteria, and use them as intermediate failure node data to be directionally fed back into the historical database.
8. The conditional generative design of a stellarator based on physical projection according to claim 1, characterized in that, Perform alternating update iterative operations on the plasma boundary configuration coordinates and space coil topology arrangement of the candidate configurations of the feasible region to obtain the final sample, including: For the candidate configurations of the feasible region, the optimal solution of the virtual surface current distribution is obtained, and the normal magnetic field matching error is calculated as the optimal residual value. When the optimal residual value meets the engineering tolerance threshold, the current plasma boundary configuration coordinates are fixed, and update calculations are performed on the control variables characterizing the topology of the space coil. Lock the updated space coil topology and release the plasma boundary configuration coordinates as active optimization variables to perform gradient updates; An augmented Lagrange objective function, comprising the inner product of Lagrange multiplier vectors and normal matching residual vectors, is constructed to control the alternating update iteration operation until a consistent state is reached to obtain the final sample.
9. The conditional generative design of a stellarator based on physical projection according to claim 1, characterized in that, The final sample is validated, and a validation log is output, including: The low-resolution magnetohydrodynamics solver is invoked to perform a first-order low-fidelity verification on the final sample, and samples that exceed the preset ratio limit or the preliminary screening threshold are filtered out to obtain low-fidelity failure samples. For samples that pass the first-order low-fidelity verification, the high-resolution three-dimensional magnetohydrodynamic equilibrium solver is called to perform the second-order high-fidelity verification. Samples that trigger the timeout interrupt mechanism or the memory monitoring daemon process and terminate the calculation thread are filtered out as high-fidelity divergence failure samples. The samples that pass the second-order high-fidelity verification are output as the high-constraint design scheme of the stellarator, and the verification log is generated, which records the low-fidelity failure samples and the high-fidelity divergence failure samples.
10. The conditional generative design of a stellarator based on physical projection according to claim 9, characterized in that, The historical database is supplemented by merging the verification logs, residual data, and intermediate failure node data to perform a comprehensive scoring calculation, including: Extract the divergent breakpoint state parameters from the intermediate failure node data, extract the conflict samples discarded due to violation of physical interference boundaries in the alternating update iteration operation, and extract the low-fidelity failure samples and the high-fidelity divergent failure samples from the verification log, merge them and set them as negative samples, and set the output stellarator high-constraint design scheme as positive samples, together to form an active learning training dataset. The binary cross-entropy loss function is used, and the weight parameters of the feasibility classification network are fine-tuned by backpropagation using the active learning training dataset. Based on the extracted residual data, a four-element combined collection evaluation index is constructed, which includes physical performance expectation, cognitive uncertainty, feasibility probability and spatial novelty. An active learning score is calculated, and the conditional encoding vector of high-value data group is fed back to the input to drive a new round of optimization to supplement the historical database.
