# SA-SVM-Based Locomotion Pattern Recognition for Exoskeleton Robot
## 2 Materials and Methods
### Feature Selection  
Since the swing leg FSRs data is almost zero, the collected signals include standing FSRs, left and right leg joint angle information. The combined signal is expressed as:  
\[x=[F_{B},F_{H},\theta_{LH},\theta_{LK},\theta_{LA},\theta_{RH},\theta_{RK}, \theta_{RA}] \tag{1}\]  
\(F_{B},F_{H}\) are the pressure of the foot palm and heel in the standing state. \(\theta_{LH},\theta_{LK},\theta_{LA}\) are the angle of the left leg hip joint, knee joint and ankle joint. \(\theta_{RH},\theta_{RK},\theta_{RA}\) are the angle of the right leg hip joint, knee joint and ankle joint. The FSRs of stance state and the lower limb angle were used as the classifier features based on the gait phase detection. Feature extraction is a process of selecting useful information from filtered signals. Useful features can be selected from the time series of sensor signals. A time series is a series of observations of the sensor, as shown below:  
\[x_{i}(t),\ i=1,\ldots,\ m;t=1,\ldots,n \tag{2}\]  
where \(m\) is the number of sensor observations and \(n\) is the data length of the window. We select features throughout the window and print them at the end of the window. Traditional feature extraction algorithms are mostly based on whether they have strong correlation with the target variable to evaluate, but these features may also contain some redundant features. mRMR algorithm is used to ensure the maximum correlation while removing redundant features, which is equivalent to obtaining a set of purest feature subset. mRMR can be considered as an approximation to maximize the dependency between the joint distribution of feature subset and the target variable, which itself belongs to the feature selection method of filter. Maximum relevance is the search for features that meet the following formula:  
\[maxD(S,c),\ D=\frac{1}{\left|S\right|}\sum_{x_{i}\in S}I(x_{i};c) \tag{3}\]  
The average value of mutual information among all features \(x_{i}\) and classifications \(c\) is used to approximate \(D(S,c)\). Features selected through Max-Relevance can be redundant and depend heavily on each other. When two features are redundant with each other, the classification results will not be significantly changed if one of them is removed. Therefore, the min-redundancy method can be used to eliminate redundant features:  
\[minR(S),R=\frac{1}{\left|S\right|^{2}}\sum_{x_{i},x_{j}\in S}I(x_{i},x_{j}) \tag{4}\]  
Maximum correlation \(D\) and minimum redundancy \(R\) are combined by defining operators \(\Phi(D,R)\). \[\text{max}\Phi(D,R),\Phi=D-R \tag{5}\]  
The mRMR algorithm is shown in Figure 6:In each locomotion pattern, the results of feature selection by mRMR algorithm are shown in Tables 1-3. Under the data sets of three locomotion patterns, the results of feature selection through mRMR algorithm are shown in Table 4. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Order** & **Name** & **Score** \\ \hline
1 & \(F_{B}\) & 0.017 \\
2 & \(\theta_{LA}\) & 0.015 \\
3 & \(F_{H}\) & 0.010 \\
4 & \(\theta_{RA}\) & 0.006 \\
5 & \(\theta_{LH}\) & 0.004 \\
6 & \(\theta_{RH}\) & 0.001 \\
7 & \(\theta_{RK}\) & 0.000 \\
8 & \(\theta_{1K}\) & 0.000 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of the results of feature selection for level-ground walking. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Order** & **Name** & **Score** \\ \hline
1 & \(F_{H}\) & 0.027 \\
2 & \(\theta_{1K}\) & 0.021 \\
3 & \(\theta_{LA}\) & 0.019 \\
4 & \(F_{B}\) & 0.011 \\
5 & \(\theta_{RA}\) & 0.006 \\
6 & \(\theta_{RH}\) & 0.003 \\
7 & \(\theta_{LH}\) & 0.001 \\
8 & \(\theta_{RK}\) & 0.002 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of feature selection results for stairs ascent. Figure 6: The mRMR algorithm steps.