## Abstract

Pedestrian navigation with handheld sensors is still particularly complex. Pedestrian Dead Reckoning method is generally used, but the estimation of the walking direction remains problematic because the device’s pointing direction does not always correspond to the walking direction. To overcome this difficulty, it is possible to use gait modeling based approaches. But, these methods suffer from sporadic erroneous estimates and their accumulation over time. The HEAD (smootH Estimation of wAlking Direction) filter uses WAISS and MAGYQ angular estimates as observations to correct the walking direction and to obtain more robust and smooth results. TDCP updates are applied to constrain the walking direction estimation error while pseudo-ranges directly update the position. HEAD is tested by 5 subjects over 21 indoor/outdoor acquisitions (between 720 m and 1.3 km). A 54% improvement is achieved thanks to the fusion in texting mode. The median obtained angular error is 5.5° in texting mode and 12° in pocket mode.

## 1 INTRODUCTION

Pedestrian navigation using smartphone type sensors is a particularly active area of research. Indeed, while the use of GNSS (Global Navigation Satellite System) is very effective in the case of vehicle tracking and in a favorable environment, the location of pedestrians remains problematic. Several constraints explain these difficulties. The environment in which pedestrians operate, first of all, is complex and mainly indoor (Klepeis, Nelson, Ott Wayne, & Robinson, 2001). Under these conditions, GNSS signals are too degraded to be used. In addition, the random and complex behavior of pedestrians requires a high localization accuracy (ideally in the order of 1 m) and limits the use of the map-matching methods generally applied to road tracings. The use of inertial and magnetic sensors makes it possible to avoid the use of GNSS signals. These sensors have the advantage of being present in smart objects and do not require any external infrastructure such as BLE (Bluetooth Low Energy) or Wi-Fi technologies for example (Yassin et al., 2017). However, their use leads to new difficulties related to the accumulation of errors of low-cost sensors and the use of handheld sensors. Indeed, the main method for localization with a handheld sensor is the PDR (Pedestrian Dead Reckoning) method (Deepak, 2017), which consists in estimating each successive position from the previous one by projecting a displacement vector using two elements: the step length and the walking direction. In the case of a handheld sensor, this walking direction does not always correspond to the orientation of the sensor and is difficult to estimate. Existing methods are either extracting the main component of accelerations assuming this is correlated with the walking direction or modeling the human gait at step frequency. These two approaches are interesting but fail to address the intraindividual variations occurring when the way of holding the sensor in hand changes or due to physiological (e.g., fatigue) or environmental (e.g., nature of the ground surface) changes.

This paper proposes an innovative method for estimating the walking direction using a Kalman filter. For this purpose, the estimates of the walking direction and the attitude of the device from the WAlking direction estimation based on Inertial Signal Statistics (WAISS) (Christophe & Valerie, 2017) and the Magnetic, Acceleration fields and GYroscope Quaternion (MAGYQ) (Valerie & Christophe, 2014) methods are used as observations in order to make corrections to the walking direction. The addition of the velocity in the state vector also allows TDCP (Time Differencied Carrier Phase) measurements to be used to correct the orientation. This article is an extended version of recent work from the authors (Perul & Renaudin, 2019). It comprises the detailed presentation of the filter design and the equations. It is also completed with a new Fault, Detection and Exclusion (FDE) approach for PDR positioning with a handheld device. The filter includes also the use of pseudo-range measurements. The method is also applied to a larger number of subjects and to a new sensor carrying mode.

The innovations of the paper are:

A hybridization filter of MAGYQ quaternion-based attitude estimation filter of a handheld device (Valerie & Christophe, 2014) with WAISS gait model-based walking direction estimation (Christophe & Valerie, 2017) for robust pedestrian dead reckoning estimation,

Processing of GNSS Time Difference Carrier Phase (TDCP) measurements in urban spaces for improving the walking direction estimation,

