Computes the short-time Fourier transform (STFT)-based spectrogram of signal. Wire data to the signal input to determine the polymorphic instance to use or manually select the instance.


icon

Inputs/Outputs

  • cbool.png reassigned? (F)

    reassigned? specifies whether to reassign the spectrogram by moving dispersed energy to the local center of gravity in the joint time-frequency domain. The reassignment can improve the readability of the spectrogram. The default is FALSE.

  • cu16.png extension

    extension specifies the method to use to pad data at the borders of the input signal to lessen discontinuity. The extension length is half the window length.

  • c1ddbl.png signal

    signal specifies the input signal.

  • cnclst.png time-frequency sampling info

    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.

  • ci32.png time steps

    time steps specifies the sampling period, in samples, along the time axis in the joint time-frequency domain. The default is -1, which specifies that this VI adjusts time steps automatically so that no more than 512 rows exist in spectrogram.

  • ci32.png frequency bins

    frequency bins specifies the number of bins along the frequency axis to sample the signal in the joint time-frequency domain. frequency bins must be a power of 2 and greater than 0. The scale info output contains the actual sampling period in hertz along the frequency axis.

  • cnclst.png window info

    window info specifies the sliding window to use to compute the STFT and defines the resolution of the resulting time-frequency representation. Use the user defined window input to specify a customized window.

  • ci32.png type

    type specifies the type of the sliding window.

  • ci32.png length

    length specifies the length, in samples, of the sliding window. The default is -1, which indicates that this VI sets the window length to four times time steps. Thus, the overlap between sliding windows is 75 percent. However, this VI wraps the default window length to 64 when time steps is less than 16.

  • cerrcodeclst.png error in (no error)

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

  • c1ddbl.png user defined window

    user defined window specifies the coefficients of the sliding window to use to compute the STFT. If you specify a value for user defined window, this VI ignores the settings in the window info input.

  • cdbl.png sampling rate

    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.

  • i2ddbl.png spectrogram

    spectrogram returns the quadratic time-frequency representation of the signal. Each row corresponds to the instantaneous power spectrum at a certain time.

  • ifxdt.png scale info

    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.

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.

  • TFA STFT Spectrogram Details

    The STFT spectrogram is the square of the magnitude of the resulting coefficients from the STFT. The STFT spectrogram is non-negative. All the values of the STFT spectrogram are positive. The other time-frequency representations, such as the Wigner-Ville Distribution, the Choi-Williams Distribution, the Cone-Shaped Distribution, and the Gabor spectrogram, can be negative.

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

    Examples

    Refer to the following VIs for examples of using the TFA STFT Spectrogram VI:

    • Color Tables for Displaying the Spectrogram VI: labview\examples\Time Frequency Analysis\TFAGettingStarted
    • Group Delay VI: labview\examples\Time Frequency Analysis\TFAFunctions
    • Mean Instantaneous Frequency or Bandwidth (MIF or MIB) VI: labview\examples\Time Frequency Analysis\TFAFunctions
    • Time-Frequency Resolution VI: labview\examples\Time Frequency Analysis\TFAGettingStarted