Skip to main content

Heading estimation fusing inertial sensors and landmarks for indoor navigation using a smartphone in the pocket

Abstract

Principal component analysis (PCA)-based approach for user heading estimation using a smartphone in the pocket suffers from an inaccurate estimation of device attitude, which plays a central role in both obtaining acceleration signals in the horizontal plane and the ultimate global walking direction extraction. To solve this problem, we propose a novel heading estimation approach based on two unscented Kalman filters (UKFs) fusing inertial sensors and landmarks. The first UKF is developed for the recalibration of device attitude estimation. We mathematically derive the measurement equation connecting observed user heading from landmarks with the quaternion vector representing device attitude. To decrease the nonlinearity of the measurement equation and make the filter more robust, we deploy the difference between user heading derived from the landmark and estimation result of PCA-based approach as the observation variable. The second UKF is developed for user heading estimation fusing estimation results of PCA-based approach and observed user headings from landmarks. Besides, we develop a robust landmark identification method by exploiting the acceleration and device pitch patterns, while noisy barometers are no longer required as previous methods. Experiments show that the proposed landmark-aided user heading estimation approach may improve accuracy performance significantly, which is very useful for continuous indoor navigation.

1 Introduction

Indoor positioning techniques have been paid increasing attentions from industry and academia due to the mass market for positioning applications. For outdoor environments, Global Navigation Satellite Systems (GNSSs) may provide reasonable accuracy performance. However, due to signal attenuations, they are always unavailable for indoor environments. Among various indoor positioning approaches [1, 2], pedestrian dead reckoning (PDR) using inertial sensor built-in smartphones is a promising solution, since it is self-contained and requires no extra infrastructures. There are two kinds of PDR, the strapdown approach [3] and the step-and-heading approach [4, 5]. The accumulated tracking errors of the strapdown approach may grow rapidly, since it involves a double integration of noisy acceleration signals. The strapdown approach is only feasible when continuous corrections are available, such as zero velocity updates for foot-mounted situations.

For unconstrained use of smartphones, such as a device put in the trouser pocket, it is more suitable to deploy the step-and-heading approach [6]. Step-and-heading approach infers the current pedestrian position sequentially by adding relative displacement to the position of previous step. The displacement is determined by estimated step length and user heading. User heading estimation is a central problem and the main error source of the step-and-heading approach. Moreover, user heading estimation may also be used in many other areas [7,8,9], such as human facing direction estimation in virtual reality and human computer interaction in smart environments. This paper focuses on the user heading estimation using a smartphone put in the pocket, which is one of the most popular device-carrying positions [10].

Due to the changing device orientations caused by body locomotion, such as leg locomotion, it is inapplicable to compute user heading by the most commonly used device estimation approach [11], which adds heading offset to device heading. This is because the heading offset between device heading and user heading varies due to the changing device orientations and is difficult to be estimated. For a smartphone put in the pocket, uDirect approach [12] has been proposed by extracting walking direction in a specific region, where the walking direction dominates the acceleration vector. However, the specific region may be easily corrupted by body locomotion. In contrast, the PCA-based approaches [13] are more robust, since it exploits all samples in the walking step. Regardless of the changing device orientations, PCA may extract the walking direction along the maximum variations of the acceleration signals in the horizontal plane.

In order to obtain the horizontal accelerations more accurately, our previous work has proposed a PCA-based approach called RMPCA [14], combining rotation matrix (RM) with principal component analysis (PCA) for user heading estimation. Firstly, we continuously track the device attitude by developing extended Kalman filter (EKF) fusing inertial sensors. Then, we combine related rotation matrix to project the accelerations at local device coordinate system (DCS) into the global coordinate system (GCS). Finally, the global walking direction may be extracted by PCA over horizontal accelerations. Due to gyro and acceleration drifts, the accuracy performance of user heading estimation and positioning may degrade rapidly over a relatively short period.

Exploiting landmarks to aid pedestrian navigation is one of the most promising techniques to guarantee user heading estimation performance and limit accumulated tracking errors. Traditional landmark-based methods mainly rely on a pre-defined database and related infrastructures. For example, the densely deployed ultra-wide bandwidth (UWB) [15] and radio frequency identification (RFID) [16] anchors may provide distance information from the landmarks to the pedestrian, through time of arrival (ToA) and received signal strength (RSS) measurements, respectively. Wireless local area network (WLAN) or magnetic fingerprints [17, 18] can also be regarded as landmarks to aid pedestrian navigation. Traditional landmark-based methods may improve positioning accuracy significantly. However, these methods may increase the cost and disrupt self-containedness of the PDR system.

Recently, user motion states [19], including walking stairs and taking elevators and escalators, have been considered as indoor landmarks to aid indoor positioning. These landmarks [20] require neither extra infrastructures nor complex pre-defined database. Previous works [21, 22] have proposed these landmarks for both location estimation and direct user heading estimation recalibration. Significant user heading and positioning accuracy improvement has been reported. However, a re-estimation of the quaternion vectors describing device attitude is neglected. The accurate estimation of the quaternion vector is critical for ultimate user heading estimation, since it may directly affect the acceleration signal extraction in the horizontal plane and the ultimate global walking direction extraction by PCA. Besides, the previous device attitude estimation method fusing inertial sensors and magnetometers relies on EKF [21], which cannot adapt the nonlinearity of the measurement equation well.

In this paper, we propose a novel landmark-aided heading estimation approach based on two unscented Kalman filters (UKFs) and a recalibration of device attitude estimation. The main novelty is to fuse landmark information for device attitude recalibrations by constructing an explicit measurement equation in an UKF. The measurement equation relating landmarks with the quaternion vector describing device attitude is mathematically derived upon the principle of PCA-based approach. In order to reduce the nonlinearity of the measurement equation, we deploy the difference between user heading derived from the landmark and estimation result of RMPCA as the observation variable. For ultimate user heading estimation, we develop the second UKF fusing landmarks and estimation results of an improved RMPCA. The improved RMPCA may reduce the nonlinearity of the state equation of the second UKF, by extracting walking direction at a reference coordinate system. Besides, we develop a more robust user motion recognition method for landmark identification. Instead of requiring noisy barometers for vertical displacement detection as previous methods [19], we just deploy inertial sensors based on the acceleration and device pitch patterns.

Experiments demonstrate the accuracy performance improvement and reliability of the proposed landmark-aided heading estimation approach. In summary, our work makes the following contributions:

  • We propose a novel heading estimation approach fusing inertial sensors and landmarks based on two developed UKFs and a recalibration of the device attitude estimation.

  • We derive measurement equation of the first UKF mathematically upon the principle of the PCA-based approach. To decrease the nonlinearity of the measurement equation and make the filter more robust, the heading estimation difference is deployed as the observation variable.

  • We develop the second UKF fusing landmarks and estimation results of an improved RMPCA, which may reduce the nonlinearity of the state equation of the second UKF.

  • We develop a robust landmark-identification method without requiring barometers, by only exploiting the inertial sensors and magnetometers.

The rest of the paper is organized as follows: Section 2 gives an overview of the proposed heading estimation approach. Section 3 presents the user motion recognition method for landmark identification. Section 4 describes the first UKF-based device attitude estimation module. Section 5 presents ultimate user heading estimation based on the second UKF. Section 6 provides experimental evaluations of the proposed approach. Finally, conclusions are presented in Section 7.

2 Overview of the proposed user heading estimation approach

Figure 1 overviews the proposed heading estimation approach fusing inertial sensors and landmarks using smartphones in the pocket. The proposed approach consists of three main modules: landmark identification, device attitude estimation, and user heading estimation.

Fig. 1
figure 1

Overview of the proposed user heading estimation approach fusing inertial sensors and landmarks

The landmark identification module deploys a decision tree-based approach to recognize the motion states, including normal walking, standing, walking stairs, taking elevators, and taking escalators. Among these motion states, walking stairs, taking elevators, and taking escalators can be considered as landmarks to aid user heading estimation.

The device attitude estimation module deploys the first UKF to continuously estimate device attitude. The state model of the first UKF involves quaternion-based time evolution equation, while the measurement model involves measurement update from magnetic field values, accelerations under quasi-static situations, and identified landmarks. An explicit measurement equation relating the quaternion vector and user heading is mathematically derived upon the principle of PCA-based user heading estimation approach.

In order to describe the user heading estimation module, we define three coordinate systems, including global coordinate system (GCS), device coordinate system (DCS), and reference coordinate system (RCS). GCS consists of three axes X G, Y G, and Z G, which point east, north, and the opposite direction of the gravity vector. We collect all raw inertial signals including acceleration and angular velocity samples at DCS. DCS consists of three axes X D, Y D, and Z D. The two axes X D and Y D point rightward and forward, respectively, which are parallel with the phone screen. The axis Z D is the cross product of axes X D and Y D. To reduce nonlinearity of the measurement equation in the first UKF and state equation in the second UKF, we define RCS by rotating GCS UHRMPCA radians around Z G counterclockwise, which also includes three related axes X R, Y R, and Z R. The angle UHRMPCA is user heading initially estimated by RMPCA approach for each walking step. It should be noted that DCS and RCS may change with the body locomotion, while GCS is a fixed coordinate system.

User heading is defined as the angle that rotates from positive direction of the Y G axis to the walking directions at GCS counterclockwise. The user heading estimation module deploys the second UKF to fuse identified landmarks with an improved RMPCA. For the improved RMPCA, rotation matrix obtained from the first UKF-based attitude estimation model is firstly used to project the accelerations at DCS into GCS. For each walking step, the accelerations at GCS are then projected into the related RCS. Finally, accelerations in the horizontal plane at RCS are obtained, and the global walking direction is extracted by PCA at RCS. The walking direction is extracted at RCS to reduce nonlinearity of the state equation.

3 Landmark identification module

The landmarks used in this paper include taking elevators, taking escalators, and walking upstairs/downstairs. When users enter or leave elevators, take escalators, and walk upstairs/downstairs, the user headings are always limited into a small region. Therefore, not only the landmarks can be used to recalibrate location estimation, but also can be used to recalibrate the heading estimation. We deploy a decision tree-based landmark identification method to detect and distinguish these landmarks from normal walking and standing motion states. The decision tree has three levels, as seen in Fig. 2.

Fig. 2
figure 2

Identification of landmarks using a decision tree

In the first level, we firstly distinguish the elevator from the other motion states by exploiting the unique acceleration pattern of an elevator [23]. For the whole period of taking an elevator, the process includes standing still to wait for the elevator, entering the elevator, standing inside, and finally walking out of it. When standing inside the elevator for a short duration, a pair of positive/negative impulses of accelerations along the gravity direction occur, due to the related hyper-gravity/hypo-gravity effects. Between two impulses, there is a stationary duration, depending on the number of floors the elevator passes. In order to accurately capture the user heading information, when users enter or walk out of an elevator, we deploy the magnitude change of the magnetic field, since the total magnitude notably decreases or increases, respectively.

In the second level, we distinguish taking escalators/standing from walking stairs/walking by exploiting their acceleration variances. The acceleration variances of walking stairs/walking motion states are notably bigger than those of taking escalators/standing, since the former states involve the higher locomotion intensity. Furthermore, in the third level, we distinguish taking escalators from standing by exploiting the variances of the magnetic field values. The magnetic field values of taking escalators change rapidly due to the changed locations of moving escalators, while those of standing remain unchanged.

In the third level, to further distinguish between normal walking and walking upstairs/downstairs, we do not deploy barometers as previous methods [19, 24]. The barometers are only available in some relatively expensive smartphones, and the atmospheric pressure values measured by barometers may be influenced by many factors, such as the temperature, humidity, and opening/closing windows. Therefore, we exploit the pitch value pattern to detect walking upstairs/downstairs motion states. For the human leg, we define the leg pitch value as the angle leg rotates around the axis X G, and the leg pitch value equals to zero when the leg is parallel to the gravity vector. The opening angle of the leg is defined as:

$$ \Delta \mathrm{Pitch}={\mathrm{Pitch}}_{\mathrm{max}}-{\mathrm{Pitch}}_{\mathrm{min}} $$
(1)

where Pitchmax and Pitchmin indicate the maximum and minimum value of leg pitch value. The leg pitch values show periodic change and thus make the maximum or the minimum leg pitch values occur only once per walking step. For each pedestrian, two observations may be seen during walking steps. Firstly, the opening angle of the leg for walking upstairs ΔPitchUpstairs is notably bigger than that of normal walking ΔPitchNormal, while the opening angle of the leg for walking downstairs ΔPitchDownstairs is notably smaller than the opening angle ΔPitchNormal, given as follows,

$$ {\Delta \mathrm{Pitch}}^{\mathrm{Upstairs}}>{\Delta \mathrm{Pitch}}^{\mathrm{Normal}}>{\Delta \mathrm{Pitch}}^{\mathrm{Downstairs}} $$
(2)

Secondly, the maximum leg pitch value of walking upstairs \( {\mathrm{Pitch}}_{\mathrm{max}}^{\mathrm{Upstairs}} \) is notably bigger than that of normal walking \( {\mathrm{Pitch}}_{\mathrm{max}}^{\mathrm{Normal}} \), while the minimum leg pitch value of walking downstairs \( {\mathrm{Pitch}}_{\mathrm{min}}^{\mathrm{Downstairs}} \) is notably bigger than that of normal walking \( {\mathrm{Pitch}}_{\mathrm{min}}^{\mathrm{Normal}} \), given as follows,

$$ {\mathrm{Pitch}}_{\mathrm{max}}^{\mathrm{Upstairs}}>{\mathrm{Pitch}}_{\mathrm{max}}^{\mathrm{Normal}},\kern0.75em {\mathrm{Pitch}}_{\mathrm{min}}^{\mathrm{Downstairs}}>{\mathrm{Pitch}}_{\mathrm{min}}^{\mathrm{Normal}} $$
(3)

According to the observations, we may compute the average opening angle, the maximum and minimum leg pitch values for normal walking and walking upstairs/downstairs during offline phase. The related angle values can be seen as the pitch value pattern. During online phase, the pattern-matching process comparing the related angles as seen in (2) and (3) may be carried to distinguish between normal walking and walking upstairs/downstairs.

We collected 1000 test samples for each motion state, including taking elevators, taking escalators, walking stairs, normal walking, and standing. A total number of 5000 test samples were collected, 4000 samples collected in our office building, while the rest 1000 test samples of taking escalators were collected in a shopping mall. Each kind of samples are randomly divided into five parts, one part is used for testing and the rest four parts for training the related parameters of the decision tree. Table 1 shows the landmark identification results by a confusion matrix. The results show that almost all landmarks can be identified correctly, except for the negligible confusion between normal walking and walking stairs, due to some irregular leg locomotion. Furthermore, most of these wrong identified samples can be corrected by adjacent right identified samples. If the motion state of one walking step is different from that of the two adjacent steps, its motion state is assumed to be wrongly identified and considered as that of the two adjacent steps. Therefore, we assume that all the landmarks can be correctly identified and used in the proposed user heading estimation approach.

Table 1 Confusion matrix for landmark identification

