Table Of Contents

Filter Design (Windowed FIR) (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Designs a windowed FIR filter.

    Programming Patterns

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

    connector_pane_image
    datatype_icon

    window parameter

    A value that affects the output coefficients when window type is Kaiser, Gaussian, or Dolph-Chebyshev.

    If window type is any other type of window, this node ignores this input.

    This input represents the following information for each type of window:

    • Kaiser—Beta parameter
    • Gaussian—Standard deviation
    • Dolph-Chebyshev—The ratio, s, of the main lobe to the side lobe

    Default: NaN—Causes this node to set beta to 0 for a Kaiser window, the standard deviation to 0.2 for a Gaussian window, and s to 60 for a Dolph-Chebyshev window

    datatype_icon

    window type

    Type of smoothing window. Smoothing windows decrease ripple in the filter passband and improve the ability of the filter to attenuate frequency components in the filter stopband.

    Name Value Description
    Rectangle 0 Specifies a rectangle window.
    Hanning 1 Specifies a Hanning window.
    Hamming 2 Specifies a Hamming window.
    Blackman-Harris 3 Specifies a Blackman-Harris window.
    Exact Blackman 4 Specifies an Exact Blackman window.
    Blackman 5 Specifies a Blackman window.
    Flat Top 6 Specifies a Flat Top window.
    4 Term B-Harris 7 Specifies a 4 Term B-Harris window.
    7 Term B-Harris 8 Specifies a 7 Term B-Harris window.
    Low Sidelobe 9 Specifies a Low Sidelobe window.
    Blackman Nuttall 11 Specifies a Blackman Nuttall window.
    Triangle 30 Specifies a Triangle window.
    Bartlett-Hanning 31 Specifies a Bartlett-Hanning window.
    Bohman 32 Specifies a Bohman window.
    Parzen 33 Specifies a Parzen window.
    Welch 34 Specifies a Welch window.
    Kaiser 60 Specifies a Kaiser window.
    Dolph-Chebyshev 61 Specifies a Dolph-Chebyshev window.
    Gaussian 62 Specifies a Gaussian window.

    Default: 0—Rectangle

    datatype_icon

    option

    An enum value that determines whether to scale the FIR windowed coefficients.

    Name Description
    not scaled

    Does not scale the FIR windowed coefficients.

    scaled

    Scales the FIR windowed coefficients.

    Default: not scaled

    datatype_icon

    filter type

    The passband of the filter.

    Name Description
    Lowpass

    Uses a lowpass filter.

    Highpass

    Uses a highpass filter.

    Bandpass

    Uses a bandpass filter.

    Bandstop

    Uses a bandstop filter.

    Default: Lowpass

    datatype_icon

    low cutoff frequency

    The low cutoff frequency in Hz. If this input is less than or equal to zero or does not meet the Nyquist criterion, the node returns an empty array as well as an error.

    Default: 0.125

    datatype_icon

    high cutoff frequency

    The high cutoff frequency, in Hz. This value must observe the Nyquist criterion.

    The node places the following restrictions on this parameter according to filter type:

    filter type Restrictions
    Lowpass or Highpass The node ignores this input.
    Bandpass or Bandstop This value must be greater than low cutoff frequency and less than half of sampling frequency.

    Default: 0.45

    datatype_icon

    number of taps

    The total number of FIR coefficients.

    If number of taps is less than or equal to 0, the node returns an empty array as well as an error.

    If filter type is 1 (Highpass) or 3(Bandstop), this input must be odd.

    Default: 25

    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

    The sampling frequency in Hz.

    If this input is less than or equal to 0, the node returns an empty array as well as an error.

    Default: 1.0 Hz

    datatype_icon

    filter

    Output FIR filter.

    datatype_icon

    filter structure

    Structure of the output filter.

    This output always returns FIR.

    datatype_icon

    forward coefficients

    Coefficients of the FIR filter.

    datatype_icon

    reverse coefficients

    This output always returns an empty array because FIR filters do not have reverse coefficients.

    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