CHAPTER 17 DIFFERENTIAL AMPLIFIERS

Example 17-1, Page 625

In [94]:
VCC=15                           #supply voltage(V)
RE=7.5                           #Emitter resistance(KOhm)

IT=VCC/RE                         #tail current (mA)
IE=IT/2                           #emitter current (mA)

print 'tail current = ',IT,'mA'
print 'emitter current = ',IE,'mA'
tail current =  2.0 mA
emitter current =  1.0 mA

Example 17-2, Page 626

In [1]:
VCC=15                           #supply voltage(V)
RE=7.5                           #Emitter resistance(KOhm)
VBE=0.7                          #base-emitter voltage(V)
RC=5                             #collector resistance(KOhm)

IT=(VCC-VBE)/RE                         #tail current (mA)
IE=IT/2                                 #emitter current (mA)
VC=VCC-(IE*RC)                          #collector quiescent voltage(V) 

print 'tail current = ',round(IT,2),'mA'
print 'emitter current = ',round(IE,2),'mA'
print 'collector quiescent voltage VC = ',round(VC,2),'V'
tail current =  1.91 mA
emitter current =  0.95 mA
collector quiescent voltage VC =  10.23 V

Example 17-3, Page 626

In [92]:
VCC=12.0                           #supply voltage(V)
RE=5.0                             #Emitter resistance(KOhm)
RC=3.0                             #collector resistance(KOhm)

IT=VCC/RE                         #tail current (mA)
IE=IT/2                           #emitter current (mA)
VC=VCC-(IE*RC)                    #collector quiescent voltage(V) 
IT1=(VCC-VBE)/RE                          #tail current (mA)
IE1=IT1/2                                 #emitter current (mA)
VC1=VCC-(IE1*RC)                          #collector quiescent voltage(V) 

print 'tail current = ',IT,'mA'
print 'emitter current = ',IE,'mA'
print 'collector quiescent voltage VC = ',VC,'V'
print 'with second approximation,'
print 'tail current = ',IT1,'mA'
print 'emitter current = ',IE1,'mA'
print 'collector quiescent voltage VC = ',VC1,'V'
tail current =  2.4 mA
emitter current =  1.2 mA
collector quiescent voltage VC =  8.4 V
with second approximation,
tail current =  2.26 mA
emitter current =  1.13 mA
collector quiescent voltage VC =  8.61 V

Example 17-4, Page 631

In [91]:
VCC=12.0                           #supply voltage(V)
RE=7.5                             #Emitter resistance(KOhm)
RC=5.0                             #collector resistance(KOhm)
IE=1                               #emitter current as per preceding example(mA)
Vin=1                              #input ac voltage(mV)
B=300                              #current gain

re=25/IE                          #ac emitter resistance(Ohm)
Av=1000*RC/re                     #voltage gain
Vout=Av*Vin                       #Output voltage(mV)
Zinb=2*B*re                       #input impedance of diff amp(Ohm)

print 'voltage gain Av = ',Av
print 'Output voltage Vout = ',Vout,'mV'
print 'input impedance of diff amplifier, Zin(base) = ',Zinb/1000,'KOhm'
voltage gain Av =  200.0
Output voltage Vout =  200.0 mV
input impedance of diff amplifier, Zin(base) =  15 KOhm

Example 17-5, Page 632

In [2]:
VCC=12.0                           #supply voltage(V)
RE=7.5                             #Emitter resistance(KOhm)
RC=5.0                             #collector resistance(KOhm)
IE=0.955                           #emitter current as per previous example(mA)
Vin=1                              #input ac voltage(mV)
B=300                              #current gain

re=25/IE                          #ac emitter resistance(Ohm)
Av=1000*RC/re                     #voltage gain
Vout=Av*Vin                       #Output voltage(mV)
Zinb=2*B*re                       #input impedance of diff amp(Ohm)

print 'voltage gain Av = ',Av
print 'Output voltage Vout = ',Vout,'mV'
print 'input impedance of diff amplifier, Zin(base) = ',round((Zinb/1000),2),'KOhm'
voltage gain Av =  191.0
Output voltage Vout =  191.0 mV
input impedance of diff amplifier, Zin(base) =  15.71 KOhm

Example 17-6, Page 633

In [96]:
VCC=12.0                           #supply voltage(V)
RE=7.5                             #Emitter resistance(KOhm)
RC=5.0                             #collector resistance(KOhm)
IE=1                               #emitter current as per preceding example(mA)
V2=1                               #input ac voltage(mV)
B=300                              #current gain

re=25/IE                          #ac emitter resistance(Ohm)
Av=1000*RC/re                     #voltage gain
Vout=Av*V2                        #Output voltage(mV)
Zinb=2*B*re                       #input impedance of diff amp(Ohm)

print 'V2 input is at inverting input, So, ideally same as previous case.'
print 'Voltage gain Av = ',Av
print 'Output voltage Vout = ',Vout,'mV'
print 'input impedance of diff amplifier, Zin(base) = ',Zinb/1000,'KOhm'
V2 input is at inverting input, So, ideally same as previous case.
Voltage gain Av =  200.0
Output voltage Vout =  200.0 mV
input impedance of diff amplifier, Zin(base) =  15 KOhm

Example 17-7, Page 633

In [97]:
VCC=15.0                           #supply voltage(V)
RC=1.0**10**6                      #collector resistance(Ohm)
RE=1.0**10**6                      #emitter resistance(Ohm)
IE=1                               #emitter current as per preceding example(mA)
Vin=7                              #input ac voltage(mV)
B=300                              #current gain

IT=VCC/RE                         #tail current (uA)
IE=IT/2                           #emitter current (uA)
re=25/IE/1000                     #ac emitter resistance(Ohm)
Av=RC/(2*re)                      #voltage gain
Vout=Av*Vin                       #Output voltage(V)
Zinb=2*B*re                       #input impedance of diff amp(MOhm)

