# Magnetic Moment Estimation Algorithm Based on Convolutional Neural Network
## 3 Model and Experiment
### Dataset  
The 2D CNN proposed in this paper uses the three components of the geomagnetic field and the scalar magnetic anomaly signal as input samples. The network consists of three convolutional layers designed to extract feature information from the input samples, with the labels corresponding to the components of the target magnetic moment. A dataset is generated in MATLAB using the magnetic dipole model. The input dataset consists of the three components of the geomagnetic field from the model and the scalar magnetic anomaly signal. The label data include the three components of the magnetic moment. These three components are defined within the same coordinate system, specifically using the North-East-Down (NED) coordinate system, to facilitate subsequent work. Given the small horizontal detection distance, the plane gradient of the geomagnetic field can be neglected [30], and it is assumed that the geomagnetic field signal remains constant within the detection range. The dataset is generated according to the parameters specified in Table 2:  
1. The magnitude of the geomagnetic field is 50,000 nT, with a geomagnetic field inclination of 45\({}^{\circ}\) and a declination of \(-5^{\circ}\);
2. The simulation range is 4 km \(\times\) 4 km, with a spatial sampling rate of 0.1 sampling points per meter;
3. The height varies from 500 m to 1000 m in 100 m steps;
4. The target magnetic moment modulus ranges from 10\({}^{4}\) to 10\({}^{5}\) A\(\cdot\)m\({}^{2}\), with a step size of 10\({}^{4}\) A\(\cdot\)m\({}^{2}\);
5. The target magnetic moment declination ranges from \(-180^{\circ}\) to 180\({}^{\circ}\), with a step size of 45\({}^{\circ}\). The magnetic moment inclination ranges from \(-90^{\circ}\) to 90\({}^{\circ}\), with a step size of 30\({}^{\circ}\). The dataset used in this paper consists of 1800 samples, each represented by a 401 \(\times\) 401 \(\times\) 4 matrix, with the output label being a three-dimensional vector. The dataset is divided into a training set (70%), a validation set (15%), and a test set (15%). The samples include scalar magnetic anomaly signals and three-component geomagnetic field signals, generated from various heights, target magnetic moment magnitudes, and magnetic moment angle configurations. The independent test set ensures that the model is not overfitted to the training data, offering a more accurate evaluation of its final performance and generalization ability. This approach highlights the model's capacity to handle new data in real-world scenarios. During aeromagnetic operations, magnetic anomaly signals detected by the magnetic sensor are subject to noise. The performance of the model is evaluated under different noise levels by applying varying SNRs to the dataset. The noise primarily results from the aeromagnetic environment, with the flight vehicle being the main factor influencing the noise level [31]. As a result, the noise impacts both the training and test set data. \begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Settings** \\ \hline Local geomagnetic field setting (Modulus, & \((5\times 10^{4}\) nT, 45\({}^{\circ}\), \(-5^{\circ}\)) \\ Inclination, Deflection) & \\ Target magnetic moment setting (Modulus, & \((10^{4}\sim 10^{5}\) A \(\cdot\) m\({}^{2}\), \(-90^{\circ}\)\(\sim 90^{\circ}\), \(-180^{\circ}\)\(\sim 180^{\circ}\)) \\ Inclination, Deflection) & (Step Length: 10\({}^{4}\) A \(\cdot\)m\({}^{2}\), 30\({}^{\circ}\), 45\({}^{\circ}\)) \\ Local size & 4 \(\times\) 4 km \\ Spatial sampling rate & 0.1 sampling point/m \\ Relative height & 500 \(\sim\) 1000 m (Step Length: 100 m) \\ \hline \end{tabular}
\end{table} 
Table 2: Simulation target parameters. Gaussian white noise with SNRs ranging from \(-30\) dB to \(50\) dB were added to the dataset. Figure 7 illustrates this, where Figure 7a represents the dataset without noise, and Figure 7b shows the dataset after noise has been added. Currently, the noise floor of scalar magnetic field sensors is quite low.