Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it RIGHT?

Status
Not open for further replies.

rayshaumik

Materials
Joined
Aug 26, 2007
Messages
1
Location
GB
n0 = 1;
n1 = 2.52;
n2 = 1.9;
n3 = 2.11;
n4 = 2.39;
n5 = 2.46;
lamda = 330*(10^-3);
pi = 3.14;
p = (n0)/(n2);
q = n0;
r = 1/(n2);
loop = 3;
tsap = 430;
taln = 900;
talgan1 = 107;
talgan2 = 128;
talgant = 583;
nrows = tsap + taln + (talgan1 + talgan2)*loop + talgant;

R = zeros(1,nrows);


for t0 = 1:1:tsap; % for saphhire
Gr0 = 0;
Ph0 = (2*(pi)*2*(n0)*(Gr0)*(t0))/lamda;
X = [cos((Ph0)/2) (j/n0)*sin((Ph0)/2); (j*n0)*sin((Ph0)/2) cos((Ph0)/2)];
Ro0 = ((p)*(X(1,1))+(q)*(X(1,2))-(r)*(X(2,1))-(X(2,2)));
Ao0 = ((p)*(X(1,1))+(q)*(X(1,2))+(r)*(X(2,1))+(X(2,2)));
Re0 = (Ro0)./(Ao0);
Rc0 = conj(Re0);
R(t0) = ((Re0).*(Rc0))*100;
tl = t0;
end

for t1 = 1:1:taln; % for AlN

Gr1 = 0.0003;
t0 = tl + t1;
Ph1 = (2*(pi)*2*(n3)*(Gr1)*(t1))/lamda;
Y = [cos((Ph1)/2) (j/n3)*sin((Ph1)/2); (j*n3)*sin((Ph1)/2) cos((Ph1)/2)];
Ro1 = ((p)*(Y(1,1))+(q)*(Y(1,2))-(r)*(Y(2,1))-(Y(2,2)));
Ao1 = ((p)*(Y(1,1))+(q)*(Y(1,2))+(r)*(Y(2,1))+(Y(2,2)));
Re1 = (Ro1)./(Ao1);
Rc1 = conj(Re1);
R(t0) = ((Re1).*(Rc1))*100;
end
tl = tl + t1;

for k = 1:1:loop;
for t2 = 1:1:talgan1; % for 20% AlGaN
t0 = tl + (k-1)*(talgan1 + talgan2)+t2;
Gr2 = 0.0003;
Ph2 = (2*(pi)*2*(n1)*(Gr2)*(t2))/lamda;
Z = [cos((Ph2)/2) (j/n1)*sin((Ph2)/2); (j*n1)*sin((Ph2)/2) cos((Ph2)/2)];

if k == 1
M = (Y)*(Z);
elseif (k > 1 && k<= 20)
M = (M1)*(Z);
end

Ro2 = ((p)*(M(1,1))+(q)*(M(1,2))-(r)*(M(2,1))-(M(2,2)));
Ao2 = ((p)*(M(1,1))+(q)*(M(1,2))+(r)*(M(2,1))+(M(2,2)));
Re2 = (Ro2)./(Ao2);
Rc2 = conj(Re2);
R(t0) = ((Re2).*(Rc2))*100;
end

for t3 = 1:1:talgan2; % for 70% AlGaN
t0 = tl + k * talgan1 + (k-1) * talgan2 + t3;
Gr3 = 0.0003;
Ph3 = (2*(pi)*2*(n4)*(Gr3)*(t3))/lamda;
W = [cos((Ph3)/2) (j/n4)*sin((Ph3)/2); (j*n4)*sin((Ph3)/2) cos((Ph3)/2)];

M1 = (W)*(M);

Ro3 = ((p)*(M1(1,1))+(q)*(M1(1,2))-(r)*(M1(2,1))-(M1(2,2)));
Ao3 = ((p)*(M1(1,1))+(q)*(M1(1,2))+(r)*(M1(2,1))+(M1(2,2)));
Re3 = (Ro3)./(Ao3);
Rc3 = conj(Re3);
R(t0) = ((Re3).*(Rc3))*100;
end
end
tl = tl + loop * (talgan1 + talgan2);

for t4 = 1:1:talgant; % for 15% AlGaN
t0 = tl + t4;
Gr4 = 0.0003;
Ph4 = (2*(pi)*2*(n5)*(Gr4)*(t4))/lamda;
V = [cos((Ph4)/2) (j/n5)*sin((Ph4)/2); (j*n5)*sin((Ph4)/2) cos((Ph4)/2)];

M2 = (V)*(M1);

Ro4 = ((p)*(M2(1,1))+(q)*(M2(1,2))-(r)*(M2(2,1))-(M2(2,2)));
Ao4 = ((p)*(M2(1,1))+(q)*(M2(1,2))+(r)*(M2(2,1))+(M2(2,2)));
Re4 = (Ro4)./(Ao4);
Rc4 = conj(Re4);
R(t0) = ((Re4).*(Rc4))*100;
end

plot(R);
grid on; xlabel('Time (s)'); ylabel('Reflectivity (%)');

I am trying to model a Bragg Reflector with Sapphire Substrate and AlGaN with varying Al molar fractions at growth temp and 330 nm wavelength.

Is the graph characteristics for the loop that includes the 20 iterations right
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top