Chapter 6 : Feedback

Example 6.1, Page No. 409

In [1]:
# Gain

import math
#Variable declaration
a=60.0                     # OPEN LOOP VOLTAGE GAIN IN dB
A= 10**(a/20)              # open voltage gain
Beta= (1.0/20)             # feedback ratio

#Calculations
Af= (A/(1+(Beta*A)))       # GAIN WITH FEEDBACL
AfdB= 20*(math.log10(Af))  # gain with feedback in dB


#Result
print("Gain with feedback is %.2f dB"%AfdB)
Gain with feedback is 25.85 dB

Example 6.2, Page No.409

In [3]:
#  feedback factor

import math
#Variable declaration
a=60.0             # OPEN LOOP VOLTAGE GAIN IN dB
A= 10**(a/20)      # open voltage gain
AfdB=40.0          # gain with feedback in dB

#Calculations
Af= 10**(AfdB/20)  # GAIN WITH FEEDBACK
BetaA= (A/Af)-1    # feedback factor

#Result
print("feedback factor is %.f"%BetaA)
feedback factor is 9

Example 6.3, Page No.409

In [3]:
# feedback output

import math
#Variable declaration
A= 600.0           # open voltage gain
Af=50.0

#Calculations
Beta=( (A/Af)-1)/A # feedback ratio
fop= (Beta*100)    # percentage of output voltage which is fedback to the input is 

#Result
print("Percentage of output voltage which is fedback to the input is %.3f%%"%fop)
Percentage of output voltage which is fedback to the input is 1.833%

Example 6.4, Page No. 410

In [4]:
# feedback ratio

import math
#Variable declaration
Vo= 5.0              # output voltage
Vin=0.1              # input voltage without feedback
Vin1=0.2             # input voltage with feedback

#Calculations
A= Vo/Vin            # Gain without feedback
Af= Vo/Vin1          # Gain with feedback
Beta=( (A/Af)-1)/A   # feedback ratio 

#Result
print("feedback ratio = %.2f"%Beta)
feedback ratio = 0.02

Example 6.5, Page No.410

In [6]:
# Change in gain

import math
#Variable declaration
A= 1000.0               # open loop voltage gain
Beta= 0.002             # feedback ratio

#Calculations
Af= (A/(1+(Beta*A)))    # GAIN WITH FEEDBACL
A1= (1-0.15)*A          # new open loop voltage gain
Af1= (A1/(1+(Beta*A1))) # GAIN WITH FEEDBACL
dA=((Af-Af1)/Af)*100    # Change in overall gain in percentage 

#Result
print("Change in overall gain is %.1f%%"%dA)
Change in overall gain is 5.6%

Example 6.6, Page No. 414

In [10]:
# open loop voltage gain

import math
#Variable declaration
Af= 100.0             # GAIN WITH FEEDBACK
dAf=1.0/100           # OPEN LOOP VOLTAGE GAIN 
dA= 10.0/100          # open voltage gain

#Calculations
BetaA=(dA/dAf)-1      # feedback factor
A=Af*(1+BetaA)        # open loop voltage gain

#Result
print("open loop voltage gain is %.f"%A)
open loop voltage gain is 1000

Example 6.7, Page No.415

In [12]:
# open loop voltage gain & negaive feedback

import math
#Variable declaration
Af= 100.0            # GAIN WITH FEEDBACK
dAf=0.1/100          # OPEN LOOP VOLTAGE GAIN 
dA= 10.0/100         # open voltage gain

#Calculations
BetaA=(dA/dAf)-1     # feedback factor
A=Af*(1+BetaA)       # open loop voltage gain
NF= Af/A             # amount of negative feedback

#Result
print("open loop voltage gain is %.f"%A)
print("amount of negative feedback is %.2f"%NF)
open loop voltage gain is 10000
amount of negative feedback is 0.01

Example 6.8, Page No. 416

In [14]:
# GAIN,INPUT VOLTAGE AND OUTPUT VOLTAGE

import math
#Variable declaration
Vs=10.0                # output voltage in milli volts
Vi= 0.01               # input voltage in volts
A=200.0                # amplifier gain without feedback
D=0.1                  # distortion without feedback
Df=0.01                # distortion with feedback

#Calculations
Beta=( (D/Df)-1)/A     # feedback ratio
fop= (Beta*100)        # percentage of output voltage which is fedback to the input is 
Af= (A/(1+(Beta*A)))   # GAIN WITH FEEDBACL
Vo= Af*Vs*10**-3       # new output volate in volts
Vin= (Vi +(-Beta*Vo))*10**3

#Resut
print("gain with feedback = %.f"%Af)
print("new output volate  = %.1f V"%Vo)
print("new input voltage  = %.f mV"%Vin)
gain with feedback = 20
new output volate  = 0.2 V
new input voltage  = 1 mV

Example 6.9, Page No.417

In [9]:
# INPUT VOLTAGE ,distortion AND close loop gain

import math
#Variable declaration
Vs=10.0                 # output voltage in milli volts
A=1000.0                # amplifier gain without feedback
D=0.1                   # distortion without feedback
BetaAd=40.0             # FEEDBACK FACTOR IN dB

#Calculations
BetaA=10**(BetaAd/20)   # feedback ratio
Df= ((D/(1+BetaA)))*100 # distortion in percentage with feedbck
Af= (A/(1+(BetaA)))     # GAIN WITH FEEDBACL
Vo= Vs*(1+BetaA)*10**-3 # new output volate in volts

#Result
print("input signal voltage  = %.2f V"%Vo)
print("Percentage second harmonic distortion will be %.1f%%"%Df)
print("Closed loop voltage gain will be %.1f"%Af)
input signal voltage  = 1.01 V
Percentage second harmonic distortion will be 0.1%
Closed loop voltage gain will be 9.9

Example 6.10, Page No. 419

In [10]:
# input & output impedance

import math
#Variable declaration
A= 10000.0                 # open voltage gain
Beta=0.02                  # feedback ratio
Zi=1.0                     # input impedance without feedback in kiilo ohms
Zo=10.0                    # output impedance without feedback in kiilo ohms


#calculaltions
Zif= (1+A*Beta)*Zi         # input impedance with feedback in kiilo ohms
Zof=(Zo/(1+Beta*A))*10**3  # output impedance with feedback in  ohms

#Result
print("input impedance with feedback  = %.f k-ohm"%Zif)
print("output impedance with feedback = %.2f ohm"%Zof)
input impedance with feedback  = 201 k-ohm
output impedance with feedback = 49.75 ohm

Example 6.11, Page No. 419

In [12]:
# feedback factor and Change in gain

import math
#Variable declaration
Zi=1.0                  # input impedance without feedback in kiilo ohms
Zo=10.0                 # output impedance without feedback in kiilo ohms
Zof=1.0                 # output impedance with feedback in killo ohms
A= 1000.0               # open loop voltage gain
Af=100.0                # FEEDBACK


#Calculations
Beta=( (Zo/Zof)-1)/A    # feedback ratio
BetaA= Beta*A           # feedback factor
A1= (1-0.1)*A           # new open loop voltage gain
Af1= (A1/(1+(Beta*A1))) # GAIN WITH FEEDBACL
dA=((Af-Af1)/Af)*100    # Change in overall gain in percentage 


#Result
print("feedback factor is %.f"%BetaA)
print("Change in overall gain in percentage is %.1f%%"%dA)
feedback factor is 9
Change in overall gain in percentage is 1.1%

Example 6.12, Page No.421

In [14]:
# Avf,Fhf,Flf

import math
#Variable declaration
Fh=20.0                  # upper cutoff frequency in killo hertz without feedback
Fl=30.0                  # upper cutoff frequency in hertz without feedback
Av= 50000.0              #  open loop voltage gain
Beta=5*10**-5            # feedback ratio

#calaculations
Avf= (Av/(1+(Beta*Av)))  # GAIN WITH FEEDBACL
Fhf=Fh*(1+Av*Beta)       # uppor cutoff frequency with feedback in killo hertz
Flf=Fl/(1+Av*Beta)       # lower cutoff frequency with feedback in hertz

#Result
print("Voltsge gain with feedback is %.1f"%Avf)
print("uppor cutoff frequency with feedback = %.f kHz"%Fhf)
print("lower cutoff frequency with feedback = %.2f Hz"%Flf)
Voltsge gain with feedback is 14285.7
uppor cutoff frequency with feedback = 70 kHz
lower cutoff frequency with feedback = 8.57 Hz

