# Automatic gait events detection with inertial measurement units: healthy subjects and moderate to severe impaired patients

Cyril Voisard, Nicolas de L'escalopier, Damien Ricard, Laurent Oudre

► To cite this version:

Cyril Voisard, Nicolas de L'escalopier, Damien Ricard, Laurent Oudre. Automatic gait events detection with inertial measurement units: healthy subjects and moderate to severe impaired patients. Journal of NeuroEngineering and Rehabilitation, 2024, 21 (1), pp.104. 10.1186/s12984-024-01405-x. hal-04847914

HAL Id: hal-04847914

https://hal.science/hal-04847914v1

Submitted on 19 Dec 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
RESEARCH

Open Access

<figure><img src="image_2.png" /></figure>

Check for
updates

# Automatic gait events detection with inertial measurement units: healthy subjects and moderate to severe impaired patients

Cyril Voisard¹,³*†, Nicolas de l'Escalopier²,⁴†, Damien Ricard²,³,⁵ and Laurent Oudre¹

**Abstract**

**Background** Recently, the use of inertial measurement units (IMUs) in quantitative gait analysis has been widely developed in clinical practice. Numerous methods have been developed for the automatic detection of gait events (GEs). While many of them have achieved high levels of efficiency in healthy subjects, detecting GEs in highly degraded gait from moderate to severely impaired patients remains a challenge. In this paper, we aim to present a method for improving GE detection from IMU recordings in such cases.

**Methods** We recorded 10-meter gait IMU signals from 13 healthy subjects, 29 patients with multiple sclerosis, and 21 patients with post-stroke equino varus foot. An instrumented mat was used as the gold standard. Our method detects GEs from filtered acceleration free from gravity and gyration signals. Firstly, we use autocorrelation and pattern detection techniques to identify a reference stride pattern. Next, we apply multiparametric Dynamic Time Warping to annotate this pattern from a model stride, in order to detect all GEs in the signal.

**Results** We analyzed 16,819 GEs recorded from healthy subjects and achieved an F1-score of 100%, with a median absolute error of 8 ms (IQR [3–13] ms). In multiple sclerosis and equino varus foot cohorts, we analyzed 6067 and 8951 GEs, respectively, with F1-scores of 99.4% and 96.3%, and median absolute errors of 18 ms (IQR [8–39] ms) and 26 ms (IQR [12–50] ms).

**Conclusions** Our results are consistent with the state of the art for healthy subjects and demonstrate a good accuracy in GEs detection for pathological patients. Therefore, our proposed method provides an efficient way to detect GEs from IMU signals, even in degraded gaits. However, it should be evaluated in each cohort before being used to ensure its reliability.

**Keywords** Pathological gaits, Gait analysis, Step detection, Pattern recognition, Intertial measurement units, Dynamic time warping

<footnote>†Cyril Voisard and Nicolas de l'Escalopier contributed equally to this work.</footnote>

<footnote>*Correspondence:
Cyril Voisard
cyril.voisard@etu.u-paris.fr; cyril.voisard@gmail.com
Full list of author information is available at the end of the article</footnote>
## Background

The study of gait in medicine is an essential tool for evaluating the health and progression of patients with various diseases [1]. In this context, quantitative gait analysis can be used to finely evaluate the patient's functional abilities, track the progression of their disease, measure the effectiveness of treatments, and develop personalized rehabilitation plans [2, 3].

In recent years, inertial measurement units (IMUs) have become widely developed in gait analysis due to their compact size, low cost, and ease of integration [4, 5]. They allow for objective and quantitative gait analysis, easy to use in healthy subjects, athletes [6] and patients, for example with neurological or orthopedic diseases [7]. They allow therefore the measurement of indicators on the gait semiology of patients, such as speed, stride length, double-support time, and balance [8]. Some of these features depend on the segmentation of strides and steps. Based on the historical description of gait in healthy subjects, 4 GE occur in a stride, in this order: Heel-Off (HO), Toe-Off (TO), Heel-Strike (HS), and Foot-Flat (FF) [9, 10]. Two main phases are described: the Stance Phase (StP) when the foot is on the ground between HS and TO, and the Swing Phase (SwP) when the foot is in the air between TO and HS [11, 12].

To accurately identify GEs from IMU signals, many techniques have therefore been developed. Currently, automatic detection of GEs on IMU recordings in healthy subjects has achieved a high degree of accuracy and continues to improve, with many efficient algorithmic techniques detecting GEs with a median absolute error of less than a tenth of a second [13–15]. However, the results on pathological subjects are often less precise, especially when gait is severely degraded. Due to the complexity of the sensory and motor commands that control gait, patients with advanced neurological pathologies can have particularly unstructured gaits [16–18]. For example, Ji et al. showed a 4 times lower accuracy in detecting the end of the step in hemiplegic subjects compared to healthy subjects [19]. Moreover, most of the algorithms tested on impaired patients have only been tested in a few specific diseases [20–23]. Therefore, one of the current challenges is to improve GE detection in pathological gaits.

A recent literature review has referenced the most commonly used mathematical principles in the exercise of IMU-based gait analysis [24]. This study summarizes research practices regarding IMU positioning, algorithmic methods, and algorithm validation processes. Over the past few years, the 3 most commonly found types of methods have been the Hidden Markov Model (HMM) [25], the Wavelet Transform (WT) [9], inspired by the study of ECGs, and rule-based detections (RBD) utilizing

various mathematical tools [13, 26]. The study recommends the use of RBD with IMUs placed on the ankle or foot, validated using pressure sensors as ground truth. Recently, Deep Learning algorithms have also proven successful in detecting GEs [23].

Among the RBD algorithms, template-based methods have shown promising results in segmenting GEs in healthy subjects [10, 27, 28]. This technique relies on the creation of a reference dictionary of steps, which is used for segmentation of the signal by pattern recognition and extraction [29]. The use of a unique step dictionary allows for GE segmentation in healthy subjects [10, 29]. However, in neurological diseases, this method requires the addition of a solution for imprinting the patient's step, such as an instrumented mat [28], making the deployment in routine clinical practice impossible. Another area for improvement concerns the use of different pattern extraction methods, such as Dynamic Time Warping (DTW) [10, 30]. DTW is a technique that promises precise detection of signal variations and similarity, and has already been used in gait analysis [27, 31].

The objective of this study is to develop a reliable algorithm for detecting degraded gaits using only IMUs, making it suitable for routine clinical use. To achieve this, we propose a new method for detecting Gait Events (GEs) in degraded gaits using IMUs. This method combines mathematical tools such as autocorrelation [32], the matrix profile algorithm [33] and the multiparametric Dynamic Time Warping (mDTW) algorithm [10].

This new automatic GE detection algorithm is based on the raw acceleration and gyration data collected by the IMUs and requires neither manual annotation nor external tools. To evaluate its efficiency, we tested it in comparison with an instrumented mat, considered the gold standard in gait segmentation [34], as well as with template-based state-of-the-art techniques [10, 29].

## Methods

### Cohorts

All the gait data were recorded at Percy Military Hospital (Clamart, France) from June 2018 to September 2021. 13 healthy control subjects (CS) who reported no medical impairment and were considered healthy after a clinical examination by medical doctors among investigators, 29 patients with multiple sclerosis (MS), and 21 post-stroke hemiplegic patients with spastic equino varus foot (EVF) requiring surgical intervention were enrolled. Included participants had to be mobile and able to walk 4 sets of 20 m with u-turn with a 3-minute break between each set, with or without medical assistance. Patients who were unable to walk, had a history of ankle or foot surgery, or had a history that could alter gait were excluded. Each subject in the CS cohort participated in between 1
<figure><img src="image_3.png" /><figcaption>**Fig. 1** Presentation of the sensor. **A** Tw Awinda XSens® sensor. **B** Definition of the axis for the sensor on the left foot</figcaption></figure>

and 3 sessions, each consisting of 4 to 42 experiments. Patients in the MS cohort participated in 1 or 2 sessions with 4 to 6 experiments each, as described in [28]. Patients in the EVF cohort were recorded preoperatively and during follow-up visits at 3 and 6 months. All participants provided written informed consent before inclusion. The study protocol followed the principles of the Declaration of Helsinki and was approved by the ethics committee "Protection of Persons North West III" (RCB ID: 2017-A01538-45).

## Data acquisition

### Equipment

Two sensors MTw Awinda XSens® (weight 16 g, dimensions 47 mm × 30 mm × 13 mm, sensitivity ± 2000 deg/s and ± 160 m/s², XSens® Technologies, Enschede, the Netherlands) (XS) were placed on the dorsal part of each foot of participants using Velcro bands. The sensor reference frame axes, which are used in subsequent analyses, are specified in Fig. 1. Apart from the axes, which must be correctly oriented, the exact position of the sensors is not measured, which is not required for the algorithm. A 6-meter GAITRite® walkway (GR) was placed in a wide corridor of the hospital. The acquisition frequencies for XS and GR were 100 Hz and 120 Hz, respectively. Both systems were time-synchronized with the Awinda Recording and Docking Station to within 10 µs.

### Experience

An experiment involves walking straight for 10 ms at a comfortable speed while wearing the foot sensors, with 6 ms of the walk on the GAITRite® walkway. Initialization and termination of the walk are performed outside the mat, and the experiment can be conducted with or without footwear. In some cases, patients may use a gait

aid such as a tripod cane, simple cane, or foot lift. The instructions given are consistent at the beginning of each test. Figure 2 illustrates the gait environment and provides a detailed description of the protocol.

### Exporting and processing data

For XS recordings, the software XSens MVN studio software (MVN Studio, XSens, the Netherlands) is used to export the nine-dimensional signal (3D accelerations, 3D angular velocities, and 3D magnetic fields). To improve the quality of the signal, a low-pass Butterworth filter of order 8 with a cut-off frequency of 14Hz is applied. This filter setting is consistent with the trends reported in the literature [35].

For GR recordings, the GAITRite® processing software is utilized to obtain the initial contact (IC) and final contact (FC) data. If the quality of the walk permits, automatic segmentation is performed. In cases where manual assistance is required, an expert is consulted. In either case, a visual inspection is conducted by the expert from GR signals and videos if available. The expert has the possibility to reject an event if its annotation is deemed "obviously incorrect": an event in the middle of a phase without gyration or GR sensors turned on away from the footprint. Criteria for the exclusion of an experience or stride annotated by the GR are predetermined and outlined below:

* Logistical criteria that can invalidate an experiment: a sensor being misplaced or not recording for more than 0.5 s during the experiment, inability to export or corruption of a data file, or the subject's inability to complete the entire mat crossing.

* Qualitative criteria that invalidate a GR event: an event partially outside the mat, an event detected too
<figure><img src="image_4.png" /><figcaption>Fig. 2 Gait recording protocol. The patient is equipped with two sensors Mtw Awinda XSens® placed on the dorsal part of each foot using Velcro bands. Walking is initiated upstream of the active surface of the GR</figcaption></figure>

close to the end of the recording (duration less than the average duration of a stride), or obvious visual errors identified by the expert.

## Data of interest

Based on the axes shown in Fig. 1, our algorithm focuses on two pre-processed signals. The first signal is the absolute norm of the total jerk free from gravity, which is obtained from the values of acceleration free from gravity:

$$ \|j_{tot}\| = \sqrt{\left(\frac{dfreeAcc_x}{dt}\right)^2 + \left(\frac{dfreeAcc_y}{dt}\right)^2 + \left(\frac{dfreeAcc_z}{dt}\right)^2} $$

The second signal is the gyration in the sagittal plane directly measured by the sensor: $\omega_y$.

We treat both signals, which are sampled at 100 Hz by the IMUs, as time series. If data is missing, we complete it using quadratic interpolation. The jerk time series and the gyration in the sagittal plane are respectively designed as J and Ω in the following analysis.

## Algorithm procedure

The algorithm is built in 4 parts, and an illustration of the whole process is proposed in Fig. 3.

Firstly, we estimate stride length using the autocorrelation method [32]. This enables us to identify a reference stride by comparing it to a pre-defined model stride for similarity using a targeted matrix profile algorithm [33]. Next, we use the jerk and gyration signals and apply a multiparametric Dynamic Time Warping (mDTW) algorithm to annotate the reference stride. Finally, we use correlation and mDTW to detect all GEs of the signal using the annotated stride as a template, following the same method as previously employed [10]. All these steps are fully automatic and are detailed below.

## First part: stride duration inference with autocorrelation

This section aims to estimate a consistent value for the average duration of a stride. Autocorrelation is a commonly used signal-processing technique that involves cross-correlating a signal with itself. It can be used to estimate the period of an imperfect periodic signal that does not contain a single dominant frequency [36].
<figure><img src="image_5.png" /><figcaption>**Fig. 3** Flowchart of the GE detection method. Schematic representation of the 4 parts of the algorithm. The color of the boxes is: red for input data, blue for the corresponding tools and illustrations, brown for intermediate steps, and green for the output result</figcaption></figure>

We considered the free accelerations and gyrations recorded by foot-level IMUs to be stationary and periodic depending on the regularity of the subject. We computed the autocorrelation for Ω and J components. The

estimated stride duration was determined by matching the first autocorrelation peak. We assumed that the expected values of the average stride duration were the same for each foot. To avoid overestimation, we chose
<figure><img src="image_6.png" /><figcaption>**Fig. 4** Autocorrelation signal. **A** Control subject. **B** Patient from the EVF cohort. The two graphs on the left show the preprocessed signals of interest for both feet. The righthand graph is the resulting multiparametric autocorrelation for each foot and gives the estimated return value of the duration of a stride (dot line)</figcaption></figure>

the shorter of the two stride estimates. This assumption does not mean that the steps have the same duration and therefore does not erase a potential asymmetry. An illustration of the signals and the peak detection process is provided in Fig. 4.

## Second part: reference stride isolation with matrix profile

Once the average duration *L* of a stride is estimated, we want to find a reference stride. Therefore, the most recurrent pattern of *L*-size must be extracted from the signal. Matrix Profile (MP) is a recent reference [37, 38] efficient for the pattern extraction task. This time series processing technique uses normalized Euclidean distance to calculate the similarity between subsequences of the original sequence. The resulting output highlights repeating patterns in the data sequence.

To adapt and personalize the pattern detection, so as the start and the end of the pattern corresponds to phenomena of interest, Dau et al. [39] proposed to add an annotation vector (AV). AV is a time series which is explicitly describing the preferred location or expected behavior of the pattern, thus limiting the risk of detecting insignificant patterns [40]. A low value indicates that the subsequence starting at this index is not a valuable pattern, and should therefore be rejected. Conversely, higher values mean that the subsequence at that location should

be favored for pattern detection. The combination of AV and MP leads to a corrected matrix profile (CMP).

In our algorithm, we computed a CMP from Ω and a dimensionless AV that favors locations in order to have large variations for **J** and Ω in the center of the search window. Our objective was to center the SwP. AV was defined as follows:

$$AV_i = \sum_{k=i+\frac{m}{3}}^{i+\frac{2m}{3}} \frac{\omega_k}{\omega_{max}} + \frac{j_k}{j_{max}}. \quad (1)$$

An illustration of pattern recognition by CMP using the example of gyration is shown in Fig. 5.

## Third part: reference stride annotation with DTW

The pattern isolated in the previous section corresponds to a complete stride, probably centered on the SwP. The next step is to annotate this reference stride with the best estimates of TO and HS. To do this, a model stride was used to annotate each reference stride using DTW.

**Model stride.** We extracted a “model stride” from our dataset of healthy subjects, which has all 4 stride events annotated. Specifically, TO and HS were annotated with the GR, while FC and IC were annotated with their respective events. FF and HO were estimated and are
<figure><img src="image_7.png" /><figcaption>**Fig. 5** Corrected matrix profile. A Control subject. B Patient from the EVF cohort. Top: gyration signal (blue) and jerk signal (orange). Bottom: CMP, the red star indicates the minimum value of the CMP and allows the detection of the pattern (black) and its nearest neighbor (red)</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**Fig. 6** Model stride. Stride from a healthy subject used as a model for all detections. A Gyration (blue) in the sagittal plane. B Total jerk (blue). For each figure, the 4 events of the stride are represented. TO and HS were given by the GR. FF and HO were visually estimated and given as an indication</figcaption></figure>
provided as an indication. The signals of interest corresponding to this stride are illustrated in Fig. 6.

**DTW.** The Dynamic Time Warping (DTW) algorithm is a distance measure that aligns and transforms two time series through a non-linear transformation to obtain an optimal match between them. Its objective is to determine a measure of their similarity and obtain a matching path between the points called the “warping path”. We opted for a multidimensional DTW (mDTW) taking into account both time series J and Ω. Following the recommendations of [41], we used a mDTW with dependence between signals, called mDTWd, using normalized Euclidean distance with normalized signals. Because of the probable presence of the SwP in the middle of the reference stride, we used an additional constraint with an Itakura parallelogram with radius $r = 2$ [42].

**Reference stride annotation.** To compare and annotate the reference stride with the model stride, we first shifted the model stride to ensure that the SwP was in the same position in both series. We then applied mDTWd to find the optimized path under constraints. Finally, we used this warping path to match the events of both series. We assumed that the last point of the subject's series that matched with the TO point of the model corresponded to the TO estimation, and the first point of the subject's series that matched with the HS point of the model corresponded to the HS estimation. Figure 7 illustrates the annotation protocol and an example of the result.

## Fourth part: segment the entire walk with a template-based detection

The annotated stride obtained at the end of the previous section is used as a reference for the detection of GE throughout the signal using the template-based method. The method used is based on the one described in the article by Dot et al. [10], which uses mDTW on the series while adapting the parameters due to degraded strides: $\lambda = 0.4$ and $\mu = 0.1$. At the end of this final part, all the detected strides should be completely annotated with the best findings of TO and HS, as shown in 8.

## Technical precisions

The algorithm was implemented with python 3.8, on the PyCharm 2022.3 IDE. In part 2, we used the compute function from the Matrix Profile Foundation's python package, with the default parameters. In parts 3 and 4, we used the python tslearn package [43] to compute mDTWd.

## Performance analysis

The accuracy of the proposed method is assessed by comparing the correctly detected times for HS and TO to

the annotations IC and FC of the GR gold standard. The following metrics were used:

* Events. As described before, the GEs of interest in the study are TO and HS.

* Annotated events. These are the events IC and FC annotated by the GR, considered the Gold Standard.

* Detected events. These are the events HS and TO detected by the algorithm between the beginning and the end of the gait experience on the mat.

* Recall (sensitivity). This is the proportion of events annotated by the GR that have been correctly detected by the algorithm. An annotated event is considered correctly detected if the duration between this annotated event and the nearest detected event of the same nature (TO for FC; HS for IC) does not exceed 20% of the duration of a stride. A detected event can be used only one time. Sensitivity is defined as the ratio between the number of correctly detected annotated events and the total number of annotated events.

* Precision. This is the proportion of detected events that effectively correspond to an annotated event. A detected event is considered to be correct if the duration between this detected event and the nearest annotated event of the same nature (FC for TO; IC for HS) does not exceed 20% of the duration of a stride. An annotated event can be used only one time. Precision is defined as the ratio between the number of correctly detected events and the total number of detected events.

* F1-score. This is the harmonic mean of precision and recall.

$$F1_{score} = 2 \times \frac{recall * precision}{recall + precision} \qquad (2)$$

* ΔTO. For a correctly detected TO event, it is the absolute difference in time (ms) between the corresponding annotated FC and the detected TO.

* ΔHS. For a correctly detected HS event, this is the absolute difference in time (ms) between the corresponding annotated IC and the detected HS.

* Mean ΔHS and Mean ΔTO. For each type of event, it is the average of the measured absolute differences for the correctly detected and annotated events.

This performance was then evaluated against the performance of the algorithm of Dot et al. [10].

## Statistical analysis

The main performance metric used to evaluate the method was the F1-score, which is a combined
<figure><img src="image_9.png" /><figcaption>**Fig. 7** Annotated reference stride. Top: healthy subject from the CS cohort. Bottom: patient from the EVF cohort. **A**, **B** mDTWd matrix between model stride (up) and reference stride (left) signals with the corresponding warping path (white line). **C**, **D** Annotation of the reference with the 4 GEs. Blue line: jerk. Yellow line: gyration</figcaption></figure>

measure of recall and precision. An F1-score of less than or equal to 0.95 was considered indicative of low performance. The second outcome measure

was the median absolute error in GE detection compared to the gold standard, which reflects accuracy. The method was compared to the state of the art.
<figure><img src="image_10.png" /><figcaption>**Fig. 8** Final gait segmentation. **A** Healthy subject from the CS cohort. **B** Patient from the EVF cohort. GEs detected by the algorithm were reported on the jerk signal (top). Gait phases deducted from GEs were reported on the gyration signal (bottom)</figcaption></figure>

For non-normally distributed data, such as ΔHS and Mean ΔTO, medians and interquartile ranges (IQRs) were reported, and the Wilcoxon-Mann-Whitney test (WMW-test) was used to evaluate the significance of the results. Differences were represented as relative values for visualization. The normality of the data was assessed with the Shapiro-Wilk test. For normally distributed data, means and standard deviations (SDs) were reported. All statistical analyses were computed with R Studio 2023.03.0-386.

# Results

## Participants

We included 13 CS individuals, 29 MS patients, and 21 EVF patients. The baseline characteristics of the subjects and patients are filled in Table 1.

To provide an overview of the quality of the data and gait characteristics, Table 2 presents the number of steps and the mean walking speed for each cohort. Figure 9 illustrates the distribution of walking speed within each cohort.

Figure 10 provides a detailed overview of the recorded dataset that is utilized in the subsequent analyses (rules are specified in the Methods section).

<table><caption>**Table 1** Baseline characteristics of each cohort</caption><thead><tr><th></th><th>CS (n = 13)</th><th>MS (n = 29)</th><th>EVF (n = 21)</th></tr></thead><tbody><tr><td>Sex (M/F)</td><td>6/7</td><td>13/16</td><td>9/12</td></tr><tr><td>Age (years)</td><td>26.6 (2.0)</td><td>59.2 (10.0)</td><td>54.0 (14.8)</td></tr><tr><td>Height (m)</td><td>1.69 (0.09)</td><td>1.69 (9.7)</td><td>1.68 (10.9)</td></tr><tr><td>Weight (kg)</td><td>63.3 (14.8)</td><td>67.5 (17.6)</td><td>71.2 (14.9)</td></tr><tr><td>EDSS</td><td>-</td><td>6 [2-7]</td><td>-</td></tr></tbody></table>

For age, height and weight, mean and standard deviations are given. Median and extreme values of EDSS are given for MS patients. There is no validated severity score for the EVF cohort, but it should be noted that the surgical indication for the equine varus foot is given in the most severe cases

CS control subjects, MS multiple sclerosis patients, EVF equino varus foot patients

