# Robust Stride Detector from Ankle-Mounted Inertial Sensors for Pedestrian Navigation and Activity Recognition with Machine Learning Approaches

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Machine Learning for Stride Detection and HAR

- Candidate intervals extraction.The first step of our algorithm consists of an alignment procedure on the inertial data that removes the gravity from the recorded linear acceleration and then computes a terrestrial reference frame (see Section 3.1.1). This first part of the method a pseudo-speed to be computed, and it finally provides a family of candidate intervals $\mathcal{I}$ that may correspond to strides (see Section 3.1.2).
- Stride interval detection. Some of the intervals in the family of candidate intervals $\mathcal{I}$ correspond to real strides, with correct start and end times. Others come from WATA movements that are not strides and that we want to exclude. We use a gradient boosting tree algorithm (GBT) to choose a subfamily of intervals in $\mathcal{I}$ that we will consider as real stride intervals.
- Trajectory reconstruction. From the stride detection above, trajectory reconstruction is computed with dead reckoning during intervals classified as strides and fused with an inspired ZUPT technique (ankle speed estimation by lever arm assumption), in an extended Kalman filter (see Section 4).
- Human activity recognition. When the goal is to recognize the activity of the detected strides, we consider a classification task with five different classes: the extra label corresponds to the activities included as “atypical steps” (label 1), which includes small steps, side steps, backward walking, etc.; “walking” (label 2); “running” (label 3); “climbing stairs” (label 10); and “descending stairs” (label -10). We use the GBT algorithm to provide a prediction function that affects an activity for any new proposed interval.

- Compute$$({\beta}^{\left(b\right)}{h}^{\left(b\right)})=arg\underset{\beta \in \mathbb{R},\phantom{\rule{0.222222em}{0ex}}h\in \mathcal{H}}{min}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\sum _{i=1}^{n}\ell \left(\right)open="("\; close=")">{y}_{i},{g}^{(b-1)}\left({x}_{i}\right)+\beta h\left({x}_{i}\right)$$
- Set ${g}^{\left(b\right)}\left(x\right)={g}^{(b-1)}\left(x\right)+{\beta}^{\left(b\right)}{h}^{\left(b\right)}\left(x\right)$.

- At each iteration b a regression tree is fitted on the gradient (quadratic node impurity criterion):$${T}^{\left(b\right)}\left(x\right)=\sum _{m=1}^{M}{\overline{y}}_{bm}{\U0001d7d9}_{x\in {R}_{b,m}}\phantom{\rule{1.em}{0ex}}\mathrm{where}\phantom{\rule{1.em}{0ex}}{\overline{y}}_{bm}=\mathrm{mean}\left({y}_{i}\right|{x}_{i}\in {R}_{b,m});$$
- For all $m\in \{1,\dots M\}$, find$${\widehat{\beta}}^{\left(bm\right)}=arg\underset{\beta \in \mathbb{R}}{min}\sum _{{x}_{i}\in {R}_{b,m}}\ell ({y}_{i},{g}^{(b-1)}\left({x}_{i}\right)+\beta );$$
- Update separately in each corresponding region with global learning rate $\nu $:$${g}^{\left(b\right)}\left(x\right)={g}^{(b-1)}\left(x\right)+\nu \sum _{m=1}^{M}{\beta}^{(b,m)}{\U0001d7d9}_{{R}_{b,m}}\left(x\right).$$

## 3. Stride Detector with Machine Learning for Candidate Interval Classification

#### 3.1. Candidate Interval Extraction

#### 3.1.1. Terrestrial Reference Frame Computation

Algorithm 1: Terrestrial reference frame computation with gravity identification. |

#### 3.1.2. Pseudo-Speed Computation for Candidate Interval Extraction

Algorithm 2: Pseudo-speed computation. |

#### 3.2. GBT Classifier for Candidate Interval Classification

#### 3.2.1. Features Engineering Process

#### 3.2.2. Performance of GBT for Stride Detection

#### 3.2.3. False Negative Rate

#### 3.2.4. False Positive Rate

