Gait Event Detection and Travel Distance Using Waist-Worn Accelerometers across a Range of Speeds: Automated Approach

Estimation of temporospatial clinical features of gait (CFs), such as step count and length, step duration, step frequency, gait speed, and distance traveled, is an important component of community-based mobility evaluation using wearable accelerometers. However, accurate unsupervised computerized measurement of CFs of individuals with Duchenne muscular dystrophy (DMD) who have progressive loss of ambulatory mobility is difficult due to differences in patterns and magnitudes of acceleration across their range of attainable gait velocities. This paper proposes a novel calibration method. It aims to detect steps, estimate stride lengths, and determine travel distance. The approach involves a combination of clinical observation, machine-learning-based step detection, and regression-based stride length prediction. The method demonstrates high accuracy in children with DMD and typically developing controls (TDs) regardless of the participant’s level of ability. Fifteen children with DMD and fifteen TDs underwent supervised clinical testing across a range of gait speeds using 10 m or 25 m run/walk (10 MRW, 25 MRW), 100 m run/walk (100 MRW), 6-min walk (6 MWT), and free-walk (FW) evaluations while wearing a mobile-phone-based accelerometer at the waist near the body’s center of mass. Following calibration by a trained clinical evaluator, CFs were extracted from the accelerometer data using a multi-step machine-learning-based process and the results were compared to ground-truth observation data. Model predictions vs. observed values for step counts, distance traveled, and step length showed a strong correlation (Pearson’s r = −0.9929 to 0.9986, p < 0.0001). The estimates demonstrated a mean (SD) percentage error of 1.49% (7.04%) for step counts, 1.18% (9.91%) for distance traveled, and 0.37% (7.52%) for step length compared to ground-truth observations for the combined 6 MWT, 100 MRW, and FW tasks. Our study findings indicate that a single waist-worn accelerometer calibrated to an individual’s stride characteristics using our methods accurately measures CFs and estimates travel distances across a common range of gait speeds in both DMD and TD peers.


Introduction
There is a pressing need to overcome challenges in measuring key temporospatial clinical features (CFs) of children with Duchenne muscular dystrophy (DMD) [1] in the community using single mobile wearable acceleration sensors.Gait patterns of people with DMD become progressively atypical with advancing disease, with reduced stride lengths, cadence, and gait speed, reduced intensity of accelerations in the vertical and anteroposterior axes of travel, and reduced vertical accelerations [2].These changes lead to alterations in patterns and magnitudes of acceleration that complicate computer-based identification of individual steps, which then impairs researchers' ability to measure gait features in an unsupervised manner during community-based activities.Single-sensor signals have been used to detect important gait events such as initial contact (IC) at different walking and running speeds [3] in laboratory settings, but methods for combining signals across an individual's full range of attainable velocities to accurately measure steps and distance traveled in the community have not been described.Our method uses a combination of clinical observation and machine-learning-and regression-based approaches to identify the weak patient's novel patterns of acceleration associated with their ambulation at different speeds.
Accelerometers can be more accurate than pedometers at slower walking speeds and in populations with atypical gait patterns, making pedometers less suitable for evaluating physical activity in such populations [4].Estimating CFs of gait (step length, step duration, step frequency, and gait speed) is a fundamental step in gait analysis, and detecting the IC of the heel is crucial for identifying gait events and the beginning of the step cycle.In a laboratory environment, detecting events and estimating CFs is typically accomplished by measuring ground reaction forces (GRF) and verifying with visual observation.However, using these methods to measure gait events in the community is often impractical.
Studies have described the potential of using acceleration signals to estimate CFs.Several studies have demonstrated that step length, gait speed, IC, and incline can be determined from acceleration signals of the lower trunk [3].Aminian and colleagues explored the feasibility of using a fully connected artificial neural network (ANN) with accelerometers on the trunk and heel to predict incline and speed based on ten statistical parameters extracted from the raw signal [5].The results revealed that a negative peak in the heel accelerometer signal indicates IC events in each gait cycle (two steps).
Studies comparing accelerometer signals from different body positions at various walking speeds demonstrate that positions near the body's center of mass (trunk, waist, pelvis, and sacrum) are suitable for capturing gait events [6][7][8].In a study by Zijlstra et al., participants walked on a force-transducing treadmill and overground while trunk acceleration data were recorded to estimate step lengths and walking speed.IC events were matched with vertical ground reaction force (GRF) normalized by body weight to anteroposterior acceleration.The start and end of gait cycles from the GRF corresponded with the time of the peak amplitude value in the anteroposterior acceleration signal [3].Further research by Lee et al. and Mo et al. demonstrated that IC events can be determined from anteroposterior acceleration measured at the pelvis and sacrum [9,10].They collected accelerometer signals from the pelvis/sacrum and GRF data and matched IC events on anteroposterior acceleration with vertical GRF.Initial contact events on the force plate corresponded with the instant of the positive peak pelvis/sacrum anteroposterior acceleration [10].
Detecting IC gait events and precisely measuring walking/running distance are vital components of gait analysis, offering invaluable clinical insights.Although GRF is capable of detecting IC events, its dependence poses limitations in communities without GRF availability.Therefore, there is a pressing need for alternative methods in IC event detection.Additionally, accurate distance measurement is critical in gait analysis, especially when dealing with muscle disorders.Traditional methods such as pedometers and wheel measurements encounter challenges in communities, particularly for long distances and low speeds, as observed in participants with muscular disorders.Consequently, a method that ensures both accurate distance estimation and IC event detection is imperative.
We present a machine learning (ML)-based method that automates detection of IC events and CFs using raw accelerometer signals obtained from consumer mobile devices [11,12].We demonstrate that using a single accelerometer worn close to the body's center of mass is an accurate and reliable approach to estimate CFs and IC events across a typical range of walking speeds.This method can be applied to healthy individuals and those with gait disturbances without the need for GRF measurements.

Materials and Methods
Estimating distance using accelerometer signals is challenging due to inherent quadratic error of accelerometers, which can result in deteriorating estimates even with short integration times and distances.Many methods attempt to estimate distance from accelerometers by integrating acceleration twice with respect to time, despite incorporating errorlimiting mechanisms and setting restrictions, which can result in errors due to noise, drift, and bias [13].We propose an ML-based signal processing method that accurately estimates an individual's distance traveled, step length, and number of steps across varying walking/running speeds, outperforming the built-in pedometer function on iPhones, which shows the highest error percentage in slow walking speeds [9].
Because different individuals have different walking/running behaviors that affect acceleration, we built a regression model for each individual to estimate distance based on their specific walking/running patterns.We developed a regression model using data from five different speeds (SC-L1 to SC-L5) to map step length to the corresponding anteroposterior acceleration amplitudes using pairs of distance and acceleration values (Figure 1A).We calculated distance for a single speed by averaging the step distances, while the acceleration was calculated by averaging the maximum values of acceleration in each step (Figure 1B).To ensure a fair comparison, we evaluated three sources of estimated data: first, ground-truth data based on video observation of distance traveled and number of steps; second, the pedometer sensor in the iPhone, which provided estimates of distance and number of steps; and, third, our Walk4Me system [11], which includes calibration regression models for estimating distance and a signal processing algorithm for measuring number of steps.We estimated the speed, step length, and frequency as derivatives from the regression and signal processing.

Participants
Fifteen children with DMD and fifteen TD peers participated in gait speed experiments.The age of the participants ranged from 3 to 16 years, with a mean age of 8.6 years and a standard deviation of 3.5.Their body weight ranged from 17.2 to 101 kg, with a mean weight of 36 kg and a standard deviation of 18.8.Their height ranged from 101.6 cm to 165.5 cm, with a mean height of 129 cm and a standard deviation of 15.8.All participants had at least 6 months of walking experience and were able to perform a 10-m walk/jog/run test in less than 10 s.Participants with DMD had a confirmed clinical diagnosis and were either naïve to glucocorticoid therapy or on a stable regimen for at least three months.Northstar Ambulatory Assessment (NSAA) [14] scores for DMD participants ranged from 34 to 8, indicating typical levels of function to clinically apparent moderate mobility limitation (Table 1).The protocol was reviewed and approved by the Institutional Review Board (IRB) at the University of California, Davis, and informed consent was obtained from each participant prior to the initiation of study procedures.Measurements were taken at eight different walking/running gait activities, including speed-calibration tests at slow walk to running speeds (SC-L1, SC-L2, SC-L3, SC-L4, and SC-L5), a 6-min walk test (6 MWT) [15], a 100-m fast-walk/jog/run (100 MRW) [16], and a free walk (FW).Participants engaged in walking, jogging, or running within a 25-m corridor delimited by two cones, as illustrated in Figure 2A,B.

Equipment
Acceleration data from each participant were sampled at a rate of 100 Hz using an iPhone 11 and our Walk4Me smartphone application [11].We utilized the iPhone 11, which is equipped with a 3−axis MEMS accelerometer from STMicroelectronics.It recorded g-force measurements within ±8 g along each axis, maintaining a data sampling rate of up to 100 Hz.The phones were securely attached at the waist [17] with an athletic-style elastic belt enclosure, positioned approximately at the level of the lumbosacral junction.The raw accelerometer signal was synchronized with video recordings captured by a GoPro camera at a rate of 30 Hz.An observer marked the events where a participant passed the start or end of the duration or distance assigned to each activity using the web portal of the Walk4Me system.

Gait and Events Detection and Data Analysis
We collected the raw accelerometer signal from 30 participants, which included the x, y, and z axes (vertical, mediolateral, and anteroposterior), along with the corresponding timestamps.Based on the findings of Zijlstra [3], we observed that the IC events were more distinguishable in the anteroposterior axis (z−axis) compared to the other axes.Therefore, we used the anteroposterior signal from the raw accelerometer data to develop our method for counting the number of steps, estimating step length, and calculating the total distance individuals walked at different speeds.

Method of Step Detection
Figure 3A presents a raw accelerometer signal of the anteroposterior movement (z−axis) from a TD participant during fast-walk speed calibration (SC-L4) for 2.4 s.The steps in the anteroposterior signal are characterized by long wavelengths (low frequency), while other wavelengths (high frequency) represent noise signals.To extract the steps, a trained clinical evaluator reviewed testing videos and applied a low-pass filter [18] to individual participants' data at each speed from a slow walk to a jog/run (range 0.5 Hz to 60 Hz) to smooth the signal and remove short-term fluctuations while preserving the longer-term trend indicating each step (Figure 3A,B).
We then identified the peak values of the filtered signal as the peaks occur only once per step in the filtered signal (Figure 3C).The number of peaks corresponds to the number of steps taken by the participant.Figure 4A shows the estimated number of steps using our method as blue dots, compared to the ground truth represented by a black line.The built-in pedometer steps estimation is shown in red.

Method of IC Detection
To detect the IC events, we find the midpoint between two peaks in the filtered signal (Figure 3D), which corresponds to the toe-off (TO) events during the gait cycle based on observation.We then identify all the peaks that occur within each step duration in the original acceleration signal (Figure 3E).Next, we determine the maximum peak value (anteroposterior G), which corresponds to the time point of each IC (Figure 3F).

Method of Step Length Estimation Using Regression
We create an individualized nonlinear regression model [19] for each participant to associate average peak acceleration values with step lengths.Figure 1A depicts the data flow of our model training and prediction process.Each model is trained using five different participant-selected calibration speeds (SC-L1 to SC-L5).For each speed, we calculate the average acceleration peak values by taking the mean of all the peaks as described in Section 2.3.2.To calculate the average step length for training, we divide the observed ground-truth distance by the number of steps obtained from Section 2.3.1.This process is repeated for each of the five calibration speeds (e.g., point SC-L4 in Figure 1A).The resulting individualized equation through all five points allows us to input the peak acceleration value of any step within the participant's range of ambulatory velocity to estimate that step's length (shown as the green line in Figure 1A).

Estimating the Distance
After establishing the individualized model, it can be used on unseen data.We calculate the step lengths of all identified steps from a previously unseen event and accumulate them to calculate the total distance traveled by the individual.In this project, we used 100 MRW, 6 MWT, and FW as input signals during the inference stage, as shown in Figure 4B, and compared the calculated distances with the ground-truth observed distances and the device's internal pedometer.

Calculating the Average Step Length
During the inference stage, to calculate the average step length of an individual, we divide the distance estimated from Section 2.3.4 by the number of steps obtained from Section 2.3.1.Figure 4C shows the estimated average step length using our ML model as blue dots, compared to the ground-truth average step length represented by a black line.The red dots represent the average step length estimated by the built-in pedometer.

