LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set upper and lower bound in the Levenberg Marquardt Non-linear curve fit VI ?

I cannot set the upper bound and lower bounds to the fit parameters when I try to fit two parameters using the Levenberg Marquardt curve fit VI. The parameters go on changing indefinitely and it tends to produce totally irrelevant fits to the input data.
0 Kudos
Message 1 of 5
(4,222 Views)

What is your LabVIEW version?

 

Newer LabVIEW versions include the "Constrained nonlinerar curve fit" that lets you set bounds on paramters.

0 Kudos
Message 2 of 5
(4,219 Views)

Rito wrote:
The parameters go on changing indefinitely and it tends to produce totally irrelevant fits to the input data.

You should also ensure that you use reasonable paramter estimates. Calculate the function for the estimates and graph it with your data. How close are you? does the calculated function reproduce all major features of the data?

 

Of course it can also mean that your model is over-paramterized or otherwise unsuitable in its current form.

 

Basically, if your model is incorrect, it might just stick at the parameter boundaries and you won't learn anything new by fitting. You should also inspect the covariance matrix to see which paramters have problems.

 

Can you tell us a bit more about the model you are trying to fit and how the data looks like.

Message Edited by altenbach on 08-26-2008 12:49 PM
0 Kudos
Message 3 of 5
(4,218 Views)
I am using Labview 8.2.1. The model works well when I tried to fit using simulated data from the vi and adding some noise to it. But now when I am trying to fit with actual data where the data is well far off the initial guess, the results which I am getting after the fit give even worse fits than the initial guess and the error increases indefinitely.
0 Kudos
Message 4 of 5
(4,207 Views)

Rito wrote: 
But now when I am trying to fit with actual data where the data is well far off the initial guess, the results which I am getting after the fit give even worse fits than the initial guess and the error increases indefinitely.

You need to ensure that your initial guesses are reasonable. If things are far off, it may not work.

 

Attach your model and some data and I'll have a look.

0 Kudos
Message 5 of 5
(4,202 Views)