A novel fault, detection, and exclusion approach that discards distorted TDCP and distorted Between-Satellite Pseudo-range Difference (BSPD) measurements using aggregated filter innovations over a pedestrian’s step.

## 2 STATE OF THE ART

Classical attitude estimation filters cannot be used for PDR methods with handheld sensors because these methods require the device to be aligned with the walking direction, which is not the case in everyday life. To overcome this constraint, methods based on the observation of hand movement during walking have been studied. Indeed, the study of hand accelerations shows that the distribution of horizontal accelerations during the walking movement is related to the walking direction.

The Principal Component Analysis (PCA) is conducted on horizontal accelerations according to methods based on the main components analysis, which estimates that the strong oscillations visible in the horizontal plane are aligned with the walking direction. Consequently, the heading is determined by maximizing the signal energy in the horizontal plane. This method deteriorates because of the influence of high acceleration values; hence, it cannot be used if the lateral oscillations are too high. Zhi-An, Guofeng, Ying, and Di (2015) propose a new method based on the usage of a rotation matrix and PCA. It describes a calibration procedure that transforms the local walking direction into a global one without using strident magnetometer measurements. Another approach that breaks the analysis down in several steps is WalkCompass (Nirupam, He, & Romit, 2014). The area in which the sensor is held is identified by the human walk analysis (HWA). In order to extract the walking direction, the best fraction of the acceleration signal is selected by Local Direction Estimation (LDE). To convert this displacement vector into the horizontal plane, one uses the gyroscope measurements. Finally, this direction is compared to the magnetic North using magnetometer data. In this regard, magnetic disturbances coming from the environment are adjusted using an iterative magnetic triangulation method (IMT). This method shows satisfying results; however, these achievements strongly depend on several thresholds settled in diverse algorithms as well as it stays dependent on how the device is held in hand. In the FIS method based on Frequency analysis of Inertial Sensors, there are used cyclic gait models with frequency analysis in order to search for the walking direction. Its performance is connected to the quality of the walking frequency estimate as well as the legitimacy of the hypothesis declaring that oscillations at the walking frequency are maximum along the direction of displacement. Even though these methods are formed on the analysis of walking mechanisms, they do not take into consideration the user and the differences between individuals. Other methods are based on modeling individual gait signature.

If the assumption is made that the hand’s accelerations are cyclic over stride, a development of a temporal model using their main frequencies in the horizontal plane can be made. The Forward and Lateral Acceleration Modeling (FLAM) method (Kourogi & Kurata, 2014) represents a two-step process. The walking direction is estimated after the learning phase by maximizing the correlation between the model and the horizontal acceleration. However, the performance of this method is aggravated because of large hand variations and false detected steps. The main issue is raised from distinctions between a rather simple gait modeling and an actual human gait complexity. To capture this gait diversity, the Walking Direction Estimation Based on Inertial Signal Statistics (WAISS) (Christophe & Valerie, 2017) has been developed and considers every person as unique in the way they walk.

However, various problems due to the use of PDR methods based on the study of hand acceleration remain. The first is that the position is determined from the previous one at any time. As a result, the error tends to accumulate and increase over time. To overcome this problem, different technologies are generally coupled to the PDR method. In order to remain independent of the establishment of a particular infrastructure, GNSS data can be used. Indeed, in some situations (e.g., in open environments) the use of GNSS signals remains possible and allows the use of additional information. GNSS data can be used to perform absolute positioning updates to compensate for the accumulation of errors. However, the observations can also be used to correct the walking direction estimates. In Bojja et al. (2016), for example, GNSS is used to detect and reduce errors due to misalignment between the pedestrian walking direction and the device orientation. For this purpose, the heading from the GNSS positions data, coupled with the associated covariance information, is used. When a wrong estimate is detected, different possibilities are considered: changing the covariance associated with the operating heading, resetting the PDR filter, or using multiple hypotheses. In degraded environments, GNSS data are generally integrated using Doppler measurements, which are more accurate than pseudo-ranges in the pedestrian context. In Renaudin, He, and Petovello (2012), the impact of Doppler errors on PDR results is studied. Thus, even with noisy measurements, the use of Doppler measurement reduces the error of estimating the direction of travel and constrains the velocity vector. Recently, however, work has shown that the use of phase measurements by time difference can be more effective and provide a very accurate velocity estimate (Pierluigi, Antonio, Salvatore, & Salvatore, 2015). Thus, TDCP can be used to correct INS measurements and errors or in a PDR approach to correct walking direction estimation error but also the step-length error (Angrisano, Vultaggio, Gaglione, & Crocetto, 2019; Feng et al., 2019; Tao, Zhang, Zhu, Wang, & Teng, 2018).

Another problem with the use of the PDR method based on hand acceleration study is the presence of errors and miscalculations. These errors are difficult to identify and can lead to unnatural trajectories. One objective is, therefore, to succeed in smoothing these trajectories in order to obtain more realistic results. One possibility to avoid some miscalculation is the detection of specific situations. In Yotsuya et al. (2017), for example, a method for detecting half-turn stairs based on the study of the characteristics specific to this movement is proposed. In Shaikh, Salcic, and Wang (2018), a method of estimating the walking direction using dominant trend duration allows us to integrate a detection of backward movements. Indeed, the direction of motion is not sufficient, it is also necessary to know the sense of motion. Similarly, many multiple hypothesis filters are implemented to detect different situations and adapt the method. However, the fusion of methods and the use of detection of particular situations or multiple choices introduce a new problem: that of instantaneity. Indeed, most of these methods require a certain amount of time to be able to decide whether we are in a particular case and which method to implement. This delay also implies a step backward and an often unsmoothed correction. The problem of smoothing and instantaneity is therefore particularly important for the PDR method when merging different processes.

## 3 SMOOTH ESTIMATION OF WALKING DIRECTION (HEAD): MECHANIZATION

### 3.1 Algorithm overview

The Kalman filter is an estimation method that allows the consideration of new observations. The result is thus based both on an evolution model and on corrections made by new observations. Since some equations are not linear, an Extended Kalman Filter scheme is adopted. The architecture of the filter introduced in this work is visible on Figure 1. All parameters of the figure are defined in the article.

The state vector is composed of five elements:

the position

*P*(𝑋, 𝑌,*Z*),the velocity

*V*(*V*_{𝑋},*V*_{𝑌},*V*_{Z}),the step length

*S*,the walking direction

*θ*,the time difference of the receiver clock delay

*c*.Δ*dt*.

The pedometry module consisting of step-time detection and step-length estimation is not used in this study. Step times are estimated by studying the acceleration norm performed on the PERSY (PErsonal Reference SYstem), a foot-mounted sensor, used as reference during acquisitions (see Section 6.2). The step lengt his then deduced from the reference positions calculated at these times. Thus, the error due to step-length estimation is negligible, and only walking direction estimation performances are studied in this article. TDCP, BSPD (Between-Satellite Pseudo-range difference), and HAWE (Hybridization of MAGYQ and WAISS estimates) modules are detailed below. The HAWE module uses estimates from the WAISS and MAGYQ algorithms, detailed in Christophe and Valerie (2017) and Valerie and Christophe (2014), respectively.

### 3.2 Model and prediction

The position evolution model is based on PDR mechanization:

1

where *i* is the step instant.

Different velocity evolution models are adopted according to the case:

if a TDCP update has taken place at the previous instant, then the confidence in the velocity estimation is high and the velocity is maintained:

2

if no TDCP update has taken place at the previous time, then the confidence in the velocity estimation is low (because only TDCP adjust velocity) and it is preferred to evaluate it from the estimated position:

3

