Parks-McClellan (Not in Base Package)

Generates a set of linear-phase FIR multiband digital filter coefficients using the # of taps, sampling frequency: fs, Band Parameters, and filter type. Details

# of taps contains the total number of coefficients in h. The default is 32. A tap corresponds to a multiplication and an addition. If there are n taps, every filtered sample requires n multiplications and n additions. # of taps must be greater than zero. If # of taps is less than or equal to zero, the VI sets h to an empty array, sets ripple to NaN, and returns an error.
sampling freq: fs is the sampling frequency and must be greater than zero. The default is 1.0.
Band Parameters is an array of clusters. Each cluster element contains the necessary information associated with each band for the FIR design. Each cluster contains four elements, as described below.

The Band Parameters cluster array must contain at least one element, that is, one band.
Amplitude is the appropriate magnitude response, or gain, of the filter between the lower and higher frequencies. A value of 1.0 corresponds to a passband, and a value of 0.0 corresponds to a stopband. This VI does not place restrictions on the value of the amplitude.
Lower Freq is the frequency at which the band begins.
Higher Freq is the frequency at which the band ends.
Weighted Ripple is the weighted ripple error that this VI minimizes. The higher the weight, the smaller the error in the band. For each band, Higher Freq must be greater than Lower Freq, and for adjacent bands, Lower Freq in the higher band must be greater than Higher Freq in the lower band,

where represents the Lower Freq in the band, and represents the Higher Freq in the band. The Higher Freq in the last band must observe the Nyquist criterion

where is the sampling frequency.

If Band Parameters does not contain any elements, or if any of the preceding frequency conditions is violated, the VI sets h to an empty array, sets Weighted Ripple to NaN, and returns an error. The default is an empty array.

filter type can be the following values.

0Multiband (default)
1Differentiator
2Hilbert
h is an array of FIR coefficients, which the VI computes using the Parks-McClellan algorithm with the Remes exchange technique.
ripple is the optimal ripple the VI computes and is a measure of deviation from the ideal filter specifications.
error returns any error or warning from the VI. Refer to Signal Processing Error Codes for more information about these conditions.

Parks-McClellan Details

Note  The Parks-McClellan VI finds the coefficients using iterative techniques based upon an error criterion. Although you specify valid filter parameters, the algorithm may fail to converge.

The Parks-McClellan VI generates only the filter coefficients. It does not perform the filtering function. To filter a sequence X using the set of FIR filter coefficients h, use the Convolution VI with X and h as the input sequences, as shown in the following illustration.

The equi-ripple filters use a similar technique to filter the data.