Error Percentage Rates
To compare observed ground-truth step counts, distance traveled, and average step lengths with our model's estimates and the pedometer estimates native to the mobile devices, we employed two methods.First, we calculated the aggregated error for all estimates by determining an error percentage rate (Error rate ) using Equation (1).
The Error rate is calculated by aggregating the residual values of all participants (i) for all activities.The residual is the difference between the proposed methods (V c ) and the total number of ground-truth observations (V o ).Then, the total aggregated is subtracted from the total ground truth and divided by the total ground truth.Table 2 compares the error percentage rate of step count, distance, and average step length between our Walk4Me system and iPhone pedometer measurements.
Second, to evaluate the percentage error for each individual measurement and estimate pair, we subtracted the model estimate from the observed ground-truth measure and divided it by the ground-truth measure multiplied by 100 for each event.We computed mean (SD) percentage error for step count, distance traveled, and step length parameters for calibration events SC-L1 to SC-L5 combined, and separately for 6 MWT, 100 MRW, and FW efforts combined, as well as for all efforts combined.We compared the mean percentage error values between control participants and those with DMD using simple t-tests for each contrast.

Gait Pattern Representation
After determining the boundaries between steps using the IC detection method discussed earlier, we generate a composite map of each step normalized to the gait cycle percentage.This allows for visual examination of the determined steps for irregularities or comparison of averaged accelerometer patterns between individuals (Figure 5).The gait cycle is identified using peak detection at the IC event, marking the beginning and end of each step.The average acceleration patterns are also calculated from all gait cycles across all activities and at various speeds.The forward movement (x−axis) is normalized to a time scale of 0 to 100%.Using this method, we can identify the IC of every single step and estimate the step duration (Figure 3F) without the need to use GRF [3].By comparing the gait cycles of two participants (TD and DMD peers) at various speeds, distinctly different patterns of acceleration magnitude emerge (Figure 5), highlighting differences in the gait between the two participants.

Results
In this study, we assessed the accuracy of step counts during walking, jogging, and running using our Walk4Me system compared to the iPhone pedometer [20].We validated our results by comparing both systems with ground-truth data.Our findings, as shown in Table 2, indicate that the Walk4Me system had an average step count error rate of 3.46%, demonstrating reliable performance in accurately tracking steps at different speeds.The combined error rates from participants with DMD and TD participants ranged from 1.26% during slow walk pace (SC-L2) to 7.26% during the fast 100 m run.In contrast, the iPhone's built-in pedometer showed an average error rate of 48.46% during short-to moderate-distance tasks at varying gait velocities.The iPhone pedometer had the lowest error rate of 36.35% during the longer-duration fast-walk 6 MWT task, and the highest error rate of 85.26% during the short-duration jogging/running task SC-L5.−2.78% (6.46%)The level of significance was set at 0.05.

Discussion
The use of travel distance and step length as gait metrics is essential for clinical gait assessment in the community setting.However, accurately measuring step length traditionally requires a clinical facility or gait lab with a trained observer present during the assessment session.Clinical assessment methods are considered the most detailed and ideal, but their availability may be limited due to factors such as facility availability, staff availability, difficulties with patient travel to assessment locations, or public health restrictions such as those related to COVID-19.Additionally, clinical observation methods can be susceptible to human error, such as observer fatigue or distraction, as well as instrument errors, failed video recordings, or obstructed views, which can limit the utility of the collected data.An alternative option to overcome these limitations and facilitate more frequent and convenient collection of gait data in the community setting is to use off-the-shelf technologies such as pedometers, which are commonly built into smartphones and widely used in sports.However, it is crucial to assess the reliability of these devices, particularly when used for clinical purposes.Therefore, we conducted experiments to clinically validate the reliability of using a pedometer and compared the results with those obtained by observers.
We propose an ML-based signal processing method using our Walk4Me system, which can estimate step counts, distance traveled, and step lengths with increased levels of accuracy.The advantage of our method is that it requires less observed interaction, only necessitating a short duration of time for five speed-calibration tests.Our system can automatically estimate distance and step length without the need for human interaction.Some of the source code and a demo of this paper can be found at (28 May 2023) https: //albara.ramli.net/research/icalong with some additional results.

