0% found this document useful (0 votes)
5 views13 pages

Indoor Geomagnetic Positioning Using Direction-Aware Multiscale Recurrent Neural Networks

This document presents a novel indoor positioning method using direction-aware multiscale recurrent neural networks (DM-RNNs) that leverages geomagnetic field fingerprinting. The approach integrates directional information into the localization process and employs multiscale feature extraction to enhance model adaptability and accuracy, achieving over 79% direction estimation precision and reducing localization error by more than 30% compared to existing methods. Extensive experiments demonstrate the effectiveness of the proposed method in various indoor environments, addressing challenges posed by heterogeneous devices and crowded settings.

Uploaded by

1720587660
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views13 pages

Indoor Geomagnetic Positioning Using Direction-Aware Multiscale Recurrent Neural Networks

This document presents a novel indoor positioning method using direction-aware multiscale recurrent neural networks (DM-RNNs) that leverages geomagnetic field fingerprinting. The approach integrates directional information into the localization process and employs multiscale feature extraction to enhance model adaptability and accuracy, achieving over 79% direction estimation precision and reducing localization error by more than 30% compared to existing methods. Extensive experiments demonstrate the effectiveness of the proposed method in various indoor environments, addressing challenges posed by heterogeneous devices and crowded settings.

Uploaded by

1720587660
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

IEEE SENSORS JOURNAL, VOL. 23, NO.

3, 1 FEBRUARY 2023 3321

Indoor Geomagnetic Positioning Using


Direction-Aware Multiscale Recurrent
Neural Networks
Mingcong Shu , Guoliang Chen , Zhenghua Zhang, and Lei Xu

Abstract —Accurate indoor positioning has become an


indispensable technology for location-based service in indoor
environments. Geomagnetic field fingerprinting for indoor
positioning is an attractive alternative to Wi-Fi and Bluetooth
because of the omnipresent signals and the infrastructure-
free mode. However, heterogeneous devices and users with
fluctuant geomagnetism and massive crowdsourced data
covering large-scale indoor scenes may result in a low degree
of discernibility and degrade the rerecognizable performance
for pedestrian positioning. To overcome the problem, a deep-
learning-based indoor geomagnetic positioning method with
direction-aware multiscale recurrent neural networks (DM-RNNs) is presented. First, the direction information is taken
into the fingerprint construction and localization process to increase spatial identification, which is necessary for indoor
pedestrian navigation. Second, instead of using a single holistic feature from sequence fingerprints directly, we employ
the different scale-based feature extraction units for variational anomalies of the signal by using multiscale RNNs,
increasing the model adaptability and generality for random pedestrian motion and device heterogeneity. Third, the
ensemble learning mechanism is adopted in the model to obtain robust localization results. Furthermore, we employ the
convenient visual-inertial odometry (VIO) to collect the geomagnetic signal dataset and utilize the sequence augmentation
approach to generate synthesized trajectories from multiple single-point magnetic values for training and testing the
model. Extensive experiments in three different indoor scenes demonstrate that the proposed approach outperforms
state-of-the-art competing schemes by a wide margin, reducing mean localization error by more than 30% and obtaining
over 79% direction estimation precision in different indoor scenarios.
Index Terms — Data augmentation, direction aware, indoor positioning, magnetic field, multiscale recurrent neural
networks (RNNs).

I. I NTRODUCTION tipath propagation and severe satellite signal blockage, the


GNSS-based approach often fails to obtain enough perfor-
T HE emergence of localization technology is essential
for social and commercial development, e.g., robot or
pedestrian positioning and navigation, intelligent cities, motion
mance in indoor environments. Therefore, how to solve the
indoor scene localization problem is a challenge.
monitoring, and shopping guides. Therefore, location-based Researchers have studied various categories of electronic
services (LBSs) have recently attracted increasing attention. signals for positioning tracking to achieve reliable indoor loca-
For open-sky outdoor environments, the global navigation tions. Various wireless positioning systems (WPSs) directly or
satellite system (GNSS) works well with map matching for indirectly achieve the locations by determining the relation-
pedestrians’ long-term localization. Nevertheless, due to mul- ship between the signal propagation model and the position-
ing information, including geometric and pattern recognition
Manuscript received 24 September 2022; revised 5 December 2022; approaches. The signal measurement types are usually classi-
accepted 5 December 2022. Date of publication 14 December 2022; fied into received signal strength (RSS) [1], angle of arrival
date of current version 31 January 2023. This work was supported in (AOA) [2], time of arrival (TOA) [3], and time difference of
part by the National Natural Science Foundation of China under Grant
42274048, in part by the Jiangsu Province Science and Technology arrival (TDOA) [4]. The radio signal fading models are used to
Planning Project under Grant BE2022716, and in part by the Training obtain the distance from anchor points [5], and the other works
Program of the Major Research Plan of the National Natural Science [6], [7] improve the positioning accuracy by using an artificial
Foundation of China under Grant 2021ZDPY0220. The associate editor
coordinating the review of this article and approving it for publication was neural network (ANN). To avoid the line-of-signal (LOS)
Dr. Mert Torunbalci. (Corresponding author: Guoliang Chen.) problem, the pattern recognition methods adopt the signal
The authors are with the School of Environment Science and Spatial features as fingerprints, and locations can be achieved with the
Informatics, China University of Mining and Technology, Xuzhou 221116,
China (e-mail: [email protected]). correct fingerprint matching process. Many studies have per-
Digital Object Identifier 10.1109/JSEN.2022.3227952 formed the Wi-Fi and Bluetooth-based fingerprints for indoor
1558-1748 © 2022 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
3322 IEEE SENSORS JOURNAL, VOL. 23, NO. 3, 1 FEBRUARY 2023

localization using RSS [8], [9]. Although these methods for temporal information to extract more reliable magnetic
can achieve the desired accuracy for indoor positioning, they features. The model in [23] proposes the long short-term
cannot work effectively when the signal fingerprints become memory (LSTM)-based magnetic positioning methods by
weak. Also, expensive external sender units, such as wireless using the temporal context of magnetic signals, and the 3-D
access points (APs) and Bluetooth beacons, are required to geomagnetic vectors are used as the neural network input.
transmit the signals. Moreover, the Wi-Fi signals usually For the more feature dimension of input signals, the dou-
fluctuate drastically due to dynamic interference, especially ble sliding-window approach is used in the LSTM model
in assembly occupancies, and it is pretty expensive labor to to obtain robust indoor positioning results [24]. The RNN
maintain the fingerprints database for long-term positionings. and attention mechanism-based recurrence plots (RPs) are
In contrast, the geomagnetic field is natural, omnipresent, extensively applied in sequence-based geomagnetic position-
and more stable; also, geomagnetic field fingerprinting is ing [20], [21]. However, these methods are still complicated
an attractive alternative to Wi-Fi and Bluetooth fingerprints to extract sufficient features with only a basic RNN, focusing
since it is independent of the infrastructure. On the other more on the extended temporal features and ignoring the
hand, the ambient magnetic fields show uniqueness within local mutation features. In addition, the arbitrary motion of
limited ranges due to disturbance from doors, pillars, and pedestrians poses the challenge of recognizing the magnetic
elevators, which can be exploited as a solution for indoor landmarks for positioning in complex indoor scenes, and
positioning. Therefore, some works use the magnetic field the fingerprint ambiguity of the different locations results in
as a fingerprint to estimate the target’s locations [10], [11], diminished accuracy. Besides, magnetic signal collection and
[12]. Besides, geomagnetic sensors are ubiquitous in off- location labeling are time-consuming and labor-intensive for
the-shelf smartphones, making it highly convenient to track DNN-based indoor localization methods.
pedestrian locations using magnetic fingerprints [13], [14]. In this article, we leverage direction-aware multiscale RNNs
Nevertheless, the dimension of magnetic fingerprint signals (DM-RNNs) to adaptively extract the multiple features of
is only three, and the lower dimension of fingerprints leads the geomagnetic sequence for accurate indoor positioning.
to the nonuniqueness in spacious indoor scenes. Therefore, More specifically, we devise an indoor geomagnetic location
mismatching fingerprints may occur with the instant geomag- framework that considers both the direction information and
netic measurements, reducing the localization accuracy. As a multiscale sequence features with different spatial resolu-
result, some works integrate magnetic fingerprint-based meth- tions and time spans. Moreover, the crux of DM-RNN is
ods with other positioning techniques for better localization how to effectively extract distinctive features of geomagnetic
performance [15], [16], [17], [18], such as fusing with motion sequences to represent the different locations in large-scale and
estimation results or fusing with other opportunistic signals complex indoor environments. First, the direction information
based on recursive Bayesian filters, including Kalman filter is taken into both the offline map construction and online
(KF), particle filter (PF), or hidden Markov model (HMM). localization phases. Because of the interference of human
However, the complex algorithm fusion requires constant motion and indoor structure, the geomagnetic feature of a
adjustment of parameters, which increases the computation location is inconsistent in different directions when applying
amount of the positioning system and makes it challenging the sequence signals. In the positioning process, we use the
to ensure real-time positioning. To overcome the location directional feature to improve the direction discrimination
ambiguity problem, the researchers use the consecutive sig- ability of the positioning model instead of roughly eliminating
nals fingerprinting matching, and the dynamic time warping the influence of the data processing method.
(DTW) fingerprint matching localization approach is proposed Meanwhile, reliable directional information can be output in
to improve the accuracy of the indoor positioning system. the positioning result, which is significant for indoor location
However, the DTW algorithm ignores the discrete features service. To the best of our knowledge, we are the first to try to
and only reserves the concentration of the global magnetic integrate directional information into the entire geomagnetic
sequence, reducing the spatial identification ability within positioning process. Then, we employ multiscale RNNs to
small areas. Besides, the time consumption of DTW-based extract the sequence features, balancing the corresponding
approaches usually increases significantly with longer input modeling of both the long-term and fine-grained dependency
magnetic sequences, especially in large-scale indoor scenarios. for users or device heterogeneity. Therefore, this approach can
Recently, deep learning has been applied in indoor local- improve the robustness of the model with more distinguishing
ization successfully. Some works propose accurate indoor and comprehensive features for positioning. Compared to the
magnetic localization using deep neural networks (DNNs) traditional single-scale architecture, these multiscale RNNs
[19], [20], [21]. DeepLocate employed a neural network to reduce the sequence length and enrich features over which the
extract the geomagnetic signal’s features for indoor localiza- RNNs must reason to model long-sequence dependency for
tion. Similarly, a magnetic indoor positioning method using high location identification. To increase the model tolerance
convolutional neural networks (CNNs) was proposed in [22]. with random noise, the data augmentation and ensemble
However, only the spatial context of the magnetic signal is learning (EL) mechanism are employed to further improve the
used to recognize the location, resulting in degraded dis- model performance, which uses synthesized trajectories from
tinctiveness of features and reducing localization accuracy, multiple single-point magnetic values for sequence augmenta-
consequently in signal ambiguities indoor areas. The recurrent tion and selective ensemble solution among multiple indepen-
neural network (RNN) is employed on the sequence signals dent training models for better robustness. A brief illustration

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
SHU et al.: INDOOR GEOMAGNETIC POSITIONING USING DM-RNNs 3323

error by more than 30% and achieves more robustness under


various environments than state-of-the-art methods.
The remainder of this article is organized as follows.
Section II reviews related works. The workflow of the
DM-RNN-based geomagnetic positioning model is presented
in Section III, followed by an elaborated description of the
model detail in Section IV. Then, the experimental result is
shown in Section V, and finally, we conclude in Section VI.

II. R ELATED W ORKS


Indoor positioning has attracted much attention and has
Fig. 1. Geomagnetic indoor localization in the repetitive hall area, been extensively studied recently. Researchers have proposed
where geomagnetic intensity is designated as colors of the ambient
magnetic field. The accurate positioning results are inferred using the
various localization techniques for the indoor LBS to provide
DM-RNN-based localization method aided by discernible sequences reliable indoor locations using different measurements, includ-
from direction information and multiscale features. ing wireless signals, inertial data, and visual perception [25],
[26], [27]. Despite the accuracy in specific test areas, no indoor
demonstrating the DM-RNN-based localization method with localization approach is as universal as GPS outdoors. For
direction and multiscale features of geomagnetic sequences is example, inertial-based approaches, such as INS and PDR, are
shown in Fig. 1. In summary, our contributions are given as subject to accumulated errors due to sensor noises or pedestri-
follows. ans’ changing motions [28]. Visual-based indoor localization,
1) Considering the geomagnetic diversity and random however, is prone to failure due to textless scenes or much
pedestrian motion in large-scale scenes, the direction informa- computation complexity. The ultra wide band (UWB)-based
tion of pedestrians’ moving is utilized to increase the fidelity of approach can obtain an accurate 3-D location for multistory
the database in offline data collection and online localization buildings, which are often well-structured and easy to use with
processes. Furthermore, the direction-aware fingerprints can mobile devices. Nevertheless, they usually require the dense
provide reliable direction of the global frame for user navi- deployment of extract infrastructures in the test scenarios,
gation. We are the first to integrate the direction information improving the cost significantly for large-scale positioning.
into the geomagnetic positioning and decouple the relationship Among these techniques, geomagnetic signal-based loca-
between direction-aided fingerprints and indoor geomagnetic tion methods have received increasing attention in previous
localization. studies, mainly because the Earth’s geomagnetic signal is
2) We design the multiscale RNN-based indoor geomagnetic omnipresent, relatively stable, and infrastructure-independent
positioning model to extract multiscale features of sequence with the widespread built-in magnetometer in mobile devices
signal, which can mitigate the performance degradation with [29]. Therefore, many works have studied indoor positioning
heterogeneity and equivocal location representation in spa- using geomagnetic signals. For instance, the LMDD system is
cious indoor environments. The multiscale structure takes based on changes in geomagnetic density to recognize the door
advantage of the learning ability of RNN on time-series location [30]. Similarly, the indoor landmark is discovered to
data and balances the corresponding modeling of both the determine the current location by clustering the geomagnetic
long-term and fine-grained dependency to obtain more dis- signal in SemanticSLAM [31]. However, in large trial sites,
tinguishing and comprehensive features for accurate indoor the accuracy of the above solutions may begin to degrade
localization. with ambiguous features due to using the discrete geomagnetic
3) To lower the signal map survey work, we utilized fingerprint, resulting in serious positioning errors during long-
the visual-inertial odometry (VIO) algorithm to obtain the term localization.
device’s six-DoF pose for geotagged geometric fingerprints. The geomagnetic sequences are used for indoor localiza-
Moreover, we apply data augmentation to obtain a sequence tion to address the weak discernibility issue of geomag-
geomagnetic dataset to increase the model’s generalization by netic signal observations. Compared with discrete fingerprints,
synthesizing a sequence of single-point magnetic values to the magnetic sequences have more features and acquire the
form random trajectories. EL is also used in the DNN model time-series-based constraint when pedestrian walking [13].
to reduce the influence of random noise and outliers for robust Usually, the DTW algorithm is employed to establish the
localization. sequences matching geomagnetic fingerprints [32]. For exam-
As mentioned earlier, indoor geomagnetic signals benefit ple, LocateMe achieves accurate locations by comparing the
from their omnipresence, stabilization, and discrimination over magnetic sequences with geotagged database [33]. MaLoc
different locations. In this article, the geomagnetic sequences proposes augmented PF-based indoor geomagnetic positioning
are employed as the input of the DM-RNNs model to ver- using a smartphone [34]. For the system robustness, the inverse
ify the performance of the proposed localization method. of cosine similarity is used to compute the difference between
We conducted extensive experiments in three indoor scenes: magnetic sequences instead of Euclidean distance [35].
a spacious hall, a long-narrow corridor, and a crowded office. Meanwhile, integration approaches are proposed to improve
The experimental results demonstrate that the DM-RNN-based the localization accuracy. Magicol and MagFi employ geo-
geomagnetic localization model reduces mean positioning magnetism and Wi-Fi to obtain reliable fingerprints for indoor

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
3324 IEEE SENSORS JOURNAL, VOL. 23, NO. 3, 1 FEBRUARY 2023

locations [36], [37]. Similarly, Zhang et al. [18] presented


MaWi for indoor positioning by combining Wi-Fi and ambient
magnetic field, and the system achieves great performance.
Kwak et al. [38] proposed an indoor localization system
by fusing magnetism and Bluetooth representation. In addi-
tion, the inertial sensor is employed to assist in geomag-
netic fingerprint-based localization by adapting KF or PF
mechanism and their improved algorithm [15], [39]. Despite
their improvements, the sequence fingerprint-based approaches
need higher dimensional for better discrimination at the cost
of more time consuming, and the extended sequence may
Fig. 2. Workflow of the proposed geomagnetic localization system.
consider more about the overall shape of signal sequences
and discard minor local anomalies between the adjacent point
fingerprints, leading to lower localization accuracy in local scenes. Third, we propose an efficient geomagnetic fingerprint
areas. Furthermore, the fusion-based solutions must integrate collection method using only a smartphone without other
multiple information using a complex coupling mechanism, additional devices, and data augmentation is used to increase
resulting in higher computation complexity for smartphone- the model generalization for different users.
based indoor localization.
Recently, deep-learning methods have achieved great suc- III. S YSTEM W ORKFLOW
cess in computer vision (CV) and natural language process- In this section, we present the workflow of the proposed
ing (NLP) research fields. RNNs are used to process the indoor geomagnetic positioning model in Fig. 2. For demon-
time-series information and learn the temporal features for stration, we take advantage of the direction information and
model construction. Inspired by the temporal features learning multiscale RNNs to extract distinguishable features for accu-
ability of RNNs, some works utilized the LSTM model to learn rate localization.
the 3-D geomagnetic vectors for the sequence features of loca- The localization system consists of two phases: offline
tion [40], [20]. For the rich features, a double sliding-window model training and an online localization phase. In the offline
structure was designed in the LSTM-based geomagnetic local- phase, the geomagnetic fingerprint map is constructed to train
ization [24]. The work in [41] proposes a DeepML system that the localization model based on the proposed neural network
integrates the geomagnetic field observation and light intensity structure. Unlike the laborious survey, VIO [44] is employed
data as the input of LSTM for indoor positioning. Considering to obtain the labeled location for geomagnetic sequences using
the signal ambiguities, ST-Loc proposes multiple adaptive smartphones, which is more convenient and accurate than
representations of geomagnetic signals for more distinctive traditional methods such as interpolation or PDR [16], [45].
location features by using ResNet and recurrent networks [12]. First, we determine the scenes for the database and design the
The model in [42] utilizes the RNN to determine the location survey paths according to the floor plan. Given the accuracy of
with a regression solution; however, this approach needs a the VIO algorithm, the survey paths for training data collection
massive geomagnetic fingerprint sample for enough accuracy. are set in a loop to mitigate the impact of cumulative errors
In summary, deep-learning-based approaches can achieve due to the low-cost sensors’ noise. Then, surveyors walk along
good performance in some small test scenarios, but it is these paths with tracking devices fixed to the chest, holding
challenging to discriminate positions for random pedestrian the test smartphones randomly toward the walking direction
motion and heterogeneity interference. Besides, establishing with MEMS turned on. The tracking devices are employed to
an effective location representation based on sequence features record the sensor data, including measurements from nine-axis
of geomagnetic information in large-scale environments is MEMS and camera, and the accurate 6-DOF devices’ poses are
also a tough nut to crack. Meanwhile, the offline fingerprint obtained from the VIO algorithm with bundle adjustment (BA)
map is laborious work for testers to site survey, and the and loop detection (Section IV-A). Combining the devices’
deep-learning-based geomagnetic localization methods need location from VIO, we label each collected geomagnetic
a rich and large amount of data to train the model and sequences with the synchronous location results. To alleviate
improve its generalization ability. The work in [43] is related the impact of the random noise and heterogeneity problem, the
to ours, where the researchers use RNNs equipped with LSTM data procession and sequence data augmentation are leveraged
and attention value to detect variational anomalies for better to produce clean and enough input for the network. Then, these
geomagnetic localization. Our proposed model is significantly labeled geomagnetic sequences are stored in the database for
different from it in several aspects. First, instead of extracting the model training and test.
a single holistic feature from the input sequence, we propose In the online phase, the built-in MEMS automatically
multiscale RNNs to extract both the long-series and fine- records the geomagnetic measurements using mobile devices.
grained features for better location discernibility, and an EL Then, the raw data are denoised and resampled to obtain
mechanism is employed to enhance the robustness of the sequences due to the influence of external factors, and we
DNN model. Second, the direction information is the first put the processed geomagnetic sequences into the DM-RNNs
to be introduced to enrich features and improve the spatial for indoor localization (Section IV-B). Meanwhile, EL is
discernibility of geomagnetic fingerprints in large-scale indoor employed to determine the optimized positioning results from

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
SHU et al.: INDOOR GEOMAGNETIC POSITIONING USING DM-RNNs 3325

Fig. 4. Geomagnetic map of the office area built by the VIO-aid method
Fig. 3. Framework of the VIO-aided geomagnetic sequence data for unknown environments. The color bar indicates the intensity of the
collection. geomagnetic field (µT).

the multiple trained models (Section IV-B), improving the


accuracy and robustness of the localization model. the process in each data sequence collection to guarantee
the data quality. The bias and scale errors are calibrated by
IV. D ETAILED D ESIGN OF P OSITIONING M ODE using the method in [46]. Meanwhile, the relative pose change
In this section, we elaborate on the design of the proposed RT ,C between the tracking device and the collection device
DM-RNN-based geomagnetic localization model. We first is determined from the gyroscope measurements. Then, the
illustrate the efficient geomagnetic data collection using smart- position (x c , yc ) and orientation (θc , γc , ψc ) of the collection
phone sensors for the offline phase in Section IV-A. Then, device can be obtained from the tracking device’s 6-DoF
we describe the overall structure of the proposed DM-RNN pose. Second, an Android APP we developed is installed on
structure and the geomagnetic sequence feature extraction the two smartphones for data collection, and the tracking
process, followed by the details of EL for localization. device can connect with the test device through Bluetooth.
The system clocks of the two devices are established to obtain
the time synchronization between geotagged information and
A. Efficient Geomagnetic Dataset Collection Using the geomagnetic data. Third, pose estimation and data collection
Smartphone are conducted on these two smartphones. Considering the drift
Geomagnetic dataset collection is a high cost of human of VIO, the surveyor simply walks along the preplanned survey
work, and the conventional site survey approach suffers from path with the collection smartphone in a fixed body position,
low efficiency or additional infrastructure. Our idea is to and the path is a loop for pose optimization in SLAM [44].
lower the cost and keep enough accuracy using off-the-shelf Meanwhile, we warp the pose made by VIO according to
smartphones so that users can conveniently do the survey job. the actual floor plan to address the dimension deviation due
To this end, we devise a simple and efficient data collection to using a monocular camera and sensor noises. To correct
method with VIO aid using only smartphones, balancing the location by VIO, we match the point of interest (POI)
the efficiency and labeled precision for the offline training of VIO to the POI of the actual map. Then, the correct pose
data. Moreover, data preprocessing and sequence augmentation can be obtained after the linear transform based on the POIs.
are employed to alleviate the influence of sensor noise and We employ the sampling frequency of 100 Hz for the tracking
increase the generalization, and the synthetic sequence of device, and the geomagnetic sample frequency is set as 50 Hz.
single-point magnetic values is used for training according to Fig. 4 shows the data collection path of the devices in the
random trajectories in test scenarios. The framework of the office area, and the final geomagnetic map is built from the
efficient geomagnetic dataset collection method is shown in trajectory optimization. We collected the magnetic data of
Fig. 3. 103 m for 2 min, and the output length interval between
As shown in Fig. 3, the two smartphones are used to collect the geomagnetic collection trajectories is 0.3 m. Finally, the
the magnetic data with precise geotag information, and much tracking device’s pose PT = (x t , yt , z t , θt , γt , ψt ) is obtained
training data can be obtained after the preprocessing phase. using the VIO and trajectory optimization, and then, the col-
The specific process of geomagnetic sequence data collection lection data structure is Dc = [t, x, y, z, θ, γ , ψ, m x , m y , m z ],
is given as follows. where t is the synchronous time with the tracking device and
1) Geotagged Information and Geomagnetic Data Acquisi- m represents magnetic reading from the magnetic sensor of
tion: The geomagnetic training data are generated from the two the test smartphone. Therefore, the magnetic intensity under
smartphones used to determine the location information and the world coordinate system can also be determined using the
collect the geomagnetic data, as shown in Fig. 3, we fix the initialized quaternion-derived rotation matrix, which is more
tracking device to the surveyor’s chest, and the other smart- stable and reliable for indoor localization.
phone is held naturally during walking. The data collection Fig. 5 shows the magnetic field intensity of 100 fixed loca-
approach consists of four parts: device configuration, time tions from ground truth and the proposed VIO-aided approach.
synchronization, data collection, and data labeling. Like [47] for the ground truth fingerprints, we stand still and
First, the two smartphones perform careful inertial mea- measure the magnetic field at the reference location for 10 s,
surement unit (IMU) and camera calibration, and we operate distributed every 0.3 m along the survey path with a straight

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
3326 IEEE SENSORS JOURNAL, VOL. 23, NO. 3, 1 FEBRUARY 2023

Fig. 5. Magnetic field intensity of ground truth and the VIO-aid approach. Fig. 6. Trace generated by using the scenes-constrained RWP.
Dashed lines represent one standard deviation above and below the
ground-truth measurements.
opposite directions and removed the movement direction data
line. The mean value of magnetic field measurements collected in the horizontal direction. For the wide scene, such as the
at each point is treated as the truth value. In this figure, the hall, there are fewer constraints on the direction and speed of
two magnetic measures show similar changes, and the errors movement. In the office scene, we design the corresponding
are almost less than one standard deviation of the ground direction constraints considering the furniture layout, such as
truth. The fluctuation of the local observed values of the two desks or chairs. The output of the scene-constrained RWP is
groups of measurements is mainly due to the different motion a trace represented by a geomagnetic array that contains the
states of the two kinds of magnetic data collection solutions. corresponding location and direction in each sequence, and the
The average magnetic field intensity error of VIO-aid is only illustration is shown in Fig. 6.
2.73 μT, which can be ignored when considering the complex After the synthesized trajectories with RWP, the resampling
environments and sensor noises. Moreover, the magnetic field method is applied to keep the consistency of spatial density
observations collected by VIO-aids are closer to reality than between offline model training and online model testing,
the single-point survey approach. The state of pedestrian reducing the impact of device heterogeneity and different
motion slightly differs between offline database training and users. As resample algorithm in [51], the two parts, the
online localization, which would improve the positioning weighted downsampling and the upsampling module, are used
performance [48]. Therefore, the absolute centimeter-level to obtain geomagnetic samples for model training. To preserve
accuracy from the VIO-aid approach is sufficient to obtain anomalous data, we use the variance of samples to calculate
accurate location labels for offline training data collection. the weight of a geomagnetic sample surrounding the process-
To construct the entire map of geomagnetism, we employ ing sample. In order to reduce the heterogeneity and height
data interpolation to obtain a refined magnetic map due to interference with the geomagnetic fingerprint [52], a moving
overlap or missing survey. For the data collection at the average smoothing filter and a z-score normalization algorithm
same point, the average of these data is taken as decided are used to normalize the geomagnetic sequence for reliable
measurements. If the magnetic data are empty at some points, model training. Then, we adopt the fixed-side sliding window
we use the Clough–Tocher interpolation [49] method in two to segment the long trajectory data into multiple continue
dimensions, and the interval between data of the magnetic map subsequences with the corresponding geotagged labels, and
is set as 0.3 m. the location label consists of a 2-D position and coarse
2) Data Augmentation and Sequence Segmentation: To heading direction information. Given the sensor’s noise and
improve the generalization of the localization model, we adopt human motion habits, the coarse direction is enough for
the geomagnetic sequence augmentation algorithm to generate pedestrian navigation and positioning in Manhattan indoor
synthesized trajectories from multiple single-point magnetics. environments with structural regularity. The four directions
Considering the random movement of users with changing of the Earth’s coordinate system are used as direction labels
speed and directions, we apply the random waypoint (RWP) for each sequence, including east, south, west, and north.
model, a model usually used to simulate a communication According to human habit, the classification is divided into
protocol, to model the walking of indoor pedestrians to obtain four rough directions, corresponding to four direction esti-
more geomagnetic sequences for training and testing. Unlike mation categories, starting from 45◦ of heading estimation,
the trajectory generalization with random directions in [50], spaced at 90◦ clockwise. Each geomagnetic sequence has a
the indoor structure is utilized to establish constraints on the corresponding location and coarse direction information at the
directions. Different constraint strategies for indoor scenes are model training stage.
applied to the trajectory generation routes according to pedes- The smartphone’s magnetometer can measure the magnetic
trian movement habits, improving the model’s applicability field vector Bd . However, the raw magnetic reading is con-
and avoiding the time-consuming training problems caused by stantly changing due to pedestrians’ arbitrary motion. This
data redundancy. Specifically, in the long and narrow corridor study transforms the raw readings into the one under the
scene, we fixed the path generation along the corridor or the world coordinate system by the rotation matrix (θ, γ , ψ) of

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
SHU et al.: INDOOR GEOMAGNETIC POSITIONING USING DM-RNNs 3327

the smartphone, i.e., Bd = Rx (θ )R y (φ)Rz (ψ)Bw , where Bw using a simple RNN structure for positioning. Fortunately, the
represent the magnetic vector under the world coordinate multiscale structure models can be well applied to model the
system and Rx (θ ), R y (φ), and Rz (ψ) are three rotation matri- long-term dependency without sacrificing the fine-grained fea-
ces with respect to the smartphone’s axes. However, attitude tures, which have been adopted for music emotion prediction
estimation of the device is error-prone, and these errors would and sound event detection [55], [56]. In this work, we leverage
interfere Bw . In the offline map construction process, the multiscale RNNs better to model the temporal and spatial
smartphone’s attitude can be derived from the VIO-based dependencies of geomagnetic sequence, and then, the features
tracking device and the initial calibration. For the rotation from RNNs are used as input of EL for user location; Fig. 7
matrix in the online phase, the walking characters are used shows the structure of our proposed DM-RNNs sequence
to establish constraints on the attitude changing. As works in classification model. Then, the specific process of the proposed
[53], the zero-velocity updated (ZUPT) and zero angular rate deep-learning-based localization model is given as follows.
update (ZARU) are employed to constrain the cumulative and 1) Multiscale RNNs: Fig. 7 shows the structure of the mul-
divergence errors during the quasi-static periods. A gyroscope tiscale RNN-based geomagnetic localization model. After the
instead of magnetometer provides the relative direction change geomagnetic data processing, the sliding window segments the
in one step, and we further reduce rotational drifting using the data to obtain the current sequence, and then, the geomagnetic
filtering-based algorithm proposed in [54]. Then, we use the sequences are used as input for two RNNs, which separately
average acceleration over the past several steps to estimate work at the coarse- and fine-scale structures. The multiple
the rotation matrix based on the gravity in the device’s body layers and bidirectional structures are applied to both RNNs
frame, and the magnetic readings can be converted from the to exploit the contextual information due to random pedestrian
device’s body frame to the world coordinate system. walking, and the two RNNs are aligned so that each cell of the
In our scheme, each of the geomagnetic data has 5-D mag- fine-scale RNNs interacts with the coarse-scale RNNs. A geo-
netic data elements m x y , m x , m y , m z , and m, which repre- magnetic sequence of coarse- and fine-scale input vectors is
sent the horizontal magnetic field strength based on the device represented as: {x t } and {X t }, respectively. The coarse-scale
coordinate system, and 3-D magnetic field strength obtained RNNs have N1 layers, and the two direction hidden activations
←t
from the motion-constrained-based rotation conversion for of nth the layer are denoted as {htn } and { h n }. Similarly, the
Android application development under the world coordinate ←T
system and the magnetic field magnitude as DM-RNNs input; hidden activations are expressed as { HnT } and { H n }. Then, the
the target label is the corresponding location L K of the K th recurrent process of each layer can be represented as
segment in the training process. The proposed localization    
model predicts the location and referenced direction for the ←t ←t ←t +1
htn , h n = f RNNs htn−1 , h n−1 htn−1 , h n
current sequence frame in the online stage, which can be
   T +1

modeled as the classification problem. According to average T ←
T ←T
T −1 ←
 
Hn , H n = cRNNs Hn−1 , H n−1 , Hn , H n
T  (2)
walking speed, the segmented geomagnetic sequence is labeled
by 2-D location and direction corresponding to its last 25 geo-
magnetic samples. In each geomagnetic sequence for model where t = 3(T − 1) + i for i ∈ {1, 2, 3, 4, 5}. The first
training, the training frames G K contain 150 samples, and ←t
these samples can ensure to sufficiently distinguishable. Then, recurrent layer (i.e., when n = 1) [htn , h n ] is replaced by xt
←T
five channels from the magnetometer and the corresponding and [ HnT , H n ] is replaced by X t .
ground truth of location and direction are expressed in the Moreover, multiscale features can be obtained from both
following: forward and backward hidden states at each time step. Then,
⎧    we concatenate them together to generate the features Fm of

