#Variable declaration
f1=150*10**6 #reciever IF
f2=19*10**9 #output frequency change
#Calculation
m=f1*f2**-1 #maximum tempreture change
#Result
print'Maximum tempreture change = %d × 10^-3 °C '%round(m*10**3)
import math
#Variable declaration
p=-85.45/10
n=0.86 #quantum efficiency
h1=1.54*10**-6 #homodyne receiver operating wavelength
sn=10**-1.2 #SNR
h=6.626*10**-34 #plancks constant
c=2.998*10**8 #velocity of light
#Calculation
ps=10**(p) #incoming signal power in dB
B=(n*ps*sn*h1)/(h*c) #Bandwidth
#Result
print'Incoming signal power, Ps = %f nW'%(ps*10**9)
print'Operating bandwidth, B = %.1f GHz'%(B*10**-9)
#Variable declaration
pe=4.24 #probability error function
pe2=20 #probability exponential function
#Calculation
Np=pe**2*4 #no of photons
Np2=pe2*4
Np3=pe**2/2
#Result
print'(a) ASK heterodyne synchronous detection = %d photons'%round(Np)
print'(b) ASK heterodyne asynchronous detection = %d photons'%round(Np2)
print'(c) pSK homodyne detection = %d photons'%round(Np3)
import math
#Variable declaration
h1=6.626*10**-34 #plancks constant
c=2.998*10**8 #speed of light
Bt=400*10**6 #FSK signal bit rate
h=1.55*10**-6 #wavelength
#Calculation
ps=(36*h1*c*Bt)/(h) #optical power
#Result
print'Minimum incoming optical power level = %.1f nW'%(ps*10**9)
import math
#Variable declaration
Np=36 #average photons
Np2=9 #average photons
h=6.63*10**-34 #plancks constant
f=3*10**8 #frequency
Bt=50*10**6 #bit rates
Bt2=10**9 #bit rates
h1=1.55*10**-6 #operating wavelength
a=0.2 #connector loss
#Calculation
Ps=Np*h*f*Bt/h1 #in watt
Ps1=10*math.log10(Ps*10**3) #in dB
ma=4-Ps1 #Max. system margin
mar=ma/a #Max. repeater spacing
Ps2=Np*h*f*Bt2/h1 #in watt
Ps3=10*math.log10(Ps2*10**3) #in dB
ma1=4-Ps3 #Max. system margin
mar1=ma1/a #Max. repeater spacing
Ps4=Np2*h*f*Bt/h1 #in watt
Ps5=10*math.log10(Ps4*10**3) #in dB
ma2=4-Ps5 #Max. system margin
mar2=ma2/a #Max. repeater spacing
Ps6=Np2*h*f*Bt2/h1 #in watt
Ps7=10*math.log10(Ps6*10**3) #in dB
ma3=4-Ps7 #Max. system margin
mar3=ma3/a #Max. repeater spacing
#Result
print'(a)Max. repeater spacing (50 Mbit s^-1) = %.1f km'%round(mar)
print' (1 Gbit s^-1) = %.1f km'%round(mar1)
print'\n(b)Max. repeater spacing (50 Mbit s^-1) = %.1f km'%round(mar2)
print' (1 Gbit s^-1) = %.1f km'%round(mar3)
import math
#Variable declaration
np=150
h1=6.626*10**-34 #plancks constant
c=2.998*10**8 #speed of light
bf=20*10**12 #optical bandwidth
h=1.3*10**-6 #wavelength
#Calculation
tx=(np*h1*c*bf)/h #transmitter power
#Result
print'Minimum transmitter power = %.1f mW' %(tx*1000)