diff options
author | Trupti Kini | 2016-01-03 23:30:10 +0600 |
---|---|---|
committer | Trupti Kini | 2016-01-03 23:30:10 +0600 |
commit | 03c0c438523caca3a703b552ee9451ec2e6fd5e9 (patch) | |
tree | 6659ef4ddb26b4430f32ef04bf91ccf4225bad51 /sample_notebooks | |
parent | 575e7c830558a5cb9f7ffbdea585938d662bbc9d (diff) | |
download | Python-Textbook-Companions-03c0c438523caca3a703b552ee9451ec2e6fd5e9.tar.gz Python-Textbook-Companions-03c0c438523caca3a703b552ee9451ec2e6fd5e9.tar.bz2 Python-Textbook-Companions-03c0c438523caca3a703b552ee9451ec2e6fd5e9.zip |
Added(A)/Deleted(D) following books
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter11_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter12_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter14_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter1_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter2_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter4_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter5_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter6_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter7_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/Chapter9_1.ipynb
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/screenshots/11.1new.png
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/screenshots/5.1new.png
A Modern_Electronic_Instrumentation_And_Measurement_Techniques_by_A._D._Helfrick_And_W._D._Cooper/screenshots/5.4new.png
A sample_notebooks/ChandraShiva/CHAPTER09.ipynb
A "sample_notebooks/Jaya PratyushaKothuri/Chapter2.ipynb"
A sample_notebooks/TarunikaBoyapati/CHAPTER02.ipynb
Diffstat (limited to 'sample_notebooks')
-rw-r--r-- | sample_notebooks/ChandraShiva/CHAPTER09.ipynb | 325 | ||||
-rw-r--r-- | sample_notebooks/Jaya PratyushaKothuri/Chapter2.ipynb | 231 | ||||
-rw-r--r-- | sample_notebooks/TarunikaBoyapati/CHAPTER02.ipynb | 419 |
3 files changed, 975 insertions, 0 deletions
diff --git a/sample_notebooks/ChandraShiva/CHAPTER09.ipynb b/sample_notebooks/ChandraShiva/CHAPTER09.ipynb new file mode 100644 index 00000000..6549f9c6 --- /dev/null +++ b/sample_notebooks/ChandraShiva/CHAPTER09.ipynb @@ -0,0 +1,325 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2fe5d303c17886b921f7fce80c636f86023d9235c3c8b0a7cac768a73d655baa"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER09 : NETWORK FUNCTION"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E24 - Pg 608"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # EXAMPLE 9-24 PG NO-608-609\n",
+ "import math \n",
+ "L=20.; # INDUCTANCE\n",
+ "R=2.*L; # RESISTANCE\n",
+ "print '%s %.2f %s' %('i) Resistance (R) is =',R,'ohm');\n",
+ "Wo=math.sqrt(101.);\n",
+ "print '%s %.2f %s' %('ii) Wo (Wo) is =',Wo,'rad/sec');\n",
+ "Q=(Wo*L)/R;\n",
+ "print '%s %.2f' %('iii) Q is = ',Q);\n",
+ "BW=Wo/Q;\n",
+ "print '%s %.2f %s' %('iv) BANDWIDTH (BW) is = ',BW,' rad/sec ');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i) Resistance (R) is = 40.00 ohm\n",
+ "ii) Wo (Wo) is = 10.05 rad/sec\n",
+ "iii) Q is = 5.02\n",
+ "iv) BANDWIDTH (BW) is = 2.00 rad/sec \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E26 - Pg 609"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # EXAMPLE 9-26 PG NO-609-610\n",
+ "C=10.** -6.;\n",
+ "X=5.*10.** 6.;\n",
+ "L=1./(C*X);\n",
+ "print '%s %.2f %s' %('i) INDUCTAR (L) is =',L,' H ');\n",
+ "R=10.*L;\n",
+ "print '%s %.2f %s' %('ii) Resistance (R) is =',R,' ohm ');\n",
+ "W=2.236*10.** 3.;\n",
+ "Q=(W*L)/R;\n",
+ "print '%s %.2f' %('iii) (Q) is = ',Q);\n",
+ "BW=W/Q;\n",
+ "print '%s %.2f %s' %('iv) Band Width (BW) is =',BW,' rad/sec ');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i) INDUCTAR (L) is = 0.20 H \n",
+ "ii) Resistance (R) is = 2.00 ohm \n",
+ "iii) (Q) is = 223.60\n",
+ "iv) Band Width (BW) is = 10.00 rad/sec \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E32 - Pg 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # Example 9-32 PG NO 618-619\n",
+ "import math, cmath\n",
+ "P1=1-1j*50;\n",
+ "P2=1+1j*150;\n",
+ "Z1=0+0j*50;\n",
+ "I=(0.2*Z1)/(P1*P2);\n",
+ "print 'i) Current (I) is = ',I,'A'\n",
+ "L=5.; \n",
+ "R=10.;\n",
+ "C=2.*10.** -5.;\n",
+ "Wo=1/math.sqrt(L*C);\n",
+ "print 'ii) Wo (Wo) is = ',Wo,' rad/sec '\n",
+ "Q=(Wo*L)/R;\n",
+ "print 'iii) Q (Q) is = ',Q;\n",
+ "BW=Wo/Q;\n",
+ "print 'ii) Band Width (BW) is = ',BW,' rad/sec '\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i) Current (I) is = 0j A\n",
+ "ii) Wo (Wo) is = 100.0 rad/sec \n",
+ "iii) Q (Q) is = 50.0\n",
+ "ii) Band Width (BW) is = 2.0 rad/sec \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E37 - Pg 623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # EXAMPLE 9-37 PG NO 623-624\n",
+ "C=1./8.5; # Capacitor\n",
+ "L=1./(17.*C); # Inductar\n",
+ "print '%s %.2f %s' %('ii) Inductar (L) is = ',L,'H');\n",
+ "R=2.*L; # Resistance\n",
+ "print '%s %.2f %s' %('ii) Resistance (R) is = ',R,' ohm ');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ii) Inductar (L) is = 0.50 H\n",
+ "ii) Resistance (R) is = 1.00 ohm \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E38 - Pg 624"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # EXAMPLE 9-38 PG NO=624-625\n",
+ "C=1./9.; # CAPACITOR\n",
+ "X=2.; # R/L=X\n",
+ "Y=6-X; # G/C\n",
+ "G=4.*C;\n",
+ "print '%s %.2f %s' %('i) G (G) = ',G,' ohm')\n",
+ "L=0.9;\n",
+ "R=1.8;\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i) G (G) = 0.44 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E46 - Pg 630"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # EXAMPLE 9-46 PG NO 630-631\n",
+ "import cmath\n",
+ "ZA=5+1j*3;\n",
+ "YA=1./ZA;\n",
+ "print 'i) Admittance (YA) is = ',YA,' siemens ';\n",
+ "V=100.; # VOLTAGE\n",
+ "IA=V*YA;\n",
+ "print 'ii) Current (IA) is = ',IA,' A ';\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i) Admittance (YA) is = (0.147058823529-0.0882352941176j) siemens \n",
+ "ii) Current (IA) is = (14.7058823529-8.82352941176j) A \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E50 - Pg 632"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # EXAMPLE 9-50 PG NO-632\n",
+ "I1=17.39-1j*4.66; # CURRENT\n",
+ "I2=9+1j*15.68; # CURRENT\n",
+ "I3=-1j*10.95; # CURRENT\n",
+ "I=I1+I2+I3;\n",
+ "print 'i)CURRENT (I) = ',I,' A'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i)CURRENT (I) = (26.39+0.07j) A\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E56 - Pg 636"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # example 9-56 pg no-636\n",
+ "Z1=8.05+1j*2.156; # IMPEDANCE\n",
+ "XL=2.155;\n",
+ "W=5000;\n",
+ "L=XL/W;\n",
+ "print 'i)INDUCTANCE (L) = ',L,' H'\n",
+ "Z2=4.166-1j*7.216; # IMPEDANCE\n",
+ "Xc=7.216;\n",
+ "C=1/(W*Xc);\n",
+ "print 'ii)CAPACITOR (C) = ',C,' F'\n",
+ "D=11.708; # DIAMETER\n",
+ "XL1=12.81;\n",
+ "L1=XL1/W;\n",
+ "print 'i) INDUCTANCE (L1) = ',L1,' H'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i)INDUCTANCE (L) = 0.000431 H\n",
+ "ii)CAPACITOR (C) = 2.77161862528e-05 F\n",
+ "i) INDUCTANCE (L1) = 0.002562 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/Jaya PratyushaKothuri/Chapter2.ipynb b/sample_notebooks/Jaya PratyushaKothuri/Chapter2.ipynb new file mode 100644 index 00000000..7b0498ca --- /dev/null +++ b/sample_notebooks/Jaya PratyushaKothuri/Chapter2.ipynb @@ -0,0 +1,231 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 - Ionization" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1: pg 22" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the breakdown strength of air for 0.1mm air gap is (kV/cm.) = 43.447\n", + "\n", + "the breakdown strength of air for 20 cm air gap is (kV/cm.) = 25.58\n" + ] + } + ], + "source": [ + "#example 2.1\n", + "#calculation of breakdown strength of air\n", + "\n", + "#given data\n", + "d1=0.1#length(in cm) of the gap\n", + "d2=20#length(in cm) of the gap\n", + "\n", + "#calculation\n", + "#from equation of breakdown strength\n", + "E1=24.22+(6.08/(d1**(1./2)))#for gap d1\n", + "E2=24.22+(6.08/(d2**(1./2)))#for gap d2\n", + "#results\n", + "print 'the breakdown strength of air for 0.1mm air gap is (kV/cm.) = ',round(E1,3)\n", + "print '\\nthe breakdown strength of air for 20 cm air gap is (kV/cm.) = ',round(E2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2: pg 23" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Townsend primary ioniztion coefficient is (/cm torr) = 7.675\n" + ] + } + ], + "source": [ + "#example 2.2\n", + "#calculation of Townsend primary ionization coefficient\n", + "from math import log\n", + "#given data\n", + "d1=0.4#gap distance(in cm)\n", + "d2=0.1#gap distance(in cm)\n", + "I1=5.5*10**-8#value of current(in A)\n", + "I2=5.5*10**-9#value of current(in A)\n", + "\n", + "#calculation\n", + "#from equation of current at anode I=I0*exp(alpha*d)\n", + "alpha=(log(I1/I2))*(1/(d1-d2))\n", + "#results\n", + "print 'Townsend primary ioniztion coefficient is (/cm torr) = ',round(alpha,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3: pg 25" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of Townsend secondary ionization coefficient is 9.994e-04\n" + ] + } + ], + "source": [ + "#example 2.3\n", + "#calculation of Townsend secondary ionization coefficient\n", + "from math import exp\n", + "#given data\n", + "d=0.9#gap distance(in cm)\n", + "alpha=7.676#value of alpha\n", + "\n", + "#calculation\n", + "#from condition of breakdown.....gama*exp(alpha*d)=1\n", + "gama=1/(exp(d*alpha))\n", + "#results\n", + "print '%s %.3e' %('the value of Townsend secondary ionization coefficient is ',gama)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4: pg 26" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of breakdown voltage of the spark gap is (V) = 5626.0\n", + "The answer is a bit different due to rounding off error in textbook\n" + ] + } + ], + "source": [ + "#example 2.4\n", + "#calculation of breakdown voltage of a spark gap\n", + "from math import log\n", + "#given data\n", + "A=15#value of A(in per cm)\n", + "B=360#value of B(in per cm)\n", + "d=0.1#spark gap(in cm)\n", + "gama=1.5*10**-4#value of gama\n", + "p=760#value of pressure of gas(in torr)\n", + "\n", + "#calculation\n", + "#from equation of breakdown voltage\n", + "V=(B*p*d)/(log((A*p*d)/(log(1+(1/gama)))))\n", + "\n", + "#results\n", + "print 'the value of breakdown voltage of the spark gap is (V) = ',round(V)\n", + "print 'The answer is a bit different due to rounding off error in textbook'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5: pg 26" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of minimum spark over voltage is (V) = 481.0\n" + ] + } + ], + "source": [ + "#example 2.5\n", + "#calculation of minimum spark over voltage\n", + "from math import log\n", + "#given data\n", + "A=15#value of A(in per cm)\n", + "B=360#value of B(in per cm)\n", + "gama=10**-4#value of gama\n", + "e=2.178#value of constant\n", + "\n", + "#calculation\n", + "Vbmin=(B*e/A)*(log(1+(1/gama)))\n", + "\n", + "#results\n", + "print 'the value of minimum spark over voltage is (V) = ',round(Vbmin)\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/sample_notebooks/TarunikaBoyapati/CHAPTER02.ipynb b/sample_notebooks/TarunikaBoyapati/CHAPTER02.ipynb new file mode 100644 index 00000000..809dc7f6 --- /dev/null +++ b/sample_notebooks/TarunikaBoyapati/CHAPTER02.ipynb @@ -0,0 +1,419 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:896619f98735f380fd7764ca92373e979d96248275ce12cd21f86086d05b2351"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER02 : THE CIRCUIT ELEMENTS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E1a - Pg 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#1a\n",
+ "V = 1.; # voltage supply \n",
+ "R = 10.; # resistance in ohms \n",
+ "I = V/R # current flowing through R\n",
+ "print '%s' %(\"a)\")\n",
+ "print '%s %.f' %(\"voltage across the resistor (in volts)=\",V)\n",
+ "print '%s %.2f' %(\"current flowing through the resistor (in amps) =\",I)\n",
+ "\n",
+ "#1b\n",
+ "V = 1.; # voltage supply \n",
+ "R1 = 10.; # first resistance in ohms \n",
+ "R2 = 5.; # resistance of the second resistor \n",
+ "Vr1 = V * (R1/(R1 + R2)); # voltage across R1\n",
+ "Vr2 = V - Vr1; # voltage across R2\n",
+ "Ir = Vr1/R1; # current flowing through R\n",
+ "print '%s' %(\"b)\")\n",
+ "print '%s %.2f' %(\"voltage across the first resistor (in volts)=\",Vr1)\n",
+ "print '%s %.2f' %(\"voltage across the second resistor (in volts)=\",Vr2)\n",
+ "print '%s %.2f' %(\"current flowing through the resistor (in amps) =\",Ir)\n",
+ "\n",
+ "#1c\n",
+ "# c - a\n",
+ "R1 = 10.; # first resistance in ohms\n",
+ "R2 = 10.;\n",
+ "I = 1.; # current source \n",
+ "V = I*R1; # voltage across R\n",
+ "print '%s' %(\"c - a)\")\n",
+ "print '%s %.f' %(\"voltage across the resistor (in volts)=\",V)\n",
+ "print '%s %.f' %(\"current flowing through the resistor (in amps) =\",I)\n",
+ "# c - b\n",
+ "Vr1 = I*R1; # voltage across R1\n",
+ "Vr2 = I*R2; # voltage across R2\n",
+ "Vr=Vr1+Vr2;\n",
+ "print '%s' %(\"c - b)\")\n",
+ "print '%s %.f' %(\"voltage across the resistor (in volts)=\",Vr)\n",
+ "print '%s %.f' %(\"current flowing through the resistor (in amps) =\",I)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)\n",
+ "voltage across the resistor (in volts)= 1\n",
+ "current flowing through the resistor (in amps) = 0.10\n",
+ "b)\n",
+ "voltage across the first resistor (in volts)= 0.67\n",
+ "voltage across the second resistor (in volts)= 0.33\n",
+ "current flowing through the resistor (in amps) = 0.07\n",
+ "c - a)\n",
+ "voltage across the resistor (in volts)= 10\n",
+ "current flowing through the resistor (in amps) = 1\n",
+ "c - b)\n",
+ "voltage across the resistor (in volts)= 20\n",
+ "current flowing through the resistor (in amps) = 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E2 - Pg 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "R = 100.; # resistance in ohms\n",
+ "I = 0.3; # current in amps \n",
+ "P = I**2 * R; # power \n",
+ "# power specification of the resistors available in the stock \n",
+ "Pa = 5.;\n",
+ "Pb = 7.5;\n",
+ "Pc = 10.;\n",
+ "\n",
+ "if Pa > P :\n",
+ " print '%s' %(\"we should select resistor a\")\n",
+ "if Pb > P :\n",
+ " print '%s' %(\"we should select resistor b\")\n",
+ "if Pc > P :\n",
+ " print '%s' %(\"we should select resistor c\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "we should select resistor c\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E3 - Pg 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "L = 1.; # length of the copper wire in meters\n",
+ "A = 1. * 10.**-4.; # cross sectional area of the wire in meter square \n",
+ "rho = 1.724 * 10.**-8.; # resistivity of copper in ohm meter\n",
+ "R = rho*L / A; # resistance of the wire in ohm \n",
+ "\n",
+ "print '%s %.2e' %(\"resistance of the wire (in ohms)=\",R) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistance of the wire (in ohms)= 1.72e-04\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E4 - Pg 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 1 inches = 0.0254meters\n",
+ "# 1 foot = 0.3048 meters\n",
+ "import math \n",
+ "d = 0.1*0.0254; # diameter of the wire in meters\n",
+ "L = 10.*0.3048; # length of the wire in meters \n",
+ "rho = 1.724*10.**-8.; # resistivity of the wire in ohm-meter\n",
+ "A = math.pi*(d/2.)**2.; # cross sectional area of the wire \n",
+ "R = rho*L/A; # resistance of the wire in ohm \n",
+ "print '%s %.2f' %(\"resistance of the wire (in ohm)=\",R)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistance of the wire (in ohm)= 0.01\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E5 - Pg 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math\n",
+ "import numpy as np\n",
+ "from matplotlib import pyplot\n",
+ "L = 0.1; # inductance of the coil in henry \n",
+ "t1= np.linspace(0,0.1, num=101)\n",
+ "t2= np.linspace(0.101,0.3, num=201)\n",
+ "t3= np.linspace(0.301,0.6,num=301)\n",
+ "t4= np.linspace(0.601,0.7,num=101)\n",
+ "t5= np.linspace(0.701,0.9,num=201)\n",
+ "# current variation as a function of time \n",
+ "i1 = 100.*t1;\n",
+ "i2 = (-50.*t2) + 15.;\n",
+ "i3 = np.zeros(301)\n",
+ "for i in range(0,301):\n",
+ "\ti3[i] = -100.*math.sin(math.pi*(t3[i]-0.3)/0.3);\n",
+ "\n",
+ "i4 = (100.*t4) - 60.;\n",
+ "i5 = (-50.*t5) + 45.;\n",
+ "\n",
+ "t = ([t1,t2,t3,t4,t5]);\n",
+ "i = ([i1,i2,i3,i4,i5]);\n",
+ "pyplot.plot(t1, i1);\n",
+ "pyplot.plot(t2, i2);\n",
+ "pyplot.plot(t3, i3);\n",
+ "pyplot.plot(t4, i4);\n",
+ "pyplot.plot(t5, i5);\n",
+ "\n",
+ "dt = 0.001;\n",
+ "di1 = np.diff(i1);\n",
+ "di2 = np.diff(i2);\n",
+ "di3 = np.diff(i3);\n",
+ "di4 = np.diff(i4);\n",
+ "di5 = np.diff(i5);\n",
+ "V1 =np.array((L/dt)*di1); # voltage drop appearing across the inductor terminals\n",
+ "V2 =np.array((L/dt)*di2); # voltage drop appearing across the inductor terminals\n",
+ "V3 =np.array((L/dt)*di3); # voltage drop appearing across the inductor terminals\n",
+ "V4 = np.array((L/dt)*di4); # voltage drop appearing across the inductor terminals\n",
+ "V5 = np.array((L/dt)*di5); # voltage drop appearing across the inductor terminals\n",
+ "print(V2)\n",
+ "Tv = np.linspace(0,0.899,num=900);\n",
+ "V = []\n",
+ "V.extend(V1)\n",
+ "V.extend(V2)\n",
+ "V.extend(V3)\n",
+ "V.extend(V4)\n",
+ "V.extend(V5)\n",
+ "print(len(V))\n",
+ "pyplot.plot(Tv, V)\n",
+ "pyplot.show();"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[-4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975\n",
+ " -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975 -4.975]\n",
+ "900\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEACAYAAAC+gnFaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8HXW9//HXJ1uT0qQF2qbN0oUudBGlLS0UUYKiF1BW\nvYAg16soXpGqyI4gZZFNROCWRaHIXkRBLogbKPmJshRKgUIp3UizlaZL2iZt02zf3x9zWkJI0pNz\nZs6cZN7PxyOPnsyZM/PuSTKf811mxpxziIhIdGWEHUBERMKlQiAiEnEqBCIiEadCICIScSoEIiIR\np0IgIhJxSRcCM7vXzNaZ2ZIOy+aaWbWZLY59Hd3huUvMbIWZLTOzLya7fxERSY4lex6BmX0GaAQe\ncM4dEFt2BdDgnLu507pTgEeAmUAx8Bww0TnXn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5tCisT3qfODc65HcAOM/sn8Cm8qd9h\nZdrlVILvFoL4Mh0K/AzAObfKzN7H+8DzWliZYr9P39r1fSzT6h63GuRgyx4GPbKAVXiDHjnsebD4\nEIIfBN1jpg7rziU1g8XxvE+j8AaQDkmjn904PpyePB1YFXamTuv/BjgpTd6rwg7v1SygIg0yTQKe\nwxucHIj3yXJK2D8/YDDegGxemvzsbgau6PBzrAb2CTnTYCAn9vg7wH173G7Qb+Ye/lNHA+/FDmKX\nxJZ9F+8ktF3rzIs9/yYwPexMeNdeqgK2APVAJTAo5Ez3xP44Fse+FqbB+3Qh8HYszwvAzLAzdVo3\nJYUgzvfq+7H36g3gRVJQ0OP82zsfb+bQEuAHaZLpG8Ajqfi5xfmzGwo8HTs+LQFOS4NMs2PPL8Ob\nGDF4T9vUCWUiIhGnW1WKiEScCoGISMSpEIiIRJwKgYhIxKkQiIhEnAqBiEjEqRCIiEScCoGISMT9\nf+iDjK55zTwcAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x5cdc0b0>"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E7 - Pg 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# a\n",
+ "Ri = 1.; \n",
+ "Rf = 39.;\n",
+ "A = 10.**5.; # open loop gain of the op-amp\n",
+ "G = A/(1. + (A*Ri/(Ri+Rf))); # actual voltage gain of the circuit \n",
+ "print '%s' %(\"a\")\n",
+ "print '%s %.2f' %(\"actual voltage of the circuit =\",G)\n",
+ "\n",
+ "# b\n",
+ "G1 = 1 + (Rf/Ri); # voltage gain of the circuit with infinite open loop gain\n",
+ "print '%s' %(\"b\")\n",
+ "print '%s %.f' %(\"for ideal case the voltage gain =\",G1)\n",
+ "\n",
+ "# c\n",
+ "er = ((G1 - G)/G)*100.; # percent error \n",
+ "print '%s' %(\"c\")\n",
+ "print '%s %.2f' %(\"percent error of the ideal value compared to the actual value=\",er)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a\n",
+ "actual voltage of the circuit = 39.98\n",
+ "b\n",
+ "for ideal case the voltage gain = 40\n",
+ "c\n",
+ "percent error of the ideal value compared to the actual value= 0.04\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E8 - Pg 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "G = 4.; # voltage gain of the circuit \n",
+ "r = G -1.; # ratio of the resistances in the non-inverting op-amp circuit\n",
+ "print '%s %.2f' %(\"Rf/Ri =\",r)\n",
+ "# Result:\n",
+ "# A suitable choice for R1 is 10K, Hence Rf = 30K\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rf/Ri = 3.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E9 - Pg 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "G = 4.;\n",
+ "r = G; # ratio of the resistances in the inverting op-amp circuit\n",
+ "print '%s %.f' %(\"Rf/Ri\",r)\n",
+ "# Result;\n",
+ "# A suitable choice for Rf=30K and R1=7.5K\n",
+ "# therefore input resistance R1 = 7.5K\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rf/Ri 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |