clc; clear all; close all; clf;
cputime=0;
tic;
ln=1;
i=sqrt(-1);
Po=.00064; %input pwr in watts
alpha=0; % Fiber loss value in dB/km
alph=alpha/(4.343); %Ref page#55 eqn 2.5.3 Fiber optic Comm by GP Agrawal
gamma=0.003; %fiber non linearity in /W/m
to=125e-12; %initial pulse width in second
C=-2; %Input chirp parameter for first calculation
b2=-20e-27; %2nd order disp. (s2/m)
Ld=(to^2)/(abs(b2)); %dispersion length in meter
pi=3.1415926535;
Ao=sqrt(Po); %Amplitude
%----------------------------------------------------------
tau =- 3072e-12:1e-12: 3071e-12;% dt=t/to
dt=1e-12;
rel_error=1e-5;
h=1000;% step size
for ii=0.1:0.1:3.0 %the various fiber lengths can be varied and this vector can be changed
z=ii*Ld;
u=Ao*exp(-((1+i*(-C))/2)*(tau/to).^2);%page#47 G.P.AGrawal
figure(1)
plot(abs(u),'r');
title('Input Pulse'); xlabel('Time'); ylabel('Amplitude');
grid on;
hold on;
l=max(size(u));
%%%%%%%%%%%%%%%%%%%%%%%
fwhm1=find(abs(u)>abs(max(u)/2));
fwhm1=length(fwhm1);
dw=1/l/dt*2*pi;
w=(-1*l/2:1:l/2-1)*dw;
u=fftshift(u);
w=fftshift(w);
spectrum=fft(fftshift(u)); %Pulse spectrum
for jj=h:h:z
spectrum=spectrum.*exp(-alph*(h/2)+i*b2/2*w.^2*(h/2)) ;
f=ifft(spectrum);
f=f.*exp(i*gamma*((abs(f)).^2)*(h));
spectrum=fft(f);
spectrum=spectrum.*exp(-alph*(h/2)+i*b2/2*w.^2*(h/2)) ;
end
f=ifft(spectrum);
op_pulse(ln,:)=abs(f);%saving output pulse at all intervals
fwhm=find(abs(f)>abs(max(f)/2));
fwhm=length(fwhm);
ratio=fwhm/fwhm1; %PBR at every value
pbratio(ln)=ratio;%saving PBR at every step size
dd=atand((abs(imag(f)))/(abs(real(f))));
phadisp(ln)=dd;%saving pulse phase
ln=ln+1;
end
toc;
cputime=toc;
figure(2);
mesh(op_pulse(1:1:ln-1,:));
title('Pulse Evolution');
xlabel('Time'); ylabel('distance'); zlabel('amplitude');
figure(3)
plot(pbratio(1:1:ln-1),'k');
xlabel('Number of steps');
ylabel('Pulse broadening ratio');
grid on;
hold on;
figure(5)
plot(phadisp(1:1:ln-1),'k');
xlabel('distance travelled');
ylabel('phase change');
grid on;
hold on;
disp('CPU time:'), disp(cputime);
mm1.zip_光纤传输_光纤脉冲_高斯脉冲_高斯脉冲 光纤_高斯脉冲光纤
版权申诉
58 浏览量
2022-07-15
16:55:39
上传
评论
收藏 1KB ZIP 举报
APei
- 粉丝: 63
- 资源: 1万+
最新资源
- 旅行活动的微信小程序页面
- 第三节课,后端代码优化 & 结束
- 基于matlab实现的10自由度齿轮传动系统动力学模型,通过调用ode45进行求解,考虑了轴承刚度和阻尼.rar
- 基于matlab实现齿轮系统非线性动力学模型和动力学求解 齿轮非线性动力学研究.rar
- 基于matlab实现的 流体力学有限元NS方程,有限元离散,得到速度场、压力场,流体力学.rar
- 基于matlab实现的GROWTH2.0是一个地球物理反演工具
- 基于matlab实现的matlab法求解椭圆轴承支承的刚性jeffcott转子的振动方程
- 基于matlab实现的sfs算法对目标的多角度图像进行三维重构.rar
- 基于matlab实现的VRPWT离散粒子群优化解决带时间窗的车辆路径问题.rar
- 基于matlab实现的齿轮系统非线性动力学模型和动力学求解 齿轮非线性动力学研究.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