⎪ G = I D , S 1
, S 2
, · · ·, S 6
, LK


K K K K K the corresponding fine scale p (1 ≤ p ≤ P) and coarse scale

⎪ ⎡ ⎤

⎪ m 1_1 · · · m 1_5 m (1 ≤ m ≤ M)

⎢ . . ⎥


S K = ⎣ ..
n . . ... ⎥ (1)  

⎪ ⎦ Fm = f 1F , f2F ; · · ·; f pF ; f 1C ; f 1C ; f 2C ; · · ·; f mC (3)



⎪ m 25_1 · · · m 25_5

⎩ L = (x , y , D )
K K K K
where [·; ·] denotes feature concatenation from fine- and
where I D K denotes the identifier of the K th segment, SKn coarse-scale features. Next, global temporal features Fm are
represents the geomagnetic samples of 5-D vectors from utilized as the input of EL.
magnetometer, and L K denotes the label of K , including 2-D 2) EL-Based Localization: Given the inevitable existence of
location and direction information. various random noises in data collection and computational
costs at the training stage, the EL mechanism is employed
B. Localization Model to address the outlier problem. According to different initial
The RNN is suited to handle time-series data and extract the training settings, the multiple independent models are trained
long-term dependency for classification or recognition tasks. to obtain the same accuracy regardless of geomagnetic noise
However, the only temporal correlations between consecutive and outliers. Then, all predictions from multiple RNNs models
magnetic data cannot provide sufficient distinctiveness of are considered to avoid a single model’s serious errors. In this
location features in large-scale indoor environments when work, the different initial parameters of training models are
Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
3328 IEEE SENSORS JOURNAL, VOL. 23, NO. 3, 1 FEBRUARY 2023

Fig. 7. Structure of the multiscale RNN-based geomagnetic localization model.

based on the Gaussian distribution, as in the following:


⎧  

⎨ Paras ∼ N μ, σ , μ ∈ [−1, 1] , σ ∈ (0, 10]
2 2

1 − (x−μ)
2 (4)

⎩ fd (x) = √ e 2σ 2
σ 2π
where f d (x) represents the probability function of training
models.
The initial five prediction locations {L 1 , L 2 , · · ·, L 5 }
can be determined from these multiple independent mod-
els {m 1 , m 2 , · · ·, m 5 } with different initial parameters when
the ensemble approach gets a geomagnetic sequence. Then,
we adopt the gradient descent optimization method to obtain
Fig. 8. Floorplans and geomagnetic field map of three trial sites. (a), (b)
the model’s predicted location after iterative training, and and (c) correspond to the hall area, the office area and the corridor area,
the final prediction locations of these dependent models are respectively.
denoted as { L̃ 1 , L̃ 2 , ···, L̃ 5 }. Finally, we take the average of this
predication L̄ AVE as the EL-based localization results, which TABLE I
integrate those train models for accurate localization. D ESCRIPTION OF T ESTERS AND D EVICES

V. E XPERIMENT R ESULTS
In this section, we conduct extensive experiments to verify
the performance of indoor geomagnetic positioning based on
DM-RNNs. First, the experimental dataset and setting are
illustrated in Section V-A, followed by comparison schemes
and evaluating metrics in Section V-B. Afterward, the results
of comparative experiments are presented in Section V-C, and
we finally conduct an ablation study to prove the effectiveness
of our design model in Section V-D. Regarding the dataset collection for experiments, we apply
VIO to efficiently obtain accurate geotagged labels for model
A. Dataset and Experimental Settings training and test, as illustrated in Section IV. Considering
We have conducted experiments in three typical indoor the convenience of a survey, we set Google Pixel XL 3 as
environments: a spacious hall, narrow corridors, and a crowded the tracking device for ground truth and labeled location
office. The three site plans and corresponding geomagnetic information in offline map construction. In the dataset col-
maps are shown in Fig. 8. These three test sites cover areas lection process, the three experiment users are requested to
of about 50, 900, and 20 m2 , which contain various types walk through some randomly selected paths with different
and sizes for indoor localization tests. Furthermore, we invite smartphones, including testers #1, #2, and #3. Then, we use the
multiple volunteers to test and evaluate the indoor localization sequences from tester #1 and data augmentation as the training
model. Meanwhile, multiple smartphones are used as test data. Table II presents the detail of the training and test
devices to evaluate the generality of the proposed model, and datasets in three indoor scenes, and we apply the 150 samples
Table I details the profiles of testers and devices. of magnetic data (magnetic readings of 3 s when using 50 Hz)

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
SHU et al.: INDOOR GEOMAGNETIC POSITIONING USING DM-RNNs 3329

TABLE II
D ATASETS C OLLECTION IN T HREE I NDOOR S CENES

for model training and testing in all trial sites, which has been
described in Section IV-A.
We train the proposed DM-RNN-based indoor geomagnetic
localization model separately with training dataset collection
for each scene and evaluate its performance with the corre-
sponding test dataset. Furthermore, the iteration parameters of
EL are set at 300, 300, and 500 for a hall, corridors, and
office, respectively. In the model training, we choose PyTorch
Fig. 9. CDF of indoor localization error in the hall area.
as a deep-learning framework in experiments, and Adam is
leveraged to optimize the network. Cross entropy (CE) is set TABLE III
as a loss function. The experiments are all performed on a M EAN L OCALIZATION E RROR V ERSUS D IFFERENT
server installing Ubuntu 18.01 with Nvidia RTX 3080Ti GPU, A PPROACHES IN T HREE S CENARIOS
an Intel CoreTM i7-8700H CPU with a 3.20-GHz frequency.

B. Comparison Scheme and Evaluation Metrics


To verify the superiority of the proposed DM-RNN-based
geomagnetic localization model, we compare the model with
the following state-of-the-art indoor geomagnetic positioning
methods.
Shu et al. [36] devised vectorizing geomagnetic sequences
to improve the discernibility of the raw measurements, and the C. Experimental Results
vectors are employed to shape the particle distribution in the To verify the performance of DM-RNNs, we conduct exten-
particle filtering-based positioning process. sive experiments in three typical indoor scenarios and compare
Subbu et al. [33] proposed DTW to align the similarity to the proposed method with state-of-the-art competing methods,
determine the matching sequence in the training dataset for including traditional and deep-learning-based approaches.
indoor geomagnetic positioning. 1) Localization Accuracy: The mean positioning error of dif-
Bhattarai et al. [57] adopted a stand LSTM to extract ferent approaches is reported in Table III. Figs. 9–11 present
the geomagnetic features for indoor landmarks classification, the cumulative distribution functions (cdfs) of localization
and the continuous geomagnetic signal is segmented into errors in the hall, corridor, and office areas, respectively.
equal-size sequences for classifying location landmarks. The proposed DM-RNN-LSTM achieves the best localiza-
Chiang et al. [58] also employed deep-learning-based indoor tion performance among these schemes in all three scenes.
localization by taking geomagnetic sequences as input. Also, Compared to Shu, Subbu, Bhattarai, and Chiang, the mean
two neural network models, DNN and RNN, are utilized to positioning error of DM-RNN_LSTM reduced by nearly 60%,
improve the uniqueness level of geomagnetic sequence for 53%, 45%, and 40% on average, respectively. Similarly, the
higher positioning accuracy. DM-RNNs_GRU-based approach obtains better results than
Moreover, the two types of advanced RNNs, gated recur- Shu, Subbu, Bhattarai, and Chiang, and it reduces the local-
rent unit (GRU) and LSTM, are considered to evaluate the ization errors by nearly 55%, 46%, 37%, and 31%. Therefore,
positioning models’ performance. We apply RNN with GRU the results demonstrate that the proposed DM-RNN-based
and LSTM units for the fine-scale RNN and coarse-scale RNN geomagnetic positioning model can achieve higher positioning
(marked as DM-RNNs_GRU and DM-RNNs_LSTM) for these accuracy than these competing schemes in all scenes. More-
two kinds of structures. over, the max position errors of DM-RNN-based approaches
We use the overall mean positioning error in the experiments are less than the other approaches, and 4.97 m of average
to test the model performance. Suppose we perform N test maximum positioning error is obtained from DM-LSTM,
cases, ground truth location of which are L 1 , L 2 , . . . , L N . achieving better robustness in different scenes. The reason
Also, the corresponding localization results from test models is that DM-RNNs can extract better features to represent the
are presented L̂ 1 , L̂ 2 , . . . , L̂ N . Then, the overall mean posi- corresponding location.
tioning error e is defined as follows: Meanwhile, deep-learning-based schemes, Bhattarai,
Chiang, and DM-RNNs, achieve better positioning than the
1  
N
  traditional Shu and Subbu schemes in the hall and corridor
