LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

having troubles with noise when messauring from pressaure transmitter 4-20mA to mydaq

Right now i am using the mean filter but i experience some spikes still. Am i using the wrong type of filter? or are my settings faulty?.

In the graph in labview it looks ok, but when i tranfer my data to excel and make a graph there the graph is to spiky and unlinear.

 

the excel logg is with a 1% change in the pressaure.

Download All
0 Kudos
Message 1 of 13
(2,903 Views)

Hi King,

 

Right now i am using the mean filter but i experience some spikes still.

Which "spikes"?

 

Am i using the wrong type of filter? or are my settings faulty?.

You are using a Pt-by-Pt function, set to filter at the default settings. Have you tried other settings? (Any results from changed parameters?)

What about setting a sample rate in your DAQmx task and read the AI with e.g. 100Hz and 50 samples/read and average those 50 samples?

 

In the graph in labview it looks ok, but when i tranfer my data to excel and make a graph there the graph is to spiky and unlinear.

So the problem is either in Excel or the way you save the data to a CSV file. Unfortunately you don't show any "Excel" data…

 

the excel logg is with a 1% change in the pressaure.

I don't know what you are trying to say here…

 

There's no timing in your loop, it tries to run as fast as possible. Surely there are other ways to handle such situations…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(2,873 Views)

Which "spikes"?

Sometimes when the pressaure is stable the graph suddenly rise or lowers in my program like a fast spike. And i wonder why the filter doesn't remove that. there is a screenshot of it attached called ghu.

 

What about setting a sample rate in your DAQmx task and read the AI with e.g. 100Hz and 50 samples/read and average those 50 samples?

how do i choose the hz? is it the timout?

 

So the problem is either in Excel or the way you save the data to a CSV file. Unfortunately you don't show any "Excel" data…

Sorry, the excel file is attached. This logging is with a 1% rise in the rpm in the pump that pumps whater into the tank that im messauring pressaure in. And i cant understand why the graph in excel is so unlinear and ugly.

 

There's no timing in your loop, it tries to run as fast as possible. Surely there are other ways to handle such situations…

What do you mean here?

 

 

 

 

Download All
0 Kudos
Message 3 of 13
(2,858 Views)

Hi King,

 

Sometimes when the pressaure is stable the graph suddenly rise or lowers in my program like a fast spike. And i wonder why the filter doesn't remove that. there is a screenshot of it attached called ghu.

I don't see this problem in your attached CSV file…

Why don't you write the original ("unfiltered") data into a log file? I guess that filter VI works exactly as it should, so the problem is with your DAQ data!

 

how do i choose the hz? is it the timout?

There is a sime DAQmxTiming function - did you read the basic DAQmx tutorial?

 

Sorry, the excel file is attached. This logging is with a 1% rise in the rpm in the pump that pumps whater into the tank that im messauring pressaure in. And i cant understand why the graph in excel is so unlinear and ugly.

It's no "excel" file, it's a simple spreadsheet file aka CSV!

And Excel only shows the data you have written into that CSV file, so it's not Excel's fault being "ugly" and "unexpected"!

Please log the unfiltered DAQ data!

 

What do you mean here?

There is no timing function in that loop…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(2,851 Views)

here is the unfiltered csv file and the filtered csv file.

Download All
0 Kudos
Message 5 of 13
(2,844 Views)

Hi King,

 

this is what you get from your unfiltered data with a simple running average in Excel:

check.png

There is noise, and there are ups and downs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(2,837 Views)

how did you make this average line?

0 Kudos
Message 7 of 13
(2,823 Views)

Hi King,

 

I used Excel. Excel has a huge list of functions and you can create averages quite easily…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(2,821 Views)

yes, figured it out, thank you!

 

But i have a new problemSmiley Mad, now when i log the filtered value and the unfiltered value, the filtered one is slightly delayed. (the picture added shows this).

 

How do i fix this?, these two has to be alligned. I could set a delay on the unfiltered one, but then my graph wont fit to the actuall pressaure in the tank in the same time.

Download All
0 Kudos
Message 9 of 13
(2,794 Views)

Hi king,

 

any filter will change amplitude and phase of its input signal. And a running average is nothing else than a low pass filter...

 

Have you had any lessons on signals and filters at university? Or read a book about this topic?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(2,792 Views)