Abstract
Background
The magnetic field directly affects armature motion and is a key parameter in evaluating the performance of an electromagnetic propulsion device (EPD). However, traditional numerical methods lack efficiency, and purely data-driven neural networks fail to ensure accuracy with limited training samples.
Objective
This paper aims to develop a magnetic field prediction method for EPD that enhances both accuracy and physical consistency by incorporating frequency-domain magnetic diffusion constraints into a data-driven framework.
Methods
Firstly, the non-periodic pulsed excitation current of the electromagnetic EPD is transformed into discrete harmonic components through Fourier analysis. Subsequently, physical residuals derived from the magnetic diffusion equation are formulated in the frequency domain and embedded as soft physical constraints in the form of regularization terms into the loss function of a data-driven neural network, forming a dual-driven architecture. Next, the magnetic vector potential in the armature-rail system (ARS) is numerically simulated under varying excitation currents and conductivities to construct the training dataset, which is then used to train the neural network model with physical constraints.
Results
Validation results on the test set demonstrate that the dual-driven model aligns better with underlying physical laws and significantly reduces prediction error. Specifically, with a limited number of known samples, the model reduces the average absolute error by 25.11% and 17.24% compared to the purely data-driven model when using sample sizes of P = 100 and P = 200, respectively.
Conclusions
This paper proposes a dual-driven magnetic field prediction method constrained by frequency-domain magnetic diffusion, which accurately predicts the armature-rail magnetic field distribution under limited samples while ensuring physical consistency. It provides theoretical support and valuable reference for further reliability prediction and optimized design of EPD.
Keywords
Introduction
In modern applications of electromagnetic dynamics, the rail-type EPD has attracted significant attention due to its ability to rapidly and efficiently convert electromagnetic energy into mechanical kinetic energy.1,2 The magnetic field distribution in the ARS is a critical parameter for evaluating the performance of an EPD 3 because it directly influences the armature motion and energy conversion efficiency. Moreover, the magnetic field distribution acts as a bridge for multi-physical coupling of the device, linking the electrical, mechanical, and thermal fields. 4 Therefore, analyzing the characteristics of the magnetic field distribution during the launch process is crucial for device structure optimization and reliability design.
Currently, improving the visualization of the magnetic field distribution of EPD remains challenging. Existing research primarily relies on numerical methods to simulate the armature-rail magnetic field distribution. The finite-difference method was employed to establish a mathematical discretization model of the armature-rail electromagnetic field, and the characteristics of current and magnetic field distribution during armature motion were analyzed. 5 The finite-element method was utilized to analyze the current density and magnetic field distribution in ARS with different calibers and armature structures.6,7 The electromagnetic field control equations were transformed into transport equations and Fluent's standard transport equation solver was utilized for the solution, enabling the simulation of the armature-rail electromagnetic field. 8 However, numerical calculations struggle to satisfy real-time simulation and rapid computation requirements for the magnetic field distribution in ARS of EPD within digital twin scenarios.
For the problem of the magnetic field distribution in ARS, it is crucial to construct a high-accuracy and fast prediction method. Machine learning, with its powerful feature extraction capability, can effectively capture the spatiotemporal variations of the magnetic field, 9 which provides a new solution for efficient prediction of armature-rail magnetic field distribution. A method using a deep operator network was proposed to predict the magnetic field distribution of EPD, considering the influence of the velocity skin effect. 10 A method for predicting the current density field at high speeds was proposed, in which the feature extraction capabilities for complex current distributions were enhanced by incorporating generators based on residual networks, U-Net, and Transformer. 11 An efficient numerical analysis method based on an adaptive recursive algorithm was proposed. A dynamic electromagnetic field model of an H-shaped armature in an electromagnetic rail launch system was constructed by recursively dividing the integration interval and applying regression using the adaptive Simpson's integration method, while considering the armature shape, rail structure, and current skin effect. 12 However, these prediction models are trained solely on known data, which not only does not guarantee that they can accurately reflect the underlying physical mechanisms, but also makes it difficult to obtain sufficiently accurate predictions when the number of available samples is limited.
In recent years, physics-informed neural networks (PINNs) have been proposed as a general framework for embedding physical laws into neural-network training. 13 In a PINN, the loss function is augmented with the residuals of the governing equations evaluated at collocation points, while automatic differentiation is used to compute the required space–time derivatives. This allows the network to fit the available data and satisfy the underlying physics simultaneously, and PINNs have shown promising performance in a variety of problems in fluid mechanics, heat transfer, and electromagnetics under limited-data conditions. 14 However, most existing PINN formulations are constructed in the time domain and are primarily designed for steady-state or periodic excitations. As a result, they are not directly suited to EPD, where the magnetic field is driven by non-periodic pulsed currents and exhibits pronounced skin-effect behavior.
To address these challenges, this paper proposes a dual-driven magnetic field prediction model that integrates data-driven and physics-driven approaches. Based on the non-periodic pulsed excitation conditions of EPD, the physical constraints based on the magnetic diffusion equation established in the frequency domain are introduced as regularization terms into the data-driven neural network modeling process. The feasibility and prediction accuracy of the model are validated using a test set. The results show that the proposed method enables the model to more accurately predict the armature-rail magnetic field distribution with fewer known samples while maintaining compliance with physical laws. Unlike traditional physics-informed neural networks operating in the time domain, the method proposed in this paper introduces a novel and highly accurate dual-driven prediction model constrained by the magnetic diffusion equation in the frequency domain, which is particularly suitable for non-periodic pulsed excitation in EPD. Moreover, it provides theoretical support and valuable reference for further EPD reliability prediction and optimized design.
Electromagnetic model of the armature-rail system
Electromagnetic model
During the electromagnetic launch process, the armature is accelerated to ultra-high velocity by a large pulsed current flowing through the rails. A two-dimensional cross-section of the ARS in the x–y plane is shown in Figure 1. The ARS is composed of an aluminum alloy armature and copper rails. The armature and the rail are modeled as conductors with different electrical conductivities, with their magnetic permeability approximated by that of free space.

