Abstract
Pedestrian dead reckoning (PDR) is an effective technology for pedestrian navigation. In PDR, the steps are detected with the measurements of self-contained sensors, such as accelerometers, and the position is updated with additional heading angles. A smartphone is usually equipped with a low-cost microelectromechanical system accelerometer, which can be utilized to implement PDR for pedestrian navigation. Since the PDR position errors diverge with the walking distance, the global navigation satellite system (GNSS) is usually integrated with PDR for more reliable position results. This paper implemented a smartphone PDR/GNSS via a Kalman filter and factor graph optimization (FGO). In the FGO, the PDR factor is modeled, and the states are correlated with a dead reckoning algorithm. The GNSS position is modeled as the “GNSS” factor to constrain the states at each step. With a graphic model representing the states and measurements, the state estimation is converted to a nonlinear least square problem, and we utilize the Georgia Tech Smoothing and Mapping graph optimization library to implement the optimization. We tested the proposed method on a Huawei Mate 40 Pro handset with a standard playground field test, and the field test results showed that the FGO effectively improved the smartphone position accuracy. We have released the source codes and hope that they will inspire other works on pedestrian navigation, i.e., constructing an adaptive multi-sensor integration system using FGO on a smartphone.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
Introduction
With the success of smartphones and other smart mobile devices, position and navigation information are key features for these smart devices when considering location-based service (LBS) (Liu et al. 2012; Lou 2012; Paziewski 2020). global navigation satellite system (GNSS) chips are usually embedded in smartphones to provide navigation solutions. When there are enough in-view satellites, the GNSS chip-scale receiver can provide satisfying navigation solutions (Zhang et al. 2018; Gao and Groves 2018). However, for some smartphone applications, GNSS signals might be unavailable, such as in indoor environments (Kuusniemi and Lachapelle 2004; Paziewski et al. 2019; Specht et al. 2020; Yong et al. 2021). Therefore, an alternative is to develop a multi-sensor integration position and navigation system (Chen et al. 2010.). There are many other sensors embedded in a smartphone, such as an inertial measurement unit (IMU), barometer, light sensor, camera, LiDAR, compass, WIFI, and Bluetooth (Li et al. 2016, 2015, 2017; Zhuang et al. 2015; Chen et al. 2015). These sensors can generate navigation solutions under different conditions; for example, GNSS is suitable for outdoor environments; IMU is feasible for all environments, but the position errors accumulate exponentially over time; WIFI signals are usually only available indoors.
There are many studies on seamless position systems with smartphones (Chen et al. 2015; Li et al. 2015, 2017; Basso et al. 2021). For outdoor applications (Basso et al. 2021; Angrisano et al. 2019), GNSS and IMU-based pedestrian dead reckoning (PDR) are the major positioning solutions. PDR processes the accelerometer and gyroscope measurements for detecting the step or the zero-velocity state (Zhu et al. 2019; Cho and Park 2019; Zeng et al. 2018). In smartphone applications, accelerometer measurements are typically utilized to detect the step. The heading angle is jointly estimated with a gyroscope, accelerometer, and magnetometer, and then the heading angle is utilized to update the PDR position with the step information (Yan et al. 2021; Ye et al. 2019). Therefore, the key factors determining the PDR accuracy are step detection, step length, and heading angle. The PDR position errors usually accumulate over time due to the step length, heading angle, and step detection errors. Abundant research has been conducted to improve step detection, step length estimation, and heading angle estimation (Ho et al. 2016; Park et al. 2017; Poulose et al. 2019; Chen et al. 2011). In addition, integrating the GNSS and PDR is another effective solution for smartphone-based pedestrian navigation for outdoor applications (Rehman et al. 2020; Basso et al. 2021). GNSS and PDR are naturally complementary. While GNSS works under normal conditions, it can compensate for the accumulated PDR position errors, and when GNSS is unavailable, PDR can provide navigation solutions (Rehman et al. 2020; Basso et al. 2021).
The Kalman filter (KF) is typically utilized to fuse the position from the GNSS and PDR (Rehman et al. 2020; Basso et al. 2021; Angrisano et al. 2019), and the KF works in a recursive manner for real-time applications. However, according to the Bayes theorem, the KF is constructed based on first-order Markov assumptions (Wen et al. 2021; Watson and Gross 2017). PDR works similarly to an odometer, and the step-by-step increments determine the ultimate position accuracy. Factor graph optimization (FGO) is a feasible method to optimize state estimation with a graphic model and iterative solver (Wen et al. 2021; Watson and Gross 2017). In the FGO, the relationship between the state and measurements is represented with a graphic model, and then the state estimation is converted to a nonlinear least square problem (Watson and Gross 2017). A cost function is constructed with constraints from the factors, and an iterative solver, such as the Gauss–Newton iteration method or the Levenberg–Marquardt method (Watson and Gross 2017), is utilized to find the optimal estimation by minimizing the cost function. With the motivation to inspire more interesting research in smartphone-based location and position technology, we develop an FGO-based smartphone PDR/GNSS integration method and compared it with the standalone GNSS- and KF-based integration methods for validating FGO advantages. Our contributions are summarized as follows:
-
1.
Based on the GTSAM graph optimization library, we first develop a FGO-PDR/GNSS integration system for pedestrian navigation. Comparisons between the FGO-PDR/GNSS and the KF-PDR/GNSS are also carried out in this work.
-
2.
The KF-PDR/GNSS and FGO-PDR/GNSS source codes are released publicly, and a detailed user manual and an example are provided together to illustrate the mechanism and how to run the code clearly. We sincerely hope the software can inspire more studies on smartphone-based navigation systems. PDR is the fundamental cornerstone to developing a smartphone-based seamless position system, and the codes are suitable for integrating PDR with more sensors and measurements, such as WIFI and Bluetooth.
The remaining sections describe the methodology, including the PDR mechanism, the step detection, step length estimation, and the position updating; then, the KF-PDR/GNSS integration is introduced; the following section describes the FGO method and the FGO-PDR/GNSS integration; the experimental section presents a testing case, and the results are revealed together with in-depth analysis. Finally, the conclusion is given.
Methodology
In this section, we present the PDR details and Kalman filter-based PDR/GNSS integration method. PDR is characterized by three critical parts: step detection, step length estimation, and position updating. Step detection and step length estimation are carried out by processing the accelerometer measurements, and the position is updated reclusively with an additional heading angle. In view of the fact that PDR position errors accumulate over time, the methodology of KF-PDR/GNSS integration is introduced.
PDR
In PDR, the position is calculated with the estimated step length and the heading angle. The position updating is expressed by
where \({\mathbf{p}}_{k + 1}\) and \({\mathbf{p}}_{k}\) denote the position at step \(k\) to \(k + 1\); \(\Delta {\mathbf{p}}_{k,k + 1}\) denotes the position increment from step \(k\) to \(k + 1\); \(\Delta {\mathbf{p}}_{k,k + 1}^{E}\) and \(\Delta {\mathbf{p}}_{k,k + 1}^{N}\) denote the position increments of the east and north directions; \(SL_{k,k + 1}\) refers to the step length from step \(k\) to \(k + 1\); and \(\phi\) denotes the heading angle.
As mentioned in (1–2), the step detection, step length, and heading angle are the key factors determining the PDR accuracy. Many algorithms have been proposed to detect the steps, and in the strategy, we utilize the three-axis accelerometer measurements to detect the step. The summarized three-axis accelerometer measurement calculation is expressed as
where \({\text{acc}}_{{x_{k} }}\),\({\text{acc}}_{{y_{k} }}\), and \({\text{acc}}_{{z_{k} }}\) denote the three-axis accelerometer measurements, and the steps are determined by detecting the signal peaks and valleys of \({\mathbf{acc\_mag}}\) during the detection window.
In terms of the step length estimation, we utilize the Weinberg algorithm (Weinberg 2002), in which the step length is expressed as
where \(L\) is a constant, \({\mathbf{acc\_mag}}\) denotes the accelerometer measurements during a detection window, and the functions \(\max \left( \cdot \right)\) and \({\text{m}} {\text{in}}\left( \cdot \right)\) denote finding the maximum and minimum values, respectively.
Kalman filter
Denoting the position errors of the PDR as \({\mathbf{x}}\), the state transformation of the PDR/GNSS integration is expressed as
where \({\mathbf{F}}_{k,k + 1} { = }\left[ \begin{gathered} 1{ 0} \hfill \\ 0 \, 1 \hfill \\ \end{gathered} \right]\) refers to the state propagation matrix; \({\mathbf{H}}_{k + 1} { = }\left[ \begin{gathered} 1 \, 0 \hfill \\ 0 \, 1 \hfill \\ \end{gathered} \right]\) denotes the observation matrix; \({\mathbf{z}}_{k + 1}\) denotes the measurement vector; \({\mathbf{w}}_{k + 1}\) refers to the process noise vector; it is assumed to be subject to a standard Gaussian distribution, which is expressed as \({\mathbf{w}}_{k + 1} \sim {\text{N}}\left( {0,{\mathbf{Q}}} \right)\); \({\mathbf{Q}}\) denotes the covariance matrix of the process noise; \({\mathbf{v}}_{k + 1}\) is the measurement noise vector, which is also assumed to be subject to a Gaussian distribution, and the distribution is expressed as \({\mathbf{v}}_{k + 1} \sim {\text{N}}\left( {0,{\mathbf{R}}} \right)\); and \({\mathbf{R}}\) denotes the convenience of the measurement noise. Therefore, the five equations for the KF are summarized as
where \({\mathbf{x}}_{{k + {1}}}^{ - }\) is the predicted state through the state propagation model, \({\mathbf{P}}_{k}\) is the covariance matrix of the predicated state, \({\mathbf{K}}_{k + 1}\) denotes the Kalman gain matrix, \({\mathbf{I}}_{2 \times 2}\) denotes the identity matrix, and \({\hat{\mathbf{x}}}_{k + 1}\) denotes the ultimately estimated state.
Factor graph optimization
FGO models the sensor fusion with a probabilistic graph and converts the state estimation to a nonlinear least square problem. Ceres, G2O, and GTSAM are commonly used libraries to solve for the optimal estimation with the nonlinear least square equation (Dellaert 2012; Grisetti et al. 2011). Some researchers have explored the advances of the FGO compared with the KF, and the FGO advantages are summarized (Wen et al. 2021; Watson and Gross 2017). In our strategy, we fuse the GNSS and the PDR position from a smartphone with FGO. Since the PDR position errors accumulate with increasing steps, FGO characterizing optimizing the past states and current state together is more feasible for PDR/GNSS integration. Figure 1 shows the graphic structure of the FGO-PDR/GNSS integration. The states and measurements are correlated. According to Bayes’ theorem, the probability relationship among the measurements and states can be expressed as (Meinhold and Singpurwalla 1983; Li et al. 2018; Jiang et al. 2022):
Then, equation (12) can be simplified as:
where \(P\left( \cdot \right)\) is the probability function and the optimal estimation of the state can be converted to find the maximum values of \(\mathop \prod \limits_{i = 1}^{k} {\kern 1pt} P\left( {{\mathbf{z}}_{i} |{\mathbf{x}}_{i} } \right)P\left( {{\mathbf{x}}_{i} |{\mathbf{x}}_{i - 1} } \right)\). Specifically, for PDR/GNSS integration, there are two factors: PDR and GNSS.
1) PDR Factor.
With the PDR algorithm shown in (1) and (2), the PDR factor is expressed as
2) GNSS Factor.
In our strategy, the GNSS provides the position, and the GNSS factor is expressed as:
Denoting the optimal estimates \({\mathbf{x}}^{*} = \left[ {{\mathbf{x}}_{1}^{*} ,{\mathbf{x}}_{2}^{*} ,...,{\mathbf{x}}_{k + 1}^{*} } \right]\), \({\mathbf{x}}^{*}\) estimation can be expressed as
where \(\left\| \cdot \right\|\) refers to the Mahalanobis norm, the optimal states are obtained by minimizing the cost function, and in our code, we utilize the Levenberg–Marquardt method to solve for the optimal estimates.
Experiments and results
In this section, a dynamic experiment is carried out in a sport track to quantitively assess the performance of the position errors of the proposed method. We utilize a Huawei Mate 40 Pro handset to carry out the experiments. The smartphone GNSS and accelerometer measurements collection and processing are presented. Experimental results are presented, i.e., the position errors from GNSS, KF-GNSS/PDR and FGO-GNSS/PDR.
Data collection description
The specifications of the Huawei Mate 40 Pro are listed in the datasheet, and it has a GNSS, accelerometer, gyroscope, compass, ambient light sensor, etc. Moreover, its GNSS-embedded GNSS module supports multi-GNSS multifrequency signals such as GPS L1 + L5, GLONASS, BeiDou B1I + B1C + B2a + B2b, GALILEO E1 + E5a + E5b, and QZSS L1 + L5. Its accelerometer updating frequency is 100 Hz, and the gyroscope updating frequency is 50 Hz. We utilize an open-source app to collect the raw measurements from the sensors, including the angular rates, acceleration, and multi-constellation multifrequency GNSS position (Jiménez et al. 2019). The format of the dataset is shown in the literature (Jiménez et al. 2019). Furthermore, Python software is utilized to separate the sensors’ measurements into individual files for further processing.
The data collecting equipment is shown in Fig. 2, and we fix the Novatel SPAN-CPT in a box. We simultaneously collect the GNSS and IMU raw measurements with Novatel Connect software. After postprocessing raw measurements from the IMU and GNSS with the Novatel Inertial Explorer 8.0 (IE 8.0), a reference trajectory is generated with better than 2 cm horizonal position accuracy.
Sport-track experiment with handheld smartphones
The track experiments were carried out in the Kirkkonummi sports park. By carrying the SPAN-CPT system, the tester walked clockwise along the track of the 400-m sports ground for two circles. The time length of the dataset is approximately nine minutes. The handheld smartphone experimental results are presented in Figs. 3 and 4. Figure 3 presents the trajectories of the reference, GNSS standalone solution, KF-PDR/GNSS integration solution, and FGO-PDR/GNSS integration solution. Figure 4 presents the horizontal position errors and the detailed analysis. Specifically, Fig. 4a shows the horizontal error curves against time, and Fig. 4b shows the statistical analysis. It can be observed that the FGO-PDR/GNSS integration method evidently reduces the position errors. Moreover, the statistical results are listed in Table 1, including the median and mean values. Compared with the GNSS, the mean values of the horizontal position errors from the FGO-PDR/GNSS decrease by 40.8%, and the median (50%) values decrease by 47.2%.
Conclusions
We develop open-source smartphone PDR/GNSS integration software, and both a KF and FGO are implemented. An experimental test is carried out to assess the performance of the software, and the results demonstrate the effectiveness of the integration method. It can be concluded that the FGO method has great potential in improving position accuracy.
Although the preliminary results support the effectiveness of the software implemented, there remain future works of great significance for further investigation.
-
1.
There is no integrity analysis of the GNSS navigation solutions and the integration module in this software. In fact, to guarantee the performance of integration in GNSS signal challenging environments, an integrity analysis or fault detection module is indispensable. It is interesting to carry out integrity analysis or fault detection considering the characteristics of the FGO.
-
2.
Here, in our strategy, we directly fuse the PDR and GNSS position with the KF or FGO. Actually, it is prospective to implement tight integration of GNSS and PDR specifically, fusing the PDR and GNSS with the pseudorange measurements. In addition, we employ the PDR position in the integration, which is affected by the step length and heading angle; there are some prospective methods to improve the PDR measurement quality, such as utilizing the velocity from the GNSS to correct the heading angle and constructing the model directly using the step distance constraints instead of the PDR position to optimize the GNSS.
-
3.
Currently, almost everyone has a smartphone, and cooperative PDR with multiple agents is possible; distance measurements between the multiple agents are added to the model, optimizing the position estimation.
We develop and open smartphone PDR/GNSS integration software to inspire more interesting work on pedestrian navigation with PDR and GNSS. Additionally, the software can help readers understand the PDR and its integration with the GNSS. The codes are implemented in MATLAB and released on the GPS Toolbox website at https://geodesy.noaa.gov/gps-toolbox/. Additionally, you can contact the authors (yuwei.chen@nls.fi and changhui.jiang@nls.fi) for the datasets and the codes.
References
Angrisano, A., Vultaggio, M., Gaglione, S., Crocetto, N. (2019) Pedestrian localization with PDR supplemented by GNSS. European navigation conference (ENC), pp. 1–6
Basso M, Martinelli A, Morosi S, Sera F (2021) A real-time GNSS/PDR navigation system for mobile devices. Remote Sens 13(8):1567
Chen R, Chen W, Chen X, Zhang X, Chen Y (2011) Sensing strides using EMG signal for pedestrian navigation. GPS Solut 15(2):161–170
Chen G, Meng X, Wang Y, Zhang Y, Tian P, Yang H (2015) Integrated WiFi/PDR/Smartphone using an unscented kalman filter algorithm for 3D indoor localization. Sensors 15(9):24595–24614
Chen, Y., Chen, R., Pei, L., Kröger, T., Kuusniemi, H., Liu, J. and Chen, W. (2010). Knowledge-based error detection and correction method of a multi-sensor multi-network positioning platform for pedestrian indoor navigation. IEEE/ION position, location and navigation symposium, pp 873–879
Cho SY, Park CG (2019) Threshold-less zero-velocity detection algorithm for pedestrian dead reckoning. European navigation conference (ENC), pp 1–5
Dellaert F (2012) Factor graphs and GTSAM: a hands-on introduction. Georgia Institute of Technology, Atlanta
Gao H, Groves PD (2018) Environmental context detection for adaptive navigation using GNSS measurements from a smartphone NAVIGATION. J Instit Navig 65(1):99–116
Grisetti G, Kümmerle R, Strasdat H, Konolige K (2011) g2o: A general framework for (hyper) graph optimization. In: Proceedings of the IEEE international conference on robotics and automation (ICRA), Shanghai, China, pp 9–13
Ho NH, Truong PH, Jeong GM (2016) Step-detection and adaptive step-length estimation for pedestrian dead-reckoning at various walking speeds using a smartphone. Sensors 16(9):1423
Jiang C, Chen Y, Xu B, Jia J, Sun H, Chen C, Duan Z, Bo Y, Hyyppä J (2022) Vector tracking based on factor graph optimization for GNSS NLOS bias estimation and correction. IEEE Internet of Things J.
Jiménez AR, Secoy F,Torres-Sospedra J (2019) Tools for smartphone multi-sensor data registration and GT mapping for positioning applications. In: IEEE international conference on indoor positioning and indoor navigation - IPIN 2019, Pisa, Italy
Kuusniemi, H., Lachapelle, G. (2004). GNSS signal reliability testing in urban and indoor environments. In: Proceedings of the 2004 national technical meeting of the institute of navigation, pp 210–224
Li W, Cui X, Lu M (2018) A robust graph optimization realization of tightly coupled GNSS/INS integrated navigation system for urban vehicles. Tsinghua Sci Technol 23(6):724–732
Li X, Wang J, Liu C, Zhang L, Li Z (2016) Integrated WiFi/PDR/smartphone using an adaptive system noise extended Kalman filter algorithm for indoor localization. ISPRS Int J Geo Inf 5(2):8
Li X, Wei D, Lai Q, Xu Y, Yuan H (2017) Smartphone-based integrated PDR/GPS/bluetooth pedestrian location. Adv Space Res 59(3):877–887
Li Y, Zhuang Y, Lan H, Zhou Q, Niu X, El-Sheimy N (2015) A hybrid WiFi/magnetic matching/PDR approach for indoor navigation with smartphone sensors. IEEE Commun Lett 20(1):169–172
Liu J, Chen R, Pei L, Guinness R, Kuusniemi H (2012) A hybrid smartphone indoor positioning solution for mobile LBS. Sensors 12(12):17208–17233
Lou L (2012) An approach of active indoor positioning using smartphone for mobile LBS. Telecommun Sci 28(6):98
Meinhold RJ, Singpurwalla ND (1983) Understanding the Kalman filter. Am Stat 37(2):123–127
Park SY, Heo SJ, Park CG (2017) Accelerometer-based smartphone step detection using machine learning technique. ieee international electrical engineering congress (iEECON), pp 1–4
Paziewski J (2020) Recent advances and perspectives for positioning and applications with smartphone GNSS observations. Meas Sci Technol 31(9):091001
Paziewski J, Sieradzki R, Baryla R (2019) Signal characterization and assessment of code GNSS positioning with low-power consumption smartphones. GPS Solutions 23(4):1–12
Poulose A, Senouci B, Han DS (2019) Performance analysis of sensor fusion techniques for heading estimation using smartphone sensors. IEEE Sens J 19(24):12369–12380
Rehman A, Shahid H, Afzal MA, Bhatti HMA (2020) Accurate and direct GNSS/PDR integration using extended Kalman filter for pedestrian smartphone navigation. Gyroscopy and Navigation and Navigation 11(2):124–137
Specht C, Szot T, Dąbrowski P, Specht M (2020) Testing GNSS receiver accuracy in Samsung Galaxy series mobile phones at a sports stadium. Meas Sci Technol 31(6):064006
Watson, R. M., Gross, J. N. (2017). Robust navigation in GNSS degraded environment using graph optimization. In: Proceedings of the 30th international technical meeting of the satellite division of the institute of navigation (ION GNSS+ 2017), pp 2906–2918
Weinberg H (2002) Using the ADXL202 in pedometer and personal navigation applications. Analog Devices AN-602 application Note
Wen W, Pfeifer T, Bai X, Hsu LT (2021) Factor graph optimization for GNSS/INS integration: a comparison with the extended Kalman filter NAVIGATION. J Inst Navig 68(2):315–331
Yan D, Shi C, Li T (2021) An improved PDR system with accurate heading and step length estimation using handheld smartphone. J Navig 75:1–19
Ye J, Li Y, Luo H, Wang J, Chen W, Zhang Q (2019) Hybrid urban canyon pedestrian navigation scheme combined PDR, GNSS and beacon based on smartphone. Remote Sens 11(18):2174
Yong CZ, Odolinski R, Zaminpardaz S, Moore M, Rubinov E, Er J, Denham M (2021) Instantaneous, dual-frequency, multi-GNSS precise RTK positioning using google pixel 4 and Samsung Galaxy S20 smartphones for zero and short baselines. Sensors 21(24):8318
Zeng S, Zeng Q, Chen R, Meng Q, Huang H, Liu J (2018) Simulated-zero velocity update method for smartphone navigation. IEEE Ubiquitous positioning, indoor navigation and location-based services (UPINLBS), pp 1–5
Zhang X, Tao X, Zhu F, Shi X, Wang F (2018) Quality assessment of GNSS observations from an Android N smartphone and positioning performance analysis using time-differenced filtering approach. GPS Solut 22(3):1–11
Zhu F, Tao X, Liu W, Shi X, Wang F, Zhang X (2019) Walker: Continuous and precise navigation by fusing GNSS and MEMS in smartphone chipsets for pedestrians. Remote Sens 11(2):139
Zhuang Y, Lan H, Li Y, El-Sheimy N (2015) PDR/INS/WiFi integration based on handheld devices for indoor pedestrian navigation. Micromachines 6(6):793–812
Funding
Open Access funding provided by National Land Survey of Finland.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The GPS Toolbox is a topical collection dedicated to highlighting algorithms and source code utilized by GNSS engineers and scientists. If you have a program or software package you would like to share with our readers, please submit a paper to the GPS Toolbox collection or email ngs.gps.toolbox@noaa.gov for more information. To download source code from this or any GPS Toolbox paper visit our website at http://geodesy.noaa.gov/gps-toolbox.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Jiang, C., Chen, Y., Chen, C. et al. Implementation and performance analysis of the PDR/GNSS integration on a smartphone. GPS Solut 26, 81 (2022). https://doi.org/10.1007/s10291-022-01260-0
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10291-022-01260-0