VG=20 #Gate voltage(V)
IG=1*10**-9 #Gate current(A)
Rin=VG/IG #input resistance(Ohm)
print 'input resistance of JFET Rin = ',Rin/10**6,'MOhm'
Vp=6 #Pinch off voltage(V)
IDSS=100*10**-3 #current drain to source with shorted gate(A)
RDS=Vp/IDSS #Ohmic resistance(Ohm)
VGS_off=-Vp #gate-source cutoff voltage(V)
print 'Ohmic resistance RDS = ',RDS,'Ohm'
print 'Gate-source cutoff VGS(off) = ',VGS_off,'V'
VGS_off=-4 #gate-source cutoff voltage(V)
IDSS=5 #current drain to source with shorted gate(mA)
VGS=VGS_off/2 #gate voltage(V)
ID=IDSS/4.0 #drain current(mA)
print 'Gate voltage VGS = ',VGS,'V'
print 'Drain current ID = ',ID,'mA'
VGS_off=-8 #gate-source cutoff voltage(V)
IDSS=16 #current drain to source with shorted gate(mA)
VGS=VGS_off/2 #gate voltage(V)
ID=IDSS/4.0 #drain current(mA)
print 'Gate voltage VGS = ',VGS,'V'
print 'Drain current ID = ',ID,'mA'
Vp=4 #pinchoff voltage(V)
Vin=-10 #input voltage(V)
RD=10.0 #drain resistor(KOhm)
IDSS=10.0 #IDSS (mA)
VDD=10.0 #Drain supply voltage(V)
VGS_off=-Vp #VGS cutoff voltage(V)
VD=-Vin #drain voltage(V)
ID_sat=VD/RD #saturation drain current(mA)
RDS=Vp/IDSS #Ohmic resistance(Ohm)
VD=VDD*RDS/(RDS+RD) #drain votage(V)
print 'Drain voltage VD = ',round(VD,2),'V'
Vp=4 #pinchoff voltage(V)
RD=2.0 #drain resistor(KOhm)
RS=400 #source resistance(Ohm)
IDSS=10.0 #IDSS (mA)
VDD=30.0 #Drain supply voltage(V)
RDS=1000*Vp/IDSS #Ohmic resistance(Ohm)
ID=IDSS/4.0 #drain current(mA)
VD=VDD-(ID*RD) #drain votage(V)
print 'Ohmic resistance RDS = ',RDS,'Ohm'
print 'drain voltage VD = ',VD,'V'
IDSS=20 #IDSS (mA)
RS=270 #Source resistance (Ohm)
VGS=-IDSS*RS #gate-source voltage(V)
VGSQ_min=-0.8 #Q point minimum gate-source voltage(V)
VGSQ_max=-2.1 #Q point maximum gate-source voltage(V)
IDQ_min=2.8 #Q point minimum drain current(V)
IDQ_max=8.0 #Q point maximum drain current(V)
VGS_off_min=2 #VGS(off) minimum(V)
VGS_off_max=6 #VGS(off) maximum(V)
ID_min=8.0 #ID minimum(mA)
ID_max=20.0 #ID maximum(mA)
Rs_min=1000*VGS_off_min/ID_min #Minimum value for Rs(Ohm)
Rs_max=1000*VGS_off_max/ID_max #Maximum value for Rs(Ohm)
print 'Maximum value for Rs =',Rs_max,'Ohm'
print 'Minimum value for Rs =',Rs_min,'Ohm'
print 'Choose approximately mid point between these two.'
VS=10 #source voltage (V)
RS=2.0 #source resistance(KOhm)
VDD=30 #Drain supply voltage (V)
RD=1.0 #Drain resistance(KOhm)
ID=VS/Rs #Drain current(mA)
VD=VDD-(ID*RD) #Drain voltage(V)
VDS=VD-VS #Drain to source voltage (V)
ID_sat=VDD/(RD+RS) #ID(dc-saturation) (mA)
VDS_cut=VDD #VDS(cutoff) (V)
print 'ID (saturation) = ',ID_sat,'mA'
print 'VDS (cutoff) = ',VDS_cut,'V'
IDSS=20 #IDSS (mA)
RS=270 #Source resistance (Ohm)
VDD=30 #Drain supply voltage (V)
RD=1.0 #Drain resistance(KOhm)
R1=1*10**6 #Gate resistor1(Ohm)
R2=2*10**6 #Gate resistor2(Ohm)
VG=-VDD*R1/(R1+R2) #gate-source voltage(V)
ID=VG/RS #current for second point(mA)
VGSQ_min=-0.4 #Q point minimum gate-source voltage(V)
VGSQ_max=-2.4 #Q point maximum gate-source voltage(V)
IDQ_min=5.2 #Q point minimum drain current(V)
IDQ_max=6.3 #Q point maximum drain current(V)
print 'Maximum value for VGS =',VGSQ_max,'V'
print 'Minimum value for VGS =',VGSQ_min,'V'
print 'Maximum value for ID =',IDQ_max,'mA'
print 'Minimum value for ID =',IDQ_min,'mA'
RS=3.0 #Source resistance (KOhm)
VDD=15 #Drain supply voltage (V)
RD=1.0 #Drain resistance(KOhm)
ID=VDD/RS #drain current(mA)
VD=VDD-(ID*RD) #drain voltage(V)
print 'Drain current ID = ',ID,'mA'
print 'Drain voltage VD = ',VD,'V'
RS=2.0 #Source resistance (KOhm)
VDD=10 #Drain supply voltage (V)
RD=1.0 #Drain resistance(KOhm)
VBE=0.7 #BJT transistor drop(V)
ID=((VDD/2)-VBE)/RS #drain current(mA)
VD=VDD-(ID*RD) #drain voltage(V)
print 'Drain current ID = ',ID,'mA'
print 'Drain voltage VD = ',VD,'V'
IDSS=5.0 #IDSS current (mA)
gm0=5000.0 #transconductance at VGS=0(uS)
VGS=-1.0 #VGS (V)
VGS_off=1000*-2*IDSS/gm0 #VGS (off) (V)
gm=gm0*(1-(VGS/VGS_off)) #gm at VGS=-1V
print 'VGS (Off) = ',VGS_off,'V'
print 'gm = ',gm,'uS'
RD=3.6 #drain resistance(KOhm)
RL=10 #Load resistance(KOhm)
gm=5000 #transconductance (uS)
Vin=1 #input(mVpp)
rd=RD*RL/(RD+RL) #ac drain resistance(KOhm)
Av=gm*rd/1000 #voltage gain
Vout=Av*Vin #Output voltage(V)
print 'ac drain resistance rd = ',round(rd,2),'KOhm'
print 'voltage gain Av = ',round(Av,2)
print 'output voltage Vout = ',round(Vout,2),'mVpp'
RS=1.0 #source resistance(KOhm)
RL=1.0 #Load resistance(KOhm)
gm=2500.0*10**-6 #transconductance (S)
Vin=1 #input(mVpp)
rs=1000*RS*RL/(RS+RL) #ac source resistance(Ohm)
Av=gm*rs/(1+(gm*rs)) #voltage gain
Vout=Av*Vin #Output voltage(V)
print 'ac source resistance rs = ',round(rs,2),'Ohm'
print 'voltage gain Av = ',round(Av,2)
print 'output voltage Vout = ',round(Vout,2),'mVpp'
Ra=780 #Adjustaed resistance(Ohm)
RS1=220 #source resistance(Ohm)
VDD=30 #Drain supply voltage(V)
RL=3 #Load resistance(KOhm)
gm=2000.0*10**-6 #transconductance (S)
RS=(RS1+Ra)/1000 #total source resistance(KOhm)
rs=1000*RS*RL/(RS+RL) #ac source resistance(Ohm)
Av=gm*rs/(1+(gm*rs)) #voltage gain
print 'Ac source resistance rs = ',rs,'Ohm'
print 'voltage gain Av = ',Av
RS=2.2 #source resistance(Ohm)
VDD=30 #Drain supply voltage(V)
RL=3.3 #Load resistance(KOhm)
gm=3500.0*10**-6 #transconductance (S)
R1=2*10**-6 #Base resistor 1(Ohm)
R2=1*10**-6 #Base resistor 2(Ohm)
VD=VDD*(R2/(R1+R2)) #drain voltage(V)
ID=VD/RS #drain current(mA)
rs=1000*RS*RL/(RS+RL) #ac source resistance(Ohm)
Av=gm*rs/(1+(gm*rs)) #voltage gain
print 'Ac source resistance rs = ',rs/1000,'KOhm'
print 'voltage gain Av = ',round(Av,2)
RD=10.0 #Drain resistance(KOhm)
R1=0.2 #resistance(KOhm)
IDSS=10.0 #IDSS current(mA)
VGS_off=-2 #VGS(off) (V)
gm=3500.0*10**-6 #transconductance (S)
Vin=10.0 #input voltage (mVpp)
RDS=-VGS_off/IDSS #Ohmic resistance(Ohm)
Vout_on=Vin*RDS/(RD+R1) #Output voltage when JFET is on(V)
Vout_off=Vin #Output voltage when JFET is off(V)
ratio=Vout_off/Vout_on #on-off ratio
print 'output voltage Vout = ',round(Vout_on,2),'mVpp'
print 'on-off ratio = ',ratio
RD=10.0 #Drain resistance(KOhm)
R1=0.2 #resistance(KOhm)
R2=10*10**6 #resistance(Ohm)
IDSS=10.0 #IDSS current(mA)
VGS_off=-2 #VGS(off) (V)
gm=3500.0*10**-6 #transconductance (S)
Vin=10.0 #input voltage (mVpp)
Vout_on=Vin*(RD/(RD+R1)) #Output voltage when JFET is on(V)
Vout_off=Vin*(RD/R2) #Output voltage when JFET is off(V)
ratio=Vout_on/Vout_off/1000 #on-off ratio
print 'output voltage Vout when on = ',round(Vout_on,2),'mVpp'
print 'output voltage Vout when off = ',Vout_off*10**6,'uVpp'
print 'on-off ratio = ',round(ratio,2)
fout=20 #frequency(KHz)
RDS=50.0 #Ohmic resistance(Ohm)
RL=10*10**3 #Load resistance(Ohm)
Vin=100 #input voltage (mV)
Vpeak=Vin*RL/(RL+RDS) #peak voltage(V)
print 'Outout Vpeak = ',round(Vpeak,2),'mV'