LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

expected (wrong?) results from Express VI - a bug?

Using a Lab-Vierw supplied example made with express VIs fro signal egneration and ifltering.
MOdified the express VI so that instead of using a Butterworth lowpass it would use a Bessel with
variable order (variable # of poles).
Unexpecte result: when choose corbner freq = 1 KHz and drive with 1 KHz signal, I should get
output = 0.71 times input since at the corne freq, the output shuld be 3 dB down.
And I do get that result with a BUtterworth (all orders tried) or with a Bessel, if the Bessel is 1st order.
But for Bessel of order 2 or more, the attentiation is greater than expected, greater than it should be.
Bessel with Fc = 1000 Hz:
8 pole: Out/In = 0.18 when f=1000; Out/in=0.71 when f=500 Hz.
4 pole: Out/In = 0.39 when f=1000; Out/In = 0.71 when f=645 Hz.
2 pole: Out/In = 0.57 when f=1000; Out/In = 0.71 when f=790 Hz.
1 pole: Out/In = 0.71 when f=1000 as expected.
Is this a bug or is there another explanation?
Message 1 of 6
(2,796 Views)
I don't have an explanation, but I can confirm that the Express Bessel filter and the classical Bessel Filter.vi (LV 7.1.1) produce different results when fed the same sinusoidal signal, with the Express filter producing lower amplitudes. Perhaps one of NI's filter gurus will explain.

Lynn
Message 2 of 6
(2,790 Views)
I believe that I may have an explanation for you for why that is happening with the Bessel filters. I searched all over the internet trying to find a good reason why you would be seeing this type of behavior, and learned quite a bit about filters doing so. I was able to find a KB about the difference between the Butterworth and Bessel functions on our site (which I have linked below).

http://digital.ni.com/public.nsf/websearch/6A4F13555E64E81986256C72005671DF?OpenDocument

Basically this KB states that for any order of Butterworth filter, the transfer function should always pass through the 3 dB point. There is an attached picture in the KB. The Bessel filter behaves the same way for a first order filter, as you noticed. However, due to the math behind the functions, which I won't go into, any greater order will show a shift in the half power point. There is picture of this as well. This would explain the decreased out/in that you noticed for higher order functions.

Hope this helps!
Andy F.

-----------------------------------------------------------------
National Instruments
0 Kudos
Message 3 of 6
(2,766 Views)

Standard engineering practice is to define the cutoff freq (fc) of a Bessel or Butterworth filter as the -3dB frequency, i.e. the frequency at which the output signal has half the power of the input signal.  Any number of engineering texts on filtering affirm this, as do the web sites of Frequency Devices and others who make filters for sale to circuit designers, and Wikipedia (under "cutoff frequency"). 

If NI's Bessel filter implementation does not work in the standard way I just described, then it gives results that are unexpected by students of (or experts in) filitering.  Furthermore, the KB article which was cited in by the previous respondent does not explain what is meant by cutoff frequency in the case of a Bessel filter.  If it doesn't mean what most engineers would expect (the -3dB point), then what does fc mean?

Message 4 of 6
(2,749 Views)
The KB that I posted does show the transfer functions for the LabVIEW implementation of the Bessel functions.  As WCR points out this does change what the cutoff frequency is actually referring to when using higher order Bessel filters.  The LabVIEW help should reflect what the actual definition of the cutoff frequency for each filter, but it does not.  I also checked the Chebyshev filter VIs and it does not refer to the ripple dB when specifying what the cutoff frequency is for that type of filter. 
 
So, does the LabVIEW implementation of the higher order Bessel functions give results that might not be expected?  Yes.  Should the help files be updated to reflect this?  Probably. 
 
One thing that I did want to point out is that you can view the transfer functions used for the different types of filters using the Filter Express VI.  If you open the configuration page and select the Transfer function as the View Mode, it will show how the transfer function looks for each filter.  If you select Butterworth, you can increase the order and see it lock on the -3 dB point.  If you select Bessel, you can increase the order and watch the curve shift to the left, decreasing the dB values at the cutoff frequency. 
 
Andy F.
-----------------------------------------------------------------
National Instruments
Message 5 of 6
(2,724 Views)

Thank you for that clarificaion, Andy.

Bill

0 Kudos
Message 6 of 6
(2,706 Views)