%matplotlib inline
import matplotlib.pyplot as plt
from numpy import arange
#Given data
I_DSS= 10 # in mA
V_P= -4 # in V
V_GS=arange(-4,0,0.1)
#V_GS= -3
I_D= I_DSS*(1-V_GS/V_P)**2
plt.plot(V_GS,I_D)
plt.xlabel('V_GS in volts')
plt.ylabel('I_D in mA')
plt.title('The transfer curve')
plt.axis([-6, 0, 0, 12])
plt.show()
print "Curve is shown in figure"
%matplotlib inline
import matplotlib.pyplot as plt
from numpy import arange
#Given data
I_DSS= 4 # in mA
V_P= 3 # in V
V_GS= arange(0,3,0.1)
#V_GS= -3
I_D= I_DSS*(1-V_GS/V_P)**2
plt.plot(V_GS,I_D)
plt.xlabel('V_GS in volts')
plt.ylabel('I_D in mA')
plt.title('Characteristic curve')
plt.axis([0,4, 0, 5])
plt.show()
print "Curve is shown in figure"
from math import sqrt
#Given data
I_DSS= 1.65 # in mA
I_DSS=I_DSS*10**-3 # in A
V_P= -2 # in V
I_D= 0.8 # in mA
I_D=I_D*10**-3 # in A
V_BB= 24 # in V
# Part (a)
V_GS= V_P*(1-sqrt(I_D/I_DSS)) # in V
print "(a) : The value of V_GS = %0.4f volts" %V_GS
# Part (b)
gmo= -2*I_DSS/V_P*10**3 # in ms
gm= gmo*(1-(V_GS)/V_P) # in ms
print "(b) : The value of gm = %0.2f" %gm
#Given data
I_DSS= -40 # in mA
I_DSS=I_DSS*10**-3 # in A
V_P= 5 # in V
I_D= -15 # in mA
I_D=I_D*10**-3 # in A
# Formula I_D= I_DSS*(1+V_GS/V_P)
V_GS= (sqrt(I_D/I_DSS)-1)*V_P # in volt
print " The value of V_GS = %0.2f volts" %V_GS
#Given data
delta_I_D= 1.9-1.0 # in mA
delta_V_GS= 3.3-3.0 # in V
gm= delta_I_D/delta_V_GS #in mA/V
print "The value of transconductance =",int(gm),"mA/V or",int(gm*10**3),"HmV10s"
#Given data
I_DSS= 5.6*10**-3 # in A
V_P= 4 # in volt
Vi= 10 # in V
R1= 4.7 # in kΩ
R1= R1*10**3 # in Ω
Rs= 10 # in kΩ
Rs= Rs*10**3 # in Ω
V1=-24 # in V
Vs= 12 # in V
# Appling KVL to the gate source loop, we get, Vs= I_D*Rs-V_GS
# V_GS= I_D*Rs-Vs (i)
# I_D= I_DSS*(1-V_GS/V_P)**2 = I_DSS*(1-(I_D*Rs-Vs)/V_P)**2
I_D= 1.49 # in mA
I_D= I_D*10**-3 # in A
V_GS= I_D*Rs-Vs
Vo= Vs-I_D*Rs # in volt
print "The value of V_GS = %0.1f volts" %V_GS
print "The value of Vo = %0.1f volts" %Vo
#Given data
I_D= 5 # in mA
I_D=I_D*10**-3 # in A
V_DD= 10 # in V
R_D= 1 # in kΩ
R_D= R_D*10**3 # in Ω
Rs= 500 # in Ω
Vs= I_D*Rs # in volt
V_D= V_DD-I_D*R_D # in V
V_DS= V_D-Vs # in V
V_GS= -Vs # in V
print " The value of drain-to-source voltage = %0.1f volts" %V_DS
print " The value of gate-to-sourcce voltage = %0.1f volts" %V_GS
#Given data
I_DSS= 20 # in mA
I_DSS=I_DSS*10**-3 # in A
gmo= 9.4 # in ms
gmo=gmo*10**-3 # in s
# Formula gmo= -2*I_DSS/V_P
V_P= -2*I_DSS/gmo # in volts
print " Pinch off voltage = %0.3f volts" %V_P
from math import sqrt
#Given data
I_DSS= 10 # in mA
I_DSS= I_DSS*10**-3 # in A
I_DS= 2.5 # in mA
I_DS= I_DS*10**-3 # in A
V_P= 4.5 # in V
# Formula I_DS= I_DSS*(1-V_GS/V_P)**2
V_GS= V_P*(1-sqrt(I_DS/I_DSS)) # in volts
gm= 2*I_DSS/V_P*(1-V_GS/V_P) # in A/V
print " Transconductance = %0.2f mA/V" %(gm*10**3)
#Given data
I_DSS= 10 # in mA
I_DSS= I_DSS*10**-3 # in A
gm= 10 # in ms
gm=gm*10**-3 # in s
# V_GSoff = V_GS = Vp so , gm = gmo = -2*I_DSS/V_GSSoff
V_GSoff= -2*I_DSS/gm # in volt
print " The value of V_GS(off) = %0.f volts" %V_GSoff
from __future__ import division
#Given data
I_DSS= 10 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -4 # in V
V_GS= -2 # in V
I_DS= I_DSS*(1-V_GS/V_P)**2 # in A
V_DS= V_P # in V
V_DSmin= V_P # in volt
print " The value of I_DS = %0.1f mA" %(I_DS*10**3)
print " The minimum value of V_DS = %0.f volts" %V_DSmin
#Given data
R_G= 1 # in MΩ
R_G= R_G*10**6 # in Ω
V_DD= 24 # in V
R_D= 56 # in kΩ
R_D=R_D*10**3 # in Ω
Rs= 4 # kΩ
Rs= Rs*10**3 # in Ω
# Part (a)
I_DSS= 1 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -1 # in V
V_D= 10 # in V
I_D= (V_DD-V_D)/R_D # in A
# I_D= I_DSS*(1-V_GS/V_P)**2 # in A
V_GS= V_P*(1-sqrt(I_D/I_DSS)) # in V
R1= abs(V_GS)/I_D # in Ω
print " The value of R1 = %0.f kΩ" %(R1*10**-3)
# Part (b)
gmo= -2*I_DSS/V_P # A/V
gm= gmo*(1-(V_GS)/V_P) # A/V
Ri= R_G/(1-gm*Rs/(1+gm*Rs)*Rs/(Rs+R1)) # in Ω
print " The effective input impedence = %0.2f MΩ" %(Ri*10**-6)
from sympy import symbols, solve, N
I_D= symbols('I_D')
#Given data
I_DSS= -4 # in mA
V_P= 4 # in V
R1= 1.3*10**6 # in Ω
R2= 200*10**3 # in Ω
V_DD= -60 # in V
R_D= 18 # in kΩ
R_D= R_D*10**3 # in Ω
Rs= 4 # in kΩ
Rs= Rs*10**3 # in Ω
V_GG= V_DD*R2/(R1+R2) # in V
R_G= R1*R2/(R1+R2) # in Ω
# V_GS= V_GG-V_P*I_D
# I_D= I_DSS*(1-(V_GG-V_P*I_D)/V_P)**2 # in mA or
# I_D**2*I_DSS + I_D*(2*(1-V_GG/V_P)*I_DSS-1) +((1-V_GG/V_P)**2*I_DSS) = 0
expr= I_D**2*I_DSS + I_D*(2*(1-V_GG/V_P)*I_DSS-1) +((1-V_GG/V_P)**2*I_DSS)
I_D= solve(expr, I_D)
I_D=I_D[1] # in mA
I_D=I_D*10**-3 # in A
V_GS= V_GG-Rs*I_D # in V
V_DS= V_DD-I_D*(R_D+Rs) # in V
print " The value of I_D = %0.2f mA" % (I_D*10**3)
print " The value of V_GS = %0.f volts" %V_GS
print " The value of V_DS = %0.1f volts" %V_DS
#Given data
I_DSS= 4 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -2 # in V
V_DD= 10 # in V
V_SS= V_DD # in V
V_GS2=0 # in V
I_D= I_DSS*(1-V_GS2/V_P)**2 # in A
# since I_D= I_DSS
V_GS= 0 # in volt
# Formula V_SS= V_DS-V_GS
V_DS= V_SS-V_GS # in volt
print " The value of I_D = %0.f mA" %(I_D*10**3)
print " The value of V_GS = %0.f volt" %V_GS
print " The value of V_DS = %0.f volts" %V_DS
if V_DS > V_GS-V_P :
print " The active region operation of the upper JFET is confirmed "
V_GS= symbols('V_GS')
#Given data
I_DSS= 16 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -4 # in V
V_DD= 18 # in V
V_GG= 0 # in V
R_D= 500 # in Ω
Rs= R_D # in Ω
# V_GS= V_GG-V_P*I_D or = I_D= -V_GS/Rs (as V_GSS= 0) (i)
# I_D= I_DSS*(1-V_GS/V_P)**2 (ii)
# From (i) and (ii)
# V_GS**2*(1/V_P**2) + V_GS*(1/(I_DSS*Rs)-2/V_P) +1 =0
expr = V_GS**2*(1/V_P**2) + V_GS*(1/(I_DSS*Rs)-2/V_P) +1
V_GS= solve(expr,V_GS)
V_GS= V_GS[1] # since 0>= V_GS >=-4
I_D= I_DSS*(1-V_GS/V_P)**2 # in A
V_DS= V_DD-I_D*(R_D+Rs) # in V
print "(a) : The value of I_D = %0.f mA" %(I_D*10**3)
print "(b) : The value of V_GS = %0.f volts" %V_GS
print "(c) : Since the value of V_DS is greater than the difference of V_GS and V_P,"
print " So the saturation region operation is confirmed "
#Given data
I_DSS= 10 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -4 # in V
V_DD= 12 # in V
V_GG= 0 # in V
# Part (a) when
V_GS= -2 # in V
I_D= I_DSS*(1-V_GS/V_P)**2 # in A
print " When V_GS= -2 then, the value of I_D = %0.1f mA " %(I_D*10**3)
# Part (b) when
I_D= 9*10**-3 # in A
V_GS= V_P*(1-(sqrt(I_D/I_DSS))) # in V
print " When I_D = 9 mA, then the value of V_GS = %0.3f volts" %V_GS
#Given data
I_DSS= 8.7 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -3 # in V
V_GS= -1 # in V
I_DS= I_DSS*(1-V_GS/V_P)**2 # in A
print " The value of I_DS = %0.2f mA" %(I_DS*10**3)
gmo= -2*I_DSS/V_P*1000 # ms
gm= gmo*(1-V_GS/V_P) # in ms
print " The value of gmo = %0.1f ms" %gmo
print " The value of gm = %0.2f ms" %gm
#Given data
I_DSS= 6 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -4.5 # in V
# Part (i)
# At V_GS= -2V
V_GS= -2 # in V
I_DS= I_DSS*(1-V_GS/V_P)**2 # in A
print "Part (i) :- \n At V_GS= -2V, the value of I_DS = %0.1f mA" %(I_DS*10**3)
# At V_GS= -3.6V
V_GS= -3.6 # in V
I_DS= I_DSS*(1-V_GS/V_P)**2 # in A
print " At V_GS= -3.6V, the value of I_DS = %0.2f mA" %(I_DS*10**3)
# Part (ii)
# At I_DS= 3mA
I_DS= 3*10**-3 # in A
V_GS= V_P*(1-sqrt(I_DS/I_DSS))
print "\nPart (ii) :- \n At I_DS= 3mA, the value of V_GS = %0.2f volts" %V_GS
# At I_DS= 5.5mA
I_DS= 5.5*10**-3 # in A
V_GS= V_P*(1-sqrt(I_DS/I_DSS))
print " At I_DS= 5.5mA, the value of V_GS = %0.4f volts" %V_GS
# Note: There is calculation error in the second part to find the value of V_GS in both the condition .
# So the answer in the book is wrong
#Given data
I_DSS= 10 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -2 # in V
# Part (i)
# At V_GS= 0V
V_GS= 0 # in V
r_DS= V_P**2/(2*I_DSS*(V_GS-V_P)) # in Ω
print " At V_GS=0 , the drain source resistance = %0.f Ω" %r_DS
# Part (ii)
# At V_GS= -0.5V
V_GS= -0.5 # in V
r_DS= V_P**2/(2*I_DSS*(V_GS-V_P)) # in Ω
print " At V_GS=-0.5 , the drain source resistance = %0.2f Ω" %r_DS
from __future__ import division
#Given data
I_DSS= 12 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -4 # in V
R_D= 3 # in kΩ
R_D= R_D*10**3 # in Ω
Rs= 0 # in Ω
V_DD= 15 # in V
V_GS= -2 # in V
I_D= I_DSS*(1-V_GS/V_P)**2 # in A
print "The value of I_D = %0.f mA" %(I_D*10**3)
V_DS= -I_D*R_D+V_DD # in V
print "The value of V_DS = %0.f volts" %V_DS
if V_DS>V_GS-V_P :
print "The device is operating in the saturation region"
#Given data
I_DSS= 12 # in mA
I_DSS= I_DSS*10**-3 # in A
V_P= -4 # in V
Rs= 0 # in Ω
V_DD= 15 # in V
V_DS= 0.1 # in V
V_GS= 0 # in V
if V_DS<V_GS-V_P :
print "The ohmic region is confirmed."
I_D= I_DSS*(2*(1-V_GS/V_P)*V_DS/(-V_P)-(V_DS/V_P)**2) # in A
R_D= (V_DD-V_DS)/I_D # in Ω
print "The value of I_D = %0.1f µA" %(I_D*10**6)
print "The value of R_D = %0.2f kΩ" %(R_D*10**-3)
#Given data
ro=9 # in kΩ
ro= ro*10**3 # in Ω
V_P= -6 # in V
V_GS = -3 # in V
r= ro/(1-V_GS/V_P)**2 # in Ω
print "The value of chanel resistance = %0.f kΩ" %(r*10**-3)
# Note : The unit of chanel resistance i.e. unit of resistance in the book is wrong . It will be in kΩ not in Ω
from math import sqrt
#Given data
ro=10 # in kΩ
ro= ro*10**3 # in Ω
r=90 # in kΩ
r= r*10**3 # in Ω
V_P= 5 # in V
# r= ro/(1-V_GS/V_P)**2 # in Ω
V_GS= V_P*(1-sqrt(ro/r)) # in V
print "The value of V_GS = %0.2f volts" %V_GS
#Given data
V_P= -5 # in V
I_D= 4 # in mA
V_GS= -2 # in V
# Formula I_D= I_DSS*(1-V_GS/V_P)**2
I_DSS= I_D/(1-V_GS/V_P)**2 # in mA
print "The value of I_DSS = %0.1f mA" %I_DSS
#Given data
I_DSS= 8 # in mA
V_P= -5 # in V
V_GS= -2 # in V
# Formula V_GS+ V_DSmin = V_P
V_DSmin= abs(V_P-V_GS) # in V
print "The minimum value of V_DS = %0.f volts" %V_DSmin
I_DS= I_DSS*(1-V_GS/V_P)**2 # in mA
print "The value of I_DS = %0.2f mA" %I_DS