I want to solve this couple differential where the dot represent the derivative with respect to t/tp, where tp = 30E-9, is my code for solving this is correct? ?

1 view (last 30 days)
T = 2E3
i made this code
ti = 0; %inital time
tf = 70E-9;% final time
tspan=[ti tf];
T = 2000;
p = 0.05;
n = 1E-3;
a = 5; %(alpha)
f = @(t,y) [
(y(4).*y(1) - n.*y(2).*sin(y(3))) ;
(y(5).*y(2) + n.*y(1).*sin(y(3)));
(-a.*(y(5)-y(4)) + n.*((y(1)./y(2)) - (y(2)./y(1))).*cos(y(3)));
(p - y(4)-(1+2.*y(4)).*(y(1)^2))./T;
(p - y(5)-(1+2.*y(5)).*(y(2)^2))./T;
[time,Y] = ode45(f,tspan,[sqrt(0.05);sqrt(0.05);0;0;0.1]);
ylim([0.17 0.28])
the oupurt should be like this.
i think there is some parameter missing in my code which is tp maybe, because dot represent the t/tp and the plot is of time only, the T = ts/tp where the ts = 230E-6.
please give some idea regarding to this.

Answers (1)

David Goodmanson
David Goodmanson on 24 Jul 2022
Edited: David Goodmanson on 24 Jul 2022
Hi Sahil,
Since the constants are all of order 10^-3 to 10^3 or so, it's evident that normalized units are in play. So you have to wait for normalized time on that same order to see in something happen. Extending the final time to 2e4 reveals a bunch of oscillations, but the plot does not look at all like the one you posted. I don't know if the provided constants apply to the posted plot in particular. But the rationale for T = 2000 seemed a bit iffy so I tried some other values.
tf = 10e3;% final time
T = 200;
% also comment out the ylim statement
gives something that resembles the posted plot, including very similar max and min values of the oscillation. Not yet determined is what constant relates the normalized time to the actual time.

Community Treasure Hunt

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

Start Hunting!