<table><caption>**Table 2** Gait parameters</caption><thead><tr><th></th><th>CS (n = 13)</th><th>MS (n = 29)</th><th>EVF (n = 21)</th></tr></thead><tbody><tr><td>Speed in m/s (SD)</td><td>1.13 (0.11)</td><td>0.23 (0.12)</td><td>0.28 (0.15)</td></tr><tr><td>Total steps</td><td>8410</td><td>3442</td><td>4180</td></tr><tr><td>Steps per exp (IQR)</td><td>8 (7-8)</td><td>27 (22-36)</td><td>17 (13-22)</td></tr></tbody></table>

Number of steps, mean (SD) of gait speed, and median (IQR) number of steps per experience

CS control subjects, MS multiple sclerosis patients, EVF equino varus foot patients
<figure><img src="image_11.png" /><figcaption>**Fig. 9** Walking speed distribution for each cohort. Dot lines represent mean values</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>**Fig. 10** Flowchart of the data collected and analyzed in the study. Rules for deleting and correcting data are provided in Methods</figcaption></figure>

<table><caption>**Table 3** ΔTO and ΔHS of our main algorithm for each cohort</caption><thead><tr><th></th><th>CS (n = 16819)</th><th>MS (n = 6067)</th><th>EVF (n = 8951)</th></tr></thead><tbody><tr><td>F1</td><td>100</td><td>99.4</td><td>96.3</td></tr><tr><td>Recall (%)</td><td>100</td><td>99.7</td><td>96.7</td></tr><tr><td>Precision (%)</td><td>100</td><td>99.2</td><td>96.0</td></tr><tr><td>TO events</td><td>8410</td><td>3002</td><td>4381</td></tr><tr><td>Median ΔTO [IQR]</td><td>8 [3–15]</td><td>23 [10–50]</td><td>27 [15–48]</td></tr><tr><td>HS events</td><td>8409</td><td>3065</td><td>4570</td></tr><tr><td>Median ΔHS [IQR]</td><td>7 [3–12]</td><td>15 [7–30]</td><td>25 [10–50]</td></tr></tbody></table>

All the results are given in milliseconds

CS control subjects, MS multiple sclerosis patients, EVF equino varus foot patients, TO Toe-Off, HS Heel-Strike

Performance and accuracy of the detection method compared to gold-standard

The results of the detailed algorithm are presented in Table 3. For the CS cohort, the F1-score was 100%, indicating perfect and exact detection of all strides. Among the well-detected annotated strides, the median ΔTO was 8 ms (IQR [3–15] ms), and the median ΔHS was 7 ms (IQR [3–12] ms). For the MS cohort, the F1-score was 99.4%, with a recall of 99.7% and a precision of 99.2%. The median ΔTO was 23 ms (IQR [10–50] ms), and the median ΔHS was 15 ms (IQR [7–30] ms). For the EVF cohort, the F1-score was 96.3%, with a recall of 96.7% and
<figure><img src="image_13.png" /><figcaption>**Fig. 11** Boxplot of ΔHS and ΔTO. Each dot represents a correctly detected and annotated step</figcaption></figure>

a precision of 96.0%. The median ΔTO was 27 ms (IQR [15–48] ms), and the median ΔHS was 25 ms (IQR [10–50] ms).

The boxplot of ΔHS and ΔTO for the correctly detected and annotated steps of each cohort are presented in Fig. 11. The details for each patient or subject included in the study are provided for illustrative purposes in the Supplementary materials [see Additional file 1].

More detailed histograms are displayed in Fig. 12.

Performance and accuracy of the detection method compared to state-of-the-art

The recently validated Dot [10] algorithm uses the same protocol and the same sensor position, which allows

<figure><img src="image_14.png" /><figcaption>**Fig. 12** Histograms of ΔHS (A–C) and ΔTO (D–F) for each cohort. Dot lines represent the mean error</figcaption></figure>

<table><caption>**Table 4** ΔTO and ΔHS of state-of-the-art algorithm for each cohort</caption><thead><tr><th rowspan="2"></th><th rowspan="2"></th><th colspan="2">CS</th><th colspan="2">MS</th><th colspan="2">EVF</th></tr><tr><th>Value</th><th>p-value</th><th>Value</th><th>p-value</th><th>Value</th><th>p-value</th></tr></thead><tbody><tr><td rowspan="5">Dot 2020 [10]</td><td>F1-score (%)</td><td>100</td><td>–</td><td>99.1</td><td>–</td><td>95.7</td><td>–</td></tr><tr><td>Recall (%)</td><td>100</td><td>–</td><td>99.4</td><td>–</td><td>96.1</td><td>–</td></tr><tr><td>Precision (%)</td><td>100</td><td>–</td><td>98.8</td><td>–</td><td>95.4</td><td>–</td></tr><tr><td>Mean ΔTO [IQR]</td><td>13 [7–22]</td><td><strong>&lt; 0.0001</strong></td><td>15 [7–53]</td><td><strong>&lt; 0.0001</strong></td><td>20 [8–68]</td><td><strong>&lt; 0.0001</strong></td></tr><tr><td>Mean ΔHS [IQR]</td><td>10 [5–18]</td><td><strong>&lt; 0.0001</strong></td><td>23 [8–66]</td><td><strong>&lt; 0.0001</strong></td><td>43 [17–82]</td><td><strong>&lt; 0.0001</strong></td></tr></tbody></table>

All the results are given in milliseconds. When displayed, p-value is the result of the WMW-test with our full algorithm. F1-scores lower than 95% and p-values lower than 0.05 are displayed in bold

CS control subjects, MS multiple sclerosis patients, EVF equino varus foot patients, TO Toe-Off, HS Heel-Strike
<table><caption>**Table 5** ΔTO and ΔHS of alternative algorithms for each cohort</caption><thead><tr><th rowspan="2"></th><th rowspan="2"></th><th colspan="2">CS</th><th colspan="2">MS</th><th colspan="2">EVF</th></tr><tr><th>Value</th><th>p-value</th><th>Value</th><th>p-value</th><th>Value</th><th>p-value</th></tr></thead><tbody><tr><td rowspan="5">Test 1</td><td>F1-score (%)</td><td>100</td><td>–</td><td>99.1</td><td>–</td><td>95.7</td><td>–</td></tr><tr><td>Recall (%)</td><td>100</td><td>–</td><td>99.4</td><td>–</td><td>96.1</td><td>–</td></tr><tr><td>Precision (%)</td><td>100</td><td>–</td><td>98.8</td><td>–</td><td>95.4</td><td>–</td></tr><tr><td>Mean ΔTO [IQR]</td><td>8 [3–15]</td><td>0.801</td><td>30 [13–77]</td><td><strong>&lt; 0.0001</strong></td><td>31 [17–70]</td><td><strong>&lt; 0.0001</strong></td></tr><tr><td>Mean ΔHS [IQR]</td><td>8 [3–18]</td><td><strong>&lt; 0.0001</strong></td><td>19 [8–44]</td><td><strong>&lt; 0.0001</strong></td><td>38 [15–80]</td><td><strong>&lt; 0.0001</strong></td></tr><tr><td rowspan="5">Test 2</td><td>F1-score (%)</td><td><strong>56.4</strong></td><td>–</td><td><strong>49.2</strong></td><td>–</td><td><strong>57.2</strong></td><td>–</td></tr><tr><td>Recall (%)</td><td>56.9</td><td>–</td><td>48.6</td><td>–</td><td>57.1</td><td>–</td></tr><tr><td>Precision (%)</td><td>55.9</td><td>–</td><td>49.6</td><td>–</td><td>57.4</td><td>–</td></tr><tr><td>Mean ΔTO [IQR]</td><td>17 [7–71]</td><td><strong>&lt; 0.0001</strong></td><td>50 [18–177]</td><td><strong>&lt; 0.0001</strong></td><td>58 [23–177]</td><td><strong>&lt; 0.0001</strong></td></tr><tr><td>Mean ΔHS [IQR]</td><td>13 [5–67]</td><td><strong>&lt; 0.0001</strong></td><td>34 [10–166]</td><td><strong>&lt; 0.0001</strong></td><td>60 [20–171]</td><td><strong>&lt; 0.0001</strong></td></tr><tr><td rowspan="5">Test 3</td><td>F1-score (%)</td><td>97.9</td><td>–</td><td>98.2</td><td>–</td><td>95.2</td><td>–</td></tr><tr><td>Recall (%)</td><td>97.9</td><td>–</td><td>98.6</td><td>–</td><td>95.5</td><td>–</td></tr><tr><td>Precision (%)</td><td>97.9</td><td>–</td><td>98.0</td><td>–</td><td>94.9</td><td>–</td></tr><tr><td>Mean ΔTO [IQR]</td><td>33 [15–90]</td><td><strong>&lt; 0.0001</strong></td><td>42 [18–90]</td><td><strong>&lt; 0.0001</strong></td><td>57 [27–100]</td><td><strong>&lt; 0.0001</strong></td></tr><tr><td>Mean ΔHS [IQR]</td><td>33 [13–67]</td><td><strong>&lt; 0.0001</strong></td><td>32 [14–73]</td><td><strong>&lt; 0.0001</strong></td><td>57 [25–107]</td><td><strong>&lt; 0.0001</strong></td></tr></tbody></table>

All the results are given in milliseconds. When displayed, p-value is the result of the WMW-test with our full algorithm. F1-scores lower than 95% and p-values lower than 0.05 are displayed in bold

CS control subjects, MS multiple sclerosis patients, EVF equino varus foot patients, TO Toe-Off, HS Heel-Strike

us to use it as a reference to test the results of our algorithm. We applied it to our data set. For CS, the F1-score was unchanged at 100%. The median absolute error for TO was 13 ms (IQRs [7–22] ms) and the median absolute error for HS was 10 ms (IQRs [5–18] ms), which was significantly poorer than our performance (p-value < 0.0001). For MS and EVF, the F1-scores were satisfactory (< 95%) and the median deviations for HS and TO were significantly worse than for our algorithm (p-value <0.0001). All the results and tests are reported in Table 4.

## Ablation study

To assess the necessity of the mathematical tools used in parts 2–4, we implemented alternative algorithms that either removed these tools or replaced them with simpler ones. We then compared the results obtained with our original algorithm using a WMW-test. We present here 3 of the alternative algorithms that were tested.

* Test 1: without Jerk signal. Only the gyration signal was considered for the whole protocol.

* Test 2: without MP. We replaced the pattern detection with the MP algorithm with a random selection of a portion of the signal of the same duration, located between the beginning and the end of the gait on GR to ensure that a walking period was selected.

* Test 3: without DTW. We replaced the DTW-based method used for annotating the reference stride in part 3 with a correlation optimization method. Similarly, for part 4, the stride detection on the entire signal was performed solely using correlation without any readjustment by DTW.

Table 5 summarizes the results obtained, clearly demonstrating the relative importance of each of the tools used.

## Discussion

Gait analysis using IMU has gained widespread popularity, and several algorithms have been developed and demonstrated their efficacy in detecting gait events (GEs) of healthy individuals [4, 13, 24, 44]. In clinical settings, measuring gait performance provides valuable additional information about walking activity and spontaneous gait characteristics, such as in the follow-up of neurological patients [5, 18, 45] or in preoperative examinations [46, 47]. While some teams use only trunk wearable sensors that provide global features such as smoothness [48], a more precise analysis requires GE detection, which can be done with two separate IMUs on each lower limb [47].

Our algorithm provides automated and reliable GE detection, which is effective not only for healthy subjects but also for pathological gaits (precision ≥ 95%, recall ≥ 95%, and F1-score ≥ 95%). Other previously published techniques have shown similar F1-scores (Table 6). Hidden-Markov-Model [25], wavelet transform [49], and some rule-based methods have been shown to be effective among these techniques.
<table><caption>**Table 6** ΔStart (IC or HS) and ΔEnd (FC or TO) reported in the literature for healthy subjects and pathological gaits</caption><thead><tr><th>Publication</th><th>Subjects</th><th>F1-score (%)</th><th>ΔStart (ms)</th><th>ΔEnd (ms)</th></tr></thead><tbody><tr><td>Dot et al. 2020 [10]</td><td>Healthy</td><td>99</td><td>15 (18)</td><td>16 (13)</td></tr><tr><td>Flood et al. 2020 [50]</td><td>Healthy</td><td>99</td><td>16 (7)</td><td>40 (16)</td></tr><tr><td rowspan="3">Romijnders et al. 2021 [22]</td><td>Elderly</td><td>100</td><td>32</td><td>29</td></tr><tr><td>Hemiparetic</td><td>100</td><td>31</td><td>40</td></tr><tr><td>PD</td><td>100</td><td>33</td><td>40</td></tr><tr><td rowspan="3">Perez-Iribarra et al. 2020 [51]</td><td>Healthy</td><td>99</td><td>75 (40)</td><td>29 (24)</td></tr><tr><td>Hemiparetic</td><td>97</td><td>68 (42)</td><td>52 (39)</td></tr><tr><td>Myelopathic</td><td>96</td><td>58 (43)</td><td>54 (41)</td></tr><tr><td rowspan="4">Trojaniello et al. 2014 [26]</td><td>Elderly</td><td>100</td><td>10</td><td>20</td></tr><tr><td>Hemiparetic</td><td>100</td><td>17</td><td>21</td></tr><tr><td>PD</td><td>100</td><td>15</td><td>22</td></tr><tr><td>Choreic</td><td>100</td><td>12</td><td>18</td></tr><tr><td rowspan="2">Ji et al. 2019 [49]</td><td>Healthy</td><td>≥ 95</td><td>60</td><td>20</td></tr><tr><td>Hemiparetic</td><td>≥ 95</td><td>40</td><td>180</td></tr><tr><td rowspan="3">Vienne-Jumeau et al. 2020 [28]</td><td>Healthy</td><td>100</td><td>15 (7)</td><td>19 (9)</td></tr><tr><td>WA pMS<sup>a</sup></td><td>99</td><td>100 (60)</td><td>50 (40)</td></tr><tr><td>NA pMS<sup>b</sup></td><td>99</td><td>60 (70)</td><td>30 (40)</td></tr><tr><td rowspan="2">Storm et al. 2018 [52]</td><td>WA pMS<sup>a</sup></td><td>–</td><td>60 (20)</td><td>100 (50)</td></tr><tr><td>NA pMS<sup>b</sup></td><td>–</td><td>70 (30)</td><td>100 (30)</td></tr></tbody></table>

Regarding the median time error between detected events and GR annotated events, our method demonstrates results of below 10 ms in healthy subjects, which is consistent with the latest algorithms [22, 49, 50], including Deep Learning algorithms [23]. In MS and EVF pathological subjects, our results show moderate impairment and give acceptable results centered around 20 ms. However, most existing algorithms are flawed when analyzing pathological gaits in some neurological pathologies such as multiple sclerosis [28] and hemiplegic patients [47]. At last, some methods require training phases for each patient that may require additional equipment [28]. Although step detection seems to be performant for pediatric hemiplegic patients [53], it remains difficult for post-stroke hemiparetic patients [54].

Our algorithm is built on a Template-Based Approach that has already been successfully applied [29]. Until now, this approach required the implementation of step dictionaries that were not efficient enough for pathological gaits. Additionally, when these dictionaries were customized [28], they required the joint use of an instrumented mat as GR during the training phase, which compromised clinical deployment. To overcome this, our method extracts the template directly from each record. The results show that CMP described by VanBenschoten et al. [33] may be an important part in increasing the precision and accuracy of detection. The addition of DTW,

