Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Spectral Measurements (Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Performs FFT-based spectral measurements, such as the averaged magnitude spectrum, power spectrum, and phase spectrum on a signal.

Details  Examples

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Spectral MeasurementContains the following options:
  • Magnitude (peak)—Measures the spectrum and displays the results in terms of peak amplitude. You typically use this measurement with more advanced measurements that require magnitude and phase information. The magnitude of the spectrum is measured in peak values. For example, a sine tone of amplitude A yields a magnitude spectral value of A at the sine tone frequency. You can unwrap the phase spectrum or convert it from radians to degrees by setting Phase to Unwrap phase or Convert to degree, respectively. If you place a checkmark in the Averaging checkbox, the phase of the spectrum is zero for averaging.
  • Magnitude (RMS)—Measures the spectrum and displays the results in terms of root-mean-square (RMS). You typically use this measurement with more advanced measurements that require magnitude and phase information. The magnitude of the spectrum is measured in RMS values. For example, a sine tone of amplitude A yields a magnitude spectral value of 0.707*A at the sine tone frequency. You can unwrap the phase spectrum or convert it from radians to degrees by setting Phase to Unwrap phase or Convert to degree, respectively. If you place a checkmark in the Averaging checkbox, the phase of the spectrum is zero for averaging.
  • Power spectrum—Measures the spectrum and displays the results in terms of power. All phase information is lost in the computation. You typically use this measurement to examine the various frequency components of a signal. While averaging to compute a power spectrum does not reduce the unwanted noise in a system, averaging is useful because it provides a reliable statistical estimate of the level of random signals measured.
  • Power spectral density—Measures the spectrum and displays the results in terms of power spectral density (PSD). Power spectral density is a scaled version of Power spectrum, where the power present within each spectral bin is normalized by the frequency bin width. You typically use this measurement to examine the noise floor of a signal or the power in a specific frequency range. Normalizing the power spectrum by the bin width makes this measurement independent of the signal duration, or number of samples.
ResultContains the following options:
  • Linear—Returns the results in terms of the original units.
  • dB—Returns the results in terms of decibels (dB).
WindowSpecifies the window to apply to the signal.
  • None does not apply a window to Signals.
  • Hanning applies a Hanning window to Signals.
  • Hamming applies a Hamming window to Signals.
  • Blackman-Harris applies a Blackman-Harris window to Signals.
  • Exact Blackman applies an exact Blackman window to Signals.
  • Blackman applies a Blackman window to Signals.
  • Flat Top applies a Flat Top window to Signals.
  • 4 Term B-Harris applies a Four Term Blackman-Harris window to Signals.
  • 7 Term B-Harris applies a Seven Term Blackman-Harris window to Signals.
  • Low Sidelobe applies a Low Sidelobe window to Signals.
Refer to the Scaled Time Domain Window VI for information about coefficients and window parameters for each window type.
AveragingSpecifies if the Express VI performs averaging.
ModeContains the following options:
  • Vector—Computes the average of complex FFT spectrum quantities directly. Vector averaging eliminates noise from synchronous signals.
  • RMS—Averages the energy, or power, of the FFT spectrum of the signal.
  • Peak hold—Performs averaging at each frequency line separately, retaining peak levels from one FFT record to the next.
WeightingContains the following options:
  • Linear—Specifies linear averaging, which averages over the number of packets you specify in Number of Averages in a non-weighted manner.
  • Exponential—Specifies exponential averaging, which averages over the number of packets you specify in Number of Averages in a weighted manner. Exponential averaging gives the most recent packets more weighting in the average than older packets.
Number of AveragesSpecifies the number of packets to average. The default is 10.
Produce SpectrumContains the following options:
  • Every iteration—Returns the spectrum after every iteration of the Express VI.
  • Only when averaging complete—Returns the spectrum only after the Express VI gathers the number of packets you specify in Number of Averages.
PhaseContains the following options:
  • Unwrap phase—Enables phase unwrapping on the output phase.
  • Convert to degree—Returns the phase in degrees.
Windowed Input SignalDisplays the first channel of Signals. This graph displays the incoming signal with windowing applied. If you wire data to the Express VI and run it, Windowed Input Signal displays real data. If you close and reopen the Express VI, Windowed Input Signal displays sample data until you run the VI again.
Magnitude Result PreviewDisplays a preview of the magnitude measurement of the signal. If you wire data to the Express VI and run it, Magnitude Result Preview displays real data. If you close and reopen the Express VI, Magnitude Result Preview displays sample data until you run the VI again.
AveragingReturns TRUE when the number of averages completed equals or exceeds Number of Averages.

Block Diagram Inputs

ParameterDescription
SignalsContains the input signal or signals.
Restart AveragingSpecifies whether to restart the selected averaging process. The default is FALSE. When you call this Express VI for the first time, the averaging process starts automatically. This input appears only if you place a check in the Averaging checkbox.
error in (no error)Describes error conditions that occur before this VI or function runs.

Block Diagram Outputs

ParameterDescription
FFT - (RMS)Returns the FFT magnitude spectrum and displays the results in RMS units.
Power SpectrumReturns the FFT power spectrum and displays the results in RMS-squared units.
PSDReturns the FFT power spectral density and displays the results in RMS-squared per Hz units.
FFT - (Peak)Returns the FFT magnitude spectrum and displays the results in peak units.
PhaseReturns the FFT phase spectrum and displays the results in degrees or radians.
error outContains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.

Spectral Measurements Details

FFT-based spectral computations assume that the finite block of signal data represents one period of a periodic signal. The computed spectrum of this effective periodically extended signal shows energy spreading into frequencies that were not present in the original signal. To reduce this spectral leakage, use smoothing windows to taper the sharp transitions in the effective signal. You do not typically use windows if you can acquire an integer number of cycles of each frequency component measured or if you are analyzing noise spectra.

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

FFT Power Spectrum
FFT Spectrum (Real-Im)
FFT Power Spectral Density

Examples

Refer to the following VIs for examples of using the Spectral Measurements VI:

  • Graph Adapting to Attributes VI: labview\examples\general\graphs
  • Read Signal VI: labview\examples\general\templates\Load from File and Display
  • Basic Spectral Measurement VI: labview\examples\express
  • Spectrum Measurements VI: labview\examples\express
  • Filter VI: labview\examples\express

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit