Table Of Contents

Filter Design (Parks-McClellan) (G Dataflow)

Version:
    Last Modified: January 9, 2017

    Designs a linear-phase FIR multiband filter using the Parks-McClellan algorithm.

    Programming Patterns

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

    connector_pane_image
    datatype_icon

    filter type

    The type of filter that you want to use.

    Name Description
    Multiband

    Uses a multiband filter. If number of taps is an odd number, this node does not place restrictions on the value of the Amplitude. If number of taps is an even number, the Amplitude of the last band at half of sampling frequency must be 0.

    Differentiator

    Uses a differentiator. If number of taps is an even number, this node does not place restrictions on the last band. If number of taps is an odd number, the value of Higher Freq in the last band must be less than half of sampling frequency. For example, a typical normalized band {0, 0.49} leaves a 0.01 transitional band at half of the sampling frequency, 0.5.

    Hilbert

    Uses a Hilbert transformer. The value of Lower Freq in the first band must be greater than 0. A typical normalized Lower Freq in the first band is 0.03. If number of taps is an even number, this node does not place restrictions on the last band. If number of taps is an odd number, the value of Higher Freq in the last band must be less than half of sampling frequency. A typical normalized Higher Freq in the last band is 0.49.

    Default: Multiband

    datatype_icon

    band parameters

    An array of clusters in which each cluster contains the necessary information associated with each band for the FIR design.

    If this array does not contain any elements, the node returns an error as well as NaN for ripple.

    Specifying Values for band parameters

    For each band, Higher Freq must be greater than Lower Freq, as shown by the following relationship.

    f h i > f l i

    for i = 0 , 1 , 2 , ... , m 1

    where

    • f h i is the Higher Freq in the ith band
    • f l i is the Lower Freq in the ith band
    • m is the number of bands

    For adjacent bands, the Lower Freq in the higher band must be greater than the Higher Freq in the adjacent lower band, as shown by the following relationship:

    f l i > f h i 1

    for i = 0 , 1 , 2 , ... , m 1

    where

    • f l i is the Lower Freq in the higher of the adjacent bands
    • f h i 1 is the Higher Freq in the lower of the adjacent bands
    • m is the number of bands

    The Higher Freq in the last band must be equal to or less than half of sampling frequency.

    If any of the preceding frequency conditions are violated, the node returns an error as well as NaN for ripple.

    datatype_icon

    Amplitude

    The appropriate magnitude response, or gain, of the filter between Lower Freq and Higher Freq. A value of 1.0 corresponds to a passband, and a value of 0.0 corresponds to a stopband. If you set filter type to Differentiator, the Amplitude of a band is the slope of the frequency response in that band.

    datatype_icon

    Lower Freq

    The frequency at which the band begins.

    datatype_icon

    Higher Freq

    The frequency at which the band ends.

    datatype_icon

    Weighted Ripple

    The weighted ripple error that this node minimizes. The higher the weight, the smaller the error in the band.

    datatype_icon

    number of taps

    The total number of coefficients in the output array of FIR filter coefficients.

    A tap corresponds to a multiplication and an addition. If there are n taps, every filtered sample requires n multiplications and n additions.

    number of taps must be greater than 2. If it is less than or equal to 2, the node returns an error as well as an empty array for filter and NaN for ripple.

    Default: 32

    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

    sampling frequency

    Sampling frequency in Hz.

    Default: 1

    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

    ripple

    The optimal ripple the node computes and is a measure of deviation from the ideal filter specifications.

    datatype_icon

    error out

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

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics