LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LEV MAR Problem

Dear All,

I am developing a mathematical algorithms where on a step is indicated use the VI NonLinear Curve Fit Lev-Mar to fit a curve and obtain four parameters then used on next steps.

Attached my VI example

On White the portion fo curve ti fit.

On Red the results of Lev-Mar VI

On Green expected curve from the example of math algo.

May be something wrong on initial parameters ?

Thank on advance.

Download All
0 Kudos
Message 1 of 6
(2,704 Views)

As a first step, you should graph the model function using your initial guesses. You can see that it does not look anything like your data and it is unlikely that it will converge to a good solution. (inside the nonlinear curve fit is a strictly typed Vi reference. You can use that to calculate you model).

 

(I also strongly urge you to use the VI model version. The formula node version is not very efficient.)

 

The VI you have attached does not show anything green. did you attach the wrong VI?

0 Kudos
Message 2 of 6
(2,677 Views)

Do you have a link to  page describing the model?

 

 

0 Kudos
Message 3 of 6
(2,654 Views)

Annex C describe my math algoritms model step.
On file.png is shown the green trend expected from math algo.
On VI guess parameters should be 1, 2.5, 5, 9. But I am not sure because I have replicated the mathmatics model ( ud(t) shown on ANNEX C of doc 1) on excel sheet and it was impossible replicate green trend shown on file.png changing the parameters.

thanks

Download All
0 Kudos
Message 4 of 6
(2,626 Views)

Are you sure that your guess parameters are valid if you scale the x and y data from 0 to 1?

Also, in the book, the two t parameter guesses differ by about 200x while yours are similar.

 

I have not studied the model, but yesterday I made a quick draft that allows you to look at the model curve using the parameter guesses (you should always do that!) and you can make the curve look more similar by using different values. The fit still does not work, and we seem to be far outside the reasonable range for the guesses and parameters are strongly correlated. You simply need to play around.

 

As I said, you should really use the VI model instead of the formula, it will be orders of magnitude faster.

 

Message 5 of 6
(2,603 Views)

THANK YOU VERY MUCH !!
Following your advice I have reached my goal !
Your helps been very useful for me.

Luca

0 Kudos
Message 6 of 6
(2,587 Views)