This process prevents the velocity from remaining constant during the indoor phase. Indeed, only TDCP updates affect velocity (4.4). In contrast, step length and time difference of the receiver clock delay are considered constant over time:

4

5

The walking direction is estimated from the velocity in order to be impacted by TDCP updates:

6

The state transition equations of the PDR mechanization are not linear. So the state vector is 𝑋^{′} = [*δP*, *δV*, *δθ*, *δc*.Δ*dt*]. The state transition model 𝐅 is obtained by first-order derivation of the transition Equations (1) to (6):

7

where *a* equals 1 or 1/Δ*t*. The covariance of the process noise *Q* is experimentally fixed. The derivation of *atan* function is approximated by one since the EKF is working on small perturbations of the state.

## 4 SMOOTH ESTIMATION OF WALKING DIRECTION (HEAD): UPDATES

### 4.1 Hybridization of MAGYQ and WAISS estimates (HAWE)

The HAWE module allows us to update the estimate of the walking direction at each step moment. To do this, it uses both the estimation of the walking direction from the WAISS algorithm and the estimation of the device orientation by the MAGYQ algorithm. WAISS gives a first innovation, corresponding to the difference between the walking direction estimated by the filter and that obtained by the WAISS algorithm:

8

where is the walking direction estimate at step time k and *θ*_{WAISS}(*k*) is the WAISS walking direction estimate at step time k.

This update allows us to use WAISS outputs as observations to update the filter. In practice, this means to use the estimate from WAISS in a smoothed way by associating a confidence to the estimation.

MAGYQ estimates the smart object’s pointing direction and not the walking direction. However, this estimate is more accurate than that of WAISS. Indeed, it comes from an extended Kalman filter made at a frequency of 200 Hz contrary to WAISS’s estimate made independently at each step moment. This results in a smoother and more coherent trajectory while the WAISS trajectory may be sawtooth due to incorrect estimates. However, an angular bias corresponding to the difference between the pointed direction and the walking direction remains. Figure 2 illustrates the difference between trajectories resulting from a PDR approach based on MAGYQ’s heading and WAISS’s walking direction. This is a complex trajectory carried out on three levels with three stairways. It can be seen that the trajectory from MAGYQ (cyan) is very similar to the reference trajectory (blue): the displacements are identical and the parallel sections and corridors are well respected, unlike the trajectory from WAISS (magenta). In addition, complex movements such as stairs are much better handled by the MAGYQ algorithm.

By studying the angular difference between two moments and not the value of the angle, the bias between MAGYQ heading estimation and true walking direction no longer occurs. Indeed, under steady conditions, the angular difference between two consecutive walking direction estimates and the corresponding two pointing direction estimates should be the same as long as the user does not change the way he/she holds the sensor (*hypothesis H1*). Under *H1*, it is possible to derive a second innovation in the filter:

9

where

Δ

*θ*_{MAGYQ}=*θ*_{MAGYQ}(*k*) −*θ*_{MAGYQ}(*k*− 1) with*θ*_{MAGYQ}(*k*) the MAGYQ heading estimation at step time k,Δ

*θ*=*θ*(*k*) −*θ*(*k*− 1) with*θ*(*k*) the walking direction estimate at step time k and*θ*(*k*− 1) the walking direction determination at step time k-1.

These two updates allow us to take into account WAISS’s estimate while guaranteeing the coherence of the trajectory by MAGYQ outputs. Globally, the occurrence of outliers is lower for MAGYQ than for WAISS method due to the use of a Kalman filter, taking into account the previous state at each estimate during the MAGYQ process. Therefore, it is necessary to detect outliers in WAISS observations while allowing strong updates when a big innovation is considered correct. This last problem is addressed using the variance matrix associated with the WAISS innovation. Variance is related to innovation: the larger the innovation, the lower the variance in order to allow large updates. Different cases are then taken into account in order to judge if the WAISS observation is correct. Indeed, no descriptor makes it possible to define the confidence associated with each estimate of the WAISS algorithm. A test is therefore carried out on the WAISS innovation, based on the following hypothesis: if a strong innovation from WAISS is correct, then the innovation from MAGYQ must be similar. Thus, when the value of the innovation is higher than a limit angular value, it is compared to the MAGYQ innovation. If the value of this difference is higher than a threshold, named Threshold 1, then priority is given to the MAGYQ innovation considered more reliable. The variance of each innovation is adapted accordingly.

However, it is also important to take into account possible errors resulting from the orientation determined by the MAGYQ algorithm. The main source of error is the H1 hypothesis. If this assumption is not respected, i.e., if the user changes the way he holds the device during the acquisition, the observation from MAGYQ will lead to a big innovation while the walking direction hasn’t changed. This situation is not taken into account in this study. However, it can be detected, allowing a certain delay: if the value of the difference between the WAISS and MAGYQ innovations exceeds Threshold 1 for three consecutive steps while remaining constant, it can be judged that the WAISS observation is correct and that the user has changed the way the device is held. The following WAISS innovation will therefore be accepted with a very low variance in order to give a high impact.

### 4.2 GPS measurements at step frequency

The GPS frequency is 5 Hz, which is generally higher than the step frequency at which this filter is performed. As a result, between each step moment, multiple GPS measurements (generally from one to four) may be available from the same satellite. Thus, by only updating at every step instant, a certain number of observations remain unused. In order to take into account these intermediate observations, two hypotheses are made.

To apply this method to innovations resulting from TDCP measurements, we consider that the displacement velocity during a step is constant and corresponds to the person’s displacement velocity vector (

*Hypothesis H2*). This assumption is only applicable in the case of texting and pocket modes. Indeed, during a swinging movement, the arm’s velocity of movement no longer corresponds to the person’s movement velocity.To apply this method to innovations resulting from the pseudo-range difference, the variation in position during a step is considered to be lower than the accuracy of the position estimation by pseudo-range difference (

*Hypothesis H3*).

### 4.3 Between-Satellite Pseudo-range Difference (BSPD)

The pseudo-range measurements are used to update the position. The pseudo-range equation is written as (Sanz Subirana, Zornoza, & Hernández-Pajares, 2013):

10

where

is the pseudo-range measurement from satellite

*i*,is the geometric range,

*dt*^{i}is the satellite clock offset from GPS time,*dT*_{r}is the receiver clock offset from GPS time,Δ

*ρ*^{iono,i}is the ionospheric delay,Δ

*ρ*^{tropo,i}is tropospheric delay,*M*represents the effect of multi-path,*𝜀*is the receiver noise term.

For this work, the method of differences across satellites is used (Jay, 2008). For this purpose, the pseudo-range from a reference satellite *h* is subtracted from the pseudo-range from the other available satellites:

11

This method makes it possible to eliminate the receiver clock bias, considered identical for each satellite. The unknown vector **x**(*x*,*y*,*z*) is therefore composed of three elements corresponding to the position of the receiver. For each difference, the innovation is determined as follows:

12

where:

is the pseudo-range difference computed from satellite data,

is the pseudo-range difference estimated from according to: .

The observation model **H**_{BSPD} for *m* satellites is defined by

13

with:

14

In order to increase the number of observables and to avoid the selection of an incorrect satellite as a reference satellite, each available satellite is used in turn as a reference satellite.

### 4.4 Time Difference Carrier Phase (TDCP) measurement

Phases measurements are used to update the velocity. Phase is related to geometric distance between satellite *i* and receiver *r* according to the equation (Sanz Subirana et al., 2013):

15

where:

is the carrier phase measurements from satellite

*i*,*λ*is the wavelength of the signal,is the integer ambiguity.

For this work, the TDCP method is used (Pierluigi et al., 2015). TDCP between instant *k* and *k*−1 is expressed as

16

