Also, there seems to be 4 variables, not three. Below is the modified code I used and the results I get with your parameters. Again, check the values and the units.
Pp=y(1);
Ps=y(2);
PASE_plus=y(3);
PASE_minus=y(4);
W12=(((sigmasa*gammas)/(h*Vs*A))*(Ps+PASE_plus+PASE_minus));
W21=(((sigmase*gammas)/(h*Vs*A))*(Ps+PASE_plus+PASE_minus));
R=((Pp*gammap*sigmapa)/(h*Vp*A));
N1=(rho*((1+W21*t)/(1+(W12+W21)*t+R*t)));
N2=(rho*((R*t+W12*t)/(1+(W12+W21)*t+R*t)));
dydz(1)=Pp*gammap*(sigmape*N2-sigmapa*N1)-alfap*Pp;
dydz(2)=Ps*gammas*(sigmase*N2-sigmasa*N1)-alfas*Ps;
dydz(3)=PASE_plus*gammas*(sigmase*N2- ...
dydz(4)=-PASE_minus*gammas*(sigmase*N2- ...
And this is how I call the|ode| solver:
[z,y]=ode45('signalFW',[0 20],[10 0.001 0 0]);
figure(1),subplot(2,1,1),plot(z,y(:,1:2)),grid on,ylabel('Power in mW'),legend('Pp','Ps');
subplot(2,1,2),plot(z,y(:,3:4)),grid on,xlabel('length EDFA in m'),ylabel('Power in mW'),legend('PASE+','PASE-');
This gives me the following results:
Is that what you'd expect? If not, check the values of your parameters.
Arnaud
Best Answer