Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2021 Aug 1.
Published in final edited form as: IEEE Trans Biomed Eng. 2019 Nov 25;67(8):2132–2144. doi: 10.1109/TBME.2019.2955423

Gait Cycle Validation and Segmentation using Inertial Sensors

GV Prateek, Pietro Mazzoni, Gammon M Earhart, Arye Nehorai
PMCID: PMC7305840  NIHMSID: NIHMS1593859  PMID: 31765301

Abstract

In this paper, we develop an algorithm to automatically validate and segment a gait cycle in real time into three gait events, namely midstance, toe-off, and heel-strike, using inertial sensors. We first use the physical models of sensor data obtained from a foot-mounted inertial system to differentiate stationary and moving segments of the sensor data. Next, we develop an optimization routine called sparsity-assisted wavelet denoising (SAWD), which simultaneously combines linear time invariant filters, orthogonal multiresolution representations such as wavelets, and sparsity-based methods, to generate a sparse template of the moving segments of the gyroscope measurements in the sagittal plane for valid gait cycles. Thereafter, to validate any moving segment as a gait cycle, we compute the root-mean-square error between the generated sparse template and the sparse representation of the moving segment of the gyroscope data in the sagittal plane obtained using SAWD. Finally, we find the local minima for the stationary and moving segments of a valid gait cycle to detect the gait events. We compare our proposed method with existing methods, for a fixed threshold, using real data obtained from three groups, namely controls, participants with Parkinson disease, and geriatric participants. Our proposed method demonstrates an average F1 score of 87.78% across all groups for a fixed sampling rate, and an average F1 score of 92.44% across all Parkinson disease participants for a variable sampling rate.

Keywords: Gait validation, gait segmentation, gait phases, sparsity, pattern recognition, zero-phase filters, convex optimization, wavelets, denoising, accelerometers, gyroscopes, inertial sensors

I. Introduction

MOVEMENT disorders are common in the general elderly population, and the prevalence increases with age, from 10% between 60 to 69 years to more than 60% in those over 80 years [1], [2]. The evaluation of movement disorders includes clinical observations and assessment of gait, both of which may guide the choice of therapies and rehabilitation strategies [3].

In the last decade, gait analysis has moved away from equipment-intensive, laboratory-based analyses toward the use of wearable sensors. Several gait segmentation methods for ambulatory gait analysis using wearable technology have been developed, with varying success [4], [5]. These methods employ sensing modalities such as electromyography (EMG) sensors [6], force-sensitive resistor (FSR) sensors [7]–[9], pressure sensors [10], [11], inertial sensors [12]–[16], or a combination of two or more sensing modalities [17]–[22]. Note that the granularity of a gait segmentation method, i.e., the number of phases of a gait cycle detected, varies with the choice of sensing modalities. In the case of inertial sensors, the existing methods are based on thresholding sensor measurements [12]–[14], [17]–[19], [21], template matching via dynamic time warping [16], or machine learning based methods such as hidden Markov models [15], [22]. Across all these methods, gyroscope measurements in the sagittal plane are the best choice for gait segmentation because the measurements contain typical time-series patterns such as “valleys,” “peaks,” and “plateaus.” These patterns are respectively, toe-off and heel-strike, mid-swing, and midstance [16]. While thresholding methods work well in practice, these methods do not have a mechanism to verify and validate the observable patterns of the gyroscope signal in the sagittal plane, which leads to low precision. As an alternative, dynamic time warping is a pattern matching method that computes a similarity measure between a template representing a valid gait cycle and an input sequence [23]. However, the threshold required to validate an input sequence as a gait cycle is not fixed and exhibits a large variance [24]. Yet another alternative, machine learning methods, requires large samples of training data across many participants and manual segmentation of gait phases, depending on the granularity of the task, to label the training data. Moreover, it is computationally expensive to learn the parameters of the machine learning task.

To overcome these drawbacks, we propose a modular approach that employs pattern matching and thresholding, to validate and detect three gait events in the gait cycle, namely midstance, toe-off, and heel-strike. To identify the data as stationary or moving, in the detection module, we first use physical models that describe zero-velocity events or stationary events of the sensor data obtained from a foot-mounted inertial system. Next, in the gait cycle validation and segmentation module, to generate a sparse representation of the moving segments of the gyroscope measurements in the sagittal plane for valid gait cycles, we develop a computationally efficient algorithm called sparsity-assisted wavelet denoising (SAWD). In SAWD, we simultaneously combine linear time-invariant filters, wavelets, and sparsity-based methods to extract a discrete wavelet transform (DWT) coefficient vector as a sparse representation of the moving segment of the gyroscope measurements in the sagittal plane. The reconstructed signal obtained from the extracted DWT coefficient vector is smooth and preserves the typical observable patterns, such as “valleys” and “peaks,” of a valid gait cycle for the nonstationary segments of the gyroscope signal in the sagittal plane. We generate a template of the DWT coefficient vector by taking the average of the DWT coefficient vectors obtained using the SAWD algorithm for all valid gait cycles of a given trial. Unlike the existing methods that require large amount of training data, we show that our template generation task requires a small number of valid gait cycles as training data. Thereafter, to validate any moving segment as a gait cycle, we compute the root-mean-square error between the generated template and the sparse representation of the moving segment of the gyroscope data in the sagittal plane, obtained using the SAWD algorithm. If the root-mean-square error is less than a fixed threshold, then the gait cycle is valid. Finally, we find the local minima for the stationary and moving segments of a valid gait cycle to identify toe-off and heel-strike gait events. To demonstrate the robustness of our proposed method, we herein generate the DWT coefficient vector using inertial sensor data from a healthy participant and evaluate the method’s performance on data obtained from controls, participants with Parkinson disease, geriatric participants. In addition, we also show the threshold-invariance property of our proposed method across different sampling rates.

The main contribution of our work is the gait validation and segmentation module. The purpose of the detection module is to segment the inertial sensor data as stationary or non-stationary events. There are several advantages of developing a modularity-based approach for validating and segmenting a gait cycle in real time. The ability to incorporate the gait cycle validation and segmentation module into the existing zero-velocity aided foot-mounted inertial navigation systems which estimates the position, velocity, and orientation of the foot and accurately identify phases of the gait that are affected [25], [26]. The development of novel cueing strategies for mitigating disabling motor symptoms, such as freezing of gait in Parkinson disease [27]–[29]. Moreover, the proposed algorithm is computationally inexpensive, which makes it feasible to implement a real-time system that can validate as well as segment the inertial sensor data into three gait events, namely midstance, toe-off, and heel-strike. Section II describes the background (i.e., previously published work) required for detecting zero-velocity or stationary segments of sensor data from a foot-mounted inertial system. Section III, our main contribution, develops an algorithm to validate a gait cycle and detect toe-off and heel-strike events using the non-stationary gyroscope measurements in the sagittal plane. Section IV presents an illustrative example to demonstrate the robustness of our proposed method. Section V compares the results of our proposed method with some existing methods. Section VI presents the conclusions and directions for possible future work.

Notations

The following general notation will be used throughout the paper. Bold uppercase and lowercase letters denote a matrix and vector, respectively. Superscript/subscript a and ω represent accelerometer and gyroscope signals, respectively. Uppercase letters that are not bold denote scalars. For any matrix A we use, AT and A−1 to denote the transpose and inverse, respectively. IN represents an N × N identity matrix. The norms || · ||2 and || · ||1 indicate the 2 and 1 norms, respectively.

II. Background

A. Gait Events [30]

There are two main components of a gait cycle: stance and swing. A typical gait cycle for a healthy adult consists of 62% stance and 38% swing phase. These two gait phases are further divided into eight events: Five (heel-strike, flat-foot, midstance, heel-off, and toe-off) during the stance phase, and three (acceleration, midswing, and deceleration) occur during the swing phase [30]. In this work, we use gyroscope measurements in the sagittal plane to detect toe-off and heel-strike events of the stance phase of a gait cycle. The location of the toe-off and heel-strike events detected using the gyroscope signal in the sagittal plane vary depending on the location of the sensor on the foot [12]–[22]. With the help of FSR and inertial sensors, it was verified in [12], [13] that the local minima of the gyroscope signal in the sagittal plane represent the toe-off and heel-strike events when the sensor is attached to the instep region of the foot.

B. Zero-velocity Events [31], [32]

In this subsection, we provide a brief background of the physical models of the inertial sensor data obtained from a foot-mounted inertial system to segment the data as stationary or moving. If yka3×1 and ykω3×1 denote the measurements of a three-axis accelerometer and a three-axis gyroscope, respectively, at time instant k, then these measurements can be modeled as

yka=ska+ekaykω=skω+ekω. (1)

Here, ska and skω denote the true specific force and angular velocity experienced by the accelerometer and gyroscope, respectively. Further, eka and ekω denote the measurement errors of the accelerometer and gyroscope, which are assumed to be white, mutually uncorrelated, and Gaussian distributed with zero mean and covariance matrices σa2I3 and σω2I3, respectively. To distinguish stationary from non-stationary instances, we use the zero-velocity detector. We define two hypotheses, H0 and H1, as follows:

H0:=SensorismovingH1:=Sensorisstationary. (2)

Mathematically, the signal model for the two hypotheses in (2) can be written as

H0:{kΩW:skagvakΩW:skω0H1:{kΩW:ska=gva,kΩW:skω=0, (3)

where g is the Earth’s gravity, va is the direction of the gravity vector (which is unknown), and ΩW is a window of size W consisting of the time samples {k, …, k + W − 1}. Given the signal model in (3), it can be shown that the generalized loglikelihood ratio test, denoted by Tk(ya, yω) at time index k, for detecting zero-velocity event intervals is given by

1WkΩW{1σω2ykω22+1σa2ykagy¯ay¯a22}H1<γD, (4)

where ya=[(yka)T,,(yk+W1a)T]T3N×1, yω=[(ykω)T,,(yk+W1ω)T]T3N×1, y¯a=(1/W)kΩWyka3×1, and γD is the detector threshold. The derivation of (4) can be found in [31] and [32, Appendix B]. While [31] proposes a zero-velocity event interval detector, [32] develops a two-step detector to detect zero-velocity and trembling event intervals which are associated with freezing of gait patterns in Parkinson disease. The goal of the zero-velocity detectors in [31] and [32] is to detect the stationary segments of the inertial sensor data using the raw measurements from the accelerometer and gyroscope sensors. Furthermore, it is also possible to use only gyroscope measurements to identify foot-mounted inertial sensor data as stationary or non-stationary regions [33]–[35]. In this work, we define a midstance event as the time instance under H1 when Tk(ya, yω) is minimum, i.e., if ΩMi is a segment of inertial sensor data of variable length Mi > 0.1 seconds, for the i-th stride under H1, then the midstance event is mathematically expressed as

MSiargmink,kΩMiTk(ya,yω). (5)

We choose the time index when Tk(ya, yω) is minimum as the midstance event because during a midstance event the foot is completely stationary. Note that previous works [12], [15], [36] identified midstance phase of a gait cycle. For example in [12], the region between the terminal contact (heel-strike event) and initial contact (toe-off event) is defined as a stance phase. A likewise definition was used in [15] to segment a gait cycle. In [36], the zero-velocity events or updates are identified as midstance phase. In (5), we define midstance event as a point in the the midstance phase with the lowest energy obtained using the test statistic in (4).

III. Gait Cycle Validation and Segmentation

In this section, we develop a new approach to validate a gait cycle and detect gait events such as toe-off and heel-strike, using the gyroscope sensor data in the sagittal plane. The proposed algorithm is applied only to the regions of the sensor data when the sensor is moving, i.e., when hypothesis H0 in (2) is true. Our goal is to extract a sparse representation of the segments of the gyroscope signal for valid gait cycles.

A. Discrete Wavelet Transform

Multiresolution orthogonal representations, such as discrete wavelet transform (DWT), are widely used in a variety of signal and image processing applications [37]. Wavelet coefficients are computed by integrating the product of a signal and oscillating functions obtained by stretching and translating a locally oscillating basis function, referred to as a wavelet [38]. Because of their low computational complexity and high accuracy in representing signals, wavelets are used in many applications, such as compression, denoising, and pattern recognition [38].

Let xN×1 be an N-dimensional vector. To model x in wavelet-domain, we use windowed discrete wavelet transform (WDWT). The WDWT coefficients, denoted by kU×V, depend on the window length, the windows overlap factor, and the number of levels of the wavelet decomposition. In our work, we define Ψ:U×VN (the synthesis equation of WDWT) as

Ψk:=WDWT1(k), (6)

whereas Ψ:NU×V (the analysis equation of WDWT) is defined as

Ψx:=WDWT(x). (7)

In this work, the length of the window U depends on the sampling frequency Fs, and is given as U = 2J, where J is the smallest positive integer for which U ⩾ Fs. The value of J determines the maximum levels of wavelet decomposition. The length of V depends on the percentage of overlap between two consecutive windows and generates an overcomplete dictionary, k. If V = 1, then WDWT is the same as DWT. Furthermore, WDWT in (6) and (7) satisfies a generalized version of Parseval’s identity [38], [39], i.e., ||Ψk|| = ||x||, and demonstrates the perfect reconstruction property, i.e., ΨΨT = I.

B. Zero-Phase Filters as Matrices

Linear time-invariant filters are easy to implement and are also efficient, especially when the frequency band of the signal of interest is known. However, when designed as matrices and used in batch-mode processing, these filters are computationally expensive where the complexity increases as the number of samples increase. To overcome the computational load, the authors in [40], [41] developed computationally efficient zero-phase noncausal high-pass and low-pass recursive filter designs as banded Toeplitz matrices. The banded Toeplitz allows using fast solvers for a banded system of linear equations. Further, the zero-phase property allows employing these filters in an optimization framework as matrix operators, without introducing any phase distortions from the filter. We denote the zero-phase low-pass filter matrix operator as LPFω0(), where

LPFω0(x):=Lx=A1Cx. (8)

Here, 0 ⩽ ω0 ⩽ 1/2 is the normalized 3dB cutoff frequency of the low-pass filter, and AN×N and CN×N are banded Toeplitz matrices [40], [41].

C. Sparsity-Assisted Wavelet Denoising (SAWD)

Let yωsN×1 denote the measured gyroscope signal segment under hypothesis H0, where the superscript ωs indicates measurement in the sagittal plane. The length of the signal N depends on the speed of the foot and the threshold γd of the zero-velocity event interval detector in (4), and varies with every gait cycle. We begin by scaling yωs so that its amplitude ∊ [−1, 1]. If ys denotes the scaled gyroscope signal, then

ys=2[yωsmax(yωs)max(yωs)min(yωs)]1, (9)

where max(·) and min(·) are the maximum and minimum of the input vector. In the next step, we use a 1D linear interpolation filter on ys so that the length of the interpolated signal is equal to the sampling rate. Let y denote the 1D linear interpolated signal, and then

y=interp1(ys,t1,t2), (10)

where interp1 is the 1D linear interpolation function in MATLAB or Python, and t1 and t2 are vectors containing sample points of length N and Fs, respectively. The scaling step follows the interpolation step, and these two steps cannot be interchanged. Note that in the signal preprocessing step (scaling and interpolating), the gyroscope signal preserves the patterns of interest of a valid gait cycle. The preprocessed signal is only used for validating a gait cycle whereas the scaled non-stationary segment is used for determining the toe-off and heel-strike events because interpolation does not preserve the location of local minima. In the next step, we minimize a cost function to extract the DWT coefficients of a smoothed segment of a valid gait cycle so that it preserves the typical observable patterns. In particular, we solve the following optimization problem:

argmink{12L(yΨk)22}, (11)

where L is the low-pass filter in (8) with a normalized cutoff frequency ω0, and Ψk is the synthesis equation of the WDWT in (6). Note that the optimization problem in (11) is the standard least-squares problem and has a closed-form expression. Solving (11) gives the set of DWT coefficients required to reconstruct the low-frequency signal of the scaled gyroscope measurement vector. However, many entries of the DWT coefficient matrix k are close to zero and do not significantly contribute in the reconstruction of the low-frequency signal. Therefore, we introduce a regularization term to reduce the number of DWT coefficients required to represent the low-frequency signal. The cost function of the modified optimization problem, denoted by C(y, k), is given as

C(y,k)=argmink{12L(yΨk)22+λk1}, (12)

where λ > 0 is the regularization parameter. The first term in (12) is the data fidelity term, which is same as (11), whereas the second term is the regularization term on the dictionary, k, of DWT coefficients representing the low-frequency signal. In (12), we simultaneously combine low-pass filtering, wavelet representation, and a sparsity-inducing norm. We apply the alternative direction method of multipliers (ADMM) [42, Chapter 3] to iteratively minimize the cost function in (12). We begin by decoupling the cost function in (12) using the Douglas-Rachford variable splitting method [43]. The cost can be rewritten as

argmink,u{12L(yΨu)22+λk1},suchthatu=k. (13)

Applying the augmented Lagrangian [42] to (13) we get the following iterative optimization routine:

repeat:

uargminu{12L(yΨu)22+μ2ukd22}, (14a)
kargmink{λk1+μ2ukd22}, (14b)
dd(uk), (14c)

until convergence,

where μ > 0 determines the rate of convergence and does not affect the final value of the cost function in (12). The equation (14a) is the standard least-squares problem, whose solution is given as

u(ΨLLΨ+μIN)1(ΨLLy+μ(k+d)), (15)

where we use the perfect reconstruction property of wavelets, i.e., ΨΨT = IN. Expanding (ΨTLT + μI)−1 using the matrix inversion lemma [44], we can further simplify (15) as

(ΨLLΨ+μIN)1=(ΨC(AA)1CΨ+μIN)1=1μ(IΨCG1ΨC), (16)

where G = (μAAT + CCT) is a banded matrix. Therefore, (15) can be written as

u1μ[IΨCG1ΨC](ΨLLy+μ(k+d)). (17)

The least-squares solution in (17) can be further simplified as a two-step iterative problem and is given as

g1μΨ(C(AA)1Cy)+(k+d) (18a)
ugΨ(CG1CΨ(g)). (18b)

The solution to (14b) is the solution to the least absolute shrinkage and selection operator (LASSO) problem [45] and is expressed as

ksoft(ud,λ/μ), (19)

where the soft-threshold function is defined as

soft(x,T):={xT(x/|x|),|x|>T0,|x|T. (20)

The complete algorithm is called sparsity-assisted wavelet denoising and is listed as Algorithm 1.a Note that the matrix G is always invertible when the degree of the low-pass filter is of the third-order or lower [40], [41], [46].

Remark: The convergence of the Douglas-Rachford splitting and the alternating direction of multipliers demonstrates a linear convergence rate [47]. Because of the linear convergence rate of the ADMM approach, the computational complexity of our proposed method does not depend on the length of the signal or the sampling rate, unlike existing methods.

Algorithm 1.

Sparsity-Assisted Wavelet Denoising (12)

graphic file with name nihms-1593859-t0006.jpg

D. Gait Cycle Validation and Segmentation

We generate a template of the DWT coefficients by taking the average of the DWT coefficients obtained by solving (12) for valid gait cycle segments of gyroscope data in the sagittal plane. If kT denotes the template of the DWT coefficients, then

kT=1Mi=1Mki, (21)

where M represents the number of valid gait cycles and ki represents the DWT coefficients obtained by solving (12) for the i-th valid gait cycle. Next, we compute the root-mean-square error, denoted by RMSEi, between the extracted DWT coefficients for a moving segment of the gyroscope data and the template DWT coefficients as follows:

RMSEi=[1Fsj=1Fs(kT,jki,j)2]1/2. (22)

A segment of the gyroscope signal measured in the sagittal plane under hypothesis H0 is a valid gait cycle if

RMSEi<γGCVS, (23)

where γGCVS is the template matching threshold. In our work, we set γgcvs as one standard deviation distant from the mean of the RMSE computed during the template generation task. If (23) is true, then we determine the toe-off and heel-strike events for the i-th stride, denoted by TOi and HSi, respectively, by finding the local minima of the scaled gyroscope signal ys. The first local minimum represents the toe-off event, whereas the second represents the heel-strike event. We segment the scaled gyroscope signal ys in (9) into two or more segments, depending on the smoothness of the signal, with a fixed threshold of 0.5. If ΩTi and ΩHi represent, respectively, the first segment and the union of the remaining segments of ys that are below the threshold, then

TOiargmink,kΩTiys, (24)
HSiargmink,kΩHiys, (25)

where Ti and Hi are the lengths of the segments of ΩTi and ΩHi. A real-time implementation of the gait cycle validation and segmentation (GCVS) algorithm is listed in Algorithm 2 of Appendix A.

IV. Illustrative Example

In this section, with the help of an illustrative example, we demonstrate our proposed method. We develop methods to identify the cutoff frequency ω0 of the low-pass filter in (8) and tune the parameter μ to improve the rate of convergence of the SAWD algorithm.

A. Data Collection and Hardware

We used APDM Opal sensors [48] to collect accelerometer and gyroscope sensor data for a participant walking on a treadmill. The sensors operate at a sampling frequency of Fs = 128 Hz and are firmly attached to the instep region of the foot with the help of elastic Velcro straps. Data from the sensors was transmitted in wireless mode to a laptop and stored in HDF5 format. As a reference system, we used a GoPro camera placed a few feet away from the treadmill. In addition, a digital clock was also placed next to the treadmill, so that the readings on the clock were clearly captured in the video data. The digital clock readings were used to manually synchronize the video data with the inertial sensor data (see Appendix B).

B. Experiment

To validate and segment a gait cycle, a healthy male participant of age 30 was recruited. The participant stood on the treadmill, with his feet in comfortable stance width. When a tone sounded, the participant began to walk, slowly accelerating at a comfortable pace and reaching gait speed of 1.34 m/s (3 miles/hr) in the first 15 seconds of the trial. Then, for the next 15 seconds, the participant walked at a steady pace of 1.34 m/s, which was maintained with the help of the speed indicator on the treadmill. Finally, in the last 15 seconds of the trial, the participant began to slowly decelerate from a steady pace of 1.34 m/s to a standstill. Each trial lasted for 45 seconds and was repeated seven times. To generate the template of the DWT coefficient vector kT, we used datasets from the treadmill walking experiment because the dataset contains inertial sensor data with variable walking speeds.

C. Template Generation

To detect midstance events, we set the zero-velocity detector threshold γd = 2.0 in (4). The size of the window is set to one-eighth of the sampling rate Fs, i.e., W = 16. Further, the standard deviations of the accelerometer and gyroscope are set to σa = 1.0 and σω = 0.8, respectively. The details of the steps for obtaining the parameter of the zero-velocity detector are presented in [32, Appendix D and E]. Next, using the zero-velocity detector, we segment the gyroscope measurements in the sagittal plane and detect the regions when the IMU is not stationary, i.e., when hypothesis H0 is true in (2). The segments of the gyroscope measurements in the sagittal plane under hypothesis H0 are scaled and interpolated employing (10) and (9), respectively. To design the WDWT in (6) and (7), we select a Daubechies wavelet (db4 or D8) as the mother wavelet because it closely resembles the shape of the gyroscope signal in the sagittal plane for a valid gait cycle (see Appendix C). We use a window length of the next highest power of the sampling rate Fs, expressed as a power of 2, i.e., U = 27 = 128. Further, we use non-overlapping windows, i.e., V = 1, because the length of the scaled segment N ⩽ Fs for all valid gait cycles across varying gait speeds of the treadmill walking trial [49]. In Fig. 2a and 2b, we plot the scaled and interpolated gyroscope signal segments and corresponding DWT coefficients for valid gait cycles of the fifth trial of the treadmill experiment, selected at random. As can be seen in Fig. 2a, each segment consist of observable patterns of interest, i.e., “valleys” and “peaks.” Further, we notice that the DWT coefficients in Fig. 2b consist of large coefficients in the lower frequency scales [2j−1, 2j), j ∊ {1, 2, 3}, small coefficients in the mid frequency scales [2j−1, 2j), j ∊ {4, 5}, and coefficients close to zero in the high frequency scales [2j−1, 2j), j ∊ {6, 7}. The DWT coefficients in the lower frequency scales represent the low-frequency signal. Therefore, it is sufficient to retain these coefficients to reconstruct a template of the gait cycle that preserves the observable patterns of interest.

Fig. 2:

Fig. 2:

Scaled and interpolated gyroscope signal segments measured in the sagittal plane, with corresponding DWT coefficients. The solid line indicates the mean value, and the shaded region indicates one standard deviation variance.

To determine the cutoff frequency of the low-frequency signal, we compute the Fourier transform of each segment and select the cutoff frequency ω0 such that the range of frequencies representing the dominant energy regions are retained. In Fig. 3, we plot the N-point discrete Fourier transform (DFT) of the scaled and interpolated gyroscope signal segments on a normalized frequency scale 0 ⩽ ω0 ⩽ 0.5, where the length of DFT is set to N = 512. As can be seen, the energy of the segments resides in the lower frequency range of the normalized frequency scale. Therefore, to obtain a smoothed template of the input signal such that preserves its shape, we select ω0 = 0.025, equivalent to 3.2 Hz, as shown in Fig. 3 with a dashed blue vertical line. The cutoff frequency ω0 and the length of the interpolated signal are used to construct the banded matrices A and C. Using (8), we design a zero-phase low-pass filter as a banded matrix [41].

Fig. 3:

Fig. 3:

Spectrum plot of the scaled and interpolated gyroscope signal segments. The solid line indicates the spectral mean value. The dashed blue line indicates the normalized cutoff frequency ω0 = 0.025 of the low-pass signal.

In Fig. 4, we demonstrate the rate of convergence of the SAWD algorithm across different values of μ. Note that μ affects only the rate of convergence and not the final value of the cost function. We plot the average value of the cost function for μ ∊ {0.01, 0.1, 1} obtained for valid gait cycle segments of the fifth trial of the treadmill experiment. As can be seen in Fig. 4, the SAWD algorithm converges in less than five iterations on average for μ = 0.1. Further, the SAWD algorithm takes 0.02 ± 0.01 seconds per gait cycle to converge on a Windows computer (2.7 GHz Intel Core i7) running MATLAB 2016b, and thus making it feasible to implement the algorithm in real time.

Fig. 4:

Fig. 4:

The solid lines indicate the average value of the cost function for different values of μ ∊ {0.01, 0.1, 1}. The convergence rate varies with the value of μ, however, it does not affect the cost function.

In Table I, we report the results of the average reconstruction error and the average number of non-zero DWT coefficients across different values of λ. The reconstruction error is defined as the root-mean-square error between the reconstructed signal ΨkT (see Fig. 5a) and the signal obtained by averaging the low-frequency segments of valid gait cycles (see Fig. 5c). The cutoff frequency of the low-frequency signal is same as the cutoff frequency of the low-pass filter used in the SAWD algorithm. Table I shows that, as the λ value increases, the reconstruction error increases, but, the number of non-zero DWT coefficients decreases. To find a good balance between the reconstruction error and the number of non-zero DWT coefficients, we select λ = 0.05.

TABLE I:

Reconstruction error and non-zero coefficients

λ Reconstruction Error (Avg.) Non-Zero Coefficients (Avg.)
0.01 0.007685 13.764706
0.03 0.015022 10.852941
0.05 0.022069 10.323529
0.07 0.029112 9.558824
0.09 0.036047 9.000000

Fig. 5:

Fig. 5:

Scaled and interpolated gyroscope signal segments measured in the sagittal plane and its corresponding DWT coefficients. The solid line indicates the mean value, and the shaded region indicates one standard deviation variance.

We plot the outputs of the SAWD algorithm, Ψk and k, in Fig. 5a and 5b, respectively. We notice that the low-frequency signal Ψk obtained by solving (12) in Fig. 5a is smooth and preserves the observable patterns of interest of a valid gait cycle. Further, as shown in Fig. 5b, the dominant DWT coefficients in the lower frequency scales [2j−1, 2j), j ∊ {1, 2, 3} remain unaffected whereas the DWT coefficients in higher frequency scales [2j−1, 2j), j ∊{4, 5, 6, 7} are either zero or nearly zero. The template of the DWT coefficients kT is obtained using (21). It is shown as a solid line in Fig. 5b, which is a sparse representation of the scaled and interpolated gyroscope segment. In the fifth trial of the treadmill walking task, a total of 31 gait cycles were identified from the video data, i.e., M = 31. In Fig. 5c and 5d, we plot the scaled and interpolated low-frequency signal for ω0 = 0.025 and the corresponding DWT coefficients without applying the SAWD algorithm. We notice that the shapes of the two smoothed signals in Fig. 5a and 5c are quite similar. However, the DWT coefficients obtained using the SAWD algorithm contain fewer non-zero coefficients than the DWT coefficients obtained using only the low-pass filter. Further, the RMSE in (22) for the SAWD algorithm is small (0.246418 ± 0.229323) in comparison to that of the low-pass filtering method (0.465160 ± 0.118028). Thus, the SAWD algorithm can extract a sparse representation of a valid gait cycle in the form of DWT coefficients with minimum RMSE.

D. Validation and Segmentation

To validate a moving segment of the inertial sensor data as a gait cycle, we use the generated DWT coefficient template kT and the DWT coefficients k obtained using the SAWD algorithm for any moving segment of the gyroscope signal in sagittal plane, and compute the RMSE in (22). The threshold in (23), γgcvs, is set to the maximum of one standard deviation of the RMSE values obtained for the valid gait cycles of the treadmill walking experiment, i.e., γgcvs = 0.50. If a segment is a valid gait cycle, then we compute the toe-off and heel-strike events using (24) and (25), respectively. Table II compares the performance our proposed method with an existing method implemented by Mobility Lab software (MLBS) [48]. The MLBS gait segmentation algorithm is based on a fixed thresholding method developed in [12]. To evaluate the performance of our proposed method, we define four metrics [48].

TABLE II:

Validation of toe-off, heel-strike, swing as percentage of gait cycle using the GCVS method.

Trial # Toe-off Angle (mean ± std)
Heel-Strike Angle (mean ± std)
Swing as %GCT (mean ± std)
Gait Cycles (detect/actual)
MLBS GCVS MLBS GCVS MLBS GCVS MLBS GCVS
2 30° ± 3.2° 35.3° ± 5.6° −14° ± 2.2° −12.9° ± 3.0° 39% ± 1.2% 38.6% ± 9.3% 22/27 25/27
3 31° ± 5.3° 32.9° ± 7.3° −15° ± 2.4° −18.3° ± 3.1° 40% ± 2.1% 41.7% ± 2.4% 29/31 29/31
4 33° ± 3.5° 32.6° ± 6.2° −17° ± 2.6° −17.5° ± 2.3° 40% ± 2.0% 42.1% ± 3.0% 23/30 27/30
5 32° ± 5.1° 31.4° ± 6.9° −18° ± 2.7° −20.0° ± 2.7° 40% ± 0.9% 42.6% ± 2.5% 27/31 28/31
6 33° ± 3.2° 33.4° ± 5.6° −18° ± 2.5° −19.4° ± 2.5° 40% ± 1.7% 42.7% ± 3.0% 29/31 30/31
7 33° ± 4.8° 31.8° ± 5.2° −18° ± 2.6° −18.4° ± 2.5° 40% ± 1.1% 43.2% ± 3.1% 26/30 29/30

Overall 32° ± 4.1° 32.9° ± 6.1° −16.6° ± 2.5° −17.7° ± 2.6° 40% ± 1.5% 41.8% ± 3.8% 156/180 168/180

MLBS: Mobility labs software; GCVS: Gait cycle validation and segmentation.

  1. Toe-off angle: The angle of the foot as it leaves the floor at push-off. The pitch of the foot when flat is zero.

  2. Heel-strike angle: The angle of the foot at the point of initial contact. The pitch of the foot when flat is zero, and positive when the heel makes first contact.

  3. Swing: The duration of a full gait cycle is the duration between two consecutive heel-strike events. Swing is defined as the percentage of the gait cycle for which the foot is not on the ground, i.e., it is the ratio of the time duration between the last heel-strike and toe-off events to the time duration of the corresponding gait cycle.

  4. Gait cycle: A gait cycle is a valid gait cycle if it consists of exactly one heel-strike and one toe-off event, in that order, between two consecutive midstance events.

When computing the number of valid gait cycles using video data, we ignore the first stride because the foot starts from a midstance event. A gait cycle in the video data is defined as a valid gait cycle if it consists of exactly one heel-strike and one toe-off event, in that order, between two consecutive midstance events. In Table II, we use the DWT template kT generated in the fifth trial and evaluate the performance of our method in the remaining trials. We use a zero-velocity aided foot-mounted inertial navigation system (INS) described in [25], [26], [50] to estimate the pitch angle of the foot during the gait. The INS uses the accelerometer and gyroscope sensor measurements along with the zero-velocity event intervals [31], [32], [51] to estimate the position, velocity, and orientation of the foot via dead reckoning [52]. As can be seen in Table II, our proposed method detects equal or more number of gait cycles than the existing method across all trials, except the second, of the treadmill walking task. In addition, the average values of the estimated toe-off and heel-strike angles are within one standard deviation of the existing method values. In Fig. 3a3f (see Appendix F), we plot the right foot gyroscope sensor data in the sagittal plane along with the corresponding gait events detected using the proposed method for the trials reported in Table II.

To demonstrate the robustness of our proposed approach, we use the left foot DWT template generated in the fifth trial of the treadmill experiment for a healthy participant, and compute the number of gait cycles detected for inertial sensor data collected across seven participants with Parkinson disease. For our sample, there were four females, the mean age 70.57 ± 5.65 years, the mean disease duration was 4.71 ± 4.54 years, and the mean on-medication score on the motor section of the Movement Disorders Society Unified Parkinson Disease Rating Scale (MDS-UPDRS III) [53] was 28.71 ± 11.69. The description of the data collection procedure and hardware is the same as in Section IVA. In this experiment, we assigned the participants four tasks, namely timed up and go (TUG), 360° turn, stand and walk (SAW), and open-ended walk for two minutes. In Table III, we report the performance of our proposed method for two tasks whose descriptions are as follows:

TABLE III:

Performance of MLBS and GCVS algorithms

PID # TUG1
TUG2
SAW
MLBS GCVS MLBS GCVS MLBS GCVS
01 1/3 3/3 1/4 4/4 7/10 9/10
02 5/13 13/13 7/13 10/13 18/20 19/20
03 0/6 6/6 0/7 7/7 5/8 8/8
05 0/4 3/4 1/5 5/5 0/8 7/8
08 1/6 6/6 0/6 6/6 7/12 11/12
09 0/6 5/6 0/7 7/7 7/10 10/10
10 0/3 2/3 0/5 5/5 5/8 8/8

Overall 7/41 38/41 9/47 44/47 49/76 72/76

TUG: Timed up and go; SAW: Stand and walk; MLBS: Mobility labs software; GCVS: Gait cycle validation and segmentation.

  1. Timed up and go (TUG): The participant stands up, walks 3 meters from the chair, turns, walks back, and returns to a sitting position.

  2. Stand and walk (SAW): The participant stands at one end of the walkway, with their feet comfortably apart and their hands on their hips, for 30 seconds, when a tone sounds. Then the participant walks 7 meters, turns, walks back, and stops, now facing the opposite direction of their starting position.

The ground truth was again determined using video data. We ignored the open-ended walk task dataset because the participant’s gait was not captured in the video data during some instances of the trial. As can be seen in Table III, our proposed method demonstrates an improved performance in detecting valid gait cycles across different tasks. In addition, our proposed method also detected gait cycles during turns when the gait did not involve pivoting using either of the two feet.

V. Numerical Results

In this section, we compare our proposed method with existing methods based on either thresholding or template matching and thresholding. We evaluate the proposed and existing methods using a publicly available database [16], [36] and an existing database [32] for a fixed and variable sampling rate, respectively. We use the prefixes online (ON) and offline (OFF) to indicate if an existing method can be implemented in real time. The details of implementing the existing methods are as follows:

  • The peak detection (OFF-PDT) algorithm is an offline implementation of the gait cycle validation and segmentation algorithm which works on the principle of thresholding the gyroscope signal in the sagittal plane [12]. In the first step, the gyroscope signal is filtered using a high-pass IIR filter with cutoff frequency 0.25 Hz. Next, the mid-swing area is determined by finding the local maxima of the gyroscope signal. Only peaks that are greater than 50°/sec are considered. In addition, if multiple adjacent peaks within 500 millisecond are detected, the peak with the highest amplitude is selected. In the final step, the local minimum peaks within a ±1.5 millisecond interval around the local maxima are searched such that the amplitudes of the local minima are less than −20°/sec, and the two local minimums on either side of the mid-swing peak, representing the toe-off and heel-strike events, are separated by at least 200 milliseconds.

  • The subsequence dynamic time warping (OFF-SDTW) is an offline implementation of the gait cycle validation and segmentation algorithm which works on the principle of thresholding and template matching [16]. To generate a template of a valid gait stride, the gyroscope measurement in the sagittal plane obtained from 25 elderly individuals performing a 40 meter walk protocol, is manually segmented, scaled, and interpolated. Given an input sequence of gyroscope measurements in the sagittal plane, the OFF-SDTW algorithm scales the amplitude of the gyroscope measurements, and constructs a distance matrix which captures the similarity measurements between the input sequence and template. Note that the method proposed in [16] can also be extended to multidimensional axes, however, in this work we only considered the sagittal axis of the gyroscope. In the next step, matrix which represents the accumulated cost of warping the template to parts of the input sequence is constructed. Thereafter, the local minima of the top row of the accumulated cost matrix, which represents the starting points of the warping paths are determined using a fixed threshold γOFF–SDTW. Finally, a monotonically decreasing path, called the “warping path,” is traced from the local minima in the first row of the accumulated cost matrix to the last row of the accumulated cost matrix. Additional constraints based on the duration and overlapping regions of the warping paths are also applied to remove outliers. In our work, we determined the optimal value of the threshold γOFF–SDTW by manually incrementing its value in steps of five and selected the one that gave the best results. We used a fixed threshold of γOFF–SDTW = 20.0 in all our simulations.

  • Dynamic time warping (ON-DTW) is a real-time implementation of the gait cycle validation and segmentation algorithm which constructs a distance grid between the given input sequence and the template signal, and finds the shortest path through the grid which minimizes the total distance between the two sequences [23]. The total distance of the shortest path is the measure of similarity between the two sequences. For example, if the input sequence is exactly same as the template sequence, then the measure of similarity is zero. However, in many practical scenarios, it is very rare for the input sequence to match the template sequence. Therefore, in practice, a certain fixed threshold γON–DTW is used to determine sequences that match closely with the template sequence. In addition, we applied a fourth-order zero-phase low-pass Butterworth filter with a cutoff frequency of 15 Hz to smooth and reduce the variance of the similarity measure of the input sequence. To generate a template signal, we scaled, interpolated, and computed the average of the non-stationary segments gyroscope signal in the sagittal plane for the second experiment of the treadmill walking task. Analogous to the GCVS algorithm, a similarity metric is computed between the template signal, and the scaled and interpolated non-stationary segment of the gyroscope signal in the sagittal plane. If the similarity metric is less than a fixed threshold γON–DTW, then the non-statioanry segment represents a valid gait cycle. In our work, we set γON–DTW as two standard deviations from the mean value of the similarity measure obtained across all valid gait segments of the second trial of the treadmill walking experiment, i.e., we use a fixed threshold of γON–DTW = 4.0 in all our simulations.

For the publicly available database [16], [36], the training data to generate the template was not available. Therefore, to generate the template of a valid gait cycle for the ON-GCVS and ON-DTW methods, we used data from the treadmill walking experiment. Furthermore, we did not include the MLBS in our analysis because the proprietary software supports sensor data from APDM Opal sensors only. However, the MLBS uses OFF-PDT to validate and segment a gait cycle.

A. Fixed Sampling Rate (Excluding Turns)

1). Data Collection, Tasks, and Manual Segmentation

We evaluate the proposed and existing methods using a publicly available inertial sensor database [16], [36]. The database consists of 45 participants, equally divided into three groups, namely control participants, participants with Parkinson disease, and geriatric participants. More details about the participants included in the study can be found in [16, Table I]. Inertial measurement units manufactured by Shimmer Sennsing were mounted laterally to the heel of the participant’s right and left shoe to acquire inertial sensor data from both feet simultaneously [54]. The data was recorded at a sampling rate of 102.4 Hz. The participants were asked to perform two tasks:

  • 40 meter walk: In this task, the participant walks along a 10 meter straight path at a comfortable self-selected speed, turns, walks back, returns to the starting position, and repeats this routine two times.

  • Free walk: In this task, the participant walks for two minutes at a comfortable self-selected speed around the University Erlangen Hospital where the study was conducted.

Only strides from straight walking were identified and labeled as ground truth. Turning movements with more than 45° per stride were excluded in the free walk protocol. We refer to the video data as gold standard data.

2). Metrics

To evaluate the proposed and existing gait cycle validation and segmentation algorithms, we define three variables. The definition of each variable is as follows:

  • Detection positives: The number of strides identified by the selected gait cycle validation and segmentation algorithm.

  • True positives: The number of strides identified by the selected gait cycle validation and segmentation algorithm, and also labeled as valid stride in the gold standard data.

  • False negatives: The number of strides not identified by the selected gait cycle validation and segmentation algorithm.

Based on these variables, we define three performance metrics namely precision, recall, and F1 score. Precision is defined as the ratio of the number of true positives to the number of detection positives. Precision is equal to one if all the strides identified by the selected algorithm are labeled in the gold standard data. Recall is defined as the ratio of the number of true positives to the sum of the number of true positives and false negatives. Recall is equal to one if no false negatives are identified, i.e., no stride is missed. F1 score is the harmonic mean of precision and recall, and takes into account missing strides and wrongly detected strides.

3). Data Analysis

