-
Notifications
You must be signed in to change notification settings - Fork 3
/
input_VCSEL.m
145 lines (112 loc) · 2.99 KB
/
input_VCSEL.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Comment: Why the TMM does not match perfectly to the formula?
%
% -> the reflectivity of the DBR is directly linked to the amount of period. This
% amount is different in both cases. Fixe in the formula while convolute with
% both miror side in the TMM.
% -> The distance between the cavity mode are differents in both cases because in
% the formula, the cavity length l3 is fixe while in the TMM, the cavity has an effective
% length that is larger than l3 since the wave penetrate inside the DBR miror
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VCSEL structure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nL=3;
nR=3;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
n1=3;
n2=3.6;
lambda0=940e-9; % Central wavelength
l1=lambda0/(4*abs(n1)); % thickness at lambda/4
l2=lambda0/(4*abs(n2)); % thickness at lambda/4
n3=3+0.0i;
l3=5 * lambda0/(2*abs(n3));
alpha3=4*pi*imag(n3)./lambda;
layer=[
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
l3 n3
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
];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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 = floor( length(layer(:,1))/4 );
for j=1:length(lambda)
SN(:,:,j)=S(:,:,j)^Nperiod;
end
for j=1:length(lambda)
Rb(j)=(abs(SN(1,2,j)/SN(2,2,j)))^2;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TT=1-Rb;
theta=pi;
phi=2*pi*n3*l3./lambda;
delta=2*(phi-theta);
% see the book of Vincenzo Savona for the formula
tfp = TT ./ ( 1 - Rb .* exp(2i*(phi-theta)) ) ;
Tfp = (abs(tfp)).^2 .* exp(-alpha3*l3);
rfp = - ( (sqrt(Rb)-sqrt(Rb).*exp(2i*(phi-theta))) ./ (1-Rb.*exp(2i*(phi-theta))));
Rfp = (abs(rfp)).^2;
Tf=Tfp;
Rf=Rfp;