print 'Voltage gain Av = ',Av
print 'Output voltage Vout = ',Vout/1000,'V'
print 'input impedance of diff amplifier, Zin(base) = ',Zinb,'MOhm'
Voltage gain Av =  150.0
Output voltage Vout =  1.05 V
input impedance of diff amplifier, Zin(base) =  2.0 MOhm

Example 17-8, Page 639

In [37]:
VCC=15.0                           #supply voltage(V)
RC=5.0*10**3                       #collector resistance(Ohm)
RE=7.5*10**3                       #emitter resistance(Ohm)
RB=1*10**3                         #base resistance(Ohm)
Vin=10                             #input ac voltage(mV)
Av=200                             #voltage gain
Iinb=3*10**-6                      #bias current(A)
Iino =0.5*10**-6                   #Iin(off)  (A) 
Vino=1.0                           #Vin(off) (mV)

V1err=RB*Iinb*1000                      #dc error input1 (mV)
V2err=RB*(Iino/2)*1000                  #dc error input2 (mV)
V3err=Vino                              #dc error input3 (mV)
Verror=Av*(V1err+V2err+V3err)           #output error voltage(mV)
V1err1=0                                #dc error input1 (mV)
V2err1=RB*Iino*1000                     #dc error input2 (mV)
V3err1=Vino                             #dc error input3 (mV)
Verror1=Av*(V1err1+V2err1+V3err1)       #output error voltage(mV)

print 'output error voltage Verror = ',Verror,'mV'
print 'output error voltage Verror = ',Verror1,'mV'
output error voltage Verror =  850.0 mV
output error voltage Verror =  300.0 mV

Example 17-9, Page 640

In [98]:
VCC=15.0                           #supply voltage(V)
RC=1.0*10**6                       #collector resistance(Ohm)
RE=1.0*10**6                       #emitter resistance(Ohm)
RB=10*10**3                        #base resistance(Ohm)
Vin=10                             #input ac voltage(mV)
Av=300                             #voltage gain
Iinb=80*10**-9                     #bias current(A)
Iino=20*10**-9                     #Iin(off)  (A) 
Vino=5.0                           #Vin(off) (mV)

V1err=0                                 #dc error input1 (mV)
V2err=RB*(Iino/2)*1000                  #dc error input2 (mV)
V3err=Vino                              #dc error input3 (mV)
Verror=Av*(V1err+V2err+V3err)           #output error voltage(mV)

print 'output error voltage Verror = ',Verror/1000,'V'
output error voltage Verror =  1.53 V

Example 17-10, Page 643

In [45]:
VCC=15.0                           #supply voltage(V)
RC=1.0*10**6                       #collector resistance(Ohm)
RE=1.0*10**6                       #emitter resistance(Ohm)
Vin=1                              #input ac voltage(mV)

Av_CM=RC/(2*RE)                    #common mode voltage gain
Vout=Av_CM*Vin                     #output voltage(mV) 

print 'common mode voltage gain : Av(CM) = ',Av_CM
print 'Output voltage Vout = ',Vout,'mV'
common mode voltage gain : Av(CM) =  0.5
Output voltage Vout =  0.5 mV

Example 17-11, Page 643

In [46]:
Vin=1                              #input ac voltage(mV)
Av=150                             #voltage gain
Av_CM=0.5                          #common mode voltage gain

Vout1=Av*Vin                       #output voltage1(mV)
Vout2=Av_CM*Vin                       #output voltage2(mV)
Vout=Vout1+Vout2                    #output volatge(mV)

print 'output voltage Vout1 = ',Vout1,'mV'
print 'output voltage Vout2 = ',Vout2,'mV'
print 'output voltage Vout = ',Vout,'mV'
output voltage Vout1 =  150 mV
output voltage Vout2 =  0.5 mV
output voltage Vout =  150.5 mV

Example 17-12, Page 644

In [3]:
CMRR_dB=90                               #CMRR(dB)
Av=200000                                #voltage gain
Vin=1*10**-6                             #input voltage(V)

CMRR=10**(CMRR_dB/20.0)                 #CMRR 
Av_CM=Av/CMRR                         #common mode voltage gain   
Vout1=Av*Vin                          #desired output: voltage1(V)
Vout2=Av_CM*Vin                       #common mode output: voltage2(V)

print 'output voltage Vout1 = ',Vout1,'V'
print 'output voltage Vout2 = ',round((Vout2*10**6),2),'uV'
print 'see, desired output is much larger than common mode output.'
output voltage Vout1 =  0.2 V
output voltage Vout2 =  6.32 uV
see, desired output is much larger than common mode output.

Example 17-13, Page 651

In [67]:
VCC=15.0                           #supply voltage(V)
RC=7.5*10**3                       #collector resistance(Ohm)
RE=7.5*10**3                       #emitter resistance(Ohm)
V1=10                              #input ac voltage(mV)
re=25                              #as per example 17-4 (Ohm)   
RL=15*10**3                        #load resistance(KOhm)

Av=RC/re                           #voltage gain
Vout=Av*V1/1000                    #output voltage(V) 
RTH=2*RC                           #Thevenin resistance(Ohm)
VL=(RL/(RL+RTH))*Vout              #load voltage(V)

print 'Load voltage VL = ',VL,'V'
Load voltage VL =  1.5 V

Example 17-14, Page 652

In [69]:
RL=15.0                            #load resistance as per previous example(Ohm)
VL=3                               #load voltage as per previous example(V)

iL=VL/RL                           #load current(mA)

print 'Load current iL = ',iL,'mA'
Load current iL =  0.2 mA