In Table IV and V, we present the average value of the performance metrics for the proposed and existing methods. A total of 1746 and 4154 were identified in the gold standard, excluding the turning movements, for the 40 meter and free walk tasks, respectively. The best results are obtained for the OFF-SDTW algorithm [16]. However, the OFF-SDTW algorithm cannot be implemented in real time because the accumulated cost matrix requires access to the entire input sequence. Furthermore, the OFF-SDTW algorithm is also computationally expensive because identifying the warping path requires a grid search operation of complexity O(PQ), where P and Q are the lengths of the template and input sequence, respectively. In contrast, the OFF-PDT algorithm is computationally inexpensive, but the performance varies depending on the task selected. In addition, the precision values of the OFF-PDT algorithm are lower than the OFF-SDTW method because turns were neglected in the gold standard. The ON-DTW algorithm performs poorly for geriatric participants because there is a significant mismatch between the template of a valid gait cycle of a healthy and geriatric participant. The proposed ON-GCVS algorithm demonstrates high recall values across control participants and participants with Parkinson disease. However, the precision is slightly lower because our proposed method can also detect gait cycles during turns which were not included in the gold standard for database in [16]. In the case of geriatric participants, our proposed method performs significantly better than the ON-DTW algorithm even when there is a mismatch between the template of a valid gait cycle of a healthy and geriatric participant. Note that the template used in the ON-GCVS method was generated using M = 31 valid gait cycles obtained from a healthy participant performing a treadmill walking experiment as described in Section IVA.

