%--------1光纤布拉格光栅耦合模理论反射谱仿真---------
close all;
clc;
L=10*1e-3;%布拉格光栅长度(单位m)
dn=0.0001;%折射率调制深度
v=0.95;%折射率变化条纹可见度
p=534.4828*1e-9;%布拉格光栅周期(单位m)
n_eff=1.45;%光纤光栅有效折射率
lambda_Brag=2*p*n_eff;%光纤布拉格光栅布拉格波长计算公式
lambda=1e-9*linspace(1548,1552,2000);%生成线性矢量
for num=1:2000
K(num)=pi*v*dn/lambda(num);%交流耦合系数
delata(num)=2*pi*dn/lambda(num)+2*pi*n_eff*(1./lambda(num)-1./lambda_Brag);
s(num)=sqrt(K(num).^2-delata(num).^2);
R_m(num)=sinh(s(num)*L).^2;
R_d(num)=cosh(s(num)*L).^2-delata(num).^2/K(num).^2;
R(num)=R_m(num)/R_d(num);
end
figure
plot(lambda*1e9,R,'r');
xlabel('Wavelength/nm');ylabel('Reflectivity');
title('光纤布拉格光栅仿真反射谱');
%-------------2不同光栅长度光纤布拉格光栅的反射谱仿真----------
L1=2*1e-3;L2=5*1e-3;L3=10*1e-3;L4=20*1e-3;%布拉格光栅长度(单位m)
dn=0.0001;%折射率调制深度
v=0.95;%折射率变化条纹可见度
p=534.4828*1e-9;%布拉格光栅周期(单位m)
n_eff=1.45;%光纤光栅有效折射率
lambda_Brag=2*p*n_eff;%光纤布拉格光栅布拉格波长计算公式
lambda=1e-9*linspace(1548,1552,2000);%生成线性矢量
for num=1:2000
K(num)=pi*v*dn/lambda(num);%交流耦合系数
delata(num)=2*pi*dn/lambda(num)+2*pi*n_eff*(1./lambda(num)-1./lambda_Brag);
s(num)=sqrt(K(num).^2-delata(num).^2);
R_m(num)=sinh(s(num)*L1).^2;
R_d(num)=cosh(s(num)*L1).^2-delata(num).^2/K(num).^2;
R1(num)=R_m(num)/R_d(num);
end
for num=1:2000
K(num)=pi*v*dn/lambda(num);%交流耦合系数
delata(num)=2*pi*dn/lambda(num)+2*pi*n_eff*(1./lambda(num)-1./lambda_Brag);
s(num)=sqrt(K(num).^2-delata(num).^2);
R_m(num)=sinh(s(num)*L2).^2;
R_d(num)=cosh(s(num)*L2).^2-delata(num).^2/K(num).^2;
R2(num)=R_m(num)/R_d(num);
end
for num=1:2000
K(num)=pi*v*dn/lambda(num);%交流耦合系数
delata(num)=2*pi*dn/lambda(num)+2*pi*n_eff*(1./lambda(num)-1./lambda_Brag);
s(num)=sqrt(K(num).^2-delata(num).^2);
R_m(num)=sinh(s(num)*L3).^2;
R_d(num)=cosh(s(num)*L3).^2-delata(num).^2/K(num).^2;
R3(num)=R_m(num)/R_d(num);
end
for num=1:2000
K(num)=pi*v*dn/lambda(num);%交流耦合系数
delata(num)=2*pi*dn/lambda(num)+2*pi*n_eff*(1./lambda(num)-1./lambda_Brag);
s(num)=sqrt(K(num).^2-delata(num).^2);
R_m(num)=sinh(s(num)*L4).^2;
R_d(num)=cosh(s(num)*L4).^2-delata(num).^2/K(num).^2;
R4(num)=R_m(num)/R_d(num);
end
figure
plot(lambda*1e9,R1,'r');
hold on
plot(lambda*1e9,R2,'g');
hold on
plot(lambda*1e9,R3,'b');
hold on
plot(lambda*1e9,R4,'c');
xlabel('Wavelength/nm');ylabel('Reflectivity');
title('不同光栅长度对应的光纤布拉格光栅仿真反射谱');
legend('L=2mm','L=5mm','L=10mm','L=20mm','Location','SouthEast' );
%-------------3不同折射率调制深度下光纤布拉格光栅的反射谱仿真----------
L=10*1e-3;%布拉格光栅长度(单位m)
dn1=0.0001;dn2=0.0002;dn3=0.0003;dn4=0.0005;%折射率调制深度
v=0.95;%折射率变化条纹可见度
p=534.4828*1e-9;%布拉格光栅周期(单位m)
n_eff=1.45;%光纤光栅有效折射率
lambda_Brag=2*p*n_eff;%光纤布拉格光栅布拉格波长计算公式
lambda=1e-9*linspace(1548,1552,2000);%生成线性矢量
for num=1:2000
K(num)=pi*v*dn1/lambda(num);%交流耦合系数
delata(num)=2*pi*dn1/lambda(num)+2*pi*n_eff*(1./lambda(num)-1./lambda_Brag);
s(num)=sqrt(K(num).^2-delata(num).^2);
R_m(num)=sinh(s(num)*L).^2;
R_d(num)=cosh(s(num)*L).^2-delata(num).^2/K(num).^2;
R1(num)=R_m(num)/R_d(num);
end
for num=1:2000
K(num)=pi*v*dn2/lambda(num);%交流耦合系数
delata(num)=2*pi*dn2/lambda(num)+2*pi*n_eff*(1./lambda(num)-1./lambda_Brag);
s(num)=sqrt(K(num).^2-delata(num).^2);
R_m(num)=sinh(s(num)*L2).^2;
R_d(num)=cosh(s(num)*L2).^2-delata(num).^2/K(num).^2;
R2(num)=R_m(num)/R_d(num);
end
for num=1:2000
K(num)=pi*v*dn3/lambda(num);%交流耦合系数
delata(num)=2*pi*dn3/lambda(num)+2*pi*n_eff*(1./lambda(num)-1./lambda_Brag);
s(num)=sqrt(K(num).^2-delata(num).^2);
R_m(num)=sinh(s(num)*L3).^2;
R_d(num)=cosh(s(num)*L3).^2-delata(num).^2/K(num).^2;
R3(num)=R_m(num)/R_d(num);
end
for num=1:2000
K(num)=pi*v*dn4/lambda(num);%交流耦合系数
delata(num)=2*pi*dn4/lambda(num)+2*pi*n_eff*(1./lambda(num)-1./lambda_Brag);
s(num)=sqrt(K(num).^2-delata(num).^2);
R_m(num)=sinh(s(num)*L4).^2;
R_d(num)=cosh(s(num)*L4).^2-delata(num).^2/K(num).^2;
R4(num)=R_m(num)/R_d(num);
end
figure
plot(lambda*1e9,R1,'r');hold on
plot(lambda*1e9,R2,'g');hold on
plot(lambda*1e9,R3,'b');hold on
plot(lambda*1e9,R4,'c');
xlabel('Wavelength/nm');ylabel('Reflectivity');
title('不同折射率调制深度对应的光纤布拉格光栅仿真反射谱');
legend('\Delta n=0.0001','\Delta n=0.0002','\Delta n=0.0003','\Delta n=0.0005','Location','northeast' );
%------------4不同交流耦合系数情况下峰值反射率与光栅长度的关系曲线-----------
K1=0.1;K2=0.2;K3=0.3;K4=0.4;
L=linspace(0,30,500);
for num=1:500
R_max1(num)=tanh(K1*L(num)).^2;
end
for num=1:500
R_max2(num)=tanh(K2*L(num)).^2;
end
for num=1:500
R_max3(num)=tanh(K3*L(num)).^2;
end
for num=1:500
R_max4(num)=tanh(K4*L(num)).^2;
end
figure
plot(L,R_max1,'r');hold on
plot(L,R_max2,'g');hold on
plot(L,R_max3,'b');hold on
plot(L,R_max4,'c');
xlabel('光纤布拉格光栅长度L/mm');ylabel('光纤光栅峰值反射率R_m_a_x');
title('不同耦合系数情况下峰值反射率与光栅长度的关系曲线');
legend('k=0.1mm^-^1','k=0.2mm^-^1','k=0.3mm^-^1','k=0.4mm^-^1','Location','SouthEast' );
%------------5不同光栅长度情况下峰值反射率与交流耦合系数的关系曲线-----------
L1=2;L2=5;L3=10;L4=20;%布拉格光栅长度(单位mm)
K=linspace(0.0,2.0,500);
for num=1:500
R_max5(num)=tanh(L1*K(num)).^2;
end
for num=1:500
R_max6(num)=tanh(L2*K(num)).^2;
end
for num=1:500
R_max7(num)=tanh(L3*K(num)).^2;
end
for num=1:500
R_max8(num)=tanh(L4*K(num)).^2;
end
figure
plot(K,R_max5,'r');
hold on
plot(K,R_max6,'g');
hold on
plot(K,R_max7,'b');
hold on
plot(K,R_max8,'c');
xlabel('光纤布拉格光栅交流耦合系数k/mm^-^1');ylabel('光纤光栅峰值反射率R_m_a_x');
title('不同光栅长度情况下峰值反射率与交流耦合系数的关系');
legend('L=2mm','L=5mm','L=10mm','L=20mm','Location','SouthEast' );
%------------6峰值反射率与KL的关系曲线-----------
KL=linspace(0,8,500);
for num=1:500
R_max(num)=tanh(KL(num)).^2;
end
figure
plot(KL,R_max,'r');
xlabel('kL');ylabel('光纤光栅峰值反射率R_m_a_x');
title('光纤布拉格光栅峰值反射率R_m_a_x与KL的关系曲线');
- 1
- 2
- 3
- 4
前往页