Two-dimensional electromagnetic propulsion drive.
The electromagnetic field in the ARS is governed by Maxwell's equations
Define the vector magnetic potential
Frequency-domain analysis of pulsed excitation current
During the electromagnetic launch process, the armature requires short-time high-current power supply to realize the acceleration to ultra-high speed within an extremely brief time. 15 Therefore, the EPD typically adopts the method of synthesizing multiple pulse currents to realize the power supply. The synthesized rail excitation current is shown in Figure 2.

Excitation current of the rail.
According to Fourier analysis, the non-periodic pulsed excitation current signal i(t) in the time domain can be decomposed into a superposition of sinusoidal waves at multiple discrete frequencies in the frequency domain. The time-domain rail current is sampled over a finite time window that fully covers the pulse, from t = 0 to t = 0.002 s. The sampling interval is
The magnitude spectrum of the excitation current is shown in Figure 3.

Excitation current in the frequency domain.
As can be seen from Figure 3, the dominant spectral components are concentrated below 3 kHz and appear at discrete frequencies spaced by 500 Hz. The DC component (0 Hz) has the largest amplitude, about 25 MA, and the amplitudes of higher-frequency components decay rapidly with increasing frequency. Therefore, both the DC field and low-frequency alternating field must be considered in the electromagnetic field computation.
Through the above analysis, the non-periodic pulsed excitation can be extended into a superposition of multiple periodic sinusoidal waves in the frequency domain. This allows the complex time-varying electromagnetic field problem to be dealt with in the frequency domain, which not only can take advantage of the magnetic diffusion equations in the frequency domain, but also simplify the time-dependent problem of the electromagnetic field.
Frequency-domain magnetic diffusion equation
For each harmonic component with angular frequency
Since the physical residuals derived from the magnetic diffusion equation are calculated only within the armature-rail computational domain, the physical residual term for regions outside the computational domain can be directly set to zero.
For the DC component (n = 0), i.e., zero frequency, the current density is constant and relatively uniform. It is determined directly by the excitation current and the conductor's cross-sectional area. At this point, the magnetic diffusion equation degenerates into the Poisson equation. The physical residuals in the armature and rail regions are
Skin depth and current-density distribution
When a high frequency alternating electromagnetic field exists, the current in the conductor is not uniform and is concentrated on the inner surface of the armature-rail due to the skin effect and proximity effect. The current density inside the conductor decays exponentially with depth. Under the effect of alternating current, the current distribution in the conductor is determined by the magnetic diffusion process. This diffusion process can be described by the skin depth δ:
The total current in the conductor is
Therefore, When the skin effect is taken into account, the distribution of current density with depth in the conductor can be expressed as
Thus, this current density distribution can be incorporated into the physical residuals calculated from the magnetic diffusion equation.
Dual-driven neural network model with frequency-domain magnetic diffusion equation constraints
Artificial neural networks can be trained on the known samples of a model. However, for unknown measurement points, the model relies solely on its outputs to make predictions in a “black-box” fashion. 16 With this approach, it is difficult to obtain an accurate description of the magnetic field distribution in an ARS excited by a large pulsed current. Therefore, in this paper, the model is gradually guided and optimized by the physical regularization term, i.e., the residuals of the physical equations are directly introduced into the loss function, so that the output does not rely only on the training data, but also follows the real physical laws.
Network architecture and input-output mapping
In this work, a dual-driven prediction model is developed within the framework of PINNs. The proposed model can be regarded as a specialized PINN variant with frequency-domain magnetic diffusion constraints tailored to the electromagnetic propulsion device. Building on the frequency-domain magnetic diffusion equations derived in the previous section, a dual-driven physics-informed neural network is constructed that approximates the mapping from excitation and material parameters, time, and spatial coordinates to the magnetic vector potential. In this neural network, the residuals of the governing equations are embedded into the loss function of a neural network as soft constraints, so that the network is trained to satisfy both the data and the physics. In this paper, a fully connected multilayer perceptron (MLP) is used to approximate the mapping from input features—combining excitation parameters, material properties, time, and spatial coordinates—to the magnetic vector potential. The loss function is constructed from both data-mismatch terms and frequency-domain magnetic diffusion residuals, forming a dual-driven architecture.
For each sampling point obtained from numerical simulations, the input feature vector of the neural network is defined as
The MLP used in this study consists of 6 hidden layers with 128 neurons per layer. Each hidden layer applies an affine transformation followed by a nonlinear activation function (hyperbolic tangent), and the output layer is linear. All trainable weights are initialized using a Xavier-type scheme to facilitate stable training. Automatic differentiation is used to compute the spatial derivatives of Az with respect to x and y.
Loss function with frequency-domain physical constraints
For a set of Nd data points in the armature and rail regions, the data loss is defined as the mean squared error (MSE) between the neural-network prediction and the corresponding reference value obtained from the numerical simulation
For each harmonic frequency
To achieve better fitting at more critical frequencies, the percentage of different frequency amplitudes are utilized as weights to compute the weighted frequency domain physical loss. Considering all frequency components, the weight coefficient is
The physical losses are summed over all frequencies
The total loss function of the dual-driven model is finally expressed as

