# A Survey on Change Detection and Time Series Analysis with Applications
## 3 Decomposition Methods into Time-Frequency Domain
### Short-Time Fourier Transform (STFT)  
In order to measure the frequency variation of sounds, [PERSON] introduced STFT, which is one way of analyzing piece-wise stationary and equally spaced time series [28]. He basically endeavored to obtain the spectrum of a time series in short-time intervals (or within a window that translates or slides through the whole time series) rather than considering the entire time series at once. Mathematically, let \(f\) be a square-integrable function on \(\mathbb{R}\) (e.g., an energy signal), and \(w\) be a normalized (\(\|w\|^{2}=\int_{-\infty}^{\infty}|w(t)|^{2}\;\mathrm{d}t=1\)) real and symmetric (\(w(t)=w(-t)\)) window function (e.g., Hann or Gaussian). The continuous STFT is defined as  
\[\hat{f}(\tau,\omega)=\int_{-\infty}^{\infty}f(t)w(t-\tau)e^{-2\pi iwt}\; \mathrm{d}t, \tag{8}\]  
where \(w\) is centered at time \(\tau\), the translation parameter. The STFT energy density of \(f\) (spectrogram) is \(|\hat{f}(\tau,\omega)|^{2}\), which measures the energy of \(f\) in the time-frequency neighborhood of \((\tau,\omega)\)[1] (Chapter 4). For a time series, a spectrogram can be obtained by calculating \(|\hat{f}(\tau,\omega)|^{2}\) (in the summation form) for all pairs \((\tau,\omega)\).  
The rectangular boxes centered at \((\tau,\omega)\) with side lengths \(\sigma_{\tau}\) and \(\sigma_{\omega}\) (standard deviation) are illustrated in Figure 3, and they are called the Heisenberg boxes [1]. Resolution is referred to the side lengths of the Heisenberg boxes in the time-frequency domain--time or frequency support. In other words, resolution means the ability to resolve frequencies or times in a spectrogram. It is shown that \(\sigma_{\tau}\) and \(\sigma_{\omega}\) are independent of \(\tau\) and \(\omega\), and so STFT has the same resolution across the time-frequency domain, i.e., the area and the side lengths of the Heisenberg boxes do not change across the time-frequency domain, and the Heisenberg boxes do not rotate across the time-frequency domain [1]. If the selected window is wider, then \(\sigma_{\tau}\) is larger and \(\sigma_{\omega}\) is smaller, meaning that the spectrogram has poorer time resolution but better frequency resolution across the time-frequency domain (Figure 3a). Similarly, if the selected window is narrower, then \(\sigma_{\tau}\) is smaller and \(\sigma_{\omega}\) is larger, meaning that the spectrogram has better time resolution but poorer frequency resolution across the time-frequency domain (Figure 3b).  
Since in STFT the sinusoidal functions that do not complete an integer number of cycles within a window are not orthogonal, the segment of the time series within such window cannot be represented as a linear combination of these sinusoids properly, resulting in spectral leakages. Note that the STFT does not consider the correlation between the sinusoidal functions when they are not orthogonal within a window [1]. Using an appropriate window function, the segment of the time series within the window can be tapered to zero at both ends to prevent leakages. It is shown in [29] that if \(w\) is Gaussian, then the area of the Heisenberg box is minimum, a property that is similar to the least-squares principle and highly desirable (optimal). In STFT, the window length is fixed during translation in time, which is inappropriate for analyzing time series with components of high amplitude and frequency variability over time.