Magnetic Field Visualization Teaching Based on Fusion Method of Finite Element and Neural Network

: We developed a visual teaching platform that can calculate the magnetic ﬁeld of magnetic core inductance in real time. The platform adopts the combination of two theories of ﬁnite element calculation and neural network technology. It can enhance students’ understanding and application of the basic knowledge of electromagnetic ﬁelds. First, the ﬁnite element method was used to calculate the magnetic ﬁeld of the magnetic core inductance, and the magnetic ﬁeld data set under different input parameters was obtained. On this basis, the neural network method was used to learn the data set and train the corresponding model. Then the trained neural network model was used to calculate the magnetic core inductance magnetic ﬁeld. After comparing with the ﬁnite element calculation results, we found that the calculation results of the neural network model combined with the ﬁnite element were in good agreement with the ﬁnite element calculation results. Compared with the ﬁnite element calculation method, the calculation speed of the magnetic ﬁeld distribution calculated by the neural network was faster. Taking the calculation of the magnetic core inductance magnetic ﬁeld as an example, the calculation time was shortened by about 170 times. Finally, we built a magnetic ﬁeld visualization teaching platform based on MATLAB. The example magnetic ﬁeld was quickly predicted by the neural network, saving computing time and effectively improving the teaching of electromagnetic ﬁeld theory.


Introduction
The outbreak of coronavirus has made colleges and universities fully aware of the importance of information-based teaching [1][2][3]. A school's traditional theory combined with an experimental teaching mode is very resource-intensive and can no longer meet the learning needs of students. Only the integration of traditional teaching and informatization can ensure higher teaching quality [4][5][6]. As a professional course that analyzes the fundamental laws and application principles of various electromagnetic phenomena, electromagnetic field theory places high demands on students' understanding and cognition, and has always been a difficult point for students to learn. A large number of difficult-tounderstand formulas greatly hinder students' understanding and the understanding of abstract objective concepts [7][8][9].
With the gradual maturity of finite element technology, different forms of electromagnetic fields can be realized through corresponding finite element calculations. The electromagnetic field that was originally invisible and intangible can be expressed in the form of a field diagram. This kind of visual teaching that actively adopts the means of modern educational technology can cultivate students' interest in learning, enrich the teaching content, greatly improve teaching efficiency, and bring the teaching to a new level. However, teaching based on finite element theory is still a computationally expensive process [10][11][12].

Finite Element Modeling Principles
When calculating the magnetic field, the model is regarded as a steady-state field and the displacement current is ignored. At this time, the Maxwell equations are satisfied: In the formula, H is the magnetic field strength (A/m), J is the current density (A/m 2 ), and B is the magnetic induction intensity, also known as the magnetic flux density (T).
There are constitutive equations in the medium: where µ 0 and µ r are the vacuum permeability and relative permeability, respectively. The vector magnetic potential A is introduced so that A satisfies: The boundary conditions in the air domain are expressed as: where n is the outer normal unit vector of the conductor surface in the eddy current region.
In addition, the current density also satisfies the equation: J e = NV coil SR coil e coil (6) where J e is the source current density; N is the number of turns of the winding coil; V coil is the voltage excitation applied on the winding; R coil is the winding resistance; e coil is the direction vector of the current density at each point of the current-carrying coil; and S is the winding coil cross-sectional area.
The simultaneous equation to obtain the relationship between the vector magnetic potential A and the source current density J e is: Since the inductor parameters are known, the core vector magnetic potential A and the magnetic flux density B can be solved together with Equation (3) to complete the calculation of the magnetic field.

