**5. Gait analysis with wavelet**

In this section, we present the results obtained to apply wavelet in gait signals, obtained with the eMotion Capture system. In this analysis, only the ankle data (left and right) were considered. To generate spatiotemporal variables, we select the best wavelet performance, which was obtained by a comparison between multiple wavelet decomposition and the clinical expert judgment [41].

### **5.1 Methodology and data**

For this study 12 volunteers were selected, 6 women and men, with an age range of 53–73. In each gender group, there were three subjects with early stage PD and three healthy with normal walking patterns. Early stage was defined as stage I or II on the Hoehn and Yahr scale. All participants were evaluated under a dopaminergic agonist, i.e., "on" state. All PD subjects were of completely independent mobility and did not require a walking aid.

### **5.2 Signal processing with wavelet**

The wavelet families tested were Biorthogonal, Coiflets, Daubechies, and Symlets; a total of 12 wavelet decompositions were tested for each gait signal. This was realized with the aim to obtain the best wavelet performance and to observe different spectral- and time-domain information.

To evaluate the wavelet performance, we assess each transformation with the clinical expert criteria. Matlab was used as programming and processing tool; in this software wavelet is defined using an identifier (id) and decomposition value. For example, in "db8" the "db" indicates Daubechies family, and the 8 refers to the vanishing moments. For the present study, we test four wavelet families (Daubechies, Coiflet, Symlet, and Biorthogonal), each wavelet transform with different vanishing moments (db3, db4, db5, db6, db7, db8, coif1, coif2, sym2, sym3, bior2.2, and bior 2.4).

The wavelet transformation was applied with one level of decomposition to each individual ankle signal (left and right). We assess the algorithm applying 12 wavelet decomposition, to 12 subjects, to every ankle, walking in the corridor 3 times. Finally, the system was tested with a total of 864 ankle signals.

Each *j* level of decomposition is obtained by generating *j* approximation and detail coefficients, which can be associated to a noise-free version of the original signal and to a version of the noise extracted, respectively.

**Figure 3** shows one-level decomposition of a gait signal using wavelet; this process generates two signal, an approximated signal to the original and other with the details extracted.

### **5.3 Gait phases detection**

To distinguish the gait phases, we calculated the mean values of each of the 12 wavelet decompositions we applied to the gait signals, using this as a threshold to distinguish the phases. This threshold was defined as the average value of each

**9**

**5.5 Results**

**Figure 3.**

*Using Wavelets for Gait and Arm Swing Analysis DOI: http://dx.doi.org/10.5772/intechopen.84962*

signal generated for this one gait signal.

detect small changes in signals.

decomposition accuracies.

**5.4 Gait phase error detection and correction**

wavelet decomposition. To extract the support and swing phases from the ankle signals using this threshold, we defined all values above it as the swing phase and all values below it as the support phase. These allow us to obtain a binary signal with true or 1 when on swing phase and false or 0 when on support phase. **Figure 4** shows one gait signal, the threshold applied to the detail coefficients, and the binary

*One-level wavelet decomposition using db8, (a) approximation coefficients, and (b) details coefficients.*

From step described in section 5.3 (**Figure 3**), we obtain binary signals, some of these with small intermediate phases. According to gait signals obtained, we set as a criterion that each gait phase should have at least 10 binary elements; some small gait phases do not meet this minimum number of elements and were considered errors. These small intermediate phases are generated due to wavelet sensitivity to

To correct these errors, we designed an algorithm to detect the start and end of each phase and correct for abnormal phases; this algorithm was designed based on the criterion for the minimum number of values that could represent a real gait phase.

We use Hamming distance [42] as the metric to select the best wavelet transform. This metric was used to compare all the binary gait signals to the ideal reference values. With this we could obtain a quantitative value of the wavelet

*Using Wavelets for Gait and Arm Swing Analysis DOI: http://dx.doi.org/10.5772/intechopen.84962*

*Wavelet Transform and Complexity*

**5. Gait analysis with wavelet**

**5.1 Methodology and data**

and did not require a walking aid.

**5.2 Signal processing with wavelet**

bior2.2, and bior 2.4).

the details extracted.

**5.3 Gait phases detection**

different spectral- and time-domain information.

Finally, the system was tested with a total of 864 ankle signals.

signal and to a version of the noise extracted, respectively.

and right, and wrist left and right, respectively.

wavelet decomposition and the clinical expert judgment [41].

This software allows us to obtain a representation of the distance between the person and the Kinect, for each articulation of interest, at each instant of time. **Figure 2** shows a representation of the movement of the base of the spine, ankle left

In this section, we present the results obtained to apply wavelet in gait signals, obtained with the eMotion Capture system. In this analysis, only the ankle data (left and right) were considered. To generate spatiotemporal variables, we select the best wavelet performance, which was obtained by a comparison between multiple

For this study 12 volunteers were selected, 6 women and men, with an age range of 53–73. In each gender group, there were three subjects with early stage PD and three healthy with normal walking patterns. Early stage was defined as stage I or II on the Hoehn and Yahr scale. All participants were evaluated under a dopaminergic agonist, i.e., "on" state. All PD subjects were of completely independent mobility

The wavelet families tested were Biorthogonal, Coiflets, Daubechies, and Symlets; a total of 12 wavelet decompositions were tested for each gait signal. This was realized with the aim to obtain the best wavelet performance and to observe

To evaluate the wavelet performance, we assess each transformation with the clinical expert criteria. Matlab was used as programming and processing tool; in this software wavelet is defined using an identifier (id) and decomposition value. For example, in "db8" the "db" indicates Daubechies family, and the 8 refers to the vanishing moments. For the present study, we test four wavelet families (Daubechies, Coiflet, Symlet, and Biorthogonal), each wavelet transform with different vanishing moments (db3, db4, db5, db6, db7, db8, coif1, coif2, sym2, sym3,

The wavelet transformation was applied with one level of decomposition to each individual ankle signal (left and right). We assess the algorithm applying 12 wavelet decomposition, to 12 subjects, to every ankle, walking in the corridor 3 times.

Each *j* level of decomposition is obtained by generating *j* approximation and detail coefficients, which can be associated to a noise-free version of the original

**Figure 3** shows one-level decomposition of a gait signal using wavelet; this process generates two signal, an approximated signal to the original and other with

To distinguish the gait phases, we calculated the mean values of each of the 12 wavelet decompositions we applied to the gait signals, using this as a threshold to distinguish the phases. This threshold was defined as the average value of each

**8**

**Figure 3.** *One-level wavelet decomposition using db8, (a) approximation coefficients, and (b) details coefficients.*

wavelet decomposition. To extract the support and swing phases from the ankle signals using this threshold, we defined all values above it as the swing phase and all values below it as the support phase. These allow us to obtain a binary signal with true or 1 when on swing phase and false or 0 when on support phase. **Figure 4** shows one gait signal, the threshold applied to the detail coefficients, and the binary signal generated for this one gait signal.

## **5.4 Gait phase error detection and correction**

From step described in section 5.3 (**Figure 3**), we obtain binary signals, some of these with small intermediate phases. According to gait signals obtained, we set as a criterion that each gait phase should have at least 10 binary elements; some small gait phases do not meet this minimum number of elements and were considered errors. These small intermediate phases are generated due to wavelet sensitivity to detect small changes in signals.

To correct these errors, we designed an algorithm to detect the start and end of each phase and correct for abnormal phases; this algorithm was designed based on the criterion for the minimum number of values that could represent a real gait phase.

### **5.5 Results**

We use Hamming distance [42] as the metric to select the best wavelet transform. This metric was used to compare all the binary gait signals to the ideal reference values. With this we could obtain a quantitative value of the wavelet decomposition accuracies.

### **Figure 4.**

*First image shows the right ankle signal sequence from one subject, who covered about 2 m in about 3 seconds. The second signals show the one-level wavelet decomposition using db8; the red line shows the mean, used as a gait phase classification threshold. The third signal shows the binarized signal, before error correction. The last binary signal shows the ideal gait phase classification, where the gait phases were identified manually by a clinical expert.*

The error before and after correction is given in **Table 1**. Before correction the minimum value was 13%, obtained for the db3, db4, db5, bior2.2, and sym3 wavelet members. After correction, the average error was reached for the same wavelet members and by db7 and db8, with 7%. This represents that our algorithm to detect gait phases (stance and swing) has 93% of accuracy, compared with the clinical expert.

After the wavelet comparison, we choose the wavelet "db8" as the member to determine spatiotemporal variables for each subject. Initially, was selected arbitrarily, but later, the "db8" wavelet selection was validated by the statistical comparison.

**11**

**Table 1.**

**Table 2.**

**Table 3.**

*p-Values obtained from Mann-Whitney tests*

The variables obtained are clinically important and provide objective measures that can be used in the evaluation context to measure and diagnose the PD progression. The variables presented in **Table 2** are the results obtained for healthy volunteers and PD volunteers. These results suggest significant differences between both groups and represent an objective metric for disease progression quantification. The variables obtained reflect that patients were slower than controls; this is related to the PD gait alterations. Finally, since PD is an asymmetric disease, we perform a Mann-Whitney test to identify differences statistically significant in the left and right variables for case and control subjects. As shown in **Table 3**, all variables considered provide a mechanism to

*Using Wavelets for Gait and Arm Swing Analysis DOI: http://dx.doi.org/10.5772/intechopen.84962*

*Average error obtained before and after error correction*

**Wavelet name Avg error**

Bior2.2 13% 7% Bior2.4 16% 11% Coif1 14% 8% Coif2 17% 11% Db3 13% 7% Db4 13% 7% Db5 13% 7% Db6 14% 8% Db7 14% 7% Db8 14% 7% Sym2 14% 8% Sym3 13% 7%

**Variable Cases Controls**

*Average spatiotemporal variable values (standard deviations) obtained for PD and non-PD volunteers*

Stance time (s) 0.01 0.04 Swing time (s) 0.02 0.03 No. of steps 0.04 0.03 Duration time (s) 0.01 0.01 Speed test (m/s) 0.01 0.01

**Variable** *p***-Value**

Stance time (s) 2.24 (0.31) 2.17 (0.23) 0.91 (0.10) 1.06 (0.10) Swing time (s) 1.33 (0.14) 1.33 (0.18) 0.76 (0.09) 0.76 (0.06) No. of steps 10 (0.55) 9.67 (0.19) 6.83 (0.36) 6.17 (0.29) Duration time (s) 3.7 (0.41) 3.65 (0.32) 1.72 (0.07) 1.89 (0.09) Speed test (m/s) 0.63 (0.06) 0.65 (0.05) 1.20 (0.05) 1.04 (0.07)

**Before correction After correction**

**Left Right Left Right**

**Left Right**

## *Using Wavelets for Gait and Arm Swing Analysis DOI: http://dx.doi.org/10.5772/intechopen.84962*


### **Table 1.**

*Wavelet Transform and Complexity*

**10**

**Figure 4.**

The error before and after correction is given in **Table 1**. Before correction the minimum value was 13%, obtained for the db3, db4, db5, bior2.2, and sym3 wavelet members. After correction, the average error was reached for the same wavelet members and by db7 and db8, with 7%. This represents that our algorithm to detect gait phases (stance and swing) has 93% of accuracy, compared with the clinical expert. After the wavelet comparison, we choose the wavelet "db8" as the member to determine spatiotemporal variables for each subject. Initially, was selected arbitrarily, but later, the "db8" wavelet selection was validated by the statistical comparison.

*First image shows the right ankle signal sequence from one subject, who covered about 2 m in about 3 seconds. The second signals show the one-level wavelet decomposition using db8; the red line shows the mean, used as a gait phase classification threshold. The third signal shows the binarized signal, before error correction. The last binary signal shows the ideal gait phase classification, where the gait phases were identified manually by a clinical expert.* *Average error obtained before and after error correction*


### **Table 2.**

*Average spatiotemporal variable values (standard deviations) obtained for PD and non-PD volunteers*


### **Table 3.**

*p-Values obtained from Mann-Whitney tests*

The variables obtained are clinically important and provide objective measures that can be used in the evaluation context to measure and diagnose the PD progression.

The variables presented in **Table 2** are the results obtained for healthy volunteers and PD volunteers. These results suggest significant differences between both groups and represent an objective metric for disease progression quantification. The variables obtained reflect that patients were slower than controls; this is related to the PD gait alterations.

Finally, since PD is an asymmetric disease, we perform a Mann-Whitney test to identify differences statistically significant in the left and right variables for case and control subjects. As shown in **Table 3**, all variables considered provide a mechanism to differentiate PD and non-PD people. The parameters that can be considered as the most appropriate to discriminate patients are stance time, duration time, and test speed.
