Anup
unread,Feb 12, 2013, 11:50:25 AM2/12/13You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
I am having some trouble when trying to solve a coupled ODE with constraints.
The ODE solver function (copied below) works when no constraints are used.
I need to limit (constrain) the force function Fpto = bpto*y(2) + cpto*y(1) within a certain range. The force, to be constrained, can be seen in the last statement of the copied code below.
Can someone please throw some light on how this can be done? Thank you very much for your time!
Kind regards, Anup
function [ypms] = WECmotion(t,y,A,B,C,D,Fe,tb_new)
m = 1.033553890374489e-07; c = 0; k = 2.702788060000000e+07; bpto=10^7; cpto=-10^7;
Fex_t = interp1(tb_new,Fe,t);
ypms(1,1) = y(2); ypms(3:10,1)=A*y(3:10)+B*y(1); ypms(2,1) = [Fex_t - c*y(2) - k*y(1) - C*ypms(3:10) - D*y(1) - bpto*y(2) - cpto*y(1)]*m;