Next Article in Journal
Parameters Optimization of Catalytic Tubular Nanomembrane-Based Oxygen Microbubble Generator
Next Article in Special Issue
Research on Decomposition of Offset in MEMS Capacitive Accelerometer
Previous Article in Journal
The Influence of Printing Orientation on Surface Texture Parameters in Powder Bed Fusion Technology with 316L Steel
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A High-Precision Magnetic-Assisted Heading Angle Calculation Method Based on a 1D Convolutional Neural Network (CNN) in a Complicated Magnetic Environment

1
State Key Laboratory of Transducer Technology, Shanghai Institute of Microsystem and Information Technology, Chinese Academy of Sciences, Shanghai 200050, China
2
School of Microelectronics, University of Chinese Academy of Sciences, Beijing 100049, China
3
Vtran Tech (Chang Zhou) Co., Ltd., Shanghai 200135, China
*
Authors to whom correspondence should be addressed.
Micromachines 2020, 11(7), 642; https://doi.org/10.3390/mi11070642
Submission received: 14 June 2020 / Revised: 22 June 2020 / Accepted: 25 June 2020 / Published: 29 June 2020
(This article belongs to the Special Issue Inertial MEMS Devices)

Abstract

:
Due to its widespread presence and independence from artificial signals, the application of geomagnetic field information in indoor pedestrian navigation systems has attracted extensive attention from researchers. However, for indoors environments, geomagnetic field signals can be severely disturbed by the complicated magnetic, leading to reduced positioning accuracy of magnetic-assisted navigation systems. Therefore, there is an urgent need for methods which screen out undisturbed geomagnetic field data for realizing the high accuracy pedestrian inertial navigation indoors. In this paper, we propose an algorithm based on a one-dimensional convolutional neural network (1D CNN) to screen magnetic field data. By encoding the magnetic data within a certain time window to a time series, a 1D CNN with two convolutional layers is designed to extract data features. In order to avoid errors arising from artificial labels, the feature vectors will be clustered in the feature space to classify the magnetic data using unsupervised methods. Our experimental results show that this method can distinguish the geomagnetic field data from indoors disturbed magnetic data well and further significantly improve the calculation accuracy of the heading angle. Our work provides a possible technical path for the realization of high-precision indoor pedestrian navigation systems.

1. Introduction

The application of global positioning systems (GPS) in the field of navigation has resulted in greater convenience for human society. However, in some scenarios, such as rural areas, indoors, and during field rescue, navigation based on satellite positioning technology is far from being sufficient in meeting the requirements. At the same time, with the development of microelectronics manufacturing and algorithm theory, researchers have begun to study new technological solutions to meet diverse navigation requirements in the case of GPS failure [1,2,3,4]. Hence, the emergence of various high-precision indoor navigation technologies, including wireless signals [5], images [6], maps, etc. Among them, indoor pedestrian inertial navigation routes, based on inertial sensors, have attracted a lot of attention due to them being autonomous and not susceptible to external jamming [7,8,9]. Additionally, inertial sensors are becoming increasingly cheaper and more widely used in smart devices, which could support the use of pedestrian inertial navigation through the development of micro-electro-mechanical systems (MEMS).
In order to take advantage of MEMS-based inertial autonomous navigation, Suprem et al. [10] adopted a method to correct missing GPS routes by integrating data from inertial sensors in smartphones. Prateek et al. [11] used two foot-mounted inertial navigation systems (INS), one on each foot, to reduce the heading drift in pedestrian navigation by applying a range constraint based on the spatial separation between the two feet. Li et al. [12] adopted indoor environmental modeling and construction to optimize heading angle errors. Deng et al. [13] utilized PCA over the horizontal plane of acceleration signals for local walking direction extraction. Chen et al. [14] used a floor plan, and Zhuang et al. [15] used Wi-Fi to reduce the accumulated error of an inertial navigation system. The above scholars used model constraints and peripheral auxiliary equipment to reduce the heading angle accumulation error of the pedestrian inertial navigation, resulting in an increase in the cost or complexity of the system. Comparison with the above methods, the ubiquitous geomagnetic field information could be used to solve the same problem without additional cost.
Geomagnetic field signals can provide value direction information in indoor pedestrian inertial navigation due to their flexible application scenarios and high degree of integration. Magnetic-assisted inertial navigation technology is able to use geomagnetic field data without being constrained by the scene [16,17]. However, there are a large number of magnetic signal interference sources in indoor environments, which makes the indoor magnetic environment particularly complex, therefore making geomagnetic field signals extremely susceptible to interference and distortion. In this case, the direct use of raw magnetic signals will cause errors in the navigation heading angle calculation, which will affect navigation accuracy [18]. In order to reduce magnetic signal interference, researchers have proposed a statistical-based magnetic data screening method, but this requires prior assumptions to be met and performs poorly in complex magnetic environments, which limits its application scenarios [19,20].
In recent years, rapidly developing machine learning algorithms have provided researchers with effective tools for signal processing. Deep learning algorithms, Bayesian networks, etc., have been used in many applications in classification scenarios [21,22]. As a data classification method, one-dimensional convolutional neural network (1D CNN) has powerful classification performance in time series recognition and does not rely on any assumptions, enabling its use in combining feature extraction and signal classification into a learning subject in various environments [23]. In this article, we describe the development of an algorithm based on 1D CNN to screen magnetic data and verify its performance. First, we analyzed the source of the magnetic signal and then designed a 1D CNN structure based on the characteristics of the magnetic signal. In addition, the unsupervised learning neural network—which has a powerful autonomous classification function and can autonomously analyze the characteristics of the given data and classify them into different categories with a perfectly designed network structure—was introduced to optimize our network [24,25]. The use of unsupervised learning methods eliminates the need to provide the neural network with any prior labels, thus completely avoiding any interference to the network classification performance based on various artificial assumptions. This method can also solve the problem of the magnetic interference source being difficult to locate in an indoor complex magnetic environment. Through training based on a back propagation (BP) algorithm, 1D CNN can learn to recognize the difference between the signals of different modes [26]. The 1D CNN can be well trained using the collected dataset such that it can distinguish non-interfering and interfering geomagnetic field signals. Finally, we integrated the well-trained 1D CNN into a pedestrian inertial navigation system and generated a high-precision heading angle calculation algorithm. We tested this algorithm through experiments, and the results show that our algorithm can improve the accuracy of indoor navigation.
The rest of this paper is organized as follows. Section 2 introduces the characteristics of geomagnetic fields and the navigation system with a magnetic signal screening algorithm based on 1D CNN. Section 3 shows the results of our experiments and verifies the performance of our proposed navigation system. Finally, Section 4 concludes the paper and provides some future directions.

