1. Introduction
Motion capture (MoCap) is useful to objectively quantify human movement [
1] and is often used clinically to analyze walking gait in individuals with cerebral palsy (CP) [
2,
3,
4,
5]. Complete gait analysis systems typically combine optical MoCap with force-sensing platforms (aka force plates) to collect kinematic and kinetic data, respectively. Typical gait has been described as a series of seven contiguous phases: Loading Response (LR), Mid-Stance (MSt), Terminal Stance (TSt), Pre-Swing (PSw), Initial Swing (ISw), Mid-Swing (MSw), and Terminal Swing (TSw) [
2,
3,
6]. Detecting these phases during walking, known as gait phase detection (GPD), is a critical component of gait analysis. GPD can be used in conjunction with inverse dynamics to derive the forces and moments generated on the limbs during walking. While MoCap-based GPD (GPD-MoCap) is considered the gold standard [
1,
7,
8,
9,
10,
11], most GPD-MoCap systems are expensive and require extensive laboratory space, limiting their clinical utility [
12].
Recent technological advancements in micro-electro-mechanical systems (MEMS) have given rise to a number of wearable, non-laboratory-based locomotion monitoring systems. Some MEMS devices have been used to evaluate the efficacy of mobility interventions for activities of daily living in able-bodied adults [
7,
13]. Other applications include human–machine interfaces [
14,
15], closed-loop control of rehabilitation robotics [
7,
16,
17,
18], and triggering muscle stimulation in functional electrical stimulation (FES) walking systems [
19,
20,
21,
22,
23]. Typical requirements for these applications include cosmesis, portability, robustness, low cost and low power consumption [
24]. Inertial sensors (aka inertial measurement units (IMU)), including accelerometers (which measure linear acceleration) and gyroscopes (which measure angular velocity), have been used extensively in the last decade for gait event detection [
20,
25,
26,
27]. The compact size and low power consumption of IMUs make them ideal for wearable motion-sensing applications and they have even been used as implanted devices [
21]. Because they directly measure rotational motion—and because rotation about a joint is the locus of human locomotion [
26]—gyroscopes are ideal for movement monitoring. Additionally, unlike accelerometers, gyroscopes are not affected by gravity and thus are less sensitive to placement—they provide nearly identical signals when mounted anywhere along the plane of interest [
23]. Due to these advantages, and despite their higher power requirements [
23], gyroscopes are typically preferred over accelerometers for GPD algorithms [
25]. Gyroscopes have been evaluated for use in ambulatory GPD [
12,
20], calculation of spatio-temporal parameters of gait [
26], and FES system control [
20,
21,
22].
Most control strategies utilizing either rehabilitation robotics [
7,
25] or FES walking systems [
19,
20,
22] are gait phase dependent and thus require accurate real-time GPD [
7]. GPD algorithms must execute quickly to minimize gait event detection latency and, ideally, operate on minimal sensor data. Few sensor-based GPD systems are able to detect all seven gait phases in real-time (full-resolution) [
19,
20,
21,
22,
28] and some have other deficiencies [
8,
10]. For example, Senanayake and colleagues’ GPD system—although full-resolution—is comprised of a number of sensors (four force sensitive resistors (FSRs) and two inertial measurement units, each consisting of a three-axis accelerometer, magnetometer, and gyroscope) and the researchers did not report GPD time errors relative to GPD-MoCap [
8]. The high number of sensors in their system complicates both control algorithms and system setup. Accelerometer-based control algorithms suffer from drift resulting from signal integration, limiting their utility in control systems [
12,
29] and FSRs have their own shortcomings: they are sensitive to placement [
21], degrade in performance over time [
23], may suffer mechanical failure [
21,
26,
30], require specific instrumented footwear [
21], and may be affected by irregular ground contact patterns in atypical gait [
23,
26]. These limitations with IMUs and FSRs prompted us to develop a simple two-gyroscope GPD system that detects all seven phases of gait [
9].
Due to the high incidence of and cost associated with CP, improved rehabilitation strategies for this patient population are critical [
10]. Although gait phases are considered an appropriate trigger to control stimulation delivery in FES walking systems [
19,
20,
21], there is a paucity of GPD systems for this population [
10,
25]. In a novel offline approach, Lauer and colleagues [
10] successfully detected all seven phases of gait in individuals with CP using previously collected electromyographic (EMG) signals from bilateral vastus lateralis. GPD time errors were as high as 113 ms relative to GPD-MoCap. The use of EMG signals for GPD is not without complications; data are sensitive to electrode placement and motion artifacts [
7]. Additionally, if EMG-based GPD is used to control FES, complex signal processing is necessary to differentiate physiological EMG signals from muscle activation due to applied FES [
31,
32]. Finally, Lauer et al. did not evaluate the real-time performance of their GPD algorithm, limiting its potential for clinical use [
10]. Although precise knowledge of detection time errors is crucial for reliable real-time GPD systems (especially in FES applications), few studies have accurately investigated GPD time errors relative to GPD-MoCap (which is considered the gold standard). Some studies used GPD algorithms based on force sensing resistors (FSR) to evaluate system performance [
1,
7,
11,
23,
26,
30]. FSR-based algorithms are referred to as GPD-FSR, and are generally considered to be inferior to GPD-MoCap [
21].
The aim of this paper is to adapt an existing real-time GPD system, designed to control multi-channel FES delivery for healthy adults during walking [
9], for use with children with CP [
33]. Because the GPD algorithm developed for use with healthy adults can also be used with typically developing (TD) children, this algorithm is referred to as GPD-TD. The GPD-TD system features: (1) a dual-gyroscope sensor setup, (2) the capability to detect all seven phases of gait, and (3) low detection time error. Gait phase onset detection times were previously evaluated on healthy adults [
9]. This paper evaluates the performance of GPD-TD on typically developing children by comparing GPD data to GPD-FSR and GPD-MoCap. GPD-TD was modified to accurately detect gait phases for children with CP (GPD-CP) and re-evaluated relative to GPD-MoCap. The ultimate goal of this work is to use GPD-CP as a finite-state controller for a multi-channel FES delivery to promote more efficient gait patterns in children with CP (
Figure 1). The use of GPD-CP in this manner is discussed in Behboodi et al. [
33] and Zahradka et al. [
34], a companion to the current paper.
4. Discussion
The GPD algorithms in this paper successfully detected all seven gait phases in seven typically developing children and five children with CP. Detection reliability relative to GPD-MoCap was 100% for both GPD-TD and (with automatic thresholding) GPD-CP over 980 and 700 gait phases, respectively. Both algorithms use only two gyroscopes, making the GPD system compact and lightweight with low power consumption. These characteristics make our system appropriate for controlling a multiple channel FES system for use in gait training [
33]. The use of raw gyroscope data eliminates the error propagation of typical IMU-based systems cause by double-integration. This simplified sensor system that can be used in sophisticated control algorithms used with rehabilitation robots [
18] and neuroprosthesis [
10,
20,
25,
38]. Auto-thresholding eliminates the need to manually set threshold levels. Auto-thresholding rules were based on results from only five participants with GMFCS Levels II and III. Further testing on different populations with larger sample sizes is necessary to determine universally valid auto-thresholding rules.
Among major studies, only Senanayake et al. [
8] and Lauer et al. [
10] detected all seven phases of gait, as defined by Perry [
6] (Senanayake et al. did not report onset errors and Lauer et al. did not evaluate their GPD system in real-time). While Smith et al. [
38] and Pappas et al. [
20] reported onset error relative to GPD-MoCap and evaluated their GPD systems in real-time, their systems were limited to five (Smith) and four (Pappas) phases (
Table 5). Senanayake et al. required the use of 12 sensors and 22 signals to process, which is not ideal for a streamlined setup [
8]. Similarly, Pappas et al. required three FSRs and one gyroscope for each limb [
20] and Smith et al. required three FSRs for each limb [
38]. Because both systems used FSRs, they are vulnerable to mechanical failure and may not be robust enough for daily living applications. Most importantly, these systems may not be suitable for individuals with atypical foot contact. The EMG-based system described by Lauer et al. [
10] used a minimum sensor set up consisting of only one EMG sensor on each side. However, EMG is prone to motion artifacts using EMG in conjunction with FES can result in high-intensity electrical artifacts.
GPD-TD onset errors relative to GPD-FSR were favorable compared other studies [
11,
21,
24,
30]. Onset errors for HS and TO (12.3 (12) ms and 18.5 (17) ms (
Figure 3), respectively, were among the lowest reported (
Table 6). GPD-TD mean onset error for HO was 9.5 (13) ms (other references did not report HO, TSt onset error). Only Catalfamo et al. [
24] reported standard deviations lower than our GPD system, indicating consistency in error (which makes it easier to compensate for timing errors in real-time applications). Gait cycle duration RMSE was low between the participants for both GPD-TD and GPD-CP (13 ms to 38 ms (
Table 4)). Even though the onset detection delays in some phases were as high as −100 ms, (TSw for GPD-TD), offsets in other areas decreased the total gait cycle duration error to 22 ms.
TSt is an important gait phase for most FES walking systems as it not only provides the appropriate posture for PSw [
39,
40], but its detection can help to predict PSw in a more sophisticated system with a delay compensation algorithm [
34]. During TSt, ankle dorsiflexion reaches peak torque, and ankle plantar-flexors are at their highest level of activity as they contract eccentrically for push-off and limb advancement during swing [
6]. This could enhance the performance of an assistive device by increasing propulsion needed in PSw to advance the center of mass forward.
Although phase onset detection error is important for evaluation of any real-time GPD system, only Hanlon et al. [
41], Pappas et al. [
20], Smith et al. [
38] and Skelly et al. [
19] evaluated their systems using GPD-MoCap. Note that our GPD-FSR comparison showed lower onset error for LR onset (12.3) than our GPD-MoCap comparison (−40 ms). The reported error depends on the system used as the standard, against which the system-under-test is compared. Since GPD-MoCap is more accurate than GPD-FSR, it is more appropriate to validate one’s system relative to GPD-MoCap [
8,
10,
11]. Our results show that one can obtain seemingly better results with a worse evaluation method (GPD-FSR, in this case).
Lower extremity finite state control orthoses [
18], prostheses [
42], and sophisticated FES walking systems [
10,
20,
25,
33,
38] can benefit from full-resolution GPD. However, most GPD systems (such as those that are FSR-based) cannot detect swing phases. Many GPD systems can only detect LR and PSw [
7,
22,
26,
30,
43,
44], making them inappropriate for applications requiring higher-resolution GPD.
Some studies evaluate detection of foot-flat (FF) [
1,
19,
20,
21,
28,
29]. FF, depending on the detection algorithm, is reasonably close to MSt onset, which can be detected using contralateral TO/EC [
6]. Consequently, unless there is a need for unilateral detection, FF detection is unnecessary. In contrast, TSt onset (HO) detection may be relatively more important because, with the combination of this event with both LR onset (HS) and ISw onset (TO/EC) and use of a contralateral algorithm, one can detect all of the stance phases. It should be noted that comparison with GPD-FSR revealed that all the stance phases detected by the GPD system have relatively low onset detection time errors relative to other studies that evaluated their systems vs. GPD-FSR; absolute values of LR, TSt and ISw (HS, HO and TO/EC respectively) onset detection time errors were all below 20 ms.
After PSw, the rest of limb advancement and forward progression occurs during the swing phases [
6] and three major muscle groups contribute to this end: Gluteus maximus (Glut), hamstrings (Ham), and quadriceps (Quad) activate during either MSw or TSw [
45]. To slow down the rate of knee extension, Ham starts firing at MSw onset while Glut and Quad activate at the end of TSw onset to ensure full knee extension and to prepare for shock absorption at LR onset (HS) [
6]. Consequently, to control the activation of these three muscles, in applications such as FES, detection of all swing phases is critical. As mentioned above, however, there are limited GPD systems capable of detecting these individual swing phases. Besides Lauer [
10] and Senanayake [
8], to the best of our knowledge, there are only two other well-cited detection systems capable of detecting any swing phases, and ISw was the only swing phase detected in both. Smith et al. [
38] used an FSR insole in combination with a fuzzy classifier to detect ISw. Skelly [
19], in addition to TO/EC (i.e., ISw onset), detected maximum knee flexion, which is close to the end of ISw based on Perry’s definitions. Our GPD system detected all the swing phases in real time using only one gyroscope sensor on each shank.
There were several limitations in the present study. Gait phase onset detection delay—for ISw, in particular—is sensitive to each participant’s ability to walk and advance their lower extremities. Participants who are less skilled at ambulation (i.e., higher level on the Gross Motor Function Classification System) showed higher onset detection root-mean-square errors (RMSE) in ISw, MSt (contralateral ISw (
Table 2)) and MSw. The RMSE of phase detection onset for each participant with CP and their GMFCS level can be found in
Appendix A. Although modeling ISw onset from the medio-lateral shank angular velocity (i.e., last positive peak of
(
Figure 2a)) is a well-established kinematic rule based on gait analysis studies such as Aminian et al. [
26], Jasiewcz et al. [
30], Monaghan et al. [
22], Catalfamo et al. [
24] and Lee et al. [
11], its reliability may be suspect when used in populations with higher GMFCS levels. Thus, finding a robust ISw detection rule using
for children with higher GMFCS levels may require further investigation.
TSw and MSw detection need additional investigation because they showed inconsistency between groups. TSw had the highest onset detection delay in the TD group (−100 ms), whereas it was among the lowest (−34 ms) in the CP group. In contrast, MSw had the lowest onset detection error (−18 ms) in the TD group, but its error was the highest in CP group (97 ms) (
Figure 4). Like most GPD studies, IC was not included as a gait phase. In Perry’s definition of gait, LR and IC are two separate phases [
6]. Because IC is less than 10% of the gait cycle and its muscle activation pattern is the same as in LR, Perry also merged these two phases when demonstrating muscle activation during gait [
6]. This merged approach is pervasive in GPD for FES applications [
10,
23,
38]. As can be seen in the
pattern (
Figure 2a), there are two peaks after negative to positive zero crossing (i.e., LR onset in the GPD system) that are potentially associated with the end of IC that might be used to isolate IC from LR. Further processing is needed to verify this assumption.
Determining sources of GPD onset errors can prove challenging. Once identified, compensating for them can be just as difficult. One major source of delay was the Windows Task Scheduler, which sometimes delayed the communication between the GPD computer and the MoCap computer. The GPD system’s raw signal was slightly delayed in all of the data sets (66 ± 1.6 ms) relative to GPD-MoCap. This was considered a major contributing factor in onset detection delay of the GPD system and should be addressed in future development.
There are some small but impactful improvements that can increase determinism and decrease onset detection time errors of the system. First and foremost, the system should be implemented in a real-time stand-alone platform, such as the National Instruments Compact-Rio, which is compatible with our LabVIEW based GPD algorithm. Substituting commercial IMUs with a customized gyroscope sensor may decrease data transmission latency associated with additional unused sensors onboard the IMU. Wireless signal transmission protocols used by the Opal IMUs produced additional signal delays and are prone to interference—use of a wired gyroscope may reduce latency and interference.
Exhaustive timing data was not collected, but average control loop iteration time—including gyroscope data acquisition, GPD computation, auto-thresholding and commanding the stimulators—was in the millisecond range. This is low enough to contribute virtually no timing error, given that Wi-Fi latency and latency due process pre-emption by the Windows Task Scheduler are typically much higher (later testing revealed intermittent spikes as high as 200 ms in iteration time) and that observed gait phases were no shorter than 50 ms. In addition, our results indicate that our system is reliable relative to MoCap. Nevertheless, further testing is necessary to determine if the system can be reliably used long-term with wireless sensors in a non-real-time operating system. If not, wired gyroscopes can be used to eliminate Wi-Fi latency and the software can be re-deployed onto a real-time operating system such as Real-Time Linux or into an embedded system such as the NI CompactRIO platform from National Instruments.
Other limitations of this study were the low number of participants (seven TD and five with CP), and the use of handrails during treadmill walking. Push-off force at EC was not computed due to technical difficulties with handrail force data; future studies will aim to correlate push-off force with therapeutic outcomes. Overhead harnesses were used for safety but were not observed to have significantly affected gait. While sufficient for our study, auto-thresholding may be improved by using an adaptive method similar to the Self-Tuning Threshold Method used in Tang [
46], which would increase the sensitivity of the algorithm to rapidly changing gait. A larger sample of children with CP may have resulted in more robust automatic detection parameters that would apply to a greater population of children. A larger sample of TD participants may have revealed variability that would have necessitated the use of auto-thresholding for this population as well. Further research is necessary to develop automatic thresholding algorithms for general use in all populations.