## 5 Feature Extraction
### Time-Domain Features  
Time-domain features are computed based on the signal amplitude that changes with time. Often these types of features are used to maintain low computational complexity. Moreover, this type of analysis often does not require additional signal transformation. Within the time-domain features, the magnitude of the accelerometer and gyroscope data are some of the commonly computed features. The reason to compute the magnitude is  
Figure 5: Overview of signal representation techniques commonly used for road surface anomaly detection systems, classification systems, and feature extraction. to remove the sensor data's negative effects and reduce the variability imposed on the dataset due to the placement and inclination of the inertial sensor within the vehicle [37]. The magnitude calculation of the accelerometer data is shown in Equation (2) and for the gyroscope data in Equation (3) as proposed by [PERSON] et al. [37]. In Equation (3), \(Acc_{x}\), \(Acc_{y}\), and \(Acc_{z}\) represent the triaxial accelerometer components while \(Acc_{M}\) is the magnitude of the accelerometer signal. On the other hand, in Equation (3), \(Gyr_{x}\), \(Gyr_{y}\), and \(Gyr_{z}\), are the triaxial angular velocities, and \(Gyr_{M}\) is the magnitude of the gyroscope signal. \[Acc_{M}=\sqrt{Acc_{x}^{2}+Acc_{y}^{2}+Acc_{z}^{2}} \tag{2}\]  
\[Gyr_{M}=\sqrt{Gyr_{x}^{2}+Gyr_{y}^{2}+Gyr_{z}^{2}}, \tag{3}\]  
Commonly computed statistics extracted from the accelerometer signal in the time-domain are the mean, variance, standard deviation, skewness, kurtosis, the maximum value, and dynamic range [54]. Table 7 shows the expression that allows computing the above features. In the expressions shown in Table 7, \(n\) represents the signal's length or the window's length, and \(X_{i}\) is one single sample of the signal. Other types of computed features in the time-domain are the mode, median, range, and root-mean-square, also used by [PERSON] et al. [37]. Another technique used for feature extraction is to compute the autocorrelation (i.e., the degree of similarity between the signal and a lagged version of itself [55]). The autocorrelation was proposed in the study of [PERSON] et al. [26] for feature extraction of the \(z\)-axis of the accelerometer. The computation of these features requires that a signal window is measured. Thus, it is required that the anomaly is within that measured window. There is no exact methodology to select the correct window length of the signal; hence, a common approach is to test the system with different window lengths and select the one that produces the best performance, as suggested in the study of [PERSON] et al. [43]. In the same way, another type of characteristics that are commonly computed in what refers to the classification of signals are those obtained through different representations. \begin{table}
\begin{tabular}{c c} \hline \hline
**Feature** & **Formula** \\ \hline Mean & \(\overline{x}=\frac{1}{n}\sum_{i=1}^{n}X_{i}\) \\ \hline Variance & \(\sigma^{2}=\frac{1}{n}\sum_{i=1}^{n}(X_{i}-\overline{x})^{2}\) \\ \hline Skewness & \(\gamma=\frac{1}{n}\sum_{i=1}^{n}\frac{(X_{i}-\overline{x})^{3}}{\sigma^{3}}\) \\ \hline Kurtosis & \(\kappa=\frac{1}{n}\sum_{i=1}^{n}\frac{(X_{i}-\overline{x})^{4}}{\sigma^{4}}\) \\ \hline Standard Deviation & \(\sigma=\sqrt{\frac{1}{n}\sum_{i=1}^{n}(X_{i}-\overline{x})^{2}}\) \\ \hline Max & \(\max\left\{X_{i}....Xn\right\}\) \\ \hline Min & \(\min\left\{X_{i}....Xn\right\}\) \\ \hline Range & \(\max\left\{X_{i}....Xn\right\}-\min\left\{X_{i}....Xn\right\}\) \\ \hline Mode & \(Mode\{X_{i}....Xn\}\) \\ \hline Median & \(Median\{X_{i}....Xn\}\) \\ \hline Dynamic Range & \(DR=X_{n}-\min\left\{X_{i}....Xn\right\}\) \\ \hline Root Mean-Square & \(\sqrt{\frac{1}{n}\sum_{i=1}^{n}X_{i}^{2}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Time-domain features extracted from inertial sensors based on statistics for road surface anomaly detection and classification [5; 18; 37; 56].