The Short-Time Fourier Transform (STFT) in the NI Sound and Vibration Measurement Suite can compute multiple Fourier transforms on a time-domain signal with or without overlapping.
For example, suppose you analyze a waveform containing 10 s of data acquired at 51.2 kS/s. The signal is a chirp signal with the following attributes:
The following front panel shows the signal corresponding to the first 200 ms of the waveform.
The following front panel shows the result of applying a baseband Fast Fourier Transform (FFT) on the entire waveform.
|Note No window is applied on the signal.|
The spectrum is flat from 10 Hz to 10 kHz. Only noise is measured at frequencies above 10 kHz. This measurement does not provide any information about how the frequency content of the signal changes with time. However, the STFT can reveal useful information about the time dependence of the frequency content.
Instead of computing a single FFT on the whole data set, you can divide the data set into smaller blocks and compute FFTs on these smaller data blocks. For example, divide the signal into 100 ms blocks and perform an FFT on each of the blocks with the SVT STFT vs Time VI.
Subdivide the time-domain signal by configuring the time segment control, as displayed in the following front panel.
Leave from [s] and to [s] each equal to –1.00 to ensure that the STFT computation uses all of the signal. In this example, the –1.00 setting in both from [s] and to [s] is equivalent to setting from [s] to 0 and to [s] to 10.
Create a 100 ms time increment by setting time increment to 100.00 and time increment units (%) to ms. The 100 ms time increment causes the SVT STFT vs Time VI to compute one FFT every 100 ms. Setting time increment is independent from selecting the FFT block size.
In addition to the time segment, you can adjust the FFT block size. For example, analyze a chirp signal with the following attributes:
The measurement is performed using the following settings:
Based on the sampling frequency of 51,200 Hz, a 1,024 sample FFT requires a 20 ms block of data, leading to a frequency resolution of 50 Hz.
Because the time increment is 100 ms and a 1,024 sample FFT requires only a 20 ms block, only one block out of five is used for computation. The following front panel shows the result obtained with a 1,024 sample FFT.
If you select an FFT block size of 4,096 samples, or 1,600 alias-free lines, the resolution improves, as illustrated in the following front panel.
However, the increased resolution comes with the expense of extra processing.
Overlapping is a method that uses a percentage of the previous data block to compute the FFT of the current data block. When combined with windowing, overlapping maximizes the use of the entire data set. If no overlapping is used, the part of the signal close to the window edges becomes greatly attenuated. The attenuation of the signal near the window edges might result in the loss of information in the region near the window edges.
|Note Set the desired overlapping rate by specifying % in the time increment units (%) control. No overlapping, or 0%, corresponds to a time increment of 100%. An overlapping of 75% corresponds to a time increment of 25%. An overlapping of 50% corresponds to a time increment of 50%, and so forth. The advantage of using the time increment control is that you can specify values greater than 100%. For example, a time increment of 200% corresponds to computing an FFT on every other block of data.|
The following front panel shows a 50% overlapping process.
The following front panel shows the resulting subdivisions when you use a 50% overlap and a Hamming window.
The following block diagram shows an example of using the SVT STFT vs Time VI.
This example uses the instance of the SVT STFT vs Time VI that produces a two-dimensional array that can be displayed directly on an SV Intensity Graph. Use the Colormap or Waterfall instance of this VI if you want to display results directly on a Colormap or a Waterfall Graph, respectively.
The previous example acquires 10 s of data at a sampling rate of 51.2 kHz. After scaling, the signal is sent to the SVT STFT vs Time VI. The result is displayed on an SV Intensity Graph, as shown in the following front panel.
|Note In the previous example, the x-scale range is 0 to 10 s. The y-scale range is 0 to 25,600 Hz. 25,600 Hz is the Nyquist frequency. You can adjust the z-scale so that only the relevant part of the signal is displayed. In other words, you can hide noise in the displayed signal by increasing the minimum limit of the z-scale.|