Neural Network Model
The artificial neural network is a parallel, distributed processing structure composed of processing units interconnected with undirected signal channels called connections. These processing units have local memory and can perform local operations that depend solely on the current value of all input signals that arrive at the processing unit via the input link as well as the value stored in the processing unit's local memory. Each processing unit has a single output connection, and the output signal can be any desired mathematical model. There are many kinds of neural networks, such as radial basis neural networks, Hopfield networks, competitive neural networks, and back-propagation networks [19][20][21].
The neural network is a typical multi-layer feedforward (usually three-layer) artificial neural network. Structurally, it consists of input, hidden, and output layers with nodes in each layer. Adjacent layer nodes are connected by weights, but the nodes in each layer are independent of each other. Theoretically, it has been proven that a neural network with a single hidden layer can approximate any nonlinear function with arbitrary precision [22][23][24]. In practical applications, the neural network with a single hidden layer can also meet the needs of calculation well. The structure diagram of the neural network is shown in Figure 1: 0 = nA (5) where n is the outer normal unit vector of the conductor surface in the eddy current region.
In addition, the current density also satisfies the equation: e Je coil coil coil NV SR = (6) where Je is the source current density; N is the number of turns of the winding coil; Vcoil is the voltage excitation applied on the winding; Rcoil is the winding resistance; ecoil is the direction vector of the current density at each point of the current-carrying coil; and S is the winding coil cross-sectional area.
The simultaneous equation to obtain the relationship between the vector magnetic potential A and the source current density Je is: Since the inductor parameters are known, the core vector magnetic potential A and the magnetic flux density B can be solved together with Equation (3) to complete the calculation of the magnetic field.

Neural Network Model
The artificial neural network is a parallel, distributed processing structure composed of processing units interconnected with undirected signal channels called connections. These processing units have local memory and can perform local operations that depend solely on the current value of all input signals that arrive at the processing unit via the input link as well as the value stored in the processing unit's local memory. Each processing unit has a single output connection, and the output signal can be any desired mathematical model. There are many kinds of neural networks, such as radial basis neural networks, Hopfield networks, competitive neural networks, and back-propagation networks [19][20][21].
The neural network is a typical multi-layer feedforward (usually three-layer) artificial neural network. Structurally, it consists of input, hidden, and output layers with nodes in each layer. Adjacent layer nodes are connected by weights, but the nodes in each layer are independent of each other. Theoretically, it has been proven that a neural network with a single hidden layer can approximate any nonlinear function with arbitrary precision [22][23][24]. In practical applications, the neural network with a single hidden layer can also meet the needs of calculation well. The structure diagram of the neural network is shown in Figure 1:  In the figure, x n is the input variable; i, j, and k are the number of nodes in the input layer, hidden layer, and output layer, respectively; w ij and w jk are the connection weights between layers; and y ij and y jk are the output value of the hidden layer and the output value of the output layer, respectively. The flow of the operation process is shown in Figure 2: In the figure, xn is the input variable; i, j, and k are the number of nodes in the input layer, hidden layer, and output layer, respectively; wij and wjk are the connection weights between layers; and yij and yjk are the output value of the hidden layer and the output value of the output layer, respectively. The flow of the operation process is shown in Figure 2: The learning process of the neural network algorithm consists of forward propagation and back-propagation. In the forward propagation process, the input signal of the learning sample is first sent to the input layer. Then it is transmitted to the output layer through the hidden layer, and the corresponding predicted value is output after the calculation of the output layer. When the error between the predicted value and the real value does not meet the preset target accuracy requirements, the network turns to backpropagation. The network feedbacks the error information from the output layer to the input layer by layer, and adjust the weights and thresholds between the layers. Through repeated loop iterations, the error between the output value of the network and the expected output value of the sample is gradually reduced until the set number of loops or accuracy requirements are met. At this point, the learning process of the network ends, and the optimized weights and thresholds are obtained. Then, based on the internal relationship, the input information of the unknown sample is extracted, and the mapping of the unknown sample can be obtained. The learning process of the neural network algorithm consists of forward propagation and back-propagation. In the forward propagation process, the input signal of the learning sample is first sent to the input layer. Then it is transmitted to the output layer through the hidden layer, and the corresponding predicted value is output after the calculation of the output layer. When the error between the predicted value and the real value does not meet the preset target accuracy requirements, the network turns to back-propagation. The network feedbacks the error information from the output layer to the input layer by layer, and adjust the weights and thresholds between the layers. Through repeated loop iterations, the error between the output value of the network and the expected output value of the sample is gradually reduced until the set number of loops or accuracy requirements are met. At this point, the learning process of the network ends, and the optimized weights and thresholds are obtained. Then, based on the internal relationship, the input information of the unknown sample is extracted, and the mapping of the unknown sample can be obtained.
In this paper, the iron core material was an isotropic linear material. Additionally, the final magnetic field cloud map B was related to the coil current, the number of coil turns and the magnetization model. As shown in Table 1, three input quantities were used for the research. Coil turns 3 Magnetization model The study considered two magnetization models. The relative permeability was used for the linear material, and the B-H curve wa used for nonlinear material. The B-H curve for nonlinear material is shown in Figure 3. In this paper, the iron core material was an isotropic linear material. Additionally, the final magnetic field cloud map B was related to the coil current, the number of coil turns and the magnetization model. As shown in Table 1, three input quantities were used for the research. Table 1. Three input feature quantities.