Example 6.13, Page No. 422

In [24]:
# feedback factor and bandwidth

import math
#Variable declaration
B=4.0               # bandwidth in mega hertz without feedback
Av= 1500.0          # open loop voltage gain
Avf= 150.0          # GAIN WITH FEEDBACk

#Calculations
AvB= ((Av/Avf)-1)   # feedback factor
BWf=(1+AvB)*B       # bandwidth in mega hertz with feedback


#Result
print("feedback factor is %.f"%AvB)
print("bandwidth with feedback is %.f MHz"%BWf)
feedback factor is 9
bandwidth with feedback is 40 MHz

Example 6.14, Page No. 424

In [16]:
# voltage gain ,input & output resistance

import math
#Variable declaration
A= 500.0           # open voltage gain
Beta=0.01          # feedback ratio
Ri=3.0             # input resistance without feedback in kiilo ohms
Ro=20.0            # output resistance without feedback in kiilo ohms


#Calculations
Af=(A/(1+A*Beta))  # Voltage gain is
Rif= (1+A*Beta)*Ri # input RESISTANCE with feedback in kiilo ohms
Rof=(Ro/(1+Beta*A))# output resistance with feedback in killo ohms

#Result
print("Voltage gain is %.2f"%Af)
print("input resistance with feedback  = %.f k-ohm"%Rif)
print("output resistance with feedback = %.2f k-ohm"%Rof)
Voltage gain is 83.33
input resistance with feedback  = 18 k-ohm
output resistance with feedback = 3.33 k-ohm

Example 6.15, Page No. 428

In [17]:
# INPUT IMPEDANCE

import math
#Variable declaration
Beta=100.0                  #  gain
Rl=18.6                     # load resistance in killo ohms
Re=9.3                      # emitter resistance in killo ohms
Vbe=0.7 
Vcc=10.0                    # collector voltage in volts
R1=10.0                     # resistance in killo ohms
R2=10.0                     # resistance in killo ohms

#Calculations
V2= Vcc*(R2/(R1+R2))        # voltage at resistor R2 
Ve=V2-Vbe                   # volate at emitter
Ie=Ve/Re                    # Emitter current in milli ampere
re=(25/Ie)                  # AC emitter resistance
Re=(Rl*Re)/(Rl+Re)          # effective emitter resistance in killo ohms
Zib=Beta*(Re*10**3+re)*10**-3
x=(R1*R2)/(R1+R2)           # resistance in killo ohms
Zi=(Zib*x)/(Zib+x)          # input impedance of the emitter follower in killo ohms

#Result
print("input impedance of the emitter follower  = %.2f k-ohm"%Zi)
input impedance of the emitter follower  = 4.96 k-ohm

Example 6.16, Page No. 429

In [31]:
# gain

import math
#Variable declaration
gm=4000.0                # gain in micro second
Ro=10.0                  # output resistance in killo ohms
Rd=10.0                  # resistance in killo ohms
R1=80.0                  # resistance in killo ohms
R2=20.0                  # resistance in killo ohms

#Calculations
Rl=(Ro*Rd)/(Ro+Rd)       # load resistance in killo ohms
A= -(gm*10**-6*Rl*10**3) # gain without feedback
Beta= -(R2/(R1+R2))      # feedback factor
Af=(A/(1+A*Beta))        # gain with feedback

#Result
print("gain without feedback is %.f"%A)
print("gain with feedback is %.f"%Af)
gain without feedback is -20
gain with feedback is -4

Example 6.17, Page No. 430

In [34]:
# gain

import math
#Variable declaration
R1=1.8             # resistance in killo ohms
R2=0.2             # resistance in killo ohms
A=100000.0         # gain without feedback

#Calculations
Beta= (R2/(R1+R2)) # feedback factor
Af1=(A/(1+A*Beta)) # gain with feedback
Af=(1/Beta)        # AS A*Beta>>1

#Result
print("gain with feedback AS A*Beta>>1 is %.f"%Af)
gain with feedback AS A*Beta>>1 is 10

