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

DC and RMS Measurements Express VI

LabVIEW 8.6 FPGA Module Help
June 2008

NI Part Number:
371599D-01

»View Product Info

Owning Palette: FPGA Math & Analysis VIs

Installed With: FPGA Module

Calculates the DC (Mean) and/or RMS values of an input signal. You also can use this VI to calculate the intermediate Sum, Mean Square, or Square Sum values in order to save FPGA resources.

Details  

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Measurement Time SetupContains the following options:
  • Measurement time (s)—Specifies the measurement time (averaging time) in seconds for the Measurements you select. This Express VI always coerces the Measurement time (s) so it corresponds to an integer Actual number of measurement samples.
  • Expected sample rate (S/s)—Specifies the sample rate of the input signal. This Express VI uses the rate you specify to calculate the normalized notch frequency, which is Notch frequency/Expected sample rate.
    Caution  The actual sample rate is specified elsewhere in the application. If the sample rate changes, you must change the Expected sample rate in this VI. Otherwise, this VI might not behave as expected.
  • Actual number of measurement samples—Specifies the number of samples used to calculate the Measurements you select. If you want to save resources on the FPGA, enter a value that is a power of two for the Actual number of measurement samples.
WindowingContains the following option:
  • Apply Hanning window—Specifies whether to apply a Hanning window to the input signal before calculating the measurement results. Selecting this option can reduce spectral leakage and achieve more accurate and stable results if the input signal contains periodic components. If you select this option, you cannot select the Square Sum measurement.
MeasurementsContains the following options:
  • DC (Mean)—Specifies whether to return the DC value of the input signal.
  • Sum—Specifies whether to return the sum of the input samples.
  • RMS—Specifies whether to return the RMS (Root Mean Square) value of the input signal.
  • Mean Square—Specifies whether to return the mean value of the squared input samples.
  • Square Sum—Specifies whether to return the sum of the squared input samples. You cannot select this option if you place a checkmark in the Apply Hanning window checkbox.

Block Diagram Inputs

ParameterDescription
resetResets the measurement process if TRUE.
input dataSpecifies the input signal to measure. input data is a fixed-point number or integer with a maximum word length of 32 bits.

Block Diagram Outputs

ParameterDescription
results validSpecifies whether this Express VI returns valid measurement results. The output is TRUE once for every Actual number of measurement samples call to the VI. If TRUE, the values this Express VI returns are valid. If FALSE, the values this Express VI returns are equal to zero.
DC resultReturns the DC value of the input signal when results valid is TRUE.
Sum resultReturns the sum of the input samples when results valid is TRUE.
RMS resultReturns the RMS (Root Mean Square) value of the input signal when results valid is TRUE.
Mean Square resultReturns the mean value of the squared input samples when results valid is TRUE.
Square Sum resultReturns the sum of the squared input samples when results valid is TRUE.

DC and RMS Measurements Details

The DC and RMS Express VI can calculate the DC and RMS values of an input signal. However, some of the operations for the calculation require significant FPGA resources. You can save FPGA resources by splitting the operations into two groups that run on the FPGA VI and the host VI, respectively. In the following calculations, you can perform the operations in bold in the host VI.

DC = Sum/Actual number of measurement samples

RMS = sqrt(Mean square)

RMS = sqrt(Square Sum/Actual number of measurement samples)

You also can save FPGA resources if Actual number of measurement samples is a power of two.

DC and RMS measurements contain common error sources.

Refer to the Developer Zone for more information about the accuracy of the DC and RMS Measurements VI.


Resources


 

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