Smoothing Filter Coefficients VI

Owning Palette: Advanced IIR Filtering VIs

Requires: Full Development System

Designs filter coefficients for a smoothing filter. You can use this VI to design a moving-average FIR filter or an exponentially-averaging IIR filter.

The VI returns reverse coefficients and forward coefficients for direct connection to the IIR Filter VI, which is used to implement both FIR and IIR filters.

 Add to the block diagram  Find on the palette
type specifies the type of smoothing filter.

0moving average (default)—Yields forward-only (FIR) coefficients.
1exponential—Yields first-order IIR coefficients.
half-width specifies the half-width of the moving-average filter in samples. For a half-width of M, the full width of the moving-average filter is N = 1 + 2M samples. Therefore, the full width N is always an odd number of samples.
shape specifies the shape of the moving-average filter.

0rectangular (default)—All samples in the moving-average window are weighted equally in computing each smoothed output sample.
1triangular—The moving weighting window applied to the samples is triangular with its peak centered in the middle of the window, ramping down symmetrically on both sides of the center sample.
time constant specifies the time constant of the exponential-weighting filter in seconds.
fs specifies the sampling frequency in samples per second.
reverse coefficients contains the reverse, or feedback, coefficients of an IIR filter.
forward coefficients contains the forward coefficients of an IIR filter.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.