LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nonlinear curve fitting using labview

Sir, Data txt file is attached herewith.

0 Kudos
Message 11 of 27
(3,659 Views)

Are you interested in learning LabVIEW?  What is your present level of LabVIEW ability?  How adept are you at math and statistics (do you know what "Least Squares" means, and can you derive the equations/methods to fit a second-order polynomial through a set of data points)?

 

As you probably know, LabVIEW is designed to create (software) Laboratory Virtual Instruments for handling a variety of engineering tasks (it is an Engineering Workbench).  [Note that if you pay attention to the capital letters in the previous sentence, you can deduce where LabVIEW gets its name and particular spelling].

 

It has a number of tools for doing other tasks, such as fitting functions to data.  It really helps before diving into some of these (rather advanced) tools to have some understanding of the math and statistics, to say nothing of having sufficient experience with the mechanics of LabVIEW as a programming paradigm.  So far, you've demonstrated little interest in LabVIEW or math, only seeking to have a particular equation fit to a particular data set.  How about your doing some of the work -- show us your LabVIEW code (attach the actual VI, no more useless pictures, please!) where you read in your data, organize it appropriately, and set up the calls to one of the fitting VIs found on the Mathematics Palette (under "Fitting")?

 

Bob Schor 

Message 12 of 27
(3,639 Views)

Thank you very much for your valuable suggestions.

 

I took some time and still learning labview basics. 

I got the attached VI from other discussion and I tried to learn.

I could understand about the following things:

data input through "read spreadsheet" 

selecting the fit model (where f(x) is default) according to the data.

iterations and varying parameters to get best fit.

 

But I need your help to learn well about these. For a particular default functions and fit models, it is easy to load data and fit. How to create a new user defined function for fitting the data. 

 

Kindly help and support me in this regard. 

 

 

0 Kudos
Message 13 of 27
(3,597 Views)

You are using LabVIEW 9, no wonder you could not look at the examples I linked earlier. Do you have access to a newer LabVIEW version?

 

Your file read functions are odd. Are they part of signalexpress? I would recommend to use the plain "read from spreadsheet file". Work with plain DBL arrays. No need for waveform data or dynamic data or express VIs.

 

To create new user defined functions, you could turn the "model description" diagram constant into a control, but it will be difficult to enforce proper syntax from the average user.

Message 14 of 27
(3,587 Views)

Thank you very much for your reply.

 

I am using labview 2011. 

As you said, I tried with plain "read from spread sheet", I could not get the correct plot.

it is looking like x and y axis are interchanged. i saw the data through build table also. 

coloums are separated by space (single tab) and rows are by next line. Is it required to change any thing to read all rows and coloumns as in the txt file?

Download All
0 Kudos
Message 15 of 27
(3,576 Views)

Seems to work just fine...

 

(Please do a few simple tutorial and try to get away from express VIs. You are missing some very basic but essential LabVIEW skills)

 

Download All
Message 16 of 27
(3,563 Views)

Thank you very much. Now, I understood.

if we give the user defined function in the "model description" of non-linear curve fit, will it work?

 

0 Kudos
Message 17 of 27
(3,549 Views)

Yes, if done correctly, it will work of course.

0 Kudos
Message 18 of 27
(3,545 Views)

Do you have a website explaining the nonlinear model?

 

With your current inputs, (x-c) can be negative, which is not allowed unless the exponent in an integer. 

0 Kudos
Message 19 of 27
(3,529 Views)

Sir, Please find the attachment for the details of the nonlinear fit model.

 

only the theory and derivations are menditoned in website and research artciles. so I prepared a short notes with the required details.  

0 Kudos
Message 20 of 27
(3,498 Views)