import math
#Variables
Av = 400.0 #Voltage gain
beta = 0.1 #feedback ratio
#Calculation
A1v = Av / (1 + beta * Av) #Voltage gain with negative feedback
#Result
print "The voltage gain of an amplifier with negative feedback is ",round(A1v,2),"."
import math
#Variables
Av = 100.0 #Voltage gain
A1v = 20.0 #Voltage gain with negative feedback
#Calculation
beta = (Av/A1v - 1) / Av #feedback ratio
#Result
print "The percentage of the negative feedback is ",beta * 100,"%."
import math
#Variables
Av = 1000.0 #Voltage gain
A1v = 10.0 #Voltage gain with negative feedback
#Calculation
beta = (Av/A1v - 1) / Av #feedback ratio
#Result
print "The fraction of the output that is feedback to the input is ",beta,"."
import math
#Variables
V1o = Vo = 12.5 #Output voltage (in volts)
V1in = 1.5 #Input voltage with feedback (in volts)
Vin = 0.25 #Input voltage without feedback (in volts)
#Calculation
Av = Vo / Vin #Voltage gain without negative feedback
A1v = V1o / V1in #Voltage gain with negative feedback
beta = (Av/A1v - 1) / Av #feedback ratio
#Result
print "The value of voltage gain without negative feedback is ",Av,".\nThe value of voltage gain with negative feedback is ",round(A1v,2),".\nThe value of beta is ",beta,"."
import math
#Variables
Av = 60.0 #Voltage gain
A1v = 80.0 #Voltage gain with negative feedback
#Calculation
beta = (1 - Av/A1v ) / Av #feedback ratio
beta1 = 1/Av #feedback ratio which causes oscillation
#Result
print "Value of feedback ratio is ",round(beta,3),".\nThe percentage of feedback which causes oscillation is ",round(beta1 * 100,1),"%."
import math
#Variables
A1v = 100.0 #Voltage gain with negative feedback
Vin = 50.0 * 10**-3 #Input voltage without feedback (in volts)
V1in = 0.6 #Input voltage with feedback (in volts)
#Calculation
V1o = A1v * V1in #Output voltage with feedback (in volts)
Vo = V1o #Output voltage without feedback (in volts)
Av = Vo / Vin #Voltage gain without feedback
beta = (Av/A1v - 1) / Av #feedback ratio
#Result
print "The value of voltage gain without feedback is ",Av,".\nThe value of voltage gain with feedback is ",A1v,"."
import math
#Variables
Av = 800.0 #Voltage gain
beta = 0.05 #Feedback ratio
dAvbyAv = 20.0 #Percentage change in open loop gain
#Calculation
dA1vbyA1v = 1 / (1 + beta*Av)*dAvbyAv #Percentage change in closed loop gain
#Result
print "The percentage change in closed loop gain is ",round(dA1vbyA1v,1),"%."
import math
#Variables
A1v = 100.0 #Voltage gain with feedback
dA1vbyA1v = 0.01 #Percentage change in closed loop gain
dAvbyAv = 0.20 #Percentage change in open loop gain
#Calculation
betamultAvplus1 = dAvbyAv/dA1vbyA1v #Product of feedback ratio and voltage ratio plus one
Av = A1v * betamultAvplus1 #Voltage gain without feedback
beta = betamultAvplus1 / Av #Feedback ratio
#Result
print "The value of Av is ",Av,".\nThe value of beta is ",beta,"."
import math
#Variables
Av = 100.0 #Voltage gain without feedback
BW = 200.0 * 10**3 #Bandwidth without feedback (in Hertz)
beta = 0.05 #Feedback ratio
BWn = 1.0 * 10**6 #New bandwidth without feedback (in Hertz)
#Calculation
BW1 = (1 + beta*Av) * BW #Bandwidth with feedback (in Hertz)
A1v = Av/(1 + beta*Av) #Voltage gain with feedback
beta1 = (BWn/BW - 1)/Av #Amount of feedback required
#Result
print "The new bandwidth is ",BW1 * 10**-3," kHz.\nThe new gain is ",round(A1v,1),"."
print "Amout of feedback required when BW = 1MHz is ",beta1 * 100,"%."
import math
#Variables
Av = 1500.0 #Voltage gain
BW = 4.0 * 10**6 #Bandwidth wihtout feedback (in Hertz)
A1v = 150.0 #Voltage gain with feedback
#Calculation
beta = (Av/A1v -1) / Av #Feedback ratio
BW1 = (1 + beta*Av) * BW #Bandwidth with feedback (in Hertz)
#Result
print "The value of feedback factor is ",beta * 100,"%.\nThe value of bandwidth with feedback is ",BW1 * 10**-6," MHz."
import math
#Variables
Rin = 4.2 * 10**3 #Input resistance (in ohm)
Av = 220.0 #Voltage gain without feedback
beta = 0.01 #Feedback ratio
f1 = 1.5 * 10**3 #Cut off frequency without feedback (in Hertz)
f2 = 501.5 * 10**3 #Cut off frequency with feedback (in Hertz)
#Calculation
R1i = (1 + beta * Av) * Rin #Input resistance of feedback amplifier (in ohm)
f11 = f1 / (1 + beta * Av) #New cut off frequency without feedback (in Hertz)
f21 = (1 + beta * Av) * f2 #New cut off frequency with feedback (in Hertz)
#Result
print "The value of input resistance with feedback is ",R1i * 10**-3," kilo-ohm.\nNew cut off frequency without feedback is ",round(f11)," Hz.\nNew cut off frequency with feedback is ",f21 * 10**-3," kHz."
import math
#Variables
Av = 1000.0 #Voltage gain without feedback
beta = 0.01 #Feedback ratio
f1 = 50.0 #Cut off frequency without feedback (in Hertz)
f2 = 200.0 * 10**3 #Cut off frequency with feedback (in Hertz)
D = 0.05 #Distortion
#Calculation
A1v = Av / (1 + beta * Av) #Voltage gain with feedback
f11 = f1 / (1 + beta * Av) #New cut off frequency without feedback (in Hertz)
f21 = (1 + beta * Av) * f2 #New cut off frequency with feedback (in Hertz)
D1 = D/(1 + beta * Av) #New Distortion
#Result
print "Voltage gain with feedback is ",round(A1v,1),".\nf11 is ",round(f11,1)," Hz.\nf21 is ",f21 * 10**-6," MHz.\nDistortion with feedback is ",round(D1 * 100,2),"%."
import math
#Variables
Av = 100.0 #Voltage gain without feedback
N = 0.8 #Reduction in noise
#Calculation
beta = ((1 - N)**-1 - 1)/Av #feedback ratio
A1v = Av / (1 + beta * Av) #Voltage gain with feedback
#Result
print "Percentage of negative feedback is ",beta * 100,"%.\nVoltage gain with feedback is ",A1v,"."
import math
#Variables
Av = 300.0 #Voltage gain without feedback
Ri = 1.5 * 10**3 #Input resistance (in ohm)
Ro = 50.0 * 10**3 #Output resistance (in ohm)
beta = 1.0/15.0 #feedback ratio
#Calculation
A1v = Av/ (1 + beta*Av) #Voltage gain with feedback
R1i = (1 + beta* Av)* Ri #Input resistance with feedback (in ohm)
R1o = Ro/(1 + beta * Av) #Output resistance with feedback (in ohm)
#Result
print "Voltage gain with feedback is ",round(A1v,1),".\nInput resistance with feedback is ",R1i * 10**-3," kilo-ohm.\nOutput resistance with feedback is ",round(R1o * 10**-3,1)," kilo-ohm."
import math
#Variables
hfe = 100.0 #hfe
hie = 2.0 * 10**3 #hie (in ohm)
Re1 = 100.0 #Emitter resistance (in ohm)
R1 = 15.0 * 10**3 #Resistance (in ohm)
R2 = 5.6 * 10**3 #Resistance (in ohm)
Rc = 470.0 #Collector resistance (in ohm)
#Calculation
Ai = hfe #Current gain
Av = Ai * Rc / hie #Voltage gain
Ri = (R1*R2*hie)/(R1*R2+R2*hie+R1*hie) #Input resistance (in ohm)
beta = Re1 / Rc #feedback ratio
A1v = Av / (1 + beta * Av) #Voltage ratio with feedback
R1i = Ri*(1 + beta * Av) #Input resistancewith feedback (in ohm)
#Result
print "Voltage gain without feedback is ",Av,".\nInput resistance without feedback is ",round(Ri)," kilo-ohm.\nVoltage gain with feedback is ",round(A1v,2),".\nInput resistance with feedback is ",round(R1i,1)," kilo-ohm."
#Slight variation due to higher precision.
import math
#Variables
hfe = 99.0 #hfe
hie = 2.0 * 10**3 #hie (in ohm)
Rc = 22.0 * 10**3 #Load resistor of frist stage (in ohm)
R4 = 100.0 #Emitter resistance of first stage (in ohm)
R1 = 220.0 * 10**3 #Biasing resistor of second stage (in ohm)
R2 = 22.0 * 10**3 #Biasing resistor of second stage (in ohm)
R1c = 4.7 * 10**3 #Load resistance of second stage (in ohm)
R3 = 7.8 * 10**3 #Feedback resistor from collector of second stage to emitter of first stage (in ohm)
#Calculation
Ri = hie #Input resistance of first stage (in ohm)
Ro1 = (1/Rc + 1/R1 + 1/R2 + 1/hie)**-1 #Output resistance of first stage (in ohm)
Ri2 = hie #Input resistance of second stage (in ohm)
Ro2 = R1c * (R3 + R4)/(R1c + R3 + R4) #Output resistance of second stage (in ohm)
Av1 = hfe * Ro1 / hie #Voltage gain of first stage
Av2 = hfe * Ro2 / hie #Voltage gain of second stage
Av = Av1 * Av2 #Overall voltage gain without feedback
beta = R4 / (R3 + R4) #Feedback ratio
Ri1 = Ri*(1 + beta*Av) #Input resistance with feedback (in ohm)
R1o2 = Ro2 / (1 + beta * Av) #Output resistance with feedback (in ohm)
A1v = Av / (1 + beta * Av) #Overall voltage gain with feedback
#Result
print "Voltage gain without feedback is ",round(Av,1),".\nInput resistance of first stage without feedback is ",Ri * 10**-3," kilo-ohm.\nInput resistance of second stage without feedback is ",Ri2 * 10**-3," kilo-ohm.\nOutput resistance of first stage without feedback is ",round(Ro1 * 10**-3,2)," kilo-ohm.\nOutput resistance of second stage without feedback is ",round(Ro2 * 10**-3,2)," kilo-ohm ."
print "Voltage gain with feedback is ",round(A1v,1),".\nInput resistance with feedback is ",round(Ri1 * 10**-3,2)," kilo-ohm.\nOutput resistance with feedback is ",round(R1o2 * 10**-3,3)," kilo-ohm."
#Calculation error in book about value of Av.