TFA Fast Gabor Spectrogram VI
- Mise à jour2023-02-21
- Temps de lecture : 15 minute(s)
TFA Fast Gabor Spectrogram VI
Owning Palette: Time Frequency Spectrogram VIs
Requires: Advanced Signal Processing Toolkit
Decomposes a signal as a linear combination of Gaussian Gabor elementary functions. After decomposing the signal, this VI adds the Wigner-Ville Distribution (WVD) and cross WVD of the elementary functions to compute the quadratic time-frequency representation of signal. Wire data to the signal input to determine the polymorphic instance to use or manually select the instance.
TFA Fast Gabor Spectrogram (Waveform)

![]() |
zoom settings specifies the frequency zoom factor and the zoom range.
| ||||||
![]() |
order specifies how this VI balances the time-frequency resolution and the cross-term interference of the Gabor spectrogram. order must be greater than or equal to 0, or this VI sets order to 0 automatically. As order increases, the time-frequency resolution of the Gabor spectrogram improves, but the spectrogram will have more cross-term interference. Usually, 2, 3, or 4 is an appropriate value for order. | ||||||
![]() |
signal specifies the input signal. | ||||||
![]() |
time-frequency sampling info specifies the density to use to sample the signal in the joint time-frequency domain and defines the size of the resulting 2D time-frequency array.
| ||||||
![]() |
Gaussian window length specifies the length of the Gaussian window, in samples, of the Gabor elementary functions and controls the relationship between the time resolution and the frequency resolution of the spectrogram. Gaussian window length must be a power of 2 and greater than or equal to 8. As the value of Gaussian window length increases, the frequency resolution increases, but the time resolution decreases. Gaussian window length determines the other parameters of the Gabor elementary functions. The number of frequencies of Gabor elementary functions, or N (frequency bins), of Gabor elementary functions is half of Gaussian window length. The oversampling rate is 4, that is, the dM (time steps) of the Gabor elementary functions equals N (frequency bins)/4. The variance of the Gaussian envelope window equals dM (time steps)×N (frequency bins)/(2 ).
|
||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||
![]() |
spectrogram returns the quadratic time-frequency representation of the signal. Each row corresponds to the instantaneous power spectrum at a certain time. Use the TFA Spectrogram Indicator to display the spectrogram on an intensity graph. You can save the time-dependent 2D array to a text file for use in another software environment. The resulting text file contains only Z values and does not retain the time axis information or the frequency axis information. You can use the TFA Get Time and Freq Scale Info VI to compute the time scale information and the frequency scale information of the time-frequency representation. | ||||||
![]() |
scale info returns the time scale and the frequency scale information of the time-frequency representation, including the time offset, the time interval between every two contiguous rows, the frequency offset, and the frequency interval between every two contiguous columns of spectrogram. Use the TFA Get Time and Freq Scale Info VI to return detailed information about the time scale and the frequency scale. | ||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
TFA Fast Gabor Spectrogram (Real)

![]() |
zoom settings specifies the frequency zoom factor and the zoom range.
| ||||||
![]() |
order specifies how this VI balances the time-frequency resolution and the cross-term interference of the Gabor spectrogram. order must be greater than or equal to 0, or this VI sets order to 0 automatically. As order increases, the time-frequency resolution of the Gabor spectrogram improves, but the spectrogram will have more cross-term interference. Usually, 2, 3, or 4 is an appropriate value for order. | ||||||
![]() |
signal specifies the input signal. | ||||||
![]() |
time-frequency sampling info specifies the density to use to sample the signal in the joint time-frequency domain and defines the size of the resulting 2D time-frequency array.
| ||||||
![]() |
Gaussian window length specifies the length of the Gaussian window, in samples, of the Gabor elementary functions and controls the relationship between the time resolution and the frequency resolution of the spectrogram. Gaussian window length must be a power of 2 and greater than or equal to 8. As the value of Gaussian window length increases, the frequency resolution increases, but the time resolution decreases. Gaussian window length determines the other parameters of the Gabor elementary functions. The number of frequencies of Gabor elementary functions, or N (frequency bins), of Gabor elementary functions is half of Gaussian window length. The oversampling rate is 4, that is, the dM (time steps) of the Gabor elementary functions equals N (frequency bins)/4. The variance of the Gaussian envelope window equals dM (time steps)×N (frequency bins)/(2 ).
|
||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||
![]() |
sampling rate specifies the sampling rate of signal in hertz. sampling rate must be greater than 0, or this VI sets sampling rate to 1 automatically. The default is 1. | ||||||
![]() |
spectrogram returns the quadratic time-frequency representation of the signal. Each row corresponds to the instantaneous power spectrum at a certain time. Use the TFA Spectrogram Indicator to display the spectrogram on an intensity graph. You can save the time-dependent 2D array to a text file for use in another software environment. The resulting text file contains only Z values and does not retain the time axis information or the frequency axis information. You can use the TFA Get Time and Freq Scale Info VI to compute the time scale information and the frequency scale information of the time-frequency representation. | ||||||
![]() |
scale info returns the time scale and the frequency scale information of the time-frequency representation, including the time offset, the time interval between every two contiguous rows, the frequency offset, and the frequency interval between every two contiguous columns of spectrogram. Use the TFA Get Time and Freq Scale Info VI to return detailed information about the time scale and the frequency scale. | ||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
TFA Fast Gabor Spectrogram (Complex)