The dual-driven neural network modeling framework with physical constraints.
Model training
Two neural-network models are established in this paper: a data-driven model, trained solely using the data loss
Before training, Min–Max normalization and standardization (z-score) are applied to the input and output variables, respectively, scaling the features to comparable ranges and improving convergence. The full dataset generated from numerical simulations (see the next section) is randomly shuffled and split into training and test sets with a ratio of 8:2. No separate validation set is used; all network hyperparameters are fixed a priori based on preliminary experiments, and the held-out test set is employed solely to evaluate the generalization performance of the trained models. The Adam optimizer is used for optimization, with an initial learning rate of 1 × 10−4. The maximum number of epochs is set to 5000. During training, the MSE on the training set is minimized as the optimization objective. After training, the MSE, mean absolute percentage error (MAPE), and R-squared (R2) are computed on the independent test set to evaluate the predictive performance of the model.
In (18), a smaller k indicates that the data loss accounts for a larger proportion of the overall loss. Conversely, a larger k indicates a stronger role for the physics-based loss. The effect of the value of the weight coefficient k on the prediction accuracy was tested on the dual-driven model test set, all other things being equal. The best overall performance on the test set is achieved when k = 0.2. Therefore, this value is adopted for the dual-driven model in the subsequent experiments.
Finite-element baseline model, experimental validation, and dataset generation
Finite-element model and experimental validation
In the case of a stationary armature, using the magnetic vector potential
The governing equation in the air domain enclosing the armature and rail is given by
In this paper, a large number of electromagnetic-field simulations are required to generate the dataset for neural network training. To keep the computational cost at a manageable level, the numerical model adopts the normal-rail geometry shown in Figure 5. The rail length is 150 mm, the rail width is 6 mm, and the rail spacing is 18 mm. The armature and the rail are made of 7075 aluminum alloy and copper, respectively, and the armature mass is 10 g.

Geometric sectional diagram of armature and rail.
To validate the correctness of the finite-element model, an existing planar-enhanced EPD is used, as shown in Figure 6. In this device, a planar rail is added to the outer rail to increase the local magnetic flux density and inductance gradient. The excitation current in the rail is shown in Figure 2. The time history of the y-component of the magnetic flux density at the location of the reserved hole in the middle of the lower rail is measured using a Gaussmeter.

Experimental platform of EPD.
According to the method of He et al., 17 the electromagnetic fields of a planar-enhanced rail configuration and a normal-rail configuration were compared under identical geometrical and excitation parameters. For the typical configuration with a rail width of 6 mm, an upper-lower rail spacing of 18 mm, and an inner-outer rail spacing of 2 mm, the magnetic flux density on the planar-enhanced rail in the mid-plane is approximately 1.74 times that of the normal-rail, while the spatial distribution of the field in the mid-plane remains nearly unchanged. In the planar-enhanced EPD used in the experiment, the magnetic flux density at the collection point is mainly produced by the outer rail before the armature reaches the collection point, whereas after the armature has passed the collection point the magnetic flux density is generated by the superposition of the magnetic fields from both the inner and outer rails. Consequently, for the time interval after the armature has passed the collection point, the difference between the planar-enhanced and normal-rail configurations at this location can be effectively represented by applying a constant scaling factor of 1.74 to the finite-element result of the normal-rail model.
Therefore, to validate the correctness of the finite-element model, the simulated magnetic flux density at the collection point is multiplied by a factor of 1.74 only for the time period after the armature has passed the collection point, and the scaled curve is then compared with the experimental measurement, as shown in Figure 7.

Magnetic flux density curves at rail collection point.
As can be seen in Figure 7, the measured magnetic flux density curve agrees well with the finite-element prediction in both amplitude and temporal trend. This good agreement indicates that the finite-element model can accurately simulate the magnetic field at the collection point. When the armature passes through the collection point, the magnetic field generated by the armature increases the magnetic flux density at the collection point, resulting in a sudden change. Since the numerical simulation model established in this paper assumes a stationary armature, there is no sudden change in the numerical simulation results.
It should be emphasized that the purpose of this experiment is not to directly validate the neural network, but to confirm the reliability of the normal-rail finite-element model that provides the reference datasets for training and testing. Based on this validated finite-element model, electromagnetic-field solutions under different excitation currents and conductivities are generated and used as labeled data during the learning process.
Dataset for neural network training
In order to verify the ability of the dual-driven prediction model to learn the spatiotemporal characteristics of the magnetic field, the effects of the excitation current and the conductivities of the armature and rail on the magnetic field distribution are taken into account. Using the excitation current shown in Figure 2 and baseline conductivities of
From the magnetic-field data generated above, labeled samples for neural-network training are constructed as follows. At each time step and for each parameter combination, P spatial sampling points are selected by non-uniform random sampling biased toward physically important regions, such as the armature-rail interface. For every sampled point, the corresponding excitation-current scaling factor, armature and rail conductivities, time instant, spatial coordinates (x,y), and magnetic vector potential value Az are recorded, forming labeled sample pairs used by the neural network. Since the number of training samples has a significant impact on the accuracy of deep-learning-based magnetic field prediction, this study considers two sampling densities, P = 100 and P = 200 points per snapshot. The collection of all sampled points across all parameter combinations and time steps constitutes the dataset employed in the subsequent model-training stage.
Results and analysis
Quantitative performance under different sample sizes
Two neural-network models are trained and compared: the purely data-driven model and the dual-driven model with frequency-domain magnetic diffusion constraints. To assess prediction accuracy, three error metrics are reported on an independent test set: MSE, MAPE, and R2. Table 1 summarizes their performance for different training sample sizes.
The performance of different models under different training sample sizes.
It can be observed that the dual-driven model maintains high prediction accuracy even with a small number of samples. When the dataset contains 200 samples, the dual-driven model achieves the highest prediction accuracy, with an MSE of 6.8 × 10−5, a MAPE of 4.23%, and an R2 of 0.989. Compared with the data-driven model, the dual-driven model reduces the MAPE by 43.23% when the sample size is 100, indicating that the introduction of frequency-domain magnetic diffusion constraints enables the model to better learn the underlying data distribution, especially in the sparse-sample regime.
The evolution of the training loss with respect to the number of epochs is shown in Figure 8 for both models under P = 100 and P = 200. The dual-driven model converges more rapidly and to a lower loss value than the data-driven model, particularly when the number of samples is limited, confirming the beneficial effect of incorporating physical knowledge into the learning process.

The curve of the loss function with respect to the number of training epochs.
Prediction of the magnetic field
Under the benchmark excitation current and the benchmark conductivities of the armature and rail, the two models are used to predict the magnetic field distribution of the ARS at 0.36 ms. The comparison of the predicted results with the numerical simulation results is shown in Figures 9 and 10 for P = 100 and P = 200, respectively.

Magnetic field prediction results (P = 100). (a) Reference. (b) Data-driven model. (c) Dual-driven model.

Magnetic field prediction results (P = 200). (a) Reference. (b) Data-driven model. (c) Dual-driven model.
As can be seen from Figures 9 and 10, due to the skin effect, the magnetic flux density is more concentrated near the inner surface of the rail and the throat area of the armature. The prediction results indicate that the data-driven model can fit the characteristics of the magnetic field to some extent within the calculation region of the magnetic field of the armature-rail, but its prediction performance is relatively poor, especially in the armature region and the contact region of the armature-rail. Additionally, the increase in the number of sample points decreases the error, which further illustrates the importance of the number of known samples for the accuracy of a machine-learning model. The loss function of the dual-driven model not only considers the influence of the magnetic field data at the known sample points, but also evaluates the training results based on the magnetic diffusion equation, making the model more consistent with objective physical laws.
To more clearly illustrate the error distribution of the model predictions, the pointwise absolute errors between the model predictions and the numerical simulation results are analyzed, and the results are shown in Figures 11 and 12 for P = 100 and P = 200, respectively.

Pointwise absolute error plot (P = 100). (a) Between the reference and the data-driven model. (b) Between the reference and the dual-driven model.

