Part B : Chapter 1 : Amplifiers

Example 1.1 Page no : 1.10

In [2]:
# Variables
Av = 10;				#voltage gain
Ri = 1;				#kohm
Ro = 10;				#ohm
Vs = 2;				#V(Sensor voltage)
Rs = 100;				#ohm(Sensor Resistance)
RL = 50;				#ohm

# Calculations
Vi = Vs*Ri*1000./(Rs+Ri*1000);				#V
Vo = Av*Vi*RL/(Ro+RL);				#V

# Results
print "Output voltage of amplifier(V) : %.1f"%Vo
Output voltage of amplifier(V) : 15.2

Example 1.2 Page no : 1.11

In [3]:
# Variables
Av = 10;				#voltage gain
Ri = 1;				#kohm
Ro = 10;				#ohm
Vs = 2;				#V(Sensor voltage)
Rs = 100;				#ohm(Sensor Resistance)
RL = 50;				#ohm

# Calculations
Vi = Vs*Ri*1000./(Rs+Ri*1000);				#V
Vo = Av*Vi*RL/(Ro+RL);				#V
Av = Vo/Vi;				#voltage gain of circuit

# Results
print "Voltage gain of circuit %.2f"%Av
Voltage gain of circuit 8.33

Example 1.3 Page no :1.11

In [4]:
# Variables
Av = 10.;				#voltage gain
Ro = 0.;				#ohm
Vs = 2.;				#V(Sensor voltage)
Rs = 100.;				#ohm(Sensor Resistance)
RL = 50.;				#ohm

# Calculations
#Vi = Vs*Ri/(Rs+Ri) leads to Vi approximately equals to Vs as Ri = %inf
Vi = Vs;				#V
Vo = Av*Vi*RL/(Ro+RL);				#V

# Results
print "Output voltage of amplifier(V) %.2f"%Vo
Output voltage of amplifier(V) 20.00

Example 1.4 page no : 1.14

In [5]:
# Variables
VOC = 10;				#V(open circuit voltage)
#VOC = source voltage here
R = 1.;				#kohm

# Calculations
ISC = VOC/R;				#mA

# Results
print "Current generated by the circuit(mA) : %.2f"%ISC
Current generated by the circuit(mA) : 10.00

Example 1.5 page no : 1.15

In [6]:
# Variables
Av = 10;				#voltage gain
Ri = 1;				#kohm
Ro = 10;				#ohm
Vs = 2;				#V(Sensor voltage)
Rs = 100;				#ohm(Sensor Resistance)
RL = 50;				#ohm

# Calculations
Vi = Vs*Ri*1000./(Rs+Ri*1000);				#V
Vo = Av*Vi*RL/(Ro+RL);				#V
Po = Vo**2/RL;				#W

# Results
print "Output power(W) : %.2f"%Po
Output power(W) : 4.59

Example 1.6 page no :1.18

In [8]:
# Variables
Av = 10.;				#voltage gain
Ri = 1.;				#kohm
Ro = 10.;				#ohm
Vs = 2.;				#V(Sensor voltage)
Rs = 100.;				#ohm(Sensor Resistance)
RL = 50.;				#ohm

# Calculations
Vi = Vs*Ri*1000/(Rs+Ri*1000);				#V
Vo = Av*Vi*RL/(Ro+RL);				#V
Po = Vo**2/RL;				#W
Pi = Vi**2/Ri;				#mW
Ap = Po*1000/Pi;				#Power gain

# Results
print "Power gain : %.f"%Ap

#Answer in the book is wrong.
Power gain : 1389

Example 1.7 pageno : 1.19

In [9]:
import math 

# Variables
Ap = 1400;				#Power gain

# Calculations
Ap_dB = 10*math.log10(Ap);				#dB

# Results
print "Power gain(dB) : %.2f"%Ap_dB
Power gain(dB) : 31.46

Example 1.8 page no :1.20

In [11]:
import math 

# Variables
Ap1 = 5;				#Power gain

# Calculations and Results
Ap1_dB = 10*math.log10(Ap1);				#dB
print "Power gain of 5 in dB : %.f"%Ap1_dB
Ap2 = 50;				#Power gain
Ap2_dB = 10*math.log10(Ap2);				#dB
print "Power gain of 50 in dB : %.f "%Ap2_dB
Ap3 = 500;				#Power gain
Ap3_dB = 10*math.log10(Ap3);				#dB
print "Power gain of 500 in dB : %.f"%Ap3_dB
Av1 = 5;				#Voltage gain
Av1_dB = 20*math.log10(Av1);				#dB
print "Voltage gain of 5 in dB : %.f"%Av1_dB
Av2 = 50;				#Voltage gain
Av2_dB = 20*math.log10(Av2);				#dB
print "Voltage gain of 50 in dB : %.f"%Av2_dB
Av3 = 500;				#Voltage gain
Av3_dB = 20*math.log10(Av3);				#dB
print "Voltage gain of 500 in dB : %.f"%Av3_dB
Power gain of 5 in dB : 7
Power gain of 50 in dB : 17 
Power gain of 500 in dB : 27
Voltage gain of 5 in dB : 14
Voltage gain of 50 in dB : 34
Voltage gain of 500 in dB : 54

Example 1.10 pageno :1.25

In [12]:
import math 

# Variables
C = 10.;				#micro F
R = 1.;				#kohm

# Calculations and Results
T = C*10**-6*R*1000;				#seconds
print "Time constant(seconds) : %.2f"%T
omega_c = 1/T;				#rads/s
print "omega_c(rads/s) : %.2f"%omega_c
fc = 1./2/math.pi/T;				#Hz
print "fc(Hz) : %.2f"%fc
Time constant(seconds) : 0.01
omega_c(rads/s) : 100.00
fc(Hz) : 15.92

Example 1.11 pageno : 1.28

In [13]:
import math 

#(a)
f = 1;				#kHz
n = 1;				#no. of octave(above)
f1 = f*2**n;				#Hz
print "(a) An octave above 1 kHz (in kHz) =  %.2f"%f1
#(b)
f = 10;				#Hz
n = 3;				#no. of octave(above)
f1 = f*2**n;				#Hz
print "(b) Three octave above 10 Hz (in Hz) =  %.2f"%f1
#(c)
f = 100.;				#Hz
n = 1.;				#no. of octave(below)
f1 = f/2**n;				#Hz
print "(c) An octave below 100 Hz (in Hz) =  %.2f"%f1
#(d)
f = 20;				#kHz
n = 1;				#no. of decade(above)
f1 = f*10**n;				#Hz
print "(d) An decade above 20 Hz (in Hz)  =  %.2f"%f1
#(e)
f = 1.;				#MHz
n = 3;				#no. of decade(below)
f1 = f/10**n;				#Hz
print "(e) Three decade below 1 MHz (in kHz)  =  %.2f"%(f1/1000)
#(f)
f = 50;				#kHz
n = 2;				#no. of decade(above)
f1 = f*10**n;				#Hz
print "(f) Two decade above 50 Hz (in kHz)  =  %.2f"%(f1/1000)
(a) An octave above 1 kHz (in kHz) =  2.00
(b) Three octave above 10 Hz (in Hz) =  80.00
(c) An octave below 100 Hz (in Hz) =  50.00
(d) An decade above 20 Hz (in Hz)  =  200.00
(e) Three decade below 1 MHz (in kHz)  =  0.00
(f) Two decade above 50 Hz (in kHz)  =  5.00

Example 1.12 pageno : 1.30

In [14]:
import math 

# Variables
C = 10.;				#micro F
R = 1.;				#kohm

# Calculations and Results
T = C*10**-6*R*1000;				#seconds
print "Time constant(seconds) : %.2f"%T
omega_c = 1./T;				#rads/s
print "omega_c(rads/s) : %.2f"%omega_c
fc = 1./2/math.pi/T;				#Hz
print "fc(Hz) : %.2f"%fc
Time constant(seconds) : 0.01
omega_c(rads/s) : 100.00
fc(Hz) : 15.92

Example 1.13 pageno : 1.38

In [18]:
import math 

# Variables
Vs = 2.5;				#V
Vn = 1.0;				#mV

# Calculations
SNratio = 20*math.log10(Vs/(Vn/100));				#dB

# Results
print "S/N ratio(dB) : %.f"%SNratio
S/N ratio(dB) : 48

Example 1.13 page no : 1.47

In [19]:
import math 

# Variables
G = 100.;				#stable voltage gain
A = range(100000,200000+1);				#variable gain

# Calculations and Results
B = 1./G;				#Unitless
print ("When the gain of amplifier(A) is 100000");
G1 = min(A)/(1+min(A)*B);				#overall gain
print "The overall gain(G) is :%.2f"%G1
print ("When the gain of amplifier(A) is 200000");
G2 = max(A)/(1+max(A)*B);				#overall gain
print "The overall gain(G) is %.2f"%G2
change = (G2-G1)/G*100;				#% Change in gain
print ("Effect of variable gain :");
print "Corresponding to 100%% Change in gain of active amplifier, Change in overall gain is(%%) :%.2f"%change
When the gain of amplifier(A) is 100000
The overall gain(G) is :99.90
When the gain of amplifier(A) is 200000
The overall gain(G) is 99.95
Effect of variable gain :
Corresponding to 100% Change in gain of active amplifier, Change in overall gain is(%) :0.05

Example 1.14 page no : 1.49

In [21]:
# Variables
A = 10000.;				#stable voltage gain
B = 1/A;				#unitless
#For A = 100000;				#gain
A = 100000;				#gain

# Calculations and Results
G = A/(1+A*B);				#overall gain
print "When the gain of amplifier is 100000, Overall gain will be : %.f"%G
A = 200000.;				#gain
G = A/(1+A*B);				#overall gain
print "When the gain of amplifier is 200000, Overall gain will be : %.f"%G
When the gain of amplifier is 100000, Overall gain will be : 9091
When the gain of amplifier is 200000, Overall gain will be : 9524