summaryrefslogtreecommitdiff
path: root/Electronic_Principles_/Chapter_16_New.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_Principles_/Chapter_16_New.ipynb')
-rw-r--r--Electronic_Principles_/Chapter_16_New.ipynb113
1 files changed, 0 insertions, 113 deletions
diff --git a/Electronic_Principles_/Chapter_16_New.ipynb b/Electronic_Principles_/Chapter_16_New.ipynb
index 82ef1353..847a3379 100644
--- a/Electronic_Principles_/Chapter_16_New.ipynb
+++ b/Electronic_Principles_/Chapter_16_New.ipynb
@@ -27,23 +27,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.1.py\n",
- "#Amplifier has midband Av of 200, with cutoff frequencies f1=20 Hz, f2=20KHz. \n",
- "#Find voltage gain for 5Hz & 200KHz input frequencies.\n",
"\n",
- "#Variable declaration\n",
"Avm=200 #mid band voltage gain\n",
"f1=20 #cutoff frequency1 (Hz)\n",
"f2=20*10**3 #cutoff frequency2 (Hz)\n",
"fi1=5 #input frequency1(Hz)\n",
"fi2=200*10**3 #input frequency2(Hz)\n",
"\n",
- "#Calculation\n",
"Av=0.707*Avm #voltage gain at either frequency\n",
"Av1=Avm/(1+(f1/fi1)**2)**0.5 #voltage gain for 5Hz\n",
"Av2=Avm/(1+(fi2/f2)**2)**0.5 #voltage gain for 200KHz\n",
"\n",
- "#Result\n",
"print 'voltage gain for 200KHz = ',round(Av1,2)\n",
"print 'voltage gain for 5Hz = ',round(Av2,2)"
],
@@ -73,18 +67,12 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.2.py\n",
- "#In figure 16-4a OP-Amp with midband Av of 100,000. \n",
- "#if f2=10Hz, then what does frequency response look like? \n",
"\n",
- "#Variable declaration\n",
"Avm=100000 #mid band voltage gain\n",
"f2=10 #cutoff frequency (Hz)\n",
"\n",
- "#Calculation\n",
"Av=0.707*Avm #voltage gain at cutoff frequency\n",
"\n",
- "#Result\n",
"print 'voltage gain for 10Hz = ',Av"
],
"language": "python",
@@ -112,12 +100,9 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.3.py\n",
- "#In preceding example , what is Av if input frequencies: 100Hz, 1KHz, 10KHZ, 100 KHz, 1MHz?\n",
"\n",
"import math # This will import math module\n",
"\n",
- "#Variable declaration\n",
"Avm=100000 #mid band voltage gain\n",
"fc=10.0 #cutoff frequency (Hz)\n",
"fi1=100.0 #input frequency1(Hz)\n",
@@ -126,14 +111,12 @@
"fi4=100*10**3 #input frequency4(Hz)\n",
"fi5=1*10**6 #input frequency5(Hz)\n",
"\n",
- "#Calculation\n",
"Av1=Avm/(1+(fi1/fc)**2)**0.5 #voltage gain for 100Hz\n",
"Av2=Avm/(1+(fi2/fc)**2)**0.5 #voltage gain for 1KHz\n",
"Av3=Avm/(1+(fi3/fc)**2)**0.5 #voltage gain for 10KHz\n",
"Av4=Avm/(1+(fi4/fc)**2)**0.5 #voltage gain for 100KHz\n",
"Av5=Avm/(1+(fi5/fc)**2)**0.5 #voltage gain for 1MHz\n",
"\n",
- "#Result\n",
"print 'voltage gain for 100Hz = ',math.ceil(Av1)\n",
"print 'voltage gain for 1KHz = ',math.ceil(Av2)\n",
"print 'voltage gain for 10KHz = ',math.ceil(Av3)\n",
@@ -169,24 +152,19 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.4.py\n",
- "#Calculate power gain(dB) for following values Ap=1,2,4,8\n",
"\n",
"import math # This will import math module\n",
"\n",
- "#Variable declaration\n",
"Ap1=1 #power gain1\n",
"Ap2=2 #power gain2\n",
"Ap3=4 #power gain3\n",
"Ap4=8 #power gain4\n",
"\n",
- "#Calculation\n",
"Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n",
"Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n",
"Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n",
"Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n",
"\n",
- "#Result\n",
"print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n",
"print 'decibel power gain Ap2(dB) = ',round(Ap_db2,2),'dB'\n",
"print 'decibel power gain Ap3(dB) = ',round(Ap_db3,2),'dB'\n",
@@ -222,24 +200,19 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.5.py\n",
- "#Calculate decibel power gain for following values Ap=1,0.5,0.25,0.125\n",
"\n",
"import math # This will import math module\n",
"\n",
- "#Variable declaration\n",
"Ap1=1 #power gain1\n",
"Ap2=0.5 #power gain2\n",
"Ap3=0.25 #power gain3\n",
"Ap4=0.125 #power gain4\n",
"\n",
- "#Calculation\n",
"Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n",
"Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n",
"Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n",
"Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n",
"\n",
- "#Result\n",
"print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n",
"print 'decibel power gain Ap2(dB) = ',round(Ap_db2,2),'dB'\n",
"print 'decibel power gain Ap3(dB) = ',round(Ap_db3,2),'dB'\n",
@@ -275,24 +248,19 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.6.py\n",
- "#Calculate decibel power gain for following values Ap=1,10,100,1000\n",
"\n",
"import math # This will import math module\n",
"\n",
- "#Variable declaration\n",
"Ap1=1 #power gain1\n",
"Ap2=10 #power gain2\n",
"Ap3=100 #power gain3\n",
"Ap4=1000 #power gain4\n",
"\n",
- "#Calculation\n",
"Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n",
"Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n",
"Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n",
"Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n",
"\n",
- "#Result\n",
"print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n",
"print 'decibel power gain Ap2(dB) = ',Ap_db2,'dB'\n",
"print 'decibel power gain Ap3(dB) = ',Ap_db3,'dB'\n",
@@ -328,24 +296,19 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.7.py\n",
- "#Calculate decibel power gain for following values Ap=1,0.1,0.01,0.001\n",
"\n",
"import math # This will import math module\n",
"\n",
- "#Variable declaration\n",
"Ap1=1 #power gain1\n",
"Ap2=0.1 #power gain2\n",
"Ap3=0.01 #power gain3\n",
"Ap4=0.001 #power gain4\n",
"\n",
- "#Calculation\n",
"Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n",
"Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n",
"Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n",
"Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n",
"\n",
- "#Result\n",
"print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n",
"print 'decibel power gain Ap2(dB) = ',Ap_db2,'dB'\n",
"print 'decibel power gain Ap3(dB) = ',Ap_db3,'dB'\n",
@@ -381,24 +344,18 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.8.py\n",
- "#What is total voltage gain in decibels?\n",
- "#find decibel voltage gain of each stage and total.\n",
"\n",
"import math # This will import math module\n",
"\n",
- "#Variable declaration\n",
"Av1=100 #voltage gain1\n",
"Av2=200 #voltage gain2\n",
"\n",
- "#Calculation\n",
"Av=Av1*Av2 #total voltage gain\n",
"Av_db=20*math.log10(Av) #decibel total voltage gain(dB)\n",
"Av_db1=20*math.log10(Av1) #decibel voltage gain(dB)\n",
"Av_db2=20*math.log10(Av2) #decibel voltage gain(dB)\n",
"Avt_db=Av_db1+Av_db2 #decibel total voltage gain(dB)\n",
"\n",
- "#Result \n",
"print 'decibel total voltage gain Av(dB) = ',round(Av_db,2),'dB'\n",
"print 'decibel voltage gain Av1(dB) = ',Av_db1,'dB'\n",
"print 'decibel voltage gain Av2(dB) = ',round(Av_db2,2),'dB'\n",
@@ -432,23 +389,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.9.py\n",
- "#Impedance matched stages with R=50 Ohm. \n",
- "#Find total decibel gain, total power gain & total voltage gain.\n",
"\n",
"import math # This will import math module\n",
"\n",
- "#Variable declaration\n",
"Av_db1=23 #voltage gain1(dB)\n",
"Av_db2=36 #voltage gain2(dB)\n",
"Av_db3=31 #voltage gain3(dB)\n",
"\n",
- "#Calculation\n",
"Avt_db=Av_db1+Av_db2+Av_db3 #decibel total voltage gain(dB)\n",
"Ap=10**(Avt_db/10) #power gain by taking antilog\n",
"Avt=10**(Avt_db/20.0) #total voltage gain by taking antilog\n",
"\n",
- "#Result \n",
"print 'decibel total voltage gain Avt(dB) = ',Avt_db,'dB'\n",
"print 'power gain Ap = ',Ap\n",
"print 'total voltage gain Avt = ',math.ceil(Avt)"
@@ -480,20 +431,15 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.10.py\n",
- "#In preceding example, What is ordinary Av of each stage?\n",
"\n",
- "#Variable declaration\n",
"Av_db1=23 #voltage gain1(dB)\n",
"Av_db2=36 #voltage gain2(dB)\n",
"Av_db3=31 #voltage gain3(dB)\n",
"\n",
- "#Calculation\n",
"Av1=10**(Av_db1/20.0) #voltage gain of stage 1 by taking antilog\n",
"Av2=10**(Av_db2/20.0) #voltage gain of stage 2 by taking antilog\n",
"Av3=10**(Av_db3/20.0) #voltage gain of stage 3 by taking antilog\n",
"\n",
- "#Result \n",
"print 'voltage gain of stage 1 : Av1 = ',round(Av1,2)\n",
"print 'voltage gain of stage 1 : Av2 = ',round(Av2,2)\n",
"print 'voltage gain of stage 1 : Av3 = ',round(Av3,2)"
@@ -525,16 +471,11 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.11.py\n",
- "#Output of an amplifier is 24 dBm. What is output power?\n",
"\n",
- "#Variable declaration\n",
"Ap_dbm=24 #power gain(dBm)\n",
"\n",
- "#Calculation\n",
"P=10**(Ap_dbm/10.0) #Output power(mW)\n",
"\n",
- "#Result \n",
"print 'Output power P = ',round(P,2),'mW'"
],
"language": "python",
@@ -562,18 +503,13 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.12.py\n",
- "#Output of an amplifier is -34 dBV. What is output voltage?\n",
"\n",
"import math # This will import math module\n",
"\n",
- "#Variable declaration\n",
"Av_dbV=-34 #voltage gain(dBV)\n",
"\n",
- "#Calculation\n",
"V=10**(Av_dbV/20.0) #Output voltage(V)\n",
"\n",
- "#Result \n",
"print 'Output voltage V = ',math.ceil(V*1000),'mV'"
],
"language": "python",
@@ -601,18 +537,12 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.13.py\n",
- "#OP-Amp gives midband Av of 100,000. \n",
- "#a cutoff f=10Hz, and roll off rate of 20 dB per decade. find ordinary voltage gain at 1MHz.\n",
"\n",
- "#Variable declaration\n",
"Avm=100000 #mid band voltage gain\n",
"f2=10 #cutoff frequency (Hz)\n",
"\n",
- "#Calculation\n",
"Av_db=20*math.log10(Avm) #decibel total voltage gain(dB)\n",
"\n",
- "#Result\n",
"print 'voltage gain for 10Hz = ',Av_db1,'dB'\n",
"print 'At 1MHz, due to roll off factor of 20 dB, voltage gain reduce to 0 dB'"
],
@@ -642,18 +572,13 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.14.py\n",
- "#Draw ideal bode plot for lag circuit of figure 16-18a.\n",
"import math\n",
"\n",
- "#Variable declaration\n",
"R=5*10**3 #resistance(Ohm)\n",
"C=100*10**-12 #Capacitance (F)\n",
"\n",
- "#Calculation\n",
"f2=(2*math.pi*R*C)**-1 #cutoff frequency (Hz)\n",
"\n",
- "#Result\n",
"print 'cutoff frequency f2 = ',round((f2/1000),2),'KHz'\n",
"print 'After f2, response rolls off at rate of 20 dB/decade'"
],
@@ -683,19 +608,13 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.15.py\n",
- "#dc amplifier stage has a midband Av of 100. \n",
- "#If RTH facing bypass capacitor is 2KOhm. What is the ideal bode plot?\n",
"import math\n",
"\n",
- "#Variable declaration\n",
"R=2*10**3 #resistance(Ohm)\n",
"C=500*10**-12 #Capacitance (F)\n",
"\n",
- "#Calculation\n",
"f2=(2*math.pi*R*C)**-1 #cutoff frequency (Hz)\n",
"\n",
- "#Result\n",
"print 'cutoff frequency f2 = ',round((f2/1000),2),'KHz'\n",
"print 'After f2, response rolls off at rate of 20 dB/decade up to funity of 15.9 MHz'"
],
@@ -725,21 +644,16 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.17.py\n",
- "#The amplifier of figure 16-22a has a Av of 100,000.\n",
"import math\n",
"\n",
- "#Variable declaration\n",
"R=5.3*10**3 #resistance(Ohm)\n",
"C=30*10**-12 #Capacitance (F)\n",
"Av=100000 #voltage gain\n",
"\n",
- "#Calculation\n",
"Cout_M=C #input Miller Capacitance (F)\n",
"Cin_M=Av*C #input Miller Capacitance (F)\n",
"f2=(2*math.pi*R*Cin_M)**-1 #cutoff frequency (Hz)\n",
"\n",
- "#Result\n",
"print 'cutoff frequency f2 = ',round(f2,3),'Hz'"
],
"language": "python",
@@ -767,16 +681,11 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.18.py\n",
- "#What is upper cutoff frequency for circuit shown in figure 16-24a?\n",
"\n",
- "#Variable declaration\n",
"TR=1*10**-6 #rise time(s)\n",
"\n",
- "#Calculation\n",
"f2=0.35/TR #cutoff frequency (Hz)\n",
"\n",
- "#Result\n",
"print 'cutoff frequency f2 = ',f2/1000,'KHz'"
],
"language": "python",
@@ -804,11 +713,8 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.19.py\n",
- "#calculate low-cutoff frequency for each coupling and by-pass capacitor. \n",
"import math\n",
"\n",
- "#Variable declaration\n",
"re=22.7 #from past dc calculation (example:9-5)(Ohm)\n",
"VCC=10 #collector voltage(V)\n",
"RC=3.6 #Collector resistance (KOhm)\n",
@@ -823,7 +729,6 @@
"C3=2.2*10**-6 #output capacitance(F)\n",
"C2=10*10**-6 #emitter capacitance(F)\n",
"\n",
- "#Calculation\n",
"Rinb=B*re/1000 #Rin(base) (KOhm)\n",
"Ri=RG+((R1**-1)+(Rinb**-1)+(R2**-1))**-1 #thevenin resistance facing i/p capacitor\n",
"f1i=((2*math.pi*Ri*C1)**-1)/1000 #input cutoff frequency (Hz)\n",
@@ -833,7 +738,6 @@
"f1z=((2*math.pi*Zout*C2)**-1)/1000 #cutoff frequency for bypass circuit (Hz)\n",
"\n",
"\n",
- "#Result\n",
"print 'input cutoff frequency f1 = ',round(f1i,2),'Hz'\n",
"print 'output cutoff frequency f1 = ',round(f1o,2),'Hz'\n",
"print 'cutoff frequency for bypass circuit f1 = ',round(f1z,2),'Hz'"
@@ -865,13 +769,9 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.20.py\n",
- "#calculate high cutoff frequency for base bypass and collector bypass circuit. \n",
- "#B=150 & Cstray=10pF.\n",
"\n",
"import math # This will import math module\n",
"\n",
- "#Variable declaration\n",
"re=22.7 #from past dc calculation (example:9-5)(Ohm)\n",
"VCC=10 #collector voltage(V)\n",
"RC=3.6 #Collector resistance (KOhm)\n",
@@ -886,7 +786,6 @@
"Cs=10*10**-12 #stray capacitance(F)\n",
"\n",
"\n",
- "#Calculation\n",
"Rinb=B*re/1000 #Rin(base) (KOhm)\n",
"Ce1=((2*math.pi*re*fT)**-1) #capacitance Ce'(F)\n",
"rc=RC*RL/(RC+RL) #collector resistance(KOhm) \n",
@@ -901,7 +800,6 @@
"R2=1000*RC*RL/(RC+RL) #resistance facing this capacitance(Ohm)\n",
"f21=((2*math.pi*R2*C2)**-1) #collector bypass circuit cutoff frequency (Hz)\n",
"\n",
- "#Result\n",
"print 'base bypass circuit cutoff frequency f2 = ',round((f2/10**6),2),'MHz'\n",
"print 'collector bypass circuit cutoff frequency f21 = ',round((f21/10**6),2),'MHz'"
],
@@ -931,11 +829,8 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.21.py\n",
- "#Determine input-coupling & output coupling circuit low-frequency cutoff points.\n",
"import math\n",
"\n",
- "#Variable declaration\n",
"re=22.7 #from past dc calculation (example:9-5)(Ohm)\n",
"RC=3.6 #Collector resistance (KOhm)\n",
"R1=2*10**6 #Base resistance1 (Ohm)\n",
@@ -947,13 +842,11 @@
"Cout=10*10**-6 #Cout capacitance(F)\n",
"\n",
"\n",
- "#Calculation\n",
"Rthi=RG+((R1**-1)+(R2**-1))**-1 #Thevenin resistance facing input coupling capacitor resistance (Ohm)\n",
"f1=((2*math.pi*Rthi*Cin)**-1) #base bypass circuit cutoff frequency (Hz)\n",
"Rtho=RD+RL #Thevenin resistance facing output coupling capacitor resistance (Ohm)\n",
"f2=((2*math.pi*Rtho*Cout)**-1) #base bypass circuit cutoff frequency (Hz)\n",
"\n",
- "#Result\n",
"print 'base bypass circuit cutoff frequency f1 = ',round(f1,2),'Hz'\n",
"print 'collector bypass circuit cutoff frequency f2 = ',round(f2,2),'Hz'"
],
@@ -983,12 +876,8 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#Example 16.22.py\n",
- "#In figure 16-32, capacitances are: Ciss=60 pF, Coss=25 pF, Crss=5 pF.\n",
- "#gm=97mS then find high frequency cut off values for gate & drain circuits.\n",
"import math\n",
"\n",
- "#Variable declaration\n",
"Ciss=60 #Capacitance Ciss (pF)\n",
"Coss=25 #Capacitance Coss (pF)\n",
"Crss=5 #Capacitance Crss (pF)\n",
@@ -999,7 +888,6 @@
"RD=150 #resiatance(Ohm)\n",
"RL=1*10**3 #load resiatance(Ohm)\n",
"\n",
- "#Calculation\n",
"Cgd=Crss #Internal Capacitance Cgd (pF)\n",
"Cgs=Ciss-Crss #Internal Capacitance Cgs (pF)\n",
"Cds=Coss-Crss #Internal Capacitance Cds (pF)\n",
@@ -1013,7 +901,6 @@
"C1=Cds+Cout_M #drain bypass capacitance(pF)\n",
"f21=((2*math.pi*rd*C1*10**-12)**-1) #drain bypass cutoff frequency (Hz)\n",
"\n",
- "#Result\n",
"print 'Gate bypass cutoff frequency = ',round(f2*10**-6,2),'MHz'\n",
"print 'Drain bypass cutoff frequency = ',round(f21*10**-6,2),'MHz'"
],