## 4. Trajectory Reconstruction of the Detected Strides

#### 4.1. Stride Length Estimation Performance

#### 4.2. Performance in Uncontrolled Environment

## 5. Activity Recognition of the Detected Strides with Machine Learning from the Computed Trajectory

#### 5.1. GBT Learning Performances for Activity Recognition

#### 5.2. Algorithm Overview

Algorithm 3: Activity recognition algorithm. |

#### 5.3. HAR in Controlled Environments

#### 5.4. HAR for One Healthy Child Recording in Uncontrolled Environment

## 6. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## Appendix A. Pseudo-Speed Norm Visualization

## References

- Chen, Y.; Kobayashi, H. Signal strength based indoor geolocation. In Proceedings of the IEEE International Conference on Communications, New York, NY, USA, 28 April–2 May 2002; pp. 436–439. [Google Scholar]
- Renaudin, V. UWB and MEMS Based Indoor Navigation. J. Navig.
**2008**, 61, 369–384. [Google Scholar] [Green Version] - Swzyslo, S.; Schroeder, J.; Galler, S.; Kaiser, T. Hybrid Localization Using UWB and Inertial Sensors. In Proceedings of the IEEE International Conference on Ultra-Wideband (ICUWB), Hannover, Germany, 10–12 September 2008; pp. 89–92. [Google Scholar]
- Abdulrahim, K.; Moore, T.; Hide, C.; Hill, C. Understanding the Performance of Zero Velocity Updates in MEMS-based Pedestrian Navigation. Int. J. Adv. Technol.
**2014**, 5, 53–60. [Google Scholar] - Sabatini, A.M. Quaternion-based strap-down integration method for applications of inertial sensing to gait analysis. Med. Biol. Eng. Comput.
**2005**, 43, 94–101. [Google Scholar] [CrossRef] - Foxlin, E. Pedestrian tracking with shoe-mounted inertial sensors. IEEE Comput. Gr. Appl.
**2005**, 25, 38–46. [Google Scholar] [CrossRef] - Bamberg, S.J.; Benbasat, A.Y.; Scarborough, D.M.; Krebs, E.E.; Paradiso, J.A. Gait analysis using a shoe-integrated wireless sensor system. IEEE Trans. Inf. Technol. Biomed.
**2008**, 21, 413–423. [Google Scholar] [CrossRef] [PubMed] - Castaneda, N.; Lamy-Perbal, S. An improved shoe-mounted inertial navigation system. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Zurich, Switzerland, 15–17 September 2010. [Google Scholar]
- Carrera, J.-L.; Zhao, Z.; Braun, T.; Li, Z. A Real-time Indoor Tracking System by Fusing Inertial Sensor, Radio Signal and Floor Plan. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Spain, 4–7 October 2016. [Google Scholar]
- Norrdine, A.; Kasmi, Z.; Blankenbach, J. Step Detection for ZUPT-Aided Inertial Pedestrian Navigation System Using Foot-Mounted Permanent Magnet. IEEE Sensors J.
**2016**, 16, 6766–6773. [Google Scholar] [CrossRef] - Tedesco, S.; Sica, M.; Ancillao, A.; Timmons, S.; Barton, J.; O’Flynn, B. Accuracy of consumer-level and research-grade activity trackers in ambulatory settings in older adults. PLoS ONE
**2019**, 14, e0216891. [Google Scholar] [CrossRef] - Ren, M.; Pan, K.; Liu, Y.; Guo, H.; Zhang, X.; Wang, P. A Novel Pedestrian Navigation Algorithm for a Foot-Mounted Inertial-Sensor- Based System. Sensors
**2016**, 16, 139. [Google Scholar] [CrossRef] - Walder, U.; Bernoulli, T.; Wang, P. Context-Adaptive Algorithms to Improve Indoor Positioning with Inertial Sensors. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Zurich, Switzerland, 15–17 September 2010. [Google Scholar]
- Tian, X.; Chen, J.; Han, Y.; Shang, J.; Li, N. A Novel Zero Velocity Interval Detection Algorithm for Self-Contained Pedestrian Navigation System with Inertial Sensors. Sensors
**2016**, 16, 1578. [Google Scholar] [CrossRef] - Rantakokko, J.; Emilsson, E.; Stromback, P.; Rydell, J. Scenario-Based Evaluations of High-Accuracy Personal Positioning Systems. In Proceedings of the 2012 IEEE/ION Position, Location and Navigation Symposium, Myrtle Beach, SC, USA, 23–26 April 2012; pp. 106–112. [Google Scholar]
- Ancillao, A.; Tedesco, S.; Barton, J.; O’Flynn, B. Indirect Measurement of Ground Reaction Forces and Moments by Means of Wearable Inertial Sensors: A Systematic Review. Sensors
**2018**, 18, 2564. [Google Scholar] [CrossRef] - Adesida, Y.; Papi, E.; McGregor, A.H. Exploring the Role of Wearable Technology in Sport Kinematics and Kinetics: A Systematic Review. Sensors
**2019**, 19, 1597. [Google Scholar] [CrossRef] [PubMed] - Tedesco, S.; Sica, M.; Ancillao, A.; Timmons, S.; Barton, J.; O’Flynn, B. Validity Evaluation of the Fitbit Charge2 and the Garmin vivosmart HR+ in Free-Living Environments in an Older Adult Cohort. JMIR Mhealth Uhealth
**2019**, 7, e13084. [Google Scholar] [CrossRef] [PubMed] - Gurchiek, R.D.; Rupasinghe Arachchige Don, H.S.; Pelawa Watagoda, L.C.; McGinnis, R.S.; van Werkhoven, H.; Needle, A.R.; McBride, J.M.; Arnholt, A.T. Sprint Assessment Using Machine Learning and a Wearable Accelerometer. J. Appl. Biomech.
**2019**, 35, 164–169. [Google Scholar] [CrossRef] [PubMed] - Ancillao, A.; van der Krogt, M.M.; Buize, A.I.; Witbreuk, M.M.; Cappa, P.; Harlaar, J. Analysis of gait patterns pre- and post- Single Event Multilevel Surgery in children with Cerebral Palsy by means of Offset-Wise Movement Analysis Profile and Linear Fit Method. Hum. Mov. Sci.
**2017**, 55, 145–155. [Google Scholar] [CrossRef] [PubMed] - Stetter, B.J.; Ringhof, S.; Krafft, F.C.; Sell, S.; Stein, T. Estimation of Knee Joint Forces in Sport Movements Using Wearable Sensors and Machine Learning. Sensors
**2019**, 19, 3690. [Google Scholar] [CrossRef] - Friedman, J.H. Greedy function approximation: A gradient boosting machine. Ann. Stat.
**2001**, 29, 1189–1232. [Google Scholar] [CrossRef] - Park, S.Y.; Ju, H.; Park, C.G. Actions for Military Drill Using Foot-mounted IMU. In Proceedings of the Indoor Positioning and Indoor Navigation (IPIN), Alcalà de Henares, Spain, 3–7 October 2016. [Google Scholar]
- Wagstaff, B.; Kelly, J. LSTM-Based Zero-Velocity Detection for Robust Inertial Navigation. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Nantes, France, 24–27 September 2018. [Google Scholar]
- Dorveaux, E. Magneto-Inertial Navigation: Principles and Application to an Indoor Pedometer. Ph.D. Thesis, École Nationale Supérieure des Mines de Paris, Paris, France, 2011. [Google Scholar]
- Chesneau, C.I.; Hillion, M.; Prieur, C. Motion estimation of a Rigid Body with an EKF using Magneto-Inertial Measurements. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Spain, 4–7 October 2016; pp. 369–384. [Google Scholar]
- Strimbu, K.; Tave, J.A. What are biomarkers? Curr. Opin. HIV AIDS
**2010**, 463. [Google Scholar] [CrossRef] - Gasnier, E.; Gidaro, T.; Denis, S.; Grelet, M.; Lilien, C.; Gargaun, E.; Lilien, C.; Moreaux, A.; Dorveaux, E.; Vissière, D.; et al. Assessment of lower limbs in FSHD: The ActiMyo as a new outcome for home-monitoring. Neuromuscular Disorders
**2016**, 26. [Google Scholar] [CrossRef] - Le Moing, A.-G.; Seferian, A.; Moraux, A.; Dorveaux, E.; Annoussamy, M.; Gasnier, E.; Hogrel, J.-Y.; Voit, T.; Vissière, D.; Servais, L. A Movement Monitor Based on Magneto-Inertial Sensors for Non-Ambulant Patients with Duchenne Muscular Dystrophy: A Pilot Study in Controlled Environment. Inst. Myol.
**2016**, 11, e0156696. [Google Scholar] [CrossRef] - Ferreira, J.C.; Patino, C.M. Types of outcmes in clinical research. J. Bras. Pneumol.
**2017**, 43, 5. [Google Scholar] [CrossRef] - Rastegari, E.; Azizian, S.; Ali, H. Machine Learning and Similarity Network Approaches to Support Automatic Classification of Parkinson’s Diseases Using Accelerometer-based Gait Analysis. In Proceedings of the 52nd Hawaii International Conference on System Sciences, Hawaii, HI, USA, 8–11 January 2019. [Google Scholar]
- Poppe, R. A survey on vision-based human action recognition. Image Vision Comput.
**2010**, 28, 976–990. [Google Scholar] [CrossRef] - Stikic, M.; Huynh, T.; van Laerhoven, K.; Schiele, B. ADL recognition based on the combination of RFID and accelerometer sensing. In Proceedings of the 2nd International Conference on Pervasive Computing Technologies for Healthcare, Tampere, Finland, 30 January–1 February 2008. [Google Scholar]
- Mannini, A.; Sabatini, A.M. Machine Learning Methods for Classifying Human Physical Activity from On-Body Accelerometers. Sensors
**2010**, 10, 1154–1175. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Um, T.T.; Babakeshizadeh, V.; Kulic, D. Exercise Motion Classification from Large-Scale Wearable Sensor Data Using Convolutional Neural Networks. In Proceedings of the International Conference on Intelligent Robots and Systems (IROS), Vancouver, BC, Canada, 24–28 September 2017. [Google Scholar]
- Yang, J.B.; Nguyen, M.N.; San, P.P.; Li, X.L.; Krishnaswamy, S. Deep Convolutional Neural Networks on Multichannel Time Series For Human Activity Recognition. In Proceedings of the IJCAI’15 Proceedings of the 24th International Conference on Artificial Intelligence, Buenos Aires, Argentina, 25–31 July 2015; pp. 3995–4001.
- Vapnik, V.N. The Nature of Statistical Learning Theory; Springer: New York, NY, USA, 1995. [Google Scholar]
- Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning; Springer: New York, NY, USA, 2001. [Google Scholar]
- Ortiz, M.; de Sousa, M.; Renaudin, V. A New PDR Navigation Device for Challenging Urban Environments. J. Sens.
**2017**, 2017, 4080479. [Google Scholar] [CrossRef] - Beaufils, B.; Chazal, F.; Grelet, M.; Michel, B. Stride detection for pedestrian trajectory reconstruction: A machine learning approach based on geometric patterns. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Sapporo, Japan, 18–21 September 2017. [Google Scholar]
- Stone, M. Cross-validatory choice and assessment of statistical predictions. J. R. Stat. Soc.
**1974**, 36, 111–147. [Google Scholar] [CrossRef] - Abu-Faraj, Z.O.; Harris, G.F.; Smith, P.A.; Hassani, S. Human Gait and Clinical Movement Analysis. In Wiley Encyclopedia of Electrical and Electronics Engineering; John Wiley & Sons, Inc.: New York, NY, USA, 2015. [Google Scholar] [CrossRef]
- Ribeiro, I. Kalman and Extended Kalman Filters: Concept, Derivation and Properties. Available online: http://users.isr.ist.utl.pt/~mir/pub/kalman.pdf (accessed on 16 October 2019).
- Vissiere, D.; Hillion, M.; Dorveaux, E.; Jouy, A.; Grelet, M. Method for Estimating the Movement of a Pedestrian. U.S. Patent Application 15/766,296, 11 October 2018. [Google Scholar]
- Ho, N.H.; Truong, P.; Jeong, G.M. Step-Detection and Adaptive Step-Length Estimation for Pedestrian Dead-Reckoning at Various Walking Speeds Using a Smartphone. Sensors
**2016**, 16, 1423. [Google Scholar] [CrossRef] - Hannink, J.; Kautz, T.; Pasluosta, C.F.; Barth, J.; Schülein, S.; Gaßmann, K.; Klucken, J.; Eskofier, B.M. Stride Length Estimation with Deep Learning. IEEE EMBS
**2017**. [Google Scholar] [CrossRef]

**Figure 1.**Our approach for trajectory reconstruction and human activity recognition (HAR) is based on stride detection.

**Figure 2.**(

**a**) WATA (Wearable Ankle Trajectory Analyzer) device worn at the ankle. (

**b**) WATA devices connected to their case

**Figure 6.**The three foot rockers during stance phase: (

**a**) heel rocker, (

**b**) ankle rocker, (

**c**) forefoot rocker.

**Figure 7.**Stride detection combined with dead reckoning in an extended Kalman filter. INS: inertial navigation system.

**Figure 9.**Computed trajectory during the first walking period on (

**a**) the ground floor and (

**b**) the first floor.

**Figure 11.**Computed trajectory during the third walking period on (

**a**) the ground floor and (

**b**) the first floor.

**Figure 13.**Activity recognition (AR) results associated with the distribution of (

**a**) the strides’ length/duration and (

**b**) the strides’ speed.

**Table 1.**10-fold cross-validation results of the gradient boosting tree (GBT) classifier for stride detection.

Predicted −1 | Predicted 1 | |
---|---|---|

Actual −1 | 5852 | 233 |

Actual 1 | 128 | 6085 |

Slow Walking | Medium Walking | Fast Walking | Small Steps | Side Steps | |
---|---|---|---|---|---|

Total - FN | Total - FN | Total - FN | Total - FN | Total - FN | |

