JCCJournal of Computer and Communications2327-5219Scientific Research Publishing10.4236/jcc.2020.812022JCC-106525ArticlesComputer Science&Communications A MLP Based FDTD Method ShuangyangLi1ShengjianLai1JinhaoLiu1ShaoboWu1LangChen1CEM Lab, School of Physics, University of Electronic Science and Technology of China, Chengdu, China30112020081227928420, November 202024, December 2020 31, December 2020© Copyright 2014 by authors and Scientific Research Publishing Inc. 2014This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/

In this paper, we proposed a novel multilayer perceptron (MLP) based Finite-Difference Time-Domain (FDTD) method to reduce the time complexity of the conventional FDTD method, MLP neural networks can be used to replace the field quantities update equations and we found that in certain scenario, we can greatly reduce the time complexity of FDTD method.

FDTD Neural Network MLP
1. Introduction

Machine learning has become a cornerstone of modern science since it can be applied in all areas of science . However, its use in computational electromagnetics (CEM) is not yet wide.

In this paper, we propose a new FDTD algorithm that combines machine learning techniques with conventional FDTD algorithms in CEM; and, we will see that it can effectively reduce the time complexity of conventional FDTD algorithms in certain scenarios.

2. FDTD Method

The conventional FDTD Method in CEM can be described as follow. First, we use Maxwell’s equations:

{ ∂ D ∂ t = ∇ × H ∂ B ∂ t = − ∇ × E (1)

Assume a 2D uniform square grid case with TM mode, which means E x = E y = H z = 0 , applying central difference scheme to it, Equation (1) can be written as:

{ H x n + 1 2 ( i , j + 1 2 ) = H x n − 1 2 ( i , j + 1 2 ) − E z n ( i , j + 1 ) − E z n ( i , j ) Δ y H y n + 1 2 ( i + 1 2 , j ) = H y n − 1 2 ( i + 1 2 , j ) + E z n ( i + 1 , j ) − E z n ( i , j ) Δ x E z n + 1 ( i , j ) = E z n ( i , j ) + [ H y n + 1 2 ( i + 1 2 , j ) − H y n + 1 2 ( i − 1 2 , j ) Δ x                                 − H x n + 1 2 ( i , j + 1 2 ) − H x n + 1 2 ( i , j − 1 2 ) Δ y ] (2)

where in Equation (2) n represents time steps and i, j represents spatial coordinates, and thus we can calculate the electromagnetic field quantities of next time step by using the previous field quantities. Solving electromagnetic problems by using conventional FDTD method can be described as follows (Figure 1).

As mentioned above, with determined absorbing boundary conditions (ABC) and excitation sources, we can calculate the electromagnetic field quantities using this “leapfrog integration” technique, which uses electric fields to calculate magnetic fields, and magnetic fields to calculate electric fields. While neural networks can learn a non-linear function that maps an input to an output based on example input-output pairs , this allows us to feed electromagnetic field quantities of previous time step as input and predict the electromagnetic field quantities of next time as we do in the conventional FDTD method. Here are the general steps to combine neural network with conventional FDTD method: 1) Collect Data From conventional FDTD Method; 2) Train MLP network using our collected data; 3) Combine MLP network with FDTD method.

3. MLP Model

MLP neural network is one of the most widely used neural networks in modern machine learning techniques. As a universal approximator , MLP is suitable for our goal. Its architecture in our case is shown in Figure 2. It’s governing equation in our case can be written as:

O r = G ( w I r + b ) (3)

where w is the weight of the nerual network and b is the basis of the neural network, function G represents the neural network architecture, here we take the input vector as I r = [ E z n ( i , j ) , H y n + 1 / 2 ( i + 1 / 2 , j ) , H y n + 1 / 2 ( i − 1 / 2 , j ) ] , and the output vector as O r = [ E z n + 1 ( i , j ) ] . Then we can calculate the electric field quantities of next time step using the MLP neural network predicted value, and calculate the magnetic field quantities of next time step using the MLP neural network predicted value, thus we can replace the conventional FDTD update equations with our trained neural networks.

Another thing we have found is that with certain boundary conditions, we can jump out of the conventional “leapfrog integration” techniques, which use electric fields to calculate magnetic fields, and magnetic fields to calculate electric fields. We can calculate the electric fields of next time step using only electric fields of previous time, and no magnetic fields are involved. If we change the input to I r = [ E z n ( i + 1 , j ) , E z n ( i − 1 , j ) , E z n ( i , j + 1 ) , E z n ( i , j − 1 ) , E z n ( i , j ) ] , which is the five electric field points in mesh grid around the output point. When using 2D Mur first-order absorbing boundary condition in TM mode, it can be written as:

[ ∂ E z ∂ x − 1 c ∂ E z ∂ t ] | x = 0 = 0 (4)

where no magnetic fields are involved, we can apply this boundary condition to our FDTD method, and it can be simplified as follow Figure 3.

Because we skipped the magnetic fields quantities update equations in the improved machine learning-based FDTD method mentioned above, we can say that we reduced the algorithmic complexity of FDTD method by using the proposed machine learning-based FDTD method in certain scenario, but we have to

mention that by using neural networks we introduced extra artifacts that may lead to less accurate numerical results. In the MLP neural network architecture, we can achieve an average relative error around 13% at best.

4. Simulation Results and Discussion

In order to examine the accuracy of our newly proposed method, we have made some numerical simulations using python programming language along with keras machine learning framework. We used a 2D 100 * 100 square mesh grid as our simulation area. We set the temporal offset Δt to 0.1 and spatial offset Δ x = Δ y = 2 c Δ t to satisfy the Courant-Friedrichs-Lewy (CFL) condition. The boundary conditions are set to 2D Mur first-order absorbing boundary condition and two Gaussian pulses are placed at point (25, 50) and (75, 50) as our excitation sources. The max time step is set to 100.

Comparisons of conventional FDTD method generated E z surface plot vs neural networks generated E z surface plot are shown in Figure 4, We also take a number of sample points to observe the difference in waveforms of individual points., which are shown in Figure 5 and Figure 6.

As the results indicate that the MLP network can solve electromagnetic problems with acceptable accuracy, the MLP model can achieve an average relative error around 13%, while in certain scenario (e.g. 2D Mur first-order ABC), We can completely omit the equation for updating the magnetic field by using MLP neural network, which will greatly reduce the time complexity of FDTD method.

5. Conclusion

In this paper, we propose a novel FDTD algorithm based on MLP neural networks and find that it can effectively reduce the time complexity of conventional methods under certain conditions. The integration of machine learning into conventional CEM still has a long way to go, but we believe that it’s the future for CEM.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

Cite this paper

Li, S.Y., Lai, S.J., Liu, J.H., Wu, S.B. and Chen, L. (2020) A MLP Based FDTD Method. Journal of Computer and Communications, 8, 279-284. https://doi.org/10.4236/jcc.2020.812022

ReferencesKrizhevsky, A., Sutskever, I. and Hinton, G. (2012) ImageNet Classification with Deep Convolutional Neural Networks. NIPS 2012: Neural Information Processing Systems.Stuart, J. and Russell, P.N. (2010) Artificial Intelligence: A Modern Approach. 3rd Edition, Prentice Hall.Pinkus, A. (1999) Approximation Theory of the MLP Model in Neural Networks. Acta Numerica, 8, 143-195. https://doi.org/10.1017/S0962492900002919