4 Device attitude module based on first UKF

We deploy quaternion vector as the state vector of UKF to describe the time evolution of device attitude. Firstly, we give the state and measurement models of UKF. Then, we derive the measurement equation relating quaternion vector with user heading mathematically upon the PCA-based approach. Finally, we describe unscented transformation and UKF equations.

4.1 Unscented Kalman filter design

Before designing UKF, we establish the relationship between device attitude and quaternion vector by deploying rotation matrix,

$$ {\mathbf{h}}^{\mathrm{DCS}}(t)={\left({\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}(t)\right)\right)}^T{\mathbf{h}}^{\mathrm{GCS}}(t) $$
(4)
$$ {\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}\right)=\left[\begin{array}{ccc}\hfill {q}_0^2+{q}_1^2-{q}_2^2-{q}_3^2\hfill & \hfill 2\left({q}_1{q}_2-{q}_0{q}_3\right)\hfill & \hfill 2\left({q}_1{q}_3+{q}_0{q}_2\right)\hfill \\ {}\hfill 2\left({q}_1{q}_2+{q}_0{q}_3\right)\hfill & \hfill {q}_0^2-{q}_1^2+{q}_2^2-{q}_3^2\hfill & \hfill 2\left({q}_2{q}_3-{q}_0{q}_1\right)\hfill \\ {}\hfill 2\left({q}_1{q}_3-{q}_0{q}_2\right)\hfill & \hfill 2\left({q}_0{q}_1+{q}_2{q}_3\right)\hfill & \hfill {q}_0^2-{q}_1^2-{q}_2^2+{q}_3^2\hfill \end{array}\right] $$
(5)

where \( {\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}(t)\right) \) is the rotation matrix from GCS to DCS at time t; h GCS(t) and h DCS(t) are the same 3 × 1 vectors with different representations at GCS and DCS, respectively; and \( \mathbf{q}={\left[{q}_0\kern0.5em {q}_1\kern0.5em {q}_2\kern0.5em {q}_3\right]}^T \) is the normalized quaternion vector with the scalar part q 0 and the vector part \( \mathbf{e}={\left[{q}_1\kern0.5em {q}_2\kern0.5em {q}_3\right]}^T \).

Based on the rigid body kinematic law [25], the state model of quaternion vector can be given as:

$$ {\mathbf{q}}_{k+1}={F}_k{\mathbf{q}}_k+{\mathbf{w}}_k^q $$
(6)

where state transition matrix F k  = exp(0.5∗ T s ∗ Ω(w k )),

$$ \varOmega \left({\mathbf{w}}_k\right)=\left[\begin{array}{cccc}\hfill 0\hfill & \hfill -{w}_k^x\hfill & \hfill -{w}_k^y\hfill & \hfill -{w}_k^z\hfill \\ {}\hfill {w}_k^x\hfill & \hfill 0\hfill & \hfill {w}_k^z\hfill & \hfill -{w}_k^y\hfill \\ {}\hfill {w}_k^y\hfill & \hfill -{w}_k^z\hfill & \hfill 0\hfill & \hfill {w}_k^x\hfill \\ {}\hfill {w}_k^z\hfill & \hfill {w}_k^y\hfill & \hfill -{w}_k^x\hfill & \hfill 0\hfill \end{array}\right] $$
(7)

where T s is the system interval and \( {\mathbf{w}}_k={\left[{w}_k^x\kern0.5em {w}_k^y\kern0.5em {w}_k^z\right]}^T \) is the angular velocity vector measured at DCS at time instants kT s . Process noise variable \( {\mathbf{w}}_k^q \) and related covariance matrix W k can be given as:

$$ {\mathbf{w}}_k^q={\Xi}_k{\mathbf{w}}_k^{\mathrm{gyro}}=-\frac{T_s}{2}\left[\begin{array}{c}\hfill \left[{\mathbf{e}}_k\times \right]+{q}_0^k\mathbf{I}\hfill \\ {}\hfill -{\mathbf{e}}_k^T\hfill \end{array}\right]{\mathbf{w}}_k^{\mathrm{gyro}} $$
(8)
$$ {W}_k={\mathbf{w}}_k^q{\left({\mathbf{w}}_k^q\right)}^T={\Xi}_k{W}_k^{\mathrm{gyro}}{\Xi}_k^T $$
(9)

where \( {q}_0^k \) is the scalar part of q k and \( {\mathbf{e}}_k={\left[{q}_1^k\kern0.5em {q}_2^k\kern0.5em {q}_3^k\right]}^T \) is the related vector part, \( {\mathbf{w}}_k^{\mathrm{gyro}} \) is the zero-mean white Gaussian noise of gyroscope outputs at time instants kT s , [e k ×] is a standard vector cross-product operator, \( {W}_k^{\mathrm{gyro}} \) is the covariance matrix for gyroscope measurement noise with \( {W}_k^{\mathrm{gyro}}={\sigma}_{\mathrm{gyro}}^2\mathbf{I} \), and I is an 3 × 3 identity matrix.

The measurement model of UKF is given as follows:

$$ {\mathbf{z}}_{k+1}=\left[\begin{array}{c}\hfill {\mathbf{a}}_{k+1}\hfill \\ {}\hfill {\mathbf{m}}_{k+1}\hfill \\ {}\hfill \Delta {\mathrm{UH}}_{k+1}\hfill \end{array}\right]=\phi \left({\mathbf{q}}_{k+1}\right)+{\mathbf{v}}_{k+1}=\left[\begin{array}{ccc}\hfill {\left({\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left({\mathbf{q}}_{k+1}\right)\right)}^T\hfill & \hfill \mathbf{0}\hfill & \hfill \mathbf{0}\hfill \\ {}\hfill \mathbf{0}\hfill & \hfill {\left({\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left({\mathbf{q}}_{k+1}\right)\right)}^T\hfill & \hfill \mathbf{0}\hfill \\ {}\hfill \mathbf{0}\hfill & \hfill \mathbf{0}\hfill & \hfill 1\hfill \end{array}\right]\left[\begin{array}{l}\mathbf{g}\\ {}\mathbf{h}\\ {}f\left({\mathbf{q}}_{k+1}\right)\end{array}\right]+\left[\begin{array}{c}\hfill {\mathbf{v}}_{k+1}^a\hfill \\ {}\hfill {\mathbf{v}}_{k+1}^m\hfill \\ {}\hfill {\mathbf{v}}_{k+1}^{\mathrm{UH}}\hfill \end{array}\right] $$
(10)

where a k + 1 and m k + 1 are the observed accelerations under quasi-static situations and magnetic field values at DCS, respectively; g and h are the local gravity vector and magnetic field values at GCS; ΔUH k + 1 is the difference between user heading derived from a landmark and estimation result of RMPCA approach at GCS, f(q k + 1) is the function relating user heading with the quaternion vector and accelerations upon PCA-based approach, as will be given in the next section; and \( {\mathbf{v}}_{k+1}^a \), \( {\mathbf{v}}_{k+1}^m \), and \( {\mathbf{v}}_{k+1}^{UH} \) are the related zero mean white Gaussian measurement noise of the accelerometer, magnetometer, and landmark, respectively. The covariance of the measurement noise R k + 1 can be given as follows:

$$ {\mathbf{R}}_{k+1}=\left[\begin{array}{ccc}\hfill {\mathbf{R}}_{k+1}^a\hfill & \hfill \mathbf{0}\hfill & \hfill \mathbf{0}\hfill \\ {}\hfill \mathbf{0}\hfill & \hfill {\mathbf{R}}_{k+1}^m\hfill & \hfill \mathbf{0}\hfill \\ {}\hfill \mathbf{0}\hfill & \hfill \mathbf{0}\hfill & \hfill {\mathbf{R}}_{k+1}^{\mathrm{UH}}\hfill \end{array}\right]=\left[\begin{array}{ccc}\hfill {{}^R\upsigma}_a^2{\mathbf{I}}_3\hfill & \hfill \mathbf{0}\hfill & \hfill \mathbf{0}\hfill \\ {}\hfill \mathbf{0}\hfill & \hfill {{}^R\upsigma}_m^2{\mathbf{I}}_3\hfill & \hfill \mathbf{0}\hfill \\ {}\hfill \mathbf{0}\hfill & \hfill \mathbf{0}\hfill & \hfill {{}^R\upsigma}_{UH}^2\hfill \end{array}\right] $$
(11)

where \( {{}^R\upsigma}_{\mathrm{UH}}^2 \) is set during offline phase according to the style and related realistic environments of a landmark, as described in Section 3; and \( {{}^R\upsigma}_a^2 \) and \( {{}^R\upsigma}_m^2 \) are the parameters adaptively tuned according to the perturbation intensity of accelerations and magnetic field values:

$$ {{}^R\upsigma}_a^2=\left\{\begin{array}{cc}\hfill {\upsigma}_a^2,\hfill & \hfill \left|\ {\left\Vert {\mathbf{a}}_{k+1}\right\Vert}_2-{\left\Vert \mathbf{g}\right\Vert}_2\ \right|<{\upvarepsilon}_{a1}\cap \operatorname{var}\left({\left\Vert {\mathbf{a}}_{k+1- Na/2}\right\Vert}_2:{\left\Vert {\mathbf{a}}_{k+1+ Na/2}\right\Vert}_2\right)<{\upvarepsilon}_{a2}\hfill \\ {}\hfill \infty, \hfill & \hfill \mathrm{otherwise}\hfill \end{array}\right. $$
(12)
$$ {{}^R\upsigma}_m^2=\left\{\begin{array}{cc}\hfill {\upsigma}_m^2,\hfill & \hfill \left|\ {\left\Vert {\mathbf{m}}_{k+1}\right\Vert}_2-{\left\Vert \mathbf{h}\right\Vert}_2\ \right|<{\upvarepsilon}_{m1}\cap \operatorname{var}\left({\left\Vert {\mathbf{m}}_{k+1- Nm/2}\right\Vert}_2:{\left\Vert {\mathbf{m}}_{k+1+ Nm/2}\right\Vert}_2\right)<{\upvarepsilon}_{m2}\hfill \\ {}\hfill \infty, \hfill & \hfill \mathrm{otherwise}\hfill \end{array}\right. $$
(13)

where ε a1 represents allowed maximum difference between acceleration vector and the local one; ε m1 represents allowed maximum difference between magnetic field vector and the local one; ε a2 and ε m2 represent the related allowed maximum variances of signal samples, respectively; N a and N m represent the sizes of centered windows for acceleration and magnetic field samples, respectively; and var(⋅) is the function computing variance of samples in the centered window. Since the absolute static situations are always unavailable in realistic environments, we exploit the quasi-static situations, in which the magnitudes of the accelerations are similar to that of the static situations and the variances of the accelerations are assumed to be small.

4.2 Derivation of measurement equation relating quaternion vector with user heading

We derive the explicit measurement equation relating quaternion vector with user heading upon the principle of RMPCA approach. RMPCA firstly projects all acceleration samples within a walking step at DCS into the GCS and obtains the accelerations in the horizontal plane at GCS. In order to establish the relationship between the user heading and the quaternion vector at a specific time, we deploy a temporary rotation matrix between two DCSs to project all accelerations into the DCS at a specific time,

$$ {\mathbf{a}}^{\mathrm{DCS}1}(t2)={\left({\mathbf{R}}_{\mathrm{DCS}2}^{\mathrm{DCS}1}\right)}^T{\mathbf{a}}^{\mathrm{DCS}2}(t2) $$
(14)
$$ {\mathbf{R}}_{\mathrm{DCS}2}^{\mathrm{DCS}1}={\left({\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}(t2)\right)\right)}^T\left({\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}(t1)\right)\right) $$
(15)

where DCS1 and DCS2 represent the DCS at time instant t1 and t2, \( {\mathbf{R}}_{\mathrm{DCS}2}^{\mathrm{DCS}1} \) is the temporary rotation matrix from DCS2 to DCS1, q(t1) and q(t2) are the quaternion vectors at time instant t1 and t2, and a DCS2(t2) and a DCS1(t2) are the same accelerations measured at time instant t2 and represented at DCS1 and DCS2, respectively. The time interval between time instant t1 and t2 within a walking step is small enough, and thus, the accumulated error for computing related temporary rotation matrix \( {\mathbf{R}}_{\mathrm{DCS}2}^{\mathrm{DCS}1} \) can be neglected. Derived from Eqs. (14) and (15), we project all accelerations within a walking step into the DCS at a specific time t1 within the walking step:

$$ {\mathbf{a}}^{\mathrm{DCS}1}(j)={\left(\mathbf{R}(j)\right)}^T{\mathbf{a}}^{\mathrm{DCS}}(j),\kern0.75em j=1,\dots, {N}_{\mathrm{acc}}^{\mathrm{step}} $$
(16)

where a DCS1(j) and a DCS(j) are the representations of the j-th acceleration sample at DCS1 and its raw DCS, R(j) is the temporary rotation matrix from the DCS of the j-th acceleration sample to DCS1, and \( {N}_{\mathrm{acc}}^{\mathrm{step}} \) is the number of acceleration samples within the walking step.

After projecting all accelerations within the walking step into a specific time t1, we may obtain the accelerations at GCS,

$$ {\mathbf{a}}^{\mathrm{GCS}}(j)={\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}(t1)\right){\mathbf{a}}^{\mathrm{DCS}1}(j),\kern0.75em j=1,\dots, {N}_{\mathrm{acc}}^{\mathrm{step}} $$
(17)

where \( {\mathbf{a}}^{\mathrm{GCS}}(j)={\left[{a}_x^{\mathrm{GCS}}(j)\kern0.5em {a}_y^{\mathrm{GCS}}(j)\kern0.5em {a}_z^{\mathrm{GCS}}(j)\right]}^T \) is the representation of the j-th acceleration sample at GCS, and \( {\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}(t1)\right) \) is the temporary rotation matrix described by quaternion vector at time t1. Then, we can obtain the acceleration components in the horizontal plane as follows,

$$ \left[\begin{array}{l}{a}_x^{\mathrm{GCS}}(j)\\ {}{a}_y^{\mathrm{GCS}}(j)\end{array}\right]=Q\left(\mathbf{q}(t1)\right){\mathbf{a}}^{\mathrm{DCS}1}(j),\kern0.5em j=1,\dots, {N}_{\mathrm{acc}}^{\mathrm{step}} $$
(18)
$$ Q\left(\mathbf{q}(t1)\right)=\left[\begin{array}{ccc}\hfill {\overset{\frown }{q}}_0^2+{\overset{\frown }{q}}_1^2-{\overset{\frown }{q}}_2^2-{\overset{\frown }{q}}_3^2\hfill & \hfill 2\left({\overset{\frown }{q}}_1{\overset{\frown }{q}}_2-{\overset{\frown }{q}}_0{\overset{\frown }{q}}_3\right)\hfill & \hfill 2\left({\overset{\frown }{q}}_1{\overset{\frown }{q}}_3+{\overset{\frown }{q}}_0{\overset{\frown }{q}}_2\right)\hfill \\ {}\hfill 2\left({\overset{\frown }{q}}_1{\overset{\frown }{q}}_2+{\overset{\frown }{q}}_0{\overset{\frown }{q}}_3\right)\hfill & \hfill {\overset{\frown }{q}}_0^2-{\overset{\frown }{q}}_1^2+{\overset{\frown }{q}}_2^2-{\overset{\frown }{q}}_3^2\hfill & \hfill 2\left({\overset{\frown }{q}}_2{\overset{\frown }{q}}_3-{\overset{\frown }{q}}_0{\overset{\frown }{q}}_1\right)\hfill \end{array}\right] $$
(19)

where \( \mathbf{q}(t1)={\left[{\overset{\frown }{q}}_0\kern0.5em {\overset{\frown }{q}}_1\kern0.5em {\overset{\frown }{q}}_2\kern0.5em {\overset{\frown }{q}}_3\right]}^T \) is the quaternion vector at time t1.

In order to make the nonlinear measurement equation converge fast, we take the difference between user heading derived from a landmark and estimation result of RMPCA approach as the observed variable,

$$ \Delta \mathrm{UH}={\mathrm{UH}}_{\mathrm{landmark}}\hbox{-} {\mathrm{UH}}_{\mathrm{RMPCA}} $$
(20)

where ΔUH is the observed difference value, UHlandmark is the observed user heading derived from a landmark, and UHRMPCA is the estimation result of RMPCA approach for the current step. The acceleration components in the horizontal plane at RCS may be given as,

$$ \left[\begin{array}{l}{a}_x^{\mathrm{RCS}}(j)\\ {}{a}_y^{\mathrm{RCS}}(j)\end{array}\right]=C\left[\begin{array}{l}{a}_x^{\mathrm{GCS}}(j)\\ {}{a}_y^{\mathrm{GCS}}(j)\end{array}\right],\kern0.5em j=1,\dots, {N}_{\mathrm{acc}}^{\mathrm{step}} $$
(21)
$$ C=\left[\begin{array}{cc}\hfill \cos \left({\mathrm{UH}}_{\mathrm{RMPCA}}\right)\hfill & \hfill \sin \left({\mathrm{UH}}_{\mathrm{RMPCA}}\right)\hfill \\ {}\hfill -\sin \left({\mathrm{UH}}_{\mathrm{RMPCA}}\right)\hfill & \hfill \cos \left({UH}_{\mathrm{RMPCA}}\right)\hfill \end{array}\right] $$
(22)

Then, derived from Eqs. (16) to (18), the acceleration components in the horizontal plane at RCS may be described by the raw measured accelerations represented at DCS1 directly,

$$ \left[\begin{array}{l}{a}_x^{\mathrm{RCS}}(j)\\ {}{a}_y^{\mathrm{RCS}}(j)\end{array}\right]=A{\mathbf{a}}^{\mathrm{DCS}1}(j),\kern0.5em j=1,\dots, {N}_{\mathrm{acc}}^{\mathrm{step}} $$
(23)
$$ A= CQ\left(\mathbf{q}(t1)\right) $$
(24)

where a DCS1(j) is the j-th measured accelerations represented at DCS1.

According to the principle of PCA-based approach and pattern recognition [26, 27,28,29], the maximum energy of the accelerations in the horizontal plane may be obtained along the walking direction at RCS,

$$ \Delta \mathrm{UH}=\underset{\varDelta \theta}{\max}\left\{\left[-\sin \Delta \theta \kern0.5em \cos \Delta \theta \right]\sum_{j=1}^{N_{\mathrm{acc}}^{\mathrm{step}}}\left[\begin{array}{l}{a}_x^{\mathrm{RCS}}(j)\\ {}{a}_y^{\mathrm{RCS}}(j)\end{array}\right]{\left[\begin{array}{l}{a}_x^{\mathrm{RCS}}(j)\\ {}{a}_y^{\mathrm{RCS}}(j)\end{array}\right]}^T{\left[\begin{array}{cc}\hfill -\sin \Delta \theta \hfill & \hfill \cos \varDelta \theta \hfill \end{array}\right]}^T\right\} $$
(25)

where Δθ is the angle variable that rotates from the axis Y R to the walking direction counterclockwise. Substitute Eq. (23) into Eq. (25),

$$ \Delta \mathrm{UH}=\underset{\varDelta \theta}{\max}\left\{\left[-\sin \Delta \theta \kern0.5em \cos \Delta \theta \right]A\sum_{j=1}^{N_{\mathrm{acc}}^{\mathrm{step}}}{\mathbf{a}}^{\mathrm{DCS}1}(j){\mathbf{a}}^{\mathrm{DCS}1}{(j)}^T{A}^T{\left[\begin{array}{cc}\hfill -\sin \Delta \theta \hfill & \hfill \cos \varDelta \theta \hfill \end{array}\right]}^T\right\} $$
(26)

Define the following matrices described by quaternion vector at time t1,

$$ \tilde{A}\left(\mathbf{q}(t1)\right)=\left[\begin{array}{cc}\hfill {\tilde{a}}_{11}\hfill & \hfill {\tilde{a}}_{12}\hfill \\ {}\hfill {\tilde{a}}_{21}\hfill & \hfill {\tilde{a}}_{22}\hfill \end{array}\right]= CQ\left(\mathbf{q}(t1)\right)\left[\sum_{j=1}^{N_{\mathrm{acc}}^{\mathrm{step}}}{\mathbf{a}}^{\mathrm{DCS}1}(j){\mathbf{a}}^{\mathrm{DCS}1}{(j)}^T\right]Q{\left(\mathbf{q}(t1)\right)}^T{C}^T $$
(27)
$$ \tilde{f}\left(\mathbf{q}(t1),\Delta \theta \right)=\left[-\sin \varDelta \theta \kern0.5em \cos \Delta \theta \right]\tilde{A}\left(\mathbf{q}(t1)\right){\left[\begin{array}{cc}\hfill -\sin \Delta \theta \hfill & \hfill \cos \Delta \theta \hfill \end{array}\right]}^T $$
(28)

Combine Eqs. (26), (27), and (28),

$$ \frac{\partial \left(\tilde{f}\left(\mathbf{q}(t1),\Delta \theta \right)\right)}{\partial \left(\Delta \theta \right)}=0 $$
(29)
$$ \tilde{f}\left(\mathbf{q}(t1),\Delta \theta \right)=\left[-\sin \Delta \theta \kern0.5em \cos \Delta \theta \right]\left[\begin{array}{cc}\hfill {\tilde{a}}_{11}\hfill & \hfill {\tilde{a}}_{12}\hfill \\ {}\hfill {\tilde{a}}_{21}\hfill & \hfill {\tilde{a}}_{22}\hfill \end{array}\right]{\left[\begin{array}{cc}\hfill -\sin \Delta \theta \hfill & \hfill \cos \Delta \theta \hfill \end{array}\right]}^T $$
(30)

We will get the following restriction equation about the observed variable ΔUH,

$$ \tan \left(2\ast \Delta \mathrm{UH}\right)=\frac{{\tilde{a}}_{12}}{{\tilde{a}}_{11}-{\tilde{a}}_{22}} $$
(31)

where \( {\tilde{a}}_{11} \), \( {\tilde{a}}_{12} \), and \( {\tilde{a}}_{22} \) can be obtained from Eq. (27). Generally, we assume that the absolute difference between user heading derived from a landmark and from RMPCA approach is less than π/4. Therefore, we may obtain the measurement equation relating quaternion vector with observed variable as follows,

$$ \Delta \mathrm{UH}=f\left(\mathbf{q}(t1)\right)={0.5}^{\ast}\arctan \left(\frac{{\tilde{a}}_{12}}{{\tilde{a}}_{11}-{\tilde{a}}_{22}}\right) $$
(32)

Usually, the absolute difference between user heading derived from a landmark and from RMPCA approach may be restricted into a small value, such as less than π/8. As a result, the arc tangent function in Eq. (25) may be approximated by a low-order polynomial function. If the absolute difference exceeds 45°, though the probability is rather low, we will not exploit the landmark to recalibrate the device attitude estimation module.

4.3 UKF equations for device attitude estimation

UKF [30, 31] is a Kalman filter based on unscented transformation (UT). UT provides an effective way to approximately calculate the change of the mean and covariance of a random variable when it undergoes a nonlinear transformation. As seen in Section 4.1, combining Eqs. (6) and (10), the state and measurement equations are given as follows:

$$ \left\{\begin{array}{l}{\mathbf{q}}_{k+1}={F}_k{\mathbf{q}}_k+{\mathbf{w}}_k^q\ \\ {}{\mathbf{z}}_{k+1}=\phi \left({\mathbf{q}}_{k+1}\right)+{\mathbf{v}}_{k+1}\end{array}\right. $$
(33)

The state equation of the quaternion vector is linear, while the measurement equation is nonlinear. Therefore, we only need to deploy UT on the measurement equation.

Firstly, the same as that in Kalman filter, given the state estimation and its related covariance \( \left({\widehat{\mathbf{q}}}_k,{P}_k\right) \), the state update equations may be given as follows:

$$ \left\{\begin{array}{l}{\widehat{\mathbf{q}}}_{k+1}^{-}={F}_k{\widehat{\mathbf{q}}}_k\ \\ {}{P}_{k+1}^{-}={F}_k{P}_k{F}_k^T+{W}_k\end{array}\right. $$
(34)

where \( {\widehat{\mathbf{q}}}_{k+1}^{-} \) is the a priori state estimate and \( {P}_{k+1}^{-} \) is the related covariance matrix.

To calculate the statistic of the observed variable z k + 1, UT designs a series of sigma points ξ i , k + 1 (i = 0, 1,  ⋯ , 2L) with corresponding weights w i using \( \left({\widehat{\mathbf{q}}}_{k+1}^{-},{P}_{k+1}^{-}\right) \), according to the following:

$$ \left\{\begin{array}{l}{\boldsymbol{\upxi}}_{0,,k+1}={\widehat{\mathbf{q}}}_{k+1}^{-}\ \\ {}{\boldsymbol{\upxi}}_{i,,k+1}={\widehat{\mathbf{q}}}_{k+1}^{-}+{\left(\sqrt{\left(L+\lambda \right){P}_{k+1}^{-}}\right)}_i\left(i=1,\cdots, L\right)\\ {}{\boldsymbol{\upxi}}_{i,,k+1}={\widehat{\mathbf{q}}}_{k+1}^{-}-{\left(\sqrt{\left(L+\lambda \right){P}_{k+1}^{-}}\right)}_i\left(i=L+1,\cdots, 2L\right)\end{array}\right. $$
(35)
$$ \left\{\begin{array}{l}{w}_0^m=\frac{\lambda }{L+\lambda}\\ {}{w}_0^c=\frac{\lambda }{L+\lambda }+\left(1-{\alpha}^2+\beta \right)\\ {}{w}_i^m={w}_i^c=\frac{\lambda }{2\left(L+\lambda \right)},i=1,\cdots, 2L\end{array}\right. $$
(36)
$$ \lambda ={\alpha}^2\left(L+\kappa \right)-L $$
(37)

where λ is a scaling factor, α is usually set to a small positive value (e.g., 1e-3) and L is set to 4 (the dimensionality of the state variable), κ is set to 0 and β is set to 2 for Gaussian distribution, and \( {\left(\sqrt{\left(L+\lambda \right){P}_{k+1}^{-}}\right)}_i \) is the i − th column of the square root matrix. \( {w}_i^m \) and \( {w}_i^c \) are the weight coefficients for calculating mean and covariance of z.

After obtaining the sigma points, the measurement update equations are given as follows:

$$ \left\{\begin{array}{l}{\mathbf{z}}_{i,k+1}=\phi \left({\boldsymbol{\upxi}}_{i,k+1}\right)\ \\ {}{\mathbf{z}}_{k+1}^{-}=\sum \limits_{i=0}^{2L}{w}_i^m{\mathbf{z}}_{i,k+1}\\ {}{P}_{\mathbf{z}\mathbf{z},k+1}=\sum \limits_{i=0}^{2L}{w}_i^c\left[{\mathbf{z}}_{i,k+1}-{\mathbf{z}}_{k+1}^{-}\right]{\left[{\mathbf{z}}_{i,k+1}-{\mathbf{z}}_{k+1}^{-}\right]}^T+{\mathbf{R}}_{k+1}\end{array}\right. $$
(38)

Then, the Kalman filter gain [32] may be obtained as follows:

$$ \left\{\begin{array}{l}{P}_{\mathbf{qz},k+1}=\sum \limits_{i=0}^{2L}{w}_i^c\left[{\xi}_{i,k+1}-{\xi}_{0,k+1}\right]{\left[{\mathbf{z}}_{i,k+1}-{\mathbf{z}}_{k+1}^{-}\right]}^T\\ {}{K}_{k+1}={P}_{\mathbf{qz},k+1}{\left({P}_{\mathbf{z}\mathbf{z},k+1}\right)}^{-1}\end{array}\right. $$
(39)

The ultimate estimation of the state variable and its related covariance matrix are given as follows:

$$ \left\{\begin{array}{l}{\widehat{\mathbf{q}}}_{k+1}={\widehat{\mathbf{q}}}_{k+1}^{-}+{K}_{k+1}\left({\mathbf{z}}_{k+1}-{\mathbf{z}}_{k+1}^{-}\right)\\ {}{P}_{k+1}={P}_{k+1}^{-}-{K}_{k+1}{P}_{\mathbf{z}\mathbf{z},k+1}{K}_{k+1}^T\end{array}\right. $$
(40)

5 User heading estimation module

This section describes the user heading estimation module based on the second UKF fusing heading estimation result of improved RMPCA and landmarks. The main difference between the proposed improved RMPCA and the original RMPCA is that attitude estimation is achieved by UKF rather than EKF. The state model of UKF is constructed upon the improved RMPCA. Firstly, as seen in Eq. (16), all acceleration samples measured at DCS within a walking step are projected into a specific time t1 during the same step. Then, deploying the quaternion vector at the specific time and related rotation matrix, the horizontal acceleration samples at GCS are obtained, as seen in Eq. (17). Similarly to Section 4.2, to reduce nonlinearity of the state equation, we also project accelerations at GCS into RCS and extract the walking direction at RCS. The state equation of user heading is given as follows,

$$ \left\{\begin{array}{l}\mathrm{UH}={\mathrm{UH}}_{\mathrm{ImRMPCA}}+f\left(\mathbf{q}(t1)\right)+w\\ {}f\left(\mathbf{q}(t1)\right)={0.5}^{\ast}\arctan \left(\frac{{\tilde{a}}_{12}}{{\tilde{a}}_{11}-{\tilde{a}}_{22}}\right)\end{array}\right. $$
(41)

where \( {\tilde{a}}_{11} \), \( {\tilde{a}}_{12} \), and \( {\tilde{a}}_{22} \) can be seen as a function of the quaternion vector variable and obtained from Eq. (27), UHImRMPCA is the user heading estimation result of improved RMPCA for current step, and w is the process noise variance of the state model.

If there is a landmark available, the user heading derived from the landmark can be used to recalibrate the ultimate user heading estimation. The measurement equation is given as follows,

$$ {\mathrm{UH}}_{\mathrm{landmark}}={\mathrm{UH}}_{\mathrm{ImRMPCA}}+v $$
(42)

where v is the measurement noise of the user heading derived from the landmark. With the quaternion vector q(t1) and its covariance matrix calculated by attitude tracking model developed in Section 4, we can deploy UKF to calculate the ultimate user heading and its variance. If there is no landmark available, the ultimate user heading estimation can be calculated by unscented transformation on the state model, with the quaternion vector and its covariance matrix as input variable.

For different landmarks, the uncertainties of the derived user heading are different. User heading of taking an escalator or entering an elevator has a smaller variance than that of walking upstairs/downstairs. We set the measurement noise of each landmark at the target environment during the offline phase. Firstly, we define an interval covering all possible user headings of a specific landmark. Secondly, for simplicity, the measurement noise is assumed to follow Gaussian distribution. We choose a three-sigma interval, where the probability of the user heading values lying in can reach up as high as 98.89%. Thirdly, the center value of the defined interval is set as the observed user heading of the landmark, and the standard deviation is set to one sigma. The parameter settings may vary with different types of the landmarks and realistic environments.

6 Evaluation

6.1 Experimental setup

Experiments were carried in a typical indoor building area covering two floors, including a hall, a corridor and a room for each floor, as seen in Fig. 3. The size of the experimental area for each floor is 18.5 m Ã— 11.2 m. We deploy a Samsung Galaxy S4 smartphone as the device to collect gyroscope, accelerometer, and magnetometer data. The whole walking process for each participant includes starting on the walking path at the second floor along the corridor and the hall, walking downstairs, walking at the first floor along the hall, taking elevator, and walking at the second floor again along the hall and the room. The process was repeated by four individual participants with a total number of 100 times to test the user heading estimation performance of compared approaches. Each participant initially held the phone in hand, started the application, put it into the pocket and then started the walking. As in many other works [14, 33, 34], some parameters such as the initial walking direction are assumed to be known. To label the ground truth and compute the user heading estimation errors, we deployed a video to record the entire walking process of each participant.

Fig. 3
figure 3

Experimental environment and the true walking path including walking at the second floor, walking downstairs, walking at the first floor, taking the elevator, and walking at the second floor again. a Second floor. b First floor

6.2 Performance analysis

We compare the user heading estimation accuracy of various RMPCA-based approaches, including original RMPCA approach, landmark-aided RMPCA without device attitude recalibration, improved RMPCA using UKF, landmark-aided improved RMPCA without device attitude recalibration, and the proposed landmark-aided approach. As seen in Fig. 4, the proposed landmark-aided approach performs significantly better than the other compared approaches. Particularly, probability of absolute estimation error within 10° for proposed landmark-aided approach is 75.6%, while those of landmark-aided improved RMPCA without device attitude recalibration, improved RMPCA, landmark-aided RMPCA without device attitude recalibration, and RMPCA are 71.5, 69.1, 67.4, and 65.4%, respectively. Probability of absolute estimation error within 20° for proposed landmark-aided approach is 96.2%, while those of landmark-aided improved RMPCA without device attitude recalibration, improved RMPCA, landmark-aided RMPCA without device attitude recalibration, and RMPCA are 93.5, 91.4, 87.9, and 85.8%, respectively.

Fig. 4
figure 4

Cumulative error distributions of absolute heading estimation error of compared user heading estimation approaches

Figure 5 shows the performance comparisons of mean and standard deviation of absolute heading estimation error. The proposed landmark-aided approach obtains the smallest mean and standard deviation values of absolute heading estimation error. Particularly, mean absolute estimation error for proposed landmark-aided approach is 6.85°, while those of landmark-aided improved RMPCA without device attitude recalibration, improved RMPCA, landmark-aided RMPCA without device attitude recalibration, and RMPCA are 7.65°, 8.31°, 8.90°, and 9.56°, respectively. Standard deviation of absolute heading estimation error for proposed landmark-aided approach is 2.84°, while those of landmark-aided improved RMPCA without device attitude recalibration, improved RMPCA, landmark-aided RMPCA without device attitude recalibration, and RMPCA are 3.19°, 3.46°, 3.76°, and 4.03°, respectively. Compared with RMPCA approach, the proposed landmark-aided approach and previous landmark-aided RMPCA approach reduce the mean absolute heading estimation error by 28.3% (2.71°) and 6.9% (0.66°), respectively.

Fig. 5
figure 5

Performance comparisons of mean and standard deviation of absolute heading estimation error

The proposed landmark-aided approach improves the heading estimation accuracy from two aspects. First, the improved RMPCA approach is developed for user heading estimation without landmarks. The improved RMPCA deploys UKF for quaternion-based device attitude estimation, which may better adapt the nonlinearity of the related measurement equation than previous RMPCA approach using EKF. This aspect can also be verified by the heading estimation result comparisons between the improved RMPCA and RMPCA approaches. Second, we not only deploy landmarks for direct user heading recalibrations, but also for device attitude estimation recalibrations, which may render more accurate extraction of the horizontal accelerations. This is also the reason why the proposed landmark-aided approach performs better than that of landmark-aided improved RMPCA without device attitude recalibration.

7 Conclusions

In this paper, we propose two UKF-based user heading estimation approach by fusing inertial sensors and landmarks. The second UKF fusing landmarks and estimation results of an improved RMPCA is developed for direct user heading estimation, while the first UKF is developed for device attitude estimation. The proposed approach not only exploits landmarks for direct user heading estimation recalibration, but also for device attitude recalibration, which is important for accurate walking direction extraction. Compared with previous RMPCA approach, instead of using EKF, the improved RMPCA using the first UKF may better adapt nonlinearity of measurement equation. Besides, we develop a robust user motion recognition method for landmark identification, without requiring noisy barometers. Experimental results show that the proposed landmark-aided approach may obtain significant user heading estimation accuracy improvement. Compared with previous landmark-aided RMPCA approach, the proposed approach may reduce the mean absolute heading estimation error by 23.0% (2.05°).

In our future works, more kinds of landmarks such as passing doors and corners will be used to aid user heading estimation and indoor navigation. Besides, more complicated and a large-scale indoor environment including more landmarks will be tested.

References

  1. R. Harle, A survey of indoor inertial positioning systems for pedestrians. IEEE Commun. Surv. Tutorials. 15(3), 1281–1293 (2013)

    Article  Google Scholar 

  2. Y. Gu, A. Lo, I. Niemegeers, A survey of indoor positioning systems for wireless personal networks. IEEE Commun. Surv. Tutorials. 11(1), 13–32 (2009)

    Article  Google Scholar 

  3. D. H. Titterton, J. L. Weston, Strapdown inertial navigation technology. Institution of Electrical Engineers, 2004

  4. C. Valérie, Christophe, magnetic, acceleration fields and gyroscope quaternion (MAGYQ)-based attitude estimation with smartphone sensors for indoor pedestrian navigation. Sensors (Switzerland) 14, 22864–22890 (2014)

    Article  Google Scholar 

  5. F. Zhao, X. Sun, H. Chen, R. Bie, Outage performance of relay-assisted primary and secondary transmissions in cognitive relay networks. EURASIP J. Wirel. Commun. Netw. 1(60), 1–10 (2014)

    Google Scholar 

  6. L. Chen, E. Wu, M. Jin, G. Chen, Intelligent fusion of Wi-Fi and inertial sensor-based positioning systems for indoor pedestrian navigation. IEEE Sensors J. 14(11), 4034–4042 (2014)

    Article  Google Scholar 

  7. R. Atienza, A. Zelinsky, Active gaze tracking for human-robot interaction. IEEE Int. Conf. Multimodal Interfaces, ICMI 2002 (2002), pp. 261–266

  8. F. Zhao, L. Wei, H. Chen, Optimal time allocation for wireless information and power transfer in wireless powered communication systems. IEEE Trans. Veh. Technol. 65(3), 1830–1835 (2016)

    Article  Google Scholar 

  9. M. Jia, L. Wang, Q. Guo, X. Gu, W. Xiang, A low complexity detection algorithm for fixed up-link SCMA system in mission critical scenario. IEEE Int Things J 1(1), 99 (2017)

    Google Scholar 

  10. Z.A. Deng, G. Wang, D. Qin, Z. Na, Y. Cui, J. Chen, Continuous indoor positioning fusing WiFi, smartphone sensors and landmarks. Sensors (Switzerland) 16 (2016)

  11. H. Lee, J. Lee, J. Cho, N. Chang, Estimation of heading angle difference between user and smartphone utilizing gravitational acceleration extraction. IEEE Sensors J. 16(10), 3746–3755 (2016)

    Article  Google Scholar 

  12. S.A. Hoseinitabatabaei, A. Gluhak, R. Tafazolli, W. Headley, Design, realization, and evaluation of uDirect-an approach for pervasive observation of user facing direction on mobile phones. IEEE Trans. Mob. Comput. 13(9), 1981–1994 (2014)

    Article  Google Scholar 

  13. K. Kunze, P. Lukowicz, K. Partridge, B. Begole, Which way am i facing: inferring horizontal device orientation from an accelerometer signal. Int. Symp. Wearable Comput. ISWC, 149–150 (2009)

  14. Z.A. Deng, G. Wang, Y. Hu, D. Wu, Heading estimation for indoor pedestrian navigation using a Smartphone in the pocket. Sensors (Switzerland) 15, 21518–21536 (2015)

    Article  Google Scholar 

  15. F. Zampella, A.R. Jiménez, R.F. Seco, Light-matching: a new signal of opportunity for pedestrian indoor navigation. Int. Conf. Indoor Position. Indoor Navig. IPIN 2013 (2013)

  16. A. R. J. Ruiz, F. S. Granja, J. C. P. Honorato, J. I. G. Rosas, Pedestrian indoor navigation by aiding a foot-mounted IMU with RFID signal strength measurements. Int. Conf. Indoor Position. Indoor Navig. IPIN 2010, 1–9 (2010)

  17. S. Han, Z. Gong, W. Meng, C. Li, An indoor radio propagation model considering angles for WLAN infrastructures. Wirel. Commun. Mob. Comput. 15(16), 2038–2048 (2015)

    Article  Google Scholar 

  18. L. Zhang, S. Valaee, Y. Bin Xu, L. Ma, F. Vedadi, Graph-based semi-supervised learning for indoor localization using crowdsourced data. Appl. Sci. 7(467), 1–24 (2017)

    Google Scholar 

  19. Z. Chen, H. Zou, H. Jiang, Q. Zhu, Y.C. Soh, L. Xie, Fusion of WiFi, smartphone sensors and landmarks using the Kalman filter for indoor localization. Sensors (Switzerland) 15, 715–732 (2015)

    Article  Google Scholar 

  20. H. Wang, A. Elgohary, and R. R. Choudhury, No need to war-drive: unsupervised indoor localization. Proc. 10th Int. Conf. Mob. Syst. Appl. Serv. (MobiSys ‘12), 197–210 (2012)

  21. Y. Gu, Q. Song, Y. Li, M. Ma, Z. Zhou, An anchor-based pedestrian navigation approach using only inertial sensors. Sensors (Switzerland) 16, 334–351 (2016)

    Article  Google Scholar 

  22. F. Ichikawa, J. Chipchase, R. Grignani, Where's the phone? A study of mobile phone location in public spaces. International Conference on Mobile Technology, 1–8 (2009)

  23. H. Abdelnasser, R. Mohamed, A. Elgohary, M.F. Alzantot, H. Wang, S. Sen, R.R. Choudhury, M. Youssef, SemanticSLAM: using environment landmarks for unsupervised indoor localization. IEEE Trans. Mob. Comput. 15(7), 1770–1782 (2016)

    Article  Google Scholar 

  24. K. Frank, E. Diaz, P. Robertson, F. Sanchez, Bayesian recognition of safety relevant motion activities with inertial sensors and barometer. Location and Navigation Symposium - PLANS 2014, 2014 IEEE/ION, pp. 174–184 (2014)

  25. A.M. Sabatini, Quaternion-based extended Kalman filter for determining orientation by inertial and magnetic sensing. IEEE Trans. Biomed. Eng. 53(7), 1346–1356 (2006)

    Article  Google Scholar 

  26. F. Zhao, W. Wang, H. Chen, Q. Zhang, Interference alignment and game-theoretic power allocation in MIMO heterogeneous sensor networks communications. Signal Process. 126, 173–179 (2016)

    Article  Google Scholar 

  27. U. Steinhoff, B. Schiele, Dead reckoning from the pocket—an experimental study. Proceedings of 2010 IEEE International Conference on Pervasive Computing and Communications, 2010, pp. 162–170

  28. F. Zhao, B. Li, H. Chen, X. Lv, Joint beamforming and power allocation for cognitive MIMO systems under imperfect CSI based on game theory. Wirel. Pers. Commun. 73(3), 679–694 (2013)

    Article  Google Scholar 

  29. M. Jia, X. Gu, Q. Guo, Broadband hybrid satellite-terrestrial communication systems based on cognitive radio toward 5G. IEEE Wirel. Commun. 23(6), 96–106 (2013)

    Article  Google Scholar 

  30. K. Xiong, H.Y. Zhang, C.W. Chan, Performance evaluation of UKF-based nonlinear filtering. Automatica 42(2), 261–270 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  31. H. Qasem, L. Reindl, Unscented and extended Kalman estimators for non linear indoor tracking using distance measurements. Positioning, Navigation and Communication, 2007. WPNC '07. 4th Workshop on Navigation and Communication, 177–181 (2007)

  32. Y. Bar-Shalom, X. R. Li, T. B. T.-E. Kirubarajan, Estimation, tracking and navigation:theory, algorithms and software. John Wiley & Sons, 2002

  33. F. Zhao, H. Nie, H. Chen, Group buying spectrum auction algorithm for fractional frequency reuses cognitive cellular systems. Ad Hoc Netw. 58, 239–246 (2017)

    Article  Google Scholar 

  34. M Jia, X Liu, X Gu, Joint cooperative spectrum sensing and channel selection optimization for satellite communication systems based on cognitive radio. Int. J. Satell. Commun. Netw. 23(3), 139–150 (2015)

Download references

Acknowledgments

This research is supported by National Natural Science Foundation of China (Granted No. 61671168, 61301132, 61601221, and 61301131), and the Fundamental Research Funds for the Central Universities No. 3132017129.

Author information

Authors and Affiliations

Authors

Contributions

ZD proposed the original idea and wrote this paper; WS and ZQ gave some valuable suggestions and improved the paper; ZN and XL supervised and revised the paper. All authors read and approved the final manuscript.

Corresponding authors

Correspondence to Xin Liu or Zhenyu Na.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Deng, Z., Si, W., Qu, Z. et al. Heading estimation fusing inertial sensors and landmarks for indoor navigation using a smartphone in the pocket. J Wireless Com Network 2017, 160 (2017). https://doi.org/10.1186/s13638-017-0941-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s13638-017-0941-0

Keywords