1. Introduction
From a medical and industrial perspective, wearable devices have evolved and continue to develop in terms of providing assistance to humans [
1]. Gait analysis through wearable devices is an extensive area in the field of biomechanics that provides knowledge in terms of identifying pathologies, evaluating athletes’ performance, design of sports products and rehabilitation engineering [
2]. Generally, the wearable devices used for gait analysis are designed by equipping various sensors on it.
Thus far, different kinds of sensor types, including force sensitive resistors (FSRs) [
3,
4,
5], air pressure sensors [
6], inertial sensors [
7,
8,
9,
10,
11,
12,
13,
14], inclinometers [
15], foot switches [
16], and electromyography (EMG) sensors [
17], are readily available in the industry and can be applied to gait analysis. Yan et al. [
18] estimated the gait events through a sensory apparatus, which combine three subsystems such as a primary phase estimator, a desired gait event detector and a phase error compensator. This method is sensitive to the tuning of the adaptive oscillators parameters. However, different parameters may change the results. In the literature, several works [
11,
12] have detected the gait phase using the inertial sensors that could measure the body segment orientations and joint angles. Bejarano et al. [
13] proposed an adaptive algorithm based on the inertial and magnetic sensors to detect the gait events. However, the inertial sensor is sensitive to temperature, shock and magnetic disturbances, which would result in the misdetections of gait phases. In order to overcome these limitations, Muller et al. [
14] proposed a novel online gait phase detection algorithm, which can be used indoor and in the presence of magnetic disturbances. However, the delays of the heel off and initial contact are considerably high. Nevertheless, an alternative solution to inertial sensors is FSRs [
16]. As described by Catalfamo et al. [
19], force platforms, such as FSRs, represent the gold standard method for gait analysis. Yu et al. [
20] used proportion an adaptive method, which calculates the sums and proportions of ground contact forces (GCFs). However, one parameter is affected by the attachment of the shoe to the foot, which would affect the reliability of the whole system. Additionally, force platforms measure the GCFs to detect gait phases, and each gait phase has a unique GCF pattern [
7].
As reported by Smith et al. [
21], 80% of errors in gait phase detection using FSRs was due to the setting of threshold value. In order to set appropriate thresholds for gait phase detection, a number of researchers [
4,
5,
19] had presented their methods. Mariani et al. [
4] defined 5% body weight as a threshold. However, different subjects had different body weights such that different thresholds should be set for different subjects. In addition, no matter how slowly or fast the subject walked, only one threshold was set for the same subject in all experiments. As a result, this method of using body weight percentage as a threshold was not adaptable to different subjects and different walking speeds (i.e., slow and fast). Lopez–Meyer et al. [
5] and Catalfamo et al. [
19] used the maximum and minimum GCFs of gait cycles to compute the threshold. However, the use of the maximum and minimum GCFs for the threshold computation could not detect gait phases in real time because the maximum and minimum GCFs were obtained in data post-processing.
The main purpose of this study is to develop a gait phase detection method, which can detect gait phases in real time during different walking trials. Therefore, we propose a self-tuning triple-threshold algorithm (STTTA), which obtains the maximum and minimum GCFs of the present gait cycle to calculate adjustable thresholds. In addition, the acquirement of the maximum and minimum GCFs, and the calculations of adjustable thresholds are completed in the walking process. This paper also proposes a gait phase detection algorithm (GPDA), which provides the rules that determine calculations for STTTA. In order to evaluate the reliability of STTTA, three previous methods in the literature are introduced to obtain comparative results.
We hypothesize that the proposed STTTA can gain high and stable reliabilities for different subjects walking at different speeds. To better test the adaptability, the same initial threshold values are set for all subjects in all experiments.
2. Methods
2.1. Subjects
This study included fourteen males and ten females (age = 24.5 ± 2.0 years, weight = 67.3 ± 8.8 kg; mean ± SD) with no history of foot diseases. All of them volunteered to participate in our experiments. The participants walked on the treadmill for 30 s duration at designated constant speeds of 2 km/h, 3 km/h, 4 km/h, 5 km/h and 6 km/h, respectively.
2.2. Instrumentation and Data Processing
As shown in
Figure 1, the sensor units comprised two FSRs (LOSON LSH-10, LOSON Instrumetation, Nankin, China), which were located in the sole of the ball and the sole of the heel. The FSRs collected GCF data at a frequency of 2000 Hz with a high resolution of 16 bits AD converter using an ARM11 computer (S3C6410). The measuring range of each FSR was 0–200 kg. The accuracy (including linearity and repeatability) of each FSR was ±0.5% full scale (FS). Standard load cells (5 kg, 10 kg, 20 kg, 25 kg, 50 kg, 100 kg and 200 kg) were used to calibrate the FSRs. As the FSRs output a weak micro-voltage signal, an amplification circuit was equipped. Because of this circuit, the output signal of each FSR was amplified to 0–5 V, which correlated with the measured mass of 0–200 kg.
After data acquisition, the GCF data from FSRs were filtered by second order Butterworth low pass filter with a cut-off frequency of 10 Hz. The results of the gait phase detection were processed in Matlab (version2012, MathWorks, MA, USA) using the proposed method.
2.3. Previous Methods
In previous, the GCFs measured by an FSR can be divided into on-ground and off-ground statuses through setting a threshold
T:
where
F is the GCF from the ball or heel, and Tis the threshold.
G is the result that “on-ground” status means “FSR pressed” and “off-ground” status means “FSR not pressed”.
In our experiments, three previous ways were applied to the threshold computations. To be specific, one way was to define body weight percentage as a threshold, which had been affirmed to detect gait phase in real time. The other two ways were to use the maximum and minimum GCFs of gait cycles for threshold calculation. Meanwhile, the two ways carried out data post-processing to calculate an appropriate threshold, and were finally chosen as reference methods.
2.3.1. Mariani Method
Mariani et al. [
4] defined 5% of body weight to compute the threshold
T:
where m is the subject’s mass and g is the acceleration of gravity.
2.3.2. Timing analysis module Method
Catalfamo et al. [
19] employed a Timing analysis module (TAM) software (version5.24, Tekscan, South Boston, MA, USA) as their reference method. After data acquisition of each experiment, the maximum and minimum GCFs (i.e.,
Tmax and
Tmin, respectively) were searched out for threshold calculation:
Additionally, T needed to be calculated severally for each set of FSR in each experiment.
2.3.3. Lopez–Meyer Method
Lopez–Meyer et al. [
5] used the average value of the maximum GCFs and the average value of the minimum GCFs to compute the threshold
T. For each experiment, the threshold computation needed all the local maximum GCFs and local minimum GCFs (i.e.,
Tmax(
i) and
Tmin(
j), respectively) of gait cycles. In a complete gait cycle, there were only one
Tmax and only one
Tmin for each set of FSR. In one experiment, there were many gait cycles. For one set of FSR, there were
k Tmax and
l Tmin in one experiment. However,
k did not equal
l as there might exist an incomplete gait cycle in the experiment:
where
α was a proportional factor for the threshold adjustment to compensate for interindividual variability in pressure levels. In our experiments, the selection of proportional factor was made that α was set to 0.084.
2.4. Self-Tuning Triple-Threshold Algorithm
With respect to the Mariani method, different thresholds should be set for different subjects, and the same threshold is set for one subject in five experiments with different walking speed each time. The Mariani method is not adaptable to different subjects and different walking speeds. Meanwhile, the TAM and Lopez–Meyer methods both carry out data post-processing to calculate the thresholds and are incapable of real-time application. In order to seek a method to detect gait phase in real time and be adaptable to different walking conditions, we propose a self-tuning triple-threshold algorithm (STTTA) that uses three thresholds to obtain the maximum and minimum GCFs for threshold computations.
2.4.1. Setting of Three Thresholds
In this section, the magnitudes of three thresholds are amplified.
Figure 2 demonstrates the GCFs processing through three thresholds, including high-threshold, middle-threshold and low-threshold (i.e.,
TH,
TM and
TL, respectively). Specifically,
TH is utilized to search the maximum GCF (i.e.,
Tmax(
j)) of the present gait cycle, and chosen as the main threshold that divides the GCFs into on-ground and off-ground statuses.
TM is used to search time points (points b, e and h shown in
Figure 2) for the adjustments of
TH and
TL. Meanwhile,
TL is employed to search the minimum GCF (i.e.,
Tmin(
j)) of the present gait cycle, and the time point (point f) for the adjustments of
TM.
At the present gait cycle, the three thresholds are newly calculated for the next gait cycle. The three thresholds (i.e., TH(i − 1), TM(i − 1) and TL(i − 1)), by which the GCFs are processed at the present gait cycle, have been calculated at the last gait cycle.
As
Figure 2 shows, the present gait cycle starts at point a and ends at point g. Point a is the end point of the last gait cycle, and also the start point of the present gait cycle. Point b is used to calculate the
TL(
i − 1). Points c and d make a region [c, d]. When the GCF (
F(
k)) is larger than
TH(
i − 1), it goes to region [c, d]. Then, the
Tmax(
j) can be searched out as follows:
where
k is the total number of the collected GCFs from one FSR in each experiment. The numerical range of
k is 1~60,000 because each experiment lasts 30 s with a sampling frequency of 2000 Hz.
At point e,
TH(
i) is calculated as a new threshold for the next gait cycle:
where
β is a proportion factor and chosen to be a constant.
i means that the present gait cycle is the
i-th step of one subject walking in one experiment, while
j means that the
Tmax(
j) is the
j-th maximum GCF of the total gait cycles. However,
i was not necessarily equal to
j as incomplete gait cycles may have occurred.
At point f,
TM(
i) is newly calculated for the next gait cycle:
where
γ is a proportion factor and chosen to be a constant.
In common with points c and d, the points f and g also make a region [f, g]. The calculation of
Tmin(
j) is made in the regions [f, g], which means that the
F(
k) is smaller than
TL(
i − 1):
Additionally, point g is the end point of the present gait cycle, and also the start point of the next gait cycle.
However,
TL(
i) is newly set at point h, as the same to
TL(
i − 1) calculated at point b:
where
λ is a proportion factor and chosen to be a constant.
2.4.2. Setting of Initial Threshold Values
Before the experiments, it is necessary to set initial values for the three thresholds. In this paper, TH(1), TM(1) and TL(1) are the initial values of TH, TM and TL. However, the setting should follow that TL(1) < TM(1) < TH(1).
2.5. Gait Phase Detection Algorithm
The gait cycle can be divided into stance-phase and swing-phase. The transitions between gait phases are gait events. As proposed by Pappas et al. [
3,
22], swing-phase, stance-phase, heel-strike and heel-off are the most common gait phases and gait events for a single foot. For the proposed STTTA,
TH is the main threshold, which divided the GCFs into on-ground and off-ground statuses:
As is the same for Equation (1), F is the GCF from the ball or heel, and TH is the threshold. G is the result that “on-ground” status means “FSR pressed” and “off-ground” status means “FSR not pressed”.
When the GCFs from the ball and heel are processed from Equations (1) and (12), the gait phases and gait events can be distinguished by following the rules in
Table 1.
2.6. Reference Methods
In order to obtain the reliability of the proposed STTTA, reference methods should be determined. The TAM and Lopez–Meyer methods carried out data post-processing to calculate an appropriate threshold for each FSR at each walking speed. In addition, the TAM method had been chosen as a reference method to test the reliability of gait events detection. On the other hand, the Lopez–Meyer method had been tested on a shoe-based wearable sensor system, which had been compared with the “GAITRite system”. The Lopez–Meyer method acquired 95% confidence to compare detection results with the GAITRite system. Therefore, in this paper, the TAM and
Lopez–Meyer methods were both selected as reference methods. Finally, both the STTTA and Mariani methods were compared with the reference methods to obtain their reliabilities.
3. Experimental Results
3.1. Selection of Coefficients
Before the experiments, the values of TH(1), TM(1) and TL(1) were determined. The value selections of TH(1), TM(1) and TL(1) followed the rules that Tmin < TL(1) < TM(1) < TH(1) < Tmax. Based on data analysis, the value range of Tmin was 0–5 N and the value range of Tmax was 300–1300 N. Therefore, the values of TH(1), TM(1) and TL(1) could be selected within a wide range. To evaluate this in our experiments, we randomly chose a set of initial threshold values where TL(1) = 15 N, TM(1) = 20 N and TH(1) = 25 N.
After the selection of
TH(1),
TM(1) and
TL(1), the proportion factor β, γ, and λ in Equations (8), (9) and (11) were optimized to determine the highest reliability of STTTA. From Equations (9) and (11), the values of
TM and
TL were affected by each other. As a result, one of γ and λ should be firstly determined such that the value of λ was chosen to be 0.5. Then, using the data from nine subjects as training data, the reliabilities of the proposed STTTA were calculated by using various values of β and γ, which is shown in
Figure 3. The selections for β and γ to acquire the highest reliability was made such that β = 0.071 and γ = 0.042.
Finally, the same TH(1), TM(1) and TL(1) were used for all 24 subjects in all experiments. In addition, data from the remaining subjects were processed using the selected β, γ, and λ.
3.2. The Results of Gait Phase Detection and Experimental Comparisons
Figure 4 showed the detection results of the proposed STTTA. In
Figure 4a, the GCFs from the ball and heel were displayed. The self-adjustments of three thresholds for the GCFs from the ball and heel is demonstrated in
Figure 4b,c. It was qualitatively illustrated in
Figure 4d where the gait phases and gait events were detected through the proposed GPDA. In order to clarify the self-adjustment effect, the main threshold T
H of the proposed STTTA was compared with the thresholds calculated by the previous methods. As pictured in
Figure 4e,f, the amplitudes of the threshold T
H were adjustable and adaptable to walking conditions, while constant thresholds were figured out for the previous methods.
3.3. Real-Time Application for Gait Phase Detection
After data acquisitions, the data processing included the initial threshold setting, acquirement of the maximum and minimum GCFs, and threshold computations, was made prior to the GPDA. When the threshold computations were achieved, the gait phase detection could be implemented through the GPDA.
In this gait phase detection system, the sampling frequency was set to 2000 Hz. Data acquisitions, data processing and gait phase detection could be all accomplished within one sampling period. The time delay between data acquisition and gait phase detection was less than 0.5 ms. Therefore, the proposed STTTA could be used to detect gait phases in real time.
3.4. Adaptability to Different Walking Conditions
Needless to obtain the body weights of all subjects, the proposed STTTA acquired higher average reliabilities than the Mariani method as shown in
Table 2. In addition, irrespective of the reference method applied (TAM method or the Lopez–Meyer method), higher reliability was gained for the STTTA compared to the Mariani method. The comparative results affirmed that the proposed STTTA was more reliable than the Mariani method in real-time gait phases detection.
To demonstrate the adaptability of the proposed STTTA, the experimental results of one male subject and one female subject were taken as examples. As shown in
Figure 5a–d, the Mariani method could achieve high reliability at one walking speed, and then reduce significant reliability at other walking speeds. However, the proposed STTTA gained stable reliabilities at five walking speeds. The stability to speeds proved that the proposed STTTA was adaptable to different walking speeds.
4. Discussion
4.1. The Reason of Using Three Thresholds for GCFs Processing
At the beginning, one threshold was expected to obtain the maximum and minimum GCFs of the present gait cycle, and the time point of a new threshold calculation for the next gait cycle. As shown in
Figure 6a, the region (c,d) was used to search the maximum GCF of the present gait cycle, and the point d was used as the time point for new threshold calculation. However, the new threshold would be calculated twice (i.e., it should be only once) occasionally at one gait cycle as shown in
Figure 6b. The threshold
T(
i), which was the correct threshold calculated for the next gait cycle at time point d. Nonetheless, it possibly existed that the GCFs after time point d were larger than the newly computed threshold
T(
i) in a new region (c’,d’). In this situation, the algorithm would search the maximum GCFs in region (c’,d’), and figured out an unexpected new threshold
T’(
i), which replaced the
T(
i) for threshold processing of the next gait cycle, at time point d’. Additionally, the secondly calculated threshold
T’(
i) was a false threshold for the next gait cycle. Similarly, using two thresholds also resulted in the same problem.
However, using three thresholds avoided the above-mentioned problem. As
Figure 2 showed, the maximum and minimum GCFs were severally obtained in region (c, d) and (f, g); meanwhile, the new thresholds (i.e.,
TH and
TL) were severally computed at time point e and h. The middle threshold T
M was to search the time point e and h, which avoided the new threshold computation at time point d or g. To sum up, the use of three thresholds avoided the problem of twice threshold computations.
4.2. Adaptability to Variable Speed Walking
Generally, when the subjects walk faster, their feet hit the ground harder, i.e., the magnitude of GCFs gets bigger. As a result, the magnitude of GCFs changes with the variation of walking speeds; meanwhile, the maximum GCF increases (or decreases) as the walking speed increases (or decreases). According to the formula in Equation (8), when the subjects walk slowly, the maximum GCF possesses small magnitude such that a small threshold is calculated. Similarly, when the subjects walk fast, the formula calculated a big threshold. As to variable speed walking, one computed threshold should be set for each walking speed to conduct correct gait phase detection. If the subject suddenly changes walking speed, the ground contact force changes accordingly. The subject will take one step, and the thresholds will be adjusted to the new speed because three thresholds of the next gait cycle are calculated by the GCFs of the present gait cycle. The proposed STTTA uses the maximum and minimum GCFs from the last gait cycle to calculate a threshold (i.e., TH) for the present gait cycle. The maximum and minimum GCFs of the last gait cycle are the closest to those of the present cycle. As a result, appropriate thresholds are calculated for each gait cycle, which correlates with speed variation. To sum up, the proposed STTTA is adaptable to variable speed walking.
4.3. Limitation of the Research
In our study, only healthy subjects have been studied on level ground, not taking the pathological subjects into account. The experiments were done on a treadmill because the method is not suitable for irregular terrain and stairs walking. Uneven road conditions and obstacles on the ground may lead to misdetections.
In the experiments, some rules of GPDA were not observed. However, the specific walking habits of individuals may employ the unused rules. The GPDA rules could be used to detect abnormal gaits for podiatric diagnoses.