-
Notifications
You must be signed in to change notification settings - Fork 3
/
Transmission_DFB_f.m
73 lines (54 loc) · 2.33 KB
/
Transmission_DFB_f.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
function[T,R]=Transmission_DFB_f(lambda,Gain,L,LL,n1,n2,Dn2,n3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% "Optoelectronic", Cambridge Books Online
% Prof. Emmanuel Rosencher,
% Complement to Chapter 9
% 9.D Fabry–Perot cavities and Bragg reflectors, page 434
% http://dx.doi.org/10.1017/CBO9780511754647.028
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c=2.99792458e8; %% speed of light [m/s]
k=2*pi/lambda; %% wave vector [m-1]
w=2*pi*c/lambda; %% pulsation [s-1]
N=floor(L/LL);
kk=Gain/2/w*c; %% imaginary part of the optical refrative index
n2a = n2 -1i*kk; %% HERE IS THE MAJOR CHANGE!!! from PLUS (LOSSES) to MINUS (GAIN)
n2b = n2-Dn2 -1i*kk; %% HERE IS THE MAJOR CHANGE!!! from PLUS (LOSSES) to MINUS (GAIN)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DFB %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
P = zeros(2,2,length(Gain));
P(1,1,:) = exp(+1i*k*n2a*LL/2);
P(2,2,:) = exp(-1i*k*n2a*LL/2);
r2ab = (n2a-n2b)./(n2a+n2b);
r2ba = (n2b-n2a)./(n2a+n2b);
t2ab = 2*n2a./(n2a+n2b);
t2ba = 2*n2b./(n2a+n2b);
S2ab(1,1,:) = (1./t2ab) .* ones(1,length(Gain));
S2ab(2,2,:) = (1./t2ab) .* ones(1,length(Gain));
S2ab(1,2,:) = r2ab./t2ab;
S2ab(2,1,:) = r2ab./t2ab;
S2ba(1,1,:) = (1./t2ba) .* ones(1,length(Gain));
S2ba(2,2,:) = (1./t2ba) .* ones(1,length(Gain));
S2ba(1,2,:) = r2ba./t2ba;
S2ba(2,1,:) = r2ba./t2ba;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Fabry-Perot %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
r12 = (n1-n2a)./(n1+n2a);
r23 = (n2a-n3)./(n2a+n3);
t12 = 2*n1./(n1+n2a);
t23 = 2*n2a./(n2a+n3);
S12(1,1,:)=1./t12.*ones(1,length(Gain));
S12(2,2,:)=1./t12.*ones(1,length(Gain));
S12(1,2,:)=r12./t12;
S12(2,1,:)=r12./t12;
S23(1,1,:)=1./t23.*ones(1,length(Gain));
S23(2,2,:)=1./t23.*ones(1,length(Gain));
S23(1,2,:)=r23./t23;
S23(2,1,:)=r23./t23;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for jj=1:length(Gain)
% Unfortunately, I do not manage to do a multi-dimentionnal matrix product
% without the loop. It would be much faster...
M(:,:,jj) = P(:,:,jj)*S2ba(:,:,jj)*P(:,:,jj)*S2ab(:,:,jj);
M(:,:,jj) = S12(:,:,jj) * M(:,:,jj)^N * S23(:,:,jj);
end
R = squeeze( abs( M(1,2,:)./M(2,2,:) ).^2 );
T = squeeze( n3/n1./abs(M(2,2,:)).^2 );
end