3.1. Gait Event Estimation
Human gaits are regular and periodic. A complete gait cycle is defined as a period from the heel strike (HS) to the next HS of the same leg, as shown in
Figure 3 [
13]. A gait cycle normally consists of about 60% stance phase and 40% swing phase, with the following three important gait events: mid-swing (MS), HS, and toe-off (TO). The gait detection system measures the gait data and estimates these gait events in real time, in order to decide the intervention timing.
We applied IMU to measure the angular velocity of the shank on the sagittal plane [
30,
31], i.e., the Y-axis in
Figure 4a. The typical angular velocity responses during a complete gait phase is illustrated in
Figure 4b, where the MS usually occurs with the maximum angular velocity during the gait cycle. Conversely, the HS usually happens when the angular velocity has the first negative trough after the MS, while the TO is usually associated with the negative trough before the next MS. Note that the placement of IMU sensors might affect the magnitudes of the signals because of vector projection. However, the characteristics of gait events remains the same. Therefore, we developed the following algorithms to estimate the three gait events.
The MS usually accompanies the maximum angular velocity in the gait cycle. As shown in
Figure 4b, we set a threshold
°/s and mark the point as the MS if its angular velocity
ω is locally maximum and greater than this threshold, as follows:
- 2.
The HS event
The HS usually happens with the first negative trough after the MS, as shown in
Figure 4b. Therefore, we set two thresholds,
and
, to identify the HS event. The gait phase is estimated as HS if the following three conditions are satisfied:
- (1)
The angular velocity ω reaches a local minimum.
- (2)
The angular velocity ω is less than , i.e., .
- (3)
The time interval between MS and HS, labelled as , is greater than , i.e., .
Referring to
Figure 4b, we set
°/s and
with an initial value of 0.042 s, which is the sampling time of the system; that is, the HS should be at least one sample after the MS. Note that
is adjustable because the patient’s paretic leg might have abnormal trembles and vibration during walking. The HS event can be easily identified in healthy subjects, as shown in
Figure 4b. However, a stroke patient might have an uneven gait, as shown in
Figure 5a, which can cause difficulties in identifying the HS event. For example, the first HS was correctly labelled as HS1, but the second HS was wrongly labelled as HS2 because a positive peak occurred afterward (i.e., the actual HS should be HS2’). Similarly, the third HS was wrongly labelled at HS3, while the correct one should be HS3’. To correct these potential errors, the threshold
was adjusted as follows:
where n represents the number of positive peaks after the labelled HS, while
T is the sampling time (0.042 s). For instance, one positive peak (n=1) was evident between HS2 and the next TO, so that
should be modified to
s. Similarly, one positive peak (n = 1) occurred between HS3 and the next TO, so that
should be adjusted to
sec. The online adjustment of
is shown
Figure 5b. Using the adjustment algorithm, the HS events afterward were all correctly identified. Note that
was reduced by one sample if the HS was not successfully identified.
- 3.
The TO event
The TO event happens after the HS and normally with the minimum angular velocity within one gait cycle. We defined two thresholds, and , to estimate the TO events. The gait event is labelled as a TO if the following two conditions are satisfied:
- (1)
The angular velocity is less than , i.e.,.
- (2)
The time interval between HS and TO, labelled as , is greater than , i.e., .
Referring to
Figure 4b, we set
°/s and let
adjustable to improve the estimation accuracy. Because TO usually occurs with the last negative trough before the next MS, we adjust
as follows:
where
represents the time interval between the labelled TO and the last negative trough before the next MS. The initial value of
was set to
, i.e., the quickest TO should be at least two samples after the HS.
Figure 6a shows the identification of the TO events. First, TO1 was correctly identified, but TO2 was labelled incorrectly in real time because a smaller trough (TO2’) appeared before MS3. The identification of MS3 made us realize that the correct TO should be TO2’. Because
between HS2 and TO2 was measured as 0.126 s (three samples), while
between TO2 and TO2’ was measured as 0.504 s (12 samples), we adjusted
to
. The online adjustment of
is shown in
Figure 6b. Using the adjustment algorithm, the TO events afterward were all correctly identified.
The system also calculated the average stride time of the previous three gait cycles and set it as an upper limit for .
3.2. Implementation and Tests
The gait detection system applies these algorithms to detect the three gait events (MS, HS, and TO) sequentially, as shown in
Figure 7.
We invited two stroke patients to participate in experiments. Their information is shown in
Table 2. Each patient walked about 600 steps in 12 min. The testing results are shown in
Figure 8. First, the gait of the healthy legs, as shown in
Figure 8a,c, were regular and easy to identify. By contrast, the gait of the paretic legs contained certain noises and vibration, as shown in
Figure 8b,d. Second, using our detection algorithms, the detection system could correctly identify both subjects’ gait events during walking. Third, the automatic adjustments of
are shown in
Figure 9, where the parameters on the paretic side were adjusted more frequently than on the healthy side because the paretic legs tended to have abnormal tremble and vibration during walking.
We checked the effectiveness of the gait detection system by comparing its results with a VZ4000 motion capture system [
18]. The successful rate of the gait detection system is defined as follows:
where
is the total steps obtained by the VZ4000 motion capture system, while
is the number of detected HS by the proposed detection system in real time. We emphasized the detection of the HS because the automatic trainer begins the intervention upon detecting HS, as described in [
16]. The walking patterns and gait parameters varied significantly in individuals. The proposed algorithms can automatically adjust the parameters, as shown in
Figure 9. We set the initial values of these parameters based on the experimental data (see
Figure 4b), and applied the algorithms to make real-time adjustment of the parameters for individual users. Based on this automatic adjustment, the successful rates are shown in
Table 3, where the gait detection system achieved a successful rate of more than 95%. That is, it can correctly identify the HS events for triggering the motor system to repeat the therapists’ intervention, as introduced in
Section 4.