LabVIEW Development Best Practices Discussions

cancel
Showing results for
Did you mean:

Linear Fit

Hi people.   How i make a VI with Linear Fit running in real-time?

Icaro Kossmann
LabVIEW 8.6 Newbie.
Brazil
Message 1 of 9
(3,197 Views)

Re: Linear Fit

Your question is not clear enough to give a good answer. What do you mean with realtime? Are you talking about some continous fit operation, like the Point by Point analysis VIs do? Or do you want to continously do a linear fit over acquired data sets that has to be able to keep up with the incoming data?

A continous fit would have some specific implications such that the fit obviously can't be very accurate at the start as you have little data available to fit to, but would gradually converge to the end result as your process continous. However if your signal is not a truely linear signal, meaning one that at some point will go back to zero to start increase (or decrease) again you get additional problems to detect this condition proberly and reset the analysis calculation. If it is a monotonous signal then I assume it won't be a long running experiment.

If you rather talk about the situation where you continously take a number of samples and perforrm a linear fit on that data set, but require this process to be on time, you would have to define your realtime criteria first such as duration of experiment, sample rate, calculation interval and available hardware processing power

Rolf Kalbermatter
Averna BV
Message 2 of 9
(1,556 Views)

Re: Linear Fit

So, this is my job: want to continously do a linear fit over acquired data sets that has to be able to keep up with the incoming data. I will acquire temperature in max 40 minutes, and i want to make a linear fit with each new temperature value durig acquisition. In real time.

Icaro Kossmann
LabVIEW 8.6 Newbie.
Brazil
Message 3 of 9
(1,556 Views)

Re: Linear Fit

Since you're talking minutes for real-time (versus, say, milliseconds), is there an issue with using the Linear Fit.vi under the Mathematics->Fitting pallet?

Message 4 of 9
(1,556 Views)

Re: Linear Fit

What is the sample rate of the data you intend to do, and what is the number of fits per second you want?

Rolf Kalbermatter
Averna BV
Message 5 of 9
(1,556 Views)

Re: Linear Fit

Its, seconds in axis (X) and temoperature in (Y), one value of temperature per second. I cant build de linear fit during acquisition, refresh my data every second, only after finish test.

Icaro Kossmann
LabVIEW 8.6 Newbie.
Brazil
Message 6 of 9
(1,556 Views)

Re: Linear Fit

Icaro Kossmann
LabVIEW 8.6 Newbie.
Brazil
Message 7 of 9
(1,556 Views)

Re: Linear Fit

 Kossmann wrote:Its, seconds in axis (X) and temoperature in (Y), one value of temperature per second. I cant build de linear fit during acquisition, refresh my data every second, only after finish test.

Of course can you do a continous acquisition. Look at DAQmx continous acquisition examples. They retrieve the data once or a few times per second for longer running acquisitions and display it in a graph. There is absolutely nothing that prevents you from passing this acquired data through a linear fit, or just about any other analysis function and displaying the analysis result instead or along with the original data.

Rolf Kalbermatter
Averna BV
Message 8 of 9
(1,556 Views)

Re: Linear Fit

Hmmmm, right, but can you show me an exaplme of it using linear fit?

Icaro Kossmann
LabVIEW 8.6 Newbie.
Brazil
Message 9 of 9
(1,556 Views)