A Switched Approach for Smartphone-Based Pedestrian Navigation

In this paper, we propose a novel switched approach to perform smartphone-based pedestrian navigation tasks even in scenarios where GNSS signals are unavailable. Specifically, when GNSS signals are available, the proposed approach estimates both the position and the average bias affecting the measurements from the accelerometers. This average bias is then utilized to denoise the accelerometer data when GNSS signals are unavailable. We test the effectiveness of denoising the acceleration measurements through the estimated average bias by a synthetic example. The effectiveness of the proposed approach is then validated through a real experiment which is conducted along a pre-planned 150 m path.

In such situations, IMU-based pedestrian navigation systems are unique devices that can provide information about the pedestrian position by means of strapdown integration algorithms (SAs) [39][40][41].However, the error in estimating the pedestrian position using only IMU signals tends to increase over time primarily due to biases in accelerometers which manifest as constant offsets.Even small biases, combined with small sensor measurement noises from the accelerometers, accumulate over time during integration operations, leading to severe errors in velocity and position estimates.Numerous studies have been conducted to address this issue in IMUs.One well-known solution to this problem is the pedestrian dead reckoning (PDR) method [4,[42][43][44].The latter exploits the zero-velocity updating (ZUPT) technique [16,[45][46][47][48], which leverages the observation that foot speed should be zero when the foot is in contact with the ground during walking.This approach helps to mitigate errors that occur due to the bias in the measurements of the accelerations.However, a limitation of ZUPT regards the strict requirements on sensor placement: the IMU should be placed on the feet of the pedestrian, i.e., an impractical solution with the sole use of the smartphone.Alternatively, one can use learning-based methods, such as human motion pattern recognition [49][50][51][52][53].The recent trade is to use artificial intelligence (AI)-based algorithms [54][55][56][57][58] to compensate for measurement outages, i.e., when the GPS signal is unreliable.Empirical studies show that AI-based algorithms can predict GPS pseudo increments through online learning.The main limitation of this second solution is that these methods are computationally expensive, and as a consequence, the execution of these algorithms on a smartphone causes a rapid discharge of the battery.
The aim of this paper is to propose a switched approach to perform smartphone-based pedestrian navigation tasks, even in scenarios where GNSS signals are unavailable, without using algorithms whose computational cost is expensive or requiring invasive sensors.The proposed approach computes the estimate of the pedestrian position in two different ways switching from one to the other depending on the availability of the GNSS signals.When the GNSS signals are available, the procedure estimates the pedestrian position and the bias affecting the measurements coming from the accelerometers by means of an adaptive Kalman filter.This bias is averaged over a time window in order to prevent occasional inaccurate estimates in some specific time steps.When the GNSS signals are unavailable, the accelerometer signals are denoised through the average bias previously estimated.Then, the pedestrian position is estimated using an adaptive Kalman filter.The experiments showed that the estimated average bias contains useful information that can be exploited when the GNSS is not available.Therefore, we envision that the estimated average bias could be incorporated in the PDR technology, which relies on acceleration measurements coming from the IMU device, in order to improve the so-called "PDR pedestrian step estimation" task.
The outline of this paper is as follows.In Section 2, we introduce the switched approach for smartphone-based pedestrian navigation tasks.In Section 3.1, we test, through a synthetic example, the validity of denoising the acceleration measurements through the estimated average bias.In Section 3.2, we validate the proposed approach through a real experiment which is conducted along a pre-planned 150 m path and show that in both a GNSS-free environment and GNSS-denied environment, the Root Mean Square Error of the estimated pedestrian position is always less than 1 m.Finally, in Section 4, we draw the conclusions.

The Proposed Approach
Consider a pedestrian having a smartphone equipped with both the exteroceptive sensor (GNSS) and the proprioceptive sensor (IMU), which comprises an accelerometer and a rate gyro.We aim to address the following 2D pedestrian navigation problem: m] denote the position of the pedestrian relative to the east-north-up coordinates system (ENU-system) at time k; given the available data at time k from the smartphone sensors (i.e., GNSS and IMU), we want to compute an estimate, say p k|k [m], of p k .
In the case where the GNSS signals are available, the accuracy of the estimate p k|k is generally satisfactory.However, in obstacle-dense environments, such as indoors, under dense tree cover, or in urban canyon, GNSS signals often degrade or disappear entirely, and the sole onboard IMU signals do not provide enough information to obtain a reliable estimate of the pedestrian position due to its cumulative error mainly caused by the constant bias affecting the accelerometers.As a consequence, the resulting estimate p k|k based solely on the IMU signals will not be accurate enough.
In what follows, we propose a switched approach to compute p k|k : the estimation is performed in two different ways depending on whether the GNSS signals are available or not.In the case where the GNSS signals are available (i.e., we perform navigation using GNSS signals), we exploit the GNSS and IMU data to estimate p k and the bias on accelerometers.In order to obtain a robust estimate of the bias, we compute its average over a time window of length N, and the latter is denoted by b [m/s 2 ].In the case where the GNSS signals are unavailable (i.e., we perform navigation without GNSS signals), the estimated average bias, computed when the GNSS signals were available, is used to denoise the signals obtained from the accelerometers.Using the "denoised" IMU data, we compute an accurate estimate of p k .The switched scheme we propose is illustrated in Figure 1.In what follows, we describe in detail the navigation tasks with and without navigation signals.In order to streamline the presentation of these two tasks, we assume that the time instant in which the switch happens is k = 1 for both the tasks.

Navigation Using GNSS Signals
The sensors available (i.e., able to provide information about the pedestrian position) in the smartphone are as follows: • An inertial measurement unit whose axes are aligned with the principal axes of the smartphone.The latter comprises two types of triaxial sensors that provide the measurements expressed in the local coordinate system (L-system): an accelerometer that measures the specific force a m,k ∈ R 3 [m/s 2 ], and a rate gyro that measures the angular velocity where T is the IMU sampling time, ϕ k [rad] is the roll angle, θ k is the pitch angle, and The dynamic of the pedestrian is described by the following inertial-aided model [59]: where s] are the position vector and the velocity vector at time k of the pedestrian in the ENU-system, and b k ∈ R 3 [m/s 2 ] is the vector bias on accelerometers in the L-system.Moreover, a G,k is the global acceleration in the ENU-system: where is the rotation matrix representing the orientation of the L-system with respect to the ENU-system: and g N is the constant gravity vector in the ENU-system.Finally, ε k ∈ R 7 is white Gaussian noise with unknown mean q k and unknown covariance matrix Q k .It is not difficult to see that the dynamic model ( 1) can be expressed as follows: where and The measurement model is defined as follows: where 4 is the white Gaussian noise with unknown mean r k and unknown covariance matrix R k .Then, at time k, an estimate of the position of the pedestrian in the ENU-system, i.e., p k , and the vector bias b k on the accelerometers in the L-system can be obtained from the state estimate x k|k of x k of the state space model ( 4)- (7).However, there is a main issue to address, that is, q k , r k and Q k , R k are unknown.This latter is addressed by using the adaptive Kalman filter [60][61][62][63] which computes both x k|k and the parameters characterizing the noise processes.The resulting algorithm at time k = 1, 2, . . . is the following: 1.
Measurement noise parameter update: where e k is the innovation, and is the forgetting factor.4.
Update step: Process noise parameters update: Compute

