LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView 2014 Exponential Fit VI doesnt return an offset

Solved!
Go to solution

Hi everybody,

I use LabView2014 and want to fit an exponential curve like A*exp(B*x)+C with the VI "Exponential Fit". In any case, the VI returns C=0 and tries to correct this mistake by using wrong A and B, which of course gives bad results. Any ideas? I attached my VI.

Thanks in advance,

Aaronski

0 Kudos
Message 1 of 5
(2,904 Views)

By the way: I tried to do the same thing in LabView 2012. It's exactly the same problem.

0 Kudos
Message 2 of 5
(2,899 Views)
Solution
Accepted by topic author aaronski

You have to give a better guess for the fitting parameters or give a tighter tolerance.

Right now, the default on the offset max is set to zero and your tolerance is set to 0.0001. When you get to large exponentials, the algorithm quits because it satisfies the tolerance quite early.

 

EDIT: Try reducing your ramp so that you aren't using e^100 in your fitting. For numbers that large, even using machine epsilon as the tolerance will result in the fit satisfying tolerance with a pretty rough fit. You could also try reducing the weight of the extremely large numbers in the fit.

0 Kudos
Message 3 of 5
(2,868 Views)

According to the help, I think you have to specify 'offset min' and 'offset max' in 'parameter bounds' cluster to get other offset values than 0.

UliB

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

Thanks, Taki. For some reasen, I further had to choose a smaller step size in the x-array. It works now.

0 Kudos
Message 5 of 5
(2,851 Views)