Introduction

Quantitative gait analysis (QGA) involves the accurate measurement, description, and assessment of gait dynamics that characterize person’s locomotion [1] and which can be affected by physical impairment, age progression and changes in health status.

From this standpoint, gait evaluation aids in understanding the etiology of gait abnormalities and in treatment decision-making [2]. Moreover, beyond the assessment of gait pathologies and identification of gait abnormalities [3, 4] several studies have shown that QGA can be a powerful tool to measure the inherent gait variability over time which is a crucial aspect for diagnosing and monitoring the clinical course of specific disabilities or diseases [57]. In such a context, changes in gait patterns have a potential use as specific predictive markers of frailty syndrome [8, 9], the onset of cognitive decline [10] and neurodegenerative diseases such as Parkinson [11, 12], among others.

However, to this day, gait analysis is still frequently based on observational interpretations by clinicians. Human observations tend to be subjective and depend on the experience and judgement of the clinician, which can vary from person to person [13].

On the other hand, there are currently specialized laboratories in physical performance where it is possible to carry out QGA to estimate gait parameters that are very accurate and redundant. These laboratories use highly specialized systems for 3-D motion capture as the Vicon motion capture system (Vicon Motion Systems Ltd., Oxford, UK). Nonetheless, despite the accuracy achieved there are a number of constraints that limit gait analysis inside these laboratories, such as the onerous cost of equipment and the low access to these facilities for many people.

Against this background, there is a need for affordable wearable technologies suitable for QGA. Such systems, can identify changes in the gait patterns and, along with appropriate reasoning techniques, to predict adverse events and diagnose early stages of specific diseases, encouraging timely medical interventions. Nonetheless, these technologies can also effectively complement the traditional gait analysis.

In this work, a new procedure to accurately demarcate gait events from a waist-mounted single accelerometer is presented. The device acquires trunk accelerations during gait trials. Signals from the acceleration magnitude and the vertical acceleration are smoothed through different filters. Cut-off points between filtered signals as a result of convolving with varying levels of Gaussian filters and other robust features against temporal variation and noise are used to accomplish the identification of characteristic peaks that correspond to gait events in the antero-posterior acceleration.

For validation purposes, five pre-frail elders and five young healthy adults have been recruited in order to investigate whether the gait parameters derived from the identified gait events can determine if there are substantial differences in the gait patterns, among the two groups of different mobility.

The rest of the paper is organized as follows. This section is closed with a descriptive definition of the gait cycle introducing its relevant gait events and the temporal parameters derived from them. A review of the literature is also conducted with specific references to other wearable sensors in which a single accelerometer is used for QGA. “Method” details the proposed system, paying particular attention to the procedure to demarcate the gait events from acceleration signals. The instrumentation used (the built-in accelerometer from a mobile phone), the subjects who undergo the trials and the clinical protocol are also described here. “Results and discussion” presents and discusses the results. Finally, “Conclusion” ends with concluding remarks about the system’s limitations and possible future challenges.

The gait cycle

Gait is described as a cyclic movement of the feet in which both alternate in contact with the ground [14]. In [15], it is also defined as a sequence of repetitive movements that varies over time and from one subject to another.

A more comprehensive description is provided in [16], where a formal specification of gait is performed, consisting of a reference model and a set of objectives that gait should satisfy. As a result, gait is defined as:

An anthropomorphic upright self-displacement, in an alternating stepping of two feet, with no additional fulcra, keeping at least a point of support at every time, on a horizontal or slighty inclined surface.

These three definitions have in common the description of gait as a periodic task, that can be decomposed into gait cycles. A graphical definition of a normal or healthy gait cycle, introducing its relevant gait events and temporal parameters is illustrated in Fig. 1.

Fig. 1
figure 1

Graphical definition of a normal/healthy gait cycle

The heel-strike (HS) event represents the exact moment when each foot comes into contact with the ground. On the other hand, the toe-off (TO) occurs when each foot leaves the ground. TO and HS events, referred to as gait events help to determine the gait phases and other derived parameters from the gait cycle. Thus, the correct timing of the gait events must be accurately measured for a properly characterization of the gait cycle.

