LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DFD Filter Bug?

Hey, I'm trying to make a lowpass Butterworth filter using DFD for my second year project at uni.

 

Here are the settings:

 

Sampling - 500Hz

Passband - 50Hz

Passband ripple - 1dB

Stopband - 100Hz

Stopband attenuation - 15dB

 

I've tried numerous combinations, resulting in everything over 5Hz attenuating, flatlining, and now it won't filter a single thing.

 

One suggestion by our lab technician is that it's something that's come up from using LabVIEW 10 x86 on a x64 system?

 

Thanks for any help.

Download All
0 Kudos
Message 1 of 5
(2,246 Views)

I do not understand how you are using this subVI.  You take a single point in and produce a single point out.  How do you define filtering on a single point? Why repeat the point 500 times and then do a rather complicated loop operation to get the last point of the filter output? Index array with the index set to 500-1 produces the same result as the right for loop.

 

What is the source of the data?  Why do you not filter a large segment of data at once? What does your main VI look like?

 

Lynn

0 Kudos
Message 2 of 5
(2,235 Views)

The reason why I'm using a single point is because of my data input - I'm getting a voltage from a USB-1208FS, which enters the program as a single int and is immediately converted to a double.

 

As for the loops, it was my understanding that they would compile, and decompile, N entities rather than the same entity N times... I know I need to put my data into an array in order to filter it, I'm just not 100% sure how, as I need the single bits in another part of the program.

0 Kudos
Message 3 of 5
(2,224 Views)

If you have not done so, please take a little time to work through the on-line tutorials for LV.  Some of these things are very basic.

 

A for loop by default will autoindex an array fed into it or autoindex an output into an array.  However, the way you have it shown, it simply uses the same value 500 times.  Nothing in that subVI "remembers" the data from the previous iteration.

 

It is difficult to tell exactly what is happening from looking at an image.  What you probably need to do is to build an array in a shift register.  Feed the output of the AIn and To Eng VIs to a Build Array input.  The output goes to a shift register.  The left terminal of the shift register connects to the other Build Array input.  {Note that this is NOT an efficient way to do this because it will require frequent memory reallocations, but it will let you see if you get some usable results).

 

Lynn

0 Kudos
Message 4 of 5
(2,219 Views)

ok, i've had another try, using a shift register, but still nothing

 

i'd rather keep all my array conversion within this VI as i don't want to touch the rest of my program as it works pretty well....

0 Kudos
Message 5 of 5
(2,188 Views)