필터 지우기
필터 지우기

Help Using Simulink tp draw ODE

조회 수: 2 (최근 30일)
Dylan
Dylan 2014년 2월 3일
댓글: Mischa Kim 2014년 2월 4일
Hi,
I was wondering if someone could help me create a basic differential equation in Simulink. I'm trying to create the following equations
I tried using this as an example ODE to help me solve this problem but it doesn't seem to help. The link above has a very similar ODE. When I create two of what is done in the example and try and connect it to a XY Graph I don't get anything so I'm doing something wrong but am not sure what. Thanks for any help.
  댓글 수: 1
Mischa Kim
Mischa Kim 2014년 2월 3일
Please add follow-up questions as comments to the respective answer.

댓글을 달려면 로그인하십시오.

답변 (2개)

Mischa Kim
Mischa Kim 2014년 2월 3일
Dylan, the basic structure looks like this:
Try using an embedded MATLAB function to compute the state derivative
function Xdot = fcn(X, u)
Xdot = [0; 0];
x = X(1);
y = X(2);
Xdot = [y*u; -x*u];
end
As a final note, make sure to adjust the limits in the XY Graph according to the signal outputs.
  댓글 수: 1
Mischa Kim
Mischa Kim 2014년 2월 3일
Double-click the integrator block and add the intial conditions, e.g., [1; 1] ;

댓글을 달려면 로그인하십시오.


Dylan
Dylan 2014년 2월 3일
Hey,
I seem to be having some issues. I created the circuit like you did,
and used the following function
But when I run it I don't get anything on the graph
Am I doing something wrong? Also how would I go about entering in initial conditions for X and Y if they were given. Thanks for your help.
  댓글 수: 1
Mischa Kim
Mischa Kim 2014년 2월 4일
Dylan, could you please post follow-up questions as comments? Did you get it to work with setting the initial conditions? See comment on top.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by