Example 6.18, Page No. 431

In [24]:
# Av,Rif,Avf,Rof

import math
#Variable declaration
Rs=600.0                # Internal resistance in ohms
Rl=2.0                  # Load resistance in killo ohms'
Rb=40.0                 # base resistance in killo ohms
# H-paramters are
hie=5.0                 # in killo ohms
hre=80.0
hfe=80.0

#Calculations
RL1=(Rb*Rl)/(Rb+Rl)     
Av=(-(hfe*(RL1*10**3/hie*10**3)))*10**-6
Av = math.floor(Av*100)/100
x=(Rb*10**3/(1-Av)) 
Rif= (hie*10**3*x)/(hie*10**3+x)
Avf=(Av*Rif)/(Rif+Rs)
Rof=((Rb*10**3*(Rs+hie*10**3))/(Rs*hfe))*10**-3
Rof1=(Rof*Rl)/(Rof+Rl)


#Result
print("Voltage gain is %.2f"%Av)
print("input resistance with feedback = %.3f ohm"%(math.ceil(Rif*1000)/1000))
print("Overall Voltage gain is %.2f"%Avf)
print("output resistance with feedback = %.1f k-ohm"%Rof1)
Voltage gain is -30.48
input resistance with feedback = 1013.172 ohm
Overall Voltage gain is -19.14
output resistance with feedback = 1.4 k-ohm

Example 6.19, Page No. 435

In [29]:
# A,Beta,Rif,Af amd loop gain

import math
#Variable declaration
R1=1.0                              # resistance in killo ohms
R2=20.0                             # resistance in killo ohms
Re=100.0                            # emitter resistance in  ohms
# H-paramters are
hie=2.0                             # in killo ohms
hfe=80.0
Rl=1.0                              # load resistance in killo ohms

#Calculations
Ri=hie                              # input resistance in killo ohms
A= -(hfe*Rl*10**3)/(hie*10**3) 
Beta=Re/(Rl*(10**3))                # GAIN
Rif= (hie*10**3+(1+hfe)*Re)*10**-3  # input resistance with feedback in killo ohms
Av=(-(hfe*(Rl*10**3/Rif*10**3)))*10**-6
BetaA= Beta*A                       # loop gain
BetaAd= 20*(math.log10(-BetaA))     # loop gain in dB

#Result
print("Voltage gain without feedback is %.f"%A)
print("Feedback ratio is given by %.1f"%Beta)
print("input resistance with feedback = %.1f k-ohm"%Rif)
print("Voltage gain with feedback is %.2f"%Av)
print("loop gain is %.2f dB"%BetaAd)
Voltage gain without feedback is -40
Feedback ratio is given by 0.1
input resistance with feedback = 10.1 k-ohm
Voltage gain with feedback is -7.92
loop gain is 12.04 dB

Example 6.20, Page No. 436

In [30]:
# voltage gain

import math
#Variable declaration
re=7.5             # A.C. Resistance
R1=470.0           # resistance in  ohms
Rc=2.2             # resistance in killo ohms
Re=510.0           # emitter resistance in  ohms
# H-paramters are
hie=900.0          # in  ohms
hfe=120.0

#Calculations
A=-(hfe)/(hie+Re)  # gain without feedback
Beta=-Re           # gain
GF= (1+A*Beta)     # gain factor
Af=A/(GF)          # GAIN WITH FEEDBACK
Avf= Af*Rc*10**3   # voltage gain with feedback
Av= -(Rc*10**3/re) # voltage gain without feedback

#Result
print("voltage gain with feedback is %.1f"%Avf)
print("voltage gain without feedback is %.1f"%Av)
voltage gain with feedback is -4.2
voltage gain without feedback is -293.3

Example 6.21, Page No. 436

In [32]:
# change in overall gain

import math
#Variable declaration
Beta=0.01                # feedback
Ad= 60.0                 # gain in dB
dA= 11.0                 # open voltage gain


#Calculations
A= 10**(Ad/20)           # gain
dAf= (1/(1+Beta*A))*dA   # GAIN WITH FEEDBACK

#Result
print("change in overall gain is = %.f %%"%dAf)
print("\nThe result clearly shows that the %% change reduction in overall gain")
print("with negative feedback is reduced from 11%% to 1%%.")
print("That is why we say that amplifier with negative feedback have stable gain.")
change in overall gain is = 1 %

