Chapter 12: Optical Systems¶

Example 12.1,Page number 431¶

In [1]:
import math

#given

Pt=10.;            #in microW
Pr=1.;             #in microW
PtdBm=10*math.log10(Pt*10**-6/10**-3)                    #in dBm
print"Transmitter Power =",round(PtdBm,4),"dBm";
PrdBm=10*math.log10(Pr*10**-6/10**-3)                    #in dBm
Pm=PtdBm-PrdBm;
print"Power margin=",round(Pm,4),"dBm";                  #misprint in book

Transmitter Power = -20.0 dBm
Power margin= 10.0 dBm


Example 12.2,Page number 431¶

In [5]:
import math

#given

Pt=25.;            #in microW
Prd=15.;            #in dBm
Ptd=10*math.log10(Pt*10**-6/10**-3)                    #in dBm
print"Transmitter Power =",round(Ptd,4),"dBm";
Pm=Ptd-Prd;
print"Power margin=",round(Pm,4),"dBm";

Transmitter Power = -16.0206 dBm
Power margin= -31.0206 dBm


Example 12.3,Page number 432¶

In [6]:
import math

#given

Pt1=-18;            #in dBm for 50/125 micron fiber
Pt2=-10;            #in dBm for 100/125 micron fiber
Pd=Pt1-Pt2;

 Additional  Power = -8.0 dBm


Example 12.4,Page number 432¶

In [10]:
import math

#given

Plb=10;            #in dBm for 50/125 micron fiber
Ps=3;            #in dBm for safety margin
Prs=-30;            #in dBm for receiver sensivity
Pt=Plb+Ps+Prs;
Ptw=10**(Pt/10.)*1000;
print"Transmitter Power =",round(Ptw,4),"microW";

Link power budget = -17.0 dBm
Transmitter Power = 19.9526 microW


Example 12.5,Page number 433¶

In [9]:
import math

#given

Is=0.5;         #in A/W
Ir=1.5;         #in microA
Xw=Ir/Is;
print"Electrical power required by PIN diode is =",round(Xw,4),"microW";
Pxw=10*math.log10(Xw/10**3);
print"Therefore, Electrical power required by PIN diode is =",round(Pxw,4),"dBm";

Ps=3;            #in dB for safety margin
Tp=5;            #in dB
Pt=Tp+Ps+Pxw;
print"Total Power Required =",round(Pt,4),"dBm";

Electrical power required by PIN diode is = 3.0 microW
Therefore, Electrical power required by PIN diode is = -25.2288 dBm
Total Power Required = -17.2288 dBm


Example 12.6,Page number 442¶

In [12]:
import math

#given

fb=1.25;        #in Gb/s
D=17;           #in ps/nm.km
dL=0.5;         #in nm
Lmax=1/fb/10**9/dL/10**-9/D/10**-12*10**-9;

Maximum Link span,Lmax = 94.1176 km


Example 12.7,Page number 442¶

In [16]:
import math

#given

fb=2.5;            #in Gb/s
Lmax=50.;           #in km
dL=0.4;            #in nm
D=1./fb/10**9/dL/10**-9/Lmax/10**-12*10**-9;
print"Maximum allowable dispersion,D =",round(D,4),"ps/nm-km";

Maximum allowable dispersion,D = 20.0 ps/nm-km


Example 12.8,Page number 443¶

In [17]:
import math

#given

Lmax=60.;        #in km
D=17.;           #in ps/nm.km
dL=0.5;         #in nm
fb=1/Lmax/10**9/dL/10**-9/D/10**-12*10**-9;
print"Maximum system bit rate,fb =",round(fb,4),"Gb/s";

Maximum system bit rate,fb = 1.9608 Gb/s


Example 12.9,Page number 443¶

In [18]:
import math

#given

c1=4;               #channel1
c2=8;               #channel2
c3=16;              #channel3
fb=2.5;             #in Gb/s
Lmax1=6.1*10**3/(c1*fb)**2;
print"Maximum Link span for",c1,"channel, Lmax =",Lmax1,"km";
Lmax2=6.1*10**3/(c2*fb)**2;
print"Maximum Link span for",c2,"channel, Lmax =",Lmax2,"km";
Lmax3=6.1*10**3/(c3*fb)**2;
print"Maximum Link span for",c3,"channel, Lmax =",Lmax3,"km";

Maximum Link span for 4 channel, Lmax = 61.0 km
Maximum Link span for 8 channel, Lmax = 15.25 km
Maximum Link span for 16 channel, Lmax = 3.8125 km


Example 12.10,Page number 444¶

In [20]:
import math

#given

L=200;          #in km
dL=1550;        #in nm
R=10;           #in Gb/s
Cd=17;          #in ps/nm-km
w=0.1;          #Assused bandwidth
Cd200=Cd*L;
print"Dispersion by 200km ofc =","{0:.1e}".format(Cd200),"ps/nm";
TCd=w*Cd200;
print"total chromatic  dispersion =","{0:.1e}".format(TCd),"ps";

Dispersion by 200km ofc = 3.4e+03 ps/nm
total chromatic  dispersion = 3.4e+02 ps


Example 12.11,Page number 480¶

In [21]:
import math

#given

L=1.5;          #in km
Ls=L/3;         #in km
BwF=600;                #in MHz
fb=1;               #in Gbps
Bdlaser=0.71*BwF*L**-0.7*Ls**-0.25;
print"Laser bandwidth is",round(Bdlaser,4),"MHz";
mD=0.85*(fb*10**3/Bdlaser)**2;
print"Mean dispersion penalty is",round(mD,4),"dB";

Laser bandwidth is 381.4198 MHz
Mean dispersion penalty is 5.8427 dB


Example 12.12,Page number 481¶

In [4]:
import math

#given

E=0.182;        #from table 12-11 for 2dB dispersion penalty
fb=622;         #in Mb/s
dl=4;           #in nm
ofdisp=3;       #in ps/km-nm
Dmax=E/(10**-6*fb*dl);
print"Dmax is",round(Dmax,4),"ps/nm";
Lmax=Dmax/ofdisp;

Dmax is 73.1511 ps/nm
Maximum link distance is 24.3837 km


Example 12.13,Page number 481¶

In [5]:
import math

#given

E=0.115;        #from table 12-11 for 2dB dispersion penalty
fb=622;         #in Mb/s
dl=4;           #in nm
ofdisp=3;       #in ps/km-nm
Dmax=E/(10**-6*fb*dl);
print"Dmax is",round(Dmax,4),"ps/nm";
Lmax=Dmax/ofdisp;

Dmax is 46.2219 ps/nm
Maximum link distance is 15.4073 km


Example 12.14,Page number 481¶

In [8]:
import math

#given

mc=0.4;         #in dB
sc=0.0;         #in dB
dmax=2.8;       #in dB
mt=-4.9;        #in dBm
st=0.5;         #in dBm
mr=-38.1;       #in dBm
sr=0.48;        #in dBm
mco=0.35;       #in dB
sco=0.20;       #in dB
ms=0.2;         #in dB
ss=0.1;         #in dB
E=0.182;        #from table 12-11 for 2dB dispersion penalty
fb=156;         #in Mb/s
dl=4;           #in nm
ofdisp=2.8;     #in ps/nm-km
Nco=7;
mD=2;
sD=0.1;
sH=2;
sCR=0.25;
Ns=4;
mH=0;
mCR=0.5;
L=50;
Ls=10;
Dmax=E/(10**-6*fb*dl);
print"Dmax is",round(Dmax,4),"ps/nm";
Lmax=Dmax/ofdisp;
mM=mt-mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);
sM=math.sqrt(st**2+sr**2+sc**2*L*Ls+sco**2*Nco+sD**2*sH**2+sCR**2);

Dmax is 291.6667 ps/nm
Maximum link distance is 104.1667 km
Mean link margin is 7.45 dB
Sigma link margin is 0.9289 dB


Example 12.15,Page number 483¶

In [9]:
import math

#given

E=0.115;
fb=622;         #in Mb/s
dl=4;           #in nm
mt=0.1;         #in dBm
mr=-31.5;       #in dBm
mc=0.41;        #in dB
L=25;
mco=0.12;       #in dB
Nco=2;
ms=0.15;        #in dB
Ns=4;
mD=1;
mH=0;
mCR=0;
sc=0.0;         #in dB
st=-0.15;       #in dBm
sr=0.3;         #in dBm
sco=0.08;       #in dB
ss=0.1;         #in dB
ofdisp=2.8;     #in ps/nm-km
sD=2;
sH=0;
sCR=0.0;
Ls=12;

Dmax=E/(10**-6*fb*dl);
print"Dmax is",round(Dmax,4),"ps/nm";
Lmax=Dmax/ofdisp;
print"Maximum link distance is",round(Lmax,4),"km";   #in book 4 is misprint for solving
mM=mt-mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);
print"Mean link margin is",round(mM,4),"dB";         #wrong in book
L=60;
Ls=12;
sM=math.sqrt(st**2+sr**2+sc**2*L*Ls+sco**2*Nco+ss**2*Ns+sD**2*sH**2+sCR**2);
spm=mM-2*sM-1;
print"System power margin is",round(spm,4),"dB";   #answer is slighty difeerent due to mM=19.5

Dmax is 46.2219 ps/nm
Maximum link distance is 16.5078 km
Mean link margin is 19.51 dB
Sigma link margin is 0.4066 dB
System power margin is 17.6969 dB


Example 12.16,Page number 484¶

In [11]:
import math

#given

E=0.115;
fb=1062;       #in Mb/s
dl=6;          #in nm
mt=-8;         #in dBm
mr=28.7;       #in dBm
mc=0.4;        #in dB
L=5;
mco=0.12;      #in dB
Nco=8;
ms=0.2;        #in dB
Ns=4;
mD=1;
mH=0;
mCR=1;
sc=0.0;        #in dB
st=0.6;        #in dBm
sr=0.75;       #in dBm
sco=0.08;      #in dB
ss=0.1;        #in dB
ofdisp=2.8;    #in ps/nm-km
sD=2;
sH=0;
sCR=0.25;
Ls=12;

Dmax=round(E/(10**-6*fb*dl));        #taking to nearest integer in ps/nm
print"Dmax is",round(Dmax,4),"ps/nm";
Lmax=Dmax/ofdisp;
mM=mt+mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);
L=60;
Ls=12;
sM=math.sqrt(st**2+sr**2+sc**2*L*Ls+sco**2*Nco+ss**2*Ns+sD**2*sH**2+sCR**2);
mM=round(mM*10)/10;     #talking only to 1 decimal place and rounding of other values
spm=mM-2*sM-1;
print"mM-2*sM =",mM-2*sM;
print"System power margin is",round(spm,4),"dB";  #answer is slighty diferent due to m\sM=1.03

Dmax is 18.0 ps/nm
Maximum link distance is 6.4286 km
Mean link margin is 14.94 dB
Sigma link margin is 1.0374 dB
mM-2*sM = 12.8251988047
System power margin is 11.8252 dB


Example 12.17,Page number 486¶

In [12]:
import math

#given

Ncso=50;
a=3.6*10**-3;
m=0.05;
CSO=10*math.log10(Ncso*(a*m)**2);
print"CSO distortion for 50 channel optical system =",round(CSO,4),"dB";

CSO distortion for 50 channel optical system = -57.9048 dB


Example 12.18,Page number 486¶

In [14]:
import math

#given

CSO=-59.8;  #in dB
y=10**(CSO/10);
print"AM modulation depth (m) = ","{0:.3e}".format(y);
asq=3.6*10**-3;
Ncso=50;
msq=(y/Ncso/asq/asq);
print"m^2  =","{0:.3e}".format(msq);
print"Decrease of AM modulation depth decrease the CSO distortion by  =",round(math.sqrt(msq)*100,1),"percent";

AM modulation depth (m) =  1.047e-06
m^2  = 1.616e-03
Decrease of AM modulation depth decrease the CSO distortion by  = 4.0 percent


Example 12.19,Page number 486¶

In [15]:
import math

#given

Ncto=50;
b=1.07*10**-2;
m=0.05;
CTO=10*math.log10(Ncto*(1.5*b*m)**2);
print"CTO distortion for 50 channel optical system =",round(CTO,4),"dB";
#Answer in the book is misprinted
#The solution in the book is calculated without multipication of Ncto

CTO distortion for 50 channel optical system = -44.9214 dB


Example 12.20,Page number 487¶

In [18]:
import math

#given

Ncso=80;
a=2.43*10**-3;
b=4.65*10**-3;
m=0.05;

#Part (i)
CSO=10*math.log10(Ncso*(a*m)**2);
print"CSO distortion for 50 channel optical system for m = 5 percent CSOdB =",round(CSO,4),"dB";

#Part (ii)
CTO=10*log10(Ncso*(1.5*b*m)**2);
print"CTO distortion for 50 channel optical system for m = 5 percent CTOdB =",round(CTO,4),"dB";

#Part (iii)
m=0.03;

CSO=10*log10(Ncso*(a*m)**2);
# Value of a in the book is considered 2.4 instead of 2.43
print"CSO distortion for 50 channel optical system for m = 3 percent CSOdB =",round(CSO,4),"dB";

#Part (iv)
CTO=10*math.log10(Ncso*(1.5*b*m)**2);
print"CTO distortion for 50 channel optical system for m = 3 percent CTOdB =",round(CTO,4),"dB";

CSO distortion for 50 channel optical system for m = 5 percent CSOdB = -59.2776 dB
CTO distortion for 50 channel optical system for m = 5 percent CTOdB = -50.1188 dB
CSO distortion for 50 channel optical system for m = 3 percent CSOdB = -63.7145 dB
CTO distortion for 50 channel optical system for m = 3 percent CTOdB = -54.5558 dB


Example 12.21,Page number 487¶

In [19]:
import math

#given

RIN=-150;           #in dB
B=4*10**6;
m=0.04;
CNR=10*math.log10(m**2/(2*10**-15*B));
print" CNR =",round(CNR,4),"dB";

 CNR = 53.0103 dB


Example 12.22,Page number 488¶

In [21]:
import math

#given

CNR=50;           #in dB
Bch=4*10**6;
m=0.03;
RIN=m**2/2/Bch/10**(CNR/10)
print"RIN =","{0:.3e}".format(RIN);
RINdB=10*log10(RIN);
print"RIN in Db is",round(RINdB,4);

RIN = 1.125e-15
RIN in Db is -149.4885


Example 12.23,Page number 490¶

In [22]:
import math

#given

Ipd=0.15;            #in mA
n=0.75;
e=1.6*10**-19;       #electron charge
hv=1.55*10**-19;
Pin=hv*Ipd/n/e;
print"Pin =",round(Pin,4),"mW";        #Result

Pin = 0.1937 mW


Example 12.24,Page number 492¶

In [23]:
import math

#given

OBR=-40;            #in dB
#y=Pref/Pin
y=10**(OBR/10.);
print" Prefl =",round(y*100,4),"percent Pin";

 Prefl = 0.01 percent Pin


Example 12.25,Page number 493¶

In [25]:
import math

#given

R=800;              #in V/W
Pin=1.5;            #in mW
m=0.04;
Voutp=R*Pin*m;
print"Vout(peak) =",Voutp,"mV";
Vavg=Voutp/math.sqrt(2);
print"Vavg =",round(Vavg,4),"mV";
#in dB
Vavgd=20*math.log10(Vavg*10**-3);
print"Vavg(in dBmV) =",round(Vavgd,4);

Vout(peak) = 48.0 mV
Vavg = 33.9411 mV
Vavg(in dBmV) = -29.3855


Example 12.26,Page number 494¶

In [27]:
import math

#given

Voutp=20;                 #in dB
Pin=1.2;                  #in mW
m=0.035;
Vavg=10**(Voutp/20);      #in
R=Vavg*math.sqrt(2)/Pin/m;
print"R =",round(R,4),"V/W";

R = 336.7175 V/W


Example 12.27,Page number 494¶

In [29]:
import math

#given

Voutp=28.;               #in dB
Pin=1;                   #in mW
R=800;                   #in V/W
Vavg=10**(Voutp/20);     #in
m=Vavg*math.sqrt(2)/Pin/R;
print"The modulation depth ,m =",round(m*100,4),"percent";

The modulation depth ,m = 4.4404 percent


Example 12.28,Page number 495¶

In [32]:
import math

#given

Ipd=1.2;              #in mA
m=0.04;
RINd=-160.;            #in dB/Hz
e=1.6*10**-19;
nth=8;                #in pA/Hz
BW=4;                 #in MHz
Rin=10**(RINd/10);     #in

CNR=(0.5*(m*Ipd*10**-3)**2)/((2*e*Ipd*10**-3)+(Rin*Ipd*10**-3)**2+((nth*10**-12)**2)*BW/10**6);
print"Value of CNR=","{0:.3e}".format(CNR);
CNRdB=10*math.log10(CNR)
print"Value of CNR in dB=",round(CNRdB,4),"dB"
#Answer in the book is misprinted or wrong calculation performed in the book

Value of CNR= 3.000e+12
Value of CNR in dB= 124.7712 dB


