##Ex9_1
import math
h = 5.*10**-4 ##channel height in centimeters
a= (1/2.)*h ##channel width in centimeters
rho = 10. ##resistivity in ohm_cm
sigma = 1./rho ##conductivity in mho/cm
micro_p = 500. ##mobility in cm_sq/Vs
apsilent_r = 12. ##relative permiability in F/cm of silicon
apsilent_not=8.854*10**-14 ##permiability in vaccum in F/cm
print'%s %.2e %s'%("a = ",(a),"cm")
print'%s %.2f %s'%("sigma = ",(sigma),"mho/cm")
print'%s %.2f %s'%("micro_p = ",(micro_p),"cm-sq/Vs")
print'%s %.2f %s'%("apsilent_r = ",(apsilent_r),"F/cm")
Vp = (a**2)*sigma/(2*apsilent_r*apsilent_not*micro_p) ## pinch off voltage for silicon p channel FET
print("Vp = (a^2)*sigma/(2*apsilent_r*apsilent_not*micro_p)")
print'%s %.2f %s'%("Vp = ",(Vp),"V")
##Ex9_2
import math
##calculating for conductance:
delta_ID = (4.*10**-3)-(2.*10**-3)##change in drain current in amperes
delta_VGS = 3.-2.##chande in gate-source voltage in volts
print'%s %.2E %s'%("delta_ID = ",(delta_ID),"A")
print'%s %.2f %s'%("delta_VGS = ",(delta_VGS),"V")
gm = delta_ID/delta_VGS##condutance at VDS = constant
print("gm = delta_ID/delta_VGS")
print'%s %.2f %s'%("gm = ",(gm)," mho")
##calculating for drain resistance:
delta_ID = (3.2-3.)*10**-3##change in drain current in amperes
delta_VDS = (12.-8.)##change in voltage across drai and source
print'%s %.2E %s'%("delta_ID = ",(delta_ID),"A")
print'%s %.2f %s'%("delta_VDS = ",(delta_VDS),"V")
rd = delta_VDS/delta_ID
print("rd = delta_VDS/delta_ID")
print'%s %.2f %s'%("rd = ",(rd)," ohm")
##calculating for micro:
micro = rd*gm##amplification factor
print("micro = rd*gm")
print'%s %.2f %s'%("micro = ",(micro),"")
##Ex9_3
import math
print("Vp = (a^2)*sigma/(2*apsilent*micro_p)")##piunch off voltage
h = 2.*10**-4 ##channel height in centimeters
a= h/2. ##channel width in centimeters
rho = 1. ##resistivity in ohm_cm
sigma = 1./rho ##conductivity in mho/cm
micro_p = 1800. ##mobility in cm_sq/Vs
apsilent_r = 16. ##relative permiability in F/cm of germanium
apsilent_not=8.854*10**-14 ##permiability in vaccum in F/cm
print'%s %.2f %s'%("a = ",(a),"cm")
print'%s %.2f %s'%("rho = ",(rho),"ohm-cm")
print'%s %.2f %s'%("sigma = ",(sigma),"mho/cm")
print'%s %.2f %s'%("micro = ",(micro_p),"cm_sq/Vs")
print'%s %.2f %s'%("apsilent_r = ",(apsilent_r),"F/cm")
print'%s %.2E %s'%("apsilent_not = ",(apsilent_not),"F/cm")
Vp = (a**2.)*sigma/(2.*apsilent_r*apsilent_not*micro_p) ## pinch off voltage for germanium p_channel FET
print'%s %.2f %s'%("Vp = ",(Vp),"V")
##Ex9_4
import math
gm1= 2.*10**-3; gm2 =4.*10**-3##conductance
print'%s %.4f %s'%("gm1 = ",(gm1),"mho")
print'%s %.4F %s'%("gm2 = ",(gm2),"mho")
Effective_gm = gm1+gm2
print'%s %.2f %s'%("Effective gm = gm1 + gm2 = ",(Effective_gm),"mho")##resulant conductance
rd1 = 20.*10**3; rd2 = 30.*10**3##resistances
Effective_rd = (rd1*rd2)/(rd1+rd2)
print'%s %.2f %s'%("rd1 = ",(rd1),"ohm")
print'%s %.2f %s'%("rd2 = ",(rd2),"ohm")
print'%s %.2f %s'%("Effective rd = (rd1*rd2)/(rd1+rd2) = ",(Effective_rd),"ohm")##resulant resistance
##Ex9_5
import math
VGS = 4.## voltage applied to gate terminal
IG = 2.*10**-9##current flowing in gate
RGS = VGS/IG
print'%s %.2f %s'%("VGs = ",(VGS),"V")
print'%s %.2e %s'%("IG = ",(IG),"A")
print'%s %.2e %s'%("RGS = VGS/IG = ",(RGS),"ohm")##resistance brtween gate and source
##Ex9_6
import math
Vp = -4##pinch off voltage
ID = 4.*10**-3##drain current
IDSS = 6.*10**-3##maximum drain current
print'%s %.2f %s'%("Vp = ",(Vp),"V")
print'%s %.2e %s'%("ID = ",(ID),"A")
print'%s %.2f %s'%("IDSS = ",(IDSS),"A")
VGS = abs(Vp)*((ID/IDSS)**.5-1.)
print'%s %.2f %s'%("VGS = Vp*((ID/IDSS)^.5-1) = ",(VGS),"V")##voltage across gate and source
##Ex9_7
import math
##parameters of JFET 1:
rd1 = 20.*10**3##resistance
gm1 = 3.*10**-3##conductance
print'%s %.2f %s'%("rd1 = ",(rd1),"ohm")
print'%s %.2e %s'%("gm1 = ",(gm1),"mho")
##parameters of JFET 2:
rd2 = 40.*10**3##resistance
gm2 = 4.*10**-3##conductance
print'%s %.2f %s'%("rd2 = ",(rd2),"ohm")
print'%s %.2e %s'%("gm2 = ",(gm2),"mho")
##the given JFETs are connected in parallel manner
micro = ((rd1*rd2*gm1)+(rd1*rd2*gm2))/(rd1+rd2)
print'%s %.2f %s'%("micro = (rd1*rd2*gm1)+(rd1*rd2*gm2)/(rd1+rd2) = ",(micro),"")##amplification factor
##Ex9_8
import math
##according to the given figure in the textbook for problem 8 in chapter 9:
VGS = -2.##voltage across gate and source
IDSS = 6.*10**-3##maximum drain current
Vp = -6##pinch-off voltage
print'%s %.2f %s'%("IDSS = ",(IDSS),"A")
print'%s %.2f %s'%("Vp = ",(Vp),"V")
print'%s %.2f %s'%("VGS = ",(VGS),"V")
ID = IDSS*(1.-(VGS/Vp))**2
print'%s %.2e %s'%("ID = IDSS*(1-(VGS/Vp))^2 = ",(ID),"A")##drainm current
Rd = 2*10^3##drain resistance
VDD = 9##drain voltage
VDS = VDD - ID*Rd
print'%s %.2f %s'%("VDD = ",(VDD),"V")##drain voltage
print'%s %.2f %s'%("Rd = ",(Rd),"ohm")##drain resistance
print'%s %.2f %s'%("VDS = VDD - ID*Rd = ",(VDS),"V")##voltage across drain and source
##Ex9_9
import math
Vp = -4.##pinch off voltage
VGS = -1.5##gate source voltage
VDS_minimum = VGS - Vp##minimum VDS for Pinch Off voltage
print'%s %.2f %s'%("Vp = ",(Vp),"V")
print'%s %.2f %s'%("VGS = ",(VGS),"V")
print'%s %.2f %s'%("VDS_minimum = VGS - Vp = ",(VDS_minimum),"V")
IDSS = 6.*10**-3##maximum drain current
ID = IDSS*(1-(VGS/Vp))**2##drain current at VGS = 0V
print'%s %.2f %s'%("IDSS = ",(IDSS),"A")
print'%s %.4f %s'%("ID = IDSS*(1-(VGS/Vp))^2 = ",(ID),"A")
##Ex9_10
import math
VGS = -2.##voltage across gate and source
IDSS = 8.*10**-3##maximum drain current
Vp = -6##pinch-off voltage
print'%s %.2f %s'%("IDSS = ",(IDSS),"A")
print'%s %.2f %s'%("Vp = ",(Vp),"V")
print'%s %.2f %s'%("VGS = ",(VGS),"V")
ID = IDSS*(1.-(VGS/Vp))**2
print'%s %.2e %s'%("ID = IDSS*(1-(VGS/Vp))^2 = ",(ID),"A")##drainm current
RD = 2.*10**3##drain resistance
VDD = 12.##drain voltage
VDS = VDD - ID*RD
print'%s %.2f %s'%("VDD = ",(VDD),"V")##drain voltage
print'%s %.2f %s'%("RD = ",(RD),"ohm")##drain resistance
print'%s %.2f %s'%("VDS = VDD - ID*RD = ",(VDS),"V")##voltage across drain and source
## note : notification used for saturated drain-soucre current is given wrong in question i.e., IDS but is right in solution i.e., IDSS.