##Ex10_1
import math
Av = 80.##voltage gain
beta = 0.001##feedback ratio
print'%s %.2f %s'%("Av = ",(Av),"")
print'%s %.4f %s'%("beta = ",(beta),"")
Avf = Av/(1+beta*Av)##gain with negative feedback
print'%s %.2f %s'%("Avf = Av/(1+beta*Av) = ",(Avf),"")
##Ex10_2
import math
Av = 50.##voltage gain
beta = 0.01##feedback ratio
BW = 100.*10**3##bandwidth
print'%s %.2f %s'%("Av = ",(Av),"")
print'%s %.2f %s'%("beta = ",(beta),"")
print'%s %.2f %s'%("Bandwidth = ",(BW),"Hz")
Avf = Av/(1+beta*Av)##gain with negative feedback
print'%s %.2f %s'%("Avf = Av/(1+beta*Av) = ",(Avf),"")
BWf = BW*(1+beta*Av)##bandwidth with negative feedback
print'%s %.2f %s'%("(B.W)f = ",(BWf),"Hz")
## note : using variable "BW" instad of "B.W" ... as, if using B.W the software takes it as a function.
## similarly using "BWf" instead of (B.W)f.
##Ex10_3
import math
Av = 200.## voltage gain
D = 0.05## harmonic distortion in amplifier
Df = 0.02##final reduced distortion
beta = (D/Df-1.)/Av##feedback gain
print'%s %.2f %s'%("Av = ",(Av),"")
print'%s %.2f %s'%("D = ",(D),"")
print'%s %.2f %s'%("Df = ",(Df),"")
print'%s %.2f %s'%("beta = (D/Df - 1)/Av = ",(beta),"")
print'%s %.2f %s'%("beta = ",(beta*100.),"%")
##Ex10_4
import math
Av1 = 100.##initial voltage gain
beta = 0.001##feedback ratio
print'%s %.2f %s'%("Av1 = ",(Av1),"")
print'%s %.4f %s'%("beta = ",(beta),"")
Af1 = Av1/(1+beta*Av1)##initial gain with negative feedback
print'%s %.2f %s'%("Af1 = Av1/(1+beta*Av1) = ",(Af1),"")
Av2 = 150.##final voltage gain
beta = 0.001##feedback ratio
print'%s %.2f %s'%("Av2 = ",(Av2),"")
print'%s %.4f %s'%("beta = ",(beta),"")
Af2 = Av2/(1+beta*Av2)##final gain with negative feedback
print'%s %.2f %s'%("Af2 = Av2/(1+beta*Av2) = ",(Af2),"")
change_in_gain = Af2 - Af1##required change in gain
print'%s %.2f %s'%("change in gain required = Af2 - Af1 = ",(change_in_gain),"")
delta_Avf = change_in_gain/Af1
print'%s %.2f %s'%("delta_Avf = Af2-Af1/Af1 = ",(delta_Avf),"%")
##Ex10_5
import math
Av = 40.##voltage gain in decibles
print'%s %.2f %s'%("Av = ",(Av),"dB")
Av = 10**(Av/20.)##voltage gain in V/V
print'%s %.2f %s'%("Av = ",(Av),"")
Avf = 20##voltage gain with negative feedback in decibles
print'%s %.2f %s'%("Avf = ",(Avf),"dB")
Avf = 10^(Avf/20)##voltage gain with negative feedback in V/V
print'%s %.2f %s'%("Avf = ",(Avf),"")
beta = ((Av/Avf)-1)/Av##feedback ratio
print'%s %.2f %s'%("beta = (Av/Avf - 1)/Av = ",(beta),"")
## note: solution in the textbook for the above problem is wrong.
##Ex10_6
import math
Av = 100.##voltage gain
beta = 0.05##feedback ratio
BW = 400.*10**3 ##bandwidth
print'%s %.2f %s'%("Av = ",(Av),"")
print'%s %.2f %s'%("beta = ",(beta),"")
print'%s %.2f %s'%("B.W. = ",(BW),"Hz")
Af = Av/(1+beta*Av)##gain with negative feedback
print'%s %.2f %s'%("Af = Av/(1+beta*Av) = ",(Af),"")
BWf = BW*(1+beta*Av)##bandwidth with negative feedback
print'%s %.2f %s'%("(B.W)f = ",(BWf),"Hz")
## note : using variable "BW" instad of "B.W" ... as, if using B.W the software takes it as a function.
## similarly using "BWf" instead of (B.W)f.
##Ex10_7
import math
Po = 100.##output power
RL = 10.##load resistance
print'%s %.2f %s'%("Po = ",(Po),"W")
print'%s %.2f %s'%("RL = ",(RL),"ohm")
vo = (RL*Po)**0.5##output voltage
vi = 2##input voltage
print'%s %.2f %s'%("vo = (Rl*Po)^0.5 = ",(vo),"V")
print'%s %.2f %s'%("vi = ",(vi),"V")
Av = vo/vi##voltage gain
print'%s %.2f %s'%("Av = vo/vi = ",(Av),"")
D = 0.04## harmonic distortion in amplifier
Df = 0.0002##distortion after feedback
beta = (D/Df-1.)/Av##feedback gain
print'%s %.2f %s'%("D = ",(D),"")
print'%s %.4f %s'%("Df = ",(Df),"")
print'%s %.2f %s'%("beta = (D/Df - 1)/Av = ",(beta),"")
##Ex10_8
import math
BW = 500.*10**3##bandwidth
A = 200.##gain of amplifier
BWf = 2.*10**6##bandwidth with negative feedback
print'%s %.2f %s'%("B.W = ",(BW),"HZ")
print'%s %.2f %s'%("A = ",(A),"")
print'%s %.2f %s'%("(B.W)f = ",(BWf),"Hz")
beta = ((BWf/BW)-1)/A##feedback ratio
print'%s %.2f %s'%("beta = ((B.W)f/B.W - 1)/A = ",(beta),"")
print'%s %.2f %s'%("beta = ",(beta*100.),"%")
## note : using variable "BW" instad of "B.W" ... as, if using B.W the software takes it as a function.
## similarly using "BWf" instead of (B.W)f.
##Ex10_9
import math
A = 150.##gain of amplifier
beta = 0.05##feedback ratio
print'%s %.2f %s'%("A = ",(A),"")
print'%s %.2f %s'%("beta = ",(beta),"")
Af = A/(1.+beta*A)##gain with negative feedback
print'%s %.2f %s'%("Af = A/(1+beta*A) = ",(Af),"")
fL = 20*10^3##lower 3dB frequency
fU = 160*10^3##upper 3dB frequency
print'%s %.2f %s'%("fL = ",(fL),"Hz")
print'%s %.2f %s'%("fU = ",(fU),"Hz")
fLf = fL/(1.+beta*A)##lower 3dB gain with negative feedback
print'%s %.2f %s'%("fLf = fL/(1+beta*A) = ",(fLf),"Hz")
fUf = fU*(1+beta*A)##upper 3dB gain with negative feedback
print'%s %.2f %s'%("fUf = fU*(1+beta*A) = ",(fUf),"Hz")
##Ex10_10
import math
##parameters of emitter follower circuit:
hie = 1.1*10**3##input resistance
hfe = 80.##current gain
hoe = 2.*10**-5##output conductance
Re = 2.2*10**3##emitter resistance
print'%s %.2f %s'%("hie = ",(hie),"ohm")
print'%s %.2f %s'%("hfe = ",(hfe),"")
print'%s %.2e %s'%("hoe = ",(hoe),"mho")
print'%s %.2f %s'%("Re = ",(Re),"ohm")
gm = hfe/hie
Rif = hie*(1.+gm*Re)##input resistance with feedback
print'%s %.2f %s'%("Rif = hie*(1+gm*Re) = ",(Rif),"ohm")
Rof = hie/(1.+hfe)##output resistance with feedback
print'%s %.2f %s'%("Rof = hie/(1+hfe) = ",(Rof),"ohm")
Avf = gm*Re/(1+gm*Re)##voltage gain with negative feedback
print'%s %.2f %s'%("Avf = gm*Re/(1+gm*Re) = ",(Avf),"")