11-23-2009 11:40 PM

My front panel is like this:
and my block diagram is:
It 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!
11-24-2009 12:51 AM
Hi sham.
Where exactly are you facing the problem? Isnt the graph display correct?
11-24-2009 01:10 AM
11-24-2009 01:20 AM
11-24-2009 01:28 AM
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).
11-24-2009
01:42 AM
- last edited on
10-09-2024
11:00 PM
by
Content Cleaner
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.

11-24-2009 01:47 AM
11-24-2009 01:52 AM
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).
11-24-2009 01:56 AM - edited 11-24-2009 01:57 AM
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?
11-24-2009 02:00 AM