import math
# Variable Declaration
gs = 0.0025; # output conductance in mho
gl = 0.0025; # load conductance
r = -250; # negative resistance of microwave device
# calculations
# P1 = Vl**2 *gl # power that is transferred to load
# P = Vl**2 *gs # source is matched to load
# P = [Is/(gl+gs)]**2 *gs
# = ((Is**2)/(4*gs**2))*gs
# = (Is**2)/(4*gl)
# P2 = Vl**2 *gl # Load power
# = [Is/(gs+gl-g)]**2 *gl
# = (Is**2 *gl)/(2gl - g)**2
# P2/P1 = ((Is**2 *gl)/(2gl - g)**2)*(4*gl)/(Is**2)
# = (4*gl**2)/(2gl - g)**2;
# = (4*gl**2)/(4gl**2 + g(g-4gl))
# For P2/P1 > 1 , 4gl > g so that denominator is less than numerator
g = 1/float(r);
# let k = P2/P1
k = (4*gl*gl)/((2*gs)+ g)**2
# Result
print'Power gain = %d'%k;
import math
# Variable Declaration
Rl = 500; # load resistance
# Calculations
gl = 1/float(Rl); # load conductance
gmax = 4*gl; # max negative diff. conductance
# Result
print'gmax = %3.3f mho'%gmax;
import math
# Variable Declaration
L = 10*10**-6; # width of N-region
Vs = 10**5; # saturated vel. of carriers
# Calculations
fo = (3*Vs)/(4*L); # oscillation frequency
# Result
print'Operational frequency = %3.1f Ghz\n'%(fo/float(10**9));
print'Note: In textbook it is wrongly printed as 6.5 Ghz';
import math
# Variable Declaration
L = 10**-6; # gate length
Vs = 10**5; # saturation velocity in m/s
# calculations
fT = Vs/(2*math.pi*L); # cut-off freq.
# Result
print'Unity gain cut-off frequency = %3.0f Ghz'%(fT/float(10**9));
import math
# Variable Declaration
f = 10*10**9; # oscillating freq. of Gunn diode
Vs = 10**5; # saturation carrier velocity in m/s
# calculations
L = Vs/float(f); # length of active layer
# Result
print'Length of active layer = %3.0f µm'%(L/float(10**-6));
import math
# Variable Declaration
f = 10*10**9; # oscillating freq. of Gunn diode
Vs = 10**5; # saturation carrier velocity in m/s
er = 13; # relative permitivity
u = 100*10**-4; # mobility in m^2/V-s
eo = 8.85*10**-12; # permitivity in F/m
e = 1.6*10**-19; # charge of electron
# Calculations
L = Vs/float(f); # length of active layer
no = (eo*er*Vs)/float((L*e*u)); # doping concentration
# Result
print'Doping Concentration no >> %3.2g /m**3'%no;
import math
# Given data
fo = 40*10**9; # oscillating freq. of Gunn diode
no = 10**15; # doping concentration
up = 8000; # mobility in positive conductance region
er = 13; # relative permitivity
um = 100; # mobility in m^2/V-s
eo = 8.85*10**-14; # permitivity in F/cm
e = 1.6*10**-19; # charge of electron
# Calculations
# (eo*er)/(e*up) << no/fo < (eo*er)/(e*um) // condition to be satisfied
# let k = (eo*er)/(e*up) , l = (eo*er)/(e*um) , p = no/fo
p = no/fo
k = (eo*er)/(e*up)
l = (eo*er)/(e*um)
if k<p:
if p<l:
print'Necessary Condition satisfied';
import math
# Variable Declaration
n = 10**15; # doping concentration in /cm^3
u = 8500; # mobility in m^2/V-s
er = 13; # relative permitivity
eo = 8.85*10**-14; # permitivity in F/cm
e = 1.6*10**-19; # charge of electron
# Calculations
Td = (eo*er)/float((n*u*e)); # Dielectric relaxation time
# Output
print'Dielectric relaxation time = %3.3f ps'%(Td*10**12);
import math
# Variable Declaration
f = 20*10**9; # oscillating freq. of Gunn device
Vs = 10**5; # saturation carrier velocity in m/s
# Calculations
L = Vs/float(f); # length of device
# Result
print'length of device = %d µm'%(L*10**6);
import math
# Given data from graph
up = (2*10**7)/float(3000); # mobility of diode in positive conductance region
un = (2*10**7 - 10**7)/float(((10-3)*10**3)); # mobility of diode in negative conductance region
# Result
print'mobility of diode in positive conductance region = %d cm**2/(V-s)'%up;
print'mobility of diode in negative conductance region = %3.0f cm**2/(V-s)'%un;
import math
# Variable Declaration
e = 1.6*10**-19; # charge of electron
Nd = (10**15)*(10**6); # mobility
L = 10*10**-6; # active layer of Barritt diode
er = 12.5 # relative permitivity
eo = 8.85*10**-12; # permitivity in F/cm
# calculations
Ex = (e*Nd*L)/float((2*eo*er)) # electric field for Va = Vpt and x = L/2
E = Ex/float(10**2); # electric field in v/cm
Vpt = 10*10**-4*E
# Result
print'Electric field E(x) = %3.0d KV/cm\n'%(E/float(1000)),'Punch through voltage = %3.0f Volts'%Vpt;
import math
# Variable Declaration
fT = 10; # ft specification of BJT
f_a = 2; # operating freq in Ghz case a
f_b = 10; # operating freq in Ghz case b
# calculations
hFE_a = fT/float(f_a);
hFE_b = fT/float(f_b);
# Result
print'case a:\n hFE = %d\n'%hFE_a,'case b:\n hFE = %d\n'%hFE_b;
import math
# Variable Declaration
n = 10**15; # doping concentration in /cm^3
er = 15; # relative permitivity
eo = 8.85*10**-14; # permitivity in F/cm
e = 1.6*10**-19; # charge of electron
sigma = 133*10**-2; # conductivity in ohm/cm
# calculations
Td = (eo*er)/float(sigma); # dielectric relaxation time constant
u = sigma/float((n*e)) ; # mobility
# Result
print'Dielectric relaxation time constant = %3.0f ps\n'%(Td*10**12),'Carrier Mobility = %d cm**2/V-s'%u;
import math
# Variable Declaration
gm = 50*10**-3; # conductance in mho
cgs = 0.6*10**-12; # gate to source capacitance
cgd = 0.015*10**-12; # gate to drain capacitance
Rg = 3; # gate resistance in ohm
Rs = 2; # source resistance in ohm
Ri = 2.5; # intrinsic channel resistance
Rds = 400; # drain to source resistance
# Calculations
fT = gm/(2*math.pi*cgs); # device's fT
t3 = 2*math.pi*Rg*cgd;
r1 = (Rg+Rs+Ri)/Rds;
fmax = fT/(2*math.sqrt(r1 + (fT*t3))); # max usable frequency
if fmax>40*10**9:
print'Operation at 40 GHz is Theoretically possible\n';
# utput
print' fT = %3.1f Ghz\n'%(fT/float(10**9)),' fmax = %3.1f'%(fmax/float(10**9));
import math
# Variable Declaration
f2 = 20; # pump frequency in GHz
f1 = 2; # signal frequency in GHz
# Calculations
Gp = (f1+f2)/f1; # power gain if parametric amp. operated as USB up-converter
Gp_dB = 10*math.log10(Gp); # power gain in dB
Gp_lsb = (f2-f1)/f1; # power gain if parametric amp. operated as LSB up-converter
Gp_db_lsb = 10*math.log10(Gp_lsb); # power gain in dB
# Result
print'Power gain of parametric amplifier when operated as USB up-converter = %3.1f dB\n'%Gp_dB ,'Power gain of parametric amplifier when operated as LSB up-converter = %3.2f dB'%Gp_db_lsb;
import math
# Variable Declaration
h = 6.63*10**-34; # planck's constant in Joule-sec
el = 0.25; # lower energy level in eV from energy level diag.
eh = 1.5; # higher energy level in eV from energy level diag.
e = 1.6*10**-19; # charge of electron
c = 3*10**8; # vel. of light in m/s
# calculations
hf = (eh - el)*e; # energy diff b/w two levels in J
f = hf/float(h); # frequency
lamda = c/float(f); # o/p laser wavelength in m
# Result
print'Output laser wavelength = %3.0e m '%(lamda),'or %3.0f µm '%(lamda*10**6);
import math
# Variable Declaration
p = 0.1*10**-2; # resistivity in ohm-m
t = 100*10**-6; # thickness in m
AR = 10/1; # aspect ratio
# Calculations
ps = p/float(t)
R = ps*AR; # Resistance in ohm
# Result
print'Resistance = %d Ω'%R;
import math
# Given data from fig
R_a = 1000; # resistance shown in fig a
W1 = 0.15*10**-3 # width of geometry fig 6.72a
L1 = 3*10**-3 # Length of geometry fig 6.72a
W2 = 75*10**-6 # width of geometry fig 6.72b
L2 = 1500*10**-6 # Length of geometry fig 6.72b
t1 = 10*10**-6 # thickness of geometry fig 6.72a
t2 = 20*10**-6 # thickness of geometry fig 6.72b
#R1 = ρs1*(L1/W1); # resistor geometry of fig 6.72a
#ρs1 = (R1*W1)/L1;
ps1 = (R_a*W1)/L1; # sheet resistivity of geometry of fig 6.72a
p = ps1*t1; # resistivity
ps2 = p/float(t2); # sheet resistivity of geometry of fig 6.72b
R2 = ps2*(L2/W2); # resistance of geometry of fig 6.72b
# Result
print'For Geometry in Fig 6.72b\n','sheet resistivity = %3.0f Ω/□\n'%ps2,'Resistance = %d Ω'%R2;
import math
# Variable Declaration
A = 100*100*10**-12; # Area of electrode
er = 9.6; # relative permitivity
t = 500*10**-6; # substrate thickness
eo = 8.85*10**-12; # permitivity
# Calculations
C = (eo*er*A)/float(t); # capacitance in farad
# Result
print'Capacitance = %3.2e pF'%(C*10**12);
import math
# Variable Declaration
ps = 100; # sheet resistivity
L = 1.04 # length
W = 0.02 # width
# Calculations
NOS = L/W # number of squares
R = ps * NOS # resistance
# Result
print'Resistance = %3.1f KΩ' %(R/float(1000));