import math
#Variable declaration
Vs=1. #source voltage(V)
C=100*10**-6 #value of capacitance(uF)
r1=1 #resistance 1(k ohms)
r2=4 #resistance 2(k ohms)
R=5 #total resistance,R=r1+r2
#Calculations
Imax=Vs/(r1+r2)*10**3 #maximum current(uA)
fc=1/(2*(math.pi)*C*R) #critical frequency(Hz)
#As w*C*R=1 and w=2*pi*f
f=10*fc #lowest frequency(Hz)
#Results
print"maximum current",Imax,"uA"
print"critical frequency",round((fc/1E+3),3),"Hz"
print"lowest frequency",round((f/1E+3),2),"Hz"
import math
#Variable declaration
C=100*10**-6 #capacitance(uF)
Rg=1. #galvanometer resistance(k oms)
Rl=4. #load resistance(k ohms)
#Calculations
Rth=(Rg*Rl)/(Rg+Rl) #thevinine's equivalent resistance
fc=1/(2*(math.pi)*C*Rth) #critical frequency(Hz)
f=fc*C #lowest frequency(Hz)
#Results
print"lowest frequency at which the point A gets grounded is",round((f/1E-2),1),"Hz"
import math
#Variable declaration
rpi=600 #dynamic junction resistance(ohms)
beta=100 #common emitter current gain
Vs=5. #source voltage(V)
Rs=400 #source resistance(ohms)
R=10 #resistance(k ohms)
#Calculations
Ib=Vs/(Rs+rpi) #base current(uA)
Vo=R*beeta*Ib #output voltage(V)
Rin=rpi #input resistance(ohms)
Rout=R #output ewsistance(k ohms)
#Results
print"output voltage is",Vo,"V"
print"input resistance",Rin,"ohms"
print"output resistance",Rout,"k ohms"
#Variable declaration
gm=1. #transconductance(mS)
rd=40 #dynamic drain resistance(k ohms)
Rd1=40 #JFET 1 drain resistance(k ohms)
Rd2=10 #JFET 2 drain resistance(k ohms)
#Calculations
Avo=(-gm*((rd*Rd1)/(rd+Rd1)))*(-gm*((rd*Rd2)/(rd+Rd2))) #voltage gain
#Results
print"Avo is",Avo
#Variable declaration
beta=125 #common emitter current gain
rpi=2.5 #dynamic junction resistance(k ohms)
rd=40 #dynamic drain resistance(k ohms)
gm=2 #transconductance(mS)
Vs=1 #assume,source voltage(V)
Rs=10 #source resistance(k ohms)
Rc=1 #collector resistance(k ohms)
rb=2 #resistance(k ohms)
Vgs=1 #gate to source voltage(V)
#Calculations
#Part a
R=(rd*Rs)/(rd+Rs) #equivalent resistance(k ohms)
Ib=gm*Vgs*(R/(rpi+R)) #base current(mA)
Vo=beeta*Ib*Rc #output voltage(V)
Avo=Vo #voltage gain
#Part b
Ib1=Vs/(rb+rpi) #base current(mA) after interchanging stages of JFET and BJT
Vgs1=beeta*Ib1*Rc #gate to source voltage(V) after interchanging stages of JFET and BJT
Vo1=gm*Vgs1*R #output voltage(V) after interchanging stages of JFET and BJT
Avo1=Vo1 #voltage gain after interchanging stages of JFET and BJT
#Results
print"Avo is",round(Avo,1)
print"Avo1 when BJT and FET stages are reversed is",round(Avo1)
import math
#Variable declaration
Cc1=1*10**-6 #coupling capacitor 1(uF)
Cc2=1*10**-6 #coupling capacitor 2 (uF)
Rs=10**3 #source resistance(k ohms)
rpi=2*10**3 #dynamic junction resistance(k ohms)
Rc=4500 #collector resistance(ohms)
Rl=9*10**3 #load resistance(k ohms)
w=100 #corner frequency(rad/s)
#Calculations
w11=1/(Cc1*(Rs+rpi)) #corner frequency input circuit (rad/s)
w12=1/(Cc2*(Rc+Rl)) #corner frequency output circuit(rad/s)
f=w11/(2*(math.pi)) #lower cutoff frequency(Hz)
Zin=complex((Rs+rpi),-(1/(w*Cc1))) #input impedance(k ohms)
Zout=complex(Rc,-(1/(w*Cc2))) #output impedance(k ohms)
#Results
print"lower cut-off freq is",round(f),"Hz"
print"Zin",Zin,"ohms"
print"Zout",Zout,"ohms"
import math
#Variable declaration
Re=Rc=1.5*10**3 #collector resistance(ohms)
Rs=600 #source resistance(ohms)
Rl=2*10**3 #load resistance(ohms)
beeta=100 #common emitter current gain
rpi=1*10**3 #dynamic junction resistance(ohms)
f=50 #frequency(Hz)
#Calculations
w=2*f*(math.pi) #corner frequency(rad/s)
CE=1/(w*(Rs+rpi)) #capacitance(uF)
Ce=CE*(beeta+1) #capacitance(uF)
w11=w/10 #corner frequency input circuit (rad/s)
w12=w11/20 #corner frequency output circuit(rad/s)
Cc1=1/(w11*(Rs+rpi)) #coupling capacitor 1(uF)
Cc2=1/(w12*(Rc+Rl)) #coupling capacitor 2 (uF)
#Results
print"Ce is",round(Ce/1E-6),"uF"
print"Cc1 is",round(Cc1/1e-6,1),"uF"
print"Cc2 is",round((Cc2/1E-5),2),"uF"
import math
#Variable declaration
gm=2.5*10**-3 #transconductance(mS)
Rd=6*10**3 #drain resistance(ohms)
rd=200*10**3 #dynamic drain resistance(ohms)
Cc1=Cc2=0.12*10**-6 #coupling capacitors(uF)
Rs=1*10**3 #source resistance(ohms)
Rg=0.1*10**6 #R1||R2
Cgs=12*10**-9 #gate to source capacitor(pF)
Cgd=2*10**-9 #gate to drain capacitor(pF)
Co1=10 # as Co1=Cl+Cw=10
#Calculations
#Part a
Ro=(rd*Rd)/(rd+Rd) #equivalent resistance of rd and Rd(ohms)
Vo=-gm*((rd*Rd)/(rd+Rd)) #as Vgs=Vs
Avo=Vo #Avo=Vo/Vs=(-gm*Vs*((rd*Rd)/(rd+Rd)))/Vs=Vo
#Part b
f11=1/(2*(math.pi)*Cc1*(Rs+Rg))
#Part c
Ceq=Cgs+(Cgd*(1+gm*Ro)) #on application of miller theorem
Co=Co1+Cgd*(1+(1/(gm*Ro))) #output capacitance(pF)
f21=1/(2*(math.pi)*Ceq*((Rs*Rg)/(Rs+Rg))) #input circuit cutoff frequency(MHz)
f22=1/(2*(math.pi)*Co*Ro)*10**3 #output circuit cutoff frequency(MHz)
fH=f22 #cutoff frequency of high frequency band(MHz)
#Results
print"a)mid freq gain is",round(Avo,1)
print"b)input circuit cut-off is",round(f11,1),"Hz"
print"c)high freq input cutoff is",round((f21/1E+3),2),"and output cutoff is",round((f22/1E-3),2),"MHz"
print"high freq cut-off is",round((fH/1E-3),2),"MHz"
import math
#Variable declaration
beta=50. #common emitter current gain
R1=11.5 #resistance(k ohms)
R2=41.4 #resistance(k ohms)
Vcc=10. #supply voltage to collector(V)
Rc=5. #collector resistance(k ohms)
Re=1. #emitter resistance(k ohms)
Rs=1. #source resistance(k ohms)
Vbe=0.7 #base emitter voltage(V)
Rl=10. #load resistance(k ohms)
Cc1=Cc2=20*10**-6. #coupling capacitors(uF)
Ce=150*10**-6. #emitter capacitor(uF)
Cpi=100
Cu=5.
#Calculations
#Part a
Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)
Vbb=Vcc*(R1/(R1+R2)) #suply voltage to base(V)
Ib=(Vbb-Vbe)/(Rb+(Rs*(1+beta))) #base current(mA)
Ic=beta*Ib #collector current(mA)
Vce=Vcc-(Ic*Rc)-(Ic+Ib)*Re #collector to emitter voltage(V)
rpi=(25*beta)*10**-3/Ic #dynamic junction resistance(K ohms)
#Part b
rpi=1 #dynamic junction resistance(K ohms)
R=(rpi*Rb)/(rpi+Rb) #equivalent resistance(rpi||Rb)
Vbe=(R*Rs)/(R+Rs) #base to emitter voltage(V)
Ib1=Vbe/rpi #base current(mA)
Ro=(Rc*Rl)/(Rc+Rl) #Rc||Rl(k ohms)
Vo=-(beta*Ib1*Ro) #output voltage(V)
Avo=Vo #voltage gain
#Part c
r1=(Rs*Rb)/(Rs+Rb) #Rs||Rb(k ohms)
w11=1/(Cc1*(Rs+R)) #low freq cutoff(rad/s)
w12=1/(Cc2*(Rc+Rl)) #high freq cutoff(rad/s)
w1p=1/((Ce/(beta+1))*(r1+rpi)) #low cutoff freq(rad/s)
#Part d
Co1=5 #as Co1=Cw+Cl
gm=beta/rpi #transconductance(mS)
Ceq=Cpi+(Cu*(1+(gm*Ro))) #equivalent capacitance(pF)
Rs1=(Rb*Rs)/(Rb+Rs) #Rb||Rs(k ohms)
r2=(Rs1*rpi)/(Rs1+rpi) #Rs1||rpi(k ohms)
w21=10**12/(Ceq*r2*10**3) #low freq cutoff(MHz)
#Results
print"a)dc bias values are Vbb:",round(Vbb,2),"V, Ib:",round(Ib,4),"mA, Ic:",round(Ic,2),"mA, Vce:",round(Vce,3),"V, rpi:",rpi,"k ohms"
print"mid freq gain is",round(Avo,2)
print"low freq cut-off is",round(w1p/1E+3),"rad/s"
print"high cut-off freq is",round((w21/1E+6),2),"*10**6 rad/s"
import math
#Variable declaration
Qcoil=75. #coil inductance
f=200. #frequency(Hz)
BW=4. #bandwidth(kHz)
C=470*10**-9. #capacitance(pF)
#Calculations
#Part a
Qcircuit=f/BW #circuit inductance
L=1/(((2*(math.pi)*f)**2)*C) #inductance(mH)
#Part b
R=Qcircuit*2*(math.pi)*f*L #resistance(k ohms)
#Part c
r=(2*(math.pi)*f*L)/Qcoil #internal resistance(ohms)
req=(Qcoil**2)*r #equivalent resistance(k ohms)
ro=(R*req)/(req-R) #output resistance(k ohms)
#Part d
BW=5 #bandwidth(kHz)
Qcircuit=f/BW #circuit inductance
Req=Qcircuit*2*(math.pi)*f*L #equivalent resistance(k ohms)
Rl=(Req*R)/(R-Req) #load resistance(k ohms)
#Results
print"a)coil inductance is",round(L,2),"mH"
print"b)circuit output impedance atresonant freq is",round((R/1E+3),2),"K ohms"
print"c)internal resistance ro is",round((ro/1E+3),2),"k ohms"
print"d)value of load resistance is",round((Rl/1E+3),2),"k ohms"
import math
#Variable declaration
fo=50 #output frequency(KHz)
L=10**-3 #inductance(H)
ro=100 #output resistance(k ohms)
Q=80 #coil inductance
Ri=10 #input resistance(k ohms)
beta=125 #common emitter current gain
#Calculations
#Part a
C =1/(((2*(math.pi)*fo)**2)*L) #tunning capacitance(nF)
r=(2*(math.pi)*fo*L)/Q #internal resistance(k ohms)
req=(Q**2)*r #equivalent resistance(k ohms)
R=(ro*req)/(ro+req) #ro||req(k ohms)
Avo=-(beta*R)/Ri #voltage gain
#Part b
Qcircuit=R/(2*(math.pi)*fo*L) #circuit inductance
BW=fo/Qcircuit #bandwidth
#Results
print"a)value of capacitance is",round(C/1E-3),"nF"
print" gain is",round(Avo,1)
print"b)bandwidth is",round(BW/1E-3),"Hz","(value used for beta in texbook is wrong in the solution)"
#Variable declaration
f=1*10**6 #radio frequency(Hz)
beta=50 #common emitter current gain
fT=5*10**6 #short circuit current gain bandwidth product(Hz)
#Calculations
betaf=fT/f #measurement of short circuit current gain
fbeta=fT/beta #frequency at beta(Hz)
#Results
print"frequency is",fbeta,"Hz"
if fbeta<1*10**6:
print"transistor is not suitable for 1Mhz amplifier as fbeta is less than 1Mhz"
else:
print"transistor is suitable for 1Mhz amplifier"
import math
#Variable declaration
rpi=2 #dynamic junction resistance(K ohms)
beta=50. #common emitter current gain
f=1 #frequency(MHz)
beta1=2.5 #common emitter current gain
f1=20*10**6 #frequency(Hz)
#Calculations
fT=beta1*f1 #short circuit current gain bandwidth product(Hz)
fbeta=fT/beta #frequency at beta(Hz)
Cpi=1/(2*(math.pi)*fbeta*rpi) #dynamic capacitance(pF)
#Results
print"fT is",round(fT/1e+6),"MHz"
print"fB is",round(fbeta/1e+6),"MHz"
print"Cpi is",round(Cpi/1e-9),"pF"
import math
#Variable declaration
R1=60 #resistance(k ohms)
R2=140 #resistance(k ohms)
Rs=4 #source resistance(k ohms)
Re=3 #emitter resistance(k ohms)
Rc=4 #collector resistance(k ohms)
Vcc=10 #supply voltage to collector(V)
Vbe=0.7 #base to emitter voltage(V)
beta=100 #common emitter current gain
Avo=-30 #voltage gain
#Calculations
#Part a
Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)
Vth=(Vcc*R1)/(R1+R2) #thevinine's voltage(V)
Ib=(Vth-Vbe)/(Rb+(beta+1)*Re) #base current(uA)
Ic=Ib*beta #collector current(mA)
Vce=Vcc-(Rc*Ic)-((beta+1)*Ib*Re) #collector to emitter voltage(V)
#Part b
rpi=((25*beta)/Ic)*10**-3 #dynamic junction resistance(k ohms)
r=(Rb*rpi)/(Rb+rpi) #resistance across Vs
Ib1=r/((Rs+r)*rpi) #base current(mA)
Rl=(-Rc*Avo)/(Avo+(beta*Ib1*Rc)) #load resistance(k ohms)
#Results
print"value of Ic and Vce are",round(Ic,3),"mA and",round(Vce,2),"V"
print"Rl is",round(Rl,2),"k ohms"
import math
#Variable declaration
R1=25. #resistances(k ohms)
R2=100. #resistances(k ohms)
Re=2. #emitter resistance(k ohms)
Vcc=10. #supply voltage to collector
Vbe=0.7 #base to emitter voltage(V)
beta=100. #common emitter current gain
Avo=160 #voltage gain
Rs=1 #source resistance(k ohms)
Vs=1 #source voltage(V)
Rl=12.5 #load resistance(k ohms)
Rc1=20. #collector resistance(k ohms)
#Calculations
#Part a
Rb=(R1*R2)/(R1+R2) #R1||R2
Vth=(Vcc*R1)/(R1+R2) #thevinines voltage(V)
Ib=(Vth-Vbe)/(Rb+(beta+1)*Re) #base current(uA)
Ic=Ib*beta #collector current(mA)
rpi=(25*beta)*10**-3/Ic #dynamic junction resistance(k ohms)
#Part b
Ib1=1/rpi #small signal analysis
Rc=-Avo/(-beta*Ib1) #collector resistance()
#Part c
r=(Rc1*rpi)/(Rc1+rpi) #Rc1||rpi1(k ohms)
Ib2=(Vs*r)/((1+r)*rpi) #base curret(mA)
Rc2=6.84 #collector resistance(k ohms)
Avo=-(beta*Ib2)*((Rl*Rc2)/(Rl+Rc2)) #voltage gain
#Results
print"value of Ic",round(Ic,3),"mA and rpi is",round(rpi,2),"k ohms"
print"Rc is",round(Rc,2),"k ohms"
print"Avo is",round(Avo,1)
#Variable declaration
R1=12. #resistance(k ohms)
R2=100. #resistance(k ohms)
Rc=2 #collector resistance(k ohms)
Ic=1.2 #collector current(mA)
beta=60 #common emitter current gain
Ib1=1 #(say)
Rs=1 #source resistance(k ohms)
Vs=1 #source vcoltage(say)
#Calculations
#Part a
rpi=((25*beta)/Ic)*10**-3 #dynamic junction resistance(k ohms)
Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)
r=(Rb*rpi)/(Rb+rpi) #Rb||rpi(k ohms)
Ro1=(Rc*rpi)/(Rc+rpi) #Rc||rpi(k ohms)
Vo1=Vbe2=-(beta*Ib1*Ro1) #base to emitter voltage(V)
Ib2=Vo1/rpi #base current(mA)
Ai=Ib2/Ib1 #current gain
#Part b
Ib11=(Rs*r)/((Rs+r)*rpi) #base currents(mA)
Ib21=Ib11*Ai #base current(mA)
Avo1=Vo1=Ib21*rpi #voltage gain
#Results
print"current gain is",round(Ai,2)
print"overall voltage gain is",round(Avo1,2),"(solution in the textbook is incorrect)"
#Variable declaration
beeta=50. #common emitter current gain
R1=25. #resistance(k ohms)
R2=75. #resistance(k ohms)
Ic=1.25 #collector current(mA)
Vcc=10 #supply voltage to collector(V)
s=10*10**-3 #signal strength(V)
Rs=0.5 #output impedance(k ohms)
Vo=1 #output voltage(V)
Vs=1. #source voltage(V)
Vl=12 #load at output terminal(Vl)
Vbe=0.7 #base to emitter voltage(V)
Rl=12
#Calculations
rpi=((25*beeta)/Ic) #dynamic junction resistance(k ohms)
Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)
r=(Rb*rpi*10**-3)/(Rb+rpi*10**-3) #Rb||rpi(k ohms)
Avo=((Vo*rpi)/Vcc) #voltage gain
Ib=(r*Vs)/(Rs+r)*Vs #base current(mA)
Rc=(Rl*Avo)/(beeta*Ib*Rl-Avo) #collector resistance(k ohms)
Vth=(Vcc*R1)/(R1+R2) #thevinine's voltage(V)
Ib1=Ic/beeta #base current(mA)
Re=(Vth-Vbe-(Rb*Ib1))/((beeta+1)*Ib1) #emitter resistance(k ohms)
#Results
print"value of Rc is",round(Rc,2),"and Re is",round(Re,2),"k ohms (Vth value is wrong substituted in the book)"
import math
#Variable declaration
Cpi=20*10**-9 #opening capacitor(F)
Cu=5*10**-9
C=50*10**-9 #here C=Cl+Cw
rpi=3.75*10**3 #dynamic drain resistance(ohms)
r1=4*10**3 #resistance(ohms)
r2=42*10**3 #resistance(ohms)
r3=303*10**3 #resistance(ohms)
f=20 #frequency(Hz)
beeta=100 #common emitter current gain
Rl=10*10**3 #load resistance(ohms)
#Calculations
#Part a
Req=(((r1*r2)/(r1+r2)+rpi)*r3)/(((r1*r2)/(r1+r2)+rpi)+r3) #equivalent resistance(ohms)
Ce=(beeta+1)/(2*(math.pi)*f*Req) #emitter capacitance(uF)
#Part b
gm=beeta/rpi #transconductance
Ro=(Rl*r1)/(r1+Rl) #output resistance(k ohms)
Ceq=Cpi+(Cu*(1+gm*Ro)) #equivalent capacitance(pF)
Co=C+(Cu*(1+(1/(gm*Ro)))) #output capacitance(pF)
r=(rpi*r1)/(rpi+r1) #rpi||r1
w21=1/(Ceq*r) #lower cutoff frequency(MHz)
w22=1/(Co*Ro) #higher cutoff frequenct(MHz)
#Part c
Ceqnew=Cpi+(Cu*(1+(0.75*(gm*Ro)))) #as gain is reduced to 75% of original value
wHnew=(10**12)/(Ceqnew*r) #corner value of high frequency(Mrad/s)
fHnew=wHnew/(2*(math.pi)) #new value of higher frequency cutoff(KHz)
#Results
print"a)value of bypass capacitor Ce is",round(Ce/1E-6),"uF"
if w21>w22:
print"higher frequency is w21"
else:
print"higher frequency is w22"
print"b)high frequency cut-off is",round((w22/1E+3),2),"Mrad/s"
print"c)high frequency cut-off is",fHnew,"Hz"
import math
#Variable declaration
Vcc=3. #supply voltage to collector(V)
Vee=-3. #supply voltage to emitter(V)
r1=40. #resistance(ohms)
r2=25. #resistance(ohms)
r3=1.56 #resistance(ohms)
Vs=3. #source voltage(V)
beeta=200 #common emitter current gain
r4=0.6 #resistance(ohms)
r5=0.15 #resistance(ohms)
Vbe=0.7 #base to emitter voltage
r=0.5 #resistance(k ohms)
fL=20 #frequency(Hz)
Req1=24.24 #solving r||(Rth+rpi+R)||Re
f=2 #non dominant cutoff freq is fL/10 i.e 20/10
#Calculations
#Part a
Vth=Vs-(((Vcc-Vee)/(r1+r2))*r1) #thevinine's voltage(V)
Rth=(r1*r2)/(r1+r2) #thevinine's voltage(V)
Ib=(Vth-Vbe+Vcc)/(Rth+((r4+r5)*(beeta+1))) #base current(mA)
Ic=Ib*beeta #Collector current(mA)
Vo=Vcc-(r3*Ic) #output voltage(V)
#Part b
rpi=(25*beeta)/Ic #dynamic drain resistance(ohms)
R=r4*(beeta+1) #resistance(k ohms)
ro=(rpi*R)/(rpi+R) #rpi||R(k ohms)
Req=r+((Rth*ro)/(Rth+ro)) #equivalent resistance(k ohms)
Cc1=1/(Req*2*(math.pi)*fL) #coupling capacitor(uF)
#Part c
Ce=1/(2*(math.pi)*fL*Req1) #emitter capacitance(uF)
CE=beeta*Ce #emitter capacitance(uF) after current gain
#Part d
Ce1=1/(2*(math.pi)*f*Req1) #emitter capacitance(uF)
CE1=beeta*Ce1 #emitter capacitance(uF) after current gain
Csum=Cc1+CE1 #total capacitance(uF)
#Results
print"a)Ic and Vo are",round(Ic,2),"mA and",round(Vo),"V"
print"b)Cc1 is",round((Cc1/1E-3),3),"uF"
print"c)Ce is",round((CE/1E-3),1),"uF"
print"d)Csum is",round((Csum/1E-2),3),"uF"
import math
#Variable declaration
gm=2 #transconductance
rd=200*10**3 #dynamic drain resistance(ohms)
Cgs=10 #gate to source capacitance(pF)
Cgd=0 #gate to drain capacitance(pF)
Rs=1*10**3 #source resistance(ohms)
Rg=1*10**6 #Rg=R1||R2
Rd=5*10**3 #drain resistance(ohms)
Rs1=2 #resistance(k ohms)
Cc1=Cc2=0.1*10**-6 #coupling capacitors(F)
Co=10*10**-12 #output capacitance(F)
Vgs=1 #gate to source voltage(V)
#Calculations
#Part a
R=(Rd*rd)/(Rd+rd) #Rd||rd(k ohms)
Avo=Vo=-Vgs*gm*R #voltage gain
#Part b
w11=1/(Cc1*(Rs*Rg)) #corner freq(rad/s)
wL=w11 #input circuit corner freq(rad/s)
#Part c
w22=10**12/((Cgs*R)*10**3) #output circuit corner frequency(rad/s)
wH=w22/(2*math.pi)
#Part d
G=-Avo*wH #gain bandwidth product
#Part e
Rd=4*10**3 #drain resistance reduced(ohms)
Rnew=(Rd*rd)/(Rd+rd) #new resistance(ohms)
Avo1=-Vgs*gm*Rnew #new voltage gain
BWnew=(10**8/Rnew)/(2*math.pi) #new bandwidth(Mrad/s)
Gnew=-Avo1*BWnew #gain bandwidth product new
#Results
print"a)Avo is",round((Avo/1E+3),2)
print"b)wL is",round((wL/1E-3),2),"rad/s"
print"c)wH is",round((wH/1E+3),1),"MHz"
print"d)G is",round((G/1E+6),2),"MHz"
print"e)Gnew is",round((Gnew/1E+6),1),"MHz"
import math
#Variable declaration
gm=1 #transconductance
rd=40 #dynamic drain resistance(k ohms)
Cgs=5 #gate to source capacitance(pF)
Cgd=1 #gate to drain capacitance(pF)
Cds=1 #drain to source capacitance(pF)
Avo1=20. #voltage gain of JFET 1
Avo2=8. #voltage gain of JFET 2
R1=5 #resistance(k ohms)
R2=20 #resistance(k ohms)
R3=8 #resistance(k ohms)
#Calculations
#Part a
Avo=Avo1*Avo2 #voltage gain
Ceq1=Cgs+Cgd*(1+Avo1) #input crcuit for first JFET
Co1=Cds+(Cgd*(1+(1/Avo1))) #output crcuit for first JFET
Ceq2=Cgs+Cgd*(1+Avo2) #input crcuit for second JFET
Co2=Cds+(Cgd*(1+(1/Avo2))) #output crcuit for second JFET
#Part b
w21=1/(R1*Ceq1) #input circuit frequency
w2=10**12/(R2*10**3*(Co1+Ceq2)) #common circuit frequency
w22=1/(R3*Co2) #output circuit frequency
#Results
print"a)Avo is",Avo
print"b)w21,w2,w22 are",round((w21/1E-3),2),"Mrad/sec,",round((w2/1E+6),2),"Mrad/sec and",round((w22/1E-3),2),"Mrad/sec"
print"nondominant corner freq is",round((w2/1E+6),2),"Mrad/sec"