# Chapter 26 , Multistage BJT Amplifiers¶

## Example 26.1 , Page Number 658¶

In :
import math

#Variables

Av1 = 10.0                          #Voltage gain1
Av2 = 20.0                          #Voltage gain2
Av3 = 40.0                          #Voltage gain3

#Calculation

Av = Av1 * Av2 * Av3                #Voltage gain
Gv1 = 20 * math.log10(Av1)               #dB voltage gain1
Gv2 = 20 * math.log10(Av2)               #dB voltage gain2
Gv3 = 20 * math.log10(Av3)               #dB voltage gain3
Gv = Gv1 + Gv2 + Gv3                #dB voltage gain

#Result

print "Overall voltage gain is ",Av,".\nTotal dB voltage gain is ",round(Gv)," dB."

Overall voltage gain is  8000.0 .
Total dB voltage gain is  78.0  dB.


## Example 26.2 , Page Number 659¶

In :
import math

#Variables

n = 3                       #Number of amplified stages
Vin1 = 0.05                 #Input to first stage (in volts peak-to-peak)
Vout3 = 150.0               #Output of final stage (in volts peak-to-peak)
Av1 = 20.0                  #Voltage gain of first stage
Vin3 = 15.0                 #Input of final stage (in volts peak-to-peak)

#Calculation

Av = Vout3 / Vin1           #Overall voltage gain
Av3 = Vout3 / Vin3          #Voltage gain of third stage
Av2 = Av / (Av1 * Av3)      #Voltage gain of second stage
Vin2 = Vin3 / Av2           #Input voltage gain of second stage

#Result

print "Overall voltage gain is ",Av,".\nVoltage gain of 2nd and 3rd stage is ",Av2," and ",Av3,".\nInput voltage of the second stage is ",Vin2," Vpk-pk."

Overall voltage gain is  3000.0 .
Voltage gain of 2nd and 3rd stage is  15.0  and  10.0 .
Input voltage of the second stage is  1.0  Vpk-pk.


## Example 26.3 , Page Number 663¶

In :
import math

#Variables

VCC = 10.0                        #Source voltage (in volts)
RC = 5.0 * 10**3                  #Collector resistance (in ohm)
RB = 1.0 * 10**6                  #Base resistance (in ohm)
RE = 1.0 * 10**3                  #Emitter resistance (in ohm)
RL = 10.0 * 10**3                 #Load resistance (in ohm)
beta1 = beta2 = 100.0             #Common emitter current gain

#Calculation

IE = VCC /(RE + RB/beta1)         #Emitter current (in Ampere)
r1e = 25.0/IE * 10**-3            #a.c. emitter diode resistance (in ohm)
Ri1 = beta1 * r1e                 #Input resistance of first stage (in ohm)
Ri2 = beta2 * r1e                 #Input resistance of second stage (in ohm)
Ro1 = RC * Ri2 / (RC + Ri2)       #Output resistance of first stage (in ohm)
Ro2 = RC * RL / (RC + RL)         #Output resitance of second stage (in ohm)
Av1 = Ro1 / r1e                   #Voltage gain of first stage
Av2 = Ro2 / r1e                   #Voltage gain of second stage
Av = Av1 * Av2                    #Overall voltage gain
Gv = 20 * math.log10(Av)               #Overall dB voltage gain

#Result

print "Input resistance of first and scond stage is ",round(Ri1)," ohm and ",round(Ri2)," ohm.\nOutput resistance of first and second stage is ",round(Ro1,1)," ohm and ",round(Ro2,1)," ohm.\nVoltage gain of first and second stage is ",round(Av1)," and ",round(Av2,1),".\nOverall voltage gain and dB voltage gain is ",round(Av)," and ",round(Gv,1)," dB."

Input resistance of first and scond stage is  2750.0  ohm and  2750.0  ohm.
Output resistance of first and second stage is  1774.2  ohm and  3333.3  ohm.
Voltage gain of first and second stage is  65.0  and  121.2 .
Overall voltage gain and dB voltage gain is  7820.0  and  77.9  dB.


## Example 26.4 , Page Number 664¶

In :
import math

#Variables

VCC = 15.0                        #Source voltage (in volts)
RC = 3.3 * 10**3                  #Collector resistance (in ohm)
RE = 1.0 * 10**3                  #Emitter resistance (in ohm)
RL = 10.0 * 10**3                 #Load resistance (in ohm)
R1 = 33.0 * 10**3                 #Resistance (in ohm)
R2 = 8.2 * 10**3                  #Resistance (in ohm)
beta1 = beta2 = 100.0             #Common emitter current gain
VBE = 0.7                         #Emitter-to-base voltage (in volts)

#Calculation

Vth = VCC * R2 / (R1 + R2)        #Thevenin's voltage (in volts)
Rth = R1 * R2 / (R1 + R2)         #Thevenin's equivalent resistance (in ohm)
IE = (Vth - VBE)/(RE + Rth/beta1) #Emitter current (in Ampere)
r1e = 25.0/IE * 10**-3            #a.c. emitter resistance (in ohm)
Ri2 = beta1 * r1e                 #Input resistance of second stage (in ohm)
Ro1 = RC * Ri2 / (RC + Ri2)       #Output resistance of first stage (in ohm)
Ro2 = RC * RL /(RC + RL)          #Output resistance of second stage (in ohm)
Av1 = Ro1 / r1e                   #Voltage gain of the first stage
Av2 = Ro2 / r1e                   #Voltage gain of second stage
Av = Av1 * Av2                    #Overall voltage gain
Gv = 20 * math.log10(Av)               #Overall voltage (in decibels)

#Result

print "Voltage gain of stage one and two are as follows ",round(Av1,2)," and ",round(Av2,2),".\nOverall voltage gain is ",round(Av),".\nOverall voltage gain in decibels is ",round(Gv,1)," dB."

#Slight variation in the value of Av2 and Av due to higher precision.

Voltage gain of stage one and two are as follows  73.9  and  212.85 .
Overall voltage gain is  15728.0 .
Overall voltage gain in decibels is  83.9  dB.


## Example 26.5 , Page Number 669¶

In :
import math

#Variables

VCC = 10.0                        #Source voltage (in volts)
RB = 470.0 * 10**3                #Base resistance (in ohm)
RE = 1.0 * 10**3                  #Emitter resistance (in ohm)
RL = 1.0 * 10**3                  #Load resistance (in ohm)
a = 4.0                           #Turn's ratio
beta1 = beta2 = 50.0              #Common emitter current gain
VBE = 0.7                         #Emitter-to-base voltage (in volts)

#Calculation

IE = VCC/ (RE + RB/beta1)         #Emitter current (in Ampere)
r1e = 25.0 / IE * 10**-3          #a.c. emitter diode resistance (in ohm)
Ri1 = RB*beta1*r1e/(RB+beta1*r1e) #Input resistance of first stage (in ohm)
Ri2 = RB*beta2*r1e/(RB+beta2*r1e) #Input resistance of Second stage (in ohm)
R1i2 = a**2 * Ri2                 #Input resistance of the second stage transformed to primary side (in ohm)
Ro1 = R1i2                        #Output resistance of second stage (in ohm)
R1o2 = a**2 * RL                  #Output resistance of the second stage transformed to the primary side (in ohm)
Av1 = Ro1/r1e                     #Voltage gain of first stage
Av2 = R1o2/r1e                    #Voltage gain of second stage
Av = Av1 * Av2                    #Overall voltage gain
Gv = 20 * math.log10(Av)               #Overall voltage gain (in decibels)

#Result

print "Voltage gain of first stage is ",round(Av1,1),".\nVoltage gain of second stage is ",round(Av2,1),".\nOverall voltage gain is ",round(Av),".\nOverall voltage gain in decibels is ",round(Gv)," dB."

#Slight variation due to higher precision.

Voltage gain of first stage is  797.8 .
Voltage gain of second stage is  615.4 .
Overall voltage gain is  490950.0 .
Overall voltage gain in decibels is  114.0  dB.


## Example 26.6 , Page Number 672¶

In :
import math

#Variables

VCC = 12.0                         #Source voltage (in volts)
R1 = 100.0 * 10**3                 #Resistance (in ohm)
R2 = 20.0 * 10**3                  #Resistance (in ohm)
R3 = 10.0 * 10**3                  #Resistance (in ohm)
R4 = 2.0 * 10**3                   #Resistance (in ohm)
R5 = 10.0 * 10**3                  #Resistance (in ohm)
R6 = 2.0 * 10**3                   #Resistance (in ohm)
beta1 = beta2 = 100.0              #Common emitter current gain

#Calculation

Vth = VCC * R2 / (R1 + R2)         #Thevenin's voltage (in volts)
IE1 = Vth / R4                     #Emitter curren1 (in Ampere)
r1e = 25.0 / IE1 * 10**-3          #a.c. emitter diode resistance (in ohm)
VR6 = VCC - IE1 * R3               #Voltage across resistance6 (in volts)
IE2 = VR6 / R6                     #Emitter current2 (in Ampere)
r1e2 = 25.0 / IE2 * 10**-3         #a.c. emitter diode resistance2 (in ohm)
Ri2 = beta2*(r1e2 + R6)            #Input resistance of second stage (in ohm)
Ro1 = R3 * Ri2 /(R3 + Ri2)         #Output resistance of first stage (in ohm)
Ro2 = R5                           #Output resistance of second stage (in ohm)
Av1 = Ro1/(r1e + R4)               #Voltage gain of first stage
Av2 = Ro2/(r1e2 + R6)              #Voltage gain of second stage
Av = Av1 * Av2                     #Overall voltage gain

#Result

print "Voltage gain of first stage is ",round(Av1,1),".\nVoltage gain of second stage is ",round(Av2,1),".\nOverall voltage gain is ",round(Av,2),"."

#Calculation mistake in book about Ro1 , therefore slight variation in the answers.

Voltage gain of first stage is  4.7 .
Voltage gain of second stage is  4.9 .
Overall voltage gain is  23.24 .


## Example 26.7 , Page Number 674¶

In :
import math

#Variables

VCC = 10.0                          #Source voltage (in volts)
R1 = 800.0                          #Resistance (in ohm)
R2 = 200.0                          #Resistance (in ohm)
R3 = 600.0                          #Resistance (in ohm)
R4 = 200.0                          #Resistance (in ohm)
R5 = 100.0                          #Resistance (in ohm)
R6 = 1000.0                         #Resistance (in ohm)
beta1 = beta2 = 100.0               #Common emitter current gain
VBE = 0.7                           #Emitter-to-base voltage (in volts)

#Calculation

VR2 = VCC * (R2 / (R1 + R2))        #Voltage across resistance2 (in volts)
IE1 = (VR2 - VBE)/R2                #Emitter current of Q1 transistor (in Ampere)
IC1 = IE1                           #Collector current of Q1 transistor (in Ampere)
VC1 = VCC - IC1 * R3                #Voltage at the collector of Q1 transistor (in volts)
VE1 = IE1 * R4                      #Voltage at the emitter of Q1 transistor (in volts)
VCE1 = VC1 - VE1                    #Collector-to-emitter voltage of Q1 transistor (in volts)
VE2 = VC1 - (-VBE)                  #Voltage at the emitter of Q2 transistor (in volts)
IE2 = (VCC - VE2)/R6                #Emitter current of Q2 transistor (in Ampere)
IC2 = IE2                           #Collector-current of Q2 transistor (in Ampere)
VC2 = IC2 * R5                      #Voltage at the collector of Q2 transistor (in volts)
VCE2 = VC2 - VE2                    #Collector-to-emitter voltage of Q2 transistor (in volts)

r1e1 = 25.0 / IE1 * 10**-3          #a.c. emitter diode resistance of Q1 transistor (in ohm)
r1e2 = 25.0 / IE2 * 10**-3          #a.c. emitter diode resistance of Q2 transistor (in ohm)
Ri2 = beta2 * (r1e2 + R6)           #Input resistance of second stage (in ohm)
Ro1 = R3 * Ri2 / (R3 + Ri2)         #Output resistance of first stage (in ohm)
Av1 = Ro1 / (r1e1 + R4)             #Voltage gain of first stage
Av2 = 1.0                           #Voltage gain of second stage
Av = Av1 * Av2                      #Overall voltage gain

#Result

print "Emitter current of Q1 transistor is ",IE1 * 10**3," mA.\nCollector current of Q1 transistor is ",IC1 * 10**3," mA.\nEmitter current of Q2 transistor is ",IE2 * 10**3," mA.\nCollecotr-current of Q2 transistor is ",IC2 * 10**3," mA."
print "Collector-to-emitter voltage of Q1 transistor is ",VCE1," v.\nCollector-to-emitter voltage of Q2 transistor is ",VCE2,"."
print "Overall voltage gain is ",round(Av,2),"."

Emitter current of Q1 transistor is  6.5  mA.
Collector current of Q1 transistor is  6.5  mA.
Emitter current of Q2 transistor is  3.2  mA.
Collecotr-current of Q2 transistor is  3.2  mA.
Collector-to-emitter voltage of Q1 transistor is  4.8  v.
Collector-to-emitter voltage of Q2 transistor is  -6.48 .
Overall voltage gain is  2.93 .


## Example 26.8 , Page Number 679¶

In :
import math

#Variables

VCC = 10.0                        #Source voltage (in volts)
RE = 1.5 * 10**3                  #Emitter resistance (in ohm)
R1 = 30.0 * 10**3                 #Resistance (in ohm)
R2 = 20.0 * 10**3                 #Resistance (in ohm)
beta1 = 150.0                     #Common emitter current gain
beta2 = 100.0                     #Common emitter current gain
VBE = 0.7                         #Emitter-to-base voltage (in volts)

#Calculation

Ai = beta1 * beta2                #Overall current gain of transistor
VR2 = VCC * R2/(R1 + R2)          #Voltage across resistor2 (in volts)
VB2 = VR2 - VBE                   #Voltage at the base of Q2 (in volts)
VE2 = VB2 - VBE                   #Voltage at the emitter of Q2 (in volts)
IE2 = VE2 / RE                    #Emitter current of Q2 (in Ampere)
r1e2 = 25.0/IE2 * 10**-3          #a.c. emitter diode resistance of Q2 (in ohm)
IB2 = IE2 / beta2                 #Base current of Q2 (in Ampere)
IE1 = IB2                         #Emitter current of Q2
r1e1 = 25.0/IE1 * 10**-3          #a.c. emitter diode resistance of Q1 (in ohm)
Ri1 = R1 * R2/(R1 + R2)           #Total input resistance (in ohm)
Av = RE/(r1e1/beta2 + r1e2 + RE)  #Overall voltage gain

#Result

print "The overall current gain is ",Ai,"."
print "The a.c. emitter diode resistance of Q1 transistor is ",round(r1e1,1)," ohm.\nThe a.c. emitter diode resistance of Q2 transistor is ",round(r1e2,2)," ohm."
print "Total input resistance is ",Ri1 * 10**-3," kilo-ohm."
print "Overall voltage gain is ",round(Av,2),"."

#Slight variation due to higher precision.

The overall current gain is  15000.0 .
The a.c. emitter diode resistance of Q1 transistor is  1442.3  ohm.
The a.c. emitter diode resistance of Q2 transistor is  14.42  ohm.
Total input resistance is  12.0  kilo-ohm.
Overall voltage gain is  0.98 .