2. The Principle of the System

2.1. Geomagnetic Signal Analysis

The Earth’s magnetic field is a naturally occurring planetary phenomenon which follows the principles of dynamo theory and is created by the constant motion of Earth’s outer core, composed mostly of molten iron [27]. The geomagnetic field can be modeled as a dipole, and the geomagnetic field lines originate at the positive pole of the dipole (magnetic south) and end at the negative dipole (magnetic north). Since the geomagnetic poles do not coincide with the geographic poles, there is a declination μ between the geomagnetic heading and the geomagnetic heading. A triaxial magnetometer can be used to measure the geomagnetic field vector. With the proper transformation of the geomagnetic field components to the horizontal plane, geographic heading ψ can be estimated using Equation (1), where H x and H y are the components of the geomagnetic field in the horizontal plane.
ψ = arctan ( H y H x ) + μ
In indoor pedestrian inertial navigation, the heading angle can be obtained using a MEMS gyroscope. The error in the heading angle calculated by the gyroscope accumulates twice over time because the gyroscope contains measurement errors. The accuracy of the heading angle obtained by geomagnetic information is not related to time. Hence, the geomagnetic field can be used to correct the accumulation error of the heading angle calculated by the gyroscope. However, there are a large number of artificial interference sources randomly distributed throughout indoor spaces, as shown in Figure 1. The geomagnetic field information measured by a magnetometer is not accurate under these conditions, and the interference magnetic data sequence will show a different value model in three axes, as shown in Figure 2. Due to magnetic anomalies, the heading angle information contained in the magnetic data can be disturbed. Correcting the heading angle by using the interference geomagnetic data will increase the systematic error. Therefore, a method is urgently needed to verify whether the geomagnetic field data are causing interference before using magnetic data to achieve a more accurate navigation performance.

2.2. Algorithm Structure and Process

In order to make full use of the magnetic data information and avoid interference from using magnetic data anomalies, we designed a novel algorithm flow to calculate the heading angle. As shown in Figure 3, the algorithm can be divided into three main parts. The first part is used for the collection and screening of magnetic data. In this part, the magnetic data are collected by the magnetometer sensor and input into our algorithm. Our algorithm treats the magnetic data collected within a certain time window as a set, and we record this set as a magnetic data sequence.
The magnetic data sequence collected by the magnetometer will then be transmitted to a neural network. Once this neural network is well trained, it can be used as an indicator in the algorithm. It can determine whether the magnetic data sequence belongs to a magnetic anomaly sequence or is geomagnetic sequence data. When the neural network verifies that the received magnetic data sequence is a magnetic anomaly sequence, which contains incorrect information, our algorithm will round it down to avoid erroneous effects on the system’s heading angle calculation. When the neural network indicates that the collected magnetic data sequence is undisturbed data, the algorithm will transmit this set of data to the second part. The second part of the algorithm integrates an extended Kalman filter, which is a special form of particle filtering and can be used to correct magnetic data with a smaller computation in our devices, transmitted from the previous part, and fuse the information obtained by other inertial sensors to calculate the heading angle [28,29]. Because the instantaneous value of the inertial sensor is accurate and the first part of the algorithm can periodically provide accurate magnetic data to correct the accumulated error of the inertial sensor, the accuracy of the system’s heading angle solution will be significantly improved by this method. Following the calculation of the heading angle in the second part, in the third part, the algorithm will use this calculated heading angle to calculate the speed and acceleration of the pedestrian, thereby correcting the trajectory of the pedestrian.

