www.pudn.com > FBG.zip > CFBG_EquivalentMirror.asv, change:2009-10-29,size:1087b


clc 
clear; 
np=[0.531e-6,0.531e-6];       %光栅周期% 
L=2000*np;        %光栅长度2mm% 
n1=1.46;          %纤芯原始折射率% 
v=1;              %边缘可见度% 
DeltaN=8e-4; 
Neff=n1; 
wl_D=2*Neff*np 
 
wavelength=[1540:0.01:1559.99]*1e-9;      % 初始化输入波长区间% 
 
for j=1:2000 
    k=pi*v*DeltaN/wavelength(j); 
    Beta=2*pi*Neff/wavelength(j); 
    for t=1:2 
    delta=2*pi*DeltaN/wavelength(j)+Beta-pi/np(t); 
    g=sqrt(k^2-delta^2); 
%     ta=delta*tanh(g*L(t))/g; 
%     r(t)=-k*sinh(g*L(t))/(i*g*cosh(g*L(t))+delta*sinh(g*L(t))); 
%     end 
%     ph1=(1+i*ta)/(1-i*ta); 
%     ph2=exp(-i*Beta*0.5*(L(1)+L(2))) 
%     R(j)=abs(((r(1)+r(2)*ph2)/(1-r(1)*r(2)*ph2)))^2; 
    r(t)=-k*sinh(g*L(t))/(i*g*cosh(g*L(t))+delta*sinh(g*L(t))); 
    end 
    ph=Beta*(L(1)+L(2)); 
    R(j)=abs(r(1)+(1-abs(r(1))^2)*r(2)*exp(-i*ph)/(1-conj(r(1))*r(2)*exp(-i*ph)))^2; 
    R1(j)=abs((exp(-i*ph)-1)/(1-abs(r(1))^2*exp(-i*ph)))^2; 
    R3(j) 
end 
plot(wavelength,R,wavelength,R1); 
axis([1.54700e-6 1.5570e-6 0 4]); 
title('反射率'); 
xlabel('wavelength'); 
ylabel('Reflectivity'); 
grid on;