 Research
 Open Access
 Published:
WiFi/PDRintegrated indoor localization using unconstrained smartphones
EURASIP Journal on Wireless Communications and Networking volume 2019, Article number: 41 (2019)
Abstract
In this paper, we propose a WiFi/pedestrian dead reckoning (PDR)integrated localization approach based on unscented Kalman filters (UKF). The UKF integrating WiFi localization with PDR is used for ultimate location estimation. Instead of setting process and measurement noiserelated parameters empirically as previous works, the error covariance of user heading estimation in PDR state model can be accurately estimated by developing another UKF, while the measurement noise statistics in WiFi localization are estimated by deploying a kernel density estimationbased model. Another developed UKF is used for device attitude tracking in user heading estimation of PDR. Besides, in order to adapt the unconstrained carrying positions and orientations of smartphones, we propose a robust carrying position recognition method based on orientation invariant features. Experimental results show that the proposed WiFi/PDRintegrated localization approach may improve traditional approaches in terms of reliability and localization accuracy.
Introduction
Recently, various indoor localization technologies [1,2,3,4], such as WiFi, ultrawideband, radio frequency identification, and pedestrian dead reckoning (PDR), have been developed. Among them, WiFi and PDR have been regarded as two of the most popular indoor localization solutions, since both of them require no additional hardware cost. For WiFi localization, fingerprinting database called radio map is constructed during offline phase by collecting RSS values of multiple access points (APs) at predefined calibration points. During online phase, smartphones with wireless cards installed may estimate the locations by matching online RSS vectors with fingerprints in the constructed radio map. For PDR, smartphones using selfcontained inertial sensors can progressively infer the user’s position by combing displacement of the current step with the position of previous step. The displacement of current step is calculated by combing walking step detection, step length, and user heading estimation.
WiFi localization and PDR both have their drawbacks and advantages. WiFi localization always suffers from accuracy deteriorations caused by RSS fluctuations [5] and complicated indoor radio environments. PDR may obtain accurate localization results within a short period, while accumulated errors [6] are introduced by the noisy inertial sensors. Therefore, it is reasonable to integrate PDR with WiFi localization. The absolute WiFi localization results may calibrate PDR results and reduce the accumulated errors, while PDR may avoid the accuracy deteriorations caused by temporal RSS fluctuations.
Existing approaches integrating PDR with WiFi localization include particle filter [7, 8], Kalman filter [9, 10], and its variants [11, 12]. Particle filter may obtain high localization accuracy when a large number of particles are deployed, but high computation and storage cost are required. Kalman filter (KF) [9] and extended Kalman filter (EKF) [12]based approaches are computational lightweight. However, the linearization of model may degrade the localization accuracy, since the PDR state model is highly nonlinear. Recently, in order to adapt the nonlinearity of PDR model, unscented Kalman filter (UKF) [13, 14] is presented to integrate WiFi localization with PDR, which achieves a good balance between localization accuracy and computation cost. Instead of linearizing the model using Jacobian matrices in EKF, UKF deploys unscented transformation to estimate the mean and covariance matrix of state vector, which is accurate to the secondorder Taylor series expansion.
Though a lot of works [7,8,9,10,11,12,13,14] have been done in integrating PDR with WiFi localization, some key problems remain to be solved to enhance reliability and applicability. Firstly, existing approaches always empirically set process and measurement noise parameters, whose inaccurate settings may render degraded performance. Secondly, most existing integrated localization approaches assumes that the device carrying positions and device orientations are fixed, such as held in hand [15, 16]. This assumption limits the applications of localization system using smartphones, whose carrying positions and orientations are always unconstrained. An orientation independent device carrying position recognition method should be developed to predetermine the device carrying position.
This paper proposes a novelintegrated localization approach based on two UKFs. One UKF is used for ultimate location estimation, whose state and measurement models are PDR and WiFi localization, respectively. For PDR state model, we develop another UKF for device attitude tracking, which renders an improved user heading estimation. By constructing the relationship between quaternion vector and user heading, the error covariance of heading estimation can be also accurately obtained. For measurement model, we adopt the kernel density estimation (KDE) method to obtain measurement noise statistics, rather than set them empirically as previous approaches. Besides, in order to adapt the unconstrained daily use of smartphones, we propose a robust carrying position recognition method based on orientation invariant features. Parameter settings of walking step length estimation and walking step detection are tuned according to the recognized carrying positions. Experimental results show that our WiFi/PDRintegrated localization approach may improve traditional approaches in terms of reliability and localization accuracy.
In the rest of this paper, the related works are firstly presented in Section 2. Section 3 introduces an overview and some definitions of the proposed integrated localization approach. Section 4 proposes a robust device carrying position recognition. PDR based on the first UKF and ultimate location estimation based on the Second UKF are described in Sections 5 and 6, respectively. The experimental results and related analysis are reported in Section 7. We present conclusions in the last section.
Related works
WiFi fingerprinting [17] approach has been widely used in indoor localization, due to its low hardware cost and relatively widescale coverage. Because of the complex radio propagation environment such as multipath, RSS values from a fixed AP at a fixed point may fluctuate and degrade the localization accuracy significantly. In order to exploit the strength of WiFi localization and avoid its weakness, we integrate PDR to improve the accuracy and reliability of WiFi localization results.
Among various WiFi/PDRintegrated approaches, reference [7] introduces a particle filter integrating inertial sensors with WiFi localization. They generate new particles representing user locations according to PDR. Then, WiFi localization results are used to update the weight of each particle by computing distances between particle positions and the WiFi localization results. The user location is obtained by weighting all particles. Similarly, reference [18] presents an integrated approach using the particle filter. The major difference is the updating scheme of particle weights, which is inversely proportional to the Euclidean distance between onlinecollected RSS vector and the particle’s nearest fingerprint. The particle filterbased approach may obtain high localization accuracy, but it requires extensive computational cost to do certain operations on hundreds of particles. Therefore, the particle filter is unsuitable to be run on resourcelimited smartphones.
Reference [9] presents a Kalman filterbased WiFi/PDRintegrated approach. This approach assumes PDR being a linear formulation and that the user heading and walking step length are known accurately. As a result, nonlinearity of PDR will render an inaccurate estimation of predicted localization error covariance. More recently, reference [11] presents an EKF to integrate WiFi localization with PDR. The measurement noise variance is set empirically, thus degrading localization accuracy of EKF.
In order to handle the strong nonlinearity of PDR, references [13, 14] deploy UKF to integrate WiFi localization with PDR, which achieves a good balance between localization accuracy and computation cost. UKF approximately obtain the change of mean and covariance matrix of variable after nonlinear transformation more accurately than EKF, while requires comparable computation cost. However, existing UKFs still empirically set the measurement and process noise parameters, which will degrade the localization accuracy.
For user heading estimation of PDR using unconstrained smartphones, uDirect approach [19] tends to extract user heading directly within a particular area, where the forward walking acceleration dominates the horizontal acceleration signals. Unfortunately, such an area is always disturbed by body locomotion. In contrast, our previous proposed rotation matrix and principal component analysis (RMPCA) approach [20] is more robust, because it employs all acceleration samples in the horizontal plane. The first principal component of principal component analysis (PCA) [21] is assumed to be parallel with the user heading. Therefore, we employ RMPCAbased approach for user heading estimation.
In this paper, we also deploy UKF to integrate WiFi localization with PDR. The main novelty is that we may accurately estimate the related process and measurement noise statistics rather than set them empirically. For WiFi localization, we deploy KDE [22] to construct a relationship between RSS signal and user location for measurement update and adaptively calculate the measurement noise statistics. For user heading in PDR, we also deploy RMPCAbased approach. To adapt the nonlinearity of measurement model, rather than deploy EKF for device attitude tracking, we develop another UKF integrating inertial sensors and magnetometers. The function relating user heading with quaternion vector representing device attitude is also constructed. As a result, the error covariance of user heading estimation and predicted PDR localization results may be obtained accurately.
Besides, for unconstrained smartphones, it is necessary to determine the device carrying position, since it may directly affect the parameter settings of the step detection and step length estimation of PDR model. This paper develops a robust device carrying position recognition method based on orientation invariant features. The generation of the orientation invariant features also relies on the UKFbased device attitude tracking.
Overview of the proposed integrated localization approach
Figure 1 overviews the proposed integrated localization approach based on two UKFs. The ultimate location estimation is achieved by the second UKF, whose state model is PDR and measurement model is WiFi localization. For WiFi fingerprinting localization, we deploy KDE to adaptively estimate measurement noise statistics. Besides, in order to reduce the computation cost, we employ the localization result of PDR to restrict the radio map into a small subregion.
For PDR using unconstrained smartphones, it includes carrying position recognition, walking step detection, walking step length estimation, and RMPCAbased walking direction estimation modules. Upon carrying position recognition, different parameters for walking step detection and walking step length estimation modules may be set for different device carrying positions. This paper investigates four classical carrying positions [23]: put in trouser pocket (inpocket), gazed by the user and held in hand (handheld), against ear during phone calls (phonecall), and held in swinginghand (swinginghand).
One key component of PDR is the continuous device attitude tracking using the first UKF, which integrates accelerometers, gyroscopes, and magnetometers. The tracked device attitude is necessary for RMPCAbased user heading estimation and its error covariance calculation. The tracked device attitude is also used in generating orientation invariant features for robust carrying position recognition.
In order to describe PDR, we define global coordinate system (GCS) and device coordinate system (DCS). GCS is defined by the axis X_{G} pointing east, Y_{G} pointing north, and Z_{G} being the opposite direction of gravity vector. User heading is defined as the counterclockwise rotation angle from the positive direction of Y_{G} to user walking direction. DCS is defined by axes X_{DCS}, Y_{DCS}, and Z_{DCS}. The former two axes point right and forward in the front device screen plane, while Z_{DCS} axis is a standard crossproduct of X_{DCS} and Y_{DCS}.
Robust device carrying position recognition
It is important to recognize the carrying position of an unconstrained smartphone accurately and robustly, since carrying positions may directly impact the parameter settings for step detection and step length estimation. Many previous works [24, 25] have pointed out that the acceleration patterns for different carrying positions show distinct features. The statistics of three dimensional raw measured acceleration samples are deployed as input features to develop the carrying position classifier. The developed classifiers are all designed upon relatively stable device orientations. If the device orientations are unconstrained, the raw measured acceleration samples may vary a lot with the changing orientations under the same carrying positions. As a result, these classifiers may render degraded recognition accuracy with the unconstrained uses of smartphones.
In order to adapt the arbitrary smartphone orientations, we develop a robust carrying position classifier based on three kinds of orientation invariant features, including the total magnitude of acceleration MAcc, magnitude of the acceleration in the horizontal plane HAcc, and acceleration in the gravity direction GAcc,
where Acc = [Acc_{x} Acc_{y} Acc_{z}]^{T} is the raw measured acceleration vector at DCS, ·_{2} is the twonorm of a vector, g_{normal} is the normalized gravity vector at DCS, which can be calculated by tracked device attitude as seen in (7). These features also exploit the principle that different carrying positions show distinct acceleration patterns. In contrast, these features remain stable for the same carrying positions, regardless of smartphone orientation changes.The design of a carrying position classifier consists of three phases: data preprocessing, feature extraction, and classifier training. Firstly, we collect acceleration samples continuously and divide them into small segments by a sliding window [25], whose size is 2 s and with 50% overlap between adjacent windows. After data preprocessing, we extract three orientation invariant feature samples within the sliding window. Upon these feature samples, we deploy their statistics as ultimate input features of classifier, including variance, mean, medium, maximum, and minimum. These ultimate input features are all useful to discriminate carrying positions. For example, owing to the different intensity of user body locomotion, medium values of HAcc for inpocket and swinginghand positions are always much larger than those of phonecall and handheld positions.After feature extraction, as suggested by previous works [25, 26], we deploy random forest [26] as the carrying position classifier. We gather a total of 4000 samples for four carrying positions to train the classifier. For each carrying position, all possible device orientations are covered as much as possible and sampled uniformly. The tenfold crossvalidation method is used to evaluate the random forestbased classifier. The data samples are partitioned into ten parts randomly. Nine ones are used for training and the rest one for testing.Table 1 shows the random forestbased position recognition results with the proposed orientation invariant features and normal features, which are the same statistics of the raw measured acceleration samples. The results show that compared with the classifier using normal time domain features [25], the proposed robust position classifier shows an average classification accuracy improvement from 90.9 to 98.5%. This is because the orientation invariant features may better adapt the arbitrary device orientation change and enhance the generalization ability of the related classifier. As seen in Table 1, except for a very low probability of confusing between handheld and phonecall positions, and swinginghand and inpocket positions, the device carrying positions can be correctly recognized by a sufficiently high probability. Therefore, in the rest of the paper, we assume that the device carrying position can be correctly recognized in the proposed WiFi/PDRintegrated positioning approach.
Pedestrian dead reckoning (PDR)
PDR estimates the user position by combing displacement of the current step with the position of previous step,
where L_{i} = (x_{i}, y_{i}) and L_{i − 1} = (x_{i − 1}, y_{i − 1}) are the twodimensional location vectors of current (the ith) and the previous steps, SL_{i} is the estimated step length and ψ_{i} is the user heading. We assume that the beginning user position and user heading are known by deploying various methods [27].
Step detection and step length estimation
Step detection is achieved by the peak detection algorithm [20]. It is founded on periodic acceleration signals, whose peak point corresponds to the heel strike event among each walking step. We deploy the total magnitude values of acceleration signals as inputs of the peak detection algorithm, which is robust to device attitude changing. To alleviate negative effect of the signal noise, we smooth the acceleration samples by averaging the raw neighboring samples. Then, each walking step is identified by the peak detection algorithm. To eliminate the false detection of peak points due to acceleration jitters, we set two threshold parameters to restrict magnitude of the peak point and time interval of consecutive peak points,
where MAcc_{peak} is the magnitude of peak point, g_{0} is the local gravity value, A_{Th} represents the magnitude threshold of peak point, ΔT_{peak} is time interval of consecutive peak points, and T_{Th} represents the shortest time interval allowed between consecutive peak points. Practically, the time interval threshold is set around two thirds of the walking step period. For magnitude threshold setting, since the body locomotion intensity may vary with device carrying positions, it should be trained and tuned according to the recognized device carrying position.
For estimating walking step length, various methods [28] have been proposed. These methods establish the estimation function relating step length with variables including walking step frequency and acceleration related statistics. Practically, it is difficult to establish a general walking step length estimation function adapting different users. We adopt the following linear function:
where fre is the walking step frequency; var is the variance of accelerations among one walking step; and α, β, and γ are the related parameters. For different device carrying positions, the walking step length estimation parameters may change due to different acceleration signal statistics. These parameters can be set by offline training for each user and recognized carrying position.
First UKF: device attitude tracking fusing inertial sensors and magnetometers
We deploy a quaternion vector as the state variable of the first UKF to represent the device attitude. We firstly describe the state and measurement models of the first UKF. Then, the unscented transformation and related UKF formulations are given.
State and measurement models
In order to deploy quaternion vector, we relate device attitude with quaternion vector by employing rotation matrix,
where h^{GCS}(t) and h^{DCS}(t) describe the same 3 × 1 vector at GCS and DCS, respectively, \( {\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}(t)\right) \) is the related rotation matrix at time t, \( \mathbf{q}={\left[{q}_0\kern0.5em {q}_1\kern0.5em {q}_2\kern0.5em {q}_3\right]}^T \) is the normalized quaternion vector. The normalized gravity vector g_{normal} at DCS in Eq. (2) can be calculated if we substitute h^{GCS}(t) with the local gravity vector at GCS and know the related quaternion vector.
Upon the rigid body angular motion law [29], the state model is given as follows:
where state transition matrix F_{k} = exp(0.5^{∗}T_{s}^{∗}Ω(w_{k})),
where T_{s} is the sampling interval and \( {\mathbf{w}}_k={\left[{w}_k^x\kern0.5em {w}_k^y\kern0.5em {w}_k^z\right]}^T \) is the raw measured angular velocity at time instants kT_{s}. Process noise variable \( {\mathbf{w}}_k^q \) and related covariance matrix W_{k} can be calculated as in [29].
The measurement model of UKF is:
where a_{k + 1} and m_{k + 1} are the raw observed acceleration and magnetic field vectors represented at DCS; \( {\mathbf{v}}_{k+1}^a \) and \( {\mathbf{v}}_{k+1}^m \) are the zero mean white Gaussian measurement noise of the accelerometer and magnetometer, respectively; g_{0} and h_{0} are the local gravity vector and local magnetic field vector at GCS, respectively. The covariance of the measurement noise R_{k + 1} is given as follows:
where \( {{}^R\upsigma}_a^2 \) and \( {{}^R\upsigma}_m^2 \) are adaptively set according to the intensity of the perturbations as in our previous work [30].
UKF formulations for device attitude estimation
UKF may approximately obtain the mean and covariance values of a random variable after a nonlinear transformation by deploying unscented transformation (UT). As seen in Eq. (11), since only the measurement formulation is nonlinear, we adopt UT on the measurement formulation to calculate mean and covariance matrix of the state variable. Firstly, given the state estimation \( \left({\widehat{\mathbf{q}}}_k,{P}_k\right) \), the state update formulations are described as follows:
where \( {\widehat{\mathbf{q}}}_{k+1}^{} \) and \( {P}_{k+1}^{} \) are the priori state estimation and corresponding covariance matrix.
For measurement formulation, based on the input variable \( \left({\widehat{\mathbf{q}}}_{k+1}^{},{P}_{k+1}^{}\right) \), UT generates a set of sigma points ξ_{i, k + 1} (i = 0, 1, ⋯, 2L) with related weights w_{i},
where L is set to the dimensionality of the quaternion vector, λ is a scaling factor, α is a small positive value, κ = 0 and β = 2, \( {\left(\sqrt{\left(L+\lambda \right){P}_{k+1}^{}}\right)}_i \) is the ith column of the square root matrix, and \( {w}_i^m \) and \( {w}_i^c \) are the weights of different sigma points to calculate mean and covariance of the observed variable z.
After generating the sigma points, we give measurement update formulations as follows:
Then, the Kalman filter gain is calculated as follows:
Finally, the quaternion vector and its related covariance matrix are estimated as follows:
RMPCAbased user heading estimation
Deploying RMPCA method may directly estimate the user heading. However, it is difficult to accurately and robustly estimate the covariance matrix of user heading estimation in the second UKF, since the function relating quaternion vector with user heading will have a strong nonlinearity. In order to reduce the nonlinearity of the function, we represent the user heading ψ as a sum of the initial heading estimation of RMPCA ψ_{RMPCA} and a difference value Δψ,
We define an intermediate reference coordinate system (RCS) for each step by rotating GCS ψ_{RMPCA} radians around Z_{G} counterclockwise, which also includes three axes X_{R}, Y_{R}, and Z_{R}. In fact, the difference value Δψ is the angle that rotates from the positive direction of axis Y_{R} to walking direction counterclockwise at RCS. Therefore, we may derive the relationship between Δψ and quaternion vector based on the principle of PCAbased approach.
Firstly, we transform all raw measured acceleration signals at DCS along a walking step period into a fixed time t1 of the same walking step by related rotation matrices. The rotation matrices are assumed to be accurate enough, since the sample time intervals within the same step are short enough. We denote these acceleration samples projected into specific time t1 with device coordinate system DCS1 as \( {\mathbf{a}}^{\mathrm{DCS}1}(j),\kern0.75em j=1,\dots, {N}_{\mathrm{acc}}^{\mathrm{step}} \).
Then, we can project these samples into GCS,
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 jth acceleration signal at GCS, \( {\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}(t1)\right) \) is the rotation matrix from GCS to DCS1. The horizontal acceleration sample component is given as follows:
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, the first two rows of \( {\mathbf{R}}_{\mathrm{GCS}}^{\mathrm{DCS}}\left(\mathbf{q}(t1)\right) \) comprise Q(q(t1)). The horizontal acceleration sample component at RCS is described as,
Finally, according to the principle of PCA, the maximum energy of the horizontal acceleration signal components is obtained along the walking direction at RCS,
where Δθ is the angle variable that rotates from the axis Y_{R} to the walking direction counterclockwise. Combining equations from (23) to (27), we define the following matrices,
Combine equations from (25) to (27),
We will get the following restriction formulation about the angle Δψ,
where \( {\tilde{a}}_{11} \), \( {\tilde{a}}_{12} \), and \( {\tilde{a}}_{22} \) can be calculated from Eq. (26). Practically, the absolute difference between user heading obtained by RMPCA approach and the actual user heading is always smaller than π/4. Therefore, we may get formulation relating quaternion vector with the angle Δψ,
Substitute (30) into (19), the user heading can be ultimately given as,
where ψ_{RMPCA} is a constant value obtained by the initial heading estimation of RMPCA and f(q(t1)) is a nonlinear function with the quaternion vector at a fixed time within the same step as input variable.
Second UKF for ultimate location estimation
KDEbased WiFi localization for measurement update
This section presents the KDEbased WiFi localization, which is used for establishing measurement equation of the second UKF. Owing to the uncertainty of RSS values caused by complicated radio propagation environment, an explicit formulation relating user location with RSS values and related measurement noise are unavailable. Rather than setting the measurement noise statistics empirically as previous works, we deploy KDE model to accurately estimate the statistics.
UpNon minimum meansquared error (MMSE) criteria, we estimate the user location and the related covariance matrix,
where l is the user position vector, r is the collected RSS sample vector, and Ω(lr) is the posterior density of the user position with collected RSS vector r. The posterior density is obtained by KDE [22], which is a widely used nonparametric density estimator. Using the RSS fingerprints in radio map \( \left\{\left.\left({\overline{\mathbf{r}}}_i,{\mathbf{l}}_i\right)\righti=1,\dots, N\right\} \), with mean RSS vector \( {\overline{\mathbf{r}}}_i \) collected at the calibration point l_{i}, the posterior density estimation is given as follows:
where \( \widehat{\varOmega}\left(\left.\mathbf{l}\right\mathbf{r}\right) \) is the estimated posterior density, ℘(⋅) is a Gaussian distribution kernel function, \( {\overline{\mathbf{r}}}_i \) and l_{i} are mean vectors of the kernel functions, diagonal matrices Σ_{r} and Σ_{l} are the related covariance matrices, respectively, N is the number of calibration points, and d is the number of APs used in RSS vector. As suggested by Silverman [31], we set Σ_{r} = σ^{∗}I_{d} and give the related parameter as follows:
where I_{d} is d × d identity matrix, \( \tilde{\sigma}=1/d{\sum}_{i=1}^d{\sigma}_i^2 \) is the averaged marginal variances of RSS values for each AP. For the parameter Σ_{l}, it represents the user walking velocity and is set according to the user walking velocity values.
The posterior density distribution can be regarded as a Gaussian mixture of ℘(l; l_{i}, Σ_{l}), i = 1, … , N with weights \( {\tilde{w}}_i\left(\mathbf{r}\right) \). As a result, the MMSE location estimation and its covariance are determined by the first two moments [32], which will be used as the measurement model of the second UKF.
Besides, we specify a trusted area to limit the WiFi fingerprinting localization into a subregion instead of the whole radio map. For KDEbased WiFi localization, the location is estimated by weighting calibration points prestored in the radio map, whose calculations may incur extensive computation cost. Therefore, we limit the involved calibration points into a trusted area,
where S_{current} is the fingerprints set used in WiFi localization of current walking step, \( {\widehat{\mathbf{L}}}_{\mathrm{previous}} \) is the location estimation result of previous walking step, and D_{Th} is the radius determined by location estimation covariance. Therefore, the defined trusted area decreases the computation cost significantly by decreasing the number of calibration points involved in WiFi localization.
Second UKF: integrating PDR with WiFi localization
Firstly, we establish the state model for the second UKF by substituting Eq. (31) into Eq. (4):
where \( \overset{\frown }{f}\left(\cdot \right) \) is the displacement function of \( {\mathbf{qd}}_i={\left[\mathbf{q}{(t1)}^T\kern0.5em {SL}_i\right]}^T \), q(t1) is the quaternion vector estimated by the first UKF at a specific time t1 of the ith step, f(q(t1)) is nonlinear function as seen in (30), and \( {\psi}_{\mathrm{RMPCA}}^i \) is the initial heading estimation of the RMPCA approach of the ith step.
Secondly, compute the a priori state estimation \( {\mathbf{L}}_i^{} \) and related error covariance \( {\mathbf{P}}_i^{} \),
where \( {\widehat{\mathbf{L}}}_{i1} \) and P_{i − 1} are the posteriori location estimation and error covariance matrix at the i − 1 th step, respectively, \( \mathbf{P}\left(\overset{\frown }{f}\left({\mathbf{qd}}_i\right)\right) \) is the covariance of input variable qd_{i} after function \( \overset{\frown }{f}\left(\cdot \right) \), \( \mathrm{mean}\left(\overset{\frown }{f}\left({\mathbf{qd}}_i\right)\right) \) is the mean of input variable qd_{i} after function \( \overset{\frown }{f}\left(\cdot \right) \), and related covariance matrix of qd_{i} is given as
where P_{q(t1)} is the posteriori error covariance matrix of q(t1) estimated by the first UKF, and \( {\sigma}_{\mathrm{SL}}^2 \) is the walking step length estimation covariance. Similar to Section 5.2.2, \( \mathrm{mean}\left(\overset{\frown }{f}\left({\mathbf{qd}}_i\right)\right) \) and \( \mathbf{P}\left(\overset{\frown }{f}\left({\mathbf{qd}}_i\right)\right) \) are also calculated by unscented transformation using input variable (qd_{i}, P_{q(t1)}).
Thirdly, we deploy KDEbased WiFi localization to construct the measurement model:
where \( {\mathbf{L}}_i^{\mathbf{r}} \) is the WiFi localization result using RSS vector r^{i _ step} collected at the ith step.
where \( {\tilde{\mathbf{R}}}_i^{\mathbf{r}} \) is the measurement noise covariance matrix, \( \left({\overline{\mathbf{r}}}_i,{\mathbf{l}}_i\right)\in {S}_{i\_\mathrm{step}} \) are the fingerprints included in the trusted area derived from (37) at the ith step, N_{i _ step} is the number of calibration points involved.
Finally, the a posteriori location estimation at the ith step \( {\widehat{\mathbf{L}}}_i \) and related covariance matrix P_{i} can be presented as follows:
The ultimate location estimation of the second UKF and the estimation error covariance are given by Eqs. (46, 47), respectively.
Results and discussion
Experimental setup
Experiments were carried in a realistic indoor office environment including one hall, one long corridor and three rooms, whose total size are 43.5 m × 11.2 m, as shown in Fig. 2. We deploy a smartphone collecting RSS and inertial sensor data, respectively. For WiFi localization, we establish the radio map by gathering 100 RSS vector samples at each calibration point from all eight APs, which are approximately uniformly placed. The calibration points also distribute approximately uniformly, with the neighboring distance along the direction of corridor about 1 m. For PDR, the participant walked along the path indicated by the blue solid line, with one of the four investigated carrying positions and at least ten times for each position. The initial position and user heading of each experimental run are known, and the related inertial sensors are already well calibrated [33].
We compare the proposed integrated localization approach with individual PDR and WiFi localization approaches. To validate the effectiveness of device tracking model and the KDE model, we also compare the UKF, EKF, and KFbased integrated approaches whose related process and measurement noise covariance matrices are set empirically, while the other modules remain unchanged. The process and measurement noise covariance matrices for the empirical localization approaches are set as two constant ones, which make the approaches perform best along testing path. Experiments for each walking path are implemented independently, and the localization results are obtained from the total 40 tests of four carrying positions. We define the localization error as the Euclidean distance between estimated twodimensional location vectors and the true ones. We define the localization accuracy as the total probability of localization error within a certain value, which is also called cumulative error distribution.
Localization accuracy performance analysis
Firstly, we compare user heading estimation accuracy of uDirect approach, RMPCA using EKF for attitude tracking, and the proposed UKF for attitude tracking, respectively. As shown in Fig. 3, RMPCAbased approaches perform much better than that of uDirect approach. The former approaches exploit all accelerations in the horizontal plane for walking direction extraction, rather than the latter approach relies one acceleration sample in a specific region, which is easily to be disturbed. For RMPCA (UKF) approach, the device attitude and related rotation matrix is obtained by deploying UKF, which may better adapt the nonlinearity of measurement model. As a result, it may further increase heading estimation accuracy. In particular, probability of absolute heading estimation error within 15° for RMPCA (UKF) is 89.7%, while those of RMPCA (EKF) and uDirect are 83.8% and 58.4%, respectively. Similarly, as seen in Fig. 4, compared with uDirect approach, RMPCA (UKF) and RMPCA (EKF) approaches reduce the mean absolute estimation error by 44.6% and 53.2%, respectively.
Secondly, we compare localization accuracy between the proposed UKFbased integrated localization approach and the other approaches, as seen in Fig. 5. The proposed approach performs much better than the other compared approaches. In particular, accuracy within 1 m of the proposed approach is 74.8%, while those of UKF (empirical), EKF (empirical), KF (empirical), PDR, and WiFi localization are 55.4%, 51.8%, 48.4%, 32.4%, and 21.2%, respectively. Table 2 also validates the localization error reduction of the proposed approach. Compared with UKF (empirical), EKF (empirical), KF (empirical), PDR, and WiFi localization approaches, the proposed approach reduces mean localization errors by 24.8% (0.25 m), 30.3% (0.33 m), 36.1% (0.43 m), 58.5% (1.07 m), and 66.4% (1.50 m), respectively.
Compared with the individual approaches including PDR and WiFi localization, all the integrated localization approaches may obtain significant accuracy improvement. This is because the integrated localization approach may exploit the complementary advantages of PDR and WiFi localization. For example, though individual WiFi localization obtains worse accuracy performance than PDR during a short duration, its localization error does not accumulate with walking path. Therefore, WiFi localization results may be used to correct the accumulated tracking error of PDR.
Compared with the other integrated approaches, the proposed UKFbased integrated localization approach obtains significant accuracy performance improvement. This can be contributed to three reasons. Firstly, UKF may better adapt the nonlinearity of PDR model than EKF and KFbased integrated approaches. This can also be seen from the accuracy improvement of UKF (empirical) than EKF (empirical) and KF (empirical) approaches. Secondly, for measurement noise statistics of WiFi localization, instead of setting them empirically, we deploy the KDEbased model to accurately measure them. Therefore, during integration process, false cases such as WiFi localization results of a larger error being given a larger weight may be avoided effectively. Finally, to measure the process noise statistics of PDR model accurately, we construct the relationship between quaternion vector and user heading estimation and develop a continuous device attitude tracking model based on another UKF. Compared with previous EKFbased device attitude tracking method, the user heading estimation improvement using another UKF is also obtained.
Conclusions
In this paper, we propose an UKFbased WiFi/PDRintegrated localization approach. For WiFi localization, we deploy a KDEbased model to measure the measurement noise covariance adaptively rather than set them empirically. For PDR, we deploy another UKF model for device attitude tracking by integrating inertial sensors with magnetometers and construct relationship between quaternion vector and user heading. As a result, an improved user heading estimation is obtained. Furthermore, the covariance of user heading estimation can also be accurately measured and used for PDR in the UKF. Besides, the proposed device carrying position classifier using orientation invariant features may achieve significant recognition accuracy improvement than those using normal features, when the device orientation is unconstrained. Experiments show that compared with the integrated localization approaches empirically setting process and measurement noise parameters based on UKF, EKF, and KF, respectively, individual approaches including WiFi localization and PDR, the proposed localization approach decreases mean localization error by 24.8% (0.25 m), 30.3% (0.33 m), 36.1% (0.43 m), 58.5% (1.07 m), and 66.4% (1.50 m), respectively.
Abbreviations
 AP:

Access points
 DCS:

Device coordinate system
 GCS:

Global coordinate system
 KDE:

Kernel density estimation
 KF:

Kalman filter
 PCA:

Principal component analysis
 PDR:

Pedestrian dead reckoning
 RMPCA:

Rotation matrix and principal component analysis
 UKF:

Unscented Kalman filter
 UT:

Unscented transformation
References
 1.
Y. Sun, W. Meng, C. Li, N. Zhao, K. Zhao, N. Zhang, Human localization using multisource heterogeneous data in indoor environments. IEEE Access. 5, 812–822 (2017)
 2.
Z. Na, Y. Wang, X. Li, J. Xia, X. Liu, M. Xiong, W. Lu, Subcarrier allocation based simultaneous wireless information and power transfer algorithm in 5G cooperative OFDM communication systems. Physical Communication 29, 164–170 (2018)
 3.
Z. Na, J. Lv, F. Jiang, M. Xiong, N. Zhao, Joint subcarrier and subsymbol allocation based simultaneous wireless information and power transfer for multiuser GFDM in IoT. IEEE Internet Things J. (2018). https://doi.org/10.1109/JIOT.2018.2865248
 4.
Y. Li, Y. Zhuang, H. Lan, Q. Zhou, X. Niu, N. ElSheimy, A hybrid WiFi/magnetic matching/PDR approach for indoor navigation with smartphone sensors. IEEE Commun. Lett. 20, 169–172 (2016)
 5.
M. Zhou, F. Qiu, K. Xu, Z. Tian, H. Wu, Error bound analysis of indoor WiFi location fingerprint based positioning for intelligent access point optimization via Fisher information. Comput. Commun. 86, 57–74 (2016)
 6.
W. Kang, Y. Han, SmartPDR: smartphonebased pedestrian dead reckoning for indoor localization. IEEE Sensors J. 15, 2906–2916 (2015)
 7.
F. Evennou, F. Marx, Advanced integration of WiFi and inertial navigation systems for indoor mobile positioning. EURASIP J. Appl. Signal Processing. 2006, 1–11 (2006)
 8.
N. Zhu, H. Zhao, W. Feng, Z. Wang, A novel particle filter approach for indoor positioning by fusing WiFi and inertial sensors. Chinese J. Aeronaut. 28, 1725–1734 (2015)
 9.
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)
 10.
R. Zhou, X.Z. Yuan, Y.M. Huang, WiFiPDR fused indoor positioning based on Kalman filtering. Dianzi Keji Daxue Xuebao/Journal Univ Electron. Sci. Technol. China. 45 (2016) 399–404
 11.
X. Li, J. Wang, C. Liu, L. Zhang, Z. Li, Integrated WiFi/PDR/smartphone using an adaptive system noise extended Kalman filter algorithm for indoor localization. ISPRS Int. J. GeoInformation. 5, 8 (2016)
 12.
A. Correa, D.E. Munoz, A.D. Bousdar, A. Morell, V.J. Lopez, Advanced pedestrian positioning system to smartphones and smartwatches. Sensors 16, 1903 (2016)
 13.
G. Chen, X. Meng, Y. Wang, Y. Zhang, P. Tian, H. Yang, Integrated WiFi/PDR/smartphone using an unscented Kalman filter algorithm for 3D indoor localization. Sensors 15, 24595–24614 (2015)
 14.
J. Wang, A. Hu, X. Li, Y. Wang, An improved PDR/magnetometer/floor map integration algorithm for ubiquitous positioning using the adaptive unscented Kalman filter. ISPRS Int. J. GeoInformation. 4, 2638–2659 (2015)
 15.
Y. Zhuang, N. ElSheimy, Tightlycoupled integration of WiFi and MEMS Sensors on handheld devices for indoor pedestrian navigation. IEEE Sensors J. 16, 224–234 (2016)
 16.
Z.A. Deng, Y. Hu, J. Yu, Z. Na, Extended Kalman filter for real time indoor localization by fusing WiFi and smartphone inertial sensors. Micromachines. 6, 523–543 (2015)
 17.
L. Ma, Y. Xu, Received signal strength recovery in a green WLAN indoor positioning system using singular value thresholding. Sensors 15, 1292–1311 (2015)
 18.
H. Wang, H. Lenz, A. Szabo, J. Bamberger, U.D. Hanebeck, WLANbased pedestrian tracking using particle filters and lowcost MEMS sensors, positioning, navigation and communication. 4th Work. 2007, 1–7 (2007)
 19.
S.A. Hoseinitabatabaei, A. Gluhak, R. Tafazolli, W. Headley, Design, realization, and evaluation of uDirectan approach for pervasive observation of user facing direction on mobile phones. IEEE Trans. Mob. Comput. 13, 1981–1994 (2014)
 20.
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)
 21.
K. Kunze, P. Lukowicz, K. Partridge, B. Begole, in Proc.  Int. Symp. Wearable Computer. ISWC. Which way am I facing: inferring horizontal device orientation from an accelerometer signal (2009), pp. 149–150
 22.
A. Kushki, K.N. Plataniotis, A.N. Venetsanopoulos, Kernelbased positioning in wireless local area networks. IEEE Trans. Mob. Comput. 6, 689–705 (2007)
 23.
M. Kourogi, T.B.T.P. Kurata Location and Navigation Symposium  PLANS 2014, 2014 IEEE/ION, A method of pedestrian dead reckoning for smartphones using frequency domain analysis on patterns of acceleration and angular velocity, in: 2014: Pp. 164–168
 24.
Q. Tian, Z. Salcic, I.K. Wang, Y. Pan, A multimode dead reckoning system for pedestrian tracking using smartphones. IEEE Sensors J. 16, 2079–2093 (2016)
 25.
M. Shoaib, S. Bosch, O. Durmaz Incel, H. Scholten, P.J.M. Havinga, Fusion of smartphone motion sensors for physical activity recognition. Sensors (Switzerland) 14, 10146–10176 (2014)
 26.
Z.A. Deng, G. Wang, Y. Hu, Y. Cui, Carrying position independent user heading estimation for indoor pedestrian navigation with smartphones. Sensors (Switzerland) 16 (2016)
 27.
F. Li, C. Zhao, G. Ding, J. Gong, C. Liu, F. Zhao, A reliable and accurate indoor localization method using phone inertial sensors. ACM Conf. Ubiquitous Comput., 421–430 (2012)
 28.
J. Jahn, U. Batzer, J. Seitz, L. PatinoStudencka, J.G. Boronat, Comparison and evaluation of acceleration based step length estimators for handheld devices, in: 2010 Int. Conf. Indoor Position. Indoor Navig. IPIN 2010  Conf. Proc., 2010
 29.
A.M. Sabatini, Quaternionbased extended Kalman filter for determining orientation by inertial and magnetic sensing. IEEE Trans. Biomed. Eng. 53, 1346–1356 (2006)
 30.
Z.A. Deng, W. Si, Z. Qu, X. Liu, Z. Na, Heading estimation fusing inertial sensors and landmarks for indoor navigation using a smartphone in the pocket. Eurasip Journal on Wireless Communications & Networking 2017(1), 160 (2017)
 31.
B. Silverman, Density estimation for statistics and data analysis, Chapman Hall, vol 37 (1986). https://doi.org/10.2307/2347507
 32.
Y. BarShalom, X.R. Li, T.B.T.E. Kirubarajan, Estimation with applications to tracking and navigation (2001)
 33.
R. Williamson, B.J. Andrews, Detecting absolute human knee angle and angular velocity using accelerometers and rate gyroscopes. Med. Biol. Eng. Comput. 39, 294–302 (2001)
Acknowledgements
This research is supported by National Natural Science Foundation of China (Granted Nos. 61301131, 61601221, and 61301132).
Author contributions
JY and ZN proposed the original idea and developed the proposed indoor localization approach. JY wrote the paper. XL developed the user heading estimation algorithm. ZD analyzed the data and revised the paper. All authors read and approved the final manuscript.
Availability of data and materials
The datasets used and analyzed during the current study are available from the corresponding author on reasonable request.
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.
About this article
Cite this article
Yu, J., Na, Z., Liu, X. et al. WiFi/PDRintegrated indoor localization using unconstrained smartphones. J Wireless Com Network 2019, 41 (2019) doi:10.1186/s1363801913659
Received
Accepted
Published
DOI
Keywords
 Indoor localization
 WiFi
 Pedestrian dead reckoning
 Unscented Kalman filter