e=  L̂ n − L n  (5)
N 2 areas. The reason is that deep-learning-based methods can
1
  obtain geomagnetic distinctiveness for positioning by using
L̂ n = x̂ n , ŷn , L n = (x n , yn ) (6)
supervised learning and mapping geomagnetic features
where the two-norm is used to compute the localization errors. to location formation in complex indoor environments.
Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
3330 IEEE SENSORS JOURNAL, VOL. 23, NO. 3, 1 FEBRUARY 2023

Fig. 13. Mean positioning error versus different methods from hetero-
geneous testers in the corridor areas.

Fig. 10. CDF of indoor localization error in the long corridors.

Fig. 14. Mean positioning error versus different methods in different


indoor scenarios.

scenes. Figs. 12 and 13 show the bar chart of localization


Fig. 11. CDF of indoor localization error in the office area.
error when testing with different smartphones and users
in long-narrow corridors. Due to heterogeneity, different
devices and users may obtain different geomagnetic mea-
surements at one location, resulting in feature matching fail-
ure between query fingerprint and dataset. Fortunately, this
problem can be mitigated using sequence-based approaches,
such as DTW- and deep-learning-based methods. However,
the experimental results show that learning-based methods
can achieve higher localization accuracy than the traditional
single-point or DTW-based methods. Meanwhile, the proposed
DM-RNN-based methods are more robust than the other
learning-based solutions when using the different devices,
and the localization results of DM-RNNs_LSTM are better
Fig. 12. Mean positioning error versus different methods with heteroge-
neous devices in the corridor areas. than those of DM-RNNs_GRU. In these figures, we can
find that DM-RNNs_LSTM-based geomagnetic positioning
However, Subbu obtains better results of mean positioning obtains less than 1.8 m of mean localization errors when
error than Bhattarai with stand LSTM in dynamic office meeting heterogeneity of pedestrians and devices in corridors
environments. Unlike the simple RNNs, the proposed area, demonstrating the generalization of the DM-RNN-based
DM-RNNs convert the original geomagnetic sequence into model. Fig. 14 presents the mean positioning errors of dif-
multiscale features, including long-term dependency and ferent methods in the three indoor scenarios. Furthermore,
fine-grained description, and also consider the direction the results show that the proposed DM-RNN-based solutions
information of pedestrian motion, increasing the spatial and achieve almost comparable positioning accuracy over different
temporal corrections between geomagnetic sequences and scenarios, and their mean positioning errors are all less than
indoor location. Concerning the other deep-learning-based 2 m. The reason is that DM-RNNs integrate direction infor-
solutions, DM-RNNs obtain more than 80%, 83%, and 92% mation and multiscale geomagnetic features to improve the
of samples’ localization error less than 2 m in the hall, features’ distinguishability for localization, which has been
corridors, and office area, respectively. In addition, it is clear elaborated in Section IV-B. Therefore, the DM-RNN-based
that the performance of DM-RNNs_LSTM is better than that localization approach achieves high applicability and robust-
of DM-RNNs_GRU, and LSTM units can generalize better ness with different devices and users in typical indoor scenes.
accuracy than GRU units due to their capability of learning
long-term dependencies. D. Ablation Study
2) Robustness Evaluation: In terms of the robustness of To verify the effectiveness of the localization model of
localization models, comparisons of localization errors with DM-RNNs, we test DM-RNNs_LSTM with the ablation study.
heterogeneous devices
Authorized licensed use or testers
limited areInstitute
to: Harbin conducted DownloadedWe
in different
of Technology. first04,2025
on May eliminated the direction
at 11:06:39 information
UTC from IEEE in the DM-RNNs
Xplore. Restrictions apply.
SHU et al.: INDOOR GEOMAGNETIC POSITIONING USING DM-RNNs 3331

Fig. 15. Positioning errors of different models in three trial sites.

TABLE IV Furthermore, the coarse direction can be obtained by using


M EAN P OSITIONING E RRORS AND D IRECTION E STIMATION P RECISION the direction information in these learning models, which is
OF D IFFERENT M ODELS IN T HREE T RIAL S ITES
significant for users in positioning and navigation in complex
indoor environments. Concurrently, compared to DM-RNNs-
without-EL, DM-RNNs show better performance in the three
trial sites, reducing mean localization error by about 7%,
which benefits the EL mechanism in final location estimation.
Especially in the corridor areas, DM-RNNs-without-EL has
significant positioning deviations, such as samples #389 and
model, denoting this setting as M-RNNs. Then, we use single #985. However, DM-RNNs are more robust because they
RNNs to replace the multiscale RNNs in DM-RNNs to eval- leverage the multiple different models independently and
uate the impact of multiscale RNNs, denoted as DS-RNNs. combine them to generate a more comprehensive ensemble
Also, the 150 samples’ scale sequence is employed for the model that is tolerant to noise and outliers, achieving robust
single RNNs in the tests due to obtaining the long-dependency localization results without collecting a large amount of redun-
features in the large-scale scenario. Finally, we further exper- dant training data. Given that direction information, multiscale
imented with evaluating the impact of EL, and the multiple RNNs, and EL can be significant in these localization models,
fully connected layers are applied in DM-RNNs to deter- we perform three a set of t-tests to find what positioning
mine the location directly, denoted as DM-RNNs-without-EL. errors in M-RNNs, DS-RNNs, and DM-RNNs-without-EL
In this section, the precision of direction estimation Pdir is also have these significant differences. Also, we find, using these
used as the evaluation metric to verify our models. Then, the approaches, significant differences in the positioning errors
precision is defined as follows: with respect to DM-RNNs. Compared to M-RNNs, DS-RNNs,
and DM-RNNs-without-EL, DM-RNNs show a statistically
m significant reduction in localization errors with p-values of
Pdir = × 100% (7)
n 1.04 × e−26 , 8.35 × e−100 , and 9.57 × e−19 , respectively.
Therefore, these positioning results show strong correlations
where m denotes the number of correct direction estimation for the three test models, and DM-RNNs outperform other
samples from models and n is the number of all test sam- models by a large margin in all three trial sites.
ples. The DM-RNN-based localization model we proposed
is the first geomagnetic localization method to take direction
information into the process to obtain a coarse direction of VI. C ONCLUSION
pedestrian walking, which is significant for users to positioning This article proposes an efficient deep-learning-based geo-
and navigation in complex indoor scenarios. magnetic indoor localization using DM-RNNs. Using a learn-
We train and test these localization models, including ing solution, we cast the geomagnetic positioning problem as
M-RNNs, DS-RNNs, and DM-RNNs-without-EL, on the three a sequence features classification problem. Given the hetero-
indoor scenes, and the results compared with the proposed geneous device and user, the direction information of pedes-
DM-RNNs are presented in Table IV. Fig. 15 shows the trian walking is utilized to augment the directional features
positioning errors of different learning models in the three of the geomagnetic sequence for localization. Furthermore,
trial areas. We can find that DM-RNNs obtain better results we proposed multiscale RNNs to balance the long-term and
than other methods. Compared to M-RNNs and DS-RNNs, the the fine-grained dependency modeling for geomagnetic feature
mean localization errors of DM-RNNs are reduced by 12% and extraction, which can improve geomagnetic distinguishability
34% on average, respectively. Therefore, the direction infor- for localization in large-scale indoor environments. Then,
mation and multiscale features of geomagnetic sequences are an EL mechanism is applied to combine multiple models to
vital to improving fingerprint distinctiveness for localization. determine the final position estimation, alleviating the impact

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
3332 IEEE SENSORS JOURNAL, VOL. 23, NO. 3, 1 FEBRUARY 2023

