LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

One data point every 10 seconds. How can I smooth the data in "real time"?

Solved!
Go to solution

@Kevin_Price wrote:

@Qbach wrote:

...I could probably read the same value for 10 seconds at a high sampling rate but I don't see the benefit of it.


Your question was about smoothing your data.  Since you aren't satisfied simply living with the raw reading you take 1 time every 10 seconds, I'm suggesting that the estimate you can make by oversampling and locally smoothing right near those 10 second marks will be an improvement.  Otherwise, the only data available to run a smoothing algorithm is 10, 20, 30+ seconds old.  I find it hard to believe that'd be *more* relevant.

 

The whole point is that you won't be reading the same value for 10 seconds at a high sampling rate.   Variations or noise in your process, your sensor, or your signal path will see to that.  If none of those things were changing, you wouldn't have asked about smoothing in the first place.

 

 

-Kevin P


The thing with my analytical tool is that it acquires a lot of data that I have no way to access (the built in software performs a ton of data treatment) and really only returns one value every 10 sec. Then, nothing happens for 10 secs until I get a new value. That is unfortunately how the machine is set up and I have no influence on that Smiley Embarassed

0 Kudos
Message 11 of 15
(1,017 Views)

Gotcha.  Never mind then.  I was thinking data acq you could control rather the constrained situation you really have.  Sorry for diverting the thread.  I'm not knowledgeable in the field, but I've had conversations with folks who used Kalman filtering when their process wasn't supplying data fast enough.  As I understand it, you'd typically need a decent dynamic model of your process and knowledge of its inputs to pull this off.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 12 of 15
(1,001 Views)

Even better, there is a Savitsky-Golay Pt-by-Pt Filter that will do exactly what you're asking for.

Message 13 of 15
(978 Views)

@Kevin_Price wrote:

Gotcha.  Never mind then.  I was thinking data acq you could control rather the constrained situation you really have.  Sorry for diverting the thread.  I'm not knowledgeable in the field, but I've had conversations with folks who used Kalman filtering when their process wasn't supplying data fast enough.  As I understand it, you'd typically need a decent dynamic model of your process and knowledge of its inputs to pull this off.

 

 

-Kevin P


Is was also looking into the Kalman filter as well, but it is also my understanding that I need a proper model of my state space. And I am far away from that.

 

GregS, that I actually the filter I am using now. It is easy to set up and next week I will visit our collaborators to use it with actual data. I am really looking forward to this 🙂

 

0 Kudos
Message 14 of 15
(963 Views)

The SG filter vi will do polynominal fit of order n at the center of 2 times sidepoints (left and rigth) (+1).

So use a a ring buffer of last x points, fit a polynom of order n and with these polinom parameters you can filter and estinate a datapoint at any position. Additional feature: you can use a weigthning on your datapoints:)

 

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 15 of 15
(950 Views)