Owning Palette: Waveform Measurements VIs
Requires: Full Development System
Takes a signal in and performs a full harmonic analysis, including measuring the fundamental frequency tone and harmonics, and returning the fundamental frequency, all harmonic amplitude levels, and the total harmonic distortion (THD). Wire data to the signal in 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.
  Add to the block diagram | 
  Find on the palette | 

![]()  | 
stop search at Nyquist should be set to TRUE (default) to include only frequencies less than the Nyquist frequency, or half the sampling rate, in the harmonic search. When set to FALSE, this VI continues searching the frequency domain beyond Nyquist by assuming that these higher frequency components have aliased according to the following equation.
 aliased f = Fs – (f modulo Fs) whereFs = 1/dt = sampling rate.  | 
||||||||||||
![]()  | 
signal in is the input time-domain signal. | ||||||||||||
![]()  | 
export mode selects the source of the signal and spectrum to export to exported signals. 
  | 
||||||||||||
![]()  | 
highest harmonic controls the highest harmonic, including the fundamental tone, used for the harmonic analysis. For example, for 3rd harmonic analysis, this control should be set to 3 to measure the fundamental, second, and third harmonic. | ||||||||||||
![]()  | 
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||
![]()  | 
advanced search controls the frequency domain search area, which is the center frequency and width, used for finding the fundamental frequency tone of the signal. 
  | ||||||||||||
![]()  | 
exported signals contains the signals specified by export mode. 
  | ||||||||||||
![]()  | 
detected fundamental frequency contains the detected fundamental frequency resulting from searching the frequency domain. Use advanced search to set the frequency search range. All harmonics are measured at integer multiples of this fundamental frequency. | ||||||||||||
![]()  | 
THD contains the measured total harmonic distortion up to and including the highest harmonic. THD is defined as the ratio of the RMS sum of the harmonics to the amplitude of the fundamental tone. To compute THD as a percentage, you must multiply it by 100. | ||||||||||||
![]()  | 
components level contains the array of amplitudes of the measured harmonics in volts if the signal in is in volts. The array index is the harmonic number including 0 (DC), 1 (fundamental), 2 (second harmonic),... n (nth harmonic), up to and including the highest harmonic. | ||||||||||||
![]()  | 
error out contains error information. This output provides standard error out functionality. | ||||||||||||
![]()  | 
measurement info returns information about your measurement, mainly warnings for inconsistencies in your input signal. 
  | 
The multichannel waveform array input should be the result of a multichannel acquisition where each element of the array of waveforms is a distinct and separate channel of data.

![]()  | 
stop search at Nyquist should be set to TRUE (default) to include only frequencies less than the Nyquist frequency, or half the sampling rate, in the harmonic search. When set to FALSE, this VI continues searching the frequency domain beyond Nyquist by assuming that these higher frequency components have aliased according to the following equation.
 aliased f = Fs – (f modulo Fs) whereFs = 1/dt = sampling rate.  | 
||||||||||||
![]()  | 
signals in is the array of input time-domain signals. | ||||||||||||
![]()  | 
export mode selects the source of the signal and spectrum to export to exported signals. 
  | 
||||||||||||
![]()  | 
highest harmonic controls the highest harmonic, including the fundamental tone, used for the harmonic analysis. For example, for 3rd harmonic analysis, this control should be set to 3 to measure the fundamental, second, and third harmonic. | ||||||||||||
![]()  | 
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||
![]()  | 
advanced search controls the frequency domain search area, which is the center frequency and width, used for finding the fundamental frequency tone of the signal. 
  | ||||||||||||
![]()  | 
exported signals is an array of exported signals. 
  | ||||||||||||
![]()  | 
detected fundamental frequencies is an array containing the detected fundamental frequency resulting from searching the frequency domain for each waveform. | ||||||||||||
![]()  | 
THD returns an array containing the measured total harmonic distortion for each waveform. | ||||||||||||
![]()  | 
components levels is a cluster containing an array of amplitudes of the measured harmonics for each waveform. 
  | ||||||||||||
![]()  | 
error out contains error information. This output provides standard error out functionality. | ||||||||||||
![]()  | 
measurements info is an array that returns information about your measurement, mainly warnings for inconsistencies in your input signal. 
  | 
This VI is designed to process a single channel or multiple channels continuously, typically from within a For Loop or a While Loop.
Refer to the Multitone with Amplitudes and Phases VI in the labview\examples\Signal Processing\Waveform Measurements directory for an example of using the Harmonic Distortion Analyzer VI.