Download Help (Windows Only) |

**Owning Palette:** Time Frequency Spectrogram VIs

**Requires:** Advanced Signal Processing Toolkit

Computes the discrete Wigner-Ville Distribution (WVD) of **signal**. Wire data to the **signal** input to determine the polymorphic instance to use or manually select the instance.

Use the pull-down menu to select an instance of this VI.

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.
| |||||

error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | |||||

analytic signal? specifies whether to convert the real input signal to the corresponding analytic signal. The default is TRUE. The analytic signal has no negative frequency components and has the same positive frequency components as the original signal. Converting the real input signal to the analytic signal can suppress the cross-term interference between the positive frequency components and the negative frequency components.
| |||||

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. |

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.
| |||||

error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | |||||

analytic signal? specifies whether to convert the real input signal to the corresponding analytic signal. The default is TRUE. The analytic signal has no negative frequency components and has the same positive frequency components as the original signal. Converting the real input signal to the analytic signal can suppress the cross-term interference between the positive frequency components and the negative frequency components.
| |||||

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. |

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.
| |||||

error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | |||||

analytic signal? specifies whether to convert the real input signal to the corresponding analytic signal. The default is TRUE. The analytic signal has no negative frequency components and has the same positive frequency components as the original signal. Converting the real input signal to the analytic signal can suppress the cross-term interference between the positive frequency components and the negative frequency components.
| |||||

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. |

The WVD is one of the quadratic time-frequency representation methods. The WVD has better joint time-frequency resolution than the short-time Fourier transform (STFT) spectrogram, whose resolution the window effect limits. You can compute the WVD by applying the fast Fourier transform (FFT) on the time-dependent autocorrelation as shown in the following equation:

where is the time-dependent autocorrelation of the signal *s(t)* defined by the following equation:

The WVD has the best joint time-frequency resolution among all known quadratic joint time-frequency analysis methods. It also preserves many useful properties, such as the time marginal condition as follows:

and the frequency marginal condition as follows:

However, signal components with a different central time or central frequency generate cross-term interference in the WVD. The cross-term interference reduces the readability of the time-frequency representation. Because real-valued signals have symmetric positive and negative frequency components, cross-term interference exists between the positive frequency components and the negative frequency components in the WVD of real-valued signals. If you convert real-valued signals into analytic signals, this VI suppresses the cross-term interference between the positive frequency components and the negative frequency components because analytic signals have only the positive frequency components of real-valued signals.

You can consider the Cohen's class distributions (the Choi-Williams Distribution and the Cone-Shaped Distribution) and the STFT spectrogram as the smoothed versions of the WVD. These time-frequency distributions suppress the cross-term interference, but they also lose some useful properties of the WVD and produce a degraded time-frequency resolution. Use the WVD if you need a high time-frequency resolution and the frequency components of the signal are relatively simple. If harmonics or other types of complicated frequency components exist in the signal, use the Cohen's class distributions or Gabor spectrogram to suppress the cross-term interference.

The following illustration shows a signal composed of two sine waves with a Gaussian window envelope. The frequency of the first sine wave is 250 Hz. The frequency of the second sine wave is 125 Hz. The time centers of the first and second sine wave are 0.075 s and 0.18 s, respectively.

Ideally, the signal has only two atoms in the time-frequency domain. However, the WVD of the signal has cross-term interference, as shown in the following illustration, as a result of the algorithm of the WVD:

The cross-term interference is located midway between the time-frequency centers of the two sine waves and oscillates. The cross-term interference reduces the readability of the time frequency representation.

Refer to the book Introduction to Time-Frequency and Wavelet Transforms for more information about WVD.

Refer to the following VIs for examples of using the TFA Wigner-Ville Distribution VI:

- Marginal Condition VI: labview\examples\Time Frequency Analysis\TFAFunctions
- Pseudo Wigner-Ville Distribution VI: labview\examples\Time Frequency Analysis\TFAFunctions

Helpful

Not Helpful