LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

levenberg marquardt

Hi to everybody

 

I am trying to make a curve fitting with the levenberg marquardt(obs).vi, but results are not what I expected. I introduce all the initial parameters, the model, and I obtain a ZERO value in error, but not a good fitting is obtained. What it is really happening is that I am allways obtaining the same values than initial for the Best fit coefficients. Can anyone help me???

 

I am using LV8.5

 

Thanks in advance

 

jm

0 Kudos
Message 1 of 15
(4,057 Views)

Which one is the levenberg marquardt(obs).vi? I am not familiar with that.

 

Typically you would use "nonlinear curve fit.vi".

 

If you would attach your code and some typical data, I would be happy to look it over. 😉

 

How many fitting parameters do you have? What is the covariance matrix? What is mse?

Message Edited by altenbach on 01-26-2009 08:43 AM
0 Kudos
Message 2 of 15
(4,050 Views)
Here you are.
0 Kudos
Message 3 of 15
(4,032 Views)

It is difficult to run an image. How about some real code and data? 😉

 

In any case, you are using an obsolete tool that is no longer supported. Please use "nonlinear curve fit.vi".

 

 


From the context help: LabVIEW no longer supports this VI. Use the Nonlinear Curve Fit VI instead.
0 Kudos
Message 4 of 15
(4,025 Views)

sorry for the picture...I thought this could be enough. Right now I am not in my office so I can not have access to the software. I will post it tomorrow morning.

Anyway, I have been probing with this "new2 tool you re talking about. But in my software, I must have the possibility of changing the model of the function to fit,

and I think it is not possible with this tool.

 

Thank you.

0 Kudos
Message 5 of 15
(4,013 Views)

Another thing: we do not have any "Typical data". This software gets the postion of a body in space in time, and analyze its position in each coordinates axis.

What I want to do is to fit this data with a non linear curve, but the movement can be really unexpected.

 

 

0 Kudos
Message 6 of 15
(4,011 Views)

jmhf wrote:

Another thing: we do not have any "Typical data". This software gets the postion of a body in space in time, and analyze its position in each coordinates axis.

What I want to do is to fit this data with a non linear curve, but the movement can be really unexpected.


Well, I am now a bit confused. You can only use Levenberg marquardt if you have a model. What is the mathematical model that you are trying to fit? What are the parameters?

 

Even if there is no "typical" data, attach a few datasets that you are trying to fit.

 

If you just want a smooth curve that follows the data, you could do a spline or polynominal fit with a sufficient mumber of coefficients.

0 Kudos
Message 7 of 15
(4,000 Views)

Hello,

 

sorry for my english because it is not good. I think I am not explaining well.

 

When I am saying that there is not some typical data, I mean that the model of the curve to fit

is different each time. For example, when I analyse a simple pendulum movement in XY plane,

the experimental data for the X position will be a sin(x), meanwhile the Y position will be a cos(X).

But if after this I study the movement along a inclined plane, the set of data will be really different from the

pendulum case. I want in any case to obtain the movement equation of the body.

So I am trying to do an application which let me to fit a set of data not always with the same model. I want to

analyse the experimental points, choose a model and try to fit.

If I make an spline I think I will not obtain the equation followed by data...it is not what I want.

 

I hope this to be clear.

 

Thanks for you help

 

jm

 

0 Kudos
Message 8 of 15
(3,981 Views)

OK, so you want to change the model interactively. Have you tried the new "nonlinear curve fit"?

 

Select the formula node version via the polymorphic selector and create a control for the formula node.

0 Kudos
Message 9 of 15
(3,966 Views)

Hi!!

 

I have just tried it!!. I read your mind!!!;)

 

In this case, I can change the model as I want. But I obtain an error code -23087.

 

Can you tell me waht this error due to?

 

Thanks in advance

0 Kudos
Message 10 of 15
(3,943 Views)