07-14-2009 08:53 AM
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
Solved! Go to Solution.
07-14-2009 09:00 AM
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.
07-14-2009 09:05 AM - edited 07-14-2009 09:09 AM
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?
07-14-2009 09:10 AM
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
07-14-2009 02:14 PM
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
07-14-2009 02:36 PM
07-14-2009 02:56 PM
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.
07-14-2009 03:00 PM
07-14-2009 03:09 PM
07-14-2009 03:20 PM
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