Owning Palette: Advanced FIR Filtering VIs
Requires: Full Development System
Generates a set of linearphase FIR multiband digital filter coefficients using the # of taps, sampling frequency: fs, Band Parameters, and filter type.
# 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 2. If # of taps is less than or equal to 2, the VI sets h to an empty array, sets ripple to NaN, and returns an error.  
sampling freq: fs is the sampling frequency in Hz and must be greater than zero. The default is 1.0 Hz. If sampling freq: fs is less than or equal to zero, the VI sets h to an empty array and returns an error.  
Band Parameters is an array of clusters. Each cluster element contains the necessary information associated with each band for the FIR design. The Band Parameters cluster array must contain at least one element, that is, one band. The default is an empty array. If Band Parameters does not contain any elements, the VI sets h to an empty array, sets ripple to NaN, and returns an error.
 
filter type can be the following values.


h is an array of FIR filter coefficients, which the VI computes using the ParksMcClellan 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. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. 
Note The ParksMcClellan 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 ParksMcClellan 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 equiripple filters use a similar technique to filter the data.
Refer to the Optimal FIR Filter VI in the labview\examples\Mathematics\Optimization directory for an example of using the ParksMcClellan VI.