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 for Programming
 Forum for Origin C
 Avoiding nonlinear constraints piecewise 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

harris.bra2

USA
1 Posts

Posted - 07/29/2018 :  3:39:56 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release: OriginPro2016 (64-bit) Sr2 b9.3.2.303
Operating System: Windows 7 Enterprise

Hello,

Similar to this forum post, https://my.originlab.com/forum/topic.asp?TOPIC_ID=11148 ,I would like to create various piecewise functions with both fitting and first derivative continuity. However, I am having trouble understanding how the function was re-parameterized to avoid nonlinear constraints. Any help in understanding this derivation is greatly appreciated.

Thanks

yuki_wu

896 Posts

Posted - 07/29/2018 :  10:27:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Actually you could take the issue of re-defining the fitting function as the issue of solving the equations. For example, the post you mentioned:

threshold_1: d0
y value at threshold_1: b0
derivative at threshold_1: k0


So we know that:

b0 = a0+a1*d0+a2*d0^2;
k0 = a1+2*a2*d0;


We define that:

parameter for the first quadratic: a

It means that:

b0 = a0+a1*d0+a*d0^2;
k0 = a1+2*a*d0;


So we can easily get that:

a1 = k0 – 2*a*d0;

and then:

a0 = b0 – k0*d0 + a*d0^2;

Now the function could be rewritten as:

y= b0 – k0*d0 + a*d0^2 + (k0 – 2*a*d0) *x + a*x^2;

and after modified:

y = b0 + k0*(x-d0) + a*(x-d0)^2;

Hope it helps.

Regards,
Yuki

OriginLab
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