import math
#initialisation of variables
VGG = -2.5 #v
Id = 3.0 #mA
Vds = 10.0 #v
#Calculations
Rd=Vds/Id
#Results
print("The value of Rd is = %.2f kOhm " %Rd)
import math
#initialisation of variables
VGG = -2.5 #v
VDD = 20.0
Id = 2.0 #mA drain current
Vds = 2.5 #v
#Calculations
Rd=(VDD-Vds)/Id
#Results
print("The value of Rd is = %.2f kOhm " %Rd)
import math
#initialisation of variables
a=3*(10**-4) #in cm
Nd=10**15 #in electrons/cm^3
q=1.6*(10**-19) #in C
eo=8.85*(10**-12) #Permittivity of free space
e=12*eo #Relative Permittivity
#Calculations
Vp=(q*Nd*a*a*10**6*10**-4)/(2*e) #in V
#a is in cm so 10^-4 is multiplied and Nd is in electrons/cm^3 so 10^6 is multiplied
#Results
print("Pinch off Voltage = %.2f v " %Vp)
import math
#initialisation of variables
#Given Values
a=3.0*(10**-4) #in m
Nd=10.0**15 #in electrons/m**3
q=1.6*(10**-19) #in C
eo=8.85*(10**-12) #Permittivity of free space
e=12*eo #Relative Permittivity
#Calculations
Vp=(q*Nd*a*a*10**6*10**-4)/(2*e)#in V
#a is in cm so 10**-4 is multiplied and Nd is in electrons/cm**3 so 10**6 is multiplied
Vgs= Vp/2
b=a*(1-((Vgs/Vp)**(0.5)))#in cm
#Results
print("Channel Half Width = %.2f cm x 10^-4" %(b*10**4))
import math
#initialisation of variables
VG=0.5 #v
Rd=1.0 #Kohm
Vdd =3.3 #v
#Calculations
# If VG=0.5vv hen Vgs-Vt = 0.5-1=-.05 which is less than zero and therfore the transistor will be off then
#ID=0
Id=0
Vd=Vdd
#Results
print("The drain current = %.2f mA" %(Id))
print("The drain Voltage = %.2f V" %(Vd))
import math
#initialisation of variables
Vg=2.0 #v
Rd=1.0 #Kohm
Vdd =3.3 #v
Vt=1.0
#Calculations
# If VG=2v hen Vgs-Vt = 2-1=-2 which is more than zero and therfore the transistor will be on then
Id=(1.0/2)*(Vg-Vt**2)
Vd=Vdd-(Rd*Id)
#Results
print("The drain current = %.2f mA" %(Id))
print("The drain Voltage = %.2f V" %(Vd))
import math
#initialisation of variables
Vp=-2#in V
Idss=1.65#in mA
#it is desired to bias the circut at Id=0.8mA
Ids=0.8#in mA
Vdd=24#in V
#Assumption: rd>Rd
#Calculations
Vgs=Vp*(1-(Ids/Idss)**0.5)#in V
#Results
print("Vgs= %.2f v " %Vgs)
import math
#initialisation of variables
Vp=-2#in V
Idss=1.65#in mA
#it is desired to bias the circut at Id=0.8mA
Ids=0.8#in mA
Vdd=24#in V
#Assumption: rd>Rd
#Calculations
Vgs=Vp*(1-(Ids/Idss)**0.5)#in V
gmo=-(2*Idss/Vp)
#Results
print("gmo= %.2f mA/V " %gmo)
gm=gmo*(1-(Vgs/Vp))
print("gm= %.2f mA/V " %gm)
import math
#initialisation of variables
Vp=-2#in V
Idss=1.65#in mA
#it is desired to bias the circut at Id=0.8mA
Ids=0.8#in mA
Vdd=24#in V
#Assumption: rd>Rd
#Calculations
Vgs=Vp*(1-(Ids/Idss)**0.5)#in V
gmo=-(2*Idss/Vp)
gm=gmo*(1-(Vgs/Vp))
Rs=-(Vgs/Ids)#in ohm
#Results
print("Rs= %.2f K " %Rs)
import math
#initialisation of variables
Vp=-2#in V
Idss=1.65#in mA
#it is desired to bias the circut at Id=0.8mA
Ids=0.8#in mA
Vdd=24#in V
#Assumption: rd>Rd
#Calculations
Vgs=Vp*(1-(Ids/Idss)**0.5)#in V
gmo=-(2*Idss/Vp)
gm=gmo*(1-(Vgs/Vp))
Rs=-(Vgs/Ids)#in ohm
print('20dB corresponds to voltage gain of i0')
Av=10
Rd=Av/gm#in ohm
#Results
print("Rd= %.2f ohm" %Rd)