Finn's LabVIEW Goldmine:

Measurement lowpass filter

LabVIEW file (sub-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.

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.)

  • Init/reset can be used in the following alternative ways (the first of these can be used in most applications)

    1. By connecting a First Call? function to the Init/reset input, the initial filter output becomes equal to the present (raw) filter input, thereby avoiding an unfavourable initial bump in the filter output.
    2. By connecting a boolean control to the the Init/reset input, the present filter output becomes equal to the present (raw) filter input when the state of the boolean control is locially true.

Output from the function:

  • Output which is the filtered (smoothed) signal.

How to include the filter in your block-diagram?

  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-diagram code of the subVI explicitly into your program.)

[Finn 's LabVIEW Page]

Updated 25. October 2015 by Finn Haugen (