#(a)Calculate the maximum CW power
n=0.15 #efficiency
Vomax=100 #maximum operating voltage in volt
Iomax=200*(10**-3) #maximum operating current in ampere
Pdc=Vomax*Iomax
P=n*Pdc
print"The maximum CW power(in Watts)is =",int(P),"W"
#(b) Calculate the resonant frequency
L=6*(10**-6) #drift-region Length in meter
vd=2*(10**5) #carrier drift velocity in m/s
f=vd/(2*L)
f=f/(10**9) #in GHz
print"The resonant frequency(in GHz)is =",round(f,2),"GHz"
#calculate the avalanche-zone velocity
J=20*(10**3) #current density in A/cm**2
q=1.6*(10**-19) #charge of electron in C
NA=2*(10**15) #Doping Concentration in /cm**3
vs=J/(q*NA)
print"Avalanche-zone velocity(in cm/s)is =","{:.2e}".format(vs),"cm/s"
print('This means that the avalanch-zone velocity is much larger than the scattering-limited velocity')
#(a) Calculate the break down voltage
q=1.6*(10**-19) #charge of electron
N=2.8*(10**21) #Donor Concentration /m**3
L=6*(10**-6) #silicon length in meter
er=11.8 #Relative dielectric constant of silicon
es=8.854*(10**-12)*er #permittivity of silicon in F/m
Vbd=(q*N*(L**2))/es
print"The break down voltage(in Volts) is =",round(Vbd,2),"V"
#(b)Calculate the break down electric field
Ebd=Vbd/L
print"the break down electric field is =","{:.3e}".format(Ebd),"V/m =","{:.3e}".format(Ebd/100),"V/cm"
import math
#(a)Calculate the power gain in decibels
R=25 #R=f0/fs ,ratio of output frequency over signal frequency
yQ=10 #figure of merit
x=((yQ)**2)/R
PG=(R*x)/((1+sqrt(1+x))**2)
PG=10*math.log10(PG) #calculating in dB
print"The power gain (in dB)is =",round(PG,3),"dB"
#(b)Calculate the noise figure in decibels
Td=350 #Diode temperature in degree Kelvin
To=300 #ambient Temperature in degree Kelvin
F=1+(((2*Td)/To)*((1.0/yQ)+(1.0/yQ**2)))
F=10*log10(F) #calculating in dB
print"The noise figure (in dB)is =",int(round(F)),"dB"
#(c)Calculate the band width
y=0.4 #factor of merit figure
BW=2*y*sqrt(R) #R=fo/fs
print"The band width is =",int(BW)