How to Design FP resonator from Bragg mirror in Matlab?

RAND1234
Messages
3
Reaction score
0

Homework Statement


Below is a {MATLAB}code for Bragg mirror. How can I implement the code to create an FP resonator?


Homework Equations


jIfDxCI.jpg


The Attempt at a Solution


Code:
%User input parameters
num_layers = input('The Number of Layers in the structure = ');
r_index1 = input('refractive index of layer 1 = ');
r_index2 = input('refractive index of layer 2 = ');
i_index = input('refractive index of the incident medium = '); 
s_index = input('refractive index of the substrate = ');
angle_incidence = input('angle of incidence (degrees) = '); 
bragg_wave = input('bragg wavelength (nm) = ');
min_wave = input('lowest wavelength in range (nm) = ');
max_wave = input('highest wavelength in range (nm)= '); 
step_wave = input('step wavelength in range (nm) = ');

%converting to nm
bragg_wave1 = bragg_wave * 1E-9;
min_wave1 = min_wave * 1E-9; 
max_wave1 = max_wave * 1E-9; 
step_wave1 = step_wave * 1E-9;

%converting degrees to radiance
theta_incidence = angle_incidence*pi/180;

%calculating incidence angle at each layer (snells laws)
theta1 = asin(i_index/r_index1*sin(theta_incidence)); 
theta2 = asin(r_index1/r_index2*sin(theta1));
theta_s = asin(r_index2/s_index*sin(theta2));

%calculating layer quater-wavelength optical thickness
d1 = bragg_wave1/(4*r_index1); 
d2 = bragg_wave1/(4*r_index2);

%calculating optical admitance, for s-polarisation (TE is in normal to the plane of incidence)(assuming in free space Y = 2.6544*E-3)
Y = 2.6544*1E-3;
QA_I = i_index*cos(theta_incidence)*Y;
QA1 = r_index1*cos(theta1)*Y;
QA2 = r_index2*cos(theta2)*Y;
QA_s = s_index*cos(theta_s)*Y; x=1;
y=1;
Wavelength = []; 
Reflectivity = [];
for lambda = min_wave1 :step_wave1 : max_wave1 %calculating delta for n1 and n2
del1 = (2*pi*d1*r_index1*cos(theta1))/lambda; 
del2 = (2*pi*d2*r_index2*cos(theta2))/lambda;
%calculating characteristic matrix for n1 and n2 %M1
r1 = [cos(del1), i*(sin(del1)/QA1)];
r2 = [(i*(sin(del1)*QA1)), cos(del1)];
M1 = [r1 ; r2];
%M2
t1 = [cos(del2), i*(sin(del2)/QA2)]; 
t2 = [(i*(sin(del2)*QA2)), cos(del2)]; 
M2 = [t1 ; t2];
cm = M1*M2;
if (num_layers/2) == round(num_layers/2) M = cm^(num_layers/2);
else
M = cm^((num_layers-1)/2)*M1;
end

%calculate the elements of the characteristic matrix
b = M(1,1) + M(1,2)*QA_s;
c = M(2,1) + M(2,2)*QA_s;
%reflectivity
demin = (QA_I*b) + c; numin = (QA_I*b) - c;
r = numin/demin; r1 = conj(r);
Reflect = r*r1;
fprintf('%f, %f\n', Reflect, lambda); lambda1 = lambda *1E9;
Reflectivity(x)= Reflect; x= x+1;
Wavelength(y)= lambda1;
y=y+1;
end
plot(Wavelength, Reflectivity);
title('Reflectivity vs Wavelength'); 
xlabel('Wavelength (nm)');
ylabel('Reflectivity (%)')
grid on;


 
Physics news on Phys.org
Not sure if this thread belongs here or at Electrical engineering. Please let me know if you have violated any rules.
 
Now solved ! Used different TMM,
 
##|\Psi|^2=\frac{1}{\sqrt{\pi b^2}}\exp(\frac{-(x-x_0)^2}{b^2}).## ##\braket{x}=\frac{1}{\sqrt{\pi b^2}}\int_{-\infty}^{\infty}dx\,x\exp(-\frac{(x-x_0)^2}{b^2}).## ##y=x-x_0 \quad x=y+x_0 \quad dy=dx.## The boundaries remain infinite, I believe. ##\frac{1}{\sqrt{\pi b^2}}\int_{-\infty}^{\infty}dy(y+x_0)\exp(\frac{-y^2}{b^2}).## ##\frac{2}{\sqrt{\pi b^2}}\int_0^{\infty}dy\,y\exp(\frac{-y^2}{b^2})+\frac{2x_0}{\sqrt{\pi b^2}}\int_0^{\infty}dy\,\exp(-\frac{y^2}{b^2}).## I then resolved the two...
Hello everyone, I’m considering a point charge q that oscillates harmonically about the origin along the z-axis, e.g. $$z_{q}(t)= A\sin(wt)$$ In a strongly simplified / quasi-instantaneous approximation I ignore retardation and take the electric field at the position ##r=(x,y,z)## simply to be the “Coulomb field at the charge’s instantaneous position”: $$E(r,t)=\frac{q}{4\pi\varepsilon_{0}}\frac{r-r_{q}(t)}{||r-r_{q}(t)||^{3}}$$ with $$r_{q}(t)=(0,0,z_{q}(t))$$ (I’m aware this isn’t...
Hi, I had an exam and I completely messed up a problem. Especially one part which was necessary for the rest of the problem. Basically, I have a wormhole metric: $$(ds)^2 = -(dt)^2 + (dr)^2 + (r^2 + b^2)( (d\theta)^2 + sin^2 \theta (d\phi)^2 )$$ Where ##b=1## with an orbit only in the equatorial plane. We also know from the question that the orbit must satisfy this relationship: $$\varepsilon = \frac{1}{2} (\frac{dr}{d\tau})^2 + V_{eff}(r)$$ Ultimately, I was tasked to find the initial...
Back
Top