Robust Magnetic Fingerprint Positioning in Complex Indoor Environments Using Res-T-LSTM
Abstract
1. Introduction
- Hybrid Multi-Module Architecture Design: We propose a novel Res-T-LSTM architecture integrating ResNet, transformer, and LSTM, enabling unified extraction of local spatial features, modeling of global contextual dependencies, and capturing dynamic temporal patterns, thereby overcoming the limitations of single-network models in magnetic feature representation.
- Comprehensive Exploitation of Spatiotemporal Magnetic Fingerprint Features: ResNet extracts deep local spatial features, the transformer models long-range dependencies and global context, and LSTM captures dynamic temporal patterns. This combination enables thorough characterization of complex magnetic field distributions, improving indoor positioning accuracy.
- Significant Improvement in Positioning Performance: Compared with conventional single-network structures, Res-T-LSTM shows clear advantages in magnetic fingerprint feature representation and localization accuracy, validating the innovation and practical value of the hybrid architecture.
2. Related Work
2.1. Traditional Magnetic Fingerprint Positioning
2.2. Machine Learning-Based Magnetic Fingerprint Positioning
3. Methodology
3.1. Offline Training
3.1.1. Data Preprocessing
3.1.2. Res-T-LSTM Network
3.1.3. Loss Function
3.2. Online Prediction
4. Experiments
4.1. Experimental Setup
4.2. Experimental Results
4.2.1. Training Loss
4.2.2. Pedestrian Trajectory in the Laboratory
4.2.3. Ablation Study
5. Discussions
6. Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| ResNet | Residual networks |
| PDR | Pedestrian dead reckoning |
| CNN | Convolutional neural network |
| RNN | Recurrent neural network |
| CDFs | Cumulative distribution functions |
| AE | Average error |
| RMSE | Root mean square error |
| ME | Maximum error |
| CEP | Circular error probability |
References
- Hein, G.W. Status, perspectives and trends of satellite navigation. Satell. Navig. 2020, 1, 22. [Google Scholar] [CrossRef]
- Lan, T.; Wang, X.; Chen, Z.; Zhu, J.; Zhang, S. Fingerprint augment based on super-resolution for WiFi fingerprint based indoor localization. IEEE Sens. J. 2022, 22, 12152–12162. [Google Scholar] [CrossRef]
- Song, X.; Fan, X.; Xiang, C.; Ye, Q.; Liu, L.; Wang, Z.; He, X.; Ynag, N.; Fang, G. A novel convolutional neural network based indoor localization framework with WiFi fingerprinting. IEEE Access 2019, 7, 110698–110709. [Google Scholar] [CrossRef]
- Xu, S.; Chen, R.; Guo, G.; Li, Z.; Qian, L.; Ye, F.; Liu, Z.; Huang, L. Bluetooth, floor-plan, and microelectromechanical systems-assisted wide-area audio indoor localization system: Apply to smartphones. IEEE Trans. Ind. Electron. 2021, 69, 11744–11754. [Google Scholar] [CrossRef]
- Mo, L.; Zhu, Y.; Zhang, D. UHF RFID indoor localization algorithm based on BP-SVR. IEEE J. Radio Freq. Identif. 2022, 6, 385–393. [Google Scholar] [CrossRef]
- Chiasson, D.; Lin, Y.; Kok, M.; Shull, P.B. Asynchronous hyperbolic UWB source-localization and self-localization for indoor tracking and navigation. IEEE Internet Things 2023, 10, 11655–11668. [Google Scholar] [CrossRef]
- Chen, J.; Song, S.; Yu, H. An indoor multi-source fusion positioning approach based on PDR/MM/WiFi. AEU-Int. J. Electron. Commun. 2021, 135, 153733. [Google Scholar] [CrossRef]
- Liu, X.; Zhou, B.; Huang, P.; Xue, W.; Li, Q.; Zhu, J.; Qiu, L. Kalman filter-based data fusion of Wi-Fi RTT and PDR for indoor localization. IEEE Sens. J. 2021, 21, 8479–8490. [Google Scholar] [CrossRef]
- Liu, G.X.; Shi, L.F.; Chen, S.; Wu, Z.G. Focusing matching localization method based on indoor magnetic map. IEEE Sens. J. 2020, 20, 10012–10020. [Google Scholar] [CrossRef]
- Chen, J.; Song, S.; Gu, Y.; Zhang, S. A multisensor fusion algorithm of indoor localization using derivative Euclidean distance and the weighted extended Kalman filter. Sens. Rev. 2022, 42, 669–681. [Google Scholar] [CrossRef]
- Li, Y.; Zhuang, Y.; Lan, H.; Zhang, P.; Niu, X.; El-Sheimy, N. Self-contained indoor pedestrian navigation using smartphone sensors and magnetic features. IEEE Sens. J. 2016, 16, 7173–7182. [Google Scholar] [CrossRef]
- Chen, J.; Ou, G.; Peng, A.; Zheng, L.; Shi, J. A hybrid dead reckon system based on 3-dimensional dynamic time warping. Electronics 2019, 8, 185. [Google Scholar] [CrossRef]
- Ashraf, I.; Kang, M.; Hur, S.; Park, Y. MINLOC: Magnetic field patterns-based indoor localization using convolutional neural networks. IEEE Access 2020, 8, 66213–66227. [Google Scholar] [CrossRef]
- 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; pp. 1–8. [Google Scholar]
- Wang, X.; Yu, Z.; Mao, S. Indoor localization using smartphone magnetic and light sensors: A deep LSTM approach. Mob. Netw. Appl. 2020, 25, 819–832. [Google Scholar] [CrossRef]
- Fentaw, H.W.; Kim, T.H. Indoor localization using magnetic field anomalies and inertial measurement units based on Monte Carlo localization. In Proceedings of the 2017 Ninth International Conference on Ubiquitous and Future Networks (ICUFN), Milan, Italy, 4–7 July 2017; pp. 33–37. [Google Scholar]
- Li, Y.; Zhuang, Y.; Lan, H.; Zhang, P.; Niu, X.; El-Sheimy, N. WiFi-aided magnetic matching for indoor navigation with consumer portable devices. Micromachines 2015, 6, 747–764. [Google Scholar] [CrossRef]
- 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]
- Subbu, K.P.; Gozick, B.; Dantu, R. LocateMe: Magnetic-fields-based indoor localization using smartphones. ACM Trans. Intell. Syst. Technol. 2013, 4, 73. [Google Scholar] [CrossRef]
- Li, B.; Gallagher, T.; Dempster, A.G.; Rizos, C. How feasible is the use of magnetic field alone for indoor positioning? In Proceedings of the 2012 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Sydney, NSW, Australia, 13–15 November 2012; pp. 1–9. [Google Scholar]
- Le Grand, E.; Thrun, S. 3-axis magnetic field mapping and fusion for indoor localization. In Proceedings of the 2012 IEEE International Conference on Multisensor Fusion and Integration for Intelligent Systems (MFI), Hamburg, Germany, 13–15 September 2012; pp. 358–364. [Google Scholar]
- Haverinen, J.; Kemppainen, A. Global indoor self-localization based on the ambient magnetic field. Robot. Auton. Syst. 2009, 57, 1028–1035. [Google Scholar] [CrossRef]
- Sun, M.; Wang, Y.; Xu, S.; Cao, H.; Si, M. Indoor positioning integrating PDR/geomagnetic positioning based on the genetic-particle filter. Appl. Sci. 2020, 10, 668. [Google Scholar] [CrossRef]
- Huang, C.; Hendeby, G.; Fourati, H.; Prieur, C.; Skog, I. MAINS: A magnetic-field-aided inertial navigation system for indoor positioning. IEEE Sens. J. 2024, 24, 15156–15166. [Google Scholar] [CrossRef]
- Pan, H.; Xiang, Y.; Xiong, J.; Zhao, Y.; Huang, Z.; Xiao, X. Application of a WiFi/Geomagnetic Combined Positioning Method in a Single Access Point Environment. Wirel. Commun. Mob. Comput. 2021, 1, 9717629. [Google Scholar] [CrossRef]
- Wang, T.; Han, L.; Kong, Q.; Li, Z.; Li, C.; Han, J.; Bai, Q.; Chen, Y. An improved particle filter indoor fusion positioning approach based on Wi-Fi/PDR/geomagnetic field. Def. Technol. 2024, 32, 443–458. [Google Scholar] [CrossRef]
- Lee, N.; Ahn, S.; Han, D. AMID: Accurate magnetic indoor localization using deep learning. Sensors 2018, 18, 1598. [Google Scholar] [CrossRef]
- Abid, M.; Lefebvre, G. Improving indoor geomagnetic field fingerprinting using recurrence plot-based convolutional neural networks. J. Locat. Based. Serv. 2021, 15, 61–87. [Google Scholar] [CrossRef]
- Wang, Q.; Jia, J.; Deng, Y.; Chen, J.; Wang, X.; Huang, M.; Aghvami, A.H. DarLoc: Deep learning and data-feature augmentation based robust magnetic indoor localization. Expert Syst. Appl. 2024, 244, 122921. [Google Scholar] [CrossRef]
- Lei, J.; Huang, J.; Kong, L.; Chen, G.; Khan, M.K. DeFLoc: Deep learning assisted indoor vehicle localization atop FM fingerprint map. IEEE T. Intell. Transp. 2022, 23, 19795–19806. [Google Scholar] [CrossRef]
- Fan, L.; Hu, H.; Zhang, X.; Wang, H.; Kang, C. Magnetic anomaly detection using one-dimensional convolutional neural network with multi-feature fusion. IEEE Sens. J. 2022, 22, 11637–11643. [Google Scholar] [CrossRef]
- Wang, Q.; Wang, L.; Fu, M.; Wang, J.; Sun, L.; Huang, R.; Li, X.; Jiang, Z.; Luo, H. Multiscale transformer and attention mechanism for magnetic spatiotemporal sequence localization. IEEE Internet Things 2024, 11, 19454–19469. [Google Scholar] [CrossRef]
- Yan, S.; Su, Y.; Xiao, J.; Luo, X.; Ji, Y.; Ghazali, K.H.B. MDeep neural network-based fusion localization using smartphones. Sensors 2023, 23, 8680. [Google Scholar] [CrossRef]
- ISO/IEC 18305:2016; Information Technology—Real Time Locating Systems—Test and Evaluation of Localization and Tracking Systems. ISO: Geneva, Switzerland, 2016. Available online: https://www.iso.org/standard/62090.html (accessed on 10 May 2018).
- Chen, J.; Song, S.; Liu, Z. A PDR/WiFi indoor navigation algorithm using the federated particle filter. Electronics 2022, 11, 3387. [Google Scholar] [CrossRef]
- Chen, J.; Song, S.; Gong, Y.; Zhang, S. An indoor fusion navigation algorithm using HV-derivative dynamic time warping and the chicken particle filter. Satell. Navig. 2022, 3, 13. [Google Scholar] [CrossRef]
- Zhang, Z.; Xia, M.; Wang, J.; Wen, W.; Shi, C.; Shan, Y.; Tian, X. 3D Indoor Localization via Universal Signal Fingerprinting Powered by LSTM. In Proceedings of the 2024 14th International Conference on Indoor Positioning and Indoor Navigation (IPIN), Kowloon, Hong Kong, 14–17 October 2024; pp. 1–5. [Google Scholar]














| Nexus 5X | CPU | GPU | RAM | OS |
|---|---|---|---|---|
| Qualcomm Snapdragon 808 | Adreno 418 | 2 GB LPDDR3 | Android 6.0 |
| Motion Modes | Error | AE | RMSE | ME | CEP of 75% | CEP of 95% |
|---|---|---|---|---|---|---|
| Calling mode | FPF | 1.36 | 1.7 | 3.74 | 1.64 | 3.76 |
| CPF | 0.87 | 1.06 | 2.08 | 1.18 | 2.02 | |
| LSTM | 0.51 | 0.71 | 1.45 | 0.58 | 1.46 | |
| Res-T-LSTM | 0.19 | 0.27 | 0.91 | 0.23 | 0.92 | |
| Dangling mode | FPF | 1.9 | 2.03 | 2.96 | 2.28 | 2.96 |
| CPF | 0.93 | 1.2 | 2.53 | 1.44 | 2.52 | |
| LSTM | 0.75 | 1.18 | 3.66 | 1.38 | 3.62 | |
| Res-T-LSTM | 0.16 | 0.2 | 0.46 | 0.23 | 0.42 | |
| Handheld mode | FPF | 1.1 | 1.24 | 2.27 | 1.39 | 2.22 |
| CPF | 0.61 | 0.74 | 1.83 | 0.79 | 1.82 | |
| LSTM | 0.56 | 0.76 | 1.43 | 0.78 | 1.47 | |
| Res-T-LSTM | 0.28 | 0.41 | 1.21 | 0.29 | 1.22 | |
| Pocketed mode | FPF | 1.25 | 1.45 | 2.69 | 1.76 | 2.62 |
| CPF | 1.63 | 1.79 | 2.45 | 2.24 | 2.47 | |
| LSTM | 0.8 | 1 | 1.71 | 1.48 | 1.76 | |
| Res-T-LSTM | 0.22 | 0.34 | 1.04 | 0.25 | 1.01 | |
| General | FPF | 1.4 | 1.6 | 2.91 | 1.76 | 2.89 |
| CPF | 1.01 | 1.19 | 2.22 | 1.41 | 2.2 | |
| LSTM | 0.66 | 0.91 | 2.06 | 1.05 | 2.08 | |
| Res-T-LSTM | 0.21 | 0.3 | 0.91 | 0.25 | 0.89 |
| Motion Modes | Error | AE | RMSE | ME | CEP of 75% | CEP of 95% |
|---|---|---|---|---|---|---|
| Calling mode | LSTM | 3.66 | 4.18 | 7.88 | 4.18 | 7.82 |
| T-LSTM | 0.32 | 0.36 | 0.62 | 0.43 | 0.62 | |
| Res-T-LSTM | 0.19 | 0.27 | 0.91 | 0.23 | 0.92 | |
| Dangling mode | LSTM | 4.22 | 5.12 | 12 | 5.38 | 11.92 |
| T-LSTM | 0.43 | 0.58 | 1.39 | 0.66 | 1.32 | |
| Res-T-LSTM | 0.16 | 0.2 | 0.46 | 0.23 | 0.42 | |
| Handheld mode | LSTM | 2.89 | 3.31 | 5.93 | 3.84 | 5.92 |
| T-LSTM | 0.43 | 0.51 | 0.88 | 0.64 | 0.87 | |
| Res-T-LSTM | 0.28 | 0.41 | 1.21 | 0.29 | 1.22 | |
| Pocketed mode | LSTM | 3.66 | 4.55 | 10.19 | 4.28 | 10.12 |
| T-LSTM | 0.59 | 0.74 | 1.56 | 0.78 | 0.1.56 | |
| Res-T-LSTM | 0.22 | 0.34 | 1.04 | 0.25 | 1.01 | |
| General | LSTM | 3.61 | 4.29 | 9 | 4.42 | 8.94 |
| T-LSTM | 0.44 | 0.55 | 1.11 | 0.62 | 1.09 | |
| Res-T-LSTM | 0.21 | 0.3 | 0.91 | 0.25 | 0.89 |
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. |
© 2025 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Guo, K. Robust Magnetic Fingerprint Positioning in Complex Indoor Environments Using Res-T-LSTM. Sensors 2025, 25, 7464. https://doi.org/10.3390/s25247464
Guo K. Robust Magnetic Fingerprint Positioning in Complex Indoor Environments Using Res-T-LSTM. Sensors. 2025; 25(24):7464. https://doi.org/10.3390/s25247464
Chicago/Turabian StyleGuo, Kaihui. 2025. "Robust Magnetic Fingerprint Positioning in Complex Indoor Environments Using Res-T-LSTM" Sensors 25, no. 24: 7464. https://doi.org/10.3390/s25247464
APA StyleGuo, K. (2025). Robust Magnetic Fingerprint Positioning in Complex Indoor Environments Using Res-T-LSTM. Sensors, 25(24), 7464. https://doi.org/10.3390/s25247464

