## 5 Feature Extraction
### Time-Frequency Domain Features
The above expression makes it possible to notice the similarities between the DWT and the CWT. The main differences are that the scale and shift parameters for the DWT are powers of two. This scaling and shift process is also known as dyadic sampling. This dyadic sampling allows the DWT to reduce its computational cost compared to the CWT. Figure 6 depicts the DWT's decomposition process or analysis stage in a graphical representation. This method is applied based on the convolution between the input signal \(x[n]\) and the low pass filter \(L\) that produces the approximation coefficients \(a^{j}[n]\) and the high pass filter \(H\) that generates the detail coefficients \(d^{j}[n]\) of the DWT [68]. This decomposition is also known as Decimated Discrete Wavelet Transform since the length of the signal is down-sampled in each of the levels. It is crucial to notice that the information is discarded by down-sampling the signal by 2, producing aliasing. The downsampling process does not produce a shift-invariance output since some samples are discarded. The above characteristics restrict how the filters must be selected. To cancel the effect of aliasing, the filter types used are Perfect Reconstruction Quadrature Mirror Filters [69]. In addition, by applying the DWT through filter banks, the computational complexity of the transform is \(O(N)\)[70]. Figure 6: Schematic representation of the analysis stage of the discrete wavelet transform. Time-frequency analysis has been used to extract features from inertial signals or to represent the inertial sensor signal that could be used as input into other algorithms, such as CNNs. For example, [PERSON] et al. [40] sought to optimize the use of the STFT for the detection and classification of road anomalies in combination with CNNs by varying the parameters of the STFT, such as window size, type of window, and overlap ratio. [PERSON]'s study also compared the STFT with the CWT by employing a Morse wavelet as the mother wavelet. When time-frequency methods are combined with CNNs, the time-frequency method must generate a two-dimensional representation from a 1D signal that can be used as input into the CNN. In this way, CNNs are expected to automatically extract the features from this 2D signal representation corresponding to the spectrogram of the STFT or the scalogram in the case of the CWT and DWT. Examples that have used the wavelet transform in road surface anomaly detection and classification can be found in the literature as described in Section 3. For example, [PERSON] et al. [31] used the CWT to estimate the size of road anomalies and identify them. The mother wavelet used in [PERSON]'s study was an order 3 Daubechies wavelet (DB3) following the recommendation of [PERSON] et al. [71]. Furthermore, In Ref. [18], a five-level decomposition Daubechies 2 wavelet was used for feature extraction. Moreover, [PERSON] et al. [26] proposed using DWT to extract characteristics that classify normal roads, potholes, and transverse roads; the wavelet used was a biorthogonal 3.1 with a decomposition of levels 1, 2, and 3. Other wavelets that were tested in [PERSON]'s study were the Haar, Symlets 5, Daubechies 6, and 10 wavelets. In addition, [PERSON] et al. [42] tested three wavelets to assess road anomalies; the selected wavelets were Morlet, Daubechies 6, and Daubechies 10. The features were extracted from scales 4 and 5. As can be appreciated, different types of wavelets have been proposed for feature engineering the inertial sensor signals. Table 8 shows a summary of the studies and the time-frequency methods used for feature extraction. In the same table, it can be appreciated that the Daubechies wavelet family and, thus, the DWT are common choices to perform feature extraction. Another widespread use of time-frequency analysis is denoising the acquired accelerometer and gyroscope data through a wavelet transform. For instance, the study of [PERSON] et al. [37] and [PERSON] et al.