The result clearly shows that the %% change reduction in overall gain
with negative feedback is reduced from 11%% to 1%%.
That is why we say that amplifier with negative feedback have stable gain.

Example 6.22, Page No. 437

In [46]:
# input impedence with feedback

import math
#Variable declaration
A= 1000.0             # open voltage gain
Beta=0.005            # feedback ratio
Zi=2.0                # input impedance without feedback in kiilo ohms

#Calculations
Zif= (1+A*Beta)*Zi    # input impedance with feedback in kiilo ohms

#Result
print("input impedance with feedback = %.f k-ohm"%Zif)
input impedance with feedback = 12 k-ohm

Example 6.23, Page No.437

In [33]:
# feedback factor and change in overall gain

import math
#Variable declaration
Zo=12.6                   # output impedance in killo ohms
Zofb=600.0                # output impedance in ohms with feedback
Ad= 60.0                  # gain in dB
dA= 10.0                  # open voltage gain

#Calcualtions
A= 10**(Ad/20)            # gain
Beta= ((Zo*10**3/Zofb)-1)/A
dAf= (1/(1+Beta*A))*dA    # GAIN WITH FEEDBACK

#Result
print("feedbck factor is %.2f"%Beta)
print("change in overall gain = %.3f %%"%dAf)
feedbck factor is 0.02
change in overall gain = 0.476 %

Example 6.24, Page No. 437

In [51]:
# feedback fration ,overall voltage gain and output voltage

import math
#Variable declaration
A=5000.0               # gain wtihout feedback
R1=1.0                 # resistance in killo ohms
R2=9.0                 # resistance in killo ohms
Vs=2.0                 # input voltage without feedback in milli volts

#Calcualtions
Beta= R1/(R1+R2)       # feedback fraction
Afb=round(A/(1+Beta*A))
Vo= round(Afb*Vs)      # output voltage with feedback in milli volts

#Result
print("feedback fraction            = %.1f"%Beta)
print("overall voltage gain         = %.f"%Afb)
print("output voltage with feedback = %.f mV"%Vo)
feedback fraction            = 0.1
overall voltage gain         = 10
output voltage with feedback = 20 mV

Example 6.25, Page No. 438

In [34]:
# feedback fraction ,overall voltage gain,input impedance  ,output impedance and output volatge

import math
#Variable declaration
Zi=5.0                            # input impedance in killo ohms
Zo=100.0                          # input impedance in  ohms
A=10000.0                         # gain wtihout feedback
R1=2.0                            # resistance in killo ohms
R2=18.0                           # resistance in killo ohms
Vs=10.0                           # input voltage without feedback in milli volts

#Calculations
Beta= R1/(R1+R2)                  # feedback fraction
Afb=round(A/(1+Beta*A))           # overall gain
Zif= round((1+A*Beta)*Zi*10**-3)  # input impedance with feedback in mega ohms
Zof= Zo/(1+Beta*A)                # OUTPUT impedance with feedback in  ohms
Vo= round(Vs/Afb)                 # output voltage with feedback in milli volts

#Result
print("feedback fraction             = %.1f"%Beta)
print("overall voltage gain          = %.f"%Afb)
print("input impedance with feedback = %.f M-ohm"%Zif)
print("output impedance with feedback= %.1f ohm"%Zof)
print("output voltage with feedback  = %.f mV"%Vo)
feedback fraction             = 0.1
overall voltage gain          = 10
input impedance with feedback = 5 M-ohm
output impedance with feedback= 0.1 ohm
output voltage with feedback  = 1 mV

Example 6.26, Page No. 438

In [37]:
# Gain

import math
#Variable declaration
a=60.0                  # OPEN LOOP VOLTAGE GAIN IN dB
A= 10**(a/20)           # open voltage gain
Beta=0.009              # feedback ratio

#Calculations
Af= (A/(1+(Beta*A)))    # GAIN WITH FEEDBACL
AfdB= 20*(math.log10(Af))# gain with feedback in dB

#Result
print("gain with feedback = %.2f"%AfdB)
#Answer for the gain with feedback is wrong in the book
gain with feedback = 40.00

Example 6.27, Page No. 439

In [40]:
# reduction in distortion

import math
#Variable declaration
a=54.8                # OPEN LOOP VOLTAGE GAIN IN dB
A= 10**(a/20)         # open voltage gain
Beta=0.02             # feedback ratio

#Calculations
Af= (A/(1+(Beta*A)))  # GAIN WITH FEEDBACL
dA= (1/(1+Beta*A))*100# percentage change in distortion 

#Result
print("percentage reduction in distortion is %.2f%%"%(math.floor(dA*100)/100))
percentage reduction in distortion is 8.33%

Example 6.28, Page No. 439

In [49]:
# gain with feedback ,input impedance  and output impedance 

import math
#Variable declaration
Zi=1.0               # input impedance in killo ohms
Zo=40.0              # input impedance in killo ohms
A=10000.0            # gain wtihout feedback
Beta=0.05            # gain

#Calculations
Afb=(A/(1+Beta*A))
Zif= ((1+A*Beta)*Zi)
Zof= (Zo*10**3/(1+Beta*A))

#Result
print("overall voltage gain           = %.f"%Afb)
print("input impedance with feedback  = %.f M-ohm"%Zif)
print("output impedance with feedback = %.f ohms"%Zof)
#Answer in the book for input impedance is wrong
overall voltage gain           = 20
input impedance with feedback  = 501 M-ohm
output impedance with feedback = 80 ohms

Example 6.29, Page No. 439

In [50]:
# bandwidth

import math
#Variable declaration
F2=16.0                   # upper cutoff frequency in killo hertz without feedback
F1=40.0                   # upper cutoff frequency in hertz without feedback
A= 800.0                  # open loop voltage gain
Beta=0.02                 # feedback ratio

#CAlaculations
Afb= (A/(1+(Beta*A)))     # GAIN WITH FEEDBACk
F2f=F2*(1+A*Beta)         # uppor cutoff frequency with feedback in killo hertz
F1f=F1/(1+A*Beta)*10**-3  # lower cutoff frequency with feedback in killo hertz
Bw=F2-F1*10**-3           # bandwidth without feedback in killo hertz
Bwf=round(F2f-F1f)        # bandwidth with feedback in killo hertz

#Result
print("bandwidth without feedback = %.2f kHz"%Bw)
print("bandwidth with feedback    = %.f"%Bwf)
bandwidth without feedback = 15.96 kHz
bandwidth with feedback    = 272

Example 6.30, Page No. 440

In [51]:
# bandwidth

import math
#Variable declaration
BW=10.0                 # bandwidth without feedback in killo hertz
A= 100.0                # open loop voltage gain
Beta=0.1                # feedback ratio

#Calculations
Afb= (A/(1+(Beta*A)))   # GAIN WITH FEEDBACk
Bwf=round(BW*(1+Beta*A))# bandwidth with feedback in killo hertz

#Result
print("feedback gain           = %.2f"%Afb)
print("bandwidth with feedback = %.f kHz"%Bwf)
feedback gain           = 9.09
bandwidth with feedback = 110 kHz

Example 6.31, Page No. 440

In [55]:
# gain and harmonic distortion

import math
#Variable declaration
A2= 200.0            # open loop voltage gain
Beta=0.1             # feedback ratio
D2=0.02              # first stage distortion

#Calculations
D2d= (D2/(1+Beta*A2))*100
A2d=A2/(1+Beta*A2)
A1=round(A2/A2d)

#Result

print("second stage harmonic distortion , A2' %.2f%%"%(D2d*100))
print("gain of first stage, A1 = %.f"%A1)
second stage harmonic distortion , A2' 9.52%
gain of first stage, A1 = 21

Example 6.32, Page No.453

In [57]:
# pole frequency 

import math
#Variable declaration
R2=2*10**5                  # effective resistance in ohms
Av2=1000.0                  # gain of second stage
Cf=20.0                     # feedback capacitor in pico farad

#Calculations
Cm=(1+Av2)*Cf          
fp1= 1/(2*math.pi*R2*Cm*10**-12)

#Result
print("pole frequency = %.2f Hz"%fp1)
pole frequency = 39.75 Hz