you are here:   / News & Insights / Engineering Advantage Blog / Random Data Analysis Part 6: The Short-Time Fourier Transform

Engineering Advantage

Random Data Analysis Part 6: The Short-Time Fourier Transform

FFT | CFD consulting
November 13, 2015 By: Jonathan Dudley

In my last post I discussed the accuracy of your Fast Fourier Transform (FFT) analysis.  In this post, I would like to discuss the inherent shortcomings of the FFT and introduce the reader to a potential work around.

When performing an FFT analysis, you can switch to and from the frequency domain revealing frequency content and amplitude information with ease. There is no information provided for the time history of a given amplitude or peak. youmay ask, is my dominant amplitude apparent for all time or does it reveal itself only intermittently? It is possible that mode switching occurs when the peak with the dominant amplitude switches frequencies as a function of time. Joint time-frequency analysis using Fourier transforms, given by Equation (1), provides information containing frequency, time, and amplitude allowing one to visualize the time-evolution of the frequency content.

The spectrograms for this approach are computed using a short time duration where z(t) is an applied window function. The time dependent input signal is partitioned into several disjointed or overlapped blocks by multiplying the signal with a specified window. The FFT is then applied to each block. The blocks occupy different time periods so the resulting STFT computes the spectral content of the input signal at each period. The STFT therefore represents the time-dependent power spectrum of the input signal. The steps for computing the STFT are as follows:

1. Choose a window function of finite length
2. Place the window on top of the signal at t = 0 [s]
3. Truncate the signal using this window
4. Compute the FFT of the truncated signal
5. Incrementally slide the window to the right
6. Repeat steps 3-5 until the end of the signal is reached

The resulting spectrogram (where the magnitude has been normalized) for the signal used in this series is provided in Figure 1(c) below. Bear in mind, that due to the uncertainty principle discussed above, a wide window will result in good frequency resolution but poor time resolution. Conversely, a narrow window will yield better time resolution at the expense of frequency resolution. Four discrete tones are still apparent (where the 5th tone and beyond are masked by the color scheme as their magnitudes are on the order of the broadband signal noise) and we can now see their magnitude as a function of time. It is apparent that Mode 3 is dominant for most of the time history but there are periods in time where this signal drops out (between 0.15 and 0.20 [s] for example) suggesting that mild mode switching may be apparent.

Figure 1: Illustration of the uniformly sampled raw signal, the corresponding FFT, and the STFT.

A well-known property of the Fourier transform pair   and   is the uncertainty principle which states the time duration of   and the frequency bandwidth are related by . This implies a longer time duration of the input signal will result in a smaller frequency bandwidth. Conversely, the larger the frequency bandwidth of the transformed input signal, the shorter the time duration of the input signal must also be true. This illustrates the tradeoff between the frequency resolution and time resolution when using this method. The precision of the transform is determined by the size of the selected window and is fixed for all frequencies.

A technique which allows the use of variable window sizes may be employed to overcome the time and frequency resolution tradeoff inherent with the STFT. This analysis is called Wavelet analysis and is a topic for future discussion. In the next blog of this series, I will discuss one more topic related to the FFT called Cross-Coherence analysis. If you have further experiences or questions please feel free to add a comment.