0% found this document useful (0 votes)
4 views2 pages

Modal Analysis in MATLAB Code

This Matlab code performs a modal analysis of an optical fiber with core refractive index n1 and cladding refractive index n2. It calculates the normalized frequency V for different values, plots the left and right hand sides of the modal equations to find phase match points, and calculates the propagation constants beta for the phase matched modes. The code generates two figures, one for V=4 showing the fundamental mode, and one for V=10 showing the first four modes.

Uploaded by

Santosh Kumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Modal Analysis in MATLAB Code

This Matlab code performs a modal analysis of an optical fiber with core refractive index n1 and cladding refractive index n2. It calculates the normalized frequency V for different values, plots the left and right hand sides of the modal equations to find phase match points, and calculates the propagation constants beta for the phase matched modes. The code generates two figures, one for V=4 showing the fundamental mode, and one for V=10 showing the first four modes.

Uploaded by

Santosh Kumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Matlab Code :

close all;
clear all;
clc;
format long
n1=1.49; %Core Ri
n2=1.485; %Cladding Ri
lam=0.8e-6;
k=2*pi/lam;
del=sqrt(n1*n1-n2*n2);
e=0:.01:7;
V=[4,10];
for v_ind=1:length(V)
d(v_ind)=(V(v_ind))./(k*del); %Core radial distance
for e_ind=1:length(e)
LHS_symm(v_ind,e_ind)= e(e_ind)*tan(e(e_ind));
LHS_antisymm(v_ind,e_ind)= - e(e_ind)*cot(e(e_ind));

RHS(v_ind,e_ind) = (n1/n2)^2.*(sqrt((V(v_ind)/2)^2-e(e_ind)^2));
end
end
figure
plot(e,RHS(1,:),'r');hold on
plot(e,LHS_symm(1,:),'m');hold on
plot(e,LHS_antisymm(1,:),'g')
grid on
axis([0 7 -25 25]);
legend('RHS','Symmetric','Antisymmetric')
title('Modal Analysis For V = 2')

figure
plot(e,RHS(2,:),'r');hold on
plot(e,LHS_symm(2,:),'m');hold on
plot(e,LHS_antisymm(2,:),'g')
grid on
axis([0 7 -25 25]);
legend('RHS','Symmetric','Antisymmetric')
title('Modal Analysis For V = 10')

%% V=4
zy1V1=1.05;
zy2V1=1.9;
alpha1V1=zy1V1*2/d(1);
alpha2V1=zy2V1*2/d(1);
beta1V1=sqrt(k*k*n1*n1-alpha1V1*alpha1V1);
beta2V1=sqrt(k*k*n1*n1-alpha2V1*alpha2V1);
betaV1=[beta1V1 beta1V1]
%% V=10
zy1V2=1.32;
zy2V2=2.61;
zy3V2=3.85;
zy4V2=4.9;
alpha1V2=zy1V2*2/d(2);
alpha2V2=zy2V2*2/d(2);
alpha3V2=zy3V2*2/d(2);
alpha4V2=zy4V2*2/d(2);

beta1V2=sqrt(k*k*n1*n1-alpha1V2*alpha1V2);
beta2V2=sqrt(k*k*n1*n1-alpha2V2*alpha2V2);
beta3V2=sqrt(k*k*n1*n1-alpha3V2*alpha3V2);
beta4V2=sqrt(k*k*n1*n1-alpha4V2*alpha4V2);
betaV2=[beta1V2 beta1V2 beta3V2 beta4V2]

Plots:

Figure:1

Figure:2

You might also like