% TRANSIENT ANALYSIS I1=I0*((expm1((q*.5)/(K*T))));%I at forward bias voltage of 0.5V for t=0:10E-7:5E-4 %graph will be plotted only on these values since this is where the region of interest lies t1(k,1)=t; Qp(k,1)=I1*Tp*(exp(-t1(k,1)/Tp)); %Function of one variable Vt(k,1)=((K*T)/q)*log(((I1*Tp*exp((-t/Tp)))/(q*A*Lp*pn))+1); %Function of one variable k=k+1; end %Ploting V is I figure ts1=timeseries(Vt); ts1.Name='v(t)'; ts1.TimeInfo.Units='us'; plot(ts1);
%plot Qp(t) vs t in off condition figure ts2=timeseries(Qp); ts2.Name='Qp(t)'; ts2.TimeInfo.Units='us'; plot(ts2); %Plot of Qp(t) in On condition figure s= linspace(0,1e-4,1000); Qb = I1*Tp*(1-exp(-s/Tp)); plot(s,Qb); xlabel('time'); ylabel('Qb') title('Qp in On condition');
k=1; l=1; for x=0:.001:.06 x1(l,1)=x; for t=0:10E-7:5E-4 %as the graph will both be a function of t and x t1(1,k)=t; delpt(l,k)=pn*(exp((q*Vt(k,1))/K*T)-1)*(exp(-x/Lp)); k=k+1; end l=l+1; k=1; end %plot del p(xn,t) vs x(n) for forward bias figure plot(x1,delpt);