Time Frequency Spectrogram Express VI

LabVIEW 2014 Advanced Signal Processing Toolkit Help

Edition Date: June 2014

Part Number: 372656C-01

»View Product Info
Download Help (Windows Only)

Owning Palette: Time Frequency Spectrogram VIs

Requires: Advanced Signal Processing Toolkit

Computes the quadratic joint time-frequency representation for the input signal. You can compute the short-time Fourier transform (STFT) spectrogram, the Gabor spectrogram, the adaptive spectrogram, the Wigner-Ville distribution, the Choi-Williams distribution, and the cone-shaped distribution.

Examples

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Data SourceSpecifies whether this Express VI reads data from a block diagram input terminal or from a file. From terminal specifies that this Express VI reads data from a block diagram input terminal. From file specifies that this Express VI reads data from a file. This Express VI can read data from waveform, WAV, or TXT files.
File Path ConfigurationContains the following options:
  • File path—Specifies and displays the path to the file from which this Express VI reads data. This option is available only when you select From file in the Data Source section.
  • Prompt to choose a file each time this VI runs—Specifies whether this Express VI displays a dialog box that prompts you to select a file each time this Express VI runs. This option is available only when you select the From file option in the Data Source section.
MethodSpecifies the method to compute the spectrogram of the input signal. The default is STFT Spectrogram. Other options include Gabor Spectrogram, Adaptive Spectrogram, Wigner-Ville Distribution, Choi-Williams Distribution, and Cone-Shaped Distribution.
TF Sampling InfoContains the following options:
  • 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. To avoid consuming too much memory, this Express VI limits the maximum Frequency bins to 2,048.
  • Time steps—Specifies the sampling period, in samples, along the time axis in the joint time-frequency domain. This Express VI coerces the value of Time steps so that no more than 2,048 rows exist in the spectrogram. If you select STFT Spectrogram in Method, you can consider Time steps as the step size to move the sliding window. The number of rows in the spectrogram equals the length of the signal segment you select divided by Time steps. If you specify a small value for Time steps, the spectrogram might be large, which requires a long computation time and more memory. If you need to use a smaller value for Time steps, use the sliders under the waveform graph to reduce the length of the signal segment for this Express VI to process.
Algorithm SettingsContains the following options:
  • Window type—Specifies the type of the sliding window. Window type is available only when you select STFT Spectrogram in the Method pull-down menu.
  • Window length—Specifies the length, in samples, of the sliding window and controls the relationship between the time resolution and the frequency resolution. A large window length creates a better frequency resolution but a poor time resolution. Window length is available only when you select STFT Spectrogram in the Method pull-down menu.
  • Reassigned—Specifies to perform reassignment for the spectrogram by moving the dispersive energy to its local center of gravity in the joint time-frequency domain. The reassignment can improve the readability of the spectrogram for some signals. Reassigned is available only when you select STFT Spectrogram in the Method pull-down menu.
  • Order—Specifies how this Express VI balances the time-frequency resolution and the cross-term interference of the Gabor spectrogram. Order must be greater than or equal to 0. Order is available only when you select Gabor Spectrogram in the Method pull-down menu. 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.
  • Gaussian window length—Specifies the length, in samples, of the Gaussian window 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. Gaussian window length is available only when you select Gabor Spectrogram in the Method pull-down menu. As the value of Gaussian window length increases, the frequency resolution increases, but the time resolution worsens. Gaussian window length determines the other parameters of the Gabor elementary functions. The number of carrier frequencies, N, of the Gabor elementary functions is half of Gaussian window length. The oversampling rate is 4, that is, the time steps, dM, of the Gabor elementary functions equals N4. The variance of the Gaussian envelope window equals dM×N(2).
  • Type—Specifies the type of the elementary function to use to represent the signal. Type is available only when you select Adaptive Spectrogram in the Method pull-down menu.
  • Number of terms—Specifies the maximum number of Gaussian chirplets or Gaussian pulses to represent the signal. Number of terms is available only when you select Adaptive Spectrogram in the Method pull-down menu.
  • Convert to analytic—Specifies to convert the real-valued input signal to the corresponding analytic signal. Convert to analytic is available only when you select Wigner-Ville Distribution, Choi-Williams Distribution, or Cone-Shaped Distribution in the Method pull-down menu. The analytic signal has no negative frequency components and has the same positive frequency components as the original signal. Converting to the analytic signal can suppress the cross-term interference between the positive frequency components and the negative frequency components.
  • Alpha—Controls the relationship between resolution and cross-term interference. Alpha must be greater than or equal to 0. Alpha is available only when you select Choi-Williams Distribution or Cone-Shaped Distribution in Method. Increasing Alpha suppresses the cross-term interference better but reduces the time-frequency resolution.
Data Type and Sampling RateContains the following options:
  • Data type—Specifies the data type of the input signal. Data type is available only when you select From terminal in Data Source. When you select From file in Data Source, this Express VI determines the type of input signal based on the contents of the file.
  • Sampling rate—Specifies the sampling rate of the input signal in hertz. Sampling rate must be greater than 0, or this Express VI sets Sampling rate to 1 automatically. Sampling rate is available only when the input signal is a real or complex data type.
Spectrogram, Waveform, and Power SpectrumDisplays the time-frequency representation in the upper graph and the time-domain signal in the lower graph. Contains the following options:
  • dB—Specifies whether this Express VI displays the spectrogram in decibels.
  • Auto Z scale—Specifies to adjust the Z-Scale automatically.
  • Spectrogram—Displays the spectrogram.
  • Time Waveform—Displays the signal to process.
  • Power Spectrum—Displays the power spectrum.
  • Slide bar—Specifies the signal segment of interest. You can move the sliders to determine the length of the signal segment, and you can move the gray bar to slide the segment. A large segment length requires a long computation time and more memory. This Express VI limits the segment length so that no more than 2,048 rows exist in the spectrogram.

Block Diagram Inputs

ParameterDescription
error in (no error)Describes error conditions that occur before this node runs.
SignalSpecifies the block diagram terminal of the signal you want to load. This input is available only if you select the From terminal option in the Data Source section.
File pathSpecifies the file path of the data you want to load. This input is available only when you select the From file option in the Data Source section.
StartSpecifies the start index, in samples, of the processed part of Signal.

Block Diagram Outputs

ParameterDescription
dBSpecifies whether this Express VI displays the spectrogram in decibels.
error outContains error information. This output provides standard error out functionality.
LengthReturns the actual length of the processed signal.
Scale InfoReturns the time scale and the frequency scale information of the time-frequency representation. Use the TFA Get Time and Freq Scale Info VI to return detailed information about the time scale and the frequency scale.
SpectrogramReturns the quadratic time-frequency representation of the signal. Each row corresponds to the instantaneous power spectrum at a certain time.

This Express VI operates similarly to the following VIs and functions:

TFA STFT Spectrogram
TFA Fast Gabor Spectrogram
TFA Adaptive Spectrogram
TFA Wigner-Ville Distribution
TFA Choi-Williams Distribution
TFA Cone-Shaped Distribution

Examples

Refer to the following VIs for examples of using the Time Frequency Spectrogram Express VI:

  • The Need for JTFA VI: labview\examples\Time Frequency Analysis\TFAGettingStarted
  • Quadratic JTFA Method VI: labview\examples\Time Frequency Analysis\TFAGettingStarted
  • Heart Sound TFA VI: labview\examples\Time Frequency Analysis\TFAApplications
  • Cross Term VI: labview\examples\Time Frequency Analysis\TFAGettingStarted

WAS THIS ARTICLE HELPFUL?

Not Helpful