01-26-2009 10:20 AM
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
01-26-2009 10:40 AM - edited 01-26-2009 10:43 AM
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?
01-26-2009 11:11 AM
01-26-2009 11:31 AM
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".
01-26-2009 01:07 PM
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.
01-26-2009 01:09 PM
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.
01-26-2009 02:31 PM
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.
01-27-2009 12:59 AM
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
01-27-2009 01:51 AM
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.
01-27-2009 02:47 AM
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