1. Introduction
During running, the detection of two essential events is required to understand the basic step-by-step gait outcomes of running mechanics, including heel strike or initial contact (IC) and toe-off or terminal contact (TC) [
1]. Determination of these events allow the calculation of temporal parameters such as foot contact time, flight phase duration, and swing phase duration [
2]. IC is defined as the instance when one foot is initially touching or landing on the surface, while TC represents the termination of the pushing phase or when the foot finishes contact with the surface [
3]. These two temporal parameters are intrinsically related and inform other key performance outcomes related to running, such as running economy [
4], speed of running performance [
5] and running related injuries and risks [
6]. Hence, the potential application of in-field monitoring of these factors by wearable microtechnology in all running-based sports is substantial and methods to determine IC and TC are of paramount importance.
Gait research in many laboratories requires data collection tools that are difficult to use in field-based settings or in most team-sports where training is undertaken concurrently by large groups. For example, Wang et al. [
7] reviewed the current vison-based motion tracking systems and found that these approaches required an optimal range of object-to-camera distance, which is unlikely in field settings given the unpredictable movement patterns. This was further supported by Norris et al. [
8] who undertook a systematic review of current gait analysis methods, suggesting that gait analysis using appropriately equipped laboratories with high-speed cameras or force platforms resulted in limitations due to the lack of appropriate simulation of outdoor or in-field running. Hence, there is a need to develop methods with easily accessible and portable tools, allowing gait analysis to be undertaken in field-based settings of larger groups that facilitate ecologically valid scenarios [
9]. Accordingly, the application of inertial measurement units (IMU), which include gyroscopes and accelerometers, to the lower limbs may assist with enhancing the quality of gait assessment in field-based contexts. Such devices can capture the resistance in linear or angular motions [
10], have low manufacturing cost, high sampling frequencies, reduced size and weight, and are able to monitor kinematics throughout an extended period [
4]. These advantages can make IMU a desirable system to investigate running-based parameters. In support, a recent review [
11] examined the current applications and research of wearable inertial sensor across different sports, suggesting these types of sensors suited in-field analysis of running gait analysis.
Current approaches differ for the collection of IC and TC using IMU, especially based on the IMU placement and use of collected data [
12]. Mo and Chow [
13] conducted a review of current gait research, reporting that the major locations of placing IMU for gait analysis were the pelvis, shank, and foot. They concluded that particular sites for IMU placement required different data analysis methods to detect IC and TC, which could result in diverse measurement outcomes. Considering signal detection, Clark et al. [
14] investigated tibial acceleration around the knee joint, particularly in the mediolateral plane, by examining varus/valgus knee movement throughout running. Furthermore, Muro-De-La-Herran et al. [
15] studied gait movement using accelerometers and established that unit positioning such as shank, limb, and back was vital in delivering accurate analysis requiring different analysis algorithms. In terms of using gyroscopes, Bergamini et al. [
16] analysed the difference between elite and sub-elite runners using an IMU containing a tri-axial gyroscope located at the lumbar spine region. They discovered no consistent signal from the acceleration data and designed an algorithm based on the angular velocity data which acquired an average error of less than 0.025 s. Ankle-based gait analysis has also been studied, as Qiu et al. [
17] designed a smart system which detected the human body displacement using an inertial measurement unit. With a motion capture system as a reference, the results demonstrated that ankle-based IMU sensors with a tracker system had the potential to replace video-based gait study methods. This collection of literature suggests most studies conducted to date use either accelerometer or gyroscope units in isolation or focus on the different anatomical placements of the IMU. However, the accuracy of gyroscope and accelerometer-based algorithms with IMU placement at the ankle requires further exploration. Furthermore, despite the prospect of enhancing precision, there is an absence of research proposing a system to detect IC and TC using both gyroscope and accelerometer data to improve measurement precision.
Therefore, this study aimed to develop adaptive algorithms based on gyroscope and accelerometer data for the detection of IC and TC during running. The 95% of confidence interval was used to analyse the consistency of the system by examining whether the difference between the output of the two algorithms exceeded the highest tolerance value. Furthermore, to increase the estimation accuracy, we included a pre-processing algorithm that detected the period of running to remove unwanted data such as standing still or mounting the IMU.
2. Materials and Methods
2.1. The Inertial Measurement System
The inertial measurement unit (IMU) (Blue Thunder, I Measure U, New Zealand, weight: 12 g, size: 40 × 28 × 15 mm) was used in the data collection protocol. The units used a sampling rate of 500 Hz and measured 3-dimensional acceleration and 3-dimensional angular velocity. The IMU system had a detection range of ±16 g for the accelerometer and ±2000°/s for the gyroscope. The collected IMU data were analysed using customised MATLAB (version 2019a, The Mathworks Inc., Natick, MA, USA).
2.2. Participants
Two sets of data were used for the two respective parts of this study—referred to herein as the development dataset and the validation dataset. The development dataset was collected from 36 players from an Australian Football League team who were all healthy and did not suffer from any symptomatic musculoskeletal injuries. During the protocol, the participants undertook 30 m running efforts at an estimated 75%, 85%, and 95% of maximum speed, with two trials for each speed, as part of normal training. This 30 m running effort was immediately preceded by a run-in where each participant developed their speed to the target. Each effort was separated with a self-determined recovery period of passive standing. During running, all participants wore their own running shoes. The IMU device was attached to the ankle (immediately superior to the lateral malleolus) of each foot of the participant (represented in
Figure 1) with a fixed and standardised orientation. Overall, 432 sets of data right and left ankle unilateral IMU data, 36 sets with 3 running speeds and 2 trials each) consisting of 53,280 steps were collected which were used for algorithm building.
For the validation dataset collection, two healthy participants (without musculoskeletal injury) ran at three different speeds while wearing the IMU device attached immediately superior to the lateral malleolus on each limb as outlined above. Participants undertook a 10 m run through at 3 self-selected speeds (slow, medium, and fast), with each speed repeated for five trials and separated by a self-determined recovery period of passive standing. The data collection was carried out in an enclosed laboratory setting while being filmed at a close distance by a camera system at 30 FPS (iPad, Apple Inc., Sydney, Australia). During running, the participants were wearing their own comfortable shoes. In this study, only the data collected from gyroscope and the accelerometer was used. Overall, 60 trials (two participants, right and left unilateral ankle IMU data, three different speeds and five trials each) involving 180 steps were collected, and these data were used for consistency and accuracy validation.
2.3. Data Pre-Processing Development
Following IMU data collection, the raw data contained noise and data from untargeted (non-running) periods such as mounting the IMU, walking or standing still. These sections of the data are removed for the running stance phase detection. Hence, a pre-processing algorithm designed to detect the running period was introduced. This algorithm first calculated the square value of the acceleration in the three directions as shown in Equation (
1). The square value first rectified the acceleration signal into positive and then sufficiently amplified the difference between non-running period and running period. This algorithm contained a sliding window of 0.5 s and compared the average square value of the sum of accelerations in three directions to a threshold value within the window. If the value output exceeded the threshold for more than 3 s, it was marked as the beginning of running, and when the value dropped below the threshold, it was marked as the completion of running. The calculation of the sliding average value is shown in Equation (
2).
where
is the output value that is compared to the threshold.
f is the sample frequency of the IMU.
are the linear acceleration value in three directions.
S is the time frame of the sliding window.
2.4. Algorithm Design
Based on the data collected from the gyroscope and accelerometer, two different algorithms were created for IC and TC detection using the development dataset.
2.4.1. Accelerometer-Based Algorithm
In the accelerometer-based IC and TC detection, the algorithm was built using acceleration data from the
z-axis (vertical). Before plotting the information, the square value of acceleration was computed to obtain the positive magnitude and to amplify the data. The instant of IC was detected based on the peak of foot resultant acceleration (
Figure 2). The detection of the TC was conducted in the region of interest, which was defined within the 25% to 75% range of a full stride (IC to IC), and when the fluctuation of the
z-axis acceleration started to show an upward trend after the peak point (IC). The area of interest commenced when the magnitude of the acceleration started to show an upward trend which exceed 2 g and terminated when the signal finished a downward trend and dropped below 2 g.
Figure 2 demonstrates the TC point and the area of interest for the TC detection.
During running, as the speed increases, the ground contact time of the runner tends to decrease, hence the ground contact time is often less than 50% of the total stride time during high-speed running [
18]. Therefore, to find the exact point of TC, we designed a window to highlight the area of TC detection. This window has a length of N samples, which is half of the total number of samples in a specific stride, and the window is located between 25% and 75% of the stride. Equation (
3) shows the calculation of N. Following this detection, all the data within this region was normalized using Min-max normalization and scanned until the first point that exceeded the empirical threshold of 2 g which was conceivably due to the high inertial change due to the foot leaving the ground. That point was marked as the TC.
The pseudo-code of the acceleration algorithm on terminal contact points detection is shown in Algorithm 1.
Algorithm 1: Finding TC using Acc data. |
Output: 1: 2: 3: 4: 5: 6: 7: 8: 9: , ,…… 10: 11: 12: 13: 14: 15: 16: 17: for do 18: if then 19: 20: 21: 22: else 23: if then 24: for do 25: 26: if then 27: 28: end if 29: end for 30: 31: 32: 33: end if 34: end if 35: end for |
2.4.2. Gyroscope-Based Algorithm
Separate from the accelerometer-based detection in the gyroscope-based algorithm, detection of mid-swing (MS) is integral to determine presence and order of IC and TC. These create unique signal characteristics whereby angular velocity data show distinctly positive or negative peaks consisting of medium to high frequencies [
19]. The instance of IC and TC are defined at the first and the second local maximum, where MS is the local minimum that is located after TC, the locations of IC, TC and MS are shown in
Figure 3. While the scale of such peaks are affected by several factors such as the participant’s running intensity or speed, they tend to show similar trends among different runs and hence can be detected in the specific area of interest or frequency domains. Based on previous work on gait analysis by Lee and Park [
20], who proposed a detection algorithm by first detecting the location of mid-swing (MS), we replicated this technique by subsequently searching backwards for TC and forwards for IC.
The proposed algorithm first detected TC to minimise the computational requirements for backward searching. To enhance and detect the mid-swing peak, a 2nd-order Butterworth low-pass filter was designed with a cut-off frequency of 10 Hz. In the detection of the possible location of TC, the proposed system initially detected the first local maximum point and subsequently searched for the presence of a local minimum point after TC which was the MS. Finally, the following local maximum was then recognised as the location of IC. These possible points of gait event location were then evaluated under the set of rules shown in
Table 1.
2.5. System Validation
This section outlines the methods used to examine the consistency and accuracy of the two algorithms and was carried out upon the validation dataset. A previous systematic review [
21] reported use of 95% confidence intervals to compare the results of gait parameters in studies on patients with inflammatory arthritis. In this study, to test the consistency of the output of gyroscope and accelerometer algorithms, the 95% confidence interval (CI) and 2-sample
t-test were used to compare and verify the range of the difference between the two algorithms. In the case of a
in a particular measure
X, the sample size is defined as
N, where
m is defined as the hypothetical average value or mean, and
is the standard deviation. The pre-defined confidence level is represented as
and in this study a 95% confidence level was selected. Hence, the CI of the given sample or the range of values can be defined by
, and as
, then
. To test the consistency between the two algorithms, a right-side test was conducted to the difference between the calculated contact time of the two algorithms
), where
is the null hypothesis and
is the acceptable tolerance range and
is the mean value of the algorithm result. The average of the absolute difference between the two algorithms
is calculated by Equation (
4). The z-score value is then calculated using Equation (
5) and the output
Z value is then compared to the Critical Value
which is 1.654.
where
is the average value of the absolute difference between the outputs from the two algorithms.
and
are the calculated contact time output from the two algorithms.
where
z is the z-score value of the current
,
is the maximum tolerance of the
value, and
is the standard deviation of the
dataset.
The output z-score value is then compared to assess whether the system’s consistency is within the confidence level of 95% where the maximum inconsistency of the two algorithms is 0.03 s due to the frame rate per second of the video ground truth.
The accuracy of the system was validated using the video footage of the gait parameters. Specifically, this was undertaken by manually recording the actual instance of IC and TC of each step and calculating the CT from the validation dataset, with ab-solute error calculated and recorded. The outputted IC, TC, and CT from the two system were then compared using the 2-sample t-test, the percentage of the unrejected hypothesis tests was recorded as the systems’ accuracy. Results are presented as absolute mean ± standard deviation (). Significance was set at = 0.05. Using the Shapiro–Wilk test, visual analysis of the histograms and box plots, the normal distribution of the data were confirmed.
4. Discussion
This study aimed to develop and validate adaptive algorithms based on gyroscope and accelerometer data for the detection of IC and TC during running from IMU’s mounted on the ankle. The proposed algorithm successfully detected the running period and removed the noise with the pre-processing system. Furthermore, results showed high accuracy and consistency during in-field running with slow to fast running speeds. Therefore, the algorithm we proposed can successfully identify the key gait events of IC and TC in many running-related applications during in-field settings. Such outcomes can overcome the limitations related to other laboratory-based gait analysis methods (motion tracking system or camera-based systems), which are difficult to use in field-based settings. Moreover, such a system is desirable as it provides the potential of analysis and feedback of running gait parameters for athletes and coaches during field-based training or competition. In support, Muro et al. [
15] conducted a review of current gait analysis methods, reporting that the high level of performance of IMU-based algorithms in terms of accuracy, accessibility, and transportability made them more suitable than other gait analysis approaches during athletic applications. With these advantages, the application of accelerometer and gyroscope-based algorithms for IC and TC detection may present an avenue for further research for healthy athletes [
22], athletes with transtibial amputation [
26] or athlete recovery [
27].
The current study showed that the gyroscope-based algorithm can maintain the same waveform shape under different or increasing running speeds as only the magnitude of the angular rate and frequency of the foot are affected. For example, the current study showed that the absolute mean error presented less variation when running speed increased when compared to the acceleration-based algorithm. Furthermore, our results demonstrated that the gyroscope algorithm had similar mean absolute error (MAE) for IC and TC (11.3 ms and 16.7 ms, respectively). Similar observations have been previously reported [
23] whereby the running gait of healthy and spinal cord injured individuals were examined. Their results revealed a MAE of 12 ms for IC and 15 ms for TC in normal groups, whereas the spinal cord injured groups revealed MAE of 20 ms in IC detection and 22 ms in TC detection. Despite these advantages, gyroscope-based algorithms usually require wavelet transformation and different filter design according to different speeds, running intensity and IMU placement. For example, Gouwanda et al. [
22] designed a 2nd order digital low pass filter with cut-off frequency of 15 Hz to highlight the waveform peaks for IC and TC detection. McGrath et al. [
24] used a low pass filter with zero-phase fifth order Butterworth filter with a 50.2 Hz corner frequency.Conversely, the cut-off frequency was set to 10 Hz to obtain the best waveform information in the current study. It is noteworthy that the performance of these algorithms can be affected with expanded sample size or different running styles, and future work in this area is required to refine algorithm accuracy.
For the accelerometer-based algorithm, the detection of TC is critical and usually generates more errors compared to the detection of IC (Jasiewicz et al., 2016). Conversely, IC detection is often highly accurate and adaptive to different running speed due to the high velocity change when the foot strikes the running surface. The current results demonstrated this trend by yielding higher errors in TC than IC, as the MAE of TC ranged from 23.8 ms to 31.4 ms, while IC was 4.5 ms to 6.7 ms. In support, Jasiewicz et al. [
23] studied accelerometer-based gait study algorithms with IMU placement on the foot and suggested that the MAE of TC (27.6 ms) was substantially higher than the MAE of IC detection (4.2 ms). Moreover, the accuracy of the TC detection in acceleration-based analysis has not been widely investigated. Accordingly, future research should investigate the accuracy of TC detection and the factors which lead to the reduction in accuracy.
The combination of using both accelerometer and gyroscope-based algorithms appears to be a sound approach to mitigate the limitations of these two respective gait analysis methods. In this study, we investigated the consistency of the two algorithms with 95% confidence interval and discovered that the proposed systems demonstrated good overall consistency, despite reduced consistency (81.67%) for TC detection at higher running speeds. A similar tendency was presented by Piriyakulkit et al. [
28] where they proposed a gait event recognition algorithm to assist patients with lumbar kyphosis using IMU. The proposed algorithm recorded MAE’s of 31.6 ms, 32.4 ms, and 38.6 ms in TC detection under increasing treadmill speeds. In our study, the two algorithms showed relatively low average consistency for fore-foot strikes, whereas the systems’ consistency remained high under rear-foot strikes regardless of the speed. Hence, we suspect that this change in the detection accuracy is possibly due to the foot strike style (fore-foot or rear-foot) and requires further investigation and refinement. Accordingly, this study shows the feasibility of using the combination of both algorithms, where the advantage of each approach could be used to further improve the detection accuracy of IC and TC. An example of this approach could be the use of a weighted algorithm in which the accelerometer-based system has a larger influence in IC calculation and the gyroscope-based system being more impactful in TC detection. Accordingly, future studies should investigate the effect of different striking styles have on the current gait algorithms alongside the accuracy of TC detection based on the combination of accelerometer and gyroscope-based systems with increased experimental sample sizes and variety of foot-striking characteristics, running speeds or IMU placement locations.