## 2 Background Theory  
### Continuous Wavelet Transform  
The purpose of CWT of the raw vibrational signal is to preprocess raw vibration in the time-frequency domain and convert a 1D signal to a 2D image, as the input of the CAE model. The wavelet transform is widely used to process non-stationary signals over many different frequencies. The wavelet transform can analyze a localized area of a large signal without losing the spectral information contained therein. Therefore, the wavelet transform can reveal some hidden aspects of the signal that other techniques fail to detect. This property can particularly be employed to identify the damage (crack) or fault of a component that evolves during the time. There are two main trends in how wavelet transforms are used, the CWT and the discrete wavelet transform. Both Fourier transform and CWT use inner products to measure the similarity between a signal and an analytic function. In the Fourier transform, the analytic function is complex exponentials (\(e^{-i\omega t}\)) and in the CWT, the analytic function is a mother wavelet function, \(\psi(t)\). The mother wavelet, \(\psi\in L^{2}(R)\), is a function of finite length and zero average; \(L^{2}(R)\) is the space of square-integrable complex functions [32]. The CWT compares the signal to shifted and compressed or stretched versions of the mother wavelet function. Stretching or compressing a function is collectively referred to as dilation or scaling and corresponds to the physical notion of scale. The family of time-scale waveform is obtained by shifting and scaling the mother wavelet, which can be expressed as  
\[\psi_{a,\;b}(t)\;=\;\frac{1}{\sqrt{a}}\;\psi\left(\frac{t-b}{a}\right) \tag{1}\]  
By comparing the signal with the mother wavelet function at various scales and positions, we obtained two continuous variables, \(a\) and \(b\); \(a\) is the dilation and \(b\) is the translational parameter variable. For the given signal, \(f(t)\), wavelet coefficient \(\omega(a,\;b)\) can be represented as  
\[\omega(a,\;b)\;=\;\int_{-\infty}^{+\infty}f(t)\frac{1}{\sqrt{a}}\;\psi^{*} \left(\frac{t-b}{a}\right)dt \tag{2}\]  
where \(\psi^{*}\) denotes the complex conjunction of \(\psi\).  
Since selecting of a mother wavelet function is application-dependent, the selection of the appropriate function is the first and most important step in the wavelet analysis. As a rule of thumb, the most appropriate mother wavelet is a function that has more similarity with the signal. Although there is no standard or general method to select mother wavelet, the shape matching by visual inspection is commonly used to select the appropriate mother wavelet function for the signal. For this study, on the basis of the visual inspection and the result of the previous studies [32; 38], we selected Morlet wavelet in order to extract image features from the raw vibration signal. The Morlet function is a Gaussian function modulated by complex exponential, defined as  
\[\psi(t)\;=e^{-t^{2}/2}e^{i\omega_{0}t} \tag{3}\]where \(\omega_{o}\) depends on the sampling frequency and usually is taken as 5 [39]. For wavelet transform of a real signal, the real part of the Morlet function is employed as the mother wavelet:  
\[\psi(t)\ =e^{-t^{2}/2}\cos(5t) \tag{4}\]