LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiparameter nonlinear multi-curve fit How to?

Solved!
Go to solution

(xpost: http://lavag.org/topic/11870-multiparameter-nonlinear-multi-curve-fit/

 

There is a model of a physical process formalized in LabVIEW simulation toolkit. It take a set of parameters, and produces time dependencies of observables. I have an experimental data, same time dependencies of observables, but measured on a real system. I would like to get the set of parameters, so that model curves will fit experimental. I have an idea of the initial values of the parameters. Sample of data is provided below:

Clipboard02.png



Points are experimental data, curves are the results of manual fitting, using the above mentioned model.

Had there been one curve, it would have been easy. I would have used NonlinearCurveFit.vi, and supply it with a reference to a model curve generating VI. What can I do with multiple curves? I really would like to avoid porting the fitting

algorithm from the Numerical Recipes. I would also like to avoid writing a wrapper (OriginC <-> LabVIEW) to do a linked fit in Originlab Origin. I can use Matlab, of course, but it will require writing another wrapper. Is there a quick way of doing it, without leaving LabVIEW?

0 Kudos
Message 1 of 5
(4,220 Views)
Solution
Accepted by topic author mzu

One way to do this is to "stack" your different curves into a single 1D array and fit them.  Here is an example of fitting a*exp(-x/x0) and a(1-exp(-x/x0)) simultaneously.  In exponentials.vi I take a single x array and output concatenated arrays for f(x,a) as well as the derivatives.  In the curve fitting routine, there is no requirement that x be single valued or continuous, or ordered, etc.  It is just a pile of data, and as long as you can properly calculate a guess for each data point you are alright.

 

 

Message Edited by Darin.K on 02-03-2010 11:40 AM
Download All
Message 2 of 5
(4,199 Views)
Great idea, will try.
0 Kudos
Message 3 of 5
(4,196 Views)

Can you convert this to LabView 8.6?

Thanks in advance.

0 Kudos
Message 4 of 5
(3,992 Views)

In LV8.6

 

 

Download All
Message 5 of 5
(3,988 Views)