Example 12.29,Page number 509¶

In [33]:
import math

#given

L1=40;          #in km
L2=100;         #in km
A=0.2;          #in dB/Km
TFA1=A*L1;

print"Total fibre span attenuation",round(TFA1,4),"dB";
TFA2=A*L2;
print"Total fibre span attenuation",round(TFA2,4),"dB";
nsd=TFA2-TFA1;
print"Noise spectral density =",round(nsd,4),"dB";
nsd_abs=10**(nsd/10)
print"Absolute value of noise spectral density =",round(nsd_abs,4),"dB";

Total fibre span attenuation 8.0 dB
Total fibre span attenuation 20.0 dB
Noise spectral density = 12.0 dB
Absolute value of noise spectral density = 15.8489 dB


Example 12.30,Page number 510¶

In [35]:
import math

#given

P1=2.75;            #in mW
NFd=5;              #in dB
bw=5;               #in GHz
G=10;               #in dB
hv=1.6*10**-19;     #photon energy in J
N=1;                #no of amplifiers
NF=10**(NFd/10.);     #amplifier noise figure
SNR=10*math.log10(P1*10**-3/(G*hv*bw*10**9*N*NF));     #signal to nois eratio
print"Spectral Noise density =",round(SNR,4),"dB";

Spectral Noise density = 50.3624 dB


Example 12.31,Page number 510¶

In [36]:
import math

#given

SNRdB=40;            #in dB
NFd=6;               #in dB
bw=4;                #in GHz
Gd=8;                #in dB
hv=1.6*10**-19;      #photon energy in J
N=8;                 #no of amplifiers
SNR=10**(SNRdB/10.);
NF=10**(NFd/10.);     #amplifier noise figure
G=10**(Gd/10.);           #amplifer gain
P1=10*(SNR/10.)*(G*hv*bw*10**9*N*NF)/10**-3;        #optical power launched into fibre
print"Optical power required , Pl =",round(P1,4),"mW ";

Optical power required , Pl = 1.2861 mW


Example 12.32,Page number 518¶

In [37]:
import math

#given

l=1550;     #wavelength in nm
fb=10;      #system bit rate Gb/s
Df=17;      #fiber dispersion in ps/nm-km
L=10**5/Df/fb**2;     #fiber length in km
print"Transmission length is",round(L,4),"km";
fb2=2.5;    #system bit rate Gb/s
print"for fb=2.5 Gb/s"
L2=10**5/Df/fb2**2;       #fiber length in km
print"Transmission length is",round(L2,4),"km";             #answer misprint in book

Transmission length is 58.0 km
for fb=2.5 Gb/s
Transmission length is 941.12 km


Example 12.33,Page number 518¶

In [38]:
import math

#given

lembda=1550;     #wavelength in nm
Df=17;           #fiber dispersion in ps/nm-km
L=80             #fiber length in km
fb=math.sqrt(10**5/Df/L)
print"Maximum bit rate fb =",round(fb,4),"Mb/s";

Maximum bit rate fb = 8.544 Mb/s


Example 12.34,Page number 530¶

In [40]:
import math

#given

D=0.2;                      #dispersion constant in ps/nm/km
Tfwhm=18;                   #ps
Zs=0.25*Tfwhm**2/D;         #Characteristic length
print" Zs =",Zs,"km";       #answer in book is miscalculated

 Zs = 405.0 km


Example 12.35,Page number 530¶

In [42]:
import math

#given

lembda=1550;         #wavelength in nm
c=3*10**5;           #speed of light in km/s
Zs=600;                      #in km
Tfwhm=20;                     #in ps
D=1/1.763**2*(2*math.pi*c*Tfwhm**2/(lembda**2*Zs));  #dispersion constant
print"dispersion constant, D =",round(D,4),"ps/nm/km";

dispersion constant, D = 0.1683 ps/nm/km


Example 12.36,Page number 530¶

In [47]:
import math

#given

l=1557;              #wavelength in nm
c=3*10**5;           #speed of light in km/s
Zs=550;              #in km
D=0.25;              #in ps/nm/km
Tfwhm=math.sqrt(1.763**2*l**2*D*Zs/(2*math.pi*c));      #Soliton pulse width
print"Tfwhm =",round(Tfwhm,3),"ps";

Tfwhm = 23.445 ps


Example 12.37,Page number 531¶

In [48]:
import math

#given

Aeff=55;            #in sq micrometer
l=1557;             #wavelength in nm
c=3*10**5;          #speed of light in km/s
n2=2.6*10**-16;     #in cm**2/W
D=0.20;             #Dispersion constant in ps/nm/km
Tfwhm=30;           #in ps
Zs=(2*math.pi*c*Tfwhm**2/l**2/D)/(1.763)**2 ;        #charecteristic length
print" Zs =",round(Zs,4),"km";
Ps=(Aeff*10**-12*l*10**-9)/(2*math.pi*n2*10**-4*Zs*10**3); #Peak pulse power
#Miscalculation in the book
print" Ps =",round(Ps*1000,4),"mW";

 Zs = 1125.7236 km
Ps = 0.4657 mW


Example 12.38,Page number 533¶

In [49]:
import math

#given

Z=10;               #in mm
Tfwhm=22;           #in ps
D=0.5;              #ps/nm/km
Aeff=55;            #in microm^2
A=0.05;             #in km^-1
nsp=1.5;            #spontaneous emission
F=2;                #amplifier noise
s=3.6*10**3*nsp*F*A*D*Z**3/(Aeff*Tfwhm);
print" sigma =",round(s,4),"ps";

 sigma = 223.1405 ps


Example 12.39,Page number 533¶

In [52]:
import math

#given

Q1=4;           #quality factor
Q2=6;           #quality factor
BER1=(2*math.pi*(Q1**2+2))**-0.5*math.e**(-Q1*Q1/2);
BER2=(2*math.pi*(Q2**2+2))**-0.5*math.e**(-Q2*Q2/2);
print"For Q=4 ,BER =","{0:.3e}".format(BER1);
print"For Q=6 ,BER =","{0:.3e}".format(BER2);
#Answer second is misprinted in the book

For Q=4 ,BER = 3.154e-05
For Q=6 ,BER = 9.856e-10


Example 12.40,Page number 534¶

In [50]:
import math

#given

D=0.5;              #Dispersion constant ps/nm/km
Ts=22;              #Pulse width in ps
fb=10;              #system transmission rate in Gb/s
Z1=1;               #System total length Mm
Z2=10;              #System total length Mm
sa1=8.6*D*D*Z1*Z1*math.sqrt(fb-0.99)/22/2;       #standard deviation based on accoustic effect
sa2=8.6*D*D*Z2*Z2*math.sqrt(fb-0.99)/22/2;       #standard deviation based on accoustic effect
print"For Z=1000km ,sigma acoustic  =",round(sa1,4),"ps";
print"For Z=10000km ,sigma acoustic  =",round(sa2,4),"ps ";

For Z=1000km ,sigma acoustic  = 0.1467 ps
For Z=10000km ,sigma acoustic  = 14.6672 ps


Example 12.41,Page number 535¶

In [54]:
import math

#given

D=0.45;              #dispersion coefficient in ps/nm/km
Ts=22;               #Pulse width in ps
l=0.5;               #length in nm
Lcollision=2*Ts/l/D;        #collision length  in km
print"Lcollision  =",round(Lcollision,4),"km";

Lcollision  = 195.5556 km


Example 12.42,Page number 537¶

In [56]:
import math

#given

f=70;           #Maximum frequencyshift in Ghz
Ts=22;          #Pulse width in ps
CS=1.783*f*10**9*Ts*10**-12;          #half channel seperation
print"The half channel seperation",round(CS,4);

df=0.105/f/10**9/Ts/Ts/10**-24;       #maximum frequency shift
print"The maximum frequency shift",round(df/10**9,4),"GHz";

dt=0.1786/f/10**9/f/10**9/Ts/10**-12;  #time displacement
print"The time displacement",round(dt*10**12,4),"ps";

The half channel seperation 2.7458
The maximum frequency shift 3.0992 GHz
The time displacement 1.6568 ps


Example 12.43,Page number 538¶

In [58]:
import math

#given

M=1.;
N=1.;            #no of collision
S1=4.;           #soliton colllision
S2=5.;           #soliton colllision
Nc=S1*S1/4*(M*S1/2-M+N);        #minimum no of collision
print"Ncollision for S=4,is",Nc;
Nc2=(S2*S2-1)/4*(M*S2/2-M+N);        #minimum no of collision
print"Ncollision for S=5,is",Nc2;

Ncollision for S=4,is 8.0
Ncollision for S=5,is 15.0


Example 12.44,Page number 539¶

In [64]:
import math

#given

S=4.;
n=5;
print"Maximum number of solition Collisions";
for M in range(1,n+1):
N=M;
Nc=S*(M*S*S/3.+S*(N/2.-M)-N/2.+2*M/3.);      #minimum no of collision
print" M=",M,"  N=",N,"  S=",S,"is",Nc;

Maximum number of solition Collisions
M= 1   N= 1   S= 4.0 is 14.0
M= 2   N= 2   S= 4.0 is 28.0
M= 3   N= 3   S= 4.0 is 42.0
M= 4   N= 4   S= 4.0 is 56.0
M= 5   N= 5   S= 4.0 is 70.0


Example 12.45,Page number 539¶

In [82]:
import math

#given

M=1;         #number of solition Collisions
N=1;         # number of solition Collisions
x=2;
y=1./2;
p=3;
p2=4;
Tb=100;          #ps
l=1;             #difference in wavelength in nm
D=7*10**-2;      #ps/nm**2*km
Zr=y*y*(Tb/l/l/D);         #regeration spacing in km
print" Zr =",Zr,"km";
P=(p-1)*N+(p-2)*(p-1)*M/2.;
print" P(",p,") =",P;      #result number of  Collisions
P2=(p2-1)*N+(p2-2)*(p2-1)*M/2.;
print" P(",p2,") =",P2;    #result number of  Collisions

 Zr = 357.142857143 km
P( 3 ) = 3.0
P( 4 ) = 6.0


Example 12.46,Page number 540¶

In [80]:
import math

#given

Tb=100;         #bit period in ps
dZ=0.4;         #in ps/nm/km
Zr=150;         #Modulator spacing in km
Ta=Tb/(dZ*Zr);  #channel spacing in nm
print"Channel spacing",round(Ta,4),"nm";

Channel spacing 1.6667 nm


Example 12.47,Page number 540¶

In [78]:
import math

#given

Zr=200;             #Modulator spacing in km
D=0.6;              #in ps/nm/km
l=2;                #in nm
Tb=l*(Zr*D);        #bit period in ps
print"Bit period Tb =",Tb,"ps";

Bit period Tb = 240.0 ps


Example 12.48,Page number 540¶

In [76]:
import math

#given

D=0.5;          #ps/nm-km
Tb=80;          #bit period in ps
l=1.5;          #in nm
Zr=Tb/(D*l);    #Modulator spacing in km
print" Maximum modulator spacing Zr =",round(Zr,4),"km";

 Maximum modulator spacing Zr = 106.6667 km


Example 12.49,Page number 541¶

In [73]:
import math

#given

Zd=100;        #in km
Do=0.07;       #in ps/nm**2
D1=-0.3;       #in ps/nm**2
Ldsf=(Zd*Do)/(Do-D1);       #length of dispersion compensation fiber in km
print"Length of Dispersion compensation fiber, Ldsf =",round(Ldsf,4),"km";

Length of Dispersion compensation fiber, Ldsf = 18.9189 km


Example 12.50,Page number 542¶

In [70]:
import math

#given

m=3;
n=1;
Tb=100;         #ps
l=1;            #nm
D=0.07;         #ps/nm**2*km
lmn=1;          #nm
lmo=2;          #nm
Do=0.1;         #ps/nm-km
Lc=4*Tb/(5*D*lmn*(lmn+2*lmo));  #Collision length  in km
print"Collision length without dispersion slope compensation =",round(Lc,4),"km";
Lc2=2*Tb/(5*Do*lmn);            #Collision length in km
print"Collision length with dispersion slope compensation =",Lc2,"km";

Collision length without dispersion slope compensation = 228.5714 km
Collision length with dispersion slope compensation = 400.0 km


Example 12.51,Page number 542¶

In [1]:
import math

#given

Zr=200;         #in km
S=4;
Ltot1=2*Zr*(S-1);       #total solition collion length in km
print"Total solition Collisions length With DSC ,Ltotal =",round(Ltot1,4),"km";
Ltot2=(2./5)*Zr*(S-1);        #total solition collion length in km
print"Total solition Collisions length With non-DSC ,Ltotal =",round(Ltot2,4),"km";

Total solition Collisions length With DSC ,Ltotal = 1200.0 km
Total solition Collisions length With non-DSC ,Ltotal = 240.0 km