#initialisation of variables
I_DSS = 15.0 #in mA
V_GS_off = -5.0 #in V
V_GS = 0 #in V
#CALCULATIONS
I_D = I_DSS*((1-(V_GS/V_GS_off))**2) #in mA
V_GS = -1 #in V
I_D1 = I_DSS*((1.0-(V_GS/V_GS_off))**2) #in mA
V_GS = -4 #in V
I_D2 = I_DSS*((1-(V_GS/V_GS_off))**2) #in mA
#RESULTS
print('When V_GS=0, the drain current is =%.f mA ' %I_D)
print('When V_GS=-1V, the drain current is =%.2f mA ' %I_D1)
print('The interplanner spacing is =%.2f Å' %I_D2)
import math
#initialisation of variables
I_DSS = 20.0 #in mA
V_P = -8 #in V
g_mo = 5000.0 #in µs
V_GS = -4.0 #in V
#CALCULATIONS
I_D = I_DSS*((1-(V_GS/V_P))**2) #in mA
g_m = g_mo*(1-(V_GS/V_P)) #in µs
#RESULTS
print('The value of drain current is =%.f mA ' %I_D)
print('The transconductance is =%.f µs' %g_m)
import math
#initialisation of variables
I_D1 = 10.0 #in mA
V_GS = -12.0 #in V
V_GSth = -3.0 #in V
#CALCULATIONS
K = I_D1/( (V_GS-V_GSth)**2 ) #in mA/V
V_GS= -6 #in V
I_D = K*((V_GS-V_GSth)**2) #in mA
#RESULTS
print('The value of I_D is =%.2f mA ' %I_D)
print('Approximation error')
import math
#initialisation of variables
V_GS = -2.0 #in V
V_P = -5.0 #in V
V_DS = V_GS-V_P #in V
I_DSS = 8.0 #in mA
#CALCULATIONS
I_D = I_DSS*((1-(V_GS/V_P))**2) #in mA
#RESULTS
print('The minimum value of V_DS is =%.f V ' %V_DS)
print('The drain current is =%.2f mA' %I_D)
import math
#initialisation of variables
V_P = -2 #in V
I_DSS = 1.65 #in mA
I_D = 0.8 #in mA
V_DD = 24.0 #in V
#CALCULATIONS
V_GS = V_P*(1- math.sqrt(I_D/I_DSS) ) #in V
g_mo = -(2*I_DSS)/V_P #in mS
g_m = g_mo*(1-(V_GS/V_P)) #in mS
#RESULTS
print('The value of V_GS is =%.2f V ' %V_GS)
print('The value of g_m is =%.2f mS' %g_m)
import math
#initialisation of variables
V_P = 5.0 #in V
I_DSS = -40.0 #in mA
I_D = -15.0 #in mA
#CALCULATIONS
V_GS = V_P*(math.sqrt(I_D/I_DSS)-1 ) #in V
#RESULTS
print('The gate source voltage is =%.2f V' %(V_GS*-1))
import math
#initialisation of variables
I_D1 = 1.9 #in mA
I_D2 = 1.0 #in mA
#CALCULATIONS
del_I_D = I_D1-I_D2 #in mA
V_GS2 = -3.3 #in V
V_GS1 = -3.0 #in V
del_V_GS = V_GS1-V_GS2 #in V
g_m = del_I_D/del_V_GS #in mA/V
g_m = g_m * 10**3 #in µ mhos
#RESULTS
print('The value of transconductance is =%.f µ mhos ' %g_m)
import math
#initialisation of variables
V_DS1 = 14.0 #in V
V_DS2 = 5.0 #in V
del_V_DS = V_DS1-V_DS2 # in V
I_D1 = 3.3 #in mA
I_D2 = 3 # in mA
#CALCULATIONS
del_I_D = I_D1-I_D2 #in mA
r_d = del_V_DS/del_I_D #in k ohms
print('The drain resistance is =%.f k ohms' %r_d)
V_GS1 = 0.4 #in V
V_GS2 = 0.1 #in V
del_V_GS = V_GS1-V_GS2 #in V
I_D1 = 3.3 #in mA
I_D2 = 0.71 #in mA
del_I_D = I_D1-I_D2 # in mA
g_m = del_I_D/del_V_GS # in mA/V
g_m = g_m * 10**3 # in µmhos
#RESULTS
print('The transconductance is =%.f µmhos ' %g_m)
Miu =r_d*10**3*g_m*10**-6
print('Amplification factor is =%.f ' %Miu)
import math
#initialisation of variables
q = 1.6*10**-19 #in C
N_D = 10**15*10**6 #electrons/m^3
a = 3*10**-4 #in cm
a=a*10**-2 #in m
#CALCULATIONS
Epsilon_o = (36 * math.pi * 10**9)**-1
Epsilon = 12*Epsilon_o
V_P = (q*N_D*((a)**2))/(2*Epsilon) #in V
print('Pinch off voltage is =%.2f V ' %V_P)
V_GS = 1.0 #in V
V_P = 2.0 #in V
b = a*( 1-math.sqrt(V_GS/V_P) ) #in m
b = b * 10**6 #in µm
#RESULTS
print('The channel half width is =%.2f µm' %b)
# Note: In the book, the unit of channel half width is wrong.
import math
#initialisation of variables
I_DSS = 8.0 #in mA
V_P = -4.0 #in V
a = 3*10**-4 #in cm
N_D = 10**15 #in electrons/cm^3
I_D = 3.0 #in mA
#CALCULATIONS
V_GS = V_P*( 1-math.sqrt(I_D/I_DSS) ) #in V
V_DS_sat = V_GS-V_P #in V
#RESULTS
print('The value of V_GS is =%.2f V' %V_GS)
print('The value of V_DS_sat is =%.2f V ' %V_DS_sat)
#initialisation of variables
V_P = -4 #in V
I_DSS = 9.0 #in mA
V_GS = -2.0 #in V
#CALCULATIONS
I_D = I_DSS*(( 1-(V_GS/V_P) )**2) #in mA
#RESULTS
print('The drain current is =%.2f mA ' %I_D)
#initialisation of variables
I_DSS = 12.0 #in mA
V_P = -6.0 #in V
V_GS = -1.0 #in V
#CALCULATIONS
g_mo = (-2*I_DSS)/V_P #in mA/V
g_m = g_mo*(1-(V_GS/V_P)) #in mS
#RESULTS
print('The value of transconductance is =%.2f mS' %g_m)
#initialisation of variables
I_DSS = 10.0 #in mA
V_P = -5.0 #in V
V_GS = -2.5 #in V
#CALCULATIONS
g_m = ((-2*I_DSS)/V_P)*(1-(V_GS/V_P)) #in mS .... correction
I_D = I_DSS * ((1-(V_GS/V_P))**2) #in mA
#RESULTS
print('The transconductance is =%.f mS ' %g_m)
print('The drain current is =%.2f mA ' %I_D)