Computes the signal energy distribution in the joint time-frequency domain using the short-time Fourier transform (STFT) algorithm.

This VI performs a sliding FFT. This VI is similar to the STFT Spectrograms VI.

Note By default, reentrant execution is enabled in all Point By Point VIs.


icon

Inputs/Outputs

  • cbool.png initialize

    initialize, when TRUE, initializes the internal state of the VI.

  • cdbl.png x

    x is the time waveform.

  • ci32.png sample length

    sample length is the length of each set of incoming data. The VI performs computation on each set of data. The default is 100.

    sample length must be greater than 0.

  • ci32.png time increment

    time increment is the number of samples needed to shift the sliding window. The default is 1.

    When you increase time increment, you decrease computation time and reduce memory requirements, but you reduce time-domain resolution. When you decrease time increment, you improve time-domain resolution, but you increase computation time and memory requirements.

  • ci32.png window length

    window length is the actual length of the selected window. The default is 50.

    It corresponds to the number of samples used in calculating the Fourier transform.

  • ci32.png window selector

    window selector determines the type of analysis window the VI uses to compute the spectrogram.

    0Hanning (default)
    1Hamming
    2Blackman
    3Exact Blackman
    4Blackman Harris
  • i2ddbl.png STFT Spectrogram {X}

    STFT Spectrogram {X} is a 2D array that describes the time waveform energy distribution in the joint time-frequency domain.

    The number of rows, time axis, in STFT Spectrogram {X} is equal to the number of elements in the time waveform divided by time increment and then rounded up. The number of columns, frequency axis, in STFT Spectrogram {X} is equal to (window length/2) + 1.

  • ii32.png error

    error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Signal Processing\Point by Point\Moving STFT PtByPt.vi