#Determine the gain of feedback amplifier
#given
A=100.;#internal gain
B=0.1;#feedback factor
Af=A/(1.+A*B);
print '%s %.2f %s' %("The gain of feedback amplifier =",Af,"\n");
#Determine the gain of feedback amplifier in dB
#given
import math
Ad=60.;#dB #internal gain in dB
A=10.**(Ad/20.); #internal gain
B=1./20.;#feedback factor
Af=A/(1.+A*B);
Afd=20.*math.log10(Af);
print '%s %.2f %s' %("The gain of feedback amplifier =",Afd,"dB");
#Calculate the percentage of output fed back to input
#given
A=600.;#internal gain
Af=50.;#gain of feedback amplifier
B=(A/Af-1.)/A;
print '%s %.3f %s' %("The percentage of output fed back to input =",B*100,"percent");
#Calculate the internal gain and percentage of output fed back to input
#given
Af=80.;#gain of feedback amplifier
Vi=0.05;#V#input with feedback
Vi_=4.*10.**-3.;#V#input without feedback
Vo_=Af*Vi;
A=Vo_/Vi_;
print '%s %.f %s' %("The internal gain is =",A,"\n");
B=(A/Af-1.)/A;
print '%s %.2f %s' %("The percentage of output fed back to input =",B*100,"percent\n");
#Calculate the gain with and without feedback and feedback factor
#given
Vo_=5.;#V #output voltage
Vi=0.2;#V #input with feedback
Vi_=0.05;#V #input without feedback
A=Vo_/Vi_;
Af=Vo_/Vi;
print '%s %.f %s' %("The gain without feedback is =",A,"\n");
print '%s %.f %s' %("The gain with feedback is =",Af,"\n");
B=(A/Af-1.)/A;
print '%s %.f %s' %("The feedback factor =",B*100,"percent\n");
#Calculate the gain of feedback amplifier and feedback factor
#given
A=100.; #internal gain
N=20.;#dB #negative feedback
B=(10.**(-N/(-20.))-1.)/A; #taking antilog
Af=A/(1.+A*B);
print '%s %.f %s' %("The feedback factor =",B*100,"percent\n");
print '%s %.f %s' %("The gain of the feedback amplifier is =",Af,"\n");
#Calculate percentage change in the overall gain
#given
A=1000.;#internal gain
N=40.;#dB#negative feedback
D=10.**((-N)/-20.);#D=(1+AB)desensitivity
dA_A=10.;#percent#dA/A
dAf_Af=dA_A/D;#dAf/Af
print '%s %.1f %s' %("The percentage change in the overall gain =",dAf_Af,"percent");
#Calculate percentage change in the overall gain
#given
Adb=60.;#dB#internal gain in dB
B=0.005;#feedback factor
A=10.**(Adb/(20.));#taking antilog
dA_A=-12.;#percent #dA/A
D=(1.+A*B);#D=(1+AB)desensitivity
dAf_Af=dA_A/D;#dAf/Af
print '%s %.f %s' %("The percentage change in the overall gain reduces by =",-dAf_Af,"percent");
#Determine the input resistance of feedback amplifier
#given
A=250.;#internal gain
B=0.1;#feedback factor
Ri=1.1*10.**3.;#ohm #input resistance
Rif=Ri*(1.+A*B);
print '%s %.1f %s' %("The input resistance of feedback amplifier =",Rif/1000,"kohm");
#The ans in book is incorrect due to use of (2+A*B) instead of (1+A*B) the ans in book is 29.7 kohm
#Calculate the percentage of negative feedback to input
#given
Adb=60.;#dB #internal gain in dB
A=10.**(Adb/(20.)); #taking antilog
Ro=12.*10.**3.;#ohm #output resistance
Rof=600.;#ohm
B=(Ro/Rof-1.)/A;
print '%s %.1f %s' %("The percentage of negative feedback to input =",B*100,"percent");