LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does filter express vi have a bug

Summary: The transfer function amplitude for the Filter Express VI should be 0.71 at the specified cutoff frequency, independent of the number of taps on a FIR filter. But it is more than that when taps<=9, and less than that when taps>=11.

 

Details: I am using Filter Express VI. The express VI configuration window has choices including filter type, cutoff frequency, FIR or IIR, number of filter taps (for FIR), filter order (for IIR), etc. User can choose to display the filter transfer function. 

When I select filter type=lowpass, cutoff frequency=100 Hz, and FIR filter with 5 taps, and I display the filter transfer function, the magnitude is approximately 0.9 at the specified cutoff frequency of 100 Hz.  Attenuation should be 0.71 since this would correspond to half power, and should be independent of the number of taps.  When I increase the number of taps, the amplitude at the cutoff frequency falls, to 0.75 with 9 taps and finally settles at an amplitude of 0.50 with 21 taps, and doesn't change with more taps (although the sharpness of the cutoff continues to increase with more taps, as expected).

 

The IIR filter transfer function behaves as expected, at least for Butterworth: amplitude=0.71 at the cutoff frequency, independent of the filter order specified.

 

Two attached figures:

Figure 1. Screenshot of Filter Express VI configuration window.  Taps=5, specified cutoff frequency=100. Note transfer function amplitude is approx. 0.9 at the cutoff frequency.

Figure 2. Screenshot, with taps=21.  Note the transfer function amplitude is 0.5 at cutoff frequency.

Download All
0 Kudos
Message 1 of 4
(2,486 Views)

Hi,

 

I'm seeing this with my filter as well, and I'm not certain myself whether this is expected behavior with our filter function.  I've let our filter design team know and I'll see if I can find out how they're calculating based on these FIR coefficients.

Message 2 of 4
(2,441 Views)

Thank you Matt Lee.

0 Kudos
Message 3 of 4
(2,432 Views)

I heard back from our filter team, I've quoted the response below:

 

"This is a correct behavior. For FIR filter, certain number of taps is required to hit the specified filter frequency response. Otherwise, assuming the extreme, which is a one tap FIR filter, it definitely cannot provides the filter frequency response you want. What the customer describes is a behavior for those IIR filters, such as Butterworth or Elliptic."

 

So for FIR filters it seems this is the expected result, as it is designed such that the cutoff frequency would correspond to half-amplitude rather than half-power.  This is what is observed with a high number of taps: around 19-21, the amplitude at cutoff will be 0.5.  I was again informed that the small number of taps will not theoretically meet these specifications.

 

Hope this is helpful!

0 Kudos
Message 4 of 4
(2,412 Views)