No.
Input Feature Quantity 1 Coil current 2 Coil turns 3 Magnetization model The study considered two magnetization models. The relative permeability was used for the linear material, and the B-H curve wa used for nonlinear material. The B-H curve for nonlinear material is shown in Figure 3. The specific structure of the neural network model in this study is shown in Figure 4. The number of hidden layer nodes was determined by the empirical formula: = √ⅈ + + , where a is a constant between 1 and 10. Through experimental comparison, we determined that there were nine hidden layers. . 9 .

Input layer Hidden layer Output layer
Magnetization model The specific structure of the neural network model in this study is shown in Figure 4. The number of hidden layer nodes was determined by the empirical formula: where a is a constant between 1 and 10. Through experimental comparison, we determined that there were nine hidden layers. In this paper, the iron core material was an isotropic linear material. Additionally, the final magnetic field cloud map B was related to the coil current, the number of coil turns and the magnetization model. As shown in Table 1, three input quantities were used for the research. Table 1. Three input feature quantities.

No.
Input Feature Quantity 1 Coil current 2 Coil turns 3 Magnetization model The study considered two magnetization models. The relative permeability was used for the linear material, and the B-H curve wa used for nonlinear material. The B-H curve for nonlinear material is shown in Figure 3. The specific structure of the neural network model in this study is shown in Figure 4. The number of hidden layer nodes was determined by the empirical formula: = √ⅈ + + , where a is a constant between 1 and 10. Through experimental comparison, we determined that there were nine hidden layers. . 9 .

Input layer Hidden layer Output layer
Magnetization model

Construction and Application of Magnetic Field Visualization Teaching Platform
The time required to calculate the magnetic field of the core inductance using the finite element method was about 12 s. The neural network method was used to learn 100,000 sets of data, and the model obtained from the training was used to predict the magnetic field of the magnetic core inductance; the time required was about 0.07 s. Compared with the finite element method, the calculation time of the magnetic field distribution was decreased by about 170 times through the neural network method. In terms of calculation speed, the neural network model has obvious advantages compared with finite element calculation.

Magnetic Field Calculation Based on Finite Element Principle
The magnetic core model used in the finite element calculation was a regular rectangle with a shape of 20 mm × 100 mm, and the coils on both sides were a regular rectangle with a shape of 10 mm × 100 mm, which was wound on the magnetic core. The core model of the inductor with the magnetic core is shown in Figure 5.
The time required to calculate the magnetic field of the core induct finite element method was about 12 s. The neural network method wa 100,000 sets of data, and the model obtained from the training was used magnetic field of the magnetic core inductance; the time required was abo pared with the finite element method, the calculation time of the magnetic tion was decreased by about 170 times through the neural network meth calculation speed, the neural network model has obvious advantages com nite element calculation.

Magnetic Field Calculation Based on Finite Element Principle
The magnetic core model used in the finite element calculation was a gle with a shape of 20 mm × 100 mm, and the coils on both sides were a re with a shape of 10 mm × 100 mm, which was wound on the magnetic core. of the inductor with the magnetic core is shown in Figure 5. The magnetic field parameter settings were: the relative permittiv winding, and air domain were 1, and the relative permeability of the wind domain were 1.
Before solving the physical field, the model needed to be divided in then used for finite element calculation. Since the magnetic flux density o core was mainly calculated and accurate data were required, the meshe into ultra-fine meshes. The grid contained 12,666 cells. The segmentation in Figure 6. The magnetic field parameter settings were: the relative permittivity of the core, winding, and air domain were 1, and the relative permeability of the winding and the air domain were 1.
Before solving the physical field, the model needed to be divided into meshes and then used for finite element calculation. Since the magnetic flux density of the magnetic core was mainly calculated and accurate data were required, the meshes were divided into ultra-fine meshes. The grid contained 12,666 cells. The segmentation result is shown in Figure 6.
In this paper, the iron core material was silicon steel. When the coil current was 100 A, the relative permeability of the silicon steel was 7000, and the number of winding turns was 100 turns, the finite element calculation result is shown in Figure 7.
It can be seen from the magnetic flux density cloud diagram that the magnetic flux density in the magnetic core was larger, and the magnetic flux density in the coil was smaller. The magnetic flux density in the air decreased with the distance from the magnetic core. Appl. Sci. 2022, 12, x FOR PEER REVIEW 7 of 16 Figure 6. Meshing result.
In this paper, the iron core material was silicon steel. When the coil current was 100 A, the relative permeability of the silicon steel was 7000, and the number of winding turns was 100 turns, the finite element calculation result is shown in Figure 7. It can be seen from the magnetic flux density cloud diagram that the magnetic flux density in the magnetic core was larger, and the magnetic flux density in the coil was smaller. The magnetic flux density in the air decreased with the distance from the magnetic core.

Magnetic Field Calculation Based on Neural Network
Using finite element calculation, the calculation results were organized into original data. The original data set was divided into a training set and a test set. After the model was generated by learning the data of the training set, the data of the test set was predicted  In this paper, the iron core material was silicon steel. When the coil current was 100 A, the relative permeability of the silicon steel was 7000, and the number of winding turns was 100 turns, the finite element calculation result is shown in Figure 7. It can be seen from the magnetic flux density cloud diagram that the magnetic flux density in the magnetic core was larger, and the magnetic flux density in the coil was smaller. The magnetic flux density in the air decreased with the distance from the magnetic core.

Magnetic Field Calculation Based on Neural Network
Using finite element calculation, the calculation results were organized into original data. The original data set was divided into a training set and a test set. After the model was generated by learning the data of the training set, the data of the test set was predicted

Magnetic Field Calculation Based on Neural Network
Using finite element calculation, the calculation results were organized into original data. The original data set was divided into a training set and a test set. After the model was generated by learning the data of the training set, the data of the test set was predicted to verify the accuracy of the model. The accuracy R of the neural network method for the learning model of the magnetic field of the inductor with magnetic core was 0.981. It can be seen that the prediction accuracy of the model to the data was relatively high.
The magnetic flux density predicted by the neural network algorithm was compared with the magnetic flux density calculated by the finite element method, and the results are shown in Figure 8. Each point in Figure 8 corresponds to a point in the magnetic field of the cloud image. However, the coordinates of the points in Figure 8 are not the coordinates in the cloud map; instead, the abscissa is the magnetic flux density calculated by the finite element, and the ordinate is the magnetic flux density predicted by the neural network. The closer the point is to the straight line, the closer the predicted value was to the calculated value, the more accurate the prediction was. It can be seen that the magnetic flux density prediction result by the neural network method was very close to the finite element calculation result, and there was some error between the predicted value and the calculated value near 0.15. In the teaching of the magnetic field of an inductor with a magnetic core, the magnetic field in the magnetic core and its vicinity is worthiest of attention, and the magnetic field in the air domain far away from the magnetic core is secondary. Therefore, as long as the neural network prediction model can guarantee the prediction accuracy within a sufficient range, even if the numerical accuracy of a few points is insufficient, the influence of these points can be ignored, and the final output of the model is valid. are shown in Figure 8. Each point in Figure 8 corresponds to a point in the magnetic field of the cloud image. However, the coordinates of the points in Figure 8 are not the coordinates in the cloud map; instead, the abscissa is the magnetic flux density calculated by the finite element, and the ordinate is the magnetic flux density predicted by the neural network. The closer the point is to the straight line, the closer the predicted value was to the calculated value, the more accurate the prediction was. It can be seen that the magnetic flux density prediction result by the neural network method was very close to the finite element calculation result, and there was some error between the predicted value and the calculated value near 0.15. In the teaching of the magnetic field of an inductor with a magnetic core, the magnetic field in the magnetic core and its vicinity is worthiest of attention, and the magnetic field in the air domain far away from the magnetic core is secondary. Therefore, as long as the neural network prediction model can guarantee the prediction accuracy within a sufficient range, even if the numerical accuracy of a few points is insufficient, the influence of these points can be ignored, and the final output of the model is valid. The neural network prediction result of inductor with magnetic core is shown in Figure 9. It can be seen that the distribution trend of the predicted result in Figure 9 and the calculated result in Figure 7 is basically the same. The magnetic flux density in the middle of the magnetic core is the largest, the magnetic flux density at both ends of the magnetic core is smaller, and the magnetic flux density at the tip of the magnetic core is larger. The magnetic flux density in the coil is small, and the magnetic flux density in the air decreases with the increase of the distance from the magnetic core. The neural network prediction result of inductor with magnetic core is shown in Figure 9. It can be seen that the distribution trend of the predicted result in Figure 9 and the calculated result in Figure 7 is basically the same. The magnetic flux density in the middle of the magnetic core is the largest, the magnetic flux density at both ends of the magnetic core is smaller, and the magnetic flux density at the tip of the magnetic core is larger. The magnetic flux density in the coil is small, and the magnetic flux density in the air decreases with the increase of the distance from the magnetic core.
In order to check the accuracy of the neural network model for other shapes of inductor magnetic field calculation, we changed the shape of the inductor and performed the calculation again. The magnetic field cloud diagrams calculated using the finite element and neural network models are shown in Figure 10.
It can be seen from the figure that the magnetic flux density was concentrated in the iron core, and the magnetic flux density was especially concentrated at the corners of the iron core. The magnetic flux density was smaller near the air gap. The calculation results were more accurate, and the distribution trends of the calculation results and the predicted results were basically the same.
In order to compare the calculation gap between the two more accurately, the different calculated values of each point in the cloud image were compared, as shown in Figure 11. Each point in the image corresponds to a point in the cloud image. The abscissa is the magnetic flux density calculated by the finite element, and the ordinate is the magnetic flux density predicted by the neural network. The closer the point is to the straight line, the closer the predicted value was to the calculated value, the more accurate the prediction was. It can also be seen that the magnetic flux density prediction result by the neural net-work method was very close to the finite element calculation result, to a degree that can basically meet the needs of magnetic field teaching. Appl. Sci. 2022, 12, x FOR PEER REVIEW 9 of 16 Figure 9. The neural network prediction result.
In order to check the accuracy of the neural network model for other shapes of inductor magnetic field calculation, we changed the shape of the inductor and performed the calculation again. The magnetic field cloud diagrams calculated using the finite element and neural network models are shown in Figure 10.
(a) Figure 9. The neural network prediction result.