TABLE IV:

Performance of the proposed and existing methods for the 40 meter walk task [16], [36].

Method 40 Meters WALK
Controls
PD Patients
Geriatric Patients
Average
Precision Recall F1 Score Time Precision Recall F1 Score Time Precision Recall F1 Score Time F1 Score
OFF-PDT 79.91% 97.57% 87.78% 0.036 80.07% 98.61% 88.32% 0.035 80.23% 100.0% 88.93% 0.050 88.34%
OFF-SDTW 83.66% 100.0% 90.98% 0.611 81.85% 100.0% 89.98% 0.628 92.01% 97.40% 94.56% 1.506 91.84%
ON-DTW 84.71% 93.14% 88.20% 0.001 82.69% 86.41% 83.16% 0.001 93.59% 62.49% 68.23% 0.002 79.86%
ON-GCVS 79.12% 100.0% 88.25% 0.020 79.10% 100.0% 88.28% 0.018 84.72% 91.40% 86.34% 0.017 87.62%

OFF-PDT: Offline peak detection algorithm; OFF-SDTW: Offline subsequence dynamic time warping; ON-DTW: Online dynamic time warping; ON-GCVS: Online gait cycle validation and segmentation.

TABLE V:

Performance of the proposed and existing methods for the free walk task [16], [36].

Method Free WALK
Controls
PD Patients
Geriatric Patients
Average
Precision Recall F1 Score Time Precision Recall F1 Score Time Precision Recall F1 Score Time F1 score
OFF-PDT 73.46% 100.0% 84.68% 0.219 76.43% 100.0% 86.57% 0.190 76.13% 99.47% 86.13% 0.178 85.79%
OFF-SDTW 79.00% 99.83% 88.13% 4.161 84.04% 99.81% 91.18% 5.250 86.86% 97.42% 91.76% 6.571 90.35%
ON-DTW 90.00% 98.08% 93.86% 0.003 81.85% 80.32% 80.08% 0.003 93.65% 66.67% 70.22% 0.002 81.38%
ON-GCVS 77.65% 100.0% 87.39% 0.019 80.08% 98.70% 88.17% 0.019 82.91% 95.30% 88.27% 0.020 87.94%

OFF-PDT: Offline peak detection algorithm; OFF-SDTW: Offline subsequence dynamic time warping; ON-DTW: Online dynamic time warping; ON-GCVS: Online gait cycle validation and segmentation.

B. Variable Sampling Rate (Including Turns)

1). Data Collection, Tasks, and Manual Segmentation

We evaluate the threshold invariance property of the proposed and existing methods using real data collected from 16 participants with Parkinson disease [32]. In our sample, there were seven females, the mean age was 70.3 ± 7.9 years, the mean disease duration was 5.0 ± 3.6 years, and the median off medication Movement Disorders Society Unified Parkinson Disease Rating Scale Motor Subsection (MDS-UPDRS-III) Score was 35.5 (first and third quartiles: 30.5, 41.5). We use the Openshoe module to collect the accelerometer and gyroscope sensor data [26]. We firmly taped the sensor to the heel of the left shoe instead of the instep region of the foot. Further, the sensors operated at a higher sampling frequency of Fs = 1000 Hz. The sensors were powered by micro-USB cords whose other ends are plugged into a USB-port of a laptop. The laptop, which weighs less than 1.2 kilograms, was placed in a backpack carried by the participant. Cords were firmly strapped around each leg, so that they did not interfere with gait and there are minimal cord movements captured by the sensors. To assess gait, we assigned the participants several tasks one of which was the 12 meter walk task. In the 12 meter walk task, the participant was asked to walk forward along a full 6 meter straight path. On reaching the end, the participant made a 180° turn and returned to the starting point. The ground truth or gold standard was obtained using video data. For the database in [32], turning movements were also included in the gold standard.

2). Template Generation

Generating a template is essential in both the ON-DWT and ON-GCVS algorithms especially when the sampling rate varies. To select training data for template generation, we used two criteria: a) the participant did not exhibit freezing of gait or any abnormal gait pattern during the trial, and b) the number of valid gait segments was maximum across all participants. Only participant TT022 matched the criteria for data selection, and the sensor data from valid gait cycle segments was used to generate the DWT coefficient template kT and DTW template sequence.

3). Data Analysis

In Table VI, we present the results of the average values of precision, recall, and F1 score for the 12 meters walk task, for the proposed and existing methods (see Appendix E for full details). A total of 158 strides were detected in the gold standard across all Parkinson disease participants. The thresholds of the proposed and existing methods were held constant and only the sampling rate of the sensors was varied. We used the same performance metrics as defined in Section VA. As can be seen in Table VI, the performance of the OFF-SDTW algorithm decreases as the sampling rate of the sensors increases because the entries of the accumulated cost matrix vary based on the sampling rate. Further, the computational cost of identifying the warping path also increases with the sampling rate. A like trend in the computational cost is also observed for the OFF-PDT algorithm. However, the performance of the OFF-PDT algorithm remains consistent across varying sampling rate because the amplitude of the signal remains unaffected by changing the sampling rate. The ON-DTW performs poorly on increasing the sampling rate because the similarity metric value between the template and the input sequence increases on increasing the sampling rate. In contrast, the proposed ON-GCVS method is computationally inexpensive and takes approximately 0.067 seconds on an average per dataset. Furthermore, the F1 score of the proposed method is as good as the offline implementation of the PDT algorithm and significantly better than the existing real time method.