Conclusions
This study introduces a novel signal processing and machine learning technique that accurately identifies steps and step length based on the individual's gait style.Our findings demonstrate that using a single accelerometer worn near the body's center of mass can be more accurate than a standard pedometer.Our method can be applied to both healthy individuals and those with muscle disorders without the need for ground reaction force (GRF) measurements.To our knowledge, this is the first study to propose a method that extracts CFs from raw accelerometer data across the attainable range of gait speeds in healthy participants and those with muscle disease.On average, our method of counting steps and estimating stride length and distance traveled performs well when applied to longer structured sub-maximal clinical testing efforts and free-roaming self-selected pace travel.In these settings, our methods surpass the pedometer functions native to the mobile devices we use.This will allow us to extend basic elements of gait analysis to community settings using commonly available consumer-level devices.

Informed Consent Statement:
Written informed consent was obtained from each participant prior to the initiation of study procedures.
Data Availability Statement: Due to the human subject and health information privacy nature of the data and our institutional regulations, we will share information upon presentation of evidence of IRB or ethics board review and completion of appropriate data transfer agreements.Requests for data access can be addressed to the corresponding author.

Figure 1 .
Figure 1.(A) The relationship between step length and acceleration of the body's center of mass at various speeds for TD individuals and those with DMD.The plotted curves depict the regression model, with the black line representing all participants, the green line representing TD participants, and the red line representing DMD participants.(B) The diagram depicts the data flow of our model training and prediction process.In the training phase, the model uses five speed calibrations, SC-L1 to SC-L5, with ground truth to predict the average step length.The input to our model is the acceleration signal from unseen gait activities (6 MWT, 100 MRW, and FW).

Figure 2 .
Figure 2. (A) Diagram depicting the corridor layout with two cones positioned 25 m apart, guiding walking, running, and jogging directions.Exception for free-walk (FW), allowing participants the freedom to move within the building.(B) Image showcasing the real-life corridor environment.

Figure 3 .Figure 4 .
Figure 3.This figure presents the signal processing of the raw accelerometer signal of the anteroposterior movement (z−axis) of participant ID 2 on fast-walk speed calibration (SC-L4) for 2.4 s. (A) Original raw accelerometer signal.(B) Filtered signal.(C) Peak detection of the filtered signal.(D) Locate the beginning and the end of each step.(E) Peaks detection of the original signal.(F) Locate the highest peak in the original signal.

Figure 5 .
Figure 5.The gait pattern comparison of an individual with TD and an individual with DMD at varying speeds and a combination of multiple speeds and the effects of different speeds on gait pattern.

Author
Contributions: A.A.R., Conceptualization, Methodology, Software, Formal analysis, Writing, Supervision, Validation, Visualization, Investigation, Data Curation; X.L., Writing-Review and Editing, Methodology, Supervision; K.B., Investigation, Data Curation, Writing-Review and Editing; C.C., Writing-Review and Editing, Methodology, Supervision; E.G., Investigation, Supervision, Writing-Review and Editing; L.B.K., Investigation, Data Curation, Writing-Review and Editing; A.L., Investigation, Data Curation, Writing-Review and Editing; A.N., Investigation, Data Curation, Methodology; C.O., Investigation, Data Curation; D.R., Investigation, Data Curation, Writing-Review and Editing; J.W., Investigation, Data Curation, Writing-Review and Editing; D.A., Conceptualization, Methodology, Software, Analysis; C.M.M., Conceptualization, Resources, Funding acquisition; E.K.H., Conceptualization, Methodology, Software, Formal analysis, Writing, Supervision, Funding acquisition, Investigation.All authors have read and agreed to the published version of the manuscript.Funding: This This research was funded by the US Department of Defense (grant number W81XWH-17-1-0477), the Muscular Dystrophy Association (grant number 646805) and intamural pilot funds from the University of California Center for Information Technology Research in the Interest of Society (CITRIS) and the Banatao Institute.Institutional Review Board Statement: The study was conducted according to the guidelines of the Declaration of Helsinki, and approved by the Institutional Review Board (or Ethics Committee) of the University of California Davis (IRB#1305174, March 18, 2019).

Table 1 .
Characteristics of the children included in the study.

Table 2 .
The table compares the error percentage rate of the step count, distance, and average step length between our Walk4Me system and iPhone pedometer measurements.

Table 3 .
The table shows the percentage error (correlation, p-value, means, and SD) of the predicted and observed values for step counts, distance traveled, and step length vs. ground-truth observations.