You are on page 1of 1

Speed=3*10^8;

Pg=0.53e-006;
Lg=4000*Pg;
n1=1.45800;
v=1;

%
%
%
%
%

%
%
%
%
%

% n(z)=n1+n1*sigma(z)*(1+m*cos(2*pi*z/Pg+Fai(z))) %
DeltaN_dc=0.0005;
DeltaN_ac=v*DeltaN_dc;
Neff=n1;
lamda_b=2*Neff*Pg;

% DeltaN_dc=n1*sigma(z) %
% DeltaN_dc=n1*sigma(z)*m %

delta_Z=2.5*Lg;
wavelength=[1540:0.01:1559.99]*1e-9;

% %

for j=1:2000
lamda=(1540+(j-1)*0.01)*10^(-9);
Beita=2*pi*Neff./lamda;
Kdc=(2*pi*DeltaN_dc)./lamda;
Kac=Kdc.*(v/2);
KacLg=Kac*Lg;
lamda_max=(1+DeltaN_dc/Neff)*lamda_b;
delta=Kdc+(Beita-pi/Pg);
alpha=sqrt(Kac.^2-delta.^2);
alphaL=alpha.*Lg;
T11=cosh(alphaL)-i*(delta/alpha)*sinh(alphaL);
T12=-i*(Kac/alpha)*sinh(alphaL);
T21=i*(Kac/alpha)*sinh(alphaL);
T22=cosh(alphaL)+i*(delta/alpha)*sinh(alphaL);
Matrix_g1=[T11,T12;T21,T22];
Matrix_g2=[T11,T12;T21,T22];
delta_phase=4*pi*Neff*delta_Z/lamda;
pp_1=exp(-i*delta_phase/2);
pp_2=exp(i*delta_phase/2);
Matrix_fb=[pp_1,0;0,pp_2];

%
FBG
% LPFG

Matrix_total=Matrix_g1*Matrix_fb*Matrix_g2;
% Kd
TT11=Matrix_total(1);TT12=Matrix_total(3);TT21=Matrix_total(2);TT22=Matrix_total
(4);
Reflect=TT21/TT11;
Reflectivity=(abs(Reflect)).^2;
Permeance=1-Reflectivity;
rr(j)=Reflectivity;
pp(j)=Permeance;
end
plot(wavelength,rr);
axis([1.5460e-6 1.5470e-6 0 1]);
title('');
xlabel('wavelength');
ylabel('Reflectivity');
grid on;

You might also like