Wearer 1 | 291 - 0% | 279 - 0% | 216 - 0% | 88 - 0% | 287 - 0.7% |

Wearer 2 | 306 - 0% | 261 - 0% | 195 - 0% | 67 - 0% | 265 - 2.6% |

Wearer 3 | 294 - 0% | 219 - 0% | 198 - 0% | 107 - 4.7% | 143 - 3.5% |

Wearer 4 | 297 - 0% | 267 - 0% | 228 - 0% | 145 - 0.7% | 301 - 0% |

Wearer 5 | 273 - 0% | 249 - 0% | 213 - 0% | 65 - 7.7% | 246 - 0.8% |

Wearer 6 | 345 - 0% | 339 - 0% | 327 - 0% | 90 - 1.1% | 150 - 0.7% |

Wearer 7 | 342 - 0% | 246 - 0% | 240 - 0% | 48 - 8.3% | 200 - 0.5% |

Total | 2148 - 0% | 1860 - 0% | 1617 - 0% | 610 - 2.3% | 1592 - 1.1% |

Movement | Walking | Sitting | Bicycling | Car Ride | Hand-Carried | Backpack | |
---|---|---|---|---|---|---|---|

FP average per hour | 0 | 0 | 1.7 | 0 | 10.1 | 0 | 0.1 |

Slow Walking | Medium Walking | Fast Walking | Small Steps | Side Steps | |
---|---|---|---|---|---|

Mean (m) - Std (m) | Mean (m) - Std (m) | Mean (m) - Std (m) | Mean (m) - Std (m) | Mean (m) - Std (m) | |

Wearer 1 | 0.024 - 0.038 | 0.020 - 0.022 | 0.029 - 0.036 | 0.027 - 0.070 | 0.044 - 0.106 |

Wearer 2 | 0.026 - 0.039 | 0.016 - 0.018 | 0.025 - 0.034 | 0.039 - 0.048 | 0.071 - 0.168 |

Wearer 3 | 0.023 - 0.021 | 0.028 - 0.024 | 0.036 - 0.023 | 0.057 - 0.082 | 0.070 - 0.177 |

Wearer 4 | 0.028 - 0.020 | 0.028 - 0.021 | 0.023 - 0.022 | 0.025 - 0.024 | 0.048 - 0.056 |

Wearer 5 | 0.061 - 0.091 | 0.025 - 0.020 | 0.032 - 0.029 | 0.049 - 0.082 | 0.022 - 0.046 |

Wearer 6 | 0.018 - 0.016 | 0.024 - 0.024 | 0.043 - 0.039 | 0.074 - 0.061 | 0.133 - 0.170 |

Wearer 7 | 0.014 - 0.026 | 0.014 - 0.012 | 0.023 - 0.044 | 0.039 - 0.055 | 0.053 - 0.116 |

Total | 0.028 - 0.048 | 0.022 - 0.021 | 0.032 - 0.034 | 0.048 - 0.069 | 0.056 - 0.129 |

Activity | Atypical Stride | Walking | Running | Climbing Stairs | Descending Stairs |
---|---|---|---|---|---|

Label | 1 | 2 | 3 | 10 | −10 |

Predicted 1 | Predicted 2 | Predicted 3 | Predicted 10 | Predicted −10 | |
---|---|---|---|---|---|

Actual 1 | 1138 | 14 | 0 | 0 | 0 |

Actual 2 | 17 | 1185 | 0 | 2 | 2 |

Actual 3 | 0 | 0 | 1334 | 0 | 0 |

Actual 10 | 0 | 2 | 0 | 1098 | 0 |

Actual −10 | 0 | 0 | 0 | 0 | 1155 |

Patient 1 | Patient 2 | Patient 3 | Patient 4 | Patient 5 | Patient 6 | Patient 7 | Patient 8 | |
---|---|---|---|---|---|---|---|---|

Total | 4 | 15 | 10 | 7 | 16 | 20 | 16 | 15 |

FN | 0 | 0 | 0 | 0 | 9 | 1 | 0 | 0 |

Patient 1 | Patient 2 | Patient 3 | Patient 4 | Patient 5 | Patient 6 | Patient 7 | Patient 8 | Patient 9 | Patient 10 | |
---|---|---|---|---|---|---|---|---|---|---|

Total | 26 | 18 | 13 | 18 | 14 | 32 | 12 | 14 | 21 | 22 |

FN | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 2 | 1 |

Event (Number) | Number of Detected Stairs Strides per Event |
---|---|

Climbing main stairs (3) | 7–6–8 |

Descending main stairs (2) | 8–6 |

Climbing small stairs (4) | 2–1–1–2 |

Descending small stairs (1) | 2 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Beaufils, B.; Chazal, F.; Grelet, M.; Michel, B.
Robust Stride Detector from Ankle-Mounted Inertial Sensors for Pedestrian Navigation and Activity Recognition with Machine Learning Approaches. *Sensors* **2019**, *19*, 4491.
https://doi.org/10.3390/s19204491

**AMA Style**

Beaufils B, Chazal F, Grelet M, Michel B.
Robust Stride Detector from Ankle-Mounted Inertial Sensors for Pedestrian Navigation and Activity Recognition with Machine Learning Approaches. *Sensors*. 2019; 19(20):4491.
https://doi.org/10.3390/s19204491

**Chicago/Turabian Style**

Beaufils, Bertrand, Frédéric Chazal, Marc Grelet, and Bertrand Michel.
2019. "Robust Stride Detector from Ankle-Mounted Inertial Sensors for Pedestrian Navigation and Activity Recognition with Machine Learning Approaches" *Sensors* 19, no. 20: 4491.
https://doi.org/10.3390/s19204491