-
Notifications
You must be signed in to change notification settings - Fork 3
/
input_VCSEL_d.m
85 lines (64 loc) · 2.53 KB
/
input_VCSEL_d.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VCSEL structure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nL=3;
nR=3;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% import dispersion
M = importdata('index_data/GaAs.csv',',');
M = M.data;
M(:,1) = M(:,1)*1e-6;
nM = interp1(M(:,1),M(:,2),lambda);
kM = interp1(M(:,1),M(:,3),lambda);
nkGaAs = nM + kM*1i;
M = importdata('index_data/AlAs.csv',',');
M = M.data;
M(:,1) = M(:,1)*1e-6;
nM = interp1(M(:,1),M(:,2),lambda);
kM = interp1(M(:,1),M(:,3),lambda);
nkAlAs = nM + kM*1i;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure('color','w')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
subplot(2,1,1)
hold on;grid on;box on;
plot(lambda*1e9, real(nkGaAs) ,'b-')
plot(lambda*1e9, real(nkAlAs) ,'g-')
title('index dispersion')
xlabel('lambda (nm)')
ylabel('real part')
legend('real-GaAs','real-AlAs')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
subplot(2,1,2)
hold on;grid on;box on;
plot(lambda*1e9, imag(nkGaAs),'r-')
plot(lambda*1e9, imag(nkAlAs),'m-')
xlabel('lambda (nm)')
ylabel('imaginary part')
legend('imag-GaAs','imag-AlAs')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
n1=nkGaAs;
n2=nkAlAs;
lambda0=940e-9; % Central wavelength
idx=find(abs(lambda-lambda0)==min(abs(lambda-lambda0))); % take care that lambda0 MUST exists in the vector lambda
l1=lambda0/(4*abs(n1(idx))); % thickness at lambda/4
l2=lambda0/(4*abs(n2(idx))); % thickness at lambda/4
%l1=lambda0/(4*abs(mean(n1))); % thickness at lambda/4
%l2=lambda0/(4*abs(mean(n2))); % thickness at lambda/4
n3 = nkGaAs;
l3 = 5 * lambda0/(2*abs(mean(n3)));
%alpha3 = 4*pi*imag(n3)./lambda;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
N_DBRn=15; %% amount of DBR n-doped pairs
N_DBRp=15; %% amount of DBR p-doped pairs
DBR_n=[]; DBRn=[ l1 n1 ; l2 n2 ];
DBR_p=[]; DBRp=[ l2 n2 ; l1 n1 ];
for jj=1:N_DBRn
DBR_n = [ DBR_n ; DBRn ];
end
for jj=1:N_DBRp
DBR_p = [ DBR_p ; DBRp ];
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
layer=[ DBR_n ; l3 n3 ; DBR_p ];
%layer=[ DBR_p ; l3 n3 ; DBR_n ];