Abstract:In recent years, the advent of language models such as GPT and Sora has underscored the computational prowess of data-driven models within high-dimensional parameter spaces. This has positioned them as the forefront of electromagnetic optimization design, and serves the fast computation of electromagnetic fields. However, the efficacy of these data-driven models hinges significantly on labeled data, and they grapple with challenges such as overfitting and a lack of physical understanding. Diverging from natural language processing (NLP), physical fields are usually described by a set of partial differential equations, the emergence of physics informed neural networks (PINNs) addresses this gap. The core concept of PINNs involves incorporating control equations into the neural network's loss function. This integration ensures that the network output approximates boundary conditions while adhering to the control equations within the solution domain. Nevertheless, PINNs encounter hurdles such as local high gradient issues, training complexities arising from source equations, and difficulties in identifying interfaces with high-contrast coefficients in electromagnetic field computations. Consequently, the training efficiency and computational accuracy of PINNs in solving electromagnetic field equations remain suboptimal, limiting their current applications. In order to use PINNs for the stabilization training of electromagnetic fields, this paper firstly explores a method for handling zero-value boundary conditions in electromagnetic fields by employing a fully connected neural network architecture with hard boundaries. This approach effectively eliminates boundary loss in the total loss function. Taking electrostatic field equations with sources as an illustration, the L2 error using this method against the analytical solution is 9.15×10-6, with almost complete satisfaction of boundary conditions. Recognizing the neural network's inclination to prioritize low-frequency or large-scale features, the paper introduces embedded Fourier features to process network inputs. Additionally, an adaptive adjustment strategy for weight coefficients is proposed. To enhance convergence, an improved fully connected neural network framework is utilized, considering connections between the input layer and each hidden layer. This framework is exemplified with boundary conditions involving leapfrog, resulting in a substantially reduced loss of about 10-7 during training, with nearly zero internal error. To mitigate the gradient explosion issue in PINNs caused by high-order source terms during electromagnetic field training, this study formulates dimensionless equations for the electromagnetic field without prior conditions. These equations are incorporated into the neural network as a novel loss function. The relative L2 error ϵ between the PINNs and the FEM solution is measured at 2.24×10-2 for the static magnetic problem. Expanding this training methodology to the frequency-domain eddy current field, the study tackles eddy current scenarios. Solving the corresponding differential-algebraic equations with PINNs reveals the distribution of vector magnetic potentials and electromagnetic loss density in the frequency-domain eddy current field. The proposed relative L2 error ε for vector magnetic potentials between PINNs and FEM solution is 1.3×10-2. The resolved electromagnetic losses by PINNs closely match the FEM method, with an error of 3.3×10-2. In conclusion, this paper presents tailored solutions for typical challenges in applying electromagnetic fields with PINNs, significantly enhancing training efficiency, reducing costs, and introducing innovative approaches for swift electromagnetic field calculations.
[1] 金亮, 尹振豪, 刘璐, 等. 基于残差U-Net和自注意力Transformer编码器的磁场预测方法[J]. 电工技术学报, 2024, 39(10): 2937-2952. Jin Liang, Yi Zhenhao, Liulu, et al. Magnetic field prediction method based on residual U-net and self-attention transformer encoder[J]. Transactions of China Electrotechnical Society, 2024, 39(10): 2937-2952. [2] 张宇娇, 赵志涛, 徐斌, 等. 基于U-net卷积神经网络的电磁场快速计算方法研究[J]. 电工技术学报, 2024, 39(9): 2730-2742. Zhang Yujiao, Zhao Zhitao, Xubin, et al. Fast calculation method of electromagnetic field based on U-net convolution neural network[J]. Transactions of China Electrotechnical Society, 2024, 39(9): 2730-2742. [3] ZuoKuijun, Ye Zhengyin, Zhang Weiwei, et al. Fast aerodynamics prediction of laminar airfoils based on deep attention network[J]. Physics of Fluids, 2023, 35(3): 037127. [4] Raissi M, Perdikaris P, Karniadakis G E.Physics-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations[J]. Journal of Computational Physics, 2019, 378: 686-707. [5] E Weinan, Yu Bing. The deep ritz method: a deep learning-based numerical algorithm for solving variational problems[J]. Communications in Mathematics and Statistics, 2018, 6(1): 1-12. [6] Sirignano J, Spiliopoulos K.DGM: a deep learning algorithm for solving partial differential equations[J]. Journal of Computational Physics, 2018, 375: 1339-1364. [7] Lagaris I E, Likas A, Fotiadis D I.Artificial neural networks for solving ordinary and partial differential equations[J]. IEEE Transactions on Neural Networks, 1998, 9(5): 987-1000. [8] Baydin A G, Pearlmutter B A, Radul A A, et al. Automatic differentiation in machine learning: a survey[EB/OL]. arXiv, 2015: 1502.05767. http://arxiv.org/abs/1502.05767v4. [9] Fujita K.Physics-informed neural networks with data and equation scaling for time domain electromagnetic fields[C]//2022 Asia-Pacific Microwave Conference (APMC), Yokohama, Japan, 2022: 623-625. [10] Shukla K, Di Leoni P C, Blackshire J, et al. Physics-informed neural network for ultrasound nondestructive quantification of surface breaking cracks[J]. Journal of Nondestructive Evaluation, 2020, 39(3): 61. [11] Mao Zhiping, Jagtap A D, Karniadakis G E.Physics-informed neural networks for high-speed flows[J]. Computer Methods in Applied Mechanics and Engineering, 2020, 360: 112789. [12] Chen Donglin, Gao Xiang, Xu Chuanfu, et al.FlowDNN: a physics-informed deep neural network for fast and accurate flow prediction[J]. Frontiers of Information Technology & Electronic Engineering, 2022, 23(2): 207-219. [13] 唐和生, 何展朋, 廖洋洋, 等. 基于物理驱动深度迁移学习的薄板力学正反问题[J]. 工程力学: 1-10. Tang Hesheng, He Zhanpeng, Liao Yangyan, et al.Forward and inverse problems of thin plate mechanicsbased on physics-informed deep transfer learning for[J]. Engineering Mechanics: 1-10. [14] 唐明健, 唐和生. 基于物理信息的深度学习求解矩形薄板力学正反问题[J]. 计算力学学报, 2022, 39(1): 120-128. Tang Mingjian, Tang Hesheng.A physics-informed deep learning method for solving forward and inverse mechanics problems of thin rectangular plates[J]. Chinese Journal of Computational Mechanics, 2022, 39(1): 120-128. [15] Lu Lu, Meng Xuhui, Mao Zhiping, et al.DeepXDE: a deep learning library for solving differential equations[J]. SIAM Review, 2021, 63(1): 208-228. [16] Hennigh O, Narasimhan S, Nabian M A, et al.NVIDIA SimNet™: an AI-accelerated multi-physics simulation framework[C]//International Conference on Computational Science, Cham, Springer, 2021: 447-461. [17] Huawei MindSpore AI development framework[M]// Artificial intelligence technology. Singapore: Springer, 2023: 137-162. [18] 阮江军, 张宇, 张宇娇, 等. 电气设备电磁多物理场数值仿真研究与应用[J]. 高电压技术, 2020, 46(3): 739-756. Ruan Jiangjun, Zhang Yu, Zhang Yujiao, et al.Numerical simulation research and applications of electromagnetic multiphysical field for electrical equipment[J]. High Voltage Engineering, 2020, 46(3): 739-756. [19] 仲林林, 吴冰钰, 吴奇. 基于元学习的气体放电等离子体电子Boltzmann方程数值求解[J]. 电工技术学报, 2024, 39(11): 3457-3466. Zhong Linlin, Wu Bingyu, Wu Qi.Numerical solution of electron Boltzmann equation in gas discharge plasmas based on meta learning[J]. Transactions of China Electrotechnical Society, 2024, 39(11): 3457-3466. [20] Khan A, Lowther D A.Physics informed neural networks for electromagnetic analysis[J]. IEEE Transactions on Magnetics, 2022, 58(9): 7500404. [21] Beltrán-Pulido A, Bilionis I, Aliprantis D.Physics-informed neural networks for solving parametric magnetostatic problems[J]. IEEE Transactions on Energy Conversion, 2022, 37(4): 2678-2689. [22] Wang Sifan, TengYujun, Perdikaris P. Understanding and mitigating gradient flow pathologies in physics-informed neural networks[J]. SIAM Journal on Scientific Computing, 2021, 43(5): A3055-A3081. [23] Xu Z Q J, Zhang Yaoyu, Luo Tao, et al. Frequency principle: Fourier analysis sheds light on deep neural networks[EB/OL]. 2019: 1901.06523.http://arxiv.org/abs/1901.06523v5 [24] Tancik M, Srinivasan P P, Mildenhall B, et al.Fourier features let networks learn high frequency functions in low dimensional domains[C]//Proceedings of the 34th International Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 2020: 7537-7547. [25] Machine learning mastery, How to use data scaling improve deep learning model stability and performance [EB/OL].2023. https://machinelearningmastery.com. [26] Paszke A, Gross S, Massa F, et al. PyTorch: an imperative style, high-performance deep learning library[EB/OL]. 2019: 1912.01703. http://arxiv.org/abs/1912.01703v1. [27] Abadi M, Barham P, Chen J, et al.{TensorFlow}: a system for {Large-Scale} machine learning[C]//12th USENIX symposium on operating systems design and implementation (OSDI 16). 2016: 265-283. [28] 赵洪山, 孙京杰, 彭轶灏, 等. 基于多尺度窗口和区域注意力残差网络的无线电力终端身份识别方法[J]. 电工技术学报, 2023, 38(1): 107-116. Zhao Hongshan, Sun Jingjie, Peng Yihao, et al.Wireless power terminal identification method based on multiscale windowed deep residual network[J]. Transactions of China Electrotechnical Society, 2023, 38(1): 107-116. [29] Fei Yun, Rong Guodong, Wang Bin, et al.Parallel L-BFGS-B algorithm on GPU[J]. Computers & Graphics, 2014, 40: 1-9. [30] Lu Lu, Pestourie R, Yao Wenjie, et al.Physics-informed neural networks with hard constraints for inverse design[J]. SIAM Journal on Scientific Computing, 2021, 43(6): B1105-B1132. [31] Jin Xiaowei, Cai Shengze, Li Hui, et al.NSFnets (Navier-Stokes flow nets): physics-informed neural networks for the incompressible Navier-Stokes equations[J]. Journal of Computational Physics, 2021, 426: 109951. [32] Kingma D P, Ba J. Adam: a method for stochastic optimization[EB/OL]. arXiv, 2014: 1412.6980. http://arxiv.org/abs/1412.6980v9. [33] 曾非同, 关向雨, 黄以政, 等. 基于多尺度多物理场的油浸式变压器流动-传热数值研究[J]. 电工技术学报, 2020, 35(16): 3436-3444. Zeng Feitong, Guan Xiangyu, Huang Yizheng, et al.Numerical study on flow-heat transfer of oil-immersed transformer based on multiple-scale and multiple-physical fields[J]. Transactions of China Electrotechnical Society, 2020, 35(16): 3436-3444.