2nd order differential eqn for Windkessel model
28 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Nang Su Lwin
am 22 Nov. 2022
Bearbeitet: Torsten
am 22 Nov. 2022
I am struggling to solve this 2nd order ODE in matlab for a 4WK Parallel Windkessel model, this is what I have so far for my input and outputs for a 2WK model, a 3WK model (attached).
I am trying to solve a 2nd order ODE:
I''(R*L*C*r) + I'(L*(R+r)) +I*(R*r) = Y"(L*C*R)+Y'(C*R*r +L)+ Y*r
I is :
I=@(t)I0*sin((pi*t)/Ts).^2.*(t<=Ts); %input current flow
t=0:0.001:Tc;
Initial conditions for Y(0)= 80, the rest of the variables are known constants.
Thanks in advance!
7 Kommentare
Akzeptierte Antwort
Torsten
am 22 Nov. 2022
Bearbeitet: Torsten
am 22 Nov. 2022
I = @(t) I0*sin((pi*t)/Ts).^2.*(t<=Ts); %input current flow
Idot = @(t) I0*2*sin(pi*t/Ts).*cos(pi*t/Ts)*pi/Ts.*(t<=Ts);
Idotdot = @(t) I0*2*(cos(pi*t/Ts).^2 - sin(pi*t/Ts).^2)*(pi/Ts)^2.*(t<=Ts);
fun = @(t,y)[y(2);(Idotdot(t)*(R*L*C*r)+Idot(t)*(L*(R+r))+I(t)*(R*r) - (y(2)*(C*R*r+L)+y(1)*r))/(L*C*R)];
y0 = [80 ;0];
tspan = [0 5/6];
[T,Y] = ode45(fun,tspan,y0)
2 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!