TABLE VI:

Performance of the existing and proposed methods for the free walk task [32].

Method 12 Meters WALK
Fs = 125 Hz
Fs = 250 Hz
Fs = 500 Hz
Average
Precision Recall F1-Score Time Precision Recall F1-Score Time Precision Recall F1-Score Time F1 Score
OFF-PDT 86.88% 98.80% 92.26% 0.112 86.94% 99.52% 92.75% 0.107 86.16% 99.52% 92.25% 0.196 92.42%
OFF-SDTW 88.89% 90.69% 89.93% 0.754 84.58% 88.38% 86.25% 1.421 77.32% 81.86% 79.43% 2.982 85.20%
ON-DTW 92.53% 90.14% 91.48% 0.001 64.58% 26.00% 36.64% 0.001 00.00% 00.00% 00.00% 0.001 42.70%
ON-GCVS 90.87% 100.0% 95.19% 0.020 88.77% 99.28% 93.65% 0.128 79.53% 100.0% 88.48% 0.054 92.44%

OFF-PDT: Offline peak detection algorithm; OFF-SDTW: Offline subsequence dynamic time warping; ON-DTW: Online dynamic time warping; ON-GCVS: Online gait cycle validation and segmentation.

VI. Summary and Conclusions

We developed a robust and computationally efficient framework to validate and segment a gait cycle in real time. We first used the physical models of sensor data from a foot-mounted inertial system to detect the stationary and moving segments in the sensor data. Thereafter, to validate a moving segment of sensor data as a gait cycle, we developed an optimization routine called sparsity-assisted wavelet denoising. In SAWD, we combined low-pass filtering, wavelets, and sparsity-based methods to extract a sparse template of a valid gait cycle in the form of DWT coefficients with minimum RMSE. Finally, we detected midstance, toe-off, and heel-strike by finding the local minima of the stationary and non-stationary regions of a valid gait cycle. We demonstrated the robustness of our proposed approach by extracting a DWT coefficient template from a healthy participant, and applying it to sensor data obtained from control participants, participants with Parkinson disease, and geriatric participants (see Appendix D for details about the datasets used in this work). Our results showed a consistent performance, with an average F1 score of 87.78% across all groups for a fixed sampling rate. In addition, we also demonstrated the threshold invariance property of our proposed method by keeping the threshold fixed and varying the sampling rate. Our proposed method yielded an average F1 score of 92.44% across all Parkinson disease participants for a variable sampling rate. Overall, our proposed method required less training data, demonstrated computational efficiency, and delivered comparable if not better results than the existing methods.

In the future, we plan to develop an adaptive framework to dynamically adjust the threshold of the zero-velocity detector γd so that the edges of the zero-velocity intervals correspond to the heel-off and flat-foot events. We also plan to design a system which can dynamically generate the template signal in real-time using the first L strides, and use the template signal along with a fixed threshold to validate and segment the remaining strides of a given task. A successful implementation will enable the development of a personalized gait analysis system that will adapt to individual gait patterns, and automatically validate and segment the gait cycle. Furthermore, we also intend to integrate the gait cycle validation and segmentation module with our existing system design to detect and track freezing of gait in Parkinson disease [32], and improve the accuracy of detecting and/or predicting freezing of gait.

Supplementary Material

Supplementary Material

Fig. 1:

Fig. 1:

Gait cycle validation and segmentation algorithm overview. The proposed modularity-based approach consists of three modules: a) sensor module, b) detection module, and c) validation module. The detection and validation modules are used to identify midstance, and toe-off and heel-strike phase of a gait cycle, respectively.

Acknowledgments

The authors would like to thank Dimitre Tomov, Kerri Rawson, Martha Hessler, Elinor Harrison, Peter Myers, Adam Horin, Marie McNeely, and Ryan Duncan for their contributions to data collection and/or discussions on this work.

Research reported in this publication was supported by the Washington University Institute of Clinical and Translational Sciences grant UL1TR002345 from the National Center for Advancing Translational Sciences (NCATS) of the National Institutes of Health (NIH). The content is solely the responsibility of the authors and does not necessarily represent the official view of the NIH.

