Equi-Ripple BandStop (Not in Base Package)

Generates a bandstop FIR digital filter with equi-ripple characteristics using the Parks-McClellan algorithm and higher pass freq, lower pass freq, # of taps, lower stop frequency, higher stop freq, and sampling freq. The Equi-Ripple BandStop VI then applies a linear-phase, bandstop filter to the input sequence X using the Convolution VI to obtain Filtered Data. Details

higher pass freq must be greater than higher stop freq and observe the Nyquist criterion.

where is the lower pass frequency, is the lower stop frequency, is the higher stop frequency, is the higher pass frequency, and is the sampling frequency. If any of these conditions are violated, the VI sets Filtered Data to an empty array and returns an error through the Parks-McClellan VI. The default is 0.4.

Note  All cutoff frequencies must be less than half .
lower pass freq must be greater than zero. The default is 0.2. If lower pass freq is less than or equal to zero, the VI sets Filtered Data to an empty array and returns an error through the Parks-McClellan VI.
X is the input signal to be filtered.
# of taps must be greater than zero. The default is 31. If the number of taps is less than or equal to zero, the VI sets Filtered Data to an empty array and returns an error through the Parks-McClellan VI. The VI does not place restrictions on # of taps, but # of taps should be odd.
Note  The Parks-McClellan algorithm introduces a large error when you design a bandstop filter for an even number of taps. To avoid this error, the Equi-Ripple BandStop VI adjusts the number of taps to the next higher odd value if # of taps is even.
lower stop freq must be greater than lower pass freq. The default is 0.25. If lower stop freq is less than or equal to lower pass freq, the VI sets Filtered Data to an empty array and returns an error through the Parks-McClellan VI.
higher stop freq must be greater than lower stop freq. The default is 0.35. If higher stop freq is less than or equal to lower stop freq, the VI sets Filtered Data to an empty array and returns an error through the Parks-McClellan VI.
sampling freq: fs is the sampling frequency and must be greater than zero. The default is 1.0.
Filtered Data The VI filters by convolution. The number of elements, k, in Filtered Data is

k = n + m - 1,

where n is the number of elements in X, and m is the number of taps.

A delay is also associated with the output sequence

error returns any error or warning from the VI. Refer to Signal Processing Error Codes for more information about these conditions.

Equi-Ripple BandStop Details

The first passband region of the filter goes from zero (DC) to the lower pass freq. The stopband region goes from the lower stop freq to the higher stop freq, and the second passband region goes from the higher pass freq to the Nyquist frequency.