Next Article in Journal
Micro-Vision Based High-Precision Space Assembly Approach for Trans-Scale Micro-Device: The CFTA Example
Previous Article in Journal
A Method of Merging Maps for MUAVs Based on an Improved Genetic Algorithm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Multi-Scale Fusion Localization Based on Magnetic Trajectory Sequence

School of Automation and Electrical Engineering, University of Science and Technology Beijing, Beijing 100083, China
*
Author to whom correspondence should be addressed.
Sensors 2023, 23(1), 449; https://doi.org/10.3390/s23010449
Submission received: 24 November 2022 / Revised: 28 December 2022 / Accepted: 29 December 2022 / Published: 1 January 2023
(This article belongs to the Section Navigation and Positioning)

Abstract

:
Magnetic fingerprint has a multitude of advantages in the application of indoor positioning, but as a weak magnetic field, the dynamic range of the data is limited, which exerts direct influence on the positioning accuracy. Aiming at resolving the problem wherein the indoor magnetic positioning results tremendously rest with the magnetic characteristics, this paper puts forward a method based on deep learning to fuse the temporal and spatial characteristics of magnetic fingerprints, to fully explore the magnetic characteristics and to obtain stable and trustworthy positioning results. First and foremost, the trajectory of the acquisition area is extracted by adopting the ameliorated random waypoint model, and the simulation of pedestrian trajectory is completed. Then, the magnetic sequence is obtained by mapping the magnetic data. Aside from that, considering the scale characteristics of the sequence, a scale transformation unit is designed to obtain multi-scale features. At length, the neural network self-attention mechanism is adopted to fuse multiple features and output the positioning results. By probing into the positioning results of dissimilar indoor scenes, this method can adapt to diverse scenes. The average positioning error in a corridor, open area and complex area reaches 0.65 m, 0.93 m and 1.38 m respectively. The addition of multi-scale features has certain reference value for ameliorating the positioning performance.

1. Introduction

With the advent of intelligent information life, accurate and trustworthy indoor positioning has a wide range of application scenarios [1]. The mature and perfect satellite positioning system can provide all-weather, all-time, high-precision outdoor positioning for global users, and play a paramount role in regional information searches, traffic management, vehicle navigation and other scenarios [2]. Nonetheless, in the complex indoor environment, as a result of factors such as signal shielding and occlusion, the wireless signal attenuation of satellite positioning is critical and cannot form an effective satellite positioning result. As a result, it is imperative to study effective indoor positioning methods.
Traditional indoor positioning methods can be categorized into active and passive positioning methods in line with whether they use external sources. Common active positioning methods include ultra-wide band (UWB) [3], radio frequency identification (RFID) [4], Wi-Fi [5,6], Bluetooth [7] and methods based on computer vision and visible light [8,9]. Passive location method predominantly rest with inertial measurement unit and magnetic fingerprinting [10]. Considering the above positioning methods, active positioning needs additional auxiliary equipment to be laid, which heightens the positioning cost and is not advantageous for the expansion of indoor space. The interference of the building structure on the source signal cannot be ignored. The positioning method of inertial measurement is based upon the integration of inertial measurement units. On account of the random error and drift error of the sensor, the cumulative error of long-standing positioning cannot be avoided [11]. Meanwhile, the dependence of this method on the initial position makes it often unable to independently locate. In contrast, the indoor positioning method based on magnetic fingerprint can overcome these limitations well. First and foremost, as a natural magnetic phenomenon, magnetic positioning can be completed without adding additional auxiliary equipment. Aside from that, the results of magnetic positioning are not limited by building structure [12].
A complex building structure makes the difference of magnetic fingerprint more apparent and fingerprint characteristics more conspicuous and more beneficial for positioning. Another paramount point is that magnetic fingerprintingcan be easily integrated with other methods to assist positioning. So the study of magnetic positioning is receiving more and more attention [13,14].
The crucial point to indoor positioning using magnetic fingerprint is discovering more features bound up with location information from magnetic data with limited dynamic range and then outputting stable and trustworthy positioning results. In order to heighten the positioning accuracy, the time-series characteristics of magnetic are considered. The positioning analysis is carried out through a battery of magnetic sequences at continuous positions. By considering the time correlation between continuous inputs, the previous method based on spatial input is improved [15]. The LocateMe positioning system uses the Dynamic Time Warping (DTW) algorithm to match the magnetic sequence, and the positioning accuracy is about 2 m [16]. Although the matching algorithm based upon sequence difference makes up for the error of single point matching by time correlation, it also has some limitations. To start with, the sequence length imposes a direct influence on the positioning accuracy and computational complexity. As a consequence, it is imperative to ameliorate and balance the correlation between them. Apart from that, the step length of the sequence sliding window is a paramount factor affecting the accuracy and computation, and when the database information is large, excessive matching heightens the probability of false matching results [17,18]. The DTW algorithm is improved by the adaptive matching of the window size and sequence initial point selection. Research has shown that this method can elevate the search efficiency and positioning accuracy in areas where magnetic characteristics change strikingly, but the positioning performance is noticeably lessened in areas with fuzzy characteristics [19]. For the sake of obtaining the deep features of magnetic fingerprints, machine learning has gradually been extensively employed by researchers. The spatial division of indoor positioning area is a research direction. The area is divided in accordance with the variation characteristics of disturbances in buildings, and the positioning accuracy is elevated by hierarchical positioning. It can also ameliorate the model to explore deeper features. The neural network model is employed as a weak predictor. Multiple groups of weak predictors are integrated into a strong predictor through the ensemble learning method, and the position prediction is completed through ensemble learning [20]. A study put forth a network model that combines the time and space representations of magnetic signal sequences to infer the location features. A convolution neural network (CNN) and recurrent neural network (RNN) were employed to extract features respectively, and the features are fused to make them more discriminative and to achieve more accurate positioning [21]. Some teams adopted dissimilar neural network architectures, such as A CNN and long short-term memory(LSTM), and, ultimately, integrated their results through independent training to obtain the probability map of the user location [22]. Some scholars also built an LSTM network to carry out real-time indoor positioning and proposed a dimension expansion scheme using double sliding windows to preprocess magnetic data, which had satisfactory positioning performance. Meanwhile, it also gave us great inspiration for the selection and setting of network parameters [23]. By introducing the concept of magnetic landmarks, the region can also be divided, and the indoor landmarks can be matched through the magnetic trajectory [24,25]. Nevertheless, the whole positioning process has high requirements for the accuracy of the original data acquisition. The establishment process of landmarks needs to take the extreme value and mean value into consideration. Further more, the screening conditions are susceptible to errors. A host of previous positioning methods are limited to one-dimensional acquisition path, and the positioning mode lacks the evaluation of two-dimensional space. Meanwhile, the fuzzy characteristics of regional geomagnetism are still the primary factor limiting the positioning accuracy.
In an effort to obtain a positioning method with higher positioning accuracy and better universality, this paper comes up with a method to obtain the magnetic sequence by adopting the random waypoint (RWP) model to simulate the pedestrian trajectory. With respect to the input magnetic sequence, LSTM is employed to extract the magnetic characteristics, and the unit of scale transformation is designed. The original magnetic sequence is categorized into subsequences of dissimilar scales. After the same feature extraction of the subsequence, the feature splicing is carried out. The attention mechanism in the neural network is adopted to materialize the weighted fusion of diverse scale features, and, eventually, the position estimation is completed. This method is advantageous for combining the temporal and spatial characteristics of magnetic through pedestrian trajectory, and multi-scale segmentation also highlights the local characteristics of the indoor magnetic, which makes the magnetic sequence with limited dynamic range more characteristic and more beneficial for positioning.

2. Positioning System Structure

The overall positioning process is categorized into two phases, as depicted in Figure 1. Above all, the data acquisition is completed in the training stage, and the data of magnetic and inertial measurement units are obtained by adopting the intelligent sensors in a mobile phone. After the corresponding filtering processing of the original data, the magnetic fingerprint database is formed by mapping with the actual spatial coordinates. The optimized RWP model is adopted to simulate the pedestrian trajectory, and the interpolation model is employed to generate the corresponding magnetic sequence. The magnetic sequence is employed as the model input, and it is categorized into subsequence sets with dissimilar sequence lengths. The scale features are extracted and weighted. Last but not least, the actual position information is employed as the output of the model. In the test phase, users obtain the measured magnetic sequence and input the model for feature extraction, and, ultimately, output the predicted positioning results.

3. Magnetic Data Processing and Positioning Model

3.1. Magnetic Data Acquisition

For the time being, the common magnetic acquisition methods can be categorized into three kinds: path continuous acquisition, path discrete acquisition and grid single-point acquisition. Dissimilar acquisition methods correspond to diverse, magnetic-based indoor positioning solutions. The grid single-point acquisition method corresponds to a two-dimensional plane space, and the path acquisition method corresponds to one-dimensional corridor. MagPIE and UJIIndoorLoc-Mag [26,27], as public magnetic indoor positioning data sets, provide all kinds of sensor data needed for positioning and their acquisition methods, which can be employed for performance analysis of positioning methods. Aside from using the data provided by the public data set, we also carried out data acquisition in a specific area. Considering the acquisition efficiency, accuracy and richness of information, we adopted the continuous path acquisition based upon the step detection of the collectorand mapped the two-dimensional plane grid with the step position (cf. Figure 2). The sampling frequency depended on the collector’s step frequency. On the basis of this principle, the speedy acquisition of the indoor space magnetic was completed.
The data obtained at the collection point were as follows:
D a t a = ( x , y , M x , M y , M z , M a , A c c x , A c c y , A c c z )
where ( x , y ) is the position information, M i , ( i = x , y , z ) represents the triaxial magnetic data, M a represents the single-point magnetic intensity, and the magnetic intensity is calculated using Equation (2):
M a = ( M x ) 2 + ( M y ) 2 + ( M z ) 2
A c c i , ( i = x , y , z ) represents the triaxial acceleration value. Using the Get Rotation Matrix method provided by Android, the rotation matrix and tilt matrix were calculated by inputting the array of the acceleration sensor and the magnetic sensor, so as to actualize the conversion of magnetic data from the mobile phone coordinate system to the world coordinate system. This method is advantageous for eliminating the numerical difference stemming from the acquisition directions of the equipment at the same sampling point.

3.2. Random Waypoint Mobility Model

With regard to the positioning process of the two-dimensional space plane, the acquisition of the time series should not be limited to the one-dimensional acquisition path. For the sake of obtaining a more realistic and universal positioning model, we adopted the random waypoint model to simulate the pedestrian trajectory in the acquisition area so as to obtain the training data and satisfy the needs of deep learning, which usually requires a multitude of training data.
RWP is the fundamental building block for most routing protocols, initially employed to simulate communication protocols such as mobile Ad Hoc networks [28]. In this paper, we used RWP to simulate the trajectory of pedestrian movement in two-dimensional space. The fundamental principle flow chart of RWP is depicted in Figure 3. First and foremost, the size of the location area is presupposed, and a destination coordinate in the area is randomly generated and then moved from the preset starting point to the destination. The moving speed follows the uniform distribution of V ( V m a x min ) , where V m a x m i n is the minimum and maximum of the set one-step moving speed. When the moving trajectory reaches the destination, it randomly stays for a period of time, and the pause time follows the uniform distribution T p ( T m a x min ) . T m a x m i n is the preset minimum and maximum residence time, and then the next destination coordinate is randomly generated. The original destination is treated as a new starting point, and the above process is repeated until the number of generated trajectory points satisfies the requirements. The moving destination and velocity of each trajectory are independent.
The path coordinate ( X i , Y i ) generated by RWP is the recorded trajectory point, where ( X i , Y i ) is obtained as in Equation (3):
{ X i = X i 1 + V cos ( θ ) Y i = Y i 1 + V sin ( θ )
where ( X i 1 , Y i 1 ) is the trajectory point of the previous step, V is the velocity in the current trajectory, and θ is the angle value of the current motion direction, which is determined by the coordinates of the endpoint and the starting point. The calculation method of θ is expressed as exhibited in Equation (4):
θ = arctan ( Y e n d Y s t a r t X e n d X s t a r t )
where ( X s t a r t , Y s t a r t ) and ( X e n d , Y e n d ) are the coordinates of the starting point and the destination point respectively.
The predominant drawback of the RWP model is the non-uniform distribution of the trajectory points, which is spawned from the specific movement behavior. Because the node may choose the central node as the destination end point, or choose the node that can reach the destination through the central area, it will produce the phenomenon of the trajectory converging to the central area. A common improvement measure is the Gaussian Markov model [29], which correlates new speed and new position with the previous speed and position, so as to make up for this deficiency. Nevertheless, the implementation of this model is complex, so it is not extensively employed. The common improvement measures are Gaussian Markov model, by making the new speed and position are correlated with the previous speed and position, to compensate for the uneven distribution. Nonetheless, the implementation of this model is complex, so it is not extensively used. Considering the random direction model similar to RWP, this model randomly selects the direction, then moves to the boundary point of this direction and then selects the next direction. In this way, the center probability density becomes smaller, and the edge probability density becomes larger [30]. Inspired by this, we ameliorated the uneven trajectory distribution by changing the weight at the boundary position in the random generation process of the endpoint.
Figure 4 depicts the trajectory fragment generated by the RWP model, where point A is the preset starting point, and point B, C and D are the subsequent random destination points.

3.3. Clough-Tocher Interpolation

In this paper, we used RWP to simulate pedestrian trajectory to generate 100,000 trajectory points. After obtaining the coordinate points of the trajectory, it is essential to map the position information with the actual magnetic data. Nevertheless, single point acquisition based upon the grid cannot ensure that each point on the trajectory has collected the corresponding magnetic data. The scattered distribution of observation data and the unstrict grid distribution affect the accuracy of data processing. As a consequence, it is imperative to select the appropriate numerical interpolation method to encrypt the magnetic database to elevate the numerical accuracy and the final inversion effect.
With respect to the interpolation research of magnetic field, results obtained by the radial basis function method and Kriging method can meet general requirements in accuracy and smoothness. Nonetheless, these methods need to set various parameters, especially the Kriging method. The estimation and calculation of parameters are complex, and unreasonable parameter setting seriously affects the results [31]. As illustrated by the application results of the Clough-Tocher (C-T) method, it can be applied to spatial scattered distribution of potential field data interpolation, and the interpolation results of magnetic data are ideal. Because this method belongs to the local method, it can still maintain high performance in large-scale data, so we used the Clough-Tocher interpolation to fit the magnetic field intensity at any given point.
The open-source algorithm library and mathematical tool SciPy provided the ready-made C-T two-dimensional interpolation model. The magnetic trajectory sequence (GTS) was fitted in line with the trajectory points by modeling the collected magnetic data. The GTS was defined as displayed in Equation (5):
G T S = [ X 1 Y 1 M x 1 M y 1 M z 1 X t 1 Y t 1 M x t 1 M y t 1 M z t 1 X t Y t M x t M y t M z t ]  
where t represents the length of the magnetic trajectory sequence, ( X , Y ) represents the trajectory point coordinates, and M x , M y , M z represent the triaxial magnetic intensity. G T S is the set of magnetic signals recorded by the pedestrian moving track, and its characteristics are more abundant than those of a single magnetic signal.

3.4. Long Short-Term Memory Network

RNN has a strong ability to process time series data. Using the advantages of RNN processing time series data to process magnetic fingerprint time series can be more efficient and sufficient for excavateing and extracting the effective positioning features contained in the signal sequence, and ameliorate the positioning performance.
In this paper, the LSTM network model in an RNN was adopted to extract the characteristics of magnetic sequences. In comparison with the traditional RNN model, LSTM can not only memorize the past information, but also selectively forget some unimportant information by adding a gated mechanism to model the long-term temporal relationship.
The elementary structure of the LSTM network is exhibited in Figure 5. The gate structure, including a sigmoid neural network layer and a bitwise multiplication operation, is selective to information. The calculation of the forget gate is as follows:
f t = σ ( W f [ h t 1 , x t ] + b f )
x t is the input of the current time, and h t 1 is the information stored in the hidden layer of the previous time. After these two vectors are spliced, they are point multiplied with the weight parameter vector W f , by activating function, a value between 0 and 1 is obtained. A value of 1 means that the gate is wholly opened; 0 means that the gate is utterly closed, and the other door structure parameters are the same. The input gate is calculated as follows:
i t = σ ( W i [ h t 1 , x t ] + b i )
C ˜ t = tanh ( W C [ h t 1 , x t ] + b C )
The calculation of the output gate can be expressed as:
o t = σ ( W o [ h t 1 , x t ] + b o )
The calculation of long and short memory is as follows:
C t = f t C t 1 + i t C ˜ t
h t = o t tanh ( C t )
Figure 5. Basic structure of LSTM network.
Figure 5. Basic structure of LSTM network.
Sensors 23 00449 g005

3.5. Multi-Scale Feature Extraction and Fusion

With respect to the input magnetic trajectory sequence, in an effort to extract the characteristics of dissimilar sequence length, it was not only essential to divide the input sequence into diverse length subsequences, but also imperative to take the size of the sequence step length into consideration. Assuming that the input sequence length is N, the reference scale is n, and n is also the step size of the sequence sliding window; the correlation between these two satisfies N = kn, and k is a positive integer. The selection of N is associated with the actual acquisition situation. Since the acquisition of magnetic sequences requires the positioning personnel to carry out a certain distance of mobile acquisition, considering the factors of acquisition distance and sampling frequency and the change of data accuracy triggered by interpolation processing, the sequence length N in this paper was set to 30–50. The selection of n was based upon the local anomaly of the complex indoor environment. Considering that the local anomaly is often accompanied by the characteristics of fast distance attenuation, the length of n corresponds to the length of data collected by the unit foot length of pedestrians.
If M scales are considered, subsequence sets of dissimilar scales are obtained as follows:
S = { S 1 S m S M }
where S m is the subsequence set of sequence length L = m × n , and 1 m M . The acquisition method of the magnetic subsequence set is depicted in Figure 6. In the figure, taking the original sequence length N = 200 , n = 50 and subsequence scale 2 n as an example, the subsequence set S 2 = { L 1 , L 2 , L 3 } with scale 2 n is obtained.
With regard to the segmented subsequence sets of dissimilar scales, LSTM was adopted for feature extraction. In an effort to normalize and linearize, feature splicing, batch normalization, and rectifier linear unit (Relu) were added after the LSTM network, and Dorpout was added after Relu for regularization.
In an effort to find a small amount of crucial information in the magnetic multi-scale sequence and focus on pivotal information, we introduced a self-attention mechanism to capture data features. With regard to the feature vectors extracted from diverse scale magnetic sequences, the distribution of dissimilar feature weight coefficients was materialized by multiplication with the attention value, and then the parameters in the neural network model were determined by self-learning. The overall framework of the positioning process is displayed in Figure 7. Taking the magnetic sequence as the model input, the scale segmentation unit was designed to divide the original magnetic sequence into subsequence sets with dissimilar scales. The LSTM network was employed to extract the features of the subsequences in the subsequence sets of diverse scales, the subsequence features were spliced by Concat method. Then, the attention mechanism was introduced to weight learning for each scale feature. After learning, the overall features of each scale were spliced and fused. Ultimately, in line with the final fusion feature of the neural network, the position coordinates corresponding to the sequence trajectory points were employed as the output of the network to complete the position prediction.

4. Experimental Verification and Analysis

In this section, we first introduce the experimental environment and the parameter settings of the positioning model. Subsequently, we explore the positioning results and compare them with some positioning methods in the references.

4.1. Experiment Setting

The magnetic characteristics of dissimilar regions are different. For the sake of obtaining a positioning method with high universality, the experiment in this paper will probe into the magnetic positioning results of diverse indoor scenes, including corridors, open areas and complex areas with more office furniture. The public data set MagPIE provided magnetic data from the corridor of the Coordinated Sciences Laboratory (CSL). We first used this data set as the experimental data for corridor positioning, and then selected the spacious area in the office building as the open area. Subsequently, we selected an area with more bookshelves in the library as the complex area for collecting magnetic related data. The size of the three positioning areas was: CSL: 60 m × 15 m; complex area: 20 m × 13 m; open area: 15 m × 7 m. Data acquisition was carried out using the built-in sensor of Android 10 Huawei nova8 mobile Phone, and SQLite database was used to save the acquisition results. Above all, we preprocessed the data set of the CSL laboratory. The original magnetic data acquisition frequency was 50 Hz, which is aligned with the position information in accordance with the time stamp. Considering the large amount of data provided by the data set, the data were sampled to 5 Hz, and the training data and test data were processed in the same way. The processed CSL data set included training trajectory point 26,007 and test trajectory point 7235. The magnetic acquisition points of the complex area and open area were 1040 and 420, respectively. The number of simulated trajectory points was 100,000, and the proportion of training to testing was 3:1. In this experiment, the model parameter settings was as exhibited in Table 1. With the magnetic trajectory sequence as the model input, the initial magnetic sequence length was set to 50, and the reference length of the subsequence was set to 5.

4.2. Experimental Results

The multi-scale segmentation of magnetic sequencesdirectly affected the positioning accuracy and computational efficiency of the model. In an effort to take into account the accuracy and complexity of the positioning model, the influence of the scale division of the original sequence on the positioning performance was analyzed first. Taking the corridor data collected by CSL as the analysis object, and taking 100 training times as an example, the training results of several dissimilar scale fusions were compared, and the cumulative distribution function (CDF) of the localization error was as exhibited in Figure 8. As indicated by the blue, solid line in the figure, only the original magnetic sequence was considered as the input, and the other curves added diverse scale subsequences and fused them for positioning. Obviously, after adding the subsequence features of the original sequence, the positioning performance was markedly ameliorated, and the proportion of positioning errors within 1 mincreased from 34.2% to 70%.
The positioning method of the multi-scale magnetic sequence tremendously heightened the positioning accuracy compared with the single original sequence. The error data box plot of the multi-scale fusion is exhibited in Figure 9. The average positioning error before and after considering the multi-scale characteristics was lessened from 2.1 m to about 1.2 m, which immensely ameliorated the positioning performance. Nevertheless, after adding subsequence features, the number of subsequences added slightly heightened the positioning accuracy. Further refining the subsequence set made inconsequential differences in the overall positioning performance, and the model was able to better complete the position estimation. Meanwhile, with the addition of multi-scale subsequences, the complexity of the model was higher and the amount of computation was greater. In an effort to obtain the rich features of the magnetic fingerprint and heighten the operation efficiency of the model, the following experiments took the fusion of three scale features into account so as to complete the position estimation.
With regard to the three indoor scenes of the corridor, open area and complex area, the multi-scale fusion positioning of magnetic sequences was carried out respectively, and the cumulative distribution of the positioning error of the three scenes was as displayed in Figure 10. The average positioning errors of multi-scale fusion positioning in the three regions was 0.65 m, 0.93 m and 1.38 m, respectively, with excellent positioning accuracy. In the public data set, 94% of the samples of the corridor data had a positioning error less than 1 m, and 90.4% had a positioning error of less than 0.6 m. Furthermore, the test results in the open area were close to the data in the corridor, and the error of 91.5% of the test results was controlled within 1 m. Of the positioning results of the test sample of the complex area, 81.8% had an error within 1 m. In comparison with the previous two areas, the positioning performance was slightly decreased, which correlated with the acquisition density of the original data in the complex area. The bookshelf and various office furniture made the data acquisition unable to traverse each point on the positioning plane.
We also explored the loss function values in the training process. Taking the training results of the public data set as an example, the loss function changes of the training set and the verification set data were as displayed in Figure 11. The curves of these two changes were close to each other, and gradually converge with the augmentation of the number of iterations, and eventually converged to about 0.7. The satisfactory convergence process also reflected that the positioning model can effectively learn the characteristics of magnetic sequences.
The heat map of positioning errors was drawn by randomly selecting some test points as depicted in Figure 12. In the randomly selected test points, if the error above 2 m was regarded as a failure of positioning, the probability of correct positioning is 96.3%. As clearly demonstrated by the experimental results, the positioning error on the overall test path remained stable, which also indicates that it is feasible to adopt neural networks for multi-scale fusion positioning in magnetic indoor positioning, and better positioning accuracy can be materialized through limited magnetic characteristics.

4.3. Comprehensive Evaluation

In this part, we compare and discuss the method of geomagnetic trajectory sequence multi-scale fusion (GTSMF) employed in this paper with the following common magnetic positioning methods:
  • RNN: References [32,33] used recurrent neural networks to learn location-related features, and used magnetic sequences as input to train a standard RNN network to predict the user’s location. In our experiment, other than the fundamental RNN model, LSTM, GRU and BiLSTM network models were constructed [34]. The RNN model had four layers; LSTM and GRU were two-layer structure; the input sequence length was set to 50, the mini-batch was set to 64; the hidden unit was set to 128; the learning rate was 0.005; and the number of iterations was 100. Taking the data in the public data set MagPIE as the test object, we compared the above method with the proposed method. The comparison of error probability distribution is shown in Figure 13. It can be seen from the graph that the positioning method in this paper is superior to the traditional RNN network model, and the positioning performance of GRU and LSTM is similar. BiLSTM considers future information on the basis of past information and ameliorates positioning performance. The four-layer RNN has poor performance in the training process, slow convergence speed and large positioning error. It also needs to adjust the network parameters and input data. In comparison with the positioning method combined with multiple network architectures, our positioning method obtaind a smaller positioning error and elevated the positioning accuracy by about 10%. Moreover, the direct output of the predicted position information eliminated the subsequent probability data processing and heightened the positioning efficiency [22]. Compared with the method using multi-layer LSTM for real-time positioning, our data acquisition method is not limited to typical trajectory acquisition. In the case of equal positioning accuracy, our positioning method is applicable to dissimilar positioning scenarios, showing better universality [23].
2.
DTW: Dynamic time warping matches the measured geomagnetic sequence with the database and finds the matching point with the minimum cumulative distance as the positioning point [35]. When the sequence length and sliding window length of the matching algorithm are the same as the previous ones, the distribution of the positioning error is as exhibited in Figure 13. It was found that the positioning error obtained by DTW is larger than that obtained by machine learning, and the positioning results were also close to the references and our previous experimental results [36]. Owing to the limited dynamic fluctuation range of magnetic data, when the amount of database data was large and the magnetic variation in the positioning area was not conspicuous, the positioning performance was remarkably decreased.
3.
CNN: Convolutional neural networks have excellent performance in the field of image recognition. A myriad of studies has used CNN to identify geomagnetic maps to infer positions and obtain desirable positioning accuracy. AMID is the first indoor positioning system that used deep neural network to identify magnetic sequence patterns [24], and it achieved 1.7 m positioning accuracy by classifying landmarks. By combining the convolution layer and recursive layer, the positioning accuracy was heightened to 0.95 m [37]. MINLOC [38], materialized the combination of multiple CNNs by voting mechanism, and the average positioning error was about 0.7 m, which is similar to the positioning performance of our method. Reference [38] introduced an attention mechanism to make positioning accuracy superior, achieving a positioning error close to 0.4 m. The desirable positioning performance of CNNs also gave us inspiration. Using reasonable combinations of various network models to explore the deeper characteristics of geomagnetic fingerprints is also our next exploration direction.

5. Conclusions

With regard to magnetic indoor positioning, the ambiguity of magnetic signals is the chief reason for the limited the positioning accuracy, which hinders the wide application of positioning. In an effort to explore the deep characteristics of the magnetic sequence, this paper used the RWP model to simulate the pedestrian trajectory, and used the interpolation algorithm to map the trajectory and the magnetic fingerprint to obtain the magnetic trajectory sequence, and then actualized the feature extraction of the magnetic sequence by LSTM. In order to take full account of the local anomalies contained in the magnetic sequence, the scale transformation unit was designed to divide the original sequence into diverse scale subsequences, and the neural network self-attention mechanism was adopted to realize multi-scale feature fusion to obtain more prominent position features and achieve a more accurate position estimation. In order to verify the feasibility of the scheme, this paper conducted experimental verification for three dissimilar indoor regions. As demonstrated by the experimental results, this method can adapt to the positioning of diverse indoor scenes, and multi-scale fusion can effectively heighten the positioning accuracy, which has certain reference significance for exploring sequence characteristics.

Author Contributions

Z.J., R.K. and H.S. conceived and designed the experiments; Z.J. and H.S. performed the experiments; Z.J. and H.S. analyzed the data and wrote the original draft; Z.J. reviewed and edited the paper; R.K. revised the paper; H.S. helped in writing the related works. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the National Natural Science Foundation (NNSF) of China under grant BS 11975044.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

All participants in the experiment were in-formed and consented to the publication of the paper.

Data Availability Statement

The study did not report any data.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zhao, R.; Zhong, B.; Zhu, Z.L.; Ma, L.; Yao, J.F. Overview of Indoor Localization Techniques and Applications. Electron. Sci. Technol. 2014, 27, 154–157. [Google Scholar]
  2. Pasku, V.; De Angelis, A.; De Angelis, G.; Arumugam, D.D.; Dionigi, M.; Carbone, P.; Moschitta, A.; Ricketts, D.S. Magnetic Field-Based Positioning Systems. IEEE Commun. Surv. Tutor. 2017, 19, 2003–2017. [Google Scholar] [CrossRef]
  3. Yin, Z.; Xu, J.; Yang, Z.; Zhao, N.; Chen, Y. WUB-IP: A High-Precision UWB Positioning Scheme for Indoor Multiuser Applications. IEEE Syst. J. 2019, 13, 279–288. [Google Scholar] [CrossRef] [Green Version]
  4. Xu, H.; Ding, Y.; Li, P.; Wang, R.; Li, Y. An RFID Indoor Positioning Algorithm Based on Bayesian Probability and K-Nearest Neighbor. Sensors 2017, 17, 1806. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  5. Chen, B.; Liu, R.; Chen, Y.; Liu, J.; Jiang, X.; Liu, D. Wi Fi Fingerprint Based Self-Adaptive Indoor localization in The Dynamic Environment. Chin. J. Sens. Actuators 2015, 28, 729–738. [Google Scholar]
  6. Li, Y.; He, Z.; Nielsen, J.; Lachapelle, G. Using Wi-Fi/Magnetometers for Indoor Location and Personal Navigation. In Proceedings of the 2015 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Banff, AB, Canada, 13–16 October 2015. [Google Scholar]
  7. Contreras, D.; Castro, M.; De La Torre, D.S. Performance evaluation of bluetooth low energy in indoor positioning systems. Trans. Emerg. Telecommun. Technol. 2014, 28, e2864. [Google Scholar] [CrossRef] [Green Version]
  8. Cooper, A.; Hegde, P. An indoor positioning system facilitated by computer vision. In Proceedings of the 2016 IEEE MIT Undergraduate Research Technology Conference (URTC), Cambridge, MA, USA, 4–6 November 2016. [Google Scholar]
  9. Barik, D.; Mondal, M. Object identification for computer vision using image segmentation. In Proceedings of the 2010 2nd International Conference on Education Technology and Computer IEEE, Shanghai, China, 22–24 June 2010; pp. V2-170–V2-172. [Google Scholar]
  10. Chen, Y.; Zhou, M.; Zheng, Z. Learning Sequence-Based Fingerprint for Magnetic Indoor Positioning System. IEEE Access 2019, 7, 163231–163244. [Google Scholar] [CrossRef]
  11. Guo, H.; Uradziński, M.; Yin, H.; Yu, M. Indoor positioning based on foot-mounted IMU. Bull. Pol. Acad. Sci. Tech. Sci. 2015, 63, 629–634. [Google Scholar] [CrossRef]
  12. Song, J.; Hur, S.; Park, Y.; Choi, J. An Improved RSSI of Geomagnetic Field-Based Indoor Positioning Method Involving Efficient Database Generation by Building Materials. In Proceedings of the 2016 IEEE International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Spain, 4–7 October 2016. [Google Scholar]
  13. Guo, X.; Shao, W.; Zhao, F.; Wang, Q.; Li, D.; Luo, H. WiMag: Multimode Fusion Localization System based on Magnetic/WiFi/PDR. In Proceedings of the 2016 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Madrid, Spain, 4–7 October 2016. [Google Scholar]
  14. Campeón, J.G.; López, S.; de Jesús Meleán, S.R.; Moldovan, H.; Parisi, D.R.; Fierens, P.I. Fusion of magnetic and WiFi fingerprints for indoor positioning. In Proceedings of the 2018 Congreso Argentino de Ciencias de la Informática y Desarrollos de Investigación (CACIDI), Buenos Aires, Argentina, 28–30 November 2018. [Google Scholar]
  15. Wu, H.; He, S.; Chan, S. A Graphical Model Approach for Efficient Geomagnetism-Pedometer Indoor Localization. In Proceedings of the IEEE International Conference on Mobile Ad-Hoc and Sensor Systems, Orlando, FL, USA, 22–25 October 2017. [Google Scholar]
  16. Subbu, K.P.; Gozick, B.; Dantu, R. LocateMe: Magnetic-fields-based indoor localization using smartphones. ACM Trans. Intell. Syst. Technol. 2013, 4, 1–27. [Google Scholar] [CrossRef]
  17. Ran, Y.; Burshtein, D. An enhanced dynamic time warping model for improved estimation of DTW parameters. Speech Audio Process. IEEE Trans. 2003, 11, 216–228. [Google Scholar]
  18. Ruan, X.; Tian, C. Dynamic gesture recognition based on improved DTW algorithm. In Proceedings of the IEEE International Conference on Mechatronics & Automation, Beijing, China, 2–5 August 2015. [Google Scholar]
  19. Wu, Z. Analysis and Research of Indoor Location Method Based on Magnetic Field Sequence Matching. Master’s Thesis, Xiamen University, Xiamen, China, 2018. [Google Scholar]
  20. Wang, Z. Research on Universal Location of Large Indoor Environment; Anhui University of Science and Technology: Huainan, China, 2020. [Google Scholar]
  21. He, T.; Niu, Q.; He, S.; Liu, N. Indoor Localization with Spatial and Temporal Representations of Signal Sequences. In Proceedings of the 2019 IEEE Global Communications Conference (GLOBECOM), Waikoloa, HI, USA, 9–13 December 2019. [Google Scholar]
  22. Fernandes, L.; Santos, S.; Barandas, M.; Folgado, D.; Leonardo, R.; Santos, R.; Carreiro, A.; Gamboa, H. An Infrastructure-Free Magnetic-Based Indoor Positioning System with Deep Learning. Sensors 2020, 20, 6664. [Google Scholar] [CrossRef] [PubMed]
  23. Zhang, M.; Jia, J.; Chen, J.; Yang, L.; Guo, L.; Wang, X. Real-time indoor localization using smartphone magnetic with LSTM networks. Neural Comput. Appl. 2021, 33, 10093–10110. [Google Scholar] [CrossRef]
  24. Lee, N.; Ahn, S.; Han, D. AMID: Accurate Magnetic Indoor Localization Using Deep Learning. Sensors 2018, 18, 1598. [Google Scholar] [CrossRef] [PubMed]
  25. Wang, Q.; Luo, H.; Zhao, F.; Shao, W. An indoor self-localization algorithm using the calibration of the online magnetic fingerprints and indoor landmarks. In Proceedings of the 2016 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Spain, 4–7 October 2016. [Google Scholar]
  26. Hanley, D.; Faustino, A.B.; Zelman, S.D.; Degenhardt, D.A.; Bretl, T. MagPIE: A dataset for indoor positioning with magnetic anomalies. In Proceedings of the International Conference on Indoor Positioning & Indoor Navigation, Sapporo, Japan, 18–21 September 2017. [Google Scholar]
  27. Torres-Sospedra, J.; Rambla, D.; Montoliu, R.; Belmonte, O.; Huerta, J. UJIIndoorLoc-Mag: A new database for magnetic field-based localization problems. In Proceedings of the International Conference on Indoor Positioning & Indoor Navigation, Banff, AB, Canada, 13–16 October 2015. [Google Scholar]
  28. Shi, C.; Guan, Z.; Zhang, K. Overview of Node Mobility Models in Ad Hoc Networks. China New Telecommun. 2013, 15, 36–38. [Google Scholar]
  29. Chen, P.; Tang, L.; Chen, Q. Cluster Routing Protocol Based on Motion State in Vehicular Ad Hoc Network. Comput. Eng. 2013, 39, 87–92. [Google Scholar]
  30. Sun, G.; Liao, M. Method of Avoiding the Speed Decay in Random Waypoint Mobility Model. J. Chin. Comput. Syst. 2006, 27, 4. [Google Scholar]
  31. Chen, K. A Study on Interpolation Method for 3D Scattered Potential Filed Data; Zhejiang University: Hangzhou, China, 2013. [Google Scholar]
  32. Jang, H.J.; Shin, J.M.; Choi, L. Geomagnetic field based indoor localization using recurrent neural networks. In Proceedings of the GLOBECOM 2017–2017 IEEE Global Communications Conference, Singapore, 4–8 December 2017. [Google Scholar]
  33. Chiang, T.-H.; Sun, Z.-H.; Shiuz, H.-R.; Lin, K.C.-J.; Tseng, Y.-C. Magnetic Field-Based Localization in Factories Using Neural Network With Robotic Sampling. IEEE Sens. J. 2020, 20, 13110–13118. [Google Scholar] [CrossRef]
  34. Zmitri, M.; Fourati, H.; Prieur, C. BiLSTM Network-Based Extended Kalman Filter for Magnetic Field Gradient Aided Indoor Navigation. IEEE Sens. J. 2021, 22, 4781–4789. [Google Scholar] [CrossRef]
  35. Shu, Y.; Bo, C.; Shen, G.; Zhao, C.; Li, L.; Zhao, F. Magicol: Indoor Localization Using Pervasive Magnetic Field and Opportunistic WiFi Sensing. Sel. Areas Commun. IEEE J. 2015, 33, 1443–1457. [Google Scholar] [CrossRef]
  36. Jin, Z.; Kang, R.Q.; Wang, W. Large Indoor Dynamic Positioning Method Based on Magnetic Sequence Matching. Chin. J. Sci. Instrum. 2021, 42, 199–207. [Google Scholar]
  37. Antsfeld, L.; Chidlovskii, B. Magnetic Field Sensing for Pedestrian and Robot Indoor Positioning. In Proceedings of the 2021 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Lloret de Mar, Spain, 29 November–2 December 2021. [Google Scholar]
  38. Abid, M.; Compagnon, P.; Lefebvre, G. Improved CNN-based Magnetic Indoor Positioning System using Attention Mechanism. In Proceedings of the 2021 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Lloret de Mar, Spain, 29 November–2 December 2021. [Google Scholar]
Figure 1. Schematic view of positioning system.
Figure 1. Schematic view of positioning system.
Sensors 23 00449 g001
Figure 2. Data acquisition process.
Figure 2. Data acquisition process.
Sensors 23 00449 g002
Figure 3. Schematic flow chart of RWP model.
Figure 3. Schematic flow chart of RWP model.
Sensors 23 00449 g003
Figure 4. Schematic flow chart of RWP model.
Figure 4. Schematic flow chart of RWP model.
Sensors 23 00449 g004
Figure 6. Acquisition of magnetic sequence set.
Figure 6. Acquisition of magnetic sequence set.
Sensors 23 00449 g006
Figure 7. Overall framework of positioning process.
Figure 7. Overall framework of positioning process.
Sensors 23 00449 g007
Figure 8. CDF of multi-scale sequence positioning error (the solid line indicates that only the original magnetic sequence was input, and other lines indicate that there were subsequences decomposed from the original sequence apart from the original sequence.).
Figure 8. CDF of multi-scale sequence positioning error (the solid line indicates that only the original magnetic sequence was input, and other lines indicate that there were subsequences decomposed from the original sequence apart from the original sequence.).
Sensors 23 00449 g008
Figure 9. Box plot of multi-scale sequence fusion positioning error (zero represents the positioning result of a single original sequence as input, and other representations fuse the corresponding number of diverse scale subsequences).
Figure 9. Box plot of multi-scale sequence fusion positioning error (zero represents the positioning result of a single original sequence as input, and other representations fuse the corresponding number of diverse scale subsequences).
Sensors 23 00449 g009
Figure 10. CDF of positioning errors in dissimilar regions.
Figure 10. CDF of positioning errors in dissimilar regions.
Sensors 23 00449 g010
Figure 11. Variation curve of loss function in training process.
Figure 11. Variation curve of loss function in training process.
Sensors 23 00449 g011
Figure 12. Positioning error heat map of test data on the acquisition path.
Figure 12. Positioning error heat map of test data on the acquisition path.
Sensors 23 00449 g012
Figure 13. CDF of diverse location methods (GTSMS is the positioning strategy in this paper, and other methods are common positioning models and matching algorithms.).
Figure 13. CDF of diverse location methods (GTSMS is the positioning strategy in this paper, and other methods are common positioning models and matching algorithms.).
Sensors 23 00449 g013
Table 1. Model parameters setting.
Table 1. Model parameters setting.
ParameterParameter Value
loss functionMSE
optimizer
learning rate
hidden node
batch size
dropout rate
iteration times
Adam
0.005
128
32
0.1
800
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Jin, Z.; Kang, R.; Su, H. Multi-Scale Fusion Localization Based on Magnetic Trajectory Sequence. Sensors 2023, 23, 449. https://doi.org/10.3390/s23010449

AMA Style

Jin Z, Kang R, Su H. Multi-Scale Fusion Localization Based on Magnetic Trajectory Sequence. Sensors. 2023; 23(1):449. https://doi.org/10.3390/s23010449

Chicago/Turabian Style

Jin, Zhan, Ruiqing Kang, and Hailu Su. 2023. "Multi-Scale Fusion Localization Based on Magnetic Trajectory Sequence" Sensors 23, no. 1: 449. https://doi.org/10.3390/s23010449

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