of noise and outliers of the training dataset. Moreover, we pro- [14] M. Sun, Y. Wang, S. Xu, H. Yang, and K. Zhang, “Indoor geomagnetic
pose an efficient training data collection approach to lower positioning using the enhanced genetic algorithm-based extreme learning
machine,” IEEE Trans. Instrum. Meas., vol. 70, pp. 1–11, 2021.
the signal map survey work by using a VIO algorithm. Data [15] M. Sun, Y. Wang, S. Xu, H. Cao, and M. Si, “Indoor positioning
augmentation is also employed to obtain a sequence geomag- integrating PDR/geomagnetic positioning based on the genetic-particle
netic dataset to increase the model’s generalization. We have filter,” Appl. Sci., vol. 10, no. 2, p. 668, Jan. 2020.
[16] C. Wu, Z. Yang, and Y. Liu, “Smartphones based crowdsourcing for
conducted extensive experiments in three indoor scenes: the indoor localization,” IEEE Trans. Mobile Comput., vol. 14, no. 2,
spacious hall, the long-narrow corridors, and the crowded pp. 444–457, Feb. 2015.
office. Experimental results show that the proposed DM-RNNs [17] J. Ma, J. Qian, P. Li, R. Ying, and P. Liu, “Indoor localization based
on magnetic anomalies and pedestrian dead reckoning,” in Proc. 26th
improve the positioning accuracy in all scenarios and achieve Int. Tech. Meeting Satell. Division Inst. Navigat. (ION GNSS), 2013,
outstanding positional robustness compared with other state- pp. 1033–1038.
of-the-art methods. Meanwhile, another significant advantage [18] C. Zhang, J. Luo, and J. Wu, “A dual-sensor enabled indoor localization
system with crowdsensing spot survey,” in Proc. IEEE Int. Conf. Distrib.
of our model is that coarse direction information can be pro- Comput. Sensor Syst., May 2014, pp. 75–82.
vided from the DM-RNNs model, and 79% direction precision [19] L. Antsfeld and B. Chidlovskii, “Magnetic field sensing for pedestrian
can be obtained, which is vital for pedestrians to enjoy the and robot indoor positioning,” in Proc. Int. Conf. Indoor Positioning
Indoor Navigat. (IPIN), Nov. 2021, pp. 1–8.
location-of-service in large-scale indoor environments.
[20] H. J. Bae and L. Choi, “Large-scale indoor positioning using geomag-
However, some limitations need to be approached in our netic field with deep neural networks,” in Proc. IEEE Int. Conf. Commun.
future work. The proposed model has been verified with three (ICC), May 2019, pp. 1–6.
trial sites in the same building, while we need to test the [21] X. Ding, M. Zhu, and B. Xiao, “Accurate indoor localization using
magnetic sequence fingerprints with deep learning,” in Proc. Int. Conf.
generalization of the positioning system in buildings with Algorithms Archit. Parallel Process., 2021, pp. 65–84.
different structures, which makes sense for a broader range [22] I. Ashraf, S. Hur, S. Park, and Y. Park, “DeepLocate: Smartphone based
of LBS. Moreover, the data processing and model training in indoor localization with a deep neural network ensemble classifier,”
Sensors, vol. 20, no. 1, p. 133, Dec. 2019.
this work is processed at the workstation. Given the demand [23] H. J. Jang, J.-M. Shin, and L. Choi, “Geomagnetic field based indoor
for real-time localization, the combination of the client–server localization using recurrent neural networks,” Proc. IEEE Global Com-
architecture and 5G technology may be used to solve this time- mun. Conf. (GLOBECOM), Dec. 2017, pp. 1–6.
[24] M. Zhang, J. Jia, J. Chen, L. Yang, L. Guo, and X. Wang, “Real-time
delay problem, which is worth further investigation in future indoor localization using smartphone magnetic with LSTM networks,”
studies. Neural Comput. Appl., vol. 33, no. 16, pp. 10093–10110, Aug. 2021.
[25] A. Alitaleshi, H. Jazayeriy, and S. J. Kazemitabar, “WiFi fingerprinting
based floor detection with hierarchical extreme learning machine,”
R EFERENCES in Proc. 10th Int. Conf. Comput. Knowl. Eng. (ICCKE), Oct. 2020,
[1] S. Mazuelas et al., “Robust indoor positioning provided by real-time pp. 113–117.
RSSI values in unmodified WLAN networks,” IEEE J. Sel. Topics Signal [26] S. Feldmann, K. Kyamakya, A. Zapater, and Z. Lue, “An indoor
Process., vol. 3, no. 5, pp. 821–831, Oct. 2009. Bluetooth-based positioning system: Concept, implementation and
[2] L. Zhang and H. Wang, “Device-free tracking via joint velocity and AOA experimental evaluation,” in Proc. Int. Conf. Wireless Netw., 2003,
estimation with commodity WiFi,” IEEE Sensors J., vol. 19, no. 22, pp. 1–5.
pp. 10662–10673, Nov. 2019. [27] K. Minne et al., “Experimental evaluation of UWB indoor positioning
[3] A. H. Lashkari, B. Parhizkar, and M. N. A. Ngan, “WiFi-based indoor for indoor track cycling,” Sensors, vol. 19, no. 9, p. 2041, May 2019.
positioning system,” in Proc. 2nd Int. Conf. Comput. Netw. Technol., [28] P. Zhang, Y. Li, Y. Zhuang, J. Kuang, X. Niu, and R. Chen, “Multi-
2010, pp. 76–78. level information fusion with motion constraints: Key to achieve high-
[4] S. Li et al., “TDOA-based passive localization of standard WiFi devices,” precision gait analysis using low-cost inertial sensors,” Inf. Fusion,
in Proc. Ubiquitous Positioning, Indoor Navigat. Location-Based Ser- vol. 89, pp. 603–618, Jan. 2023.
vices (UPINLBS), Mar. 2018, pp. 1–5. [29] N. El-Sheimy and Y. Li, “Indoor navigation: State of the art and future
[5] G. Mao, B. D. O. Anderson, and B. Fidan, “Path loss exponent trends,” Satell. Navigat., vol. 2, no. 7, pp. 1–23, 2021.
estimation for wireless sensor network localization,” Comput. Netw., [30] Y. Zhao, C. Qian, L. Gong, Z. Li, and Y. Liu, “LMDD: Light-weight
vol. 51, no. 10, pp. 2467–2483, Jul. 2007. magnetic-based door detection with your smartphone,” in Proc. 44th Int.
[6] A. E. Assaf, S. Zaidi, and S. Affes, “Robust ANNs-based WSN Conf. Parallel Process., Sep. 2015, pp. 919–928.
localization in the presence of anisotropic signal attenuation,” IEEE [31] H. Abdelnasser et al., “SemanticSLAM: Using environment landmarks
Wireless Commun. Lett., vol. 5, no. 5, pp. 504–507, May 2016. for unsupervised indoor localization,” IEEE Trans. Mobile Comput.,
[7] A. Chatterjee, “A Fletcher–Reeves conjugate gradient neural-network- vol. 15, no. 7, pp. 1770–1782, Jul. 2016.
based localization algorithm for wireless sensor networks,” IEEE Trans. [32] K. Pathapati Subbu, B. Gozick, and R. Dantu, “Indoor localization
Veh. Technol., vol. 59, no. 2, pp. 823–830, Feb. 2010. through dynamic time warping,” in Proc. IEEE Int. Conf. Syst., Man,
[8] S. He and S.-H. G. Chan, “Wi-Fi fingerprint-based indoor positioning: Cybern., Oct. 2011, pp. 1639–1644.
Recent advances and comparisons,” IEEE Commun. Surveys Tuts., [33] K. P. Subbu, B. Gozick, and R. Dantu, “LocateMe: Magnetic-fields-
vol. 18, no. 1, pp. 466–490, 1st Quart., 2015. based indoor localization using smartphones,” ACM Trans. Intell. Syst.
[9] G. M. Mendoza-Silva, M. Matey-Sanz, J. Torres-Sospedra, and J. Huerta, Technol., vol. 4, no. 4, p. 73, 2013.
“BLE RSS measurements dataset for research on accurate indoor posi- [34] H. Xie, T. Gu, X. Tao, H. Ye, and J. Lv, “MaLoc: A practical magnetic
tioning,” Data, vol. 4, no. 1, p. 12, Jan. 2019. fingerprinting approach to indoor localization using smartphones,” in
[10] J. Chung, M. Donahoe, C. Schmandt, I.-J. Kim, P. Razavai, and Proc. ACM Int. Joint Conf. Pervasive Ubiquitous Comput., Sep. 2014,
M. Wiseman, “Indoor location sensing using geo-magnetism,” in Proc. pp. 243–253.
9th Int. Conf. Mobile Syst., Appl., Services MobiSys, 2011, pp. 141–154. [35] C. Zhang, K. P. Subbu, J. Luo, and J. Wu, “GROPING: Geomagnetism
[11] E. Le Grand and S. Thrun, “3-axis magnetic field mapping and fusion and crowdsensing powered indoor navigation,” IEEE Trans. Mobile
for indoor localization,” in Proc. IEEE Int. Conf. Multisensor Fusion Comput., vol. 14, no. 2, pp. 387–400, Feb. 2015.
Integr. Intell. Syst. (MFI), Sep. 2012, pp. 358–364. [36] Y. Shu, C. Bo, G. Shen, C. Zhao, L. Li, and F. Zhao, “Magicol: Indoor
[12] N. Liu, T. He, S. He, and Q. Niu, “Indoor localization with adaptive localization using pervasive magnetic field and opportunistic WiFi
signal sequence representations,” IEEE Trans. Veh. Technol., vol. 70, sensing,” IEEE J. Sel. Areas Commun., vol. 33, no. 7, pp. 1443–1457,
no. 11, pp. 11678–11694, Nov. 2021. Jul. 2015.
[13] S. He and K. G. Shin, “Geomagnetism for smartphone-based indoor [37] H. Wu, Z. Mo, J. Tan, S. He, and S.-H. G. Chan, “Efficient indoor
localization: Challenges, advances, and comparisons,” ACM Comput. localization based on geomagnetism,” ACM Trans. Sensor Netw., vol. 15,
Surveys, vol. 50, no. 6, pp. 1–37, Nov. 2020. no. 4, pp. 1–25, 2019.

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.
SHU et al.: INDOOR GEOMAGNETIC POSITIONING USING DM-RNNs 3333

