08-04-2016 08:32 AM
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
Solved! Go to Solution.
08-04-2016 08:34 AM
By the way: I tried to do the same thing in LabView 2012. It's exactly the same problem.
08-04-2016 09:05 AM - edited 08-04-2016 09:18 AM
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.
08-04-2016 09:16 AM
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
08-04-2016 09:22 AM
Thanks, Taki. For some reasen, I further had to choose a smaller step size in the x-array. It works now.