Pointwise absolute error plot (P = 200). (a) Between the reference and the data-driven model. (b) Between the reference and the dual-driven model.
According to the pointwise absolute error plots between the prediction results and the numerical simulation shown in Figures 11 and 12, it can be seen that compared with the data-driven model, the error of the dual-driven model is significantly reduced, especially in the magnetic field distribution in the region of the armature-rail where the current flows. Taking the finite element results as a reference, the average pointwise absolute error of the dual-driven model is reduced by 18.92% and 8.84% compared with the data-driven model for sample sizes P = 100 and P = 200, respectively. This reduction in error is attributed to the embedded physical constraints, which systematically suppress magnetic field distributions that do not comply with the laws of electromagnetic diffusion. It should be noted that the physical constraints in this paper mainly account for the inhomogeneity of the magnetic field distribution caused by current diffusion in the armature-rail conductors. The induced magnetic field at the front end of the moving armature is not explicitly modeled in the physical residuals, because the armature is assumed stationary in the FEM simulations. Consequently, the residual errors of the dual-driven model are mainly concentrated in the frontal region of the armature. This limitation can be mitigated by increasing the number of training samples in this region or by extending the physical model to include armature motion in future work.
To further examine the dynamic evolution of the predicted armature–rail magnetic field and the performance of the prediction model over time, the time histories of magnetic flux density at point A on the armature and point B on the rail are analyzed. Figure 13 compares the predicted results with the numerical simulation results for P = 100 and P = 200. The locations of the two points are shown in Figure 10(a).

Curve of magnetic flux density with time at the different measurement points. (a) P = 100. (b) P = 200.
As shown in Figure 13, the dual-driven model exhibits a markedly better fit to the reference curves than the data-driven model, particularly around regions where the magnetic field changes rapidly over time. Quantitatively, the average absolute errors of the dual-driven model are reduced by 25.11% and 17.24% compared with the data-driven model at P = 100 and P = 200, respectively. Therefore, in the case of known sparse samples, the dual-driven model can better utilize the information from the control equations to improve the prediction accuracy at the unknown measurement points, which is a promising approach to improve the applicability of deep learning methods.
Computational efficiency and potential applications
The average computational time for the stage of preparing the dataset using the results of the numerical simulation was about 1.2 h per sample, amounting to approximately 240 computing hours for 200 individual samples. This phase is the main source of time consumption, but only needs to be performed once to provide the required dataset for subsequent model training. In the model training phase, the training time for the dual-driven model at P = 200 is 4.37 h. Once the model training is completed, it can be invoked multiple times without the need to train it again. In the model prediction stage, the trained model can be called directly for prediction, which takes only a few seconds per prediction and is significantly more efficient than numerical simulation. In conclusion, although it takes a long time in the data preparation and model training phases, in the long run, it is possible to realize fast and efficient multiple predictions of the key magnetic field with a single input. In the digital twin scenario, multi-physics co-optimization of electromagnetic drives and reliability assessments require timely data support and frequent electromagnetic field calculations, and the use of trained neural network models for prediction can greatly shorten the response time and improve the computational efficiency.
Conclusion
To achieve real-time simulation of the armature-rail magnetic field distribution and obtain an accurate prediction model with sparse samples, this paper proposes a dual-driven prediction method for the magnetic field distribution in the ARS of an EPD by introducing frequency-domain magnetic diffusion constraints. The main conclusions are as follows:
The non-periodic pulsed excitation is extended into a superposition of a finite number of periodic sinusoidal waves in the frequency domain. By considering the impact of the skin effect on current distribution in the conductor, a physical constraint based on the magnetic diffusion equation is established in the frequency domain, which not only leverages the advantages of the magnetic diffusion equations in the frequency domain, but also simplifies the time-dependent problem of the electromagnetic field.
The accuracy of the model is significantly enhanced by introducing physical constraints, particularly in the prediction of the magnetic field distribution in the armature-rail region where current flows. The average absolute errors are reduced by 25.11% and 17.24% compared to the data-driven model at sample sizes of P = 100 and P = 200, respectively.
In the case of known sparse samples, introducing physical constraints can control the ‘learning direction’ of the model to a certain extent, guiding the model to obtain more accurate and physically meaningful results. Future work will focus on extending the physical model and experimental validation to include armature motion and three-dimensional effects, enriching the dataset with more collection points, and exploring more advanced network architectures to further enhance prediction accuracy and robustness.
Footnotes
Acknowledgements
This research was funded by the Major Research Program of the National Natural Science Foundation of China (92066206).
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was funded by the Major Research Program of the National Natural Science Foundation of China (92066206).
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