[38] M. Kwak, Y. Park, J. Kim, J. Han, and T. Kwon, “An energy-efficient Mingcong Shu is currently pursuing the Ph.D.
and lightweight indoor localization system for Internet-of-Things (IoT) degree with the School of Environment Sci-
environments,” in Proc. ACM Interact., Mobile, Wearable Ubiquitous ence and Spatial Informatics, China University of
Technol., Mar. 2018, vol. 2, no. 1, pp. 1–28. Mining and Technology, Xuzhou, China.
[39] L. Hou et al., “Orientation-aided stochastic magnetic matching for indoor His research interests include indoor position
localization,” IEEE Sensors J., vol. 20, no. 2, pp. 1003–1010, Jan. 2020. and navigation, visual localization, and computer
[40] X. Sun, C. Wu, X. Gao, and G. Y. Li, “Fingerprint-based localization vision.
for massive MIMO-OFDM system with deep convolutional neural
networks,” IEEE Trans. Veh. Technol., vol. 68, no. 11, pp. 10846–10857,
Dec. 2019.
[41] X. Wang, Z. Yu, and S. Mao, “Indoor localization using smartphone
magnetic and light sensors: A deep LSTM approach,” Mobile Netw.
Appl., vol. 25, no. 2, pp. 819–832, Apr. 2020.
[42] M. Abid and G. Lefebvre, “Deep neural networks for indoor geomag-
netic field fingerprinting with regression approach,” in Proc. Int. Conf.
Eng. Appl. Neural Netw., 2021, pp. 178–189.
[43] Q. Niu, T. He, N. Liu, S. He, X. Luo, and F. Zhou, “MAIL: Multi-scale
attention-guided indoor localization using geomagnetic sequences,” in
Guoliang Chen is currently the Director of the
Proc. ACM Interact. Mob. Wearable Ubiquitous Technol., vol. 4, 2020,
Key Laboratory of the National Administration of
p. 54.
Surveying, Mapping and Geographical Informa-
[44] T. Qin, P. Li, and S. Shen, “VINS-Mono: A robust and versatile
tion for Land, Environment and Disaster Monitor-
monocular visual-inertial state estimator,” IEEE Trans. Robot., vol. 34,
ing, China University of Mining and Technology,
no. 4, pp. 1004–1020, Aug. 2018.
Xuzhou, China. He is also a Professor and a
[45] S. Sorour, Y. Lostanlen, S. Valaee, and K. Majeed, “Joint indoor
Ph.D. Supervisor with the School of Environment
localization and radio map construction with limited deployment load,”
Science and Spatial Informatics, China Univer-
IEEE Trans. Mobile Comput., vol. 14, no. 5, pp. 1031–1043, May 2015.
sity of Mining and Technology. He has been
[46] S. Herath, “Robust neural inertial navigation in the wild,” M.S. thesis,
laureate for two National Science and Technol-
Appl. Sci., UOM, Moratuwa, Sri Lanka, 2019.
ogy Progress Prizes and granted more than two
[47] C. E. Galván-Tejada, J.-P. García-Vázquez, and R. F. Brena, “Magnetic-
provincial- or ministry-level prizes. He has published more than 43 aca-
field feature extraction for indoor location estimation,” in Ubiquitous
demic articles and ten patents and has the copyright on 18 pieces
Computing and Ambient Intelligence. Context-Awareness and Context-
of software. His research interests cover indoor–outdoor positioning
Driven Interaction. Cham, Switzerland: Springer, 2013, pp. 9–16.
technology and geographic location-based service.
[48] H. Wu, J. Tan, and S.-H.-G. Chan, “Pedometer-free geomagnetic finger-
printing with casual walking speed,” ACM Trans. Sensor Netw., vol. 18,
no. 1, pp. 1–21, Feb. 2022.
[49] S. H. M. Roth, “Bernstein-Bezier representation for facial surgery
simulation,” Ph.D. thesis, Swiss Federal Inst. Technol., ETH, Zurich,
Switzerland, 2002.
[50] M. Abid, P. Compagnon, and G. Lefebvre, “Improved CNN-based
magnetic indoor positioning system using attention mechanism,” in
Proc. Int. Conf. Indoor Positioning Indoor Navigat. (IPIN), Nov. 2021, Zhenghua Zhang is currently pursuing the Ph.D.
pp. 1–8. degree with the School of Environment Sci-
[51] L. Wang, H. Luo, Q. Wang, W. Shao, and F. Zhao, “A hierarchical ence and Spatial Informatics, China University of
LSTM-based indoor geomagnetic localization algorithm,” IEEE Sensors Mining and Technology, Xuzhou, China.
J., vol. 22, no. 2, pp. 1227–1237, Jan. 2022. His main research interests include deep learn-
[52] G. Ouyang and K. Abed-Meraim, “Analysis of magnetic field measure- ing and 3-D reconstruction.
ments for mobile localisation,” in Proc. Int. Conf. Indoor Positioning
Indoor Navigat. (IPIN), Nov. 2021, pp. 1–8.
[53] Y. Yu et al., “Autonomous 3D indoor localization based on crowdsourced
Wi-Fi fingerprinting and MEMS sensors,” IEEE Sensors J., vol. 22,
no. 6, pp. 5248–5259, Mar. 2021.
[54] M. Shu, G. Chen, and Z. Zhang, “Efficient image-based indoor local-
ization with MEMS aid on the mobile device,” ISPRS J. Photogramm.
Remote Sens., vol. 185, pp. 85–110, Mar. 2022.
[55] Y. Guo, M. Xu, Z. Wu, J. Wu, and B. Su, “Multi-scale convolutional
recurrent neural network with ensemble method for weakly labeled
sound event detection,” in Proc. 8th Int. Conf. Affect. Comput. Intell.
Interact. Workshops Demos (ACIIW), Sep. 2019, pp. 1–5. Lei Xu is currently pursuing the Ph.D. degree
[56] R. Lu, Z. Duan, and C. Zhang, “Multi-scale recurrent neural network for with the School of Environment Science and
sound event detection,” in Proc. IEEE Int. Conf. Acoust., Speech Signal Spatial Informatics, China University of Mining
Process. (ICASSP), Apr. 2018, pp. 131–135. and Technology, Xuzhou, China.
[57] B. Bhattarai, R. K. Yadav, H.-S. Gang, and J.-Y. Pyun, “Geomagnetic His main research interests include global nav-
field based indoor landmark classification using deep learning,” IEEE igation satellite system (GNSS) positioning and
Access, vol. 7, pp. 33943–33956, 2019. integrated navigation.
[58] T.-H. Chiang, Z.-H. Sun, H.-R. Shiu, K. C.-J. Lin, and Y.-C. Tseng,
“Magnetic field-based localization in factories using neural network with
robotic sampling,” IEEE Sensors J., vol. 20, no. 21, pp. 13110–13118,
Nov. 2020.

Authorized licensed use limited to: Harbin Institute of Technology. Downloaded on May 04,2025 at 11:06:39 UTC from IEEE Xplore. Restrictions apply.

You might also like