-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinput_BraggMirror.m
110 lines (91 loc) · 2.54 KB
/
input_BraggMirror.m
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% It seems like lossy DBR cannot be computed correctly with the formula.
% Therefore, results are slightly different from TMM and formula when imag(n1 or n2)~=0
%
% Have a look:
% Absorption loss influence on optical characteristics of multilayer distributed
% Bragg reflector: Wavelength-scale analysis by the method of single expression
% December 2010Opto-Electronics Review 18(4):438-445
% https://www.researchgate.net/publication/227233803_Absorption_loss_influence_on_optical_characteristics_of_multilayer_distributed_Bragg_reflector_Wavelength-scale_analysis_by_the_method_of_single_expression
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%% Bragg Mirror structure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nL=3;
nR=3;
n1=3+0.0i;
n2=3.6+0.0i;
lambda0=800e-9; % Central wavelength
l1=lambda0/(4*abs(n1)); % thickness at lambda/4
l2=lambda0/(4*abs(n2)); % thickness at lambda/4
alpha1=4*pi*imag(n1)./lambda;
alpha2=4*pi*imag(n2)./lambda;
layer=[
1*l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
l1 n1
l2 n2
];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%% Formula computation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
r12=(n1-n2)/(n1+n2);
r21=(n2-n1)/(n1+n2);
t12=2*n1/(n1+n2);
t21=2*n2/(n1+n2);
D1(1,1,:)= exp(+1i*2*pi*n1*l1./lambda); %% take care on the sign here
D1(2,2,:)= exp(-1i*2*pi*n1*l1./lambda); %% take care on the sign here
D2(1,1,:)= exp(+1i*2*pi*n2*l2./lambda); %% take care on the sign here
D2(2,2,:)= exp(-1i*2*pi*n2*l2./lambda); %% take care on the sign here
P1=(1/t12)*[1 r12 ; r12 1];
P2=(1/t21)*[1 r21 ; r21 1];
for j=1:length(lambda)
S(:,:,j)=D2(:,:,j)*P2*D1(:,:,j)*P1;
end
Nperiod=length(layer(:,1))/2;
for j=1:length(lambda)
SN(:,:,j)=S(:,:,j)^Nperiod;
end
for j=1:length(lambda)
Rf(j) = ( abs( SN(1,2,j)/SN(2,2,j) ) )^2 ;
Tf(j) = det(S(:,:,j)) * ( abs(1/SN(2,2,j)) )^2;
end