Electromagnetic field simulation optimization method and system based on deep learning
Through the blocked dimensionality reduction and graph structure learning methods based on deep learning, the problems of low computing efficiency, high resource consumption and insufficient adaptability in traditional electromagnetic field simulation are solved, and efficient and accurate electromagnetic field simulation is achieved.
Patent Information
- Application Number
- CN202510935745.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Traditional electromagnetic field simulation methods are inefficient in processing large-scale sparse matrices, have too high resource consumption, and are insufficient adaptability, making it difficult to meet the rapid iteration needs of complex electromagnetic problems.
Using the method of blocked dimensionality reduction-graph structure learning-physical constraint enhancement based on deep learning, the finite element matrix is decomposed into sub-block matrix, and an approximate inverse matrix is generated through the class incomplete Chorisky decomposition model, and the calculation is performed using the GPU parallel architecture.
It significantly improves the solution efficiency of large-scale sparse matrices, reduces computing resource consumption, and improves the adaptability to complex electromagnetic problems, ensuring the accuracy and speed of simulation results.
Smart Images

Figure CN120449606A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electromagnetic simulation, and in particular relates to an electromagnetic field simulation optimization method and system based on deep learning. Background Art
[0002] With the rapid development of power systems, wireless communications, radar technology, and electromagnetic compatibility (EMC), the demand for accurate analysis of field distribution, electromagnetic energy transmission, and electromagnetic interference in complex electromagnetic environments has become increasingly urgent. Traditional analytical calculation methods, limited by geometric regularity and dielectric uniformity, are unable to meet actual engineering needs, prompting the emergence of electromagnetic field simulation technology. Electromagnetic field simulation is the process of modeling, solving, and analyzing actual electromagnetic problems using computer programs based on electromagnetic field theory and numerical calculation methods to predict the distribution, characteristics, and interactions of electromagnetic fields in specific space and time.
[0003] The finite element method is a common numerical calculation method for electromagnetic field simulation. Its characteristic is to convert the Maxwell equations used to solve electromagnetic field problems into "K" represents the stiffness matrix, which comprehensively reflects the electromagnetic characteristics and geometric information of the entire solution area. Its size grows exponentially with the number of discrete elements, especially when dealing with complex three-dimensional structures or high-frequency problems, where the matrix dimensions can reach millions. "e" represents the vector of unknown quantities to be solved, which in electromagnetic field problems is usually physical quantities such as the electric or magnetic field intensity at the nodes. "f" is the load vector, which includes information such as external excitation and boundary conditions. The efficiency of solving such large-scale sparse matrices directly determines the simulation speed, becoming a core bottleneck restricting the practical application of electromagnetic field simulation technology.
[0004] In the existing technology, the conjugate gradient algorithm (CG) combined with the preconditioning technology is widely used to accelerate the solution of the stiffness matrix equation. Usually the solution method of the finite element matrix is: in the equation Multiply both sides by the approximate inverse M of the stiffness matrix K, and transform the equation into The traditional preprocessing method commonly used by M, such as incomplete Cholesky decomposition, reduces the matrix condition number by constructing an approximate inverse matrix, thereby accelerating the iterative convergence speed. However, this method has significant drawbacks: Inefficient computation: IC decomposition requires element-by-element interpolation and discarding operations, making it difficult to utilize parallel computing architectures such as GPUs. This results in a sharp increase in preprocessing time with matrix size. Excessive resource consumption: For very large sparse matrices, the number of non-zero elements is huge, and the traditional decomposition process consumes a lot of memory and computing resources; Insufficient adaptability: In complex media distribution or unstructured grids, the matrix block structure characteristics are changeable, and traditional methods find it difficult to dynamically adjust the decomposition strategy, which affects the preprocessing effect.
[0005] These issues severely limit the application of electromagnetic field simulation in scenarios such as high-speed circuit design, multi-physics coupling analysis, and large-scale antenna array optimization. For example, in millimeter-wave antenna design for 5G communication systems, full-wave simulation of complex structures containing thousands of elements is required. Traditional methods are computationally prohibitive and cannot meet the demands of rapid iteration. In electromagnetic compatibility analysis, multi-scale problems require simulation tools to balance local details with global coupling effects, but existing preprocessing techniques struggle to balance accuracy and efficiency.
[0006] Therefore, there is an urgent need for a new processing method that can significantly improve the efficiency of solving large-scale sparse matrices while ensuring calculation accuracy, and at the same time adapt to the parallel computing architecture to reduce resource consumption, thereby promoting the practical application of electromagnetic field simulation technology in high-complexity engineering problems. Summary of the Invention
[0007] The purpose of the present invention is to provide an electromagnetic field simulation optimization method and system based on deep learning to address the shortcomings of the existing technology.
[0008] In a first aspect, the present invention provides an electromagnetic field simulation optimization method based on deep learning, the method comprising: Assume that in the entire closed calculation area There is one input port and multiple output ports in the calculation area. The electromagnetic energy is input from the input port to the calculation area. and output from the output port; For the calculation area Discretize it and divide it into a finite number of units; construct a finite element matrix K for the electric field of each unit; The finite element matrix K is divided into blocks, and the two sub-block matrices k11 and k22 describing the electric field gradient and electric field curl of the triangular surface area are decomposed into an upper triangular matrix and a lower triangular matrix respectively; Invert the upper and lower triangular matrices to obtain the approximate inverse of the sub-block matrices k11 and k22, thereby obtaining the approximate inverse of the finite element matrix K; Substitute the approximate inverse of the finite element matrix K into the conjugate gradient algorithm to solve for the electric field of each element; Obtain the corresponding magnetic field according to the electric field of each unit, thereby obtaining the electromagnetic simulation results; The process of decomposing the two sub-block matrices k11 and k22 into an upper triangular matrix and a lower triangular matrix respectively is processed by adopting an incomplete Cholesky decomposition model.
[0009] Preferably, the incomplete Cholesky decomposition-like model includes a first feature extraction module, a second feature extraction module, a feature enhancement module, and an output conversion module which are connected in series in sequence.
[0010] More preferably, the first feature extraction module includes a graph network module and two multi-layer perception layers MLP; the graph network module adopts a GNN model to convert the input sub-block matrices k11 and k22 from sparse matrices into graph structures; the two multi-layer perception layers MLP respectively extract edge features and node features from the graph structure output by the graph network module.
[0011] More preferably, the second feature extraction module includes two branches and a blocking module, wherein the blocking module uses a blocking function to decompose the edge features and node features output by the first feature extraction module to generate two graph structures representing the upper triangular matrix and the lower triangular matrix, respectively. The two branches respectively learn and update the two graph structures representing the upper triangular matrix and the lower triangular matrix to obtain the updated two graph structures representing the upper triangular matrix and the lower triangular matrix. The two branches have the same architecture, and each branch includes two parallel multi-layer perception layers (MLPs), which respectively extract edge features and node features from the input graph structure, align them through the calculation of the loss function and the learning update, and output the updated graph structure.
[0012] More preferably, the feature enhancement module enhances the two updated graph structures output by the second feature extraction module; More preferably, the output conversion module converts the enhanced features output by the feature extraction module from a graph structure into a CSR sparse matrix, that is, an LL.T matrix.
[0013] In a second aspect, the present invention provides an electromagnetic field simulation optimization system, wherein the system method comprises: The first computing unit is responsible for computing the area Discretize it and divide it into a finite number of units; construct a finite element matrix K for the electric field of each unit; The second calculation unit is responsible for block processing of the finite element matrix K. The two sub-block matrices k11 and k22, which respectively describe the electric field gradient and electric field curl of the triangular surface area, are decomposed into an upper triangular matrix and a lower triangular matrix using a quasi-incomplete Cholesky decomposition model. The upper triangular matrix and the lower triangular matrix are inverted to obtain the approximate inverse of the sub-block matrices k11 and k22, thereby obtaining the approximate inverse of the finite element matrix K. The third calculation unit is responsible for substituting the approximate inverse of the finite element matrix K into the conjugate gradient algorithm to solve the electric field of each unit; The fourth calculation unit is responsible for obtaining the corresponding magnetic field according to the electric field of each unit, thereby obtaining the electromagnetic simulation result.
[0014] In a third aspect, the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the method.
[0015] In a fourth aspect, the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method.
[0016] Based on block processing and a quasi-incomplete Cholesky decomposition model, this invention decomposes the finite element matrix into sub-block matrices describing the electric field gradient and curl, and performs approximate inverse operations on each. Compared to traditional methods, this invention converts the sub-block matrices into a graph structure through a graph neural network and utilizes a GPU parallel architecture for distributed extraction and updating of node and edge features. This technical feature significantly reduces preprocessing time as the matrix size grows, making it particularly suitable for electromagnetic simulation scenarios with millions of non-zero elements, while also reducing memory usage and computing resource consumption.
[0017] The present invention's block-splitting module dynamically separates upper and lower triangular matrix graph structures and, in conjunction with the feature enhancement module, introduces physical constraints such as diagonal dominance and local degree distribution, ensuring that the generated preconditioned matrix more closely matches the actual electromagnetic field distribution characteristics. This technology effectively addresses the degradation of preconditioning effectiveness in traditional methods due to the variable matrix block characteristics in inhomogeneous media and multi-scale structures. It ensures the convergence stability of the conjugate gradient algorithm in complex scenarios and enhances its adaptability to complex electromagnetic problems.
[0018] Through the technical path of "block dimensionality reduction-graph structure learning-physical constraint enhancement", this invention overcomes the bottleneck problem of balancing preprocessing efficiency and adaptability in electromagnetic field simulation, and provides efficient and reliable technical support for complex engineering applications such as high-speed circuit design and multi-physical field coupling simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] To more clearly illustrate the technical solution of the present invention, we will generate finite element equations based on the waveguide discontinuous electromagnetic field simulation problem, divide the equations into blocks, and then use deep learning to optimize the generation of matrix preconditioning. Finally, we will give the equation preconditioning generation time and equation solution speed to compare and verify the feasibility of the present invention.
[0020] Figure 1 Flowchart of electromagnetic field simulation optimization provided for an embodiment of the present application Figure 2 A schematic diagram of the calculation area in the electromagnetic simulation method provided in one embodiment of the present application.
[0021] Figure 3This is a network framework diagram of an incomplete Cholesky decomposition model according to an embodiment of the present application.
[0022] Figure 4 This is a flow chart of the implementation process of MLP in one embodiment of the present application.
[0023] Figure 5 This is a flowchart of the implementation process of the second feature extraction module in one embodiment of the present application.
[0024] Figure 6 The time required to generate a preconditioner according to an embodiment of the present application is compared with the time required to generate a preconditioner according to an incomplete Cholesky decomposition.
[0025] Figure 7 The speed of solving electromagnetic simulation finite element equations according to an embodiment of the present application is compared with that of traditional methods. DETAILED DESCRIPTION
[0026] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0027] See also Figure 1 As shown, an electromagnetic field simulation optimization method provided by an embodiment of the present invention is divided into the following main steps: Step S1: Establish electromagnetic field simulation finite element matrix K S1-1 Figure 2 As shown, it is assumed that there is one input port and multiple output ports in the entire closed calculation area ῼ, and the electromagnetic energy is input from the input port to the calculation area and output from the output port; the input and output ports are ideal conditions for PMA; remember Represents the input port boundary, where electromagnetic energy is input into the computational domain In a waveguide system, this is the entrance port for electromagnetic waves. Represents the output port boundary. Having multiple such boundaries means that electromagnetic energy may be output from multiple ports and is used to simulate the electromagnetic transmission of multiple ports.
[0028] S1-2 calculation area The electromagnetic field distribution in the wave is based on the Maxwell equations to establish the partial differential equations for the calculation area. Discretize it and divide it into a finite number of units; construct a finite element matrix K for the electric field of each unit; specifically: In the time-harmonic electric field, Maxwell's two curl equations are as follows: Formula (1) Formula (2) in represents the magnetic field vector, represents the electric field vector. These two variables are used to describe the electromagnetic field distribution in the region. j represents the imaginary unit. represents the angular frequency, represents the relative dielectric constant, represents the relative magnetic flux, is the current density vector, which represents the distribution of current in space. is the curl operator, which means the curl of the vector field is calculated and is used to describe the circulation characteristics of the vector field.
[0029] make , eliminate in , formula (1) is rewritten to get: Formula (3) Then the wave number , wave impedance Substitute into equation (3) and transform equation (3) into: Formula (4) In order to construct the weak form of the finite element equation, both sides of equation (4) are multiplied by the test function , h represents discretization, indicating It is defined on a discretized grid.
[0030] And integrating over the region ῼ, we get: Formula (5) in represents the volume element of the integration region, represents the discretized electric field vector.
[0031] Since the current in a perfect electric conductor (PEC) is zero, equation (5) is converted to: Formula (6) in represents the current vector density on the i-th boundary, represents the line elements on the integration region.
[0032] The electric field and the test function Adopt the first-order Nedelec curl-coordinating basis function expansion: Formula (7) Formula (8) Where n reflects the degree of discretization, represents the expansion coefficient related to the ith basis function, represents the variable of the electric field intensity, represents the expansion coefficient associated with the jth basis function, represents the variable after the electric field is discretized and expanded, Represents the variable after discretization and expansion of the test function.
[0033] Discretize the region ῼ and divide it into a finite number of units. Substituting it into the left side of equation (6), we can obtain: Formula (9) Introducing intermediate variables into some parts of formula (11) To define: Formula (10) Combining the right side of formula (6) with formula (8) we can get: Formula (11) Introducing intermediate variables into some parts of formula (11) To define: Formula (12) Therefore, according to formula (10) and formula (12), equation (6) can be rewritten as follows: Formula (13) eliminate , equation (12) is rewritten as: Formula (14) Then, according to formula (13), the finite element matrix equation K is obtained as follows: Formula (15) Where K is the finite element matrix, which is a large n×n sparse symmetric matrix, f is the load vector, which contains external excitation and boundary condition information, and e is the unknown variable of the reaction electric field strength to be solved.
[0034] In step S2, the obtained finite element matrix K is processed using the P-type multiplicative Schwartz method. Due to the use of first-order Nedelec curl-compatible basis functions, the finite element matrix K can be divided into four sub-blocks based on the properties of the basis functions. The P-type multiplicative Schwartz method is a highly efficient method that accelerates the process of generating finite element matrix preconditioners by dividing the matrix into blocks and finding approximate inverses for the sub-fast matrices. This increases the rate at which the conjugate gradient algorithm solves the matrix equation, thereby accelerating the solution of the finite element matrix equation and optimizing the electromagnetic field simulation rate. The present invention divides the finite element matrix into blocks and finds the approximate inverse, which plays a key role in solving large finite element matrix equations. Combining this method with deep learning methods can more efficiently accelerate electromagnetic field simulations.
[0035] Formula (16) Where k11 describes the electric field gradient of the triangular face area, and its subspace is composed of the Lagrange polynomial of vertex i. and its gradient The composition of the electric field reflects the electric field gradient in the triangular region. K12 describes the electric field curl, and the subspace in which it is located describes the composition of the electric field curl. K21 describes the electric field gradient at the refined edge position. K22 describes the electric field distribution in the triangular face region. These are all determined by the properties of the selected basis functions.
[0036] Write the matrix K as multiple matrix products: Formula (17) Where I represents the identity matrix of the corresponding sub-block dimension.
[0037] Inverting the matrix K yields: Formula (18) In this way, when obtaining the approximate inverse of matrix K, only the inverse of sub-block matrices k11 and k12 needs to be solved, and the inverse size of the matrix is reduced, so the preconditioning can be saved. However, even though the matrix size is reduced, when the finite element matrix K is large, the size of its sub-block matrices is still high, and directly obtaining the inverse of the matrix still requires a lot of calculations. Therefore, the sub-block matrices k11 and k22 are decomposed into upper triangular and lower triangular matrices and then inverted to obtain the approximate inverse of k11 and k22, thereby obtaining the preconditioner of the finite element matrix K. .
[0038] You can get: Formula (19) in: , ; Represents the sub-block matrix The decomposed upper triangular matrix, Represents the sub-block matrix Decomposed upper triangular matrix.
[0039] However, when the dimension of the stiffness matrix K is large, the incomplete Cholesky decomposition of the sub-block matrix will slow down, resulting in a low efficiency of the conjugate gradient algorithm for solving the finite element matrix equation. Therefore, the present invention adopts a deep learning method to extract the features of the two sub-block matrices k11 and k22 to generate the corresponding upper triangular and lower triangular matrices, speed up the generation of preconditions, and obtain the preconditions of K. The present invention uses deep learning methods to generate preconditions for finite element matrix equations. Traditional methods rely on interpolation and dropout operations on each matrix element, which is very computationally intensive. However, the present invention uses deep learning methods to extract matrix features and generate corresponding lower and upper triangular matrices, reducing the complexity of numerical calculations. By utilizing deep learning methods, the algorithm speed is optimized and the solution of finite element equations is accelerated.
[0040] According to the precondition of K , transform equation (14) into Convert to Substitute it into the conjugate gradient algorithm to solve e, thereby speeding up the solution of the matrix equation.
[0041] Solve for the unknown variable e, which is the electric field strength of the reaction, and then Solve for the discretized electric field , in electromagnetic simulation , we can get the electric field distribution. Then we can get the electric field distribution by Calculate the magnetic field distribution and complete the electric field and magnetic field simulation.
[0042] The process of decomposing the sub-block matrices k11 and k22 into upper triangular matrices and lower triangular matrices is processed using an incomplete Cholesky decomposition model; The proposed incomplete Cholesky decomposition model is based on the Torch library, a Python-based deep learning library that supports parallel computing. By breaking down computational tasks into multiple subtasks and leveraging the multi-core processing power of modern computers, this significantly improves computational efficiency. This parallel computing capability enables the proposed method to complete numerous calculations in a relatively short time when handling large-scale electromagnetic simulations, adapting to larger computational demands.
[0043] Specifically, if Figure 3 As shown, the incomplete Cholesky decomposition model includes a graph network module, a block module, a feature enhancement module, and an output conversion module connected in series. The first feature extraction module includes a graph network module and two multi-layer perception layers (MLPs). The graph network module uses a GNN model to convert the input sub-block matrix k11 or k22 from a sparse matrix into a graph structure. The non-zero elements of the sparse matrix are converted into node features of the graph, and the rows and columns of non-zero elements are converted into edge features of the graph. GNNs are specifically designed to process graph-structured data and can effectively capture the complex relationships between nodes and edges in the graph.
[0044] The two MLPs extract edge features and node features from the graph structure output by the graph network module. Figure 4 , MLP is composed of activation functions in torch, and the number of MLP layers is determined by the matrix size.
[0045] The second feature extraction module includes two branches and a block module. Figure 5 .
[0046] The block module uses a block function to decompose the edge features and node features output by the first feature extraction module into two graph structures representing the upper triangular matrix and the lower triangular matrix respectively, which are similar to the upper triangular matrix and the lower triangular matrix generated by the incomplete Cholesky decomposition. Specifically, the elements in the edge features of the graph with rows larger than columns are filtered out to regenerate a graph. , then filter out the elements whose columns are larger than rows in the edge features of the graph to generate another graph .
[0047] The two branches learn and update the edge features and node features of the two graph structures representing the upper triangular matrix and the lower triangular matrix respectively. The purpose is to align the two generated graph structures with the calculation and learning update of the loss function, and obtain the updated two graph structures representing the upper triangular matrix and the lower triangular matrix.
[0048] The two branches have the same architecture, each consisting of two parallel MLPs, which respectively extract edge features and node features from the input graph structure, align them with learning updates through the calculation of the loss function, and output the updated graph structure; The feature enhancement module enhances the node features of the updated graph structure output by the second feature extraction module, adding features such as local degree distribution, diagonal dominance, and diagonal decay. Specifically: Find the diagonal and off-diagonal elements of the updated graph structure output by the second feature extraction module, and calculate the sum of the absolute values of the off-diagonal elements in each row : Formula (20) Where n represents the graph structure dimension, i represents the non-zero element index, represents the sum of the corresponding off-diagonal elements in row i.
[0049] Calculate the ratio of the sum of the absolute values of the diagonal elements and the off-diagonal elements to obtain the diagonally dominant feature ; Formula (21) in, represents the sum of the diagonal elements.
[0050] Formula (22) Formula (23) in Represents the maximum value of the off-diagonal elements in each row.
[0051] The diagonally dominant features calculated above And the diagonal element attenuation characteristics Combined with the original node features in the graph structure, the node features are changed from [number of nodes in the graph, non-zero element value] to [number of nodes in the graph, non-zero element value, , ].
[0052] These new node features will be used in the forward propagation process of the neural network to help the model better understand the global structure of the graph and optimize the non-zero element values in the node features, so that the product of the generated upper triangular matrix and the lower triangular matrix Closer to incomplete Cholesky decomposition.
[0053] The output conversion module converts the enhanced features output by the feature extraction module from a graph structure into an upper triangular matrix L and a lower triangular matrix And output their product , that is, the CSR sparse matrix (LL.T matrix); Loss function: During training, the goal is to minimize the loss function. Through the backpropagation algorithm, the gradient of the loss function with respect to the model parameters can be calculated, and then the optimizer is used to update the model parameters based on the gradient. The loss function of the incomplete Cholesky decomposition model is defined as: loss= Formula (23) Where z is the generated random vector, z~N(0,1); A represents k11 and k22, represents a lower triangular matrix, Represents a lower triangular matrix. This function makes the upper triangular matrix generated by the model and the lower triangular matrix The product of is close to the original matrix A.
[0054] Training and method verification of the incomplete Cholesky decomposition model: Select the random symmetric positive definite sparse matrix generated by Python as the training set for training. First, generate a random matrix A of size 1w×1w, let H= Where a is a positive parameter and I is a unit matrix of the same size. The purpose is to make the generated matrix symmetric and positive definite, satisfy the properties of the finite element matrix, and ensure that the generated matrix can be brought into the CG algorithm for solution. The size of the matrix generated by the above steps is about 1 million. The generated matrix is converted into a graph structure and assembled into a dataset using the Torch function and passed into the model. The size is set to 500.
[0055] The test set data is generated in a similar way to the training set, except that the size of the non-zero elements in the generated matrix is randomized. This is used to verify the subsequent model's optimization efficiency for matrices of different sizes and the model's solution scale limit. The size is set to 100.
[0056] Model verification: Save the generated optimal model using the torch.save() function in Torch. During testing, call this model and the data in the test set. Use the generated preconditioner as the conjugate gradient algorithm to solve different matrix equations in the corresponding test set. Compare the time it takes to solve the matrix equations using the preconditioner generated by the incomplete Cholesky decomposition to verify the model.
[0057] The present invention strictly follows the method of deep learning model training. The matrix when training the model strictly uses the large sparse symmetric positive definite matrix in the finite element equation, and matrices of different sizes are included in the training to ensure that the model can be used for matrix solving within a relatively reasonable range.
[0058] This embodiment also compares the solution rate of the traditional electromagnetic simulation finite element equation and the solution rate of the method of the present invention to verify the feasibility of the method of the present invention for optimizing electromagnetic simulation. Figure 6 From the comparison of the time for generating the finite element matrix preconditioner, it can be seen that the preconditioner generation time of the incomplete Cholesky decomposition model of the present invention is generally better than that of the traditional incomplete Cholesky decomposition (IC(0)) method. Figure 7 It shows that when the non-zero elements of the finite element matrix generated by electromagnetic simulation are less than 2 million, the solution rate of this method is faster than the traditional method, so it can optimize the electromagnetic simulation speed, but as the number of non-zero elements increases, the solution rate decreases.
[0059] The above test results show that this method has potential application value in electromagnetic simulation problems of a certain scale, and can be further applied to larger-scale electromagnetic simulation cases through subsequent optimization of the model.
[0060] When faced with large sparse matrices, the speed of generating the corresponding preprocessor by the present invention significantly exceeds that of traditional methods. Moreover, when generating the preprocessor corresponding to the finite element matrix for accelerating the conjugate gradient algorithm on electromagnetic simulation problems of a certain scale, the effect is similar to that of the preprocessor generated by incomplete Cholesky decomposition. Therefore, while improving the preprocessor generation rate, the performance of the preprocessor in accelerating the conjugate gradient algorithm is also guaranteed.
[0061] The proposed electric field optimization method offers significant technical advantages, particularly in improving computational efficiency and ensuring accuracy. By introducing deep learning methods, the method significantly improves computational efficiency while maintaining high computational accuracy. The method uses Python to generate large, symmetric, positive-definite sparse matrix datasets while retaining the properties of actual finite element matrices to train the model. The trained model is then used to generate a preprocessor, thereby increasing the speed of electromagnetic simulations.
[0062] The present invention strictly focuses on the rate at which the generated preconditioner can be used to solve the equation using the conjugate gradient algorithm. It not only considers the time to generate the preconditioner, but also the time to use the conjugate gradient algorithm to solve the equation, ensuring that the time spent on the entire process of solving the equation is improved compared to traditional methods.
[0063] The method also excels in reducing computational resource consumption. By optimizing the incomplete Cholesky decomposition process through parallel computing, the required computational resources are effectively controlled. In large-scale computing environments, the method can achieve efficient and accurate finite element matrix solution calculations at a low computational cost, significantly reducing the resource consumption and cost burden associated with the high computational complexity of traditional methods.
[0064] This embodiment also provides an electromagnetic field simulation optimization system, wherein the system method includes: The first computing unit is responsible for computing the area Discretize it and divide it into a finite number of units; construct a finite element matrix K for the electric field of each unit; The second calculation unit is responsible for block processing of the finite element matrix K. The two sub-block matrices k11 and k22, which respectively describe the electric field gradient and electric field curl of the triangular surface area, are decomposed into an upper triangular matrix and a lower triangular matrix using a quasi-incomplete Cholesky decomposition model. The upper triangular matrix and the lower triangular matrix are inverted to obtain the approximate inverse of the sub-block matrices k11 and k22, thereby obtaining the approximate inverse of the finite element matrix K. The third calculation unit is responsible for substituting the approximate inverse of the finite element matrix K into the conjugate gradient algorithm to solve the electric field of each unit; The fourth calculation unit is responsible for obtaining the corresponding magnetic field according to the electric field of each unit, thereby obtaining the electromagnetic simulation result.
[0065] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the electromagnetic field simulation optimization method.
[0066] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the electromagnetic field simulation optimization method.
[0067] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A deep learning-based electromagnetic field simulation optimization method, characterized in that: The method comprises: Assume that there is one input port and multiple output ports in the entire closed calculation area. Electromagnetic energy is input into the calculation area from the input port and output from the output port. Discretize the calculation area and divide it into a finite number of units; construct a finite element matrix K for the electric field of each unit; The finite element matrix K is divided into blocks, and the two sub-block matrices k11 and k22 describing the electric field gradient and electric field curl of the triangular surface area are decomposed into an upper triangular matrix and a lower triangular matrix respectively; Invert the upper and lower triangular matrices to obtain the approximate inverse of the sub-block matrices k11 and k22, thereby obtaining the approximate inverse of the finite element matrix K; Substitute the approximate inverse of the finite element matrix K into the conjugate gradient algorithm to solve for the electric field of each element; Obtain the corresponding magnetic field according to the electric field of each unit, thereby obtaining the electromagnetic simulation results; The process of decomposing the two sub-block matrices k11 and k22 into an upper triangular matrix and a lower triangular matrix respectively is processed by adopting an incomplete Cholesky decomposition model.
2. The method according to claim 1, characterized in that The incomplete Cholesky decomposition model comprises a first feature extraction module, a second feature extraction module, a feature enhancement module, and an output conversion module which are connected in series.
3. The method according to claim 2, characterized in that The first feature extraction module includes a graph network module and two multi-layer perception layers MLP; the graph network module adopts a GNN model to convert the input sub-block matrices k11 and k22 from sparse matrices to graph structures; the two multi-layer perception layers MLP respectively extract edge features and node features from the graph structure output by the graph network module.
4. The method according to claim 2, characterized in that The second feature extraction module includes two branches and a blocking module, wherein the blocking module uses a blocking function to decompose the edge features and node features output by the first feature extraction module to generate two graph structures representing the upper triangular matrix and the lower triangular matrix respectively. The two branches learn and update the two graph structures representing the upper triangular matrix and the lower triangular matrix respectively to obtain the updated two graph structures representing the upper triangular matrix and the lower triangular matrix.
5. The method according to claim 4, characterized in that: The two branches have the same architecture. Each branch includes two parallel multi-layer perception layers (MLPs), which extract edge features and node features from the input graph structure respectively, align them with learning updates through the calculation of the loss function, and output the updated graph structure.
6. The method according to claim 2, characterized in that: The feature enhancement module enhances the two updated graph structures output by the second feature extraction module.
7. The method according to claim 2, characterized in that: The output conversion module converts the enhanced features output by the feature extraction module from a graph structure into a CSR sparse matrix, namely, an LL.T matrix.
8. An electromagnetic field simulation optimization system based on the method according to any one of claims 1 to 7, characterized in that: The systems approach includes: The first calculation unit is responsible for discretizing the calculation area and dividing it into a finite number of units; constructing a finite element matrix K for the electric field of each unit; The second calculation unit is responsible for block processing of the finite element matrix K. The two sub-block matrices k11 and k22, which respectively describe the electric field gradient and electric field curl of the triangular surface area, are decomposed into an upper triangular matrix and a lower triangular matrix using a quasi-incomplete Cholesky decomposition model. The upper triangular matrix and the lower triangular matrix are inverted to obtain the approximate inverse of the sub-block matrices k11 and k22, thereby obtaining the approximate inverse of the finite element matrix K. The third calculation unit is responsible for substituting the approximate inverse of the finite element matrix K into the conjugate gradient algorithm to solve the electric field of each unit; The fourth calculation unit is responsible for obtaining the corresponding magnetic field according to the electric field of each unit, thereby obtaining the electromagnetic simulation result.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the method according to any one of claims 1 to 7.
10. A machine-readable storage medium, characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Fault positioning method of distribution network based on electromagnetism-like mechanism algorithm
CN108957247A
GIS electromagnetic field distribution simulation method and system and storage medium
CN119129355A
GIS electromagnetic field distribution rapid high-precision simulation method, simulator, storage medium and system
CN119150625A
Electromagnetic simulation multi-scale region segmentation method based on deep learning
CN119849235A
Device and method for electromagnetic field simulation
US20200193227A1
Cited By
GNN precondition iteration equation set solving method and system facing electromagnetic simulation
CN122221701A
A GNN-based preconditional iterative solution method and system for electromagnetic simulation
CN122221701B