Butterworth Filter Express VI

LabVIEW 2018 FPGA Module Help


Edition Date: March 2018
Part Number: 371599P-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2016 FPGA Module Help
LabVIEW 2017 FPGA Module Help
LabVIEW 2018 FPGA Module Help
LabVIEW 2019 FPGA Module Help
LabVIEW 2020 FPGA Module Help

Owning Palette: FPGA Math & Analysis VIs and Functions

Requires: FPGA Module

Filters one or more input signals using a lowpass or highpass IIR Butterworth filter.

The filter can be of order 1, 2, or 4.

You can use the Butterworth Coefficients Express VI to generate the set of filter coefficients during run time.

Details  Examples

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Filter SpecificationsContains the following options:
  • Type—Specifies whether the filter type is Lowpass or Highpass.
  • Cutoff frequency (Hz)—Specifies the cutoff frequency of the filter. The allowable frequency range depends on the Expected sample rate you specify. The normalized cutoff frequency (Cutoff frequency/Expected sample rate) must be less than 0.5, which corresponds to the Nyquist frequency.
  • Expected sample rate (S/s)—Specifies the sample rate, in samples per second, of the input signal. This Express VI uses the rate you specify to calculate the normalized cutoff frequency, which is Cutoff frequency/Expected sample rate.
    Caution  The actual sample rate is specified elsewhere in the FPGA application. If the sample rate changes, you must change the Expected sample rate in this VI. Otherwise, this VI might not behave as expected.
  • Order—Specifies the filter order. You can select 1 (first-order), 2 (second-order), or 4 (fourth-order).
Output Data TypeContains the following options:
  • Avoid overflow—Specifies that the word length and integer word length of the output data type are large enough to ensure that the filter output does not overflow.
  • Same as input—Specifies that the output data type is the same as the input data type. The output will saturate if the output range is exceeded during signal transients. Overflow will not occur with a steady-state sinusoidal input.
ImplementationContains the following options:
  • Number of channels—Specifies the number of channels of input data to process. The calling VI must supply a sequential channel scan to input data on successive calls to this Express VI. The channel order must be fixed.
  • FPGA clock rate (MHz)—Specifies the clock rate at which LabVIEW compiles the FPGA VI. If the FPGA clock rate parameter does not match the top-level clock rate, the Code Generation Errors window returns an error when you compile the FPGA VI. Use the Top-Level Clock FPGA Target Properties page to change the top-level clock rate.
Filter ResponseDisplays the actual magnitude response of the filter.

Block Diagram Inputs

ParameterDescription
resetResets the filter state of the input data channel to zero if TRUE. Resetting the filter state does not reset the filter coefficients. This Express VI resets automatically the first time you call it.
input dataSpecifies the input signal to filter. input data is a fixed-point number or integer with a maximum word length of 32 bits.
scaled coefficientsSpecifies single-channel filter coefficients to load at run time. Scaled coefficients is a fixed-size array of 32-bit signed integers. The size of the array depends on the order you specify. If the filter order is one, the array contains two elements. If the filter order is two, the array contains three elements. If the filter order is four, the array contains six elements.

The filter coefficients must correspond to the filter type and order you specify using the Type and Order options. You cannot alter the order or type of the filter at run time.

This parameter is available only when you configure the VI for single-channel input in the configuration dialog box.
configurationSpecifies the scaled coefficients to load at run time for the channel index you specify using the channel index element of this cluster. This Express VI continues to use either the default coefficients or the last coefficients you specified for the channel until you specify new coefficients. This parameter is available only when you configure the VI for multi-channel input in the configuration dialog box.

Block Diagram Outputs

ParameterDescription
output dataReturns the filtered signal corresponding to the input data channel.

Butterworth Filter Details

Refer to the support document at ni.com for more information about the accuracy of the FPGA Math and Analysis VIs.

Examples

Refer to the following VIs for examples of using the Butterworth Filter Express VI:

  • labview\examples\CompactRIO\FPGA Fundamentals\FPGA Math and Analysis\Butterworth Filter\Butterworth Filter.lvproj
  • labview\examples\R Series\FPGA Fundamentals\FPGA Math and Analysis\Butterworth Filter\Butterworth Filter.lvproj

WAS THIS ARTICLE HELPFUL?

Not Helpful