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
 All Forums
 Origin Forum
 Origin Forum
 NLF of coupled functions

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
sming Posted - 07/11/2017 : 10:04:20 AM
Origin Ver. 9.1.0
Operating System: Win7

Hi there,

I´m struggling with a nonlinear fit of coupled functions. Initial, I got measurement data TPR(x) in dependency of depth x for different field sizes s.



These TPR curves follows the fitting function with the parameters D, b, a, m and n:

TPR(x) = (D+(1-D)*(1-b^x))*a*exp(-m*(1-n*x)*x)

The (global) fitting procedure is quite easy with a user defined function in the nonlinear fitting tool.




But the obtained parameters should themselves linked to a functional expression according to s with three parameters. For instance:

b(s) = a1*(1-b1^s)+c1*s
a(s) = a2 + b2*exp(-s/c2)


(for m(a3,b3,c3) and n(a4,b4,c4) the same equation as for a can be used)

After NLFit:



For the a parameter the fit is acceptable,but for the b parameter there is potential for improvement. To get a better balance between the fits is it possible to make a parallel NLFit (optimization) of all equations and not sequential like in my post? Maybe implicit function can be used?

Any help is welcome. Many thanks in advance.
3   L A T E S T    R E P L I E S    (Newest First)
AmandaLu Posted - 07/17/2017 : 01:51:15 AM
Hi,

I’m not sure what you mean by “control the balance of fits or put some weights on several functions”. There is only one function in your fitting, even though you put it in several lines. Do you want to set different weight for every set of data? If so, you can set weight in the Data Selection page.

Thanks,
Amanda
OriginLab Technical Service
sming Posted - 07/14/2017 : 06:12:52 AM
Hi Amanda,

thank you for your answer. Based on your explanation I could set up the function and successfully perform the NLFit. Now I'm almost happy. Is it possible to control the balance of fits or put some weights on several functions, e.g main focus on function (TPR)?

Thanks in advance.

AmandaLu Posted - 07/12/2017 : 05:47:58 AM
Hi,

You can define a user-defined function including all equations and use Global Fit to fit all Y dataset in one time. That is,

1. Define your function. On Name and Type page of the Fitting Function Builder dialog (Tools: Fitting Function Builder), select “Equations” for “Function Type”.
On Variables and Parameters page, define “Parameters”: D,s,a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4.
On Multiple Equations page, define function as:
b = a1*(1-b1^s)+c1*s;
a = a2 + b2*exp(-s/c2);
m = … ;
n = … ;
y = (D+(1-D)*(1-b^x))*a*exp(-m*(1-n*x)*x);

2. Perform Global Fit by Nonlinear Curve Fit dialog. Highlight column B to H and open NLFIT dialog. Select the function you defined in step1.
Go to Data Selection page, set Multi-Data Fit Mode = Global Fit.
Go to Parameters tab. Select “Share” checkbox for a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4. Select “Fixed” checkbox for s, and set s = 1, s_2 = 3, s_3 = 8, s_4 = 16.


Thanks,
Amanda
OriginLab Technical Service

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000