# Fault Diagnosis of a Reconfigurable Crawling-Rolling Robot Based on Support Vector Machines
## 6 Results and Discussions  
The classification is carried out using MATLAB and the Library of SVM support package for each locomotion gait. The number of training and testing samples varied by gait and speed. The  
Figure 6: Scatter plot indicates statistical features used in fault detection of two locomotion conditions. (**a**) Backward locomotion at a speed of three degrees per period; (**b**) Curve for left locomotion at a speed of six degrees per period. accuracy obtained from the SVM classification, across all nine locomotion gaits and three different speeds, is provided in Table 2.  
The classification is done for both c-SVC and v-SVC classifiers using a linear and an RBF kernel. The overall accuracy of each classifier is provided in Table 3.  
The linear kernel in the c-SVC classifier yields the highest overall accuracy, which is 98.5823%. The reason for such a high accuracy is that most of the statistical features used are linearly separable, i.e., linear in nature. We observe that the linear kernel, in both the c-SVC and v-SVC classifiers, yields a better accuracy than the corresponding RBF kernel. In machine learning, the performance of the classifier is often evaluated by analyzing a confusion matrix, which provides every possible result in tabular form: true positives, true negatives, false positives, and false negatives. In this work, we get a 2 \(\times\) 2 confusion matrix that indicates the correct classifications and misclassification of the classifier of \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**c-SVC 1**} & \multicolumn{2}{c}{**v-SVC 2**} \\ \cline{2-5}
**Type of Locomotion Gaits** & \multicolumn{2}{c}{**Radial Basis**} & \multicolumn{2}{c}{**Radial Basis**} \\  & **Linear Kernel** & **Function** & **Linear Kernel** & **Function** \\  & & & **Kernel** & **Kernel** \\ \hline \multirow{3}{*}{Rolling} & 3 degree/period & 100\% & 100\% & 100\% & 100\% \\  & 6 degree/period & 92.44\% & 95.93\% & 100\% & 97.67\% \\  & 12 degree/period & 95.29\% & 94.11\% & 96.47\% & 92.94\% \\ \hline \multirow{3}{*}{Forward} & 3 degree/period & 98.25\% & 97.09\% & 97.09\% & 95.93\% \\  & 6 degree/period & 100\% & 100\% & 100\% & 100\% \\  & 12 degree/period & 100\% & 100\% & 100\% & 100\% \\ \hline \multirow{3}{*}{Backward} & 3 degree/period & 100\% & 100\% & 99.41\% & 100\% \\  & 6 degree/period & 100\% & 97.62\% & 100\% & 100\% \\  & 12 degree/period & 100\% & 100\% & 100\% & 100\% \\ \hline \multirow{3}{*}{Right Turn} & 3 degree/period & 98.30\% & 98.72\% & 98.30\% & 98.30\% \\  & 6 degree/period & 100\% & 97.04\% & 100\% & 94.09\% \\  & 12 degree/period & 91.66\% & 92.26\% & 95.23\% & 91.66\% \\ \hline \multirow{3}{*}{Left Turn} & 3 degree/period & 100\% & 100\% & 100\% & 100\% \\  & 6 degree/period & 100\% & 100\% & 100\% & 100\% \\  & 12 degree/period & 95.90\% & 96.72\% & 95.90\% & 95.08\% \\ \hline \multirow{3}{*}{Curve Right} & 3 degree/period & 100\% & 98.88\% & 98.51\% & 98.14\% \\  & 6 degree/period & 99.40\% & 95.83\% & 97.61\% & 100\% \\  & 12 degree/period & 100\% & 100\% & 100\% & 95.23\% \\ \hline \multirow{3}{*}{Curve Left} & 3 degree/period & 100\% & 100\% & 100\% & 99.77\% \\  & 6 degree/period & 100\% & 100\% & 100\% & 95.90\% \\  & 12 degree/period & 100\% & 98.32\% & 100\% & 98.32\% \\ \hline \multirow{3}{*}{Shift Right} & 3 degree/period & 100\% & 100\% & 100\% & 100\% \\  & 6 degree/period & 100\% & 100\% & 98.83\% & 98.83\% \\  & 12 degree/period & 91.56\% & 92.77\% & 93.97\% & 95.78\% \\ \hline \multirow{3}{*}{Shift Left} & 3 degree/period & 100\% & 100\% & 99.50\% & 99.50\% \\  & 6 degree/period & 98.88\% & 98.14\% & 92.93\% & 93.68\% \\ \cline{1-1}  & 12 degree/period & 100\% & 100\% & 92.57\% & 100\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance of the SVM classifier across nine locomotion gaits of the Scorpio robot.