1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
| clear all
lambda0=0.5;
c=3e8
omega0=2.*pi.*c./lambda0;
lambda=0.3:0.0001:1;
%%%%%%% structure de bragg %%%%%%
j_Iter=8;
B1='BH'
Bg1='H'
for j=1:j_Iter+1
if j==j_Iter+1
break
end
eval(sprintf('Bg%d=strcat(Bg%d,B%d )',j+1,j,1));
end
%%%%%%%%%%%% indice de refraction du systeme multicouche%%%%%%%%%%%%%%%%%%%%%%
for kk=1:length(eval(sprintf('Bg%d',j)))
if (eval(sprintf('Bg%d(%d)',j,kk))=='H')
n(kk)=2.3;
else
n(kk)=1.45;
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
p=length(eval(sprintf('Bg%d',j)));% nombre des couches
n(p+1)=1.5; %indice de refraction de substrat
n0=1;%indice de refraction de l'air
%%%%%%%%%%%%coefficient de distinction%%%%%%
for m=1:p+1
K(m)=0;
end
%%%%%%%%%%%%%indice de refraction%%%%%%
N0=1;
% %%%%%%%%%%%%%%%%%variation de theta0%%%%%%%%%%%%
theta0=0;
for tt=1:length(theta0)
y(tt)=theta0(tt) ;
end
%%%%%%%%%%%%%%%%%%%indices complexes %%%%%%%%%%%%%%%%%
for m=1:p+1
N(m)=(n(m)-i*K(m));
end
%%%%%%%%%%%%%%calcul des theta%%%%%%%%%%
for m=1:p+1
if (m==1)
theta(m)=asin((N0/N(m))*sin(y(tt)));
else
theta(m)=asin((N(m-1)/N(m))*sin(theta(m-1)));
end
end
%%%%%% variation de omega en fonction de lambda %%%%%%%
for e=1:length(lambda)
omega(e)=2.*pi.*c./lambda(e)
end
%%%%%%%%% variation de omega/omega0 %%%%%%%
for jj=length(omega)
x(jj)=(omega(jj)/omega0);
%%%%%%%% calcul des phi %%%%%%%%%%%
phi0=0;
phi(p+1)=0;
%%%%%% calcul de phi %%%%%%%%%
for m=1:p
phi(m)=0.5*pi*x(jj)*(cos(theta(m)));
end
%%%%%%% calcul les coefficient de Feresnel %%%%%%
for m=1:p+1
if (m==1)
numRp(m)=(N0*cos(theta(m))-N(m)*cos(y(tt)));
numTp(m)=2*N0*cos(y(tt));
denomRp(m)=(N0*cos(theta(m))+N(m)*cos(y(tt)));
denomTp(m)=(N0*cos(theta(m))+N(m)*cos(y(tt)));
else
numRp(m)=(N(m-1)*cos(theta(m-1))-N(m)*cos(theta(m)));
numTp(m)=2*N(m-1)*cos(theta(m-1));
denomRp(m)=(N(m-1)*cos(theta(m-1))+N(m)*cos(theta(m)));
denomTp(m)=(N(m-1)*cos(theta(m-1))+N(m)*cos(theta(m)));
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for m=1:p+1
rp(m)=(numRp(m)/denomRp(m));
tp(m)=(numTp(m)/denomTp(m));
end
%%%%%%%%%%%%%%%%%coefficient de matrice%%%%%%%%%%%%%%%%%%%
for m=2:p+1
if (m==2)
PRp=[exp(-i*phi(m-1))/tp(m-1) rp(m-1)*exp(i*phi(m-1))/tp(m-1); rp(m-1)*exp(-i*phi(m-1))/tp(m-1) exp(i*phi(m-1))/tp(m-1)];
CRp=[exp(-i*phi(m))/tp(m) rp(m)*exp(i*phi(m))/tp(m); rp(m)*exp(-i*phi(m))/tp(m) exp(i*phi(m))/tp(m)];
sp=PRp*CRp;
else
CRp=[exp(-i*phi(m))/tp(m) rp(m)*exp(i*phi(m))/tp(m); rp(m)*exp(-i*phi(m))/tp(m) exp(i*phi(m))/tp(m)];
sp=sp*CRp;
end
end
%%%%%%%%%%%%%%%Reflexion %%%%%%%%%%%%%%%%
resR(jj,tt)=1/abs(sp(1,1)/sp(2,1))^2;
end
plot(x,resR)
grid on
ylabel('R','FontSize', 15,'color','Black')
xlabel('\omega/\omega0', 'fontsize', 15, 'color','Black')
xlim([0.5 1.67])
ylim([0 1.1]) |
Partager