Finn's LabVIEW Goldmine:

Measurement lowpass filter

LabVIEW file:

timeconstant_lowpass_filter.vi

What is it?

It is a filter function (implemented as a sub-VI) that implements a time-constant filter based on the Backward method of discretization. The initial filter output, i.e. the output at the first function call, is equal to the initial filter input, thereby avoiding an unfavourable initial bump in the filter output.

Inputs to the function:

  • Input is the input signal that is to be filtered (smoothed).

  • Tf [s] is the filter time-constant. (The filter bandwidth is 1/(2*pi*Tf) [Hz].)

  • Ts [s] is the time-step, i.e. the time between subsequent executions of the the filter. Ts must be set equal to the cycle time of the While loop, or Timed loop, in which the filter is used. If the filter is used in a Simulation loop, Ts must be set equal to the time-step of the Simulation loop.

Output from the function:

  • Output which is the filtered (smoothed) signal.

How to use it?

  1. Save the subVI LabVIEW file to any folder (do not open it directly in LabVIEW).

  2. Add the subVI to the block-diagram of your VI via Functions Palette / Select a VI etc. Then connect its inputs and its output to the proper signals (wires) in the block-diagram. (It is not necessary to copy the Block digram of the subVI into your program. Just use the subVI block in your program.)


[Finn 's LabVIEW Page]


Updated 2. February 2009 by Finn Haugen (finn@techteach.no)