transfer function for these system of differential equations

조회 수: 2 (최근 30일)
Fatima Amin
Fatima Amin 2020년 10월 28일
편집: Fatima Amin 2020년 10월 28일
Can anyone help me write the " transfer functions" for this system of equations please.
I have managed to solve the ODE's using the code below
function diffeqs= ode_sys(t,D)
x0= -1.6;
y0=1;
tauknot= 2857;
tautwo=10;
Irest1=3.1;
Irest2=0.45;
gama=0.01;
g = @(x1,t0,t,gama) integral(@(tau) exp(-gama*(t-tau)).*x1, t0, t);
f1= @(x1,x2,z) (x1.^3 - 3*x1.^2) .* (x1<0)+ (x2-0.6.*(z-4).^2).*(x1).*(x1>=0);
f2= @(x1,x2,z)((0).*(x2<-0.25))+(6.*(x2+0.25)).*(x2>=-0.25);
x1= D(1);
y1= D(2);
z = D(3);
x2= D(4);
y2= D(5);
Ddv_Div = [y1-f1(x1,x2,z)-z+Irest1;
(y0-(5.*x1^2)-(y1));
((1/tauknot).*((4*x1-4*x0)-z));
(-y2+x2-(x2.^3)+Irest2+0.002*(g(x1,t0,t,gama))- (0.3)*(z-3.5));
((1/tautwo).*(-y2+f2(x1,x2,z)));]
end
% the code is run through the lines below
range =[1:1:1];
%Initial condition
IC =[0,-5,3,0,0];
[tsol, Dsol ] = ode45(@ode_sys,range,IC);

답변 (0개)

카테고리

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