LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffer, Average, or What?

Solved!
Go to solution

I am searching for advice on how to knock down some of the noise in my signal.  Two ways I have thought of would be to build a buffer or average the input signal over the appropriate time frame.  Any ideas?  Examples?  Take a look at the attachment and see if you have any other ideas....thanks for your help.

Bradley

0 Kudos
Message 1 of 10
(3,644 Views)

What is your data acquisition rate?  How rapidly do you expect values to change?  From your graph, it looks like rapid changes aren't happening.

 

If it was me, I would acquire at a rate about 10 times faster than you would want, and just average those 10 values to together.

 

By the way, you have a possible race condition with your use of local variables for "Elapsed Time".  In all likelihood, the values in the local variables will probably be from the last iteration of the loop rather than the current iteration.  You should just wire them directly to where the elapsed time is being calculated.

Message 2 of 10
(3,639 Views)

Browse the examples for Filter...   Help - Find examples ... - Analysing and Processing Signals - Filtering and Conditioning 

 

I don't open .doc files from the internet so .... a png or jpg would be nice.

 

How are you sampling your signal?  

 

What LV version do you use? 

 

 

Message Edited by Henrik Volkers on 07-14-2009 04:09 PM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 10
(3,636 Views)

Well I exactly do not understand your requirement, but carrying on your point of averaging, there is a very good VI known as smoothing filter you can use it for moving average.

 

Regards,

Krunal K Patel

0 Kudos
Message 4 of 10
(3,631 Views)

Sorry, new to graphical programming and trying to clean up someones mess.  Can you get me started on a method of averaging my signal.  The signal is generated from an O2 sensor > NI 9206 > cDAQ 9172 > Lab View 8.2 > DAQ mx Read > 1D Array of Waveform (DBL) >from there the signal has been split and sent to various indicators, two of those splits go to a merge >convert to dynamic data > waveform chart.  All of this is in the attachment.

 

 Thanks,

BLW

 

 

0 Kudos
Message 5 of 10
(3,607 Views)
Here a pic of what I tried but now I get no signal.
0 Kudos
Message 6 of 10
(3,605 Views)
Solution
Accepted by BLW

It would be easier to look at if you posted your actual VI.  That way we can see some of the settings in the Express VI's.

 

Without seeing the code, my guess is this.  You have a dynamic datatype of multiple datastreams.  One of them get converted to an array.  The mean of that is taking so you wind up with a single value.  That gets converted back, to a dynamic datatype, merged with the other signals and plotted.  Now if you were plotting 10 samples per iteration before, now you are plotting 10 per for most datastreams, but only 1 sample for the averaged data stream.  So it falls behind on the waveform chart.

 

Please post your VI.  First run it to collect some data.  Then go to Edit Make Current Values Default.  Save it, then post it.  Now we can see your VI with some real data it in so we can inspect it.

0 Kudos
Message 7 of 10
(3,603 Views)
So, I did the attached configuration.  I added (Mean) to the O2 input line and now this configuration crashes LabVIEW once I start the VI.  Any help is appreciated.
0 Kudos
Message 8 of 10
(3,601 Views)
0 Kudos
Message 9 of 10
(3,597 Views)

I applied a mean calculation to both inputs and solved the problem.  Thanks!  I'll look into the Race condition and proabably post tomorrow morn, I'll look forward to your help.  Thanks again.

BLW

0 Kudos
Message 10 of 10
(3,583 Views)