Table Of Contents

Filter Design (Smoothing) (G Dataflow)

Version:
    Last Modified: March 15, 2017

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

    Programming Patterns

    To filter a sequence of data, wire the filter output to the Filtering node.

    connector_pane_image
    datatype_icon

    type

    The type of smoothing filter to design.

    Name Description
    moving average

    Yields forward-only (FIR) coefficients.

    exponential

    Yields first-order IIR coefficients.

    Default: moving average

    datatype_icon

    half-width

    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 + 2*M samples. Therefore, the full width N is always an odd number of samples.

    Default: 1

    datatype_icon

    shape

    The shape of the moving-average filter.

    Name Description
    rectangular

    Applies a rectangular moving-average filter to the samples. All samples in the moving-average window are weighted equally in computing each smoothed output sample.

    triangular

    Applies a triangular moving-average filter to the samples. The peak is centered in the middle of the moving-average window, ramping down symmetrically on both sides of the center sample.

    Default: rectangular

    datatype_icon

    time constant

    Time constant of the exponential-weighting filter in seconds.

    Default: 0.1

    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    sampling frequency

    Sampling frequency in samples per second.

    Default: 0.01

    datatype_icon

    filter

    Output smoothing filter.

    datatype_icon

    filter structure

    Structure of the output filter.

    datatype_icon

    forward coefficients

    The forward coefficients of an IIR filter.

    datatype_icon

    reverse coefficients

    The reverse, or feedback, coefficients of an IIR filter.

    datatype_icon

    sampling frequency

    The sampling frequency in Hz.

    datatype_icon

    error out

    Error information.

    The node produces this output according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics