The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Problems with Non Linear Fit
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mrodrch

Uruguay
4 Posts

Posted - 01/30/2015 :  2:53:08 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 9 and Service Release 2 (Select Help-->About Origin):
Operating System: Wnidows

I'm trying to make an adjustment with individual functions. I checked the function and when I simulate is correct. When I boot with the adjustment process converges iteration before achieving a good fit

Send my data

function
y=Im1*exp(1+(E1/(k*x)*(x-Tm1)/Tm1)-x^2/Tm1^2*(1-(2*k*x/E1))*exp(E1/(k*x)*(x-Tm1)/Tm1)-(2*k*Tm1/E1))+Im2*exp(1+(E2/(k*x)*(x-Tm2)/Tm2)-x^2/Tm2^2*(1-(2*k*x/E2))*exp(E2/(k*x)*(x-Tm2)/Tm2)-(2*k*Tm2/E2))

The fixed parameters are Tm1 and Tm2; 140 and 200
The bound; 0.2 <E1 <= 2 and 0.2 <E2 <= 2

This is the results

(1) Parameter Initialization was called.
(2) ----------Levenberg-Marquardt-----------
Reduced Chi-sqr = 1698162,33706
COD(R^2) = 0,15294505015344
Iterations Performed = 10
Total Iterations in Session = 10
(3) Fit converged. Chi-Sqr tolerance value of 1E-9 was reached.

5 2,46341
10 0,8244
15 0,10313
20 0,29958
25 1,41377
30 3,44568
35 5,24809
40 6,31115
45 9,31628
50 14,68626
55 26,23231
60 44,83497
65 69,2054
70 110,21051
75 179,24019
80 287,22181
85 445,6269
90 645,92211
95 900,82119
100 1205,49243
105 1534,52835
110 1860,56577
115 2161,52356
120 2438,06186
125 2676,50047
130 2864,8002
135 3001,37645
140 3094,20868
145 3186,33697
150 3265,43311
155 3321,46959
160 3371,49347
165 3395,78494
170 3442,81065
175 3486,86242
180 3495,40693
185 3487,75464
190 3463,95962
195 3424,36965
200 3346,33483
205 3238,69012
210 3099,48259
215 2927,06468
220 2766,13382
225 2575,89092
230 2363,13597
235 2146,0396
240 1923,92161
245 1693,23932
250 1469,01185
255 1259,71283
260 1041,11429
265 864,20037
270 703,07175
275 542,0832
280 411,86688
285 283,85779
290 182,46308
295 95,90445
300 48,26457
305 7,53054
310 -22,52017
315 -23,08764
320 -21,15064
325 -35,52256
330 -35,55912
335 -30,81309
340 -21,28447
345 -6,97326
350 12,12054

snowli

USA
1388 Posts

Posted - 01/30/2015 :  4:18:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Could you let me know the initial values you set for parameters: k, Im1, E1, Im2 and E2, since when I try to define a fitting function below and fit, I got Fit didn't converge with my initial values set.

BTW, in NLFit dialog, if you go to Settings tab.
Choose Advanced on left panel.
Expand Fit Control node.
You can change the Tolerance and Max Number of Iterations

Thanks, Snow

Edited by - snowli on 01/30/2015 4:20:57 PM
Go to Top of Page

mrodrch

Uruguay
4 Posts

Posted - 01/30/2015 :  9:43:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear snow,

Sorry I forgot to mention that k=0,00008617
My starting value were:

Tm1=130 (fixed); bound >0
Im1=2000 ; bound >0
E1=0,9
Tm2=200 (fixed) ; bound >0
Im2=3000 ; bound >0
E2 = 0.8
Go to Top of Page

snowli

USA
1388 Posts

Posted - 02/02/2015 :  10:15:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

I used the initial parameter values you provided to fit the data.

Before fitting, in Nonlinear Curve Fit dialog's Settings tab-> Advanced page.
I expanded Fit Control node.
Set Max Number of Iterations to 1800
Tolerance to 1E-20 to fit.

I did get
----------Levenberg-Marquardt-----------
Reduced Chi-sqr = 64552,3533396
COD(R^2) = 0,96828871211392
Iterations Performed = 1418
Total Iterations in Session = 1425
Fit converged - Chi-sqr no longer changed.

The parameter values I got after fitting are below. The fitted curve looks like two separate peaks. Tm1 and Tm2 look like peak locations. Must they be fixed locations? If I set them not fixed, the fit converges a little better.

k=0,00179
Tm1=130 (fixed)
Im1=2866,48714
E1=1,29144
Tm2=200
Im2=3434,19954
E2=1,99339



If I choose Analysis: Fitting: Simulate Curve...
In the dialog, load the user-defined function and enter parameter values (those I got after fit)
--> it looks two separate peaks as well.

What do you mean by "I checked the function and when I simulate is correct"?

I am going to ask our R&D to take a look of this question.

Thanks, Snow
Go to Top of Page

Sam Fang

293 Posts

Posted - 02/03/2015 :  05:05:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I tried to release Tm1 and Tm2, and get result:

Im1=2182.7359
E1=0.21034
k=2.92493E-4
Tm1=126.55407
Im2=3441.65995
E2=0.25426
Tm3=183.2177

Reduced Chi-Sqr = 1.08667e6


And the fitted curve looks like:


If you are not satisfied with the result, you may try to adjust your fitting function.

Sam
OriginLab Technical Services
Go to Top of Page

mrodrch

Uruguay
4 Posts

Posted - 02/10/2015 :  3:35:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,
Snow

The value of K must be constant

k=8.617e-005

When I traid to fit, I found

Reduced Chi-sqr = 1562468,88475
COD(R^2) = 0,14829800272777
Iterations Performed = 10
Total Iterations in Session = 10
(14) Fit converged. Chi-Sqr tolerance value of 1E-9 was reached.


What I am doing wrong?
quote:
Originally posted by snowli

Hello,

I used the initial parameter values you provided to fit the data.

Before fitting, in Nonlinear Curve Fit dialog's Settings tab-> Advanced page.
I expanded Fit Control node.
Set Max Number of Iterations to 1800
Tolerance to 1E-20 to fit.

I did get
----------Levenberg-Marquardt-----------
Reduced Chi-sqr = 64552,3533396
COD(R^2) = 0,96828871211392
Iterations Performed = 1418
Total Iterations in Session = 1425
Fit converged - Chi-sqr no longer changed.

The parameter values I got after fitting are below. The fitted curve looks like two separate peaks. Tm1 and Tm2 look like peak locations. Must they be fixed locations? If I set them not fixed, the fit converges a little better.

k=0,00179
Tm1=130 (fixed)
Im1=2866,48714
E1=1,29144
Tm2=200
Im2=3434,19954
E2=1,99339



If I choose Analysis: Fitting: Simulate Curve...
In the dialog, load the user-defined function and enter parameter values (those I got after fit)
--> it looks two separate peaks as well.

What do you mean by "I checked the function and when I simulate is correct"?

I am going to ask our R&D to take a look of this question.

Thanks, Snow

Go to Top of Page

mrodrch

Uruguay
4 Posts

Posted - 02/10/2015 :  3:42:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Sam,

The value of K must be constant, Tm1 and Tm2 should be constant, I found that the value of E1 and E2 are two low and that the fitting procedure traid to lower this value.





quote:
Originally posted by Sam Fang

I tried to release Tm1 and Tm2, and get result:

Im1=2182.7359
E1=0.21034
k=2.92493E-4
Tm1=126.55407
Im2=3441.65995
E2=0.25426
Tm3=183.2177

Reduced Chi-Sqr = 1.08667e6


And the fitted curve looks like:


If you are not satisfied with the result, you may try to adjust your fitting function.

Sam
OriginLab Technical Services

Go to Top of Page

Sam Fang

293 Posts

Posted - 02/10/2015 :  9:24:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I think you need check your function. For current fitting function and initial parameters, it seems we can't get a better result.

Sam
OriginLab Technical Services
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000