![]() |
zoom settings specifies the frequency zoom factor and the zoom range.
| ||||||
![]() |
order specifies how this VI balances the time-frequency resolution and the cross-term interference of the Gabor spectrogram. order must be greater than or equal to 0, or this VI sets order to 0 automatically. As order increases, the time-frequency resolution of the Gabor spectrogram improves, but the spectrogram will have more cross-term interference. Usually, 2, 3, or 4 is an appropriate value for order. | ||||||
![]() |
signal specifies the input signal. | ||||||
![]() |
time-frequency sampling info specifies the density to use to sample the signal in the joint time-frequency domain and defines the size of the resulting 2D time-frequency array.
| ||||||
![]() |
Gaussian window length specifies the length of the Gaussian window, in samples, of the Gabor elementary functions and controls the relationship between the time resolution and the frequency resolution of the spectrogram. Gaussian window length must be a power of 2 and greater than or equal to 8. As the value of Gaussian window length increases, the frequency resolution increases, but the time resolution decreases. Gaussian window length determines the other parameters of the Gabor elementary functions. The number of frequencies of Gabor elementary functions, or N (frequency bins), of Gabor elementary functions is half of Gaussian window length. The oversampling rate is 4, that is, the dM (time steps) of the Gabor elementary functions equals N (frequency bins)/4. The variance of the Gaussian envelope window equals dM (time steps)×N (frequency bins)/(2 ).
|
||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||
![]() |
sampling rate specifies the sampling rate of signal in hertz. sampling rate must be greater than 0, or this VI sets sampling rate to 1 automatically. The default is 1. | ||||||
![]() |
spectrogram returns the quadratic time-frequency representation of the signal. Each row corresponds to the instantaneous power spectrum at a certain time. Use the TFA Spectrogram Indicator to display the spectrogram on an intensity graph. You can save the time-dependent 2D array to a text file for use in another software environment. The resulting text file contains only Z values and does not retain the time axis information or the frequency axis information. You can use the TFA Get Time and Freq Scale Info VI to compute the time scale information and the frequency scale information of the time-frequency representation. | ||||||
![]() |
scale info returns the time scale and the frequency scale information of the time-frequency representation, including the time offset, the time interval between every two contiguous rows, the frequency offset, and the frequency interval between every two contiguous columns of spectrogram. Use the TFA Get Time and Freq Scale Info VI to return detailed information about the time scale and the frequency scale. | ||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
TFA Fast Gabor Spectrogram Details
The Gabor spectrogram has better time-frequency resolution than the STFT spectrogram method and less cross-term interference than the WVD method. The Gabor spectrogram also allows control of the tradeoff between the cross-term suppression and the joint time-frequency resolution.
The Gabor spectrogram also is called the Gabor expansion-based spectrogram. You can use the Gabor expansion to represent the signal as the linear combination of the time-frequency elementary functions, as shown in the following equation:

where hm,n(i) is the elementary function, and Cm,n is the Gabor coefficients.
After you represent the signal as the linear combination of the time-frequency elementary function, you can use the following equation to compute the WVD of the signal:

Thus, any two elementary functions generate the cross-term interferences. Instead of computing the WVD for any pair of elementary functions, you can select a subset for the computation based on the Manhattan distance
between the pair of
and
. The resulting time-frequency distribution is the Gabor spectrogram, as defined in the following equation:
where D denotes the order. The joint time-frequency resolution and the cross-term interference of the Gabor spectrogram increases with order. When order is 0, the Gabor spectrogram is non-negative and is similar to the STFT spectrogram. As order approaches infinity, the Gabor spectrogram converges to the WVD.
Refer to the book Introduction to Time-Frequency and Wavelet Transforms for more information about the Gabor expansion and transform.
Example
Refer to the Liquefaction Detection VI in the labview\examples\Time Frequency Analysis\TFAApplications directory for an example of using the TFA Fast Gabor Spectrogram VI.




).





