from __future__ import division
#gm
IDSS=12# # in mili-amperes
Vp=-5# # in volts
VGS=-1.5# # in volts
gmo=2*IDSS/abs(Vp)# # in mili-Siemens
gm=gmo*(1-VGS/Vp)# # in mili-Siemens
print "gm = %0.2f mS"%gm
from __future__ import division
#Voltage gain
gm=2# # in mili-ampere per volt
rd=10# # in kilo-ohms
# From Fig. 8.7
RD_eff=10*10/(10+10)# # in kilo-ohms
AV=-gm*rd*RD_eff/(rd+RD_eff)# # Voltage gain
print "Voltage gain = %0.1f "%AV
from __future__ import division
#gm, µ, Ri, Ro, AV
VGSQ=-2.6# # in volts
IDSS=8# # in mili-amperes
Vp=-6# # in volts
rd=50# # in kilo-ohms
# From Fig. 8.11
RD=3.3# # in kilo-ohms
RG=1# # in mega-ohms
RS=1# # in kilo-ohms
gmo=2*IDSS/abs(Vp)# # in mili-ampere per volt
gm=gmo*(1-VGSQ/Vp)# # in mili-ampere per volt
mu=rd*gm# # µ
Ro=(rd+(1+mu)*RS)*RD/(RD+rd+(1+mu)*RS)# # in kilo-ohms
AV=-mu*RD/(RD+rd+(1+mu)*RS)#
print "gm = %0.2f mA/V"%gm
print "µ = %0.2f "%mu
print "Ri = %0.2f MΩ"%RG
print "Ro = %0.2f kΩ"%Ro
print "AV = %0.2f "%AV
from __future__ import division
#AV, Ri, Ro
IDSS=16# # in mili-amperes
Vp=-4# # in volts
rd=40# # in kilo-ohms
# From Fig. 8.14
RS=2.2# # in kilo-ohms
# Using dc analysis
VGSQ=-2.8# # in volts
gmo=2*IDSS/abs(Vp)# # in mili-ampere per volt
gm=gmo*(1-VGSQ/Vp)# # in mili-ampere per volt
mu=rd*gm# # Amplification factor
AV=mu*RS/(rd+(1+mu)*RS)#
Ri=10# # in mega-ohms
Ro=rd*RS/(rd+(1+mu)*RS)# # in kilo-ohms
print "AV = %0.2f "%AV
print "Ri = %0.2f MΩ"%Ri
print "Ro = %0.3f kΩ"%Ro
from __future__ import division
#AV, Ri, Ro
VGSQ=-1.8# # in volts
rd=40# # in kilo-ohms
IDSS=8# # in mili-amperes
Vp=-2.8# # in volts
# From Fig. 8.16
RD=3.3# # in kilo-ohms
RS=1.5# # in kilo-ohms
gmo=2*IDSS/abs(Vp)# # in mili-Siemens
gm=gmo*(1-VGSQ/Vp)# # in mili-Siemens
mu=rd*gm# # Amplification factor
AV=(1+mu)*RD/(rd+RD)#
Ri_dash=(RD+rd)/(1+mu)# # in kilo-ohms
Ri=Ri_dash*RS/(Ri_dash+RS)# # in kilo-ohms
Ro=rd*RD/(rd+RD)#
print "AV = %0.2f "%AV
print "Ri = %0.2f kΩ"%Ri
print "Ro = %0.2f kΩ"%Ro
from __future__ import division
#gm, Ri, Ro, AV
VGSQ=8# # in volts
VT=3# # in volts
k=0.3e-3#
# From Fig. 8.18
RF=10e6# # in ohms
RD=2.2e3# # in ohms
gm=2*k*(VGSQ-VT)# # in Siemens
Ri=RF/(1+gm*RD)# # in ohms
Ro=RF*RD/(RF+RD)# # in ohms
AV=-gm*Ro#
gm=gm*1e3# # in mili-Siemens
Ri=Ri*1e-6# # in mega-ohms
Ro=Ro*1e-3# # in kilo-ohms
print "gm = %0.2f mS"%gm
print "AV = %0.2f "%AV
print "Ri = %0.2f MΩ"%Ri
print "Ro = %0.2f kΩ"%Ro