Designs a linear-phase FIR multiband filter using the Parks-McClellan algorithm.
To filter a sequence of data, wire the filter output to the Filtering node.
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
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.
for $i=0,1,2,\mathrm{...},m-1$
where
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:
for $i=0,1,2,\mathrm{...},m-1$
where
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.
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.
The frequency at which the band begins.
The frequency at which the band ends.
The weighted ripple error that this node minimizes. The higher the weight, the smaller the error in the band.
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
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.
Default: No error
Sampling frequency in Hz.
Default: 1
Output FIR filter.
Structure of the output filter.
This output always returns FIR.
Coefficients of the FIR filter.
This output always returns an empty array because FIR filters do not have reverse coefficients.
The sampling frequency in Hz.
The optimal ripple the node computes and is a measure of deviation from the ideal filter specifications.
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.
Where This Node Can Run:
Desktop OS: Windows
FPGA: Not supported
Web Server: Not supported in VIs that run in a web application