In normal/healthy symmetrical gait, TO occurs at about 60–62 % of gait cycle [15], dividing the cycle into stance (when the foot is on the ground) and swing phases (when the foot is in the air), see Fig. 1.

The stance phase begins with a HS, and can be subdivided into the single support and double support phases. In a similar manner, the step time can be computed as the measured time from HS of one foot to the next HS of the opposite foot; and the stride time as the measured time from HS of one foot to the next HS of the same foot, that means, one entire gait cycle.

Review of the literature

The ability to demarcate the timing of gait events (HS and TO) by means of acceleration signals acquired from a waist-mounted single accelerometer has been an increasing interest in designing wearable systems for QGA. Just the fact that a single unit can provide these gait events is potentially interesting because it reduces the number of inertial sensors attached to the body, i.e. two devices mounted on both lower limbs may be avoided. Therefore, less obtrusive and simple wearable systems can be achieved. Moreover, these systems are better suited to estimate other related features, such as the gait balance due to the fact that trunk accelerations are being measured.

In [17], HS events are estimated from vertical and antero-posterior accelerations through a tri-axial accelerometer held against the sacrum. TO is demarcated by an inflection in vertical acceleration. Identification of right/left HS could be achieved from medio-lateral acceleration.

An inverted pendulum model is used in [18] to identify HS events from subjects walking at a range of speeds on a treadmill. A tri-axial accelerometer positioned over the second sacral vertebra enables the acquisition of antero-posterior accelerations which are low-pass filtered with a 4th order Butterworth filter (first stage of filtering), and filtered again using a cut-off frequency of 2 Hz (based upon the expected maximum step rate). HS events occur when the sign of the antero-posterior acceleration changes from positive to negative (zero-crossing).

A refinement of the method in [18] is also provided in the paper using the peak in acceleration preceding the zero-crossing to estimate the HS event. Both approaches are validated by comparison to ground reaction forces with a significant improvement in the last one (in terms of error in estimation).

The peak detection method proposed in [18] is adapted in [19] for estimating HS events in older adults. In this occasion, temporal gait parameters are compared to those estimated using a GAITRite electronic walkway (CIR Systems Inc., PA, USA) as ground truth. Interclass correlation coefficients (ICC) for step durations ranging from 0.81 to 0.88 are obtained.

Zero-crossing technique is also present in [20], Mansfield et al. acquire data from accelerations perpendicular to the lumbar spine (antero-posterior axis). The gravity component is compensated by estimating the tilt of the accelerometer during an initial standing position. After a 2 Hz low-pass filter, HS are segmented when the slope of the signal changes from negative to positive. The system is compared to a footswitch device.

Other algorithm based on the description of gait events given in [18] is the one proposed by González et al. [21]. A 30th order low-pass FIRFootnote 1 filter with a cut-off frequency of 2.5 Hz is applied to compute the principal harmonic of the vertical acceleration obtained from a dedicated accelerometer unit placed close to the L3 vertebral position. Filtered signal is used to locate maxima in the vertical acceleration. Each HS event is marked at the maximum of the antero-posterior axis which is immediately before a vertical acceleration maximum. TO events are located as local minimum in a small neighbourhood after each vertical acceleration maximum. The TO that follows a given HS corresponds to the contra-lateral foot.

A completely different approach for gait event demarcation is presented in [22]. A time-frequency descomposition of the vertical acceleration from a tri-axial accelerometer placed on the fifth lumbar vertebra is used. Firstly, vertical acceleration signal is integrated and then differentiated using a Gaussian CWT.Footnote 2 HS events are identified as the time of the minima. The differentiated signal undergoes a further CWT differentiation from which TO events are identified as the times of the maxima. A GAITRite electronic walkway is used as ground truth for validation purposes. The experimental protocol conducted consists in walking at normal pace for 2 minutes following a 25 metres designed route.

The approach presented in this article stands out from the works in this section because of the use of a mobile phone built-in accelerometer instead of a dedicated device. This makes it accesible and easy-to-deploy. In addition, to the best of our knowledge, the application of a scale-space Gaussian filter in combination with zero-crossing and peak detection techniques has never been used for gait event demarcation over acceleration signals, providing a novel point of analysis.

Method

Instrumentation

The built-in tri-axial accelerometer from an Android mobile phone is used to acquire trunk accelerations during gait trials at a sampling rate of 70 Hz. The mobile phone is equipped with a LSM330 digital tri-axial accelerometer and digital tri-axial gyroscope (STMicroelectronics, Ginebra, Switzerland), commomly used in this kind of devices.

The mobile phone is positioned over the second lumbar vertebra (L2) using a customized belt with the screen facing away. The experimental set-up is shown in the scheme in Fig. 2.

Fig. 2
figure 2

Experimental set-up. The mobile phone is attached to the L2 vertebra with the screen facing away. The vertical (VT), antero-posterior (AP) and medio-lateral (ML) axes of the accelerometer are displayed

A background service has been implemented to facilitate the data acquisition process. An initial period of 15 s is provided to place the device in the belt, prior to the beginning of the gait trial. Then, after three 1-second long alert tones the trial starts and simultaneously the participant walks along a straight line for 20 s, until a new tone alerts the end of the capture.

Gait event demarcation and temporal parameter calculation

Our algorithm has its roots in the definition of gait events given by [18, 21] from the antero-posterior acceleration of the Lumbar area. In that definition, relevant maximum peaks correspond to HS events, and TO events of the contra-lateral foot are the local minimum peaks in a small neighbourhood after each HS, see Fig. 3.

Fig. 3
figure 3

Extracted from [21]. Antero-posterior acceleration for a 31-year-old subject while walking at 1.2 m/s. HS and TO, as described in [18], are marked with a plus and a product sign, respectively. The same events are detected by González et al. [21] and marked with an open square and an open rhombus, respectively. Distance between tick marks represents 0.5 s. The 16 events in the figure are considered as correct detections

As prior steps to the gait event demarcation, the magnitude of the 3-D acceleration which represents the energy signal e(i) and the vertical acceleration signal y(i) are separately filtered using different Gaussian kernels to accentuate relatively high energy concentration areas in both signals. These areas correspond to step occurrences in whose vicinity the gait events are present.

The probability density function of the Gaussian distribution is defined by the Eq. 1.

$$ F(x,\sigma) = \frac{1}{\sqrt{2 \pi {\sigma^{2}}}} \ e^{\frac{-x^{2}}{2 {\sigma^{2}}}} $$
(1)

where σ represents the standard deviation of the Gaussian distribution (the width of the Gaussian kernel).

Filter settings

The smoothing capability of a Gaussian kernel depends on the choosen σ parameter. A larger σ produces greater smoothing effect, removing many peaks from the original signal. A smaller σ has minor effect and therefore, more peaks remain. If a tiny σ is used only high-frequency noise is removed. The different Gaussian filters applied to the energy e(i) and vertical acceleration y(i) signals are listed below:

  • Scale-space filtering of the energy signal e(i).

    A 3-level scale-space Gaussian filter is applied to the energy signal e(i). Each level (or Gaussian kernel) in the scale-space filter provides a different smoothing capability.

    The use of the scale-space filtering idea enables a multi-scale analysis of the magnitude of the 3-D acceleration signal, decomposing it according to different scales (kernel widths) that correspond to a full range of gait cycle durations.

    In order to determine the size of the σ parameter for each Gaussian kernel we have made the assumption that the gait cycle duration (or stride time) is between T m i n =500 ms (milliseconds) and T m a x =1750 ms. This range works for different gait patterns and it is derived empirically from other gait tests. In [23] we estimated stride times with values between T m i n =800 ms and T m a x =1550 ms, for a population of ten adults (five young adults and five elders without known gait pathologies). A slightly larger range has been adopted here to ensure that all gait speeds are considered.

    A pair of energy peaks are expected to be found within each gait cycle, corresponding to two consecutive steps. Accordingly, the three σ widths that have been assigned for the three Gaussian filters, represent three different step durations {short step, medium step, large step}. Therefore, σ parameters are defined as follows:

    $$ \sigma \in \{T_{min}/4, \ (T_{min} + T_{max})/8, \ T_{max}/4\} $$
    (2)

    The signals \(\hat {e}_{\sigma }(i)\) illustrated in Fig. 4 are an example of the output obtained after filtering an original energy signal e(i) using the three σ parameters from Eq. 2, which are configured to underscore short, medium and large step durations, respectively. These signals are then combined through the Eq. 3:

    $$ p_{e}(i) = {\prod}_{\sigma} \hat{e}_{\sigma}(i) $$
    (3)

    The result of the previous equation (product) is the smoothed signal p e (i), which represents the output of the scale-space filter. It is drawn using an unfilled purple red mark in the example in Fig. 4.

  • Single Gaussian filtering of the vertical acceleration signal y(i).

    Fig. 4
    figure 4

    Example to illustrate the output obtained in each of the levels of the proposed scale-space Gaussian filter. A slice of the magnitude of the 3-D acceleration (the energy signal e(i)) is the filter input. This input is separately convolved with Gaussian kernels that represent short (σ = T m i n/4), medium (σ=(T m i n + T m a x)/8) and large (σ = T m a x/4) step durations. T m i n and T m a x are predefined time periods for minimum and maximum gait cycle durations. The smoothed energy product p e (i) is the final output of the scale-space filter

    The vertical acceleration y(i) is separately convolved with two Gaussian kernels with σ=50 ms and σ=100 ms. The resultant signals \(\hat {y}_{\sigma _{50}}(i)\) and \(\hat {y}_{\sigma _{100}}(i)\) are illustrated in the example in Fig. 5.

    Fig. 5
    figure 5

    The vertical acceleration signal y(i) is convolved with two single Gaussian kernels with σ=50 ms and σ=100 ms. The slice of the vertical acceleration comprises the same timestamp as the one in Fig. 4

    The narrowest Gaussian kernel (σ=50 ms) allows us to accentuate relevant maximum peaks in the vertical acceleration signal in whose vicinity a step occurrence can be found. The purpose of this filter is similar to that proposed in [21], where a cut-off frequency of 2.5 Hz (based upon the expected maximum step rate) is used to determine “step” areas. The kernel width (σ=50 ms) works properly for all the stride durations defined before, between T m i n =500 ms and T m a x =1750 ms.

    From empirical observations by comparing the signal \(\hat {y}_{\sigma _{50}}(i)\) with the antero-posterior signal z(i), we have found evidence that each HS event occurs somewhere between a local maximum in the \(\hat {y}_{\sigma _{50}}(i)\) signal and its previous local minimum. Therefore, if y(i) is convolved with the second Gaussian kernel that uses a σ parameter which is twice the size of the first kernel, it produces the smoothed signal \(\hat {y}_{\sigma _{100}}(i)\) (see Fig. 5).

    The \(\hat {y}_{\sigma _{100}}(i)\) signal crosses \(\hat {y}_{\sigma _{50}}(i)\) in intermediate points between its local maxima and its previous local minima, which will be useful to restrict the search area where HS events are located in the following steps.

On the basis of this set of smoothed signals the algorithm to identify characteristic peaks that correspond to HS and TO events is explained in the next “HS and TO identification”.

HS and TO identification