often used in HMM, has also increased detection performance as it does not depend on the time factor but only on the similarity of the signals [30]. Dot et al. [10] showed that using a single template based on gyration signals and associated with non-linear deformations may be sufficient to model the gait of healthy subjects, and our algorithm is consistent with this result. However, whereas Dot et al. did not efficiently detect GEs in highly pathological gaits, our method maintains satisfactory results in neurological patients. As suggested by [31], the use of mDTWd has shown better efficiency.

Our study may have some limitations. Firstly, only short straight-line gait has been studied, whereas the u-turn may provide valuable information in monitoring neurological pathologies [55, 56]. Secondly, the experiments took place in a safe, hospital environment. Even if these two conditions are suitable for the examination of gait in daily clinical practice, they do not reflect the patient's gait in a free environment and may have limitations when transposing the method to real-life gait recordings. Finally, the gold standard we used has limitations in analyzing highly pathological steps. The GR automated step detection is ineffective since it relies on a well-paced right-left alternation respecting a median line. Even the manual annotation of steps via the GR software with a video fails when patients do not have a classic HS-TO stride sequence. For instance, in the case of foot drop,

<footnote><sup>a</sup> WA-pMS: pMS needing a walking aid</footnote>

<footnote><sup>b</sup> NA-pMS: pMS not needing a walking aid</footnote>
the stride's initial contact will not always be the HS but could be a "Toe-Strike." Additionally, in some patients, the foot does not leave the ground due to an important motor deficit, yet the foot moves and no longer really carries the body's load. Bruening et al. suggests using different algorithms depending on the gait pattern [57]. For us, it is essential that one reproducible algorithm allows step detection for all gait patterns, particularly for longitudinal follow-up of operated patients, as surgery may significantly alter their gait. Furthermore, this raises the question of the step's definition. While some teams consider Initial Contact and Final Contact as genuine GEs, we prefer to consider HS and TO, which define step stability during the StP. Thus, for foot drop, Toe-Strike could be considered part of the SwP since the patient has not yet stabilized their foot on the ground. Considering these factors, template analysis by IMU complements contact analysis by instrumented mats or force platforms.

Another issue to consider is the localization of wearable sensors for gait analysis [9, 58]. Trojanello et al. and Romijnders et al. use a shank sensor, which may be more sensitive to the anterior-posterior acceleration movement during the static phase, for which the foot sensor does not provide any information [23, 26]. This location may be more suitable for detecting gait events. However, for the analysis of step width and asymmetry, the sensor located on the foot will be more sensitive to variations and thus provide more relevant information. It is therefore a compromise between detecting gait events and analyzing gait parameters. It could also be interesting to use all 4 sensors to combine their interests, even if this would make deployment of the measurement more complex.

## Conclusion

Our Adaptive Non-Linear Approach to Step Detection using IMU has proven to be effective in analyzing the gait of healthy individuals and some pathological gait, without the need for an annotated dictionary or the use of a gait recognizer. This innovative tool has the potential to enable real-time gait analysis of neurological patients and can be used as a routine clinical tool throughout their follow-up. Our next objective is to provide an instantaneous gait analysis that can be deployed in clinical routines.

## Abbreviations

<table><tr><td>IMU</td><td>Inertial measurement units</td></tr><tr><td>GE</td><td>Gait event</td></tr><tr><td>HO</td><td>Heel-off</td></tr><tr><td>TO</td><td>Toe-off</td></tr><tr><td>HS</td><td>Heel-strike</td></tr><tr><td>FF</td><td>Foot-flat</td></tr><tr><td>StP</td><td>Stance phase</td></tr><tr><td>SwP</td><td>Swing phase</td></tr><tr><td>DTW</td><td>Dynamic time warping</td></tr><tr><td>mDTW</td><td>Multiparametric dynamic time warping</td></tr></table>

<table><tr><td>mDTWd</td><td>Multiparametric dynamic time warping with dependence</td></tr><tr><td>MP</td><td>Matrix profile</td></tr><tr><td>CMP</td><td>Corrected matrix profile</td></tr><tr><td>AV</td><td>Annotation vector</td></tr><tr><td>CS</td><td>Control subject</td></tr><tr><td>MS</td><td>Multiple sclerosis</td></tr><tr><td>EVF</td><td>Equino varus foot</td></tr><tr><td>XS</td><td>MTw Awinda XSens®</td></tr><tr><td>GR</td><td>GAITRite® walkway</td></tr><tr><td>IC</td><td>Initial contact</td></tr><tr><td>FC</td><td>Final contact</td></tr><tr><td>IQR</td><td>Inter quartile range</td></tr><tr><td>SD</td><td>Standard deviation</td></tr></table>

## Supplementary Information

The online version contains supplementary material available at https://doi.org/10.1186/s12984-024-01405-x.

Supplementary Material 1.

## Acknowledgements

The authors would like to thank Albane Moreau, Mona Michaud, Chloe Massaad and Nicolas Vayatis for the useful discussions, data acquisition, and clinical annotation. This work was realized with grants from the IRME (Institut pour la Recherche sur la Moelle épinière et l'Encéphale).

## Author contributions

CV conceived the study and the statistical analysis and wrote the manuscript. NE conceived the study and wrote the manuscript. LO conceived the study and edited the manuscript. DR conceived the study and edited the manuscript. All authors contributed to refining the study protocol and approved the final manuscript.

## Funding

Not applicable.

## Availability of data and materials

The datasets generated for this study are available on request to the corresponding author.

## Declarations

### Ethics approval and consent to participate

This study was approved by the ethics committee "Protection of Persons North West III" (RCB ID: 2017-A01538-45)

### Competing interests

The authors declare that they have no competing interest.

### Author details

¹Université Paris Saclay, Université Paris Cité, ENS Paris Saclay, CNRS, SSA, INSERM, Centre Borelli, Gif-sur-Yvette, France. ²Université Paris Cité, Université Paris Saclay, ENS Paris Saclay, CNRS, SSA, INSERM, Centre Borelli, Paris, France.

³Service de Neurologie, Service de Santé des Armées, HIA Percy, Clamart, France. ⁴Service de Chirurgie Orthopédique, Traumatologique et Réparatrice des Membres, Service de Santé des Armées, HIA Percy, Clamart, France. ⁵Ecole du Val-de-Grâce, Service de Santé des Armées, Paris, France.

Received: 8 April 2023 Accepted: 11 June 2024

Published online: 18 June 2024

## References

1. Davis RB. Clinical gait analysis. IEEE Eng Med Biol Mag. 1988;7(3):35-40. https://doi.org/10.1109/51.7933.
2. Davies RJ, Parker J, McCullagh P, Zheng H, Nugent C, Black ND, Mawson S. A personalized self-management rehabilitation system for stroke survivors: a quantitative gait analysis using a smart insole. JMIR Rehabil Assist Technol. 2016;3(2):11. https://doi.org/10.2196/rehab.5449.

3. Vienne-Jumeau A, Quijoux F, Vidal P-P, Ricard D. Wearable inertial sensors provide reliable biomarkers of disease severity in multiple sclerosis: a systematic review and meta-analysis. Ann Phys Rehabil Med. 2020;63(2):138-47. https://doi.org/10.1016/j.rehab.2019.07.004.

4. Takeda R, Tadano S, Todoh M, Morikawa M, Nakayasu M, Yoshinari S. Gait analysis using gravitational acceleration measured by wearable sensors. J Biomech. 2009;42(3):223-33. https://doi.org/10.1016/j.jbiomech.2008.10.027.

5. Jarchi D, Pope J, Lee TKM, Tamjidi L, Mirzaei A, Sanei S. A review on accelerometry-based gait analysis and emerging clinical applications. IEEE Rev Biomed Eng. 2018;11:177-94. https://doi.org/10.1109/RBME. 2018.2807182.

6. Marin F, Lepetit K, Fradet L, Hansen C, Ben Mansour K. Using accelerations of single inertial measurement units to determine the intensity level of light-moderate-vigorous physical activities: technical and mathematical considerations. J Biomech. 2020;107: 109834. https://doi.org/10.1016/j.jbiomech.2020.109834.

7. Barrois R, Oudre L, Moreau T, Truong C, Vayatis N, Buffat S, Yelnik A, de Waele C, Gregory T, Laporte S, Vidal PP, Ricard D. Quantify osteoarthritis gait at the doctor's office: a simple pelvis accelerometer based method independent from footwear and aging. Comput Methods Biomech Biomed Eng. 2015;18(Suppl 1):1880-1. https://doi.org/10.1080/10255842. 2015.1072414.

8. Vienne A, Barrois RP, Buffat S, Ricard D, Vidal PP. Inertial sensors to assess gait quality in patients with neurological disorders: a systematic review of technical and analytical challenges. Front Psychol. 2017;8(MAY):1-12. https://doi.org/10.3389/fpsyg.2017.00817.

9. Niswander W, Kontson K. Evaluating the impact of imu sensor location and walking task on accuracy of gait event detection algorithms. Sensors. 2021;21(12):3989. https://doi.org/10.3390/s21123989.

10. Dot T, Quijoux F, Oudre L, Vienne-Jumeau A, Moreau A, Vidal PP, Ricard D. Non-linear template-based approach for the study of locomotion. Sensors (Switzerland). 2020;20(7):1-23. https://doi.org/10.3390/s20071939.

11. Murray MP. Gait as a total pattern of movement. Am J Phys Med. 1967;46(1):290-333.

12. Viel E. La Marche Humaine, la Course et Le Saut: Biomécanique, Explorations. Elsevier, France: Normes et Dysfonctionnements; 2000.

13. Pacini Panebianco G, Bisi MC, Stagni R, Fantozzi S. Analysis of the performance of 17 algorithms from a systematic review: Influence of sensor position, analysed variable and computational approach in gait timing estimation from IMU measurements. Gait Posture. 2018;66:76-82. https://doi.org/10.1016/j.gaitpost.2018.08.025.

14. Caldas R, Fadel T, Buarque F, Markert B. Adaptive predictive systems applied to gait analysis: a systematic review. Gait Posture. 2020;77:75-82. https://doi.org/10.1016/j.gaitpost.2020.01.021.

15. Lim ACY, Natarajan P, Fonseka RD, Maharaj M, Mobbs RJ. The application of artificial intelligence and custom algorithms with inertial wearable devices for gait analysis and detection of gait-altering pathologies in adults: a scoping review of literature. Digital Health 2022;8. https://doi. org/10.1177/20552076221074128.

16. Snijders AH, van de Warrenburg BP, Giladi N, Bloem BR. Neurological gait disorders in elderly people: clinical approach and classification. Lancet Neurol. 2007;6(1):63-74. https://doi.org/10.1016/S1474-4422(06)07678-0.

17. Fasano A, Mancini M. Wearable-based mobility monitoring: the long road ahead. Lancet Neurol. 2020;19(5):378-9. https://doi.org/10.1016/S1474- 4422(20)30033-8.

18. Hendriks MMS, Vos-van der Hulst M, Weijs RWJ, van Lotringen JH, Geurts ACH, Keijsers NLW. Using sensor technology to measure gait capacity and gait performance in rehabilitation inpatients with neurological disorders. Sensors. 2022;22(21):8387. https://doi.org/10.3390/s22218387.

19. Ji N, Zhou H, Guo K, Samuel OW, Huang Z, Xu L, Li G. Appropriate mother wavelets for continuous gait event detection based on time-frequency analysis for hemiplegic and healthy individuals. Sensors (Basel, Switzerland). 2019;19(19):3462. https://doi.org/10.3390/s19163462.

20. Maqbool HF, Husman MAB, Awad MI, Abouhossein A, Mehryar P, Iqbal N, Dehghani-Sanij AA. Real-time gait event detection for lower limb amputees using a single wearable sensor. In: Proceedings of the Annual

International Conference of the IEEE Engineering in Medicine and Biology Society, EMBS 2016;2016-Octob, 5067-5070. https://doi.org/10.1109/EMBC.2016.7591866.

21. Muthukrishnan N, Abbas JJ, Krishnamurthi N. A wearable sensor system to measure step-based gait parameters for Parkinson's disease rehabilitation. Sensors (Switzerland). 2020;20(22):1-13. https://doi.org/10.3390/S20226417.

22. Romijnders R, Warmerdam E, Hansen C, Welzel J, Schmidt G, Maetzler W. Validation of IMU-based gait event detection during curved walking and turning in older adults and Parkinson's disease patients. J Neuroeng Rehabil. 2021;18(1):28. https://doi.org/10.1186/s12984-021-00828-0.

23. Romijnders R, Warmerdam E, Hansen C, Schmidt G, Maetzler W. A deep learning approach for gait event detection from a single Shank-Worn IMU: validation in healthy and neurological cohorts. Sensors. 2022;22(10):3859. https://doi.org/10.3390/s22103859.

24. Prasanth H, Caban M, Keller U, Courtine G, Ijspeert A, Valleray H, von Zitzewitz J. Wearable sensor-based real-time gait detection: a systematic review. Sensors. 2021;21(8):1-28. https://doi.org/10.3390/s21082727.

25. Taborji J, Rossi S, Palermo E, Patanè F, Cappa P. A novel HMM distributed classifier for the detection of gait phases by means of a wearable inertial sensor network. Sensors (Switzerland). 2014;14(9):16212-34. https://doi.org/10.3390/s140916212.

26. Trojaniello D, Cereatti A, Pelosi E, Avanzino L, Mirelman A, Hausdorff JM, DellaCroce U. Estimation of step-by-step spazio-temporal parameters of normal and impaired gait using shank-mounted magneto-inertial sensors. J Neuroeng Rehabil. 2014;11:152.

27. Barth J, Oberndorfer C, Pasluosta C, Schülein S, Gassner H, Reinfelder S, Kugler P, Schuldhaus D, Winkler J, Klucken J, Eskofier BM. Stride segmentation during free walk movements using multi-dimensional subsequence dynamic time warping on inertial sensor data. Sensors (Switzerland). 2015;15(3):6419-40. https://doi.org/10.3390/s150306419.

28. Vienne-Jumeau A, Oudre L, Moreau A, Quijoux F, Edmond S, Dandrieux M, Legendre E, Vidal PP, Ricard D. Personalized template-based step detection from inertial measurement units signals in multiple sclerosis. Front Neurol. 2020;11:261. https://doi.org/10.3389/fneur.2020.00261.

29. Oudre L, Barrois-Müller R, Moreau T, Truong C, Vienne-Jumeau A, Ricard D, Vayatis N, Vidal PP. Template-based step detection with inertial measurement units. Sensors (Switzerland). 2018;18(11):1-17. https://doi.org/10.3390/s18114033.

30. Mantilla J, Oudre L, Barrois R, Vienne Á, Ricard D. Template-DTW based on inertial signals: preliminary results for step characterization. In: Annual International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE Engineering in Medicine and Biology Society. Annual International Conference 2017;2017: 2267-2270. https://doi.org/10.1109/EMBC.2017.8037307

31. Shokoohi-Yekta M, Hu B, Jin H, Wang J, Keogh E. Generalizing DTW to the multi-dimensional case requires an adaptive approach HHS Public Access. Data Min Knowl Discov. 2017;31(1):1-31. https://doi.org/10.1007/s10618-016-0455-0.

32. Santos J, Costa A, Nicolau MJ. Autocorrelation analysis of accelerometer signal to detect and count steps of smartphone users. In: 2019 International Conference on Indoor Positioning and Indoor Navigation, IPIN 2019.19. https://doi.org/10.1109/IPIN.2019.8911755.

33. Van Benschoten A, Ouyang A, Bischoff F, Marrs T (2020) MPA: a novel cross-language API for time series analysis. J Open Sour Softw. 5(49), 2179. https://doi.org/10.21105/joss.02179

34. Bilney B, Morris M, Webster K. Concurrent related validity of the GAITrite® walkway system for quantification of the spatial and temporal parameters of gait. Gait Posture. 2003;17(1):68-74. https://doi.org/10.1016/S0966-6362(02)00053-X.

35. Storm FA, Cesareo A, Reni G, Biffi E. Wearable inertial sensors to assess gait during the 6-minute walk test: a systematic review. Sensors. 2020;20:2660. https://doi.org/10.3390/S20092660.

36. Taylor D. Use of autocorrelation as an analytic strategy for describing pattern and change. Time-Ser Anal. 1990;12(2):254-61.

37. Yeh C-CM, Zhu Y, Ulanova L, Begum N, Ding Y, Dau HA, Silva DF, Mueen A, Keogh E. Matrix profile i: all pairs similarity joins for time series: a unifying view that includes motifs, discords and shapelets. In: 2016 IEEE 16th International Conference on Data Mining (ICDM), 2016; pp. 1317-1322. https://doi.org/10.1109/ICDM.2016.0179.
38. Zhu Y, Zimmerman Z, Senobari NS, Yeh C-CM, Funning G, Mueen A, Brisk P, Keogh E. Matrix profile ii: Exploiting a novel algorithm and gpus to break the one hundred million barrier for time series motifs and joins. In: 2016 IEEE 16th International Conference on Data Mining (ICDM), 2016. pp. 739–748. https://doi.org/10.1109/ICDM.2016.0085

39. Dau HA, Keogh E. Matrix profile V: a generic technique to incorporate domain knowledge into motif discovery. Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining Part. 2017;F1296:125–34. https://doi.org/10.1145/3097983.3097993.

40. Saria S, Duchi A, Koller D. Discovering deformable motifs in continuous time series data. In: Walsh T, editor. IJCAI 2011, Proceedings of the 22nd International Joint Conference on Artificial Intelligence, Barcelona, Catalonia, Spain, 2011;July 16-22, 2011, pp. 1465–1471. UCAI/AAAI. https://doi.org/10.5591/978-1-57735-516-8/IJCAI11-247.

41. Dau HA, Keogh E, Barth J, Oberndorfer C, Pasluosta C, Schülein S, Gassner H, Reinfelder S, Kugler P, Schuldhaus D, Winkler J, Klucken J, Eskofier BM, Zhang Z, Tavenard R, Bailly A, Tang X, Tang P, Corpetti T. Stride segmentation during free walk movements using multi-dimensional subsequence dynamic time warping on inertial sensor data. In: Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 2017;15(3):6419–40. https://doi.org/10.3390/s150306419.

42. Itakura F. Minimum prediction residual principle applied to speech recognition. IEEE Trans Acoust Speech Signal Process. 1975;23(1):67–72. https://doi.org/10.1109/TASSP.1975.1162641.

43. Tavenard R, Faouzi J, Vandewiele G, Divo F, Androz G, Holtz C, Payne M, Yurchak R, Rußwurm M, Kolar K, Woods E. Tslearn, a machine learning toolkit for time series data. J Mach Learn Res. 2020;21:1–6.

44. Liu T, Inoue Y, Shibata K. Development of a wearable sensor system for quantitative gait analysis. Measure J Int Measure Confederat. 2009;42(7):978–88. https://doi.org/10.1016/j.measurement.2009.02.002.

45. Vienne A, Barrois RP, Buffat S, Ricard D, Vidal PP. Inertial sensors to assess gait quality in patients with neurological disorders: a systematic review of technical and analytical challenges. Front Psychol. 2017;8(MAY):1–12. https://doi.org/10.3389/fpsyg.2017.00817.

46. Cormier C, Sourisseau C, Montane E, Scandella M, Castel-Lacanal E, Boisezon XD, Marque P, Gasq D. Respective contributions of instrumented 3D gait analysis data and tibial motor nerve block on presurgical spastic equinus foot assessment: a retrospective study of 40 adults. Front Neurol. 2022;13(May):1–12. https://doi.org/10.3389/fneur.2022.862644.

47. De l'Escalopier N, Voisard C, Michaud M, Moreau A, Jung S, Tervil B, Vayatis N, Oudre L, Ricard D. Evaluation methods to assess the efficacy of equinovarus foot surgery on the gait of post-stroke hemiplegic patients: a literature review. Front Neurol. 2022;13:1042667. https://doi.org/10.3389/fneur.2022.1042667.

48. Mizuike C, Ohgi S, Morita S. Analysis of stroke patient walking dynamics using a tri-axial accelerometer. Gait Posture. 2009;30(1):60–4. https://doi.org/10.1016/j.gaitpost.2009.02.017.

49. Ji N, Zhou H, Guo K, Samuel OW, Huang Z, Xu L, Li G. Appropriate mother wavelets for continuous gait event detection based on time-frequency analysis for hemiplegic and healthy individuals. Sensors (Switzerland). 2019;19(16):1–18. https://doi.org/10.3390/s19163462.

50. Flood MW, O'Callaghan BPF, Lowery MM. Gait event detection from accelerometry using the Teager-Kaiser energy operator. IEEE Trans Biomed Eng. 2020;67(3):658–66. https://doi.org/10.1109/TBME.2019.2919394.

51. Perez-Ibarra JC, Siqueira AAG, Krebs HI. Real-time identification of gait events in impaired subjects using a single-IMU foot-mounted device. IEEE Sens J. 2020;20(5):2616–24. https://doi.org/10.1109/JSEN.2019.2951923.

52. Storm FA, Nair KPS, Clarke AJ, Van der Meulen JM, Mazzà C. Free-living and laboratory gait characteristics in patients with multiple sclerosis. PloS One. 2018;13(5): e0196463. https://doi.org/10.1371/journal.pone.0196463.

53. Abaid N, Cappa P, Palermo E, Petrarca M, Porfiri M. Gait detection in children with and without hemiplegia using single-axis wearable gyroscopes. PLoS ONE. 2013;8(9):1–8. https://doi.org/10.1371/journal.pone.0073152.

54. Yang S, Zhang J-T, Novak AC, Brouwer B, Li Q. Estimation of spatio-temporal parameters for post-stroke hemiparetic gait using inertial sensors. Gait Posture. 2013;37(3):354–8. https://doi.org/10.1016/j.gaitpost.2012.07.032.

55. Warmerdam E, Hausdorff JM, Atrsaei A, Zhou Y, Mirelman A, Aminian K, Espay AJ, Hansen C, Evers LJW, Keller A, Lamoth C, Pilotto A, Rochester

L, Schmidt G, Bloem BR, Maetzler W. Long-term unsupervised mobility assessment in movement disorders. Lancet Neurol. 2020;19(5):462–70. https://doi.org/10.1016/S1474-4422(19)30397-7.

56. Barrois RPM, Ricard D, Oudre L, Tili L, Provost C, Vienne A, Vidal PP, Buffat S, Yelnik AP. Observational study of 180 turning strategies using inertial measurement units and fall risk in poststroke hemiparetic patients. Front Neurol. 2017;8(MAY):1–11. https://doi.org/10.3389/fneur.2017.00194.

57. Bruening DA, Ridge ST. Automated event detection algorithms in pathological gait. Gait Posture. 2014;39(1):472–7. https://doi.org/10.1016/j.gaitpost.2013.08.023.

58. Ben Mansour K, Rezzoug N, Gorce P. Analysis of several methods and inertial sensors locations to assess gait parameters in able-bodied subjects. Gait Posture. 2015;42(4):409–14. https://doi.org/10.1016/j.GAITPOST.2015.05.020.

## Publisher's Note

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