电工技术学报2025,Vol.40Issue(23):7462-7474,13.DOI:10.19595/j.cnki.1000-6753.tces.242095
基于深度里兹法的电磁场计算方法
Electromagnetic Field Computation Methods Based on the Deep Ritz Method
摘要
Abstract
Data-driven algorithms based on deep neural networks have been widely used for rapid electromagnetic field solutions,but the accuracy of their calculation results is highly dependent on sufficient sample data.In the data-driven mode,on the one hand,the number of samples in the parameter space must be increased to ensure model accuracy,which greatly increases the sampling time.On the other hand,in many physical and engineering scenarios,data science does not combine known theoretical physics knowledge,resulting in information waste,slow model convergence or even non-convergence,which affects the calculation accuracy. In contrast,physical-driven algorithms can solve electromagnetic field equations without annotating data by introducing physical prior knowledge.However,when dealing with multi-medium field problems,the boundary conditions between media require additional loss function constraints,resulting in a decrease in the efficiency of the neural network optimization process.At the same time,the complexity of the field structure leads to a cumbersome modeling process,and the difficulty of constructing interface loss function conditions is further increased,which hinders the in-depth application of physical-driven algorithms in electromagnetic field calculations.As a physics-driven algorithm,the deep Ritz method(DRM)combines the Ritz method with deep learning to construct a loss function based on energy functionals.When it reaches an extreme value,the interface conditions are automatically satisfied in the sense of functionals,thus avoiding the explicit construction of interface losses.The use of a single neural network to solve electromagnetic interface problems avoids the complexity of multi-objective optimization.However,DRM uses the output of a neural network as a test function.Although the interface conditions are theoretically satisfied,due to the smooth fitting characteristics of the neural network test function,it is difficult to accurately characterize the solution with drastic gradient changes in actual calculations,resulting in increased errors near the interface. Therefore,this paper proposes an improved DRM architecture to enhance its ability to capture interface features during training.Considering that neural networks tend to give priority to low-frequency or large-scale features,this paper introduces embedded Fourier features to process network inputs.The input features of the neural network are mapped into many frequency domains in the frequency domain space,thereby accelerating the neural network's ability to capture high-frequency components and the convergence speed.At the same time,an adaptive activation function is introduced to automatically adjust the slope of the activation function during the neural network training process to improve the network's ability to capture high-frequency features.In order to use the improved DRM for stability training of electromagnetic fields,this paper adopts a fully connected neural network structure with hard boundaries.This method effectively eliminates the boundary loss in the total loss function.And by introducing randomized low-discrepancy sequences,the randomness of sampling is improved,the risk of overfitting is reduced,and the convergence of neural network training is improved. By testing the cases of electrostatic fields and steady magnetic fields,the improved DRM and DRM are compared with the finite element calculation results respectively to verify the effectiveness of the method.The improved deep Ritz method captures high-frequency features more effectively and improves the fitting accuracy of the interface area.After the same round of training,in the magnetic field example,the error of the improved network is reduced to 1.03%,while the error of the original network is 5.46%;in the electric field example,the error of the improved network is reduced to 1.49%,while the error of the original network is 4.43%.关键词
电磁场计算/物理驱动算法/深度里兹法/界面问题Key words
Electromagnetic field computation/physics-driven algorithms/deep Ritz method/interface problems分类
信息技术与安全科学引用本文复制引用
张宇娇,张强,孙宏达,赵志涛,黄雄峰..基于深度里兹法的电磁场计算方法[J].电工技术学报,2025,40(23):7462-7474,13.基金项目
国家自然科学基金资助项目(52377005). (52377005)