7.
Compute the average value of the bias vector over a window of length It is worth noting that the estimate of the average bias is b, i.e., the one computed in Step 7.This averaging is performed in order to prevent occasional inaccurate estimates in some specific time steps.Notice that, for the transient steps, i.e., k such that 1 Remark 1.It is worth noting that the performance of the adaptive Kalman filter depends on how accurate the state space model ( 4)-( 7) is.In the case where the latter is not so accurate, e.g., when the sampling time T is not sufficiently small or the estimated covariance matrices are not so accurate, one could design an adaptive robust Kalman filter on the basis of the recent literature about robust Kalman filtering [64][65][66][67].These approaches postulate that the actual model belongs to an ambiguity set which is a ball about the nominal model (i.e., ( 4)-( 7)) in the topology induced by the Kulback-Leibler divergence.Its radius depends on the degree of accuracy of the nominal model.Moreover, these filters can also be generalized to ambiguity sets which are balls defined using more general topologies, see [68,69].The appealing feature of these robust filters is that they exhibit convergence properties in the case of constant parameters [70-72], and they can be efficiently implemented since they have the same structure of the Kalman filter [73,74].

Navigation without GNSS Signals
In this scenario, the GNSS signals are unavailable, and the only source of information comes from the onboard IMU.However, the error in the estimation of the pedestrian position using only the IMU signals tends to increase over time.This error is due to the so-called integration drift, i.e., the error generated by the double integration of a m,k : Even small errors or biases in the measurements accumulate over time during integration, leading to increasing errors in velocity and position estimates.It is worth noting that the drift integration can be avoided by means of the pedestrian dead reckoning (PDR) technology [4].However, the latter needs to estimate the number of steps during the walking of the pedestrian.Such information requires the use of computationally expensive algorithms or invasive sensors (e.g., put some sensors on the feet of the pedestrian).
In order to overcome the aforementioned limitations we address the issue regarding the integration drift using the average estimated bias in the L-system computed when the GNSS signals were available, i.e., b.More precisely, we define the denoised measurement: Then, we consider the state space model (called "current" statistical model; see, [75,76]): where where we recall that T is the IMU sampling time, α k > 0 is a diagonal matrix of dimension 3, and it represents a parameter whose value will be discussed later; η k ∈ R 9 is white Gaussian noise with zero mean and covariance matrix where and Λ k > 0 is a diagonal parameter matrix of dimension 3 whose value will be discussed later; ϵ k ∈ R 3 is white Gaussian noise with unknown mean r k and unknown covariance matrix R k ; āk is the average value of the maneuvering acceleration over a window of length and a i|i is the estimate of a i at time i.Notice that, in the transient initial steps, i.e., for k such that 1 < k < N, we have āk = 1 k ∑ k−1 i=0 a i|i .The aim of the state space model (19) and ( 20) is to provide an estimate x k|k = [ s ⊤ k|k ν ⊤ k|k a ⊤ k|k ] ⊤ of x k such that the estimate of the displacement s k|k is accurate.The latter will be accurate if the estimate a k|k of a k is accurate.From (19), it is not difficult to see that a k+1|k+1 is computed according to the following a priori information about the evolution of a k : that is, the accelerations are a convex combination of their previous value and their average value (on a window of length N).The parameter matrix α k > 0 tunes the influence of a k and āk on a k+1 : if the pedestrian displacement changes slowly over time, then, the diagonal elements of α k should be taken as very large.Notice that Λ k tunes how much the prior in (24) should influence the estimate of the accelerations.The choice of the parameters α k−1 and Λ k−1 can be computed by means of the Yule-Walker algorithm, see [76,77] for more details, or in general, a spectral estimation method which estimates an autoregressive process of order one through a moment matching approach [78][79][80][81].Here, the moments are the covariance lags of order zero and one obtained from the time series { a i|i , i = k − N . . .k − 1 }.Then, we can use the adaptive Kalman filter [76] to compute x k|k and the parameters characterizing the noise process ϵ k .
Once s k|k = [ s X,k|k s Y,k|k s Z,k|k ] ⊤ is computed, then, the estimate p k|k = [ p N,k|k p E,k|k ] ⊤ of p k can be computed from s k|k , p k−1|k−1 and w m,k (angular velocity measured from the IMU unit) as follows: where In plain words, the estimate of the pedestrian position is obtained updating the previous one: the distance covered is obtained by s k|k while the direction by the yaw angle ψ k , [82].The process of this trajectory generation is illustrated in Figure 2. The resulting algorithm at time k = 1, 2, . . . is the following: 1.
Available information:

2.
Compute the average value of the maneuvering acceleration āk as in (23) where a i|i is obtained from x i|i .
Compute r k and R k as in ( 10)-( 12) where C is substituted by H.

6.
Compute x k|k and P k|k as in ( 13)- (15) where C is substituted by H.
It is worth noticing that the initial condition p 0|0 is obtained by the last estimate of the pedestrian position obtained in the previous navigation task (i.e., the one in Section 2.1).

Experiments
In this section, we verify the effectiveness and feasibility of the proposed switched approach through both synthetic and real experiments.

Synthetic Experiment
We firstly analyze the impact of the bias and noise affecting acceleration measurements on the accuracy of pedestrian position estimation.Moreover, we also verify the validity of denoising the acceleration measurements through the estimated average bias (as the method proposed in Section 2 does).
We generate the IMU and GNSS measurements as follows.For simplicity, we only consider the case where the acceleration is different from 0 only on the Y-axis, i.e., it is equal to 0 on the other two axes.We generate the one-dimensional reference acceleration in the L-system as in Figure 3 (red line); the corresponding sampling time is T = 0.01 s.This reference describes a situation in which the pedestrian starts to run and then stops.In order to verify the goodness of the estimated average bias on the position estimation, we consider the idealistic setup where the gyro measurements are generated following a Gaussian distribution with zero mean and a small covariance matrix 0.01I 3 .Then, we generate the corresponding positions in the ENU-system.The GNSS signals are obtained by corrupting the positions in the ENU-system adding white Gaussian noise with zero mean and covariance matrix 0.005I 2 .Since the primary error source in the accelerometer-based pedestrian position estimation is the bias in the form of constant offset and random noise, we generate the corresponding measured acceleration as shown by the blue line in Figure 3, which is generated as the sum of white noise (Gaussian with zero mean and variance equal to 1), the reference acceleration (red line in Figure 3), and a bias (set as 1).We consider the case where the GNSS signals are available.Thus, we apply the procedure in Section 2.1 to estimate the average bias b.Here, the forgetting factor is set as ρ = 0.1 and N = 100.The initial condition are set as follows: As shown in Figure 4, the estimated average bias converges to its true value, i.e., 1.Moreover, to further prove its effectiveness, we also set different reference values of bias, i.e., 0 and 2. Figure 5 shows that the average bias can be estimated in a satisfactory way in these cases also.To further assess the accuracy of the estimated average bias, we use the procedure in Section 2.2, i.e., the one in the case where the GNSS signals are not available, using the IMU signals of before and the bias estimated before (the case in which the true bias is equal to 1).The forgetting factor is set as ρ = 0.1, N = 100 and the initial conditions as Moreover, we set p 0|0 = [ 0 0 ] ⊤ .Figure 6 shows that the estimated acceleration on the Y-axis.We notice that the estimate is very accurate.Figure 7 shows the displacement along the Y-axis in the case where the average bias is removed (i.e., our procedure), green line, and not removed, blue line.We observe that our estimate is very accurate.Conversely, if we neglect the influence of the average bias in accelerometer measurements and directly apply the raw acceleration, then, the resulting deviation is significant.

Real Experiment
An outdoor pedestrian navigation experiment was conducted using a smartphone named Huawei Mate 50 (where its axis orientation is illustrated in Figure 8a).The smartphone was held as in Figure 8a and kept as steady as possible by a pedestrian who followed a pre-planned path of approximately 150 m, depicted in Figure 8b.The longitude and latitude of this pre-planned path were sourced from Google Maps.These coordinates were then converted to the ENU coordinate system, represented by the red line in Figure 8c.Moreover, the GNSS raw measurements, i.e., the longitude and latitude of the pedestrian, were collected by the GNSS receiver in the smartphone (Huawei Mate 50) using "MATLAB Mobile".These coordinates were also converted to the ENU coordinate system, represented by the blue points in Figure 8c, where lost segments are marked using a different line color and style.Hereafter, we shall call these GNSS measurements in the ENU coordinate system as GNSS measurements.Note that, the sampling time of GNSS (T GNSS = 1 s) is much larger than that of IMU (T = 0.01 s).Therefore, we apply the causal zero-order hold interpolation to align the GNSS signals with IMU signals.We estimate the position of the pedestrian using the switched approach of Section 2, leveraging GNSS and IMU signals from the smartphone.Here, the initial conditions as well as the parameters, i.e., ρ and N, are set as in Section 3.1.It is worth noticing that the yaw is provided by the IMU, and it is always available.We have found that the raw measurements of the gyro are of reasonable quality under our instrument setups: we only performed a simple online denoising operation (i.e., a low pass causal filtering operation) on these raw measurements.In the first phase, the GNSS signals are available, and thus, the navigation procedure with GNSS signals of Section 2.1 is applied.Figure 9 shows the estimated average bias b during this phase.At the end of this phase, we have b = [2.034,1.579, −0.439] ⊤ .This is the average bias used in the second phase in which the GNSS signals are not available (it corresponds to the first lost trajectory, see Figure 8c), and thus, the navigation procedure without GNSS signals of Section 2.2 is applied.In the third phase, the GNSS signals are available (it corresponds to the red segment between the first and second lost trajectory, see Figure 8c), and thus, the procedure of Section 2.1 is applied; at the end of this phase, we have b = [2.129,1.378, −0.427] ⊤ .This is the average bias used in the fourth phase in which the GNSS signals are not available (it corresponds to the second lost trajectory, see Figure 8c), and the navigation procedure of Section 2.2 is used.Finally, in the last phase, the GNSS signals are available, and thus, we apply the procedure of Section 2.1.Note that the initial condition p 0|0 used in the second phase and the fourth phase are given by the final estimates of the state provided in the first phase and the third phase.Figure 10 shows the estimated pedestrian position during the first and second time when the GNSS signals are lost (it corresponds to the first and second lost trajectory in Figure 8c, respectively).We can see such an estimate is very accurate even though the GNSS data are not available.As a sanity check, we also estimate the pedestrian position using the IMU signals without b, and the resulting estimate is highly inaccurate due to cumulative errors.The overall pedestrian position estimates obtained by our method are shown in Figure 11.We see that the accuracy achieved by the proposed algorithm is very good.Finally, Table 1 compares the Root Mean Square Error (RMSE) of the two lost trajectories and the whole trajectory; as we can see, the RMSE is always less than 1 m.
1. for the pedestrian position estimation along the east north directions and in the two-dimensional space.

East
North 2D

Conclusions
In this paper, we presented a switched scheme to perform a smartphone-based pedestrian navigation task.The proposed approach estimates in real time the position of the pedestrian also in the case where the GNSS signals are unavailable.More precisely, when GNSS signals are available, the proposed approach estimates both the position and (the average value of) the bias affecting the measurements coming from the accelerometers.This estimated average bias is used to denoise the accelerometer data when the GNSS signals are not available.Unlike the PDR technology, our approach does not require the use of computationally expensive algorithms or invasive sensors, and thus, it can be easily embedded in a smartphone device.Synthetic and real experiments demonstrate the

Figure 1 .
Figure 1.The switched approach for pedestrian navigation.

Figure 2 .
Figure 2. Trajectory generation using the distance covered d k and the yaw angle ψ k .

Figure 3 .
Figure 3. Reference acceleration (red line) and the corresponding measured signal (blue line).

Figure 4 .Figure 5 .
Figure 4.Estimated average bias when its true value is 1.

Figure 8 .
Figure 8. Description of the experiment.(a) Axis orientation of the smartphone.(b) The pre-planned path.Dashed style means that the pedestrian is walking on an underpass.(c) The reference trajectory and GNSS measurements in the ENU-system.The pedestrian started at the black circle, moving clockwise, following the red path.

Figure 9 .
Figure 9.Estimated vector bias b in the L-system (first phase).

Figure 10 .Figure 11 .
Figure 10.Position estimation in the ENU-system in the GNSS-denied environment.(a) Estimated position in the first GNSS-denied trajectory.(b) Estimated position in the second GNSS-denied trajectory.