how to create equation from continuous state of s-function results
1 次查看(过去 30 天)
显示 更早的评论
i hope that some one can help me...
This is regarding to my s-function m-file which contains 11 ODE equation.
sys(1) = -Kd*x(1) - (Fev*I.x(3).(1 - x(2))*Kp);
sys (2) = Kp*(1 - x(2)).*x(3);
sys(3) = (-Fev*x(3).x(3).(1 - x(2))./(1 + Fev*x(2))).*Kp
untill sys(11)
my 12 and 13 equation is from 11 ODE equation, as below:
dl = (x(3)+x(5) / x(8) +x(3))*102;
dk = (x(6) +x(4) / x(7) + x(9)) *102 ;
But i do not know how to create 12 and 13 equation in s-function file?should i put these equations in discrete state?
0 个评论
回答(1 个)
Kaustubha Govind
2012-2-20
If you need to run your S-function in continuous-time, you should denote dl and dk as continuous states, and return their values based on your equations from the Derivatives method. Run the following command at the MATLAB prompt to see an example.
>> edit msfcn_limintm
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Block and Blockset Authoring 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!