import math
#variable declaration
L = 75.0 #amplifier spcaing (kilometer)
alpha = 4.61*10**-2 #fiber attenuation (per Km)
#calculation
Leff = (1-math.exp(-alpha*L))/alpha #effective length(km)
#result
print "Effective length of fiber = " , round(Leff,0) , "km"
import math
#variable declaration
delta_VB = 20*10**6 #Brillouin linewidth (Hz)
Aeff = 55*10**-12 #effective cross-sectional area of the propagating wave (square meter)
Leff = 20*10**03 #effective length(km)
b = 2 #polarization factor
gB = 4*10**-11 #Brillous gain co-efficient (m/W)
delta_Vsource = 40*10**6 #optical source linewidth (Hz)
#calculation
Pth = 21*(Aeff*b/(gB*Leff))*(1+(delta_Vsource/delta_VB)) #SBS threshold power(W)
Ps_out_db = 10*(math.log10(Pth*10**3)) #SBS threshold power(dB)
#result
print "SBS threshold power = " , round(Pth*10**3,1) ,"mW"
print "SBS threshold power = " , round(Ps_out_db,1) ,"dBm"
import math
#variable declaration
sus_P=6*10**-15 #Third order nonliner suseptibility (m^3/Ws)
D = 3 #degenereting factor
Leff = 22*10**03 #effective length (meters)
Aeff = 6.4*10**-11 #effective cross-sectional area of the fiber (m^2)
etta = 0.05 #quantum efficiency
Lambda = 1540*10**-9 #Wavelength in single mode fibers (meters)
C = 3*10**8 #free space velocity (m/s)
alpha = 0.0461 #attenuation (per Km)
L = 75 #fiberlink length (Km)
P = 10**-3 #each channel input power of 1 mW
n = 1.48 #refractive index
#calculation
k = ((32*(math.pi**3)*sus_P)/((n**2)*Lambda*C))*(Leff/Aeff) #nonlinear interaction constant
P112 = etta*(D**2)*(k**2)*(P**3)*(math.exp(-alpha*L)) #power genreted(W)
#result
print "Power genreted due to intrection of signals at different freqencies = " , round(P112*10**11,2)*10**-8 , "mW"
import math
#variable declaration
Ts1 = 15*10**-12 #FWHM soliton pulse width
Ts2 = 50*10**-12
#calculation
To1 = Ts1/1.7627 #normalized time(sec)
To2 = Ts2/1.7627
#result
print "Normalized time for FWHM soliton pulse = " , round(To1*10**12) , "-" , round(To2*10**12+2) , "ps"
import math
#variable declaration
Ts = 20*10**-12 #FWHM soliton pulse width (sec)
D = 0.5*10**-6 #dispersion of the fiber (ps/(nm*km))
Lambda = 1550*10**-9 #wavelength (meter)
C = 3*10**8 #free space velocity (m/s)
#calculation
Ldisp = 0.322*2*math.pi*C*(Ts**2)/((Lambda**2)*D) #dispersion length(Km)
#result
print "Dispersion length = " , round(Ldisp/1000) , "Km"
import math
#variable declaration
Lambda = 1550*10**-9 #wavelength (meters)
n2 = 2.6*10**-20 #power (square m/w)
Aeff = 50*10**-12 #effective area (m^2)
Ldisp = 202*10**3 #dispersion length (meters)
#calculation
Ppeak = (Aeff/(2*math.pi*n2))*(Lambda/Ldisp) #soliton of peak power()
#result
print "Soliton of peak power = " , round(Ppeak*1000,2) , "mW"
import math
#variable declaration
Ldisp = 100*10**03 #disperison length in m
omega = 4682 #oscillation period
#calculation
LI = omega*Ldisp #interaction distance(km)
#result
print "Interaction distance >= " , round(LI*10**-5/1000,1) , "e+05 km"
import math
#variable declaration
D = 0.5*10**-6 #disperison of fiber (ps/nm.km)
C = 3*10**8 #free space velocity(m/s)
S0 = 8 #normalized separation of neighnoring solitons
B = 10*10**9 #data rate (10Gb/sec)
Lambda = 1550*10**-9 #wavelength (m)
#calculation
Beta2 = (Lambda/(2*math.pi));
LT = (C*math.exp(S0))/(16*D*B**2*(Beta2**2)*(S0**2)) #Total transmission distance(km)
#result
print "Total transmission distance in km << " , round(LT/10000),"km"
import math
#variable declaration
S0 = 8 #normalized separation of neighnoring solitons
B = 10*10**9 #data rate (10Gb/sec)
#calculation
Ts = 0.881/(S0*B) #FHWM soliton pulse width
#result
print "FWHM soliton pulse width = " , round(Ts*1000*10**9),"ps"
import math
#variable declaration
S0 = 8 #normalized separation of neighnoring solitons
#calculation
Ts_TB = 0.881/S0 #fraction of bit slot occupied by a soliton
#result
print "Fraction of bit slot occupied by a soliton in % = " , round(Ts_TB*100),"%"