Magnetic Field Visualization Teaching Platform
The engineering electromagnetic field visualization teaching software includes two parts: input parameters and calculation drawing. The three parameters of coil current, coil turns, and magnetization model can be changed in the "Input Parameters" menu. The cloud image is calculated after the parameter setting is completed and the "Calculate" button is clicked. After the calculation is completed, the cloud diagram of the calculation result is displayed in the drawing area. Click the "Magnetic field lines" button to display the magnetic field lines. Students can freely set various parameters, obtain the magnetic flux density distribution cloud map of the magnetic core inductor under different parameters through software calculation, and analyze the calculation results. When the core material is linear, students can manually change the relative permeability. When the core material is nonlinear, students can use the B-H curve to calculate. When the relative permeability is selected as the magnetization model, an application example is shown in Figure 12. The version number of MATLAB used is R2016a, from North China Electric Power University, Baoding, China. The calculation results obtained by different calculation methods at the same position in the magnetic field were compared statistically. The magnetic flux density at the center point of the inductance was recorded and compared with the finite element calculation value. The results are shown in Figure 13. It can be seen that the neural network (NN) value was very close to the finite element method (FEM) value for different coil currents. The maximum relative error was about 2.69%, which meets the needs of electromagnetic field teaching and engineering applications. In order to check the accuracy of the neural network model for other shapes of inductor magnetic field calculation, we changed the shape of the inductor and performed the calculation again. The magnetic field cloud diagrams calculated using the finite element and neural network models are shown in Figure 10. It can be seen from the figure that the magnetic flux density was concentrated in the iron core, and the magnetic flux density was especially concentrated at the corners of the iron core. The magnetic flux density was smaller near the air gap. The calculation results were more accurate, and the distribution trends of the calculation results and the predicted results were basically the same.
In order to compare the calculation gap between the two more accurately, the different calculated values of each point in the cloud image were compared, as shown in Figure 11. Each point in the image corresponds to a point in the cloud image. The abscissa is the magnetic flux density calculated by the finite element, and the ordinate is the magnetic flux density predicted by the neural network. The closer the point is to the straight line, the closer the predicted value was to the calculated value, the more accurate the prediction was. It can also be seen that the magnetic flux density prediction result by the neural network method was very close to the finite element calculation result, to a degree that can

Magnetic Field Visualization Teaching Platform
The engineering electromagnetic field visualization teaching software includes two parts: input parameters and calculation drawing. The three parameters of coil current, coil turns, and magnetization model can be changed in the "Input Parameters" menu. The cloud image is calculated after the parameter setting is completed and the "Calculate" button is clicked. After the calculation is completed, the cloud diagram of the calculation result is displayed in the drawing area. Click the "Magnetic field lines" button to display the magnetic field lines. Students can freely set various parameters, obtain the magnetic flux density distribution cloud map of the magnetic core inductor under different parameters through software calculation, and analyze the calculation results. When the core material is linear, students can manually change the relative permeability. When the core material is nonlinear, students can use the B-H curve to calculate. When the relative permeability is selected as the magnetization model, an application example is shown in Figure 12. The version number of MATLAB used is R2016a, from North China Electric Power University, Baoding, China.

