An Aeromagnetic Compensation Algorithm Based On A
An Aeromagnetic Compensation Algorithm Based On A
College of GeoExploration Science and Technology, Jilin University, Changchun 130012, China
* Correspondence: [email protected]
Abstract: Aeromagnetic compensation is a crucial step in the processing of aeromagnetic data. The
aeromagnetic compensation method based on the linear regression model has poorer fitting capac-
ity than the neural network aeromagnetic compensation algorithm. The existing gradient updating
neural network-based aeromagnetic compensation algorithm is subject to the problem that the gra-
dient disappears during the backpropagation process, resulting in poor fitting ability and affecting
aeromagnetic compensation accuracy. In this paper, we propose a neural network compensation
algorithm with strong fitting ability: residual backpropagation neural network (Res-bp). The algo-
rithm realizes the cross-layer propagation of the gradient through a residual connection so that the
network not only preserves the original information but also acquires additional information during
training, successfully solving the problem of gradient disappearance and boosting the network’s
fitting capacity. The algorithm is applied to the data collected by unmanned aerial vehicles (UAVs)
to verify its effectiveness. The results show that the improvement ratio is improved compared with
the traditional neural network, demonstrating that the algorithm has a significant compensation
effect on aeromagnetic interference and improves the quality of aeromagnetic data.
Citation: Yu, P.; Bi, F.; Jiao, J.; Keywords: aeromagnetic compensation; residual connection; deep learning; unmanned aerial
Zhao, X.; Zhou, S.; Su, Z. An
vehicles (UAVs); gradient disappearance
Aeromagnetic Compensation
Algorithm Based on a Residual
Neural Network. Appl. Sci. 2022, 12,
10759. https://doi.org/10.3390/
app122110759
1. Introduction
Aeromagnetic surveying, as one of the main ways to explore and survey geological
Academic Editors:
resources, is an important aerogeophysical prospecting method [1,2]. Along with the min-
Daniele Sampietro, Martina Capponi
and Lydie Sarah Gailler
iaturization of sensors, aeromagnetic measurement based on UAVs is becoming more
widely used. However, data obtained by a magnetic sensor on an aircraft contain mag-
Received: 13 September 2022 netic interference information, and the effect of compensation for aeromagnetic interfer-
Accepted: 14 October 2022
ence directly determines the quality of aeromagnetic data [3]. Tolles and Lawson estab-
Published: 24 October 2022
lished the T-L model based on magnetic interference and aircraft attitude [4]. Based on
Publisher’s Note: MDPI stays neu- this model, Leliak designed a compensation equation enabling the elimination of mag-
tral with regard to jurisdictional netic interference by solving for a compensation coefficient [5]. Leach regarded magnetic
claims in published maps and institu- compensation as a linear regression problem and proposed a ridge regression (RR) algo-
tional affiliations. rithm to solve the multicollinearity problem in the T-L equation [6]. Wu et al. used prin-
cipal component analysis (PCA) to reduce the multicollinearity of the T-L model [7].
For the aeromagnetic compensation method based on linear regression, if the aero-
magnetic data have a complex or nonlinear structure, the algorithm is unstable, and the
Copyright: © 2022 by the authors. Li-
fitting ability is poor due to the correlation between the data, which affects the quality of
censee MDPI, Basel, Switzerland.
aeromagnetic data [8]. Deep learning is based on the representation learning of data and
This article is an open access article
has a strong fitting ability. Williams proposed the use of neural network modeling for
distributed under the terms and con-
aeromagnetic compensation and established a neural network model of aircraft interfer-
ditions of the Creative Commons At-
ence [9]. However, due to the limited computing power available at the time, the model
tribution (CC BY) license (https://cre-
ativecommons.org/licenses/by/4.0/).
has not been widely used. Zhang analyzed the aircraft swaying interference not
considered in the T-L model and used a one-dimensional convolutional neural network
to remove the effect of tail-boom swing [10]. Xu established a binary classification network
for magnetic anomaly detection and a regression network for geomagnetic noise suppres-
sion and applied deep learning to magnetic anomaly detection and noise elimination [11].
However, in the backpropagation process of neural networks, owing to factors such
as the chain rule, the gradient will disappear, affecting the accuracy of aeromagnetic com-
pensation. Yu used an autoencoder network for aeromagnetic compensation to extract
data features by searching the direction of maximum change in the backpropagation pro-
cess, thereby reducing the multicollinearity of the model. However, in the training pro-
cess of the autoencoder network, the feature extraction of high-dimensional complex data
is not perfect, the gradient is prone to fall into the local minimum, and the problem of
gradient disappearance is not considered [12]. Wang considered the gradient disappear-
ance problem in the autoencoder network training and introduced a residual connection
into the autoencoder network. The features output from each layer of the encoder are
transmitted to the corresponding layer of the decoder through residual connections. The
algorithm is applied to fault diagnosis of generator sets [13]. Ma combined a linear model
and neural network model and proposed a dual estimation method for aeromagnetic com-
pensation [14]. Although this method can suppress the noise caused by the overfitting
problem of the neural network, owing to the excessive number of iterations, the gradient
will approach zero infinitely, and the gradient of the network will disappear, making it
difficult to reduce the loss function, thus affecting the compensation effect. Yu considered
the main factors that affect the generalization ability of the network, analyzed the proba-
bility density function that constitutes the regression neural network, and cited the fully
connected neural network for aeromagnetic compensation, which solved the problem of
overfitting the network and improved the generalization ability of the network, although
the process did not consider the problem of gradient disappearance [15].
To address the gradient disappearance problem of neural networks in aeromagnetic
compensation algorithms, in this paper, we combine a residual connection with neural
networks and propose a neural network aeromagnetic compensation algorithm (Res-Bp).
The features output from the low-level information of the network are transmitted to the
high-level information through the residual connection without intermediate operation to
realize the cross-layer propagation of the gradient [16]. Residual connection changes the
structure of the network and makes it have the ability of identification mapping. It effec-
tively retains the gradient characteristics during backpropagation, alleviates the gradient
disappearance problem of traditional neural networks to a certain extent, and improves
the accuracy of aeromagnetic compensation. The algorithm is applied to the data collected
by UAVs to verify its effectiveness. The remainder of this article is organized as follows.
In Section 2, we briefly introduce the T-L model and analyze the reason for the gradient
disappearance of the primitive neural network, as well as the principle of the algorithm
proposed in this paper. In Section 3, we apply real compensation flight data to conduct
experiments and analysis.
where i is the number of nodes in layer 2, and j is the number of nodes in the input layer,
f (·) is the activation function, and the features of layer l + 1 (l > 2) are:
Appl. Sci. 2022, 12, 10759 4 of 13
h
(l+1)
Zi =f Wlij Zj (l) + bli , (11)
j
where Zj (l) is feature j of layer l, and Wlij is the weight between node j of layer l and
node i of layer l + 1.
To improve the speed of training convergence, in this paper, we select a ReLU acti-
vation function and MSE as the loss function, expressed as:
a a 0
f (a) max(0, a) (12)
0 a 0
2
1 n (13)
Loss (y k yˆ k ) ,
n k 1
where yk is the true value, and yk is the predicted value.
In the process of backpropagation, the gradient descent algorithm is used to calculate
the gradient of loss function on each parameter through the derivative chain rule, the
global optimal parameters are obtained, and the parameters are updated according to the
gradient [17]. Taking two hidden layers as an example, the gradient process of loss func-
tion to W1 is:
Z1 = f W1 X + b1
Z2 = f W2 Z1 + b2 (14)
y = f W3 Z2 + b3
2.3. Res-Bp
To address the problem of gradient disappearance in the aeromagnetic compensation
process of the neural network, we introduce the idea of residual connection and propose
an algorithm with strong fitting ability, Res-Bp. The core of residual connection is the data
fusion of nonlinear and linear features [18]. In forward propagation, the input signal can
be directly propagated from any low level to a high level and has identity-mapping abil-
ity.
As shown in Figure 1, the residual connection has an identity-mapping structure
compared to the ordinary connection. That is, the output (Zl ) of a layer is added to the
new information (F(Zl )) of the layer after nonlinear transformation, and the sum result is
input into the activation function as the output of the next layer.
In the process of forward propagation, assuming that f (·) is a linear activation func-
tion, the features of layer L are:
Appl. Sci. 2022, 12, 10759 5 of 13
(a) (b)
Figure 1. Connection mode of a neural network: (a) ordinary connected structure; (b) residual con-
nected structure.
ZL = F (F …F Zl ,Wl ) (16)
L-1
L
Z =Z + l
F Zi ,Wi , (17)
i=l
be directly propagated to the low level without the transformation of the intermediate
weight matrix [19]. Even if there is gradient attenuation between layers L and l, the gra-
dient of layer L can still be directly transmitted to layer l, realizing the cross-layer prop-
agation of the gradient, which can solve the problem of gradient disappearance and im-
prove the accuracy of aeromagnetic compensation. When ordinary connections are back-
propagating, gradient information cannot be effectively propagated to the lower layer, so
the gradient disappears.
In this paper, the T-L equation is used as the coefficient matrix (Xnx18 , where n is the
sample size) and as the input parameter of the neural network model. The total (yn = Htn)
magnetic interference field is used as the output parameter of the model. The Res-Bp
structure is as shown in Figure 2. Suppose there are two sets of data: a training set
(Xtrain , ytrain ) and a test set (Xtest , ytest ). After the training set is trained by the network model
(Ctrain ), the predicted interference field of the test set is:
ytest = Xtest Ctrain . (21)
The compensated aeromagnetic data are obtained by subtracting the predicted value
(ytest ) from the real value (ytest ).
The improvement ratio (IR) is a measurement scale proposed by the Canadian Avi-
ation Research Center (NAE). At present, this measurement scale is adopted internation-
ally and can reflect the performance of the aeromagnetic measurement system [20,21].
Therefore, the standard deviation (STD) and IR of the aeromagnetic data before and after
compensation are used to evaluate the magnetic interference compensation algorithm:
n
1 2
STD = xi -µ (22)
n
i=1
STDu
IR = , (23)
STDc
where µ is the arithmetic mean of the variable, and STDu and STDc are the standard
deviations of the uncompensated and compensated data, respectively.
3. Experiment
3.1. Compensation Flight
To verify the feasibility of the method, we used an unmanned aerial vehicle (UAV)
to perform a figure-of-merit (FOM) flight to obtain aeromagnetic data. As shown in Figure
3, the UAV platform is equipped with a three-axis fluxgate magnetometer to measure the
three components of the geomagnetic field and a potassium pump magnetometer to meas-
ure the total geomagnetic field.
Appl. Sci. 2022, 12, 10759 7 of 13
The FOM flight [22] includes maneuvers in four directions, each of which includes
three ±5° yaws, three ±5° pitches, and three ±10° rolls. The flight altitude is 50 m, the du-
ration of each maneuver is 10 s, the sampling rate is 10 Hz, and the flight duration is 8–10
min. The FOM flight path is shown in Figure 4, including flight A and flight B. The aero-
magnetic interference data of the two flights are shown in Figure 5.
Figure 4. The FOM flight path. The square represents the beginning of the flight, and the diamond
represents the end of the flight.
(a) (b)
Figure 5. Magnetic interference during flight: (a) magnetic interference during flight A; (b) magnetic
interference during flight B.
Appl. Sci. 2022, 12, 10759 8 of 13
We used the data of flights A and B as the training set and test set, respectively, to
compensate flight B and flight A. The compensation results are shown in Figures 7 and 8.
Table 2 compares the results of Res-Bp and neural networks (BP). In flight B, Res-Bp re-
duces STD from 2.334 to 0.260, and IR is 8.977. In flight A, Res-Bp reduces STD from 2.112
to 0.266, and IR is 7.940. Compared with the linear regression method (Table 1), Res-Bp
has a stronger compensation ability for complex and nonlinear data. Compared with the
neural network, Res-Bp improves the compensation accuracy and fitting ability.
Appl. Sci. 2022, 12, 10759 9 of 13
Because the parameter update is related to the gradient of the loss function, the
larger the gradient, the faster the parameter update, which is conducive to the conver-
gence of the network. Figure 9 and the Loss curve (Figure 10a,b) show that the gradient
of Res-Bp is larger than that of BP, the convergence speed of Res-Bp is faster than that of
BP, and the algorithm is more stable, demonstrating that Res-Bp effectively alleviates the
gradient disappearance problem and improves the fitting ability of the network. How-
ever, as the network descends along the direction of negative gradient, the principle of
weight adjustment is to take the local optimum at each step, leading to the local minimum
(Figure 11), and the global optimum solution cannot be obtained. Figure 10 shows that BP
and Res-Bp have local minimum values, preventing the network from reaching the ex-
pected optimal state, resulting in unstable performance.
Figure 9. The gradient value of the same parameter during Res-Bp and BP training.
(a) (b)
Appl. Sci. 2022, 12, 10759 11 of 13
(c) (d)
2
Figure 10. Res-Bp and BP loss and R : (a) compensation loss of flight B data; (b) compensation loss
of flight A data; (c) compensation R2 of flight B data; (d) compensation R2 of flight A data.
The decisive coefficient (R2 ) measures the goodness of fit [23] and is expressed as:
2
2
∑m
k=1 yk - yk
R y, y = 1- 2
, (24)
∑m
k=1 yk - yk
where yk is the real value, yk is the predicted value, and yk is the mean real value.
We used R2 to measure the performance of the model. The closer R2 is to 1, the bet-
ter the fitting degree of the regression line to the real value and the better the model’s
performance. Therefore, according to the R2 curve (Figure 10c,d), the fitting degree of
Res-Bp is stronger than that of the neural network, and it converges faster.
4. Discussion
We demonstrated the effectiveness of combining a residual connection with a neural
network in Res-Bp to improve aeromagnetic compensation accuracy. However, some
magnetic interference still cannot be fully compensated, with many possible explanations.
First, during the FOM flight, the flight control system of the UAV should be manually
controlled, using a low-altitude flight to obtain aeromagnetic data. However, due to the
Appl. Sci. 2022, 12, 10759 12 of 13
influence of control and real-time meteorological factors, the flight attitude of the UAV is
unstable and cannot fully comply with the FOM flight. An unstable flight attitude aggra-
vates the multicollinearity of the model and affects the accuracy of the compensation
model. Second, the number of training sets may not be sufficient. Multiple FOM flights
can be carried out, and multiple flight dataset can be used as a training set to further train
the network to improve its generalization ability in order to improve compensation accu-
racy. Third, it may be affected by factors such as the activation and loss functions in the
model. Fourth, there are local minima in Res-Bp and BP in the training process, which
affect the fitting ability of the network and therefore the quality of aeromagnetic data. In
a future study, the compensation model will be further improved.
5. Conclusions
Based on the linear regression method used to eliminate magnetic interference, prob-
lems such as insufficient fitting ability and an unstable algorithm are encountered. Alt-
hough the neural network is a nonlinear function approximation network with good per-
formance, it’s fitting ability is better than that of linear regression and it is widely used in
aeromagnetic compensation owing to the effect of gradient backpropagation and the in-
evitable problem of gradient disappearance on the fitting ability. Because the FOM flight
of the UAV is not standardized, there will be noise in the aeromagnetic data. Even after
normalization, the data still contain problems, leading to gradient problems in the net-
work. To improve compensation accuracy, we proposed Res-Bp, which is a neural net-
work fitting compensation algorithm based on the T-L model. By combining residual con-
nection with a neural network, the output of a layer can directly cross several layers as the
input of a later layer, which considerably improves the integrity of gradient information
in the backpropagation process. Experiments with several groups of FOM flight data
show that the algorithm is effective. The results show that Res-Bp has better aeromagnetic
compensation ability than traditional neural networks, effectively retaining the gradient
in the backpropagation process and avoiding the problem of gradient disappearance. Ad-
ditionally, the convergence process of the network is accelerated, the propagation of fea-
tures is strengthened, and the fitting ability of the network and the accuracy of aeromag-
netic compensation are improved.
Author Contributions: P.Y., J.J., F.B.: Conceptualization, Methodology, Software; J.J., S.Z.: Re-
sources Data curation; F.B.: Writing-Original draft preparation; F.B., Z.S.: Visualization; J.J., F.B.,
X.Z.: Writing-Reviewing and Editing. All authors have read and agreed to the published version of
the manuscript.
Funding: This research was funded by the Natural Science Foundation of Jilin, grant number
20220101147JC.
Conflicts of Interest: The authors declare no conflict of interest.
References
1. Xiong, S.Q. Technological innovation and application of aerogeophysical exploration. J. Geomech. 2020, 26, 791–818.
2. Meng, Q.K.; Zhou, D.W. History and Prospect of aeromagnetic compensation technology at home and abroad. Geophys. Geo-
chem. Explor. 2017, 41, 694–699.
3. Noriega, G. Aeromagnetic compensation in gradiometry—Performance, model stability, and robustness. IEEE Geosci. Remote
Sens. Lett. 2014, 12, 117–121.
4. Tolles, W.E.; Lawson, J.D. Magnetic Compensation of MAD Equipped Aircraft; Airborne Instruments Lab. Inc.: Mineola, NY, USA,
1950; p. 201.
5. Leliak, P. Identification and evaluation of magnetic-field sources of magnetic airborne detector equipped aircraft. IRE Trans.
Aerospace Navig. Electr. 1961, 3, 95–105.
6. Leach, B.W. Aeromagnetic compensation as a linear regression problem. In Information Linkage between Applied Mathematics and
Industry II; Academic Press: London, UK, 1980; pp. 139–161.
7. Wu, P.L.; Zhang, Q.Y. Aeromagnetic compensation algorithm based on principal component analysis. J. Sens. 2018, 2018, 7.
8. Zhao, X.; Yu, P.; Jiao, J. A New Improved Algorithm for Aeromagnetic Compensation. IOP Conf. Ser.: Earth Environ. Sci. 2021,
660, 012132.
Appl. Sci. 2022, 12, 10759 13 of 13
9. Williams, P.M. Aeromagnetic compensation using neural networks. Neural Comput. Appl. 1993, 1, 207–214.
10. Zhang, D.K. Analysis of Aeromagnetic Swing Noise and Corresponding Compensation Method. IEEE Trans. Geosci. Remote
Sens. 2021, 60, 1–10.
11. Xu, X.; Huang, L.; Liu, X. DeepMAD: Deep Learning for Magnetic Anomaly Detection and Denoising. IEEE Access 2020, 99, 1–1.
12. Zhao, X.; Jiao, J. An aeromagnetic compensation algorithm based on a deep autoencoder. IEEE Geosci. Remote Sens. Lett. 2020,
19, 3044999.
13. Wang, Z. Fault Early Warning of Wind Turbine Generator based on Residual Autoencoder Network. In Proceedings of the 6th
International Conference on High Performance Compilation, Computing and Communications, Jilin, China, 23–25 June 2022.
14. Ma, M.; Zhou, Z.; Cheng, D. A dual estimate method for aeromagnetic compensation. Meas. Sci. Technol. 2017, 28, 115904.
15. Yu, P.; Zhao, X.; Jiao, J. An improved neural network method for aeromagnetic compensation. Meas. Sci. Technol. 2021, 32,
045106.
16. He, K.; Zhang, X.; Ren, S. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer
Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778.
17. Jiao, J.; Yu, P.; Zhao, X. Real-Time Aeromagnetic Compensation With Compressed and Accelerated Neural Networks. IEEE
Geosci. Remote Sens. Lett. 2022, 19, 1–5.
18. Jastrzębski, S.; Arpit, D.; Ballas, N. Residual connections encourage iterative inference. arXiv 2017, arXiv:1710.04773.
19. He, K.; Zhang, X.; Ren, S. Identity mappings in deep residual networks. In European Conference on Computer Vision; Springer,
Cham: Switzerland, 2016; pp. 630–645.
20. Hardwick, C.D. Important design considerations for inboard airborne magnetic gradiometers. Geophysics 1984, 49, 2004–2018.
21. Noriega, G. Performance measures in aeromagnetic compensation. Leading Edge 2011, 30, 1122–1127.
22. Zhao, X.; Zheng, X.C.; Jiao, J. Fast Processing Method of Aeromagnetic Compensation Basedon Fluxgate Estimation. J. Jilin Univ.
(Earth Sci. Ed.) 2019, 49, 857–864.
23. Li, J.J.; Zhang, J.T. Study on the determinacy of the determinate coefficient of regression model. Stat. Decision Making 2005, 11,
19–20.