# Chapter 6 - Multitransistor and Multistage Amplifier¶

## Example 6_1 Page No. 168¶

In [1]:
from math import log10
from __future__ import division
Av=0.1
print "Av= %0.2f"%(Av) #Voltage gain
AvdB=20*log10(Av)
print "Av(dB)=20*log10(Av)= %0.2f"%(AvdB),"dB " #Voltage gain in decibel
Av=0.707
print "Av= %0.2f"%(Av) #Voltage gain
AvdB=20*log10(Av)
print "Av(dB)=20*log10(Av)= %0.2f"%(AvdB),"dB " #Voltage gain in decibel
Av=1
print "Av= %0.2f"%(Av) #Voltage gain
AvdB=20*log10(Av)
print "Av(dB)=20*log10(Av)= %0.2f"%(AvdB),"dB " #Voltage gain in decibel
Av=10
print "Av= %0.2f"%(Av) #Voltage gain
AvdB=20*log10(Av)
print "Av(dB)=20*log10(Av)= %0.2f"%(AvdB),"dB " #Voltage gain in decibel
Av=100
print "Av= %0.2f"%(Av) #Voltage gain
AvdB=20*log10(Av)
print "Av(dB)=20*log10(Av)= %0.2f"%(AvdB),"dB " #Voltage gain in decibel
Av=1000
print "Av= %0.2f"%(Av) #Voltage gain
AvdB=20*log10(Av)
print "Av(dB)=20*log10(Av)= %0.2f"%(AvdB),"dB " #Voltage gain in decibel
#NOTE:calculated voltage gain in dB for Av=0.707 is -3.0116117dB

Av= 0.10
Av(dB)=20*log10(Av)= -20.00 dB
Av= 0.71
Av(dB)=20*log10(Av)= -3.01 dB
Av= 1.00
Av(dB)=20*log10(Av)= 0.00 dB
Av= 10.00
Av(dB)=20*log10(Av)= 20.00 dB
Av= 100.00
Av(dB)=20*log10(Av)= 40.00 dB
Av= 1000.00
Av(dB)=20*log10(Av)= 60.00 dB


## Example 6_2 Page No. 169¶

In [2]:
from math import sqrt,log10
from __future__ import division
Ri=0.5*10**(3)
print "Ri= %0.2f"%(Ri)+ " ohm"  # Amplifier input resistance
RL=0.05*10**(3)
print "RL= %0.2f"%(RL)+ " ohm"  # Load resistance
Vom=1
print "Vom= %0.2f"%(Vom)," volts" # Output voltage
Vo=Vom/sqrt(2)#RMS value of Output voltage
Vim=1*10**(-3)
print "Vim= %0.2f"%(Vim)," volts" # Peak Input voltage
Vi=Vim/sqrt(2)#RMS Input voltage
Av=20*log10(Vo/Vi)
print "Av(in dB)=20*log10(Vo/Vi)= %0.2f"%(Av)," dB " #Voltage gain in decibel
Iim=Vim/Ri
print "Iim= Vim/Ri= %0.2f"%(Iim)," A" # Input peak current
Ii=Iim/sqrt(2) #RMS value of input current
Iom=Vom/RL
print "Iom= Vom/RL= %0.2f"%(Iom)," A" # Output peak current
Io=Iom/sqrt(2) #RMS value of Output current
Ai=20*log10(Io/Ii)
print "Ai=20*log10(Io/Ii)= %0.2f"%(Ai)," dB " #Current gain in decibel
pi=Vi**2/Ri
print "pi= Vi**2/Ri= %0.2f"%(pi)," W" # Input power
po=Vo**2/RL
print "po= Vo**2/RL= %0.2f"%(po)," W" # Output power
Ap=10*log10(po/pi)
print "Ap=10*log10(po/pi)= %0.2f"%(Ap)," dB " #Power gain in decibel

Ri= 500.00 ohm
RL= 50.00 ohm
Vom= 1.00  volts
Vim= 0.00  volts
Av(in dB)=20*log10(Vo/Vi)= 60.00  dB
Iim= Vim/Ri= 0.00  A
Iom= Vom/RL= 0.02  A
Ai=20*log10(Io/Ii)= 80.00  dB
pi= Vi**2/Ri= 0.00  W
po= Vo**2/RL= 0.01  W
Ap=10*log10(po/pi)= 70.00  dB


## Example 6_3 Page No. 172¶

In [1]:
from __future__ import division
RL=1*10**(3)
print "RL= %0.2f"%(RL)+ " ohm"  #Load resistance
RF=500*10**(3)
print "RF= %0.2f"%(RF)+ " ohm"  #Feedback resistance
Beta_o=50
print "Beta_o = %0.2f"%(Beta_o) #BJT gain
rbe=1*10**(3)
print "rbe= %0.2f"%(rbe)+ " ohm"  #Base-emitter resistance
gm=50*10**(-3)
print "gm = %0.2f"%(gm)," A/V"#  transconductance for BJT
rc=50*10**(3)
print "rc= %0.2f"%(rc)+ " ohm"  #collector resistance
print "part(i)"
print "Adm1=(-gm*RL)= %0.2f"%(Adm1) # Differential mode gain for BJT for DIDO and SIDO modes
print "Adm2=(0.5*gm*RL)= %0.2f"%(Adm2) # Differential mode gain for BJT for DISO and SISO modes
Rid=2*rbe
print "Rid=2*rbe= %0.2f"%(Rid)+ " ohm"  #input differential mode resistance
Acm=(-RL)/(2*RF)
print "Acm=(-RL)/(2*RF)= %0.2e"%(Acm) # Common mode gain for BJT for DISO and SISO modes
Ric=Beta_o*RF
print "Ric=Beta_o*RF= %0.2e"%(Ric)+ " ohm"  # common mode input resistance
CMRR=2*gm*RF
print "CMRR=2*gm*RF= %0.2f"%(CMRR)  # common mode rejection ratio
print "part(ii)"
Vi1=(-0.5)*10**(-3)
print "Vi1= %0.2e"%(Vi1)," volts" # input voltage1
Vi2=(+0.5)*10**(-3)
print "Vi2= %0.2e"%(Vi2)," volts" # input voltage2
Vcm=(10)*10**(-3)
print "Vcm= %0.2f"%(Vcm)," volts" # common mode voltage
Vd=Vi1-Vi2
print "Vd=Vi1-Vi2= %0.2e"%(Vd)," volts" # differential voltage
print "Vod=abs(Vd*Adm2)= %0.2f"%(Vod)," volts" # output differential voltage for DISO and SISO modes
Voc=abs(Vcm*Acm)
print "Voc=abs(Vcm*Acm)= %0.2e"%(Voc)," volts" # output common mode  voltage
Error=(Voc/Vod)*100
print "percentage error=(Voc/Vod)*100= %0.2f"%(Error),"%"#percentage error due to CM signal
print "part(iii)"
RLeff=(RL*Rid)/(RL+Rid)
print "RLeff=(RL*Rid)/(RL+Rid)= %0.2f"%(RLeff)+ " ohm"  # Effective load resistance
print "Adm=gm*RLeff= %0.2f"%(Adm) # Modified Differential mode gain for BJT for DIDO and SIDO modes
Acm=(-RLeff)/(2*RF)
print "Acm=(-RLeff)/(2*RF)= %0.2e"%(Acm) # Modified Common mode gain for BJT for DISO and SISO modes
print "CMRR=abs(Adm/(Acm))= %0.2f"%(CMRR)  # Modified common mode rejection ratio
#NOTE:  In Book, Formulae used for Acm in part(iii) is written as Acm=(-RL)/(2*RF)but ans is calculated by using RLeff in place of RL.So i have written formulae as Acm=(-RLeff)/(2*RF) in programming.
# Assigned variable name: in part(i) Adm for DIDO and SIDO modes is represented by Adm1 and Adm for DISO and SISO modes is represented by Adm2 to resist any anamoly in the programming.

RL= 1000.00 ohm
RF= 500000.00 ohm
Beta_o = 50.00
rbe= 1000.00 ohm
gm = 0.05  A/V
rc= 50000.00 ohm
part(i)
Rid=2*rbe= 2000.00 ohm
Acm=(-RL)/(2*RF)= -1.00e-03
Ric=Beta_o*RF= 2.50e+07 ohm
CMRR=2*gm*RF= 50000.00
part(ii)
Vi1= -5.00e-04  volts
Vi2= 5.00e-04  volts
Vcm= 0.01  volts
Vd=Vi1-Vi2= -1.00e-03  volts
Voc=abs(Vcm*Acm)= 1.00e-05  volts
percentage error=(Voc/Vod)*100= 0.04 %
part(iii)
RLeff=(RL*Rid)/(RL+Rid)= 666.67 ohm
Acm=(-RLeff)/(2*RF)= -6.67e-04


## Example 6_4 Page No. 175¶

In [2]:
from __future__ import division
VCC=(10)
print "VCC= %0.2f"%(VCC)," volts" # Collector voltage supply
VEE=VCC
print "VEE=VCC= %0.2f"%(VEE)," volts" # Emitter supply voltage
IQ=2*10**(-3)
print "IQ = %0.2f"%(IQ)," ampere" #  operating current for CC class-Aamplifier
VBE=(0.7)
print "VBE= %0.2f"%(VBE)," volts" # Base-emitter voltage
print "part(i)"
RL=VCC/IQ
print "RL=VCC/IQ= %0.2f"%(RL)+ " ohm"  #Load resistance
Pomax=VCC**2/(2*RL)
print "Pomax=VCC**2/(2*RL)= %0.2f"%(Pomax)," W" # maximum Output power
PDC=2*VCC*IQ
print "PDC=2*VCC*IQ= %0.2f"%(PDC)," W" # Total D.C power supply
Etta_max=(Pomax/PDC)*100
print "Efficiency,Etta_max=(Pomax/PDC)*100= %0.2f"%(Etta_max),"%" #maximum power amplifier conversion efficiency
PDmax=VCC*IQ
print "PDmax=VCC*IQ= %0.2f"%(PDmax)," W" # maximum power dissipation
print "part(ii)"
Vcm=(5)
print "Vcm= %0.2f"%(Vcm)," volts" # common mode voltage
Po=Vcm**2/(2*RL)
print "Po=Vcm**2/(2*RL)= %0.2e"%(Po)," W" # Output power
Etta=(Po/PDC)*100
print "Efficiency,Etta=(Po/PDC)*100= %0.2f"%(Etta)," %" # power amplifier conversion efficiency
PDCavg=PDmax-Po#Using law of conservation of energy
print "PDCavg=PDmax-Po= %0.2f"%(PDCavg)," W" # Average power dissipated in BJT

VCC= 10.00  volts
VEE=VCC= 10.00  volts
IQ = 0.00  ampere
VBE= 0.70  volts
part(i)
RL=VCC/IQ= 5000.00 ohm
Pomax=VCC**2/(2*RL)= 0.01  W
PDC=2*VCC*IQ= 0.04  W
Efficiency,Etta_max=(Pomax/PDC)*100= 25.00 %
PDmax=VCC*IQ= 0.02  W
part(ii)
Vcm= 5.00  volts
Po=Vcm**2/(2*RL)= 2.50e-03  W
Efficiency,Etta=(Po/PDC)*100= 6.25  %
PDCavg=PDmax-Po= 0.02  W


## Example 6_5 Page No. 178¶

