When using a digital filter to process data, you should know its spectral characteristics. You can use the information in Comparing IIR and FIR Filters to examine the spectral properties of the IIR filter VIs.
LabVIEW and LabVIEW Datalogging and Supervisory Control (DSC) module have five types of recursive filter VIs: Butterworth, Chebyshev, Inverse Chebyshev, or Chebyshev II, Elliptic, and Bessel.
Each type of filter has four basic, often-used configurations: lowpass, highpass, bandpass, and bandstop (or notch).
The filter parameters you can control are the lower and higher cut-off frequencies, the filter order, the passband ripple in decibels, and the stopband attenuation ripple. You can display the spectral function either linearly or in decibels, as shown in the following illustration.
The following block diagram determines the spectral response of the filters. The diagram passes an impulse signal through a filter to obtain the magnitude and phase response of that filter. The Case structures immediately to the right of the Impulse Pattern VI select the filter design (Butterworth, Chebyshev, Chebyshev II, Elliptic, or Bessel) and type (lowpass, highpass, bandpass, or bandstop). The signal obtained from the Case structure is the impulse response of the system.
The transfer function of the system corresponds to the impulse response through the Fourier transform such that the impulse response and the transfer function are Fourier transform pairs
h(t) H(f),
where h(t) is the impulse response, and H(f) is the transfer function (frequency response).
Because the Case structure output signal is the impulse response, you can derive the transfer function with a Fourier transform. Half of the information is redundant, so you need to process only half of the information after the Real FFT VI. Magnitude and phase information are much easier to interpret than the real and imaginary component of the FFT, and you can therefore use the 1D Rectangular to Polar VI to obtain the magnitude and phase. Finally, unwrap the phase and convert it to degrees and convert the magnitude to decibels.
The following graph shows the magnitude of an elliptic bandpass filter.
The following graph shows the phase response of an elliptic bandpass filter.
Notice that the phase information is clearly nonlinear and should be considered when selecting IIR or FIR filters to process data.