# A Survey on Change Detection and Time Series Analysis with Applications
## 3 Decomposition Methods into Time-Frequency Domain
### Continuous Wavelet Transform (CWT)  
A wavelet is a wave-like function whose values start from zero and end at zero after a number of oscillations, a very useful function in signal and image processing [30; 31; 32]. A wavelet can be visualized as a short oscillation like one recorded by a seismograph or heart monitor. The CWT maps an equally spaced time series into wavelets to construct a time-frequency representation of the time series, providing a good time and frequency determination. In CWT, the dilation of a (mother) wavelet defines a window, and a scalogram in the time-scale domain is calculated instead of a spectrogram in the time-frequency domain. The scalogram is a three-dimensional analog of the wavelet transform representation in which the x-axis, y-axis, and z-axis represent time, scale, and absolute value of Fourier coefficients at particular times, respectively. The spectrogram is slightly different from the scalogram in that its y-axis values represent frequencies rather than scales, and thus is more appropriate to study the periodicity of various components in the time series. One may convert the scalogram to a spectrogram using several approaches, such as conversion based on the center frequencies of the scales [33]. In CWT, the window length decreases as frequency increases, allowing the detection of short-time or short-duration components of high frequencies, and vice versa: the window length increases as frequency decreases, allowing the detection of the low-frequency components in the time series. Mathematically, assume that the functions  
\[\psi_{\tau,s}(t)=\frac{1}{\sqrt{s}}\psi\left(\frac{t-\tau}{s}\right), \tag{9}\]  
are a family of (daughter) wavelets that are generated by dilating \(\psi\) (mother wavelet) with a scale parameter \(s>0\) and translating it by \(\tau\), that is, time or position or location. For theoretical reasons, one may choose a special wavelet \(\psi\) (mother wavelet) from the space of all square-integrable functions over \(\mathbb{R}\) such that it is normalized, i.e., \(\|\psi\|^{2}=\int_{-\infty}^{\infty}|\psi(\eta)|^{2}\,\mathrm{d}\eta=1\) and integrates to zero, i.e., \(\int_{-\infty}^{\infty}\psi(\eta)\mathrm{d}\eta=0\)[34; 35]. The wavelet transform of a square-integrable function \(f\) on \(\mathbb{R}\) (e.g., an energy signal) at time \(\tau\) and scale \(s\) is then defined as  
\[\hat{f}_{\psi}(\tau,s)=\left\langle f,\psi_{\tau,s}\right\rangle=\frac{1}{ \sqrt{s}}\int_{-\infty}^{\infty}f(t)\psi^{*}\left(\frac{t-\tau}{s}\right)\, \mathrm{d}t, \tag{10}\]  
where \(\psi^{*}\) is the complex conjugate of \(\psi\)[1] (Chapter 4). Therefore, the values of time \(\tau\) and scale \(s\) as well as the choice of wavelet affect the values of the coefficients \(\hat{f}_{\psi}(\tau,s)\). An analytic wavelet transform defines a local time-frequency energy density \(|\hat{f}_{\psi}(\tau,s)|^{2}\), which measures the energy of \(f\) in the Heisenberg box of each wavelet \(\psi_{\tau,s}\). This energy density is called a scalogram [1] (Chapter 4). The Fourier transform in Equation (1) is a special case of the CWT in Equation (10) when \(\psi_{\tau,s}(t)=e^{2\pi i\omega t}\) and \(f\) is absolutely integrable, ignoring scale \(s\). Figure 3: A few adjacent Heisenberg boxes of the STFT (**a,b**), and CWT (**c**). The CWT in MATLAB operates on a discrete time series, where the integral in Equation (10) is implemented by a simple summation over the elements [36]. More precisely, suppose that \(\mathbf{f}=\big{[}f(t_{1}),\dots,f(t_{n})\big{]}\) is an equally spaced time series of \(n\) data points, where \(t_{\ell}=\ell/n\) (\(\ell=1,\dots,n\)). The CWT coefficients are calculated as  
\[\hat{f}_{\psi}(t_{j},s)=\frac{1}{\sqrt{ns}}\sum_{\ell=1}^{n}f(t_{\ell})\psi^{*} \bigg{(}\frac{t_{\ell}-t_{j}}{s}\bigg{)}, \tag{11}\]  
where \(\psi^{*}\) is the complex conjugate of \(\psi\), and the wavelet is dilated in time by varying its scale (s) and normalizing it to have unit energy [37; 38].