The time interval between two measurements being very small (frequency of 5 Hz), variations in atmospheric shifts, ambiguity, and satellite clock shifts is considered negligible. Using relationship from Equation (15), the equation becomes

17

where can be developed according to the following equation:

18

with

19

where:

is the unit vector along the line of sight,

is the

*i*^{th}satellite position at time*k*,is the receiver position at time

*k*.

Finally, TDCP can be linked to the receptor velocity between instants *k* and *k*−1:

20

The TDCP innovation is therefore determined as follows:

21

The observation model **H**_{TDCP} for *m* satellites is defined by

22

with as the rotation matrix from ECEF frame to navigation frame.

## 5 FAULT DETECTION AND EXCLUSION APPROACHES IN THE CONTEXT OF PEDESTRIAN DEAD RECKONING

The use of GNSS signals in urban environments is difficult due to the presence of multi-paths. It is therefore essential to weight the observations and eliminate those that are susceptible to be incorrect. For this purpose, an FDE is implemented. For this project, two fault detection and exclusion methods are used.

### 5.1 State-of-the-art FDE

The first FDE is based on the analysis of innovation at instant *k* according to two tests: a global test and an individual test. For the global test, the Normalized Innovation Squared (NIS) is used (Ni, David, Juliette, & Marion, 2018).

23

with *C*_{k} as the innovation covariance matrix:

24

where the *q*_{k} value is compared to a threshold from the table of the inverse of the chi-square distribution function to verify that errors follow a normal centered law of covariance *C*. Indeed, if this is the case, then *q*_{k} follows a chi-square law (Heidi, Andreas, Gérard, & Jarmo, 2007). The individual test, on the other side, is performed on the standardized innovations, which is compared to a threshold from the inverse table of the normal distribution:

25

Innovations are accepted if these two tests are validated.

### 5.2 FDE based on aggregated innovations at step frequency

The fact that the GPS observations frequency is higher than the iteration frequency of the Kalman filter allows a second FDE to be performed: indeed, it is possible to compare innovations from the same satellite during a step in order to detect errors or multi-path. For this, different cases are studied according to the number of innovations available for each satellite.

If only one innovation is available, there is a 50% chance that it is false. As a result, if other innovations are available from other satellites, the innovation is rejected. If no other observations are available, then the innovation is still accepted.

If two innovations are available, they will be accepted if two tests are validated. The first one checks that the sign of the innovations is identical. The second verifies that the difference in the absolute value of innovations is below a threshold.

If three or four innovations are available, then a Dixon’s Q test at 95% confidence level is used (Rorabacher, 1991). This test considers that only one error may be present, which is acceptable given the small sample available for analysis.

Figure 3 illustrates the impact of the implementation of this second FDE. The trajectories are obtained by a Kalman filter based on a position resulting from the integration of the velocity updated by TDCP measurements. The red trajectory shows the results by accepting all TDCP innovations; while for the green trajectory, the presented FDE is implemented. We notice that the trajectory is modified at different places and in particular at the southwest corner of the building where the presence of multi-paths totally distorts the trajectory. However, this error is corrected by the FDE.

## 6 EXPERIMENTS

### 6.1 Scenarios

Three trajectories have been set up to test the performance of the proposed method. These trajectories are detailed in Figure 4. The first is designed to verify the impact of TDCP updates on the accuracy of walking direction estimates. For this purpose, a trajectory of 1.3 km has been carried out in an area where few masks are present. The two others trajectories include indoor and outdoor parts. They are designed to represent a real trajectory, with different floors, climbing, and descending stairs, over a 750-m distance, shown in Figure 5.

Acquisitions have been realized by five people, two women and three men, aged from 25 to 55. Two activity modes are used: pocket and texting. Indeed, these activities allow us to use *hypothesis H2* and *hypothesis H3*.

### 6.2 Hardware setup

