Accuracy of Estimates of Step Frequency From a Wearable Gait Monitor
M Punt, MSc1, H Wittink, PhD1, F van der Bent, Ing1, Jh van Dieën, PhD2,3
1Research group Lifestyle and Health, Utrecht University of Applied Sciences, Utrecht, The Netherlands; 2Move Research Institute Amsterdam, Faculty of Human Movement Sciences, VU University Amsterdam, Amsterdam, the Netherlands; 3King Abdulaziz University, Jeddah, Saudi Arabia
Corresponding Author: Michiel.firstname.lastname@example.org
Journal MTM 4:1:2–7, 2015
Background: Assessment of gait activity by accelerometry requires data analysis. Currently several methods are used to estimate step frequency. At present the relation between step frequency estimation, gait speed and minimal required time window length remains unknown.
Aims: The purpose of the study was to assess the accuracy of estimates of step frequency (SF) from trunk acceleration data analyzed with commonly used algorithms and time window lengths, at a wide range of gait speeds.
Method: Twenty healthy young subjects performed an incremental treadmill protocol from 1 km/h up to 6 km/h, with steps of 1 km/h. Each speed condition was maintained for two minutes. A waist worn accelerometer recorded trunk accelerations, while video analysis provided the correct number of steps taken during each gait speed condition. Accuracy of two commonly used signal analysis methods (autocorrelation, fast Fourier transformation) was examined with time windows of two, four and eight seconds.
Results: Our main finding was that accuracy of SF estimates with fast Fourier transformation and autocorrelation improved with increasing time window size, only at the lower gait speeds. Accuracy of SF estimation was lower at low gait speeds independent of the algorithm and time window used.
Conclusion: We recommend a minimum TW length of 4 seconds when using AC and PSD algorithms and when using the PSD algorithm to use spectral averaging, as this leads to better results at short TW and low gait speeds.
Quantitative assessment of gait patterns usually involves laboratory methods, such as force plates and optical motion analysis systems1. The ecological validity of such laboratory-based assessment can be questioned, i.e. does the movement performed in the gait lab represent the normal movement of a subject during daily life?2. Tri-axial accelerometers fixed on the human body allow quantitative analysis of gait patterns and offer the advantage that they are not limited to a laboratory setting3. Accelerometry-based assessment has become more and more accessible, with examples of new applications being: real-time gait parameter recognition4, continuous activity monitoring5 and telerehabilitation6.
A basic parameter to be estimated in gait analysis is the number of steps taken per unit of time, i.e. the step frequency (SF). Algorithms based on Autocorrelation (AC)7,8 and Power Spectral Density (PSD)9 have been used to this end. These methods require analysis of data collected over a time window (TW) of a given size. The choice of TW size for data analysis depends on many factors. Accuracy of the estimation increases with TW size. In addition, smaller TWs reduce the frequency resolution and increase the chance of ‘pectral leakage’. However, step frequency (SF) within one person may vary over time and the length of the TW limits resolution in determining such variations. In addition, a longer TW produces a time delay due to the longer data collection and calculation times. This time delay might be unacceptable in real-time and continuous monitoring applications, especially because compact wearable systems are restricted in computational capacity10. Finally, gait speed is often reduced in specific populations, such as patients post stroke11 and with Parkinson’s disease12. Consequently, SF tends to be lower than in normal populations11. Low SF may require a longer TW as the events occur less frequently.
To the best of our knowledge, it is at present unknown which TW size provides the most accurate SF determination across the range of gait speeds that humans produce. The main objective of this study was to determine the effect of TW size on accuracy of SF determination over a range of gait speeds, for two most common used estimation methods (based on AC and PSD). For the PSD based estimates, we compared estimates of SF as the frequency at the peak PSD to a weighted average of the frequency at peak PSD and the nearest neighboring frequencies. We speculated that the latter would improve the accuracy of SF estimation, particularly for small time windows as spectral averaging might overcome effects of spectral leakage. In addition, it has been assumed that combining acceleration signals from different directions might improve the accuracy of gait parameter detection10,4, at the cost of requiring more computational capacity. Therefore our second aim was to determine whether or not including acceleration signals from different directions improves the accuracy of measuring SF.
Method and data analysis
Twenty subjects (7 males, 13 females; age 28,6 ± 11,2yr; height 172,6 ± 8 cm; weight 69,4 ± 9,7 kg; BMI 23,2 ± 2,5; mean ±SD) voluntarily participated in the study. This study was approved by the local Ethics Committee and written informed consent was obtained from each participant. Treatment of the participants was according to the Helsinki declaration13.
All subjects performed a twelve-minutes walk on a calibrated treadmill (En Mill treadmill, Enraf Nonius, the Netherlands). The first speed was set at one km/h and speed was increased by one km/h after every two minutes. Walking speed ranged from one km/h up to six km/h. The treadmill speed was manually adjusted by a research assistant. Only the last 88 seconds of each two-minutes walking bout were analyzed in order to avoid acceleration effects. The actual number of steps taken was derived from video observation.
One tri-axial, piezo-capacitive accelerometer was worn around the waist (70X80X25mm, 150 grams, range ± 2.5g, output is in mV, a change of 1mV corresponded to a change of 0.08 m/s2 (resolution)). Acceleration signals were digitally stored on a memory card with a sampling rate of 25 samples/s. A camera was placed behind the treadmill (Panasonic type HC-V70, 50 samples/s).
2.4 Data analysis
Signal processing was performed using MATLAB (Matlab 7.10.0, The MathWorks, USA). Based on sensor alignment, acceleration signals were identified as anterior-posterior (AP), medio-lateral (ML) and vertical (VT). A low-pass second-order Butterworth filter with a cut-off frequency of 10 Hz was used. We compared two data analysis methods: AC and PSD (with and without spectral averaging with TW of two, four and eight seconds. Furthermore, accuracy of SF estimates derived from the AP acceleration signal as well as from combined AP and VT signals with of AC and PSD was determined.
2.5 Autocorrelation (AC)
We used the unbiased AC sequence of the acceleration signals8 where in x(i) = (1,2..N) represents the time serie used, N represents the amount of samples used in the equation and m represents the time-lagged phase shift in samples from the same time serie.
We used an algorithm for automatic detection of the first dominant period (ad1) and second dominant period (ad2)14. ad1 was subtracted from ad2, resulting in the number of samples between two contralateral steps (delta). Delta was divided by sample frequency and subsequently multiplied by the non-overlapping TW length. This procedure was implemented for all time windows in the 88 seconds walking bouts and results were summed, to estimate the total number of steps in the trial.
2.6 Power Spectral Density (PSD)
Fast Fourier Transformation (FFT) was used to estimate the PSD of the acceleration signals. A custom-made algorithm searched for the peak in the PSD. We assumed that the highest peak in the power spectrum was the SF. For a more detailed description of the calculations, See9.
2.7 Spectral averaging
As an extension of the above method, we calculated a weighted average over the frequency at the highest power density and its nearest neighboring frequencies. Herein is Power(i) the amount of presents at a certain frequency (Δf) in the time serie.
2.8 Combining AP and VT signals
Similar calculations for AC and PSD were made; however, input was the vertical (VT) acceleration signal. AC and PSD results from AP and VT signals were averaged. This resulted in AC and PSD derived estimates from both AP and VT signals. Further analyses were similar to the description above.
The difference in estimated number of steps from acceleration data and number of steps counted from video observation was expressed as mean absolute percentage error. A smaller mean absolute percentage error reflects a higher accuracy. Normality of the data was confirmed by the Kolmogorov-Smirnov test. We used a repeated measure ANOVA, to test for effects of gait speed, TW and algorithm type and their interactions. Tukey HSD tests were used for post-hoc analyses. To compare the different algorithms in relation with TW and gait speed we used a three-way factorial ANOVA repeated measures to test for any interaction effects between: gait speed * TW * and type of algorithm used.
3.1 Power Spectral Density and Autocorrelation
Figure 1 illustrates the accuracy of the autocorrelation (AC) and Power spectral density (PSD) based estimates of SF, at all TW lengths and gait speeds. A three-way ANOVA repeated measures for type of algorithm (PSD and AC), TW length and gait speed demonstrated a main effect of algorithm (F = 69.11, P < 0.001), a main effect of TW length (F = 97.11, P < 0.001) a main effect on gait speed (F = 8.26 P < 0.001) and a significant interaction effect between these three factors (F = 4.33, P < 0.001). Post-hoc analyses demonstrated a higher accuracy for PSD at 2 seconds TW at all gait speed conditions compared to AC at a 2 seconds TW. Comparing AC with PSD at the 4-seconds TW revealed a higher accuracy for AC for the first two gait speed conditions. No differences were found at the 8-seconds TW.
Figure 1: Autocorrelation and Power Spectral Density results for estimating step frequency at a wide range of gait speeds (1 – 6km/h), at different TW lengths * = 2 second window length, ☐ = 4 second window and o = an 8 second window. Data is presented as the absolute percentage differences against camera observation. Please notice the difference in vertical scale between left and right panel.
Evaluation of the AC algorithm revealed a significant effect of TW size (F = 106.3, P < 0.0001), gait speed (F = 6.02, P < 0.0001) and an interaction effect of TW and gait speed (F =3.52, P < 0.001). Post-hoc analyses revealed that SF estimates were less accurate for 2-seconds TW compared to 4- and 8-seconds TW for all gait speeds. Accuracy for 4-seconds TW was higher compared to 8-seconds TW at slow and fast speeds (1, 2 and 5, 6 km/h). Post-hoc analyses within the TW size conditions revealed a significant increase in accuracy with increasing gait speed for TW of 2 and 8 seconds.
3.3 Power Spectral Density (PSD)
PSD based estimates were compared between 2-, 4- and 8-seconds TW and all gait speed conditions. A significant effect of TW (F = 16.3, P < 0.0001) was found indicating higher accuracy with longer time windows. Furthermore a significant effect of gait speed (F = 6.8, P < 0.0001) indicating that accuracy improved with increasing speed, moreover no significant interaction effect between TW and gait speed (F = 1.7, P = 0.07).
3.4 Spectral averaging
Figure 2 illustrates the effect of spectral averaging on the PSD based estimates. Significant main effects were found for gait speed (F = 8.58, P< 0.001) for TW length (F = 28.79, P < 0.001) and type of algorithm used (PSD and PSD with spectral averaging) (F = 18.21, P < 0.001). A significant interaction effect was found between gait speed, TW length and algorithm (F = 2.15, P = 0.022). Post-hoc analyses demonstrated that spectral averaging improved accuracy for 2-seconds TW across all gait speed conditions in comparison to PSD. In addition, spectral averaging for a TW of 4 seconds significantly improved accuracy in comparison to PSD at a TW length of 4 seconds at gait speeds of 1 and 2 km/h. No differences were found between PSD and spectral averaging at 8-seconds TW. However, accuracy improved for both methods at gait speeds of 3 km/h and faster.
Figure 2: Results for the spectral averaging in comparison with PSD algorithm at different time windows and at a wide range of gait speeds. ☐ = spectral averaging and * represents PSD. A = 2 seconds TW, B = 4 seconds TW and C = 8 seconds TW. Data is presented as the mean absolute percentage error against camera observation.
3.5 Combining AP and VT accelerations
Figures 3 and 4 illustrates the effect on accuracy of combining the AP and VT accelerations for the AC algorithm and PSD algorithms. Addition of the VT signals did yield similar and in some cases less accurate results for both algorithms.
Figure 3: Results for the superimposed autocorrelation in comparison to autocorrelation at different time windows and at a wide range of gait speeds. Superimposed autocorrelation = ☐ and regular autocorrelation = *. A = 2 seconds TW, B = 4 seconds TW and C = 8 seconds TW. Data is presented as the mean absolute percentage error against camera observation.
Figure 4: Results for the superimposed PSD in comparison to PSD at different time windows and at different gait speeds. Superimposed PSD = ☐ and regular PSD = *. Respectively A = 2 seconds TW, B = 4 seconds TW and C = 8 seconds TW. Data is presented as the mean absolute percentage error against camera observation.
Motivated by the possibility of developing wearable gait systems for real-time gait parameter recognition, real-time gait parameter feedback and gait activity monitoring, our first aim was to examine the accuracy of SF estimates over a wide range of gait speeds for AC and PSD algorithms at different time window (TW) lengths. We found more accurate SF estimates when both gait speed and TW were higher. Furthermore, we found an interaction effect between TW length and gait speed for AC. These results support the idea to enlarge the TW length when the population of interest consists of slow walkers. Differences between the AC and PSD based estimates were small and not consistent across TW and speeds. Spectral averaging did improve accuracy for short TW lengths i.e. 2 or 4 seconds and at slow gait speeds. Combining estimates from AP accelerations with estimates form VT accelerations did not yield more accurate SF estimates. Finally, independent of the algorithm and TW used, SF estimation accuracy is always less at slow gait speeds compared to higher gait speeds.
To the best of our knowledge, only a limited number of studies have presented guidance on minimum numbers of meters or steps for valid and reliable gait parameter recognition. For example, Moe-Nilssen et al.8 used five strides, while Auvinet et al.15 recommend 40 m. However, these studies did not explore effects of TW length and changes in gait speed systematically. Yang et al.4 recently pointed out that the use of time windows may be necessary in view of variations in gait speed over time. Therefore future research in the field of activity monitoring should focus on the determination of the optimization of window length with respect to accuracy, reliability and sensitivity to variation in gait speed.
Over ground walking is different compared to treadmill walking16; in treadmill walking gait variability is reduced compared to over ground walking17. However, dominant frequencies measured around the waist in over ground walking reflect SF as well3. Therefore, we expect no major differences in effects of the methodological choices investigated when this experimental protocol had been carried out in an over ground condition. Most advanced wearable gait systems are and will be developed for abnormal or pathological gaits such as in stroke and Parkinson’s disease5,18. Our conclusions and recommendations can be useful in developing algorithms for pathological gait, but have to be interpreted with caution as our study used young, healthy subjects only.
We examined the accuracy of estimating step frequency over a wide range of gait speeds derived from accelerometer signals in relation to signal analysis. When developing specific algorithms for the detection of step frequency, the optimal TW length depends on gait speed for both AC and PSD based estimates. We recommend a minimum TW length of 4 seconds when using AC and PSD algorithms and when using the PSD algorithm to use spectral averaging, as this leads to better results at short TW and low gait speeds. Combining AP with VT acceleration data did not improve estimates of step frequency.
Conflict of interest statement
The authors state that there was no conflict of interests with any financial or personal relationships or organizations that could influence the research results.
We would like to thank our research assistants Femmy Troost and Desiree Pultrum for their contribution in data collection and data analysis. We also would like to thank our financial funder SIA RAAK, 2010-2-024 INT.
5. Wagenaar RC, Sapir I, Zhang Y, Markovic S, Vaina LM, Little TDC. Continuous monitoring of functional activities using wearable, wireless gyroscope and accelerometer technology. Conf Proc IEEE Eng Med Biol Soc 2011; 4844–7.
6. Vitacca M, Bianchi L, Guerra a, Fracchia C, Spanevello a, Balbi B, et al. Tele-assistance in chronic respiratory failure patients: a randomised clinical trial. Eur Respir J Off J Eur Soc Clin Respir Physiol 2009;33:411–8.
10. Jovanov E, Wang E, Verhagen L, Fredrickson M, Fratangelo R. deFOG–A real time system for detection and unfreezing of gait of Parkinson’s patients. Conf Proc IEEE Eng Med Biol Soc 2009;5151–4.
14. Tura A, Rocchi L, Raggi M, Cutti AG, Chiari L. Recommended number of strides for automatic assessment of gait symmetry and regularity in above-knee amputees by means of accelerometry and autocorrelation analysis. J Neuroeng Rehabil 2012;9:11.
15. Auvinet B, Chaleil D, Barrey E. Accelerometric gait analysis for use in hospital outpatients. Rev Rhum Engl Ed 1999;66:389–97.