フィルターのクリア

Unable to meet integration tolerances without reducing the step size below the smallest value allowed

1 回表示 (過去 30 日間)
Hi.
I have a problem with drawing a plot. Please guide me.
My program is as follows:
main:
tspan = [0 5e-9];
y0 = [0.2,0.2,0.2];
[t,y] = ode45(@rate_fano,Time,y0);
size(t);
t=t*1e9;
y = abs(y);
params % input of needed parameters
figure(1)
plot(t, y(:,1)); % divided to normalize
xlabel('time [ns]','FontSize',14); % size of x label
ylabel('Arbitrary units','FontSize',14); % size of y label
set(gca,'FontSize',14); % size of tick marks on both axis
legend('N', 'Location','SE') % legend inside the plot); % divided to normalize
figure(2)
plot(t, y(:,2)); % divided to normalize
xlabel('time [ns]','FontSize',14); % size of x label
ylabel('Arbitrary units','FontSize',14); % size of y label
set(gca,'FontSize',14); % size of tick marks on both axis
legend('A+', 'Location','SE') % legend inside the plot); % divided to normalize
function:
% N == y(1)
%A+ == Y(2)
%A- == Y(3)
function yx = rate_fano(t,y)
params % input of needed parameters
r_R=(-p*gamma_c)/(1i*(deltac)+gamma_T);
U=(2.*epsilon0.*ref_index.*ref_indexg)./(hbar_ev.*w_s);
B=(1+(abs(r_R))).*(1-(abs(r_R)));
D=(conf.*(g_n)-henry_i);
sigmaa=U.*((B./D));
yx(1)=I./(e.*V_a)-y(1)./tau1-(V_g.*g_n.*(y(1)-N_0).*sigmaa.*(abs(y(2)))^2)./V_m;
yx(2)=1/2*(1-1i*henry).*conf.*V_g.*g_n.*(y(1)-N_ss).*y(2)+gamma_L.*((y(3)./r_R-y(2)));
yx(3)=(-1i.*deltaw-gamma_T).*y(3)-p.*gamma_c.*y(2);
yx= yx';
parameters:
c = 2.99792458e8;
e = 1.6021766208e-19;
h = 6.626068e-34;
h_eV = h/e;
hbar = h/(2*pi);
hbar_ev = hbar/e;
epsilon0 = 8.854187817e-12;
p=-1;
L = 5e-6;
A = 0.21e-12;
conf = 0.5;
conf_NC =0.3;
V_a=A*L;
V_m = V_a/conf;
V_NC=0.24e-18;
ref_index = 3.5;
ref_indexg=3.5;
V_g = c/ref_index;
tau1 = 0.5e-9;
g_n = 5e-21;
N_0=1e24;
N_ss=1e24;
I =0.5e-3;
henry_i=10;
henry = 1;
Qt = 500;
Qi = 14300;
Qp = 10000;
lambda0 = 1554e-9;
deltalambda = 0.01e-9;
lambda_start = 1540e-9;
lambda_end = 1560e-9;
lambda = lambda_start:deltalambda:lambda_end;
omega = 2*pi*c./lambda;
omega0 = omega(find(lambda==lambda0));
gamma_i = omega0/(2*Qi);
gamma_p = omega0/(2*Qp);
gamma_T = omega0/(2*Qt);
gamma_c = gamma_T-gamma_i-gamma_p;
gamma_L=V_g/(2*L);
w_r=1.2121*10^15;
w_s=1.2121*10^15;
w_c=1.2125*10^15;
rho=(2*epsilon0*ref_index*c)./gamma_c.*hbar_ev.*w_r;
r_L=1;
deltaw=0*gamma_T;
deltac=1.2125*10^15-1.2121*10^15;
  2 件のコメント
Star Strider
Star Strider 2020 年 3 月 11 日
The error in the title of your Question indicates that ode45 encountered a singularity (±Inf), and stopped because of that. You first need to check your code to be certain there are no errors, including parameter magnitudes. If there are none, then it is simply not possible to integrate your function over the complete time span you want.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by