LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Levenberg Marquardt Issue

Hi,

I'm using a 1D nonlinear Lev-Mar fitting routine, and I find that my program does not fit accurately unless I upscale my y-data values (for example from .16 up to 16). I've read other posts related to this topic and one of them said to change the standard deviation, but that does not seem to affect the fit at all. The Lev-Mar routine just seems to converge right away instead of going through any iterations.

I've attached the 2 relevant VIs and a set of sample data. "TestVApprox6" sends the data to "VoigtApprox6" which then does the nonlinear fit according to the Fitting Equation on the front panel (I modified the formula node inside the Lev-Mar VI with that equation). There are subVIs which perform other calculations but right now I am just concerned with the fitting.

Any ideas?
Thanks for your time
-Stefano
Download All
0 Kudos
Message 1 of 9
(4,456 Views)
Please save your toplevel VI as application distribution, so it includes all required subVIs.
 
 
0 Kudos
Message 2 of 9
(4,450 Views)
You seem to use a modified Lev-Mar routine that you have not attached, so it is not clear what is going on. My best guess from the limited data is the following problem:
 
You wire an array of "1s" to the Stdev input, yet your Y data is in the range of 1e-4. This means that the fit is considered converged if it is within a stdev of 1. This is not good enough! Try replacing the diagram constant (near upper left corner in diagram) which is currenty "1" with e.g. "1E-6" and see if things improve. 🙂
0 Kudos
Message 3 of 9
(4,444 Views)
0 Kudos
Message 4 of 9
(4,441 Views)

I cannot open your llb... 😞

Message Edited by altenbach on 01-03-2006 02:21 PM

0 Kudos
Message 5 of 9
(4,438 Views)
Maybe this will work?
0 Kudos
Message 6 of 9
(4,433 Views)
Sorry, try again.
 
My mistake, please save as Development Distribution and make sure NOT to include VI.lib files.
0 Kudos
Message 7 of 9
(4,424 Views)
0 Kudos
Message 8 of 9
(4,411 Views)
ok hopefully this one will work
0 Kudos
Message 9 of 9
(4,401 Views)