Subjects were equipped with two devices (Figure 6): PERSY (PErsonal Reference SYstem) and ULISS acquisition module (Ubiquitous Localization with Inertial Sensors and Satellites). These two units are equipped with a battery, a memory card, and various sensors. They have a similar weight and characteristics to a smartphone. All data from the sensors are time-stamped using GPS time.

PERSY is composed of a STIM300 inertial unit, a HMC5983 magnetometer, and a NEO-M8T GNSS receiver. This module, placed on the foot, is used as a reference. It provides a 0.22% positioning error (Julien, Miguel, & Valerie, 2017) over the walked trajectory. It has been assessed over multiple 1.4-km trajectories.

ULISS (Miguel, Mathieu, & Valérie, 2017) is composed of a VectorNav 300 module. During acquisitions, this device is held in hand, as if it were a smartphone, and is used to test the proposed HEAD algorithm.

## 7 ANALYSIS AND RESULTS

### 7.1 Contribution of TDCP updates

Track 1 was performed by two people (M1 and W1) in texting mode to assess the efficiency of TDCP updates in outdoor and open environments. For this purpose, the HAWE and BSCP modules have been deactivated and only the TDCP measurements are used to update the estimated walking direction. Figure 7 shows the results obtained while using TDCP measurements compared with WAISS and PCA methods. It can be seen that the trajectory obtained while using TDCP measurements is much closer to the reality. Table 1 presents the angular errors obtained for the WAISS and TDCP methods as well as the position error. The average angular error (𝜇) is reduced to 4° for both acquisitions, compared to 13 and 11° for the WAISS method. In addition, the mean standard deviation (σ) is also reduced with 2.6° order of magnitude. An even bigger improvement is observed for the positioning error, especially on this long trajectory. Indeed, the mean position error obtained on the two acquisitions is 3.9 m, which is 20 times lower than the mean 78 m with the WAISS method.

### 7.2 Angular performance analysis

Three methods for estimating the walking direction are studied in this article. Thus, the proposed method (HEAD algorithm) is compared to the WAISS algorithm and a method based on a simple PCA performed on the sensor’s horizontal accelerations. The results are presented as box plot. To recall, the central mark, in red, indicates the median of the angular error. Bottom and top edges of the blue box indicate the 25th and 75th percentiles. The whiskers extend to extreme data points not considered outliers. The outliers are represented with a red ‘+’ symbol.

Figure 8 shows the angular error for tracks 2 and 3 in texting mode. These acquisitions were made by all five subjects. Seven acquisitions were made for each track. We can observe that the HEAD method obtains better results for both tracks, whether in terms of median angular error value (4.9 and 6° compared to 12.4 and 11.6° for WAISS and 17.3 and 14° for the TDCP method), standard deviation, or number of forward values. The mean error obtained in texting mode for 14 acquisitions is 5.8°, which corresponds to a 54% improvement as compared with the WAISS method (12.7°).

Figure 9 shows the angular error for tracks 2 and 3 in pocket mode. The number of acquisitions is reduced to three acquisitions for track 2 and two acquisitions for track 3, carried out with three individuals (M1, M3, and W2). It is important to explain why particularly strong angular errors are present in the output of the PCA method. It is due to the fact that the sensor accelerations here follow the leg movement. During a stride, the movement comprises two acceleration phases in opposite directions depending on whether the sensor is experiencing the supporting leg or swinging leg phase. It regularly introduces a 180-degrees error that can be corrected using some algorithms. They were not performed in this study but could really improve the outcome. As compared to texting mode, we notice equivalent performances for the WAISS and HEAD algorithms. Indeed, if the results of the WAISS method are similar to those obtained in texting, the median value of the angular error obtained by the HEAD method is doubled, i.e., 12.4 and 11.6° against 4.9 and 6° in texting. This observation certainly comes from the fact that the *Hypothesis H2* is less true in the pocket mode case. Indeed, the acceleration behavior is closer to a swinging mode with lower amplitude. TDCP updates are less efficient to mitigate the velocity estimate error. However, it is important to notice that the HEAD method has far fewer outliers. It illustrates the smoothing efficiency of the proposed HEAD method. The reduction of outliers has an even bigger impact on the positioning error improvement.