Magnetic Field Visualization Teaching Platform
The engineering electromagnetic field visualization teaching software includes two parts: input parameters and calculation drawing. The three parameters of coil current, coil turns, and magnetization model can be changed in the "Input Parameters" menu. The cloud image is calculated after the parameter setting is completed and the "Calculate" button is clicked. After the calculation is completed, the cloud diagram of the calculation result is displayed in the drawing area. Click the "Magnetic field lines" button to display the magnetic field lines. Students can freely set various parameters, obtain the magnetic flux density distribution cloud map of the magnetic core inductor under different parameters through software calculation, and analyze the calculation results. When the core material is linear, students can manually change the relative permeability. When the core material is nonlinear, students can use the B-H curve to calculate. When the relative permeability is selected as the magnetization model, an application example is shown in Figure 12. The version number of MATLAB used is R2016a, from North China Electric Power University, Baoding, China.  When the magnetization model is the B-H curve, the application example is shown in Figure 14.
Similar to Figure 13, the magnetic flux density at the center of the inductor was recorded. The results of comparing the calculated values of the neural network with those calculated by the finite element are shown in Figure 15. It can be seen that under different working conditions, the maximum relative error of the two calculation methods was about 1.89%. The calculation results meet the needs of electromagnetic field teaching and engineering applications. point of the inductance was recorded and compared with the finite element calculation value. The results are shown in Figure 13. It can be seen that the neural network (NN) value was very close to the finite element method (FEM) value for different coil currents. The maximum relative error was about 2.69%, which meets the needs of electromagnetic field teaching and engineering applications. When the magnetization model is the B-H curve, the application example is shown in Figure 14. The interactive interface of the MATLAB-based magnetic field visualization teaching software is friendly and clear, and the operation steps are simple and easy to learn. In terms of teaching arrangements, teachers can not only demonstrate and lead students to learn about engineering electromagnetic fields in class, but also assign the operation of the visualization software as homework after explaining the relevant theoretical basis, leaving it to the students to explore and complete by themselves. These teaching arrangements can fully mobilize students' subjective initiative, cultivate students' autonomous learning ability, and also enable students to consolidate what they have learned after class and deepen their understanding of what they have learned [25][26][27]. Compared with the teaching mode adopted in traditional engineering electromagnetic field classroom teaching, the use of engineering electromagnetic field visualization teaching software to assist teaching has the following advantages: (1) The visualization effect is good. The graphical interface of the engineering electromagnetic field visualization teaching software is easy to control. The software can calculate the electromagnetic field around the inductor with a magnetic core under different material parameters under various working conditions. The calculated results are used to help students intuitively understand the magnetic field characteristics and enhance students' understanding of theoretical knowledge. (2) The computational efficiency is high. The flow field of the calculation example in the engineering electromagnetic field visualization teaching software is solved by the neural network algorithm. The algorithm has a clear concept, high computational efficiency, and good numerical characteristics. Students can deepen their understanding of the algorithm by combining the implementation process of the neural network algorithm in the software source code. (3) The software lowers the threshold for the use of magnetic field calculation, and is easy to extend to classroom-assisted teaching, reducing teaching costs. Students can learn electromagnetic field theory by directly using the software combined with textbook-related knowledge. When the magnetization model is the B-H curve, the application example is shown in Figure 14. Similar to Figure 13, the magnetic flux density at the center of the inductor was recorded. The results of comparing the calculated values of the neural network with those calculated by the finite element are shown in Figure 15. It can be seen that under different working conditions, the maximum relative error of the two calculation methods was about 1.89%. The calculation results meet the needs of electromagnetic field teaching and engineering applications.  Similar to Figure 13, the magnetic flux density at the center of the inductor was recorded. The results of comparing the calculated values of the neural network with those calculated by the finite element are shown in Figure 15. It can be seen that under different working conditions, the maximum relative error of the two calculation methods was about 1.89%. The calculation results meet the needs of electromagnetic field teaching and engineering applications. The interactive interface of the MATLAB-based magnetic field visualization teaching software is friendly and clear, and the operation steps are simple and easy to learn. In terms of teaching arrangements, teachers can not only demonstrate and lead students to

Conclusions
In recent years, finite element calculation as well as modern computer graphics and image processing capabilities have advanced by leaps and bounds, while electromagnetic experimental data remain abstract and difficult to understand. Finite element theory and artificial intelligence technology have achieved leapfrog development in the field of electromagnetics. It has become an inevitable trend to carry out electromagnetic experiment teaching through software. In terms of improving the quality of personnel training, strengthening the cultivation of students' practical and innovative abilities is the fundamental requirement. Experimental teaching is the most common practice method for students in school and is also the most direct way to verify knowledge.
Based on finite element theory and neural network theory, a magnetic field visualization teaching platform was established using finite element calculation and MATLAB software. The experimental platform based on finite element theory is more accurate, but the calculation time is slower; the experimental platform based on neural network theory has a faster calculation time, but the numerical value is slightly wrong. The combination of the two uses the results calculated by the finite element theory as the training data and uses the neural network to establish an experimental platform, so that the results can be calculated more quickly when the experimental requirements are met. Compared with the finite element calculation method, the calculation speed of the magnetic field distribution calculated by the neural network is faster. Taking the calculation of the magnetic core inductance magnetic field as an example, the calculation time can be shortened by about 170 times.
The electromagnetic experiment teaching platform based on a neural network embeds new theoretical knowledge that can not only show students the process of realizing electromagnetic experiments using a deep learning method, but also provide a resource sharing platform and software support services for related scientific research work. The platform can play an important role in improving teaching quality, improving students' interest in learning as well as their practical ability, and have a positive impact on cultivating comprehensive and innovative talents.