i have written the code for power vs time of a semiconductor laser for my homework. if i Fourier transform it...wdnt i get the pwer vs freq graph|?? how will i Fourier transform it??
i use y=fft(p) but i am not getting it...pleasez help...i have given the code
mmm=0;
for nW=[1 3 5]
mmm=mmm+1;
mm=0;
Lam=405e-9;
q=1.6e-19;
alpha=1.2;
Tn=3e-9;
Tp=6.5e-12;
G0=9.0e-6;
N0 = 1.2e15;
h=6.6e-34;
c=3e8;
Gamma=.208;
beta=4.0e-4;
epsilon=3.4e-17;
Va=10.64e-11;
for I =.1e-3:.1e-3:3.97e-3;
mm=mm+1;
tini=0;
tfin=7e-9;
dt=1e-12;
m=0;
N(1)=0;
S(1)=0;
D(1)=0;
for t=tini:dt:tfin
m=m+1;
delN=I/(q*Va)-N(m)/Tn-G0*(N(m)-N0)*S(m)/(1+epsilon*S(m));
delS=-S(m)/Tp+Gamma*beta*N(m)/Tn+Gamma*G0*(N(m)-N0)*S(m)/(1+epsilon*S(m));
delD=.5*alpha*(Gamma*(N(m)-N0)-(1/Tp));
N(m+1)=N(m)+dt*delN;
S(m+1)=S(m)+dt*delS;
D(m+1)=D(m)+dt*delD;
P(m+1)=1000*Va*S(m)*.85*h*c/(Lam*2*Gamma*Tp);
tt(m+1)=t;
end
II(mm)=I*1e3;
Po(mmm,mm)=sum(P(1:4000))/4000;
N1(mmm,mm)=sum(N(1:4000)/4000);
S1(mmm,mm)=sum(S(1:4000)/4000);
D1(mmm,mm)=sum(D(1:4000)/4000);
Po1(mmm,:)=P;
Nt(mmm,:)=N;
St(mmm,:)=S;
Dt(mmm,:)=D;
end
end
figure(3)
plot(tt,Po1);
xlabel('Time (ns)')
ylabel('Output power (mW)')
title('Output power Vs Time')