There are a number of sequential processes required to identify HS and TO events in the antero-posterior acceleration using the set of filtered signals from “Filter settings”. These processes are detailed below:

  • (P1) Subtraction signal s y (i) and identification of local maxima and zero-crossing points.

    The first process involves computing the subtraction signal s y (i) between the smoothed vertical acceleration signals \(\hat {y}_{\sigma _{50}}(i)\) and \(\hat {y}_{\sigma _{100}}(i)\). Peaks (local maxima) and zero-crossing points are identified over this signal and their x-coordinates are stored in the sets \(PK_{s_{y}}\) and ZC, respectively.

    For peak detection a simple algorithm as the proposed in [24] is used. This algorithm is based on the assertion that a peak (local maximum) is the highest point between “valleys”. The strategy followed could be summarized as iterating over the corresponding signal looking for a local maximum, while the signal is growing; and then, keep iterating over it looking for a local minimum, while the signal continues to decline. See the explanation in [24] for more details.

    Figure 6 shows the appearance of the subtraction signal s y (i) using the inputs from the example in Fig. 5. Maximum peaks \(PK_{s_{y}}\) and zero-crossing points ZC are also indicated.

    Fig. 6
    figure 6

    The result of the subtraction signal s y between the smoothed signals \(\hat {y}_{\sigma _{50}}(i)\) and \(\hat {y}_{\sigma _{100}}(i)\). It is represented by a solid blue line. Maximum peaks \(PK_{s_{y}}\) and different subsets of zero-crossing points are also marked in the figure

    Figure 7 shows the slice of the antero-posterior acceleration signal z(i) that corresponds to the same timestamp used in the above examples, HS and TO events are marked according to the definitions in [18, 21].

    Fig. 7
    figure 7

    The figure illustrates a slice of the antero-posterior acceleration signal z(i). It corresponds to the same timestamp used in the other examples. HS and TO events are marked based on the definitions in [18, 21]. The relevant zero-crossing points (Z C 2) within the time slice are also represented with dashed lines

    Paying attention to the zero-crossing set ZC in Fig. 6, it contains all the points where \(\hat {y}_{\sigma _{50}}(i)\) and \(\hat {y}_{\sigma _{100}}(i)\) intersect, as indicated in “Filter settings”. Particularly, there is a subset of them, labelled as Z C 2, whose x-coordinates are very close to the HS locations, which matches what was said earlier in that section. These zero-crossing points are marked with green squares in Fig. 6 and with dashed lines in Fig. 7. The next step is to build a process to automatically select them from the whole set of zero-crossing points.

  • (P2) Selection of relevant zero-crossing points (Z C 2 ) from the whole set.

    In a first stage, only zero-crossing points from negative to positive are considered, forming the Z C 1 subset. Zero-crossing points from positive to negative (marked with red crosses in Fig. 6) are discarded because they are far from HS occurrences, as can be observed from the comparison between Figs. 6 and 7.

    In a second stage, the Z C 1 subset requires further refinement to isolate the relevant zero-crossing points belonging to Z C 2. Graphically, that means being able to discard the zero-crossing points marked with black crosses (×) in the Z C 1 subset displayed in Fig. 6. The procedure to do it programmatically starts computing the subtraction signal s e (i) between the output of the scale-space filter p e (i) and the smoothed energy signal \(\hat {e}_{\sigma _{T_{max}/4}}(i)\). The result is illustrated in Fig. 8. Peaks (local maxima) are identified over the signal using the peak detection algorithm detailed in [24].

    Fig. 8
    figure 8

    The result of the subtraction signal s e between the output of the scale-space filter p e (i) and the smoothed signal \(\hat {e}_{\sigma _{T_{max}/4}}(i)\). It is represented by a solid red line. Maximum peaks \(PK_{s_{e}}\) are marked in the figure. Three peaks are above the predefined energy threshold

    As can be observed in Fig. 8, there are three local maxima in the signal slice s e (i) that represent the major differences in energy levels between the two input signals, these maximum peaks contain substantial amounts of energy and are very close to the Z C 2 points and therefore, very close to the HS occurrences. From the whole set of local maxima \(PK_{s_{e}}\), these selected peaks are identified when they are above a predefined energy threshold (set to 0.13). This threshold has been empirically determined from gait tests conducted on young and older adults at multiple walking paces.

    Following from these premises, the procedure to isolate the Z C 2 subset from the zero-crossing set Z C 1 involves the following steps:

    1. 1.

      Iterate over the Z C 1 subset and for each zero-crossing point z c k Z C 1 find the right closest maximum peak p i in \(PK_{s_{y}}\).

    2. 2.

      Once p i is determined in each iteration, its counterpart peak k i in \(PK_{s_{e}}\) is required. This peak is expected to be found in s e (i) within a search window in the vicinity of the p i timestamp. If k i exists and it is above the predefined threshold commented before, the z c k under evaluation is added to the Z C 2 subset. The window’s width is set to |p i z c k |.

  • (P3) Demarcation of HS and TO events in the antero-posterior acceleration signal using the Z C 2 subset.

    It is required to iterate over the Z C 2 subset in order to demarcate the HS events in the antero-posterior acceleration signal z(i). There is a corresponding HS event h s k in the immediate temporal vicinity of each zero-crossing point timestamp. This HS event (h s k ) matches with the highest peak in the z(i) signal enclosed in a search window. The width for the search window is the same that was used in the P2 process.

    Each HS event is marked with a gray dot in the slice of the antero-posterior signal z(i) displayed in Fig. 7. As indicated before, the timestamp of each zero-crossing point is represented by a dashed line in this figure.

    Once HS events are demarcated, TOs are identified as the right lower valleys in the proximity of each heel-strike h s k . In this case, half the width of the search window is used. Brown crosses are used to highlight the TO events in Fig. 7.

The flowchart in Fig. 9 uses symbolic notation to summarize the three processes that have been described in this section. The processes are framed with different color rectangles. Each of the steps taken to achieve gait event demarcation in these processes are first textually described and then mathematically formulated.

Fig. 9
figure 9

The process flowchart for gait event demarcation

Calculation of temporal gait parameters

The temporal parameters of the gait cycle defined in “The gait cycle” are calculated from HS and TO events to investigate whether the system is able to quantified differences in the gait patterns between the pre-frail elders and the young adults.

Particularly, step time, stride time, single and double support, and stance and swing phases are estimated (phases are computed as a percentage of the gait cycle). Moreover, the coefficients of variation (CV) of step and stride time, cadence (#steps/minute) and step asymmetry (difference between consecutive steps divided by stride time) are also obtained.

Subjects and protocol

Five elders (three males and two females, 85 ± 2.7 years) diagnosed as pre-frail and whose mobility has been evaluated through the Tinetti test [25] by a physician; and five healthy adults without mobility impairment (all males, 29 ± 2.8 years) were recruited for the experiment. Before gait trials began, participants gave their consent and they received an informal explanation of the protocol of the test.

The protocol consisted in walking at a comfortable speed along a straight line during 20 s, as described in “Instrumentation”. The first four seconds and the last four were discarded from each trial to avoid acceleration and deceleration stages. Therefore, 12 seconds were used for analysis.

Results and discussion

Table 1 shows the mean values of the temporal gait parameters and the Tinetti gait and balance average scores for the two groups. Some conclusions can be drawn from the cross-sectional analysis.

Table 1 Comparison of temporal gait parameters and Tinetti gait and balance average scores between the two groups

The first remarkable aspect is related to the mobility assessment performed by the clinician by means of the Tinetti test. Subjects from both groups registered the highest score in the gait evaluation (12), without evidences of abnormalities regarding the test criteria. It is in the balance aspect where the clinician slightly reduces the score of each older adult, the group is characterized with a value of 13.2 ± 1.38 out of 16.

The Tinetti test is a suitable performance-oriented mobility assessment tool for the early detection of fall risk [25]. Moreover, it is also useful to estimate the prevalence of frailty if it is complemented by other indicators from functional, nutritional, cognitive, and social domains [8]. However, it has a subjective nature and depends on the judgement of the clinician, which prevents that small differences in the gait patterns (not visible with a naked eye) may be measurable.

In view of the results of the QGA performed using the waist-mounted single accelerometer, there are differences in the gait patterns between the groups that were not captured by the test. The average cadence of the pre-frail group (100.75 ± 10.30 steps/minute) is slightly higher than that of the young adults (93.66 ± 5.77 steps/minute). This, combined with higher double support phases and a reduced single support results in shorter steps and slower walking speeds. The mean swing percentage is also lower (37.66 % ± 5.03) than in the young adult group, while the stance phase increases. Because of higher cadence, step and stride times have less duration. Furthermore, the coefficient of variation indicates greater variability in step and strides in the older adults, specially in the step time (8.54 % ± 3.94). Finally, the average asymmetry between consecutive steps in the elders is approximately the double (6.76 % ± 6.21) than in the young adult group (3.59 % ± 3.87).

Conclusion

In this study, gait events were estimated from trunk acceleration signals acquired by the built-in tri-axial accelerometer in a mobile phone. A novel algorithm to identify peaks that correspond to HS and TO events based on scale-space filtering using Gaussian kernels is presented, this procedure is expected to contribute in the design of wearable and mobile technologies for QGA based on a single accelerometer.

The protocol conducted shows that the system is capable of distinguishing differences in gait patterns better than an observational method as the Tinetti test.

As future enhancements, the identification of right or left gait events is expected to be determined from the direction of medio-lateral acceleration. Spatial parameters, such as step length or walking speed should be also incorporated to improve the quantitative analysis. Moreover, it is important to investigate the system’s applicability in areas such as ambulatory rehabilitation, in-home gait assessment and long-term gait monitoring.