Table Of Contents

Savitzky-Golay Filter Design (G Dataflow)

Version:
    Last Modified: January 9, 2017

    Designs a Savitzky-Golay FIR smoothing filter, returning the designed Savitzky-Golay filter coefficients and the differentiation filter coefficients.

    connector_pane_image
    datatype_icon

    compute differentiation filters?

    A Boolean that determines whether the node calculates the differentiation filters.

    True The node calculates the differentiation filters.
    False The node does not calculate the differentiation filters.

    Default: True

    datatype_icon

    side points

    The number of data points to each side of the current data point to use for the least-squares minimization.

    side points*2 + 1 is the length of the moving window, which must be greater than the polynomial order.

    Default: 6

    datatype_icon

    polynomial order

    Order of the polynomial.

    Default: 3

    datatype_icon

    weight

    Weighting vector to use in the least squares minimization.

    This array must be empty or have a length of side points*2 + 1.

    datatype_icon

    error in

    Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

    Default: No error

    datatype_icon

    Savitzky-Golay filters

    A matrix with rows representing the FIR filter coefficients.

    The matrix is n-by-n, where n is side points*2+1.

    datatype_icon

    differentiation filters

    A matrix where the p-th row is the differentiation filter for the p-th order derivative.

    The matrix is m-by-n, where m is polynomial order+1, and n is side points*2+1.

    This node computes differentiation filters only if compute differentiation filters? is True.

    datatype_icon

    error out

    Error information. The node produces this output according to standard error behavior.

    Applying a Savitzky-Golay Filter

    The Savitzky-Golay filter smoothes a noisy signal by the piece-by-piece fitting of a polynomial function to the signal. This node performs the fitting by least squares minimization. The length of the moving polynomial fitting window is 2k+1, where k is side points.

    The central row of Savitzky-Golay filters estimates the middle point of the moving window. The other rows of Savitzky-Golay filters smooth the endpoints of the signal, where the window length exceeds the number of remaining data points.

    To smooth a signal, apply the first k rows of Savitzky-Golay filters to the first 2k+1 points of the signal to get the first k smoothed points. Apply the last k rows of Savitzky-Golay filters to the last 2k+1 points of the signal to get the last k smoothed points. Apply the central row of Savitzky-Golay filters for all other points.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics