How to Design FP resonator from Bragg mirror in Matlab?

Click For Summary
SUMMARY

This discussion focuses on implementing a MATLAB code for designing a Fabry-Pérot (FP) resonator using a Bragg mirror. The code allows users to input parameters such as the number of layers, refractive indices, and wavelength range, and calculates the reflectivity of the FP resonator. The solution was achieved by utilizing the Transfer Matrix Method (TMM) to analyze the optical properties of the multilayer structure. The final output is a plot of reflectivity versus wavelength, demonstrating the effectiveness of the approach.

PREREQUISITES
  • Understanding of MATLAB programming and syntax
  • Knowledge of optical physics, specifically Bragg mirrors and FP resonators
  • Familiarity with the Transfer Matrix Method (TMM) for optical calculations
  • Basic concepts of Snell's Law and optical thickness
NEXT STEPS
  • Explore advanced MATLAB functions for optical simulations
  • Learn about the design and optimization of multilayer optical coatings
  • Investigate the application of TMM in other optical systems
  • Study the impact of varying refractive indices on reflectivity in FP resonators
USEFUL FOR

Optical engineers, physicists, and students involved in photonics and optical design, particularly those working with resonant optical structures and multilayer coatings.

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,
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
1
Views
2K
Replies
3
Views
6K