Author |
Topic |
|
stuck123
4 Posts |
Posted - 03/10/2010 : 09:36:49 AM
|
origin 8pro v8.0891
I know I must be doing something silly as I'm new to orgin8 and not so good with fitting so I was wondering if someone could help guide me in setting up a fitting parameter for a stretched exponential fit. It seems to compile but does not converge.
the equation is y=a*[(1-exp(-(x/c)^d)] where a is say 5, and I need to work out c and d
Many thanks
Devin |
|
larry_lan
China
Posts |
Posted - 03/10/2010 : 09:55:30 AM
|
you should use parenthesis instead of square brackets. Besides, the parenthesis in your equation are not match.
y=a*(1-exp(-(x/c)^d))
Larry |
|
|
stuck123
4 Posts |
Posted - 03/10/2010 : 10:24:05 AM
|
Dear Larry,
Thanks for the info an obvious typo. I tried as you suggested but it still does not fit, the equation complies okay, but it fails to give a value for c and d and says in the report failed to converge code -207, reason unknown. I've listed a sample set of data, as you can see its appears quite simple, but I'm not able to get it working. Can you try and see what silly mistake I'm overlooking? It would be very much appreciated. Thanks
Devin
1 0 10 0.06 20 0.09 50 0.15 100 0.19 200 0.25 500 0.35 1000 0.45 2000 0.59 5000 0.95 10000 1.28 20000 1.94 50000 3.44
|
|
|
larry_lan
China
Posts |
Posted - 03/10/2010 : 8:43:03 PM
|
What's your initial values? Besides, I think maybe you can use the logarithm of X to fit, instead of raw data?
Larry |
|
|
stuck123
4 Posts |
Posted - 03/11/2010 : 04:44:31 AM
|
Hi Larry,
The original values are given below; time decay x-axis y-axis 1 0 10 0.06482 20 0.09761 50 0.15139 100 0.19746 200 0.25599 500 0.35799 1000 0.45712 2000 0.59482 5000 0.95417 10000 1.28721 20000 1.94697 50000 3.44041
I put this into Origin and plot a log-log graph which gives a linear plot which is good so far. From this I am trying to fit the data to a stretched exponential trace which then allows extraction of c and d, which are indicative of the decay performance.
Thanks Devin |
|
|
larry_lan
China
Posts |
Posted - 03/12/2010 : 01:52:33 AM
|
Hi Devin:
I am not talking the raw data but the parameter initial values. Maybe you can try this example to see what's initial values in user defined functions?
I defined this function and initialize all parameters by 1, and I got these results:
a 7523.76705 c 6.89268E10 d 0.54559
So, please give more details on what/how you did. Or I can't figure what's wrong on your side.
Thanks Larry OriginLab Technical Services |
|
|
stuck123
4 Posts |
Posted - 03/12/2010 : 11:58:56 AM
|
Hi Larry,
I was able to get it to converge after taking your suggetsions. When I plug in actual values for a it looks good on a linear plot, but on a log-log it is quite a poor fit, (much steeper and underestimating the lower values heavily).
a is fixed at 5.61, b and C are variable I get the following
a= 5.61 0 b= 61078.44073 5631.73702 c= 0.66983 .04265 Any ideas how I would improve the fit?
thanks Devin |
|
|
|
Topic |
|