References

  • [1].Mahlknecht P et al. , “Prevalence and burden of gait disorders in elderly men and women aged 60–97 years: A population-based study,” PLOS ONE, vol. 8, pp. 1–7, July 2013. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [2].Pirker W and Katzenschlager R, “Gait disorders in adults and the elderly,” Wiener klinische Wochenschrift, vol. 129, no. 3, pp. 81–95, February 2017. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [3].Abdo WF et al. , “The clinical approach to movement disorders,” Nature Reviews Neurology, vol. 6, no. 1, p. 29, 2010. [DOI] [PubMed] [Google Scholar]
  • [4].Sprager S and Juric MB, “Inertial sensor-based gait recognition: A review,” Sensors, vol. 15, no. 9, pp. 22 089–22 127, 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [5].Taborri J et al. , “Gait partitioning methods: A systematic review,” Sensors, vol. 16, no. 1, 2016. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [6].Lauer RT et al. , “Application of a neuro-fuzzy network for gait event detection using electromyography in the child with cerebral palsy,” IEEE Transactions on Biomedical Engineering, vol. 52, no. 9, pp. 1532–1540, Sep. 2005. [DOI] [PubMed] [Google Scholar]
  • [7].Skelly MM and Chizeck HJ, “Real-time gait event detection for paraplegic FES walking,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 9, no. 1, pp. 59–68, March 2001. [DOI] [PubMed] [Google Scholar]
  • [8].Smith BT et al. , “Evaluation of force-sensing resistors for gait event detection to trigger electrical stimulation to improve walking in the child with cerebral palsy,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 10, no. 1, pp. 22–29, March 2002. [DOI] [PubMed] [Google Scholar]
  • [9].Agostini V et al. , “Segmentation and classification of gait cycles,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 22, no. 5, pp. 946–952, Sep. 2014. [DOI] [PubMed] [Google Scholar]
  • [10].Crea S et al. , “Development of gait segmentation methods for wearable foot pressure sensors,” in 2012 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Aug 2012, pp. 5018–5021. [DOI] [PubMed] [Google Scholar]
  • [11].Catalfamo P et al. , “Detection of gait events using an F-scan in-shoe pressure measurement system,” Gait & Posture, vol. 28, no. 3, pp. 420–426, 2008. [DOI] [PubMed] [Google Scholar]
  • [12].Salarian A et al. , “Gait assessment in Parkinson’s disease: toward an ambulatory system for long-term monitoring,” IEEE Transactions on Biomedical Engineering, vol. 51, no. 8, pp. 1434–1443, August 2004. [DOI] [PubMed] [Google Scholar]
  • [13].Sabatini AM et al. , “Assessment of walking features from foot inertial sensing,” IEEE Transactions on Biomedical Engineering, vol. 52, no. 3, pp. 486–494, March 2005. [DOI] [PubMed] [Google Scholar]
  • [14].Kotiadis D et al. , “Inertial gait phase detection for control of a drop foot stimulator: Inertial sensing for gait phase detection,” Medical Engineering & Physics, vol. 32, no. 4, pp. 287–297, 2010. [DOI] [PubMed] [Google Scholar]
  • [15].Mannini A and Sabatini AM, “Gait phase detection and discrimination between walkingjogging activities using hidden markov models applied to foot motion data from a gyroscope,” Gait & Posture, vol. 36, no. 4, pp. 657–661, 2012. [DOI] [PubMed] [Google Scholar]
  • [16].Barth J et al. , “Stride segmentation during free walk movements using multi-dimensional subsequence dynamic time warping on inertial sensor data,” Sensors, vol. 15, no. 3, pp. 6419–6440, 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [17].Pappas IPI et al. , “A reliable gait phase detection system,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 9, no. 2, pp. 113–125, June 2001. [DOI] [PubMed] [Google Scholar]
  • [18].Aminian K et al. , “Spatio-temporal parameters of gait measured by an ambulatory system using miniature gyroscopes,” Journal of Biomechanics, vol. 35, no. 5, pp. 689–699, 2002. [DOI] [PubMed] [Google Scholar]
  • [19].Pappas IPI et al. , “A reliable gyroscope-based gait-phase detection sensor embedded in a shoe insole,” IEEE Sensors Journal, vol. 4, no. 2, pp. 268–274, April 2004. [Google Scholar]
  • [20].Lau H and Tong K, “The reliability of using accelerometer and gyroscope for gait event identification on persons with dropped foot,” Gait & Posture, vol. 27, no. 2, pp. 248–257, 2008. [DOI] [PubMed] [Google Scholar]
  • [21].Lee JK and Park EJ, “Quasi real-time gait event detection using shank-attached gyroscopes,” Medical & Biological Engineering & Computing, vol. 49, no. 6, pp. 707–712, June 2011. [DOI] [PubMed] [Google Scholar]
  • [22].Abaid N et al. , “Gait detection in children with and without Hemiplegia using single-axis wearable gyroscopes,” PLOS ONE, vol. 8, no. 9, pp. 1–8, September 2013. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [23].Berndt DJ and Clifford J, “Using dynamic time warping to find patterns in time series.” in KDD workshop, vol. 10, no. 16 Seattle, WA, 1994, pp. 359–370. [Google Scholar]
  • [24].Haji Ghassemi N et al. , “Segmentation of gait sequences in sensor-based movement analysis: A comparison of methods in Parkinsons disease,” Sensors, vol. 18, no. 1, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [25].Nilsson JO et al. , “Foot-mounted INS for everybody - An open-source embedded implementation,” in Proceedings of the 2012 IEEE/ION Position, Location and Navigation Symposium, April 2012, pp. 140–145. [Google Scholar]
  • [26].———, “Foot-mounted inertial navigation made easy,” in 2014 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Oct 2014, pp. 24–29. [Google Scholar]
  • [27].Nieuwboer A et al. , “Cueing training in the home improves gait-related mobility in Parkinson’s disease: the RESCUE trial,” Journal of Neurology, Neurosurgery & Psychiatry, vol. 78, no. 2, pp. 134–140, 2007. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [28].McIntosh GC et al. , “Rhythmic auditory-motor facilitation of gait patterns in patients with parkinson’s disease.” Journal of Neurology, Neurosurgery & Psychiatry, vol. 62, no. 1, pp. 22–26, 1997. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [29].Harrison EC et al. , “Internal cueing improves gait more than external cueing in healthy adults and people with parkinson disease,” Scientific reports, vol. 8, no. 1, p. 15525, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [30].Vaughan CL et al. , “Dynamics of human gait,” 1999. [Google Scholar]
  • [31].Skog I et al. , “Zero-velocity detection – An algorithm evaluation,” IEEE Transactions on Biomedical Engineering, vol. 57, no. 11, pp. 2657–2666, November 2010. [DOI] [PubMed] [Google Scholar]
  • [32].Prateek GV et al. , “Modeling, detecting, and tracking freezing of gait in Parkinson disease using inertial sensors,” IEEE Transactions on Biomedical Engineering, vol. 65, no. 10, pp. 2152–2161, October 2018. [DOI] [PubMed] [Google Scholar]
  • [33].Ojeda L and Borenstein J, “Non-GPS navigation for security personnel and first responders,” Journal of Navigation, vol. 60, no. 3, p. 391407, 2007. [Google Scholar]
  • [34].Cavallo F et al. , “A step toward GPS/INS personal navigation systems: real-time assessment of gait by foot inertial sensing,” in 2005 IEEE/RSJ International Conference on Intelligent Robots and Systems, Aug 2005, pp. 1187–1191. [Google Scholar]
  • [35].Feliz Alonso R et al. , “Pedestrian tracking using inertial sensors,” 2009–01. [Google Scholar]
  • [36].Rampp A et al. , “Inertial sensor-based stride parameter calculation from gait sequences in geriatric patients,” IEEE Transactions on Biomedical Engineering, vol. 62, no. 4, pp. 1089–1097, April 2015. [DOI] [PubMed] [Google Scholar]
  • [37].Mallat SG, “A theory for multiresolution signal decomposition: The wavelet representation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 11, no. 7, pp. 674–693, July 1989. [Google Scholar]
  • [38].Burrus CS et al. , Introduction to wavelets and wavelet transforms: A primer. Prentice hall New Jersey, 1998, vol. 1. [Google Scholar]
  • [39].Mallat S, A wavelet tour of signal processing: The sparse way. Academic press, 2008. [Google Scholar]
  • [40].Selesnick IW et al. , “Simultaneous low-pass filtering and total variation denoising,” IEEE Transactions on Signal Processing, vol. 62, no. 5, pp. 1109–1124, March 2014. [Google Scholar]
  • [41].Selesnick I, “Sparsity-assisted signal smoothing (revisited),” in 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), March 2017, pp. 4546–4550. [Google Scholar]
  • [42].Boyd S et al. , “Distributed optimization and statistical learning via the alternating direction method of multipliers,” Foundations and Trends in Machine Learning, vol. 3, no. 1, pp. 1–122, 2011. [Google Scholar]
  • [43].Eckstein J and Bertsekas DP, “On the DouglasRachford splitting method and the proximal point algorithm for maximal monotone operators,” Mathematical Programming, vol. 55, no. 1–3, pp. 293–318, 1992. [Google Scholar]
  • [44].Harville DA, Matrix algebra from a statistician’s perspective. Springer, 1997, vol. 1. [Google Scholar]
  • [45].Donoho DL and Johnstone IM, “Adapting to unknown smoothness via wavelet shrinkage,” Journal of the American Statistical Association, vol. 90, no. 432, pp. 1200–1224, 1995. [Google Scholar]
  • [46].Selesnick IW, Sparsity-Assisted Signal Smoothing. Cham: Springer International Publishing, 2015, pp. 149–176. [Google Scholar]
  • [47].Nishihara R et al. , “A general analysis of the convergence of admm,” in Proceedings of the 32Nd International Conference on International Conference on Machine Learning - Volume 37, ser. ICML’15. JMLR.org, 2015, pp. 343–352. [Google Scholar]
  • [48].Horak F et al. , “Role of Body-Worn Movement Monitor Technology for Balance and Gait Rehabilitation,” Physical Therapy, vol. 95, no. 3, pp. 461–470, March 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [49].Mariani B et al. , “Quantitative estimation of foot-flat and stance phase of gait using foot-worn inertial sensors,” Gait & Posture, vol. 37, no. 2, pp. 229–234, 2013. [DOI] [PubMed] [Google Scholar]
  • [50].Colomar DS et al. , “Smoothing for ZUPT-aided INSs,” in 2012 International Conference on Indoor Positioning and Indoor Navigation (IPIN), November 2012, pp. 1–5. [Google Scholar]
  • [51].Skog I et al. , “Evaluation of zero-velocity detectors for foot-mounted inertial navigation systems,” in 2010 International Conference on Indoor Positioning and Indoor Navigation, Sep. 2010, pp. 1–6. [Google Scholar]
  • [52].Farrell J, Aided Navigation: GPS with High Rate Sensors, 1st ed. New York, NY, USA: McGraw-Hill, Inc., 2008. [Google Scholar]
  • [53].Goetz CG et al. , “Movement disorder society-sponsored revision of the unified Parkinson’s disease rating scale (MDS-UPDRS): Scale presentation and clinimetric testing results,” Movement Disorders, vol. 23, no. 15, pp. 2129–2170, 2008. [DOI] [PubMed] [Google Scholar]
  • [54].Burns A et al. , “Shimmer – a wireless sensor platform for noninvasive biomedical research,” IEEE Sensors Journal, vol. 10, no. 9, pp. 1527–1534, Sep. 2010. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary Material

RESOURCES