Owning Palette: Filters VIs
Requires: Full Development System
Filters the input data sequence, X, using the set of windowed FIR filter coefficients specified by the sampling freq: fs, low cutoff freq: fl, high cutoff freq: fh, and number of taps. Wire data to the X input to determine the polymorphic instance to use or manually select the instance.
Use the pulldown menu to select an instance of this VI.
window parameter is the beta parameter for a Kaiser window, the standard deviation for a Gaussian window, and the ratio, s, of the main lobe to the side lobe for a DolphChebyshev window. If window is any other window, this VI ignores this input. The default value of window parameter is NaN, which sets beta to 0 for a Kaiser window, the standard deviation to 0.2 for a Gaussian window, and s to 60 for a DolphChebyshev window. 

filter type specifies the passband of the filter.


X is the input signal to filter.  
sampling freq: fs is the frequency in Hz at which you want to sample X 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 Filtered X to an empty array and returns an error.  
low cutoff freq: fl is the low cutoff frequency in Hz and must observe the Nyquist criterion. The default is 0.125 Hz. If low cutoff freq : fl is less than zero or does not meet the Nyquist criterion, the VI sets Filtered X to an empty array and returns an error.  
high cutoff freq: fh is the high cutoff frequency in Hz. The default is 0.45 Hz. The VI ignores this parameter when filter type is 0 (Lowpass) or 1 (Highpass). When filter type is 2 (Bandpass) or 3 (Bandstop), high cutoff freq: fh must be greater than low cutoff freq: fl and observe the Nyquist criterion.  
taps determines the total number of FIR coefficients and must be greater than zero. The default is 25. If taps is less than or equal to 0, the VI sets Filtered X to an empty array and returns an error. taps must be odd for highpass and bandstop filters.  
window specifies the 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.


Filtered X is the output array of filtered samples. Filtered X has an associated index delay caused by the convolution operation. This VI calculates the delay using the following equation:  
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. 
window parameter is the beta parameter for a Kaiser window, the standard deviation for a Gaussian window, and the ratio, s, of the main lobe to the side lobe for a DolphChebyshev window. If window is any other window, this VI ignores this input. The default value of window parameter is NaN, which sets beta to 0 for a Kaiser window, the standard deviation to 0.2 for a Gaussian window, and s to 60 for a DolphChebyshev window. 

filter type specifies the passband of the filter.


X is the input signal to filter.  
sampling freq: fs is the frequency in Hz at which you want to sample X 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 Filtered X to an empty array and returns an error.  
low cutoff freq: fl is the low cutoff frequency in Hz and must observe the Nyquist criterion. The default is 0.125 Hz. If low cutoff freq : fl is less than zero or does not meet the Nyquist criterion, the VI sets Filtered X to an empty array and returns an error.  
high cutoff freq: fh is the high cutoff frequency in Hz. The default is 0.45 Hz. The VI ignores this parameter when filter type is 0 (Lowpass) or 1 (Highpass). When filter type is 2 (Bandpass) or 3 (Bandstop), high cutoff freq: fh must be greater than low cutoff freq: fl and observe the Nyquist criterion.  
taps determines the total number of FIR coefficients and must be greater than zero. The default is 25. If taps is less than or equal to 0, the VI sets Filtered X to an empty array and returns an error. taps must be odd for highpass and bandstop filters.  
window specifies the 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.


Filtered X is the output array of filtered samples. Filtered X has an associated index delay caused by the convolution operation. The delay is given by the following equation.  
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. 
The values for low cutoff freq: fl and high cutoff freq: fh must observe the following relationship:
0 < f_{1} < f_{2} < 0.5f_{s}
where f_{1} is low cutoff freq: fl, f_{2} is high cutoff freq: fh, and f_{s} is sampling freq: fs.
Refer to the FIR Windowed Filter Design VI in the labview\examples\Signal Processing\Filters directory for an example of using the FIR Windowed Filter VI.