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

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
harris.bra2 Posted - 07/29/2018 : 3:39:56 PM
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
1   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 07/29/2018 : 10:27:37 PM
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

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