Chapter12-Feedback and Stability

Ex1-pg732

In [1]:
import math

##Example 12.1
A=10**5;##open loop gain
Af=50.;##closed loop gain
b=(A/Af-1.)/A;
print"%s %.2f %s"%('\nfeedback transfer function=\n',b,'')
A=-10**5;
Af=-50.;
b=(A/Af-1.)/A;
print"%s %.2f %s"%('\nfeedback transfer function=\n',b,'')
feedback transfer function=
 0.02 

feedback transfer function=
 -0.02 

Ex2-pg733

In [2]:
import math

##Example 12.2
A=10**5;
Af=50.;
b=0.019999;
dA=10**4;
dAf=Af*dA/(A*(1.+b*A));
print"%s %.2e %s"%('\ndAf ',dAf,'\n')
##x=dAf/Af
x=dAf/Af;
x=x*100.;
print"%s %.2e %s"%('\npercent change dAf/Af= ',x,'\n')
dAf  2.50e-03 


percent change dAf/Af=  5.00e-03 

Ex3-pg735

In [3]:
import math

##Example 12.3
Ao=10**4;
wh=2.*math.pi*100.;##rad/s
Af=50.;
##x=(1+bAo)
x=Ao/Af;
print"%s %.2f %s"%('\n(1+bAo)=\n',x,'')
wfh=wh*x;
print"%s %.2f %s"%('\nclosed loop bandwidth=\n',wfh,'')
(1+bAo)=
 200.00 

closed loop bandwidth=
 125663.71 

Ex5-pg742

In [4]:
import math
 
##Example 12.5
Av=10**5;
Avf=50.;
Rf=10.;##Kohm
Ro=20000.;##Ohm
##x=(1+bvAv)
x=Av/Avf;
print"%s %.2e %s"%('\n(1+bvAv)=\n',x,'')
Rif=Rf*x;
Rif=Rif*0.001;##MOhm
print"%s %.2f %s"%('\ninput resistance= ',Rif,' MOhm\n')
Rof=Ro/x;
print"%s %.2f %s"%('\noutput resistance= ',Rof,' Ohm\n')
(1+bvAv)=
 2.00e+03 

input resistance=  20.00  MOhm


output resistance=  10.00  Ohm

Ex6-pg745

In [1]:
import math

##Example 12.6
Af=10**5;
Aif=50.;
Rf=10000.;
Ro=20.;
##x=(1+biAi)
x=Af/Aif;
print"%s %.2e %s"%('\n(1+biAi)=\n',x,'')
Rif=Rf/x;
print"%s %.2f %s"%('\ninput resistance =  ',Rif,'Ohm\n')
Rof=Ro*x;
Rof=Rof*0.001;##Mohm
print"%s %.2f %s"%('\noutput resistance= ',Rof,' MOhm\n')
(1+biAi)=
 2.00e+03 

input resistance =   5.00 Ohm


output resistance=  40.00  MOhm

Ex7-pg751

In [2]:
import math

##Example 12.7
Ri=50.;
R1=10.;
R2=90.;
Av=10**4;
bv=1./(1.+R2/R1);
print"%s %.2f %s"%('\nfeedback transfer function=\n',bv,'')
Rif=Ri*(1.+bv*Av);
Rif=Rif*0.001;##Mohm
print"%s %.2f %s"%('\ninput resistance= ',Rif,' MOhm\n')
feedback transfer function=
 0.10 

input resistance=  50.05  MOhm

Ex11-pg765

In [3]:
import math
 
##Example 12.11
hFE=100.;##transistor parameter
Vbe=0.7;
Vcc=10.;
R1=55.;
R2=12.;
Re=1.;
Rc=4.;
Rl=4.;
Icq=0.983;
Vceq=5.08;
Vt=0.026;
r=hFE*Vt/Icq;
print"%s %.2f %s"%('\nsmall signal parameter resistance= ',r,' KOhm\n')
gm=Icq/Vt;
print"%s %.2f %s"%('\ntransconductance= ',gm,' mA/V\n')
Agf=-gm*(Rc/(Rc+Rl))/(1.+Re*(gm+1./r));
print"%s %.2f %s"%('\ntransconductance transfer function= ',Agf,' mA/V\n')
##as first approximation
Agf2=-1./Re;
print"%s %.2f %s"%('\nAgf= ',Agf2,' mA/V\n')
Avf=Agf*Rl;
print"%s %.2f %s"%('\nvoltage gain=\n',Avf,'')
small signal parameter resistance=  2.64  KOhm


transconductance=  37.81  mA/V


transconductance transfer function=  -0.48  mA/V


Agf=  -1.00  mA/V


voltage gain=
 -1.93 

Ex15-pg777

In [8]:
import math

##Example 12.15
##Determine the loop gain fig12.45(a)
hFE=100.;
Vbe=0.7;
Icq=0.492;
r=5.28;
gm=18.9;
Rs=10.;
R1=51.;
R2=5.5;
Re=0.500;
Rc=10.;
Rf=82.;
x=r*R2/(r+R2);
y=R1*x/(x+R1);
t=Rs*y/(y+Rs);
Req=t;
print"%s %.2f %s"%('\nequivalent resistance ',t,' KOhm\n')
T=gm*Rc*Req/(Rc+Rf+Req);
print"%s %.2f %s"%('\nthe loop gain=\n',T,'')
equivalent resistance  2.04  KOhm


the loop gain=
 4.09 

Ex19-pg791

In [9]:
import math

##Example 12.19
##T=b*100/(sqrt(1+(f/10^5)^2) angle=-3tan^-1(f/10^5)
##stable at f180 at which phase becomes -180 degrees
##-3*atan(f180/10^5)=-180
f180=math.tan(60/57.3)*10**5;
print"%s %.2f %s"%('\nfrequency at -180 degree= ',f180,'f Hz\n')
b=0.2;
T=b*100./(math.sqrt(1.+(f180/10**5)**2))**3;
print"%s %.2f %s"%('\nmagnitude of the loop gain=\n',T,'')
b=0.02;
T=b*100./(math.sqrt(1.+(f180/10**5)**2))**3;
print"%s %.2f %s"%('\nmagnitude of the loop gain=\n',T,'')
frequency at -180 degree=  173174.23 f Hz


magnitude of the loop gain=
 2.50 

magnitude of the loop gain=
 0.25 

Ex22-pg798

In [10]:
import math

##Example 12.22
Ao=10**6;
fPD=0.010;##KHz
b=0.01;
Af=Ao/(1.+b*Ao);
print"%s %.2f %s"%('\nlow frequency closed loop gain=\n',Af,'')
fc=fPD*(1.+b*Ao);
print"%s %.2f %s"%('\nclosed loop 3dB frequency= ',fc,' KHz\n')
low frequency closed loop gain=
 99.99 

closed loop 3dB frequency=  100.01  KHz

Ex23-pg799

In [11]:
import math

##Example 12.23
A=10**3;
Cf=30.*10**-12;##feedback capacitor (F)
R2=5.*10**5;
Cm=Cf*(1.+A);
print"%s %.2e %s"%('\nMiller capacitance= ',Cm,' F\n')
fp=1/(2.*math.pi*R2*Cm);
print"%s %.2f %s"%('\ndominant pole frequency = ',fp,'Hz\n')
Miller capacitance=  3.00e-08  F


dominant pole frequency =  10.60 Hz