import math
from __future__ import division
#initialisation of variables
lamda=1.55; #wavelength in um
n1=1.51; #Film refractive index
n2=1.5; #substrate refractive index
#CALCULATIONS
t=(lamda)/(2*3.14*math.sqrt(n1*n1-n2*n2)); #Thickness of film in um
#RESULTS
print"Film thickness=",round(t,5),"um";
import math
from __future__ import division
#initialisation of variables
b=0.5; #normalized propoagation constant
lamda=1.3; #wavelength in um
n1=2.21; #Film refractive index
n2=2.2; #substrate refractive index
#CALCULATIONS
V=(2*math.atan(b/(1-b))/(math.sqrt(1-b))); #normalized frequency
t=(lamda)/(2*3.14*math.sqrt(n1*n1-n2*n2)); #Thickness of film in um
#RESULTS
print"Normalized frequency=",round(V,5);
print"Film thickness=",round(t,5),"um";
import math
from __future__ import division
#initialisation of variables
lamda=1.3; #wavelength in um
nf=1.51; #Film refractive index
t=1.5; #Film thickness in um
ns=1.5; #Waveguide refractive index
na=1; #refractive index of air
#CALCULATIONS
V=(2*3.14*t/lamda)*math.sqrt(nf**2-ns**2); #V-number
a=(ns**2-na**2)/(nf**2-ns**2); #asymmetry parameter of the waveguide
Vc=math.atan(a**0.5); #cutoff V-number
#RESULTS
print"V-number=",round(V,5);
print"symmetry parameter of the waveguide=",round(a,5);
print"Cutoff V-number=",round(Vc,5);
import math
from __future__ import division
#initialisation of variables
delta_phi=3.14;
d=4*10**-6; #seperation between electrodes
n=2.2; #approximate inder in absence of voltage
r13=30*10**-12; #poper electro optic coefficient
row=0.4; #overlap factor
lambda1=1300*1e-9; #wavelength in m
L=8*10**-3; #length of electrode in m
#CALCULATIONS
delta_n=delta_phi*lambda1/(2*3.14*L); #change in refractive index
V_pi=2*d*delta_n/(n**3*row*r13); #Voltahe required for using the device as BPSK modulator
#RESULTS
print"Voltage required for using the device as BPSK modulator=",round(V_pi,5),"V";
print"Voltage length product for unit length is=",round(V_pi,5),"VM";
import math
from __future__ import division
#initialisation of variables
d=10*10**-6; #seperation between electrodes
ne=2.2; #approximate inder in absence of voltage
r33=32*10**-12; #poper electro optic coefficient
lambda1=1*1e-6; #wavelength in m
L=5*10**-3; #length of electrode in m
#CALCULATIONS
V=d*lambda1/(2*3.14*ne**3*r33*L); #Voltahe required for using the device as BPSK modulator
#RESULTS
print"Voltage required for using the device as BPSK modulator=",round(V,5);
print"The answer is different because of rounding off error";
import math
from __future__ import division
#initialisation of variables
delta_L=1/100; #error in effective interaction length
#CALCULATIONS
P=(3.14/2*delta_L)**2; #cross talk power output in W
PdB=10*math.log10(P); #power in dB
#RESULTS
print"cross talk power output=",round(P*10**4,5),"x10^-4W"; #multiplication by 10^4 to convert unit from W to 10^-4 W
print"cross talk power output=",round(PdB,5),"dB";