LabVIEW Development Best Practices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Linear Fit

Highlighted

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

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

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
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 2 of 9
(1,582 Views)

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
0 Kudos
Message 3 of 9
(1,582 Views)

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?

0 Kudos
Message 4 of 9
(1,582 Views)

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
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 5 of 9
(1,582 Views)

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
0 Kudos
Message 6 of 9
(1,582 Views)

Sorry my bad english

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

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
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 8 of 9
(1,582 Views)

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

Icaro Kossmann
LabVIEW 8.6 Newbie.
Brazil
0 Kudos
Message 9 of 9
(1,582 Views)