LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filter for waveform data

Solved!
Go to solution

Hi everybody,

 

I'm trying to filter noisy analog inputs from 10 channels (DC). I'm sampling 100 samples/channel @ 1000 Hz. My idea is to filter the data with a lowpass filter (low cut-off freq @ 10 Hz, 3rd order butterworth) and then calculate the mean of every package of 100 samples. Eventually I'd like to receive values at a rate of 10 Hz, that can be displayed smoothly on the front panel and be written to a measurement file.

 

My problem is the following: 

The Filter Express VI does not filter continuously after the VI started. It seems to reinitialize every time, the loop executes. The array of 100 samples before (white) and after (red) the filter are displayed in the 'filterResponse' image. If I take the mean of this array, it is of course lower than without the filter due to the transient values between 0 and 0.025s. I have built a simplified version of my VI with only one channel using the 'Simulate signal' VI and my concept seems to work well i.e. continuously (see 'filterMeanExample.vi'). I get the idea that this might have to do with the dynamic data type that is supported by many express VI's. But since I'm using the KEITHLEY VI, I don't use the dynamic data type. In fact, I had to convert its output into a waveform data type to get a suitable time vector for the measurement file.

I wonder how to keep the filter VI from reinitializing every time the loop executes.

 

My VI is rather bulky and contains the KEITHLEY 'Acquire Waveforms' VI which most people do not have in their libraries so I decided to post only pictures.

 

Thanks for your help!

Phil

 

System: WinXP, LabVIEW 8.2.1 Professional

Download All
0 Kudos
Message 1 of 6
(10,702 Views)

hi fipsomatic,

  If your Keithley VI outputs the data in an array format and you had a problem with the express VI,check the signal processing pallette which has may VIs which can accept the array data type..

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


Message 2 of 6
(10,678 Views)
Solution
Accepted by topic author fipsomatic

Thanks for the advice, I got it fixed!

I used the butterworth filter VI from the Filter toolbox on the Signal Processing panel which accepts the array data type. I set the 'init/cont' variable to TRUE to prevent the filter from resetting its initial states to 0. I guess, that was my actual problem before. The Filter Express VI does not have this option so I was not aware of this feature.

However, a picture of the current setting is in attachment.

Thanks again,

Phil

0 Kudos
Message 3 of 6
(10,640 Views)

Hi, I am working on a simular problem. I need a low pass filter which cut all signal above 400Hz. When I wire the filter with the input it is OK. But when I run the test, error shows that the f_low<f_high<f_s/2. I know I can set f_low and f_high, but where is f_s? Do you know that?

0 Kudos
Message 4 of 6
(10,370 Views)

f_s is the sampling rate at which you are getting the values.  This needs to be at least twice the highest frequency according to Nyquist theorem.

National Instruments
Applications Engineer
0 Kudos
Message 5 of 6
(10,335 Views)

The VI that represents your DAQ input device should have an output with its sampling rate f_s. At least that's where I got it from and I just wired it to the filter icon.

 

Phil

0 Kudos
Message 6 of 6
(10,302 Views)