### 7.3 Analysis of the positioning error

A study of the position error was also carried out. It is important to recall that the step length is estimated using the PERSY reference solution. This methodology was adopted to only assess the impact of angular error on PDR, which is the focus of the paper. Table 3 presents position errors for the texting mode acquisitions. It can be seen that the proposed method has better performance for all the metrics (standard deviation, mean error, and final position error). The mean position error is 3.6 m compared to 11.8 m for the WAISS method and 17.5 m for the PCA method. This represents a 70 and 80% improvement, respectively. The standard deviation is reduced to 1.5 m. These results are illustrated by the trajectories obtained for an acquisition of track 2 and track 3 on Figure 10. Linking the mean error to the traveled distance, a 0.4% error over the total travelled distance is obtained on average with HEAD algorithm for 14 acquisitions.

Table 2 presents position errors for the pocket mode acquisitions. It can be seen that despite similar angular performances, the presence of aberrant values in the WAISS method has a strong impact on the results in position. The 14.9-m mean position error for the WAISS method is reduced to 5.1-m for the HEAD method. This represents a 65% improvement. The standard deviation is also lower, 1.9 m compared to 5.7 m. Linking the mean error to the walked distance, a 1.3% error of the travelled distance is obtained on average with the HEAD algorithm for five acquisitions. This result is two times bigger than the one obtained in texting. It is explained by the partially wrong *Hypothesis H2*, as explained in Section 7.2.

## 8 CONCLUSION

The estimation of the walking direction remains one of the main error sources in smartphone-based PDR approaches. A common strategy is to model the way users hold the object in hand to estimate the walking direction irrespective of the carrying mode. The WAISS method uses GMM of horizontal accelerations to build the model. It is performed at each detected step and suffers from outliers and miscalculation that can lead to wrong unnatural trajectories. It progressively drifts with accumulated errors at step frequency. The classical attitude estimation method of the device can also be used. The MAGYQ method is based on quaternion parametrization, and the application of field updates during opportune phases. The second approach is more robust than the first one, but it cannot be used in a PDR processing because the device’s pointing direction does not necessarily correspond to the walking direction. A new method has been proposed to improve the estimation of the walking direction by fusing MAGYQ and WAISS estimates in an Extended Kalman Filter: HEAD (smootH Estimation of wAlking Direction). Velocity is added in the state vector to enable TDCP measurements and bound angular estimation errors when GPS signals are available. Finally, the use of BSPD is applied to directly update the position estimate. To improve the robustness, a novel FDE algorithm using aggregated innovations over a pedestrian’s step is implemented.

Twenty-one experiments are conducted with five people, over distances between 720 and 1300 m, with up to 50% indoor parts over the trajectories. During the experiment, the device is not aligned with the walking direction, and two carrying modes are used: texting and pocket. With HEAD method, the walking direction estimation error is reduced by 54% in texting mode as compared to the WAISS method. It also reduces the amount of angular error outliers in the pocket mode. On average, the position error for texting mode equals 0.5% of the traveled distance over 14 acquisitions in texting mode and 1.3% in pocket mode over five acquisitions. With PCA method, results are 2.5% for texting mode and pocket mode.

## HOW TO CITE THIS ARTICLE

Perul J, Renaudin V. HEAD: smootH Estimation of wAlking Direction with a handheld device embedding inertial, GNSS, and magnetometer sensors. NAVIGATION. 2020;67:713–726. https://doi.org/10.1002/navi.389

- Received August 27, 2019.
- Revision received May 4, 2020.
- Accepted June 30, 2020.

- Copyright © 2020 Institute of Navigation

This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.