Moving Average (MA) FilterLabVIEW file (sub-VI): SubVI_moving_average_filter.vi What is it? It is a recursive (or online, or real-time) moving average filter implemented as a sub-VI. The filter output is calculated with yf_k = (1 - a)*yf_km1 + a*y_k where a = 1/N where N = ts/ts + 1 Above:
This MA filter is identical to a time constant filter if the filter time window (t_ma) is identical to the filter time constant, and the time steps of both filters are equal. Inputs and outputs of this subVI Inputs:
Outputs:
How to include the filter in your block-diagram?
Filter tuning To increase the filtering (smoothing), increase tf. With tf = 0 there is no filtering, i.e. the input signal just pass through the filter. Updated 20 October 2024 by Finn Aakre Haugen |