from __future__ import division
from math import sqrt, pi
# Calculation of a)peak photocurrent , b)shot noise and c)mean square shot noise current
#Given data
n=0.7# # Efficiency
lamda=0.9*10**-6# # Wavelength
R=5*10**3# # Load resistance
I=2*10**-9# # Dark current
P=300*10**-6# # Incident power
B=15*10**6# # Bandwidth
T=298# # Room temperature
h=6.62*10**-34#
c=3*10**8#
e=1.602*10**-19# # Charge of an electron
k=1.381*10**-23# # Boltzman constant
# a)Peak photocurrent
I=(n*P*e*lamda)/(h*c)#
I=I*10**6#
#b) Shot noise and mean square shot noise current
s=2*e*B*(2+I)#
s=s*10**11#
#c) mean square shot noise current
t=(4*k*T*B)/R#
t=t*10**17#
print"Peak photocurrent = %0.3f nA "%(I)#
print"Shot noise = %0.1f 10**-20 A "%(s)#
print"Mean square shot noise current = %0.2f*10**-17 A "%(t)#
# The answers vary due to round off error
from math import log10
# Calculation of signal to noise ratio
#Given data
I=152.3*10**-9# # Peak photocurrent
s=74.15*10**-20# # Shot noise
t=4.94*10**-17# # Mean square shot noise current
F=10*log10(3)# # Noise figure
B=15*10**6# # Bandwidth
T=298# # Room temperature
k=1.381*10**-23# # Boltzman constant
R=5*10**3# # Load resistance
e=1.602*10**-19# # Charge of an electron
# Signal to noise ratio
S=(I**2)/((2*e*B*(2+I))+(4*k*T*B*F)/R)#
S=S*10**3#
print"Signal to noise ratio = %0.2f "%(S)#
# The answers vary due to round off error
# Calculation of a)load resistance and b)bandwidth
#Given data
Cd=5*10**-12 # Capacitance of pin photodiode
B=10*10**6# # Bandwidth
Ca=10*10**-12# # Input capacitance
# a)Load resistance
R=1/(2*pi*B*Cd)#
R=R*10**-3#
# b)Bandwidth
Bm=1/(2*pi*(Cd+Ca)*R)#
Bm=Bm*10**-9#
print"Wavelength of photodiode = %0.2f kohm "%(R)#
print"Bandwidth = %0.3f MHz "%(Bm)#
# The answers vary due to round off error
# Calculation of signal to noise ratio.
#Given data
h=6.62*10**-34# # Planck constant
c=5*10**-12# # capacitor
lamda=1.55*10**-6# # Wavelength
B=50*10**6# # Speed of communication
s=2*10**-9#
I=10**-7#
k=1.381*10**-23#
T=291#
x=0.3#
e=1.602*10**-19#
# Maximum load resistance is
R=1/(2*pi*c*B)#
S=I**2/((2*e*B*I)+(4*k*T*B/R))#
M=((4*k*T)/(e*x*R*I))**(0.435)#
S1=((((M**2)*(I**2))/(2*e*B*I*M**2.3))+((4*k*T*B)/R))#
S1=10*log10(S1)#
print"Load resistor = %0.1f ohm "%(R)#
print"S/N = %0.2f dB "%(S)#
print"M = %0.2f "%(M)#
print"S/N = %0.2f dB "%(S1)#
# The answers vary due to round off error
# Calculation of a) responsivity b)incident optical power
#Given data
n=0.6# # Quantum efficiency
e=1.602*10**-19# # Charge of electron
lamda=0.9*10**-6# # Wavelength
h=6.626*10**-34# # Planck constant
c=3*10**8# # Velocity of light
I=2*10**-6# # Photocurrent
# a)Responsivity
R= (n*e*lamda)/(h*c)#
# b)Incident power
P=I/R#
P=P*10**6#
print"Responsivity = %0.3f A/W "%(R)#
print"Incident power = %0.3f microwatt "%(P)#
# The answers vary due to round off error
# Calculation of a) responsivity b)Multiplication factor
#Given data
n=0.8# # Quantum efficiency
e=1.602*10**-19# # Charge of an electron
lamda=0.9*10**-6# # Wavelength
h=6.626*10**-34# # Planck constant
c=3*10**8# # Velocity of light
I=15*10**-6# # Photocurrent
P=0.6*10**-6#
# a)Responsivity
R= (n*e*lamda)/(h*c)#
# b)Multiplication factor
Ip=P*R#
M=I/Ip#
print"Responsivity = %0.3f A/W "%(R)#
print"Multiplication factor = %0.2f "%(M)#
# The answers vary due to round off error
# Calculation of a) quantum efficiency b) responsivity
#Given data
e5=500# # No of incident photons
e8=800# # No of incident electrons
e=1.602*10**-19# # Charge of an electron
lamda=1.3*10**-6# # Wavelength
h=6.626*10**-34# # Planck constant
c=3*10**8# # Velocity of light
I=15*10**-6# # Photocurrent
P=0.6*10**-6#
# a)Quantum efficiency
n=e5/e8#
# b)Responsivity
R=(n*e*lamda)/(h*c)#
print"Quantum efficiency = %0.1f %% "%(n*100)#
print"Responsivity = %0.3f A/W "%(R)#
# The answers vary due to round off error
# Calculation of a) quantum efficiency b) responsivity
#Given data
e5=1.2*10**11# # No of electrons collected
e8=3.6*10**11# # No of incident photon
e=1.602*10**-19# # Charge of an electron
lamda=0.85*10**-6# # Wavelength
h=6.626*10**-34# # Planck constant
c=3*10**8# # Velocity of light
I=15*10**-6# # Photocurrent
P=0.6*10**-6#
# a)Quantum efficiency
n=e5/e8#
# b)Responsivity
R=(n*e*lamda)/(h*c)#
print"Quantum efficiency = %0.2f "%(n)#
print"Responsivity = %0.3f A/W"%(R)#
# The answers vary due to round off error
# Calculation of a) operating wavelength b) incidence optical power
#Given data
n=0.60 # Quantum efficiency
E=1.5*10**-19# # Photons of energy
e=1.602*10**-19# # Charge of an electron
h=6.626*10**-34# # Planck constant
c=3*10**8# # Velocity of light
I=2*10**-6# # Photocurrent
# a)Operating wavelength
lamda=(h*c)/E#
lamda=lamda*10**6#
# b)Incident optical power
R=(n*e)/E#
P=I/R#
P=P*10**6#
print"Wavelength of photodiode = %0.2f micrometer "%(lamda)#
print"Incident optical power = %0.2f microWatt "%(P)#
# The answers vary due to round off error
# Calculation of load resistance and bandwidth
#Given data
Cd=6*10**-12 # Capacitance of pin photodiode
B=20*10**6# # Bandwidth
Ca=6*10**-12# # Input capacitance
# a)Load resistance
R=1/(2*pi*B*Cd)#
R=R*10**-3#
# b)Bandwidth
Bm=1/(2*pi*(Ca+Ca)*R)#
Bm=Bm*10**-9#
print"Load resistance = %0.2f kohm "%(R)#
print"Bandwidth = %0.0f MHz "%(Bm)#
# The answers vary due to round off error
# Calculation of maximum bandwidth
#Given data
t=5*10**-12 # Electron transit time
G=70# # Gain of the device
# Maximum bandwidth
Bm=1/(2*pi*t*G)#
Bm=Bm*10**-6#
print"Bandwidth = %0.1f MHz "%(Bm)#
# The answers vary due to round off error