In [3]:
from math import pi,sqrt
from __future__ import division
VCC=(10)
print "VCC= %0.2f"%(VCC)," volts" # Collector voltage supply
VEE=VCC
print "VEE=VCC= %0.2f"%(VEE)," volts" # Emitter supply voltage
ICQ_0=10*10**(-3)
print "ICQ_0 = %0.2e"%(ICQ_0)," ampere" #  Zero signal collector current
RL=5
print "RL= %0.2f"%(RL)+ " ohm"  #Load resistance
print "part(i)"
Po=0# Since Output power at Zero signal condition is Zero
print "Po=%0.2f"%(Po)," W" # Output power at Zero signal condition
PDC=2*VCC*ICQ_0
print "PDC=2*VCC*ICQ_0= %0.2f"%(PDC)," W" # Total D.C power supply for Zero signal condition
print "part(ii)"
Vcm=VCC#For Full output voltage swing Vcm=VCC
print "Vcm=VCC = %0.2f"%(Vcm)," volts" # common mode voltage for full swing condition
Icm=VCC/RL
print "Icm = VCC/RL=%0.2e"%(Icm)," ampere" # common mode current
Po=(1/2)*(Icm*Vcm)
print "Po=(1/2)*(Icm*Vcm)=%0.2f"%(Po)," W" # Output power at full swing condition
ICavg=(Icm)/(pi)
print "ICavg=(Icm)/(pi)=%0.2e"%(ICavg)," ampere" #  Average value of common mode current
PDC=2*(ICavg*VCC)
print "PDC=2*VCC*ICavg= %0.2f"%(PDC)," W" # Total D.C power supply for full swing condition
Etta=(Po/PDC)*100
print "Efficiency,Etta=(Po/PDC)*100= %0.2f"%(Etta)," %" # power amplifier conversion efficiency
print "part(iii)"
Vcm1=(5)#given value
print "Vcm1= %0.2f"%(Vcm1)," volts" # common mode voltage for output swing Vcm=5 V
ICavg1=(Vcm1)/(pi*RL)
print "ICavg1=(Vcm1)/(pi*RL)=%0.2e"%(ICavg1)," ampere" #  Average value of common mode current
Po1=(Vcm1**2)/(2*RL)
print "Po1=(Vcm1**2)/(2*RL)=%0.2f"%(Po1)," W" # Output power for output swing Vcm=5 V
PDC1=2*(ICavg1*VCC)
print "PDC1=2*VCC*ICavg1= %0.2e"%(PDC1)," W" # Total D.C power supply for  output swing Vcm=5 V
Etta=(Po1/PDC1)*100
print "Efficiency,Etta=(Po1/PDC1)*100= %0.2f"%(Etta)," %" # power amplifier conversion efficiency for output swing Vcm=5 V
# NOTE:Correct value of Efficiency,Etta=(Po1/PDC1)*100= 39.269908 % for part(iii) but book ans is 39.31%(because of approximation used during calculation)

VCC= 10.00  volts
VEE=VCC= 10.00  volts
ICQ_0 = 1.00e-02  ampere
RL= 5.00 ohm
part(i)
Po=0.00  W
PDC=2*VCC*ICQ_0= 0.20  W
part(ii)
Vcm=VCC = 10.00  volts
Icm = VCC/RL=2.00e+00  ampere
Po=(1/2)*(Icm*Vcm)=10.00  W
ICavg=(Icm)/(pi)=6.37e-01  ampere
PDC=2*VCC*ICavg= 12.73  W
Efficiency,Etta=(Po/PDC)*100= 78.54  %
part(iii)
Vcm1= 5.00  volts
ICavg1=(Vcm1)/(pi*RL)=3.18e-01  ampere
Po1=(Vcm1**2)/(2*RL)=2.50  W
PDC1=2*VCC*ICavg1= 6.37e+00  W
Efficiency,Etta=(Po1/PDC1)*100= 39.27  %


## Example 6_6 Page No. 180¶

In [1]:
from __future__ import division
Av=1*10**(5)
print "Av= %0.2f"%(Av) #Voltage gain
VCC=(10)
print "VCC= %0.2f"%(VCC)," volts" # Collector voltage supply
vo=VCC
print "vo= VCC=%0.2f"%(vo)," volts" # maximum output voltage
Vdmax=VCC/Av
print "Vdmax= VCC/Av=%0.2e"%(Vdmax)," volts" # Difference input voltage at OP-amp terminals

Av= 100000.00
VCC= 10.00  volts
vo= VCC=10.00  volts
Vdmax= VCC/Av=1.00e-04  volts