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!