# Fault Diagnosis of a Reconfigurable Crawling-Rolling Robot Based on Support Vector Machines
## 3 Feature Extraction  
To perform fault classification, we need statistical features that standardize the characteristics of the robot in case of faulty and non-faulty conditions. In this paper, we use gyroscope and accelerometer readings from an IMU sensor. From the obtained results, we extract the mean, standard deviation, variance, root-mean-square level, peak-to-peak, root sum of squares level, and maximum value. In the context of fault classification in Scorpio gaits, the use of statistical methods for feature extraction greatly reduces the dimensionality of the original IMU sensor data features. The IMU data used for this study included a total of seven values; namely, three axes for accelerometer, three axes for gyroscope, and one axis for magnetometer.  
1. **Mean:** Mean is the measure of the average of an IMU data set at a given instance. The mean of each IMU data set is calculated and used as one of the statistical features. \[\text{Mean}=\frac{\sum_{i=1}^{\text{N}}\text{x}_{i}}{\text{N}}\] (1) where, \(\text{x}\) represents the IMU data for an instance N accounts for the number of IMU data in that instance. In our case, N = 7.
2. **Standard deviation:** Standard deviation is the measure of how spread out each IMU data point is from each other. This measure will also be able to gauge the difference between each IMU data point from its mean. This step calculates the standard deviation of IMU data obtained from each of data collection. \[\text{Standard deviation}=\sqrt{\frac{1}{\text{N}}\sum_{i=1}^{\text{N}}( \text{x}_{i}-\mu)^{2}}\] (2) where, \(\mu\) is the mean of the IMU data for an instance x represents the IMU data for an instance, and N = 7.  
Figure 3: Morphologies of our Scorpio robot.  
3. **Variance:** This measure represents the variance of the IMU data at a given instance. It is the squared standard deviation of the mean IMU data. \[\text{Variance}=\frac{1}{\text{N}}\sum_{i=1}^{\text{N}}(\text{x}_{i}-\mu)^{2}\] (3) where, \(\mu\) is the mean of the IMU data for an instance \(x\) represents the IMU data for an instance, and N = 7. **Root Mean Square:** Root Mean Square is also referred to as quadratic mean and is the square root of the arithmetic mean of the squared sample IMU data. It represents the magnitude or the typical size of IMU data for each data collection. \[\text{Root Mean Square}=\sqrt{\frac{\sum_{i=1}^{\text{N}}(\text{x}_{i})^{2}}{ \text{N}}}\] (4) where, \(x\) represents the IMU data for an instance, and N = 7. **Peak-to-peak value:** The peak-to-peak value calculates the difference between the maximum IMU value and the minimum IMU value at a given instance. The maximum IMU value at an instance is the crest, and the minimum IMU value at an instance is the trough. \[\text{Peak to peak value}=\text{crest}-\text{trough}\] (5) **Root sum of squares level:** The root sum of squares is calculated by taking the square root of the sum of the squared IMU data obtained for a given instance. \[\text{Root sum of squares level}=\sqrt{\sum_{i=1}^{\text{N}}|\text{x}_{i}|^{2}}\] (6) where, \(x\) represents the IMU data for an instance, and N = 7. **Maximum Value:** This feature represents the highest value of the data obtained from IMU at a single instance. **Sum:** This feature adds up all the IMU data obtained for a given instance. \[\text{Sum}=\sum_{i=1}^{\text{N}}\text{x}_{i}\] (7) where, \(x\) represents the IMU data for an instance, and N = 7.