2.3. Magnetic Anomaly Detection Based on Unsupervised Learning

For magnetic data screening, the second part of the algorithm includes a convolutional neural network (CNN). In order to get good screening results, we carefully defined the topology of the neural network based on the characteristics of the magnetic data. Since the collected magnetic data were three-dimensional vectors, we defined four channels consisting of three axis values and the model of the magnetic data vector for input into the neural network. We can define the dimensions of the input according to the length of the input time series. As shown in Figure 4a, the length of the time window we chose here was 13, so the dimension of the input signal was 13. After the magnetic sequence signal was transmitted into the network, we used a two-layer convolutional network to extract its features. It is obvious that the nature of the magnetic sequence depends on the relationship between adjacent data, so we can extract the data characteristics between them using a convolution operation. In the network we designed, the first layer of the network used a convolution kernel of length 4 and extracted 64 data features. In the second layer of the network, we also used a convolution kernel of length 4 to extract 64 data characteristics.
After passing through a pooling layer and a fully connected layer, we used the SoftMax function to obtain two outputs, which, respectively, indicate the network’s probability of judging whether they are in a magnetic anomaly state or geomagnetic field data state. Since the learning network is unsupervised, our training process uses a combination of forward and backward propagation algorithms. We used the K-cluster theory to define the loss function. If we note the network as function f and β represents all the parameters in the two convolutional layers and the full connection layer, the feature extracted from the input can be described as:
v = f β ( X )
where X represents the magnetic data sequence:
X = [ M t M t + 1 M t + 12 ]
The input sequence has four channels as mentioned above, and its length is 13. The dimension of vector M is 4 × 1 , and the dimension of X is 4 × 1 × 13 . For a vector M , it contains magnetic field vector and magnetic field strength. And the x-component of the vector is noted as M x , the y-component of the vector is noted as M y , the z-component of the vector is noted as M z and the strength of the vector is noted as M l . We can rewrite it as a 4 × 13 matrix X:
X = [ M x , t M x , t + 1 M x , t + 12 M y . t M y , t + 1 M y , t + 12 M z , t M z , t + 1 M z , t + 12 M l , t M l , t + 1 M l , t + 12 ]
Therefore, the distance of the two feature vectors for the cluster is
d β ( X , Y ) = f β ( X ) f β ( Y )
Since the SoftMax function is used, we use w to represent the weight vector of the SoftMax layer, and we can get the probability of feature v being recognized as class i ( i = 0, 1, …):
P ( i | v ) = exp ( w i T v ) j = 1 n exp ( w i T v )
The objective of training is maximum:
P ( β , w ) = i = 1 n p ( i | f β ( x i ) )
The negative log-likelihood of the training set is:
J ( β , w ) = i = 1 n log P ( i | f β ( x i ) )
The β represents all the parameters in the CNN network, and the w represents the weight vector of the two classes. In the stochastic gradient descended method, if we note that the learning ratio is α , the updated method of the parameters is
β i , t = β i , t 1 α β i , t 1 J ( β , w )
w i , t = w i , t 1 α w i , t 1 J ( β , w )
As shown in Figure 4b, by inputting a magnetic signal sequence collected from a large number of indoor environments into the network, the loss value of train data and test data (validation) will continue decrease with the training process, which implies that the network can gradually learn the difference between a normal magnetic signal and an abnormal magnetic signal in the magnetic signal sequence, and classify them. After the neural network is well trained, it can accurately complete the classification of signals. Figure 4c represents the magnetic anomaly detection results using our 1D CNN model. The bule points and red points represent the magnetic data collected by our device. The green points are the projector of the magnetic data in the XY-plane heading angle space, and the cyan points are the strength value of magnetic data in Z-axis. We use the blue point to indicate the geomagnetic data extracted from the magnetic data by our 1D CNN, and the red points are the interference magnetic data. As we can see, the magnetic data are divided into two groups, and we will verify the effectiveness of the separation in the following sections.

2.4. Geomagnetic Signal-Assisted Heading Angle Calculation

We can enter the geomagnetic field data obtained in the second part of the algorithm in Figure 3 into an extended Kalman filter (EKF) to make full use of the heading angle information contained in the geomagnetic signal and correct the error caused by the inertial navigation sensor in the system. The specific methods for the heading angle calculation are described below.
In the process of attitude angle calculation for pedestrian inertial navigation, the quaternion calculation with a simple arithmetic process can simplify the arithmetic process and improve efficiency without loss of accuracy. The relationship between the quaternion and the attitude angle can be obtained through a certain attitude angle operation in the attitude matrix, which can be represented by Equations (11) and (12), respectively. C m represents the attitude matrix, [ q 0 q 1 q 2 q 3 ] represents the quaternion, and the attitude angles are ψ for the heading angle, θ for the pitch angle, and ϕ for the roll angle.
C b n = ( cos θ cos ψ cos ϕ sin ψ + sin ϕ sin θ cos ψ sin ϕ sin ψ + cos ϕ sin θ cos ψ cos θ sin ψ cos ϕ cos ψ + sin ϕ sin θ sin ψ sin ϕ cos ψ + cos ϕ sin θ sin ψ sin θ sin ϕ cos θ cos ϕ cos θ )
C b n = ( ( q 0 2 + q 1 2 q 2 2 q 3 2 ) 2 ( q 1 q 2 q 0 q 3 ) 2 ( q 1 q 3 + q 0 q 2 ) 2 ( q 1 q 2 + q 0 q 3 ) ( q 0 2 q 1 2 + q 2 2 q 3 2 ) 2 ( q 2 q 3 q 0 q 1 ) 2 ( q 1 q 3 q 0 q 2 ) 2 ( q 2 q 3 + q 0 q 1 ) ( q 0 2 q 1 2 q 2 2 + q 3 2 ) )
The attitude angle equation based on quaternions is:
( θ ϕ ψ ) ( q ) = ( arcsin ( 2 ( q 1 q 3 q 0 q 2 ) ) atan 2 ( 2 ( q 2 q 3 + q 0 q 1 ) , ( q 0 2 q 1 2 q 2 2 + q 3 2 ) ) atan 2 ( 2 ( q 1 q 2 + q 0 q 3 ) , ( q 0 2 + q 1 2 q 2 2 q 3 2 ) ) )
When using the extended Kalman filter for the attitude angle calculations, the measurements of the MEMS gyroscope were used to update the equation of the state, and interference-free magnetic data obtained through 1D CNN classification were used as the observation to correct errors in the one-step prediction of the equation of state. Hence, the prediction and measurement models f and h can be defined as differentiable functions of X and μ with zero mean multivariate Gaussian process and measurement noise with covariances Q k and R k .
X k = f ( X k 1 , u ) + N ( 0 , Q k )
Z = h ( X k ) + N ( 0 , R k )
Gyroscope measurements contain errors, and though these errors only have a small effect on state predictions over short periods of time, they can accumulate over time. Indoor geomagnetic field data can be disturbed for short periods of time in some areas, but interference-free geomagnetic field data can accurately calculate heading angles of information at any time. The extended Kalman filter can combine the features of both, using interference-free magnetic data to correct for deviations in the heading angle, resulting in greater accuracy of the attitude angle. In order to reduce the amount of computation and ensure accuracy, we use quaternion to update the attitude angle. The gyroscope has zero bias instability, we also estimate the zero bias of the gyroscope in real time. Based on the above information, we can establish the state vector X :
X = [ q 0 q 1 q 2 q 3 ω x b ω y b ω z b ] T
where ω x b , ω y b , and ω z b are the three gyroscope biases.
One-step prediction of the quaternion was calculated using the derivative of quaternion:
q k = q k 1 + q ˙ d t
The quaternion differential equation is
q ˙ = 1 2 q ω = [ 0 ω x ω y ω z ω x 0 ω z ω y ω y ω z 0 ω x ω z ω y ω x 0 ] × [ q 0 q 1 q 2 q 3 ]
where ω is calculated using
{ ω x = ω ˜ x ω x b + Δ ω x ω y = ω ˜ y ω y b + Δ ω y ω z = ω ˜ z ω z b + Δ ω z
ω ˜ x , ω ˜ y , and ω ˜ z are the measurements of the MEMS gyroscope, and the gyroscope biases were unchanged during the prediction step. The equation of state based on X can be built as
X k = f ( X k 1 , μ k ) = [ q 0 + d t 2 ( q 1 ( ω x ω x b ) q 2 ( ω y ω y b ) q 3 ( ω z ω z b ) ) q 1 + d t 2 ( q 0 ( ω x ω x b ) + q 3 ( ω y ω y b ) q 2 ( ω z ω z b ) ) q 2 + d t 2 ( q 3 ( ω x ω x b ) + q 0 ( ω y ω y b ) + q 1 ( ω z ω z b ) ) q 3 + d t 2 ( q 2 ( ω x ω x b ) q 1 ( ω y ω y b ) + q 0 ( ω z ω z b ) ) ω x b ω y b ω z b ]
The Jacobian can be calculated to produce the state-transition matrix Φ :
Φ = f X = [ 1 d t 2 ( ω x ω x b ) d t 2 ( ω y ω y b ) d t 2 ( ω z ω z b ) d t 2 q 1 d t 2 q 2 d t 2 q 3 d t 2 ( ω x ω x b ) 1 d t 2 ( ω z ω z b ) d t 2 ( ω y ω y b ) d t 2 q 0 d t 2 q 3 d t 2 q 2 d t 2 ( ω y ω y b ) d t 2 ( ω z ω z b ) 1 d t 2 ( ω x ω x b ) d t 2 q 3 d t 2 q 0 d t 2 q 1 d t 2 ( ω z ω z b ) d t 2 ( ω y ω y b ) d t 2 ( ω x ω x b ) 1 d t 2 q 2 d t 2 q 1 d t 2 q 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 ]
The calibration algorithm proposed in this paper corrects the heading angle deviation in pedestrian inertial navigation using the geomagnetic field information obtained by 1D CNN screening without interference from the indoor environment. As the heading angle obtained from the geomagnetic signal is an absolute angle, which is not related to time, it can compensate for the phenomenon of divergence of the heading angle error with time in inertial navigation. Then, the observation vector and measurement equation of the extended Kalman filter is as follows:
Z = [ m c x m c y m c z ] T
where m c x , m c y , and m c z indicate geomagnetic field data classified by 1D CNN.
During the initialization of pedestrian inertial navigation, we can obtain geomagnetic field data [ m x 0 m y 0 m z 0 ] and set the value of the initialized magnetic field vector [ 0 b m y b m z ] , where b m y = m x 0 2 + m y 0 2 and b m z = m z 0 . When navigating and locating pedestrians, the quaternion can be used to obtain the attitude matrix, which records the pedestrian’s attitude angle. Using the attitude matrix and the initial magnetic field vector, we are able to deduce the value of the magnetic field at the current position.
[ m x m y m z ] = h ( x k ) [ m x m y m z ] = C n b [ 0 b m y b m z ] [ m x m y m z ] = [ 2 ( q 1 q 2 + q 0 q 3 ) b m y + 2 ( q 1 q 3 q 0 q 2 ) b m z ( q 0 2 q 1 2 + q 2 2 q 3 2 ) b m y + 2 ( q 2 q 3 + q 0 q 1 ) b m z 2 ( q 4 q 3 q 0 q 1 ) b m y + ( q 0 2 q 1 2 q 2 2 + q 3 2 ) b m z ]
The Jacobian can be calculated to produce the observation matrix H :
H = h x = [ 2 q 3 b m y 2 q 2 b m z 2 q 2 b m y + 2 q 3 b m z 2 q 1 b m y 2 q 0 b m z 2 q 0 b m y + 2 q 1 b m z 0 0 0 2 q 0 b m y + 2 q 1 b m z 2 q 1 b m y + 2 q 0 b m z 2 q 2 b m y + 2 q 3 b m z 2 q 3 b m y + 2 q 2 b m z 0 0 0 2 q 2 b m y + 2 q 0 b m z 2 q 1 b m y 2 q 1 b m z 2 q 3 b m y 2 q 2 b m z 2 q 3 b m y + 2 q 3 b m z 0 0 0 ]
Linearization of the non-linear state equations and observational equations can be achieved using Taylor expansion, which allows the use of a Kalman filter for attitude angle calculations. The process is as follows.
Predicted state estimate:
X k = f ( X k 1 )
Predicted estimate covariance:
P = Φ P Φ T + Q
Measurement residual:
Y = Z h ( X k )
Kalman gain:
k = P H T / ( H P H T + R )
Updated state estimate:
X = X k + K Y
Updated estimate covariance:
P = ( I K H ) P
We implemented an algorithm based on 1D CNN magnetic anomaly classification for simulation and testing according to the above procedure of extended Kalman filtering, and we analyzed and discussed the test results for heading angle accuracy.

3. Experiments and Results

3.1. Magnetic Anomaly Detection and Trajectory Experiments

To verify the effectiveness of our proposed algorithm, we built a wearable navigation platform and used it to perform a series of experiments in indoor scenes. As shown in Figure 5, our system includes a MEMS accelerometer, MEMS gyroscope, magnetometer, and some auxiliary electronics component. The device is attached to the tester’s waist, and the tester walks around the room to verify the error of heading angle and the accuracy of navigation positioning accuracy. The navigation method adopts pedestrian dead reckoning based on heading angle and Weinberg’s stride estimation in Reference [30]. The test environment we chose is an office in a building. The building contains sources of magnetic field interference, such as steel structures, doors and windows, elevators, and cables, which can all contribute to generating a complex indoor magnetic environment.
In order to explain the working principle and performance of our algorithm, we first analyzed the magnetic field signal distribution of the indoor test track. As shown in Figure 6a, the collected magnetic field information is displayed on a plan map. The color map also indicates the magnitude of the magnetic data. We can see that the measurement values for the indoor magnetic field data are not uniform, which indicates that the indoor magnetic environment is quite complex, and geomagnetic field information has been disturbed.
Next, we studied the calculation of the heading angle in two cases, aiming to verify the effectiveness of magnetic data screening based on 1D CNN on the pedestrian inertial navigation performance of the system. In one case, we used the raw magnetic data collected by the device to directly calculate the heading. In the other case, the magnetic data are screened out by a well-trained 1D CNN before being used to calculate the heading angle. The 1D CNN discards the bad magnetic data and extracts the geomagnetic data to improve the accuracy of heading angle calculation. We plotted the trace of the tester, as shown in Figure 6b. The pink dash represents the reference trajectory, and the dash dotted line shows the navigation trajectory obtained by the heading angle which is calculated by the raw magnetic data. We also indicate the heading angle using a different color in the navigation trajectory. As can be seen, in the absence of screening using 1D CNN, the calculated heading angle deviates from the reference value. This leads to further deviations in the final navigation trajectory.
The navigation trace obtained by our algorithm with the 1D CNN screening model was plotted in Figure 6c. The heading angle is also indicated by a different color in the navigation trajectory. As can be seen, when using the measured magnetic field data, we first classify the magnetic data using the trained 1D CNN network and then calculate the heading angle for each step of the walking pedestrian. Due to the assistance in screening the magnetic data by 1D-CNN, the calculated values of the heading angle at some key corner points (marked in red) have been well corrected in Figure 6c. This shows that our algorithm significantly improves the accuracy of the system’s heading angle, thus also obtaining a more accurate trajectory.
Based on two different methods for calculating the heading angle, we can obtain two pedestrian inertial navigation trajectories as shown in Figure 6b,c. The yellow points indicate the starting and ending positions, and the positioning accuracy of the two algorithms is shown in Table 1. Using our proposed algorithm for magnetic classification by 1D CNN, we were able to reduce the localization error by 1.62 m.

3.2. New Comparative Experiment

For a more intuitive comparison, a new trajectory was used to verify the validity of our proposed algorithm, and we compared this algorithm with the magnetic anomaly detection algorithm (a test method based on a double threshold value, noted as the DTT method) [20]. In Figure 7a, we show navigation trajectories based on three different methods for calculating the heading angles. The pink dash represents the reference trace line of our tester. The red line was obtained from the navigation system using raw magnetic data without any screening out methods. For the green trajectory, we used the DTT method to screen the magnetic data. For calculation of the blue line, we used the proposed 1D CNN to screen the raw magnetic data. As we can see from these four lines, compared to the Kalman filtering of raw data, the DTT–Kalman screening algorithm improved the accuracy of navigation. After screening with the dual-threshold algorithm, the magnetic field data were corrected. The screened data were then applied to the calculation of the heading angle. As shown in Figure 7b, the heading angle obtained using the DTT–Kalman classification method showed some improvements in accuracy compared to the data obtained using Kalman. Further, compared with the DTT–Kalman algorithm, our proposed 1D CNN–Kalman performed better in classifying a magnetic anomaly and obtained a more accurate heading angle in Figure 7b and navigation trajectories in Figure 7a.
In Figure 7b,c, we reveal the principles behind the advantage of the 1D CNN–Kalman method with respect to the heading angle error. As can be seen from Figure 7b, the heading angle error obtained by DTT–Kalman was significantly higher than that of the 1D CNN–Kalman algorithm during the entire navigation process. This means that more accurate trajectories can be obtained using our proposed algorithm. As illustrated in Figure 7b, we traced the accommodation of the heading angle obtained by the three algorithms in the new test trajectory. From the curve of three accommodations of the heading angle, we can see that the algorithm we proposed can better distinguish magnetic anomalies, reduce the deviation of the heading angle, and thus improve the positioning accuracy of pedestrian inertial navigation. In Table 2, we list the performances of the three methods. As shown by this table, the 1D CNN–Kalman magnetic anomaly classification method results in a 30% reduction in pedestrian inertial navigation error compared to the DTT–Kalman method.

4. Conclusions

This paper proposes an indoor pedestrian navigation algorithm that can significantly improve navigation accuracy using magnetic data. Based on the CNN network, we designed an unsupervised learning model and obtained an algorithm that can screen out anomalies in indoor magnetic data from the measured data. In addition, by using real magnetic data obtained through screening combined with the characteristics of the gyro error mainly derived from the accumulated errors, we proposed a novel heading angle calculating method which is based on an extended Kalman filter. This method can use real indoor magnetic data to correct the accumulated errors of the inertial navigation system, thereby achieving higher accuracy. Our proposed algorithm demonstrated good adaptability and effectiveness in indoor environments when analyzed using trajectory tests in different environments. Our research provides an effective solution that addresses the issues encountered in pedestrian navigation based on wearable equipment.

Author Contributions

G.H. contributed significantly to design and conduct of the experiments and analyzed the data, as well as contributed to the writing of manuscript. H.W. and X.L. contributed to the conception of reported research and provided lab environment. All authors have read and agreed to the published version of the manuscript

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Cantón Paterna, V.; Calveras Augé, A.; Paradells Aspas, J.; Pérez Bullones, M.A. A Bluetooth Low Energy Indoor Positioning System with Channel Diversity, Weighted Trilateration and Kalman Filtering. Sensors 2017, 17, 2927. [Google Scholar] [CrossRef] [Green Version]
  2. Mäkelä, M.; Kirkko-Jaakkola, M.; Rantanen, J.; Ruotsalainen, L. Proof of Concept Tests on Cooperative Tactical Pedestrian Indoor Navigation. In Proceedings of the 21st International Conference on Information Fusion (FUSION), Cambridge, UK, 10–13 July 2018; pp. 1369–1376. [Google Scholar]
  3. Yang, C.; Shao, H. WiFi-based indoor positioning. IEEE Commun. Mag. 2015, 53, 150–157. [Google Scholar] [CrossRef]
  4. Lin, T.; Zhang, Z.; Tian, Z.; Zhou, M. Low-Cost BD/MEMS Tightly-Coupled Pedestrian Navigation Algorithm. Micromachines 2016, 7, 91. [Google Scholar] [CrossRef] [Green Version]
  5. Sun, Y.; Liu, M.; Meng, M.Q.-H. WiFi signal strength-based robot indoor localization. In Proceedings of the 2014 IEEE International Conference on Information and Automation (ICIA), Hailar, China, 28–30 July 2014; pp. 250–256. [Google Scholar]
  6. Sun, Y.; Liu, M.; Meng, M.Q.-H. Improving RGB-D SLAM in dynamic environments: A motion removal approach. Robot. Auton. Syst. 2017, 89, 110–122. [Google Scholar] [CrossRef]
  7. Zhang, P. SmartMTra: Robust Indoor Trajectory Tracing Using Smartphones. IEEE Sens. J. 2017. [Google Scholar] [CrossRef]
  8. Shi, W.; Wang, Y.; Wu, Y.X. Dual MIMU Pedestrian Navigation by Inequality Constraint Kalman Filtering. Sensors 2017, 17, 13. [Google Scholar] [CrossRef]
  9. Mumtaz, N.; Arif, S.; Qadeer, N.; Khan, Z.H. Development of a Low Cost Wireless IMU Using MEMS Sensors for Pedestrian Navigation; IEEE: New York, NY, USA, 2017; pp. 310–315. [Google Scholar]
  10. Suprem, A.; Deep, V.; Elarabi, T. Orientation and Displacement Detection for Smart phone Device Based IMUs. IEEE Access 2017, 5, 987–997. [Google Scholar] [CrossRef]
  11. Prateek, G.V.; Girisha, R.; Hari, K.V.S.; Handel, P. Data Fusion of Dual Foot-Mounted INS to Reduce the Systematic Heading Drift. In Fourth International Conference on Intelligent Systems, Modelling and Simulation; AlDabass, D., Uthayopas, P., Sanguanpong, S., Niramitranon, J., Eds.; IEEE: New York, NY, USA, 2013; pp. 208–213. [Google Scholar] [CrossRef]
  12. Li, X.; Wang, J.; Liu, C.Y. Heading Estimation with Real-time Compensation Based on Kalman Filter Algorithm for an Indoor Positioning System. ISPRS Int. GeoInf. 2016, 5, 18. [Google Scholar] [CrossRef] [Green Version]
  13. Deng, Z.A.; Wang, G.F.; Hu, Y.; Wu, D. Heading Estimation for Indoor Pedestrian Navigation Using a Smartphone in the Pocket. Sensors 2015, 15, 21518–21536. [Google Scholar] [CrossRef] [PubMed]
  14. Chen, J.; Ou, G.; Peng, A.; Zheng, L.; Shi, J. An INS/Floor-Plan Indoor Localization System Using the Firefly Particle Filter. ISPRS Int. GeoInf. 2018, 7, 324. [Google Scholar] [CrossRef] [Green Version]
  15. Zhuang, Y.; El-Sheimy, N. Tightly-Coupled Integration of WiFi and MEMS Sensors on Handheld Devices for Indoor Pedestrian Navigation. IEEE Sens. J. 2016, 16, 224–234. [Google Scholar] [CrossRef]
  16. Combettes, C.; Renaudin, V. Delay Kalman Filter to Estimate the Attitude of a Mobile Object with Indoor Magnetic Field Gradients. Micromachines 2016, 7, 79. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  17. Tjhai, C.; Keefe, K.O. Comparing Heading Estimates from Multiple Wearable Inertial and Magnetic Sensors Mounted on Lower Limbs. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Nantes, France, 24–27 September 2018; pp. 206–212. [Google Scholar]
  18. Li, X.; Wang, J.; Liu, C.Y. A Bluetooth/PDR Integration Algorithm for an Indoor Positioning System. Sensors 2015, 15, 24862–24885. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  19. Abdul Rahim, K. Heading Drift Mitigation for Low-Cost Inertial Pedestrian Navigation. Ph.D. Thesis, University of Nottingham, Nottingham, UK, 29 October 2012. [Google Scholar]
  20. Ilyas, M.; Cho, K.; Baeg, S.-H.; Park, S. Drift Reduction in Pedestrian Navigation System by Exploiting Motion Constraints and Magnetic Field. Sensors 2016, 16, 1455. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  21. Svendsen, D.H.; Martino, L.; Camps-Valls, G. Active emulation of computer codes with Gaussian processes–Application to remote sensing. Pattern Recognit. 2020, 100, 107103. [Google Scholar] [CrossRef] [Green Version]
  22. Camps-Valls, G.; Verrelst, J.; Munoz-Mari, J.; Laparra, V.; Mateo-Jiménez, F.; Gómez-Dans, J. A survey on Gaussian processes for earth-observation data analysis: A comprehensive investigation. IEEE Geosci. Remote Sens. Mag. 2016, 4, 58–78. [Google Scholar] [CrossRef] [Green Version]
  23. Kiranyaz, S.; Avci, O.; Abdeljaber, O.; Ince, T.; Gabbouj, M.; Inman, D.J. 1D Convolutional Neural Networks and Applications: A Survey. arXiv 2019, arXiv:1905.03554. [Google Scholar]
  24. Längkvist, M.; Karlsson, L.; Loutfi, A. A review of unsupervised feature learning and deep learning for time-series modeling. Pattern Recognit. Lett. 2014, 42, 11–24. [Google Scholar] [CrossRef] [Green Version]
  25. Bengio, Y.; Courville, A.C.; Vincent, P. Unsupervised Feature Learning and Deep Learning: A Review and New Perspectives. arXiv 2012, arXiv:1206.5538. [Google Scholar]
  26. Cheah, H.; Nisar, H.; Yap, V.; Lee, C.-Y. Convolutional neural networks for classification of music-listening EEG: Comparing 1D convolutional kernels with 2D kernels and cerebral laterality of musical influence. Neural Comput. Appl. 2019. [Google Scholar] [CrossRef]
  27. Campbell, W.H. Earth Magnetism: A Guided Tour through Magnetic Fields; Elsevier Science: San Diego, CA, USA, 2001. [Google Scholar]
  28. Martino, L.; Read, J.; Elvira, V.; Louzada, F. Cooperative parallel particle filters for online model selection and applications to urban mobility. Digital Signal. Process. 2017, 60, 172–185. [Google Scholar] [CrossRef] [Green Version]
  29. Caron, F.; Davy, M.; Duflos, E.; Vanheeghe, P. Particle filtering for multisensor data fusion with switching observation models: Application to land vehicle positioning. IEEE Trans. Signal. Process. 2007, 55, 2703–2719. [Google Scholar] [CrossRef]
  30. Weinberg, H. Using the ADXL202 in Pedometer and Personal Navigation Applications. In Application Notes American Devices; One Technology Way: Norwood, MA, USA, 2002. [Google Scholar]
Figure 1. The random distribution of magnetic interference sources indoors.
Figure 1. The random distribution of magnetic interference sources indoors.
Micromachines 11 00642 g001
Figure 2. An example of the distribution of magnetic interference data in three axes.
Figure 2. An example of the distribution of magnetic interference data in three axes.
Micromachines 11 00642 g002
Figure 3. The flowchart of the heading angle calculation based on a one-dimensional convolutional neural network (1D CNN).
Figure 3. The flowchart of the heading angle calculation based on a one-dimensional convolutional neural network (1D CNN).
Micromachines 11 00642 g003
Figure 4. (a) The topological structure of the 1D CNN network. (b) The decrease in the loss function with training. (c) Magnetic data classification results based on 1D CNN.
Figure 4. (a) The topological structure of the 1D CNN network. (b) The decrease in the loss function with training. (c) Magnetic data classification results based on 1D CNN.
Micromachines 11 00642 g004
Figure 5. Experimental system and indoor test environment.
Figure 5. Experimental system and indoor test environment.
Micromachines 11 00642 g005
Figure 6. (a) The measurement of magnetic field in an indoor environment. (b) The distribution of heading angle based on Kalman. (c) The distribution of heading angle based on 1D CNN–Kalman.
Figure 6. (a) The measurement of magnetic field in an indoor environment. (b) The distribution of heading angle based on Kalman. (c) The distribution of heading angle based on 1D CNN–Kalman.
Micromachines 11 00642 g006
Figure 7. (a) The results of the trajectory test using three different algorithms for indoor pedestrian inertial navigation. (b) The error of the heading angle for the three algorithms. (c) The cumulative distribution function (CDF) of the heading estimation error based on the three algorithms.
Figure 7. (a) The results of the trajectory test using three different algorithms for indoor pedestrian inertial navigation. (b) The error of the heading angle for the three algorithms. (c) The cumulative distribution function (CDF) of the heading estimation error based on the three algorithms.
Micromachines 11 00642 g007
Table 1. Comparison of the end point positioning error in an indoor track 1.
Table 1. Comparison of the end point positioning error in an indoor track 1.
MethodKalman1D CNN–Kalman
Error2.68 m1.06 m
1 Note: The track is 33.3 m long and 11.9 m wide, with a total length of 90.4 m.
Table 2. Comparison of the end point positioning errors in the indoor track 2.
Table 2. Comparison of the end point positioning errors in the indoor track 2.
MethodKalmanDTT–KalmanCNN–Kalman
Error2.85 m1.75 m1.21 m
2 Note: The track is 33.3 m long and 11.9 m wide, with a total length of 90.4 m.

Share and Cite

MDPI and ACS Style

Hu, G.; Wan, H.; Li, X. A High-Precision Magnetic-Assisted Heading Angle Calculation Method Based on a 1D Convolutional Neural Network (CNN) in a Complicated Magnetic Environment. Micromachines 2020, 11, 642. https://doi.org/10.3390/mi11070642

AMA Style

Hu G, Wan H, Li X. A High-Precision Magnetic-Assisted Heading Angle Calculation Method Based on a 1D Convolutional Neural Network (CNN) in a Complicated Magnetic Environment. Micromachines. 2020; 11(7):642. https://doi.org/10.3390/mi11070642

Chicago/Turabian Style

Hu, Guanghui, Hong Wan, and Xinxin Li. 2020. "A High-Precision Magnetic-Assisted Heading Angle Calculation Method Based on a 1D Convolutional Neural Network (CNN) in a Complicated Magnetic Environment" Micromachines 11, no. 7: 642. https://doi.org/10.3390/mi11070642

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop