How to Design FP resonator from Bragg mirror in Matlab?

In summary, the user inputs the number of layers in the structure, the refractive index of layer 1, the refractive index of layer 2, the refractive index of the incident medium, the angle of incidence, the bragg wavelength, and the minimum, maximum, and step wavelengths. The user then calculates the incidence angle at each layer, calculates the layer quater-wavelength optical thickness, calculates the optical admitance, and calculates the reflectivity. Finally, the user plots the reflectivity vs wavelength.
  • #1
RAND1234
3
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
  • #2
Not sure if this thread belongs here or at Electrical engineering. Please let me know if you have violated any rules.
 
  • #3
Now solved ! Used different TMM,
 

1. How do I design an FP resonator from a Bragg mirror in Matlab?

To design an FP resonator from a Bragg mirror in Matlab, you will need to use the transfer matrix method. This involves calculating the transfer matrices for the individual layers of the Bragg mirror and using them to determine the overall transfer matrix of the resonator. Once you have the transfer matrix, you can use it to calculate the reflection and transmission coefficients, and from there, the resonant frequencies and quality factors of the resonator.

2. What are the key parameters to consider when designing an FP resonator?

The key parameters to consider when designing an FP resonator are the number of layers in the Bragg mirror, the thickness and refractive index of each layer, and the angle of incidence of the incident light. These parameters will determine the reflectance and transmittance of the Bragg mirror, which in turn affects the resonant frequencies and quality factors of the resonator.

3. Can I use different materials for the layers of the Bragg mirror?

Yes, you can use different materials for the layers of the Bragg mirror. In fact, using different materials with different refractive indexes can help you achieve a wider range of resonant frequencies and quality factors for your FP resonator.

4. How accurate are the results from the transfer matrix method in Matlab?

The accuracy of the results from the transfer matrix method in Matlab depends on the number of layers in the Bragg mirror and the complexity of the structure. In general, the more layers you include in your model, the more accurate the results will be. However, it is always a good idea to compare your results with experimental data to verify the accuracy of your model.

5. Can I optimize the design of my FP resonator in Matlab?

Yes, you can optimize the design of your FP resonator in Matlab. You can use the built-in optimization functions to find the optimal values for the parameters of your Bragg mirror, such as the layer thickness and refractive index, to achieve specific resonant frequencies and quality factors. This can help you design a more efficient and precise FP resonator for your specific application.

Similar threads

Replies
2
Views
611
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
5K
Back
Top