LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My data cannot be fitted by exponential fit vi

My front panel is like this:

 curve fit.JPG

and my block diagram is:

curve fit2.JPGIt just fitted like using linear method. Besides, i've tried to fit this set of data by matlab and it works. So, i think there must be something wrong in programming. Please advice. Thanks!

0 Kudos
Message 1 of 13
(5,380 Views)

Hi sham.

 

Where exactly are you facing the problem? Isnt the graph display correct? 

0 Kudos
Message 2 of 13
(5,373 Views)
U can see that the fitting curve is surely not an exponential curve......not fitted very well...
0 Kudos
Message 3 of 13
(5,369 Views)
Did you try the exponential fit.vi in Functions palette>Mathematics>Fitting ?
0 Kudos
Message 4 of 13
(5,362 Views)

How old is your LabVIEW version?

 

From your graph, it looks like you have a significant offset, but you are only fitting with two parameters:

 

"y=A*exp(-B*x)" instead of "y=A*exp(-B*x) + C".

 

You need a better model. (Newer version of LabVIEW include an offset).

Message 5 of 13
(5,359 Views)

You might also try the "curve fitting express VI". The default nonlinear model is an exponential with offset. Make sure the initial estimate for b is negative.

 

Message Edited by altenbach on 11-23-2009 11:42 PM
0 Kudos
Message 6 of 13
(5,354 Views)
Mine is LabView 7.1. I've tried the fitting express. It can be fitted perfectly with Polynomial method, however, it is poor by exponential method. Actually, i got the equation similar to y=A*exp(-B*x) and i want to know the -B, therefore, i need to fit the data in an exponential curve....
0 Kudos
Message 7 of 13
(5,346 Views)

J Sham wrote:

My front panel is like this:


Your image looks like a very old example from the LaVIEW 4.0 days or similar. That code is ancient!

 

It seems silly to attach an image of the diagram showing the code for the polynomial fit if you are interested in the exponential fit. Right? There is no relevant information! We cannot run an image (unless it is a LabVIEW 2009 snippet!), so things might be much more clear if you would attach the actual VI.

 

For even better help, load your data as default values so we can play with it without much effort. (or attach a datafile).

0 Kudos
Message 8 of 13
(5,345 Views)

J Sham wrote:
Mine is LabView 7.1. I've tried the fitting express. It can be fitted perfectly with Polynomial method, however, it is poor by exponential method. Actually, i got the equation similar to y=A*exp(-B*x) and i want to know the -B, therefore, i need to fit the data in an exponential curve....

As I said, you can only fit for B with the above formula if your data can be descibed with a two paramter model. Just glancing at your data, it is obvious that it requires an offset for a good fit: y=A*exp(-B*x) + C. Only if you fit for the three paramter model will you get a good estimate for B.

 

How many paramters do you use in the matlab solution that you claim works?

Message Edited by altenbach on 11-23-2009 11:57 PM
0 Kudos
Message 9 of 13
(5,340 Views)
Here is the data code and the data file. I can fit it when i change the method to polynomial. I think i got three parameters. thanks for all your help and advice!
Download All
0 Kudos
Message 10 of 13
(5,337 Views)