diff options
author | hardythe1 | 2015-05-05 14:21:39 +0530 |
---|---|---|
committer | hardythe1 | 2015-05-05 14:21:39 +0530 |
commit | fba055ce5aa0955e22bac2413c33493b10ae6532 (patch) | |
tree | be70ef4fccd07c9c88de778014219201b4ea971f /sample_notebooks/LaxmanSole/Pinciples_of_electronic_Instrumentation_Ch1.ipynb | |
parent | 67068710030ddd6b6c809518c34af2e04e0bf7ca (diff) | |
download | Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.tar.gz Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.tar.bz2 Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.zip |
add books
Diffstat (limited to 'sample_notebooks/LaxmanSole/Pinciples_of_electronic_Instrumentation_Ch1.ipynb')
-rwxr-xr-x | sample_notebooks/LaxmanSole/Pinciples_of_electronic_Instrumentation_Ch1.ipynb | 406 |
1 files changed, 406 insertions, 0 deletions
diff --git a/sample_notebooks/LaxmanSole/Pinciples_of_electronic_Instrumentation_Ch1.ipynb b/sample_notebooks/LaxmanSole/Pinciples_of_electronic_Instrumentation_Ch1.ipynb new file mode 100755 index 00000000..229d9b52 --- /dev/null +++ b/sample_notebooks/LaxmanSole/Pinciples_of_electronic_Instrumentation_Ch1.ipynb @@ -0,0 +1,406 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 : Basic Concepts"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example1_1,pg 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# unknown resistance\n",
+ "\n",
+ "import math\n",
+ "#VAriable declaration\n",
+ "Ir=10*10**-3 #current drawn by resistor\n",
+ "Vr=100.0 #voltage across resistor\n",
+ "Rv=40*10**3 #voltmeter resistance\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ru=(Vr/Ir)*(1/(1-(Vr/(Ir*Rv)))) \n",
+ "\n",
+ "#Result\n",
+ "print(\"output resistance:\")\n",
+ "print(\"Ru=%.2f ohm\"%Ru)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output resistance:\n",
+ "Ru=13333.33 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example1_2,pg 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# unknown resistance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ir=10*10**-3 #current drawn by resistor\n",
+ "Vr=100.0 #voltage across resistor\n",
+ "Rv=40*10**3 #voltmeter resistance\n",
+ "Ra=1.0 #ammeter resistance\n",
+ "\n",
+ "#Calculations\n",
+ "Ru=(Rv/Ir)-Ra\n",
+ "\n",
+ "#Result\n",
+ "print(\"output resistance:\")\n",
+ "print(\"Ru=%.2f ohm\"%Ru)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output resistance:\n",
+ "Ru=3999999.00 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example1_3,pg 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# find ammeter reading\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rv=40*10**3 #voltmeter resistance\n",
+ "Ra=1.0 #ammeter resistance\n",
+ "Vr=40.0 #voltmeter reading\n",
+ "Ru=10*10**3 #unknown resistance\n",
+ "\n",
+ "#Calculations\n",
+ "Ir=(Vr*(Rv+Ru))/(Ru*Rv)\n",
+ "Ir1=(Vr/(Ru+Ra))\n",
+ "\n",
+ "#Result\n",
+ "print(\"ammeter reading case1:\")\n",
+ "print(\"Ir=%.4f A\"%Ir)\n",
+ "print(\"\\nammeter reading case2:\")\n",
+ "print(\"Ir1=%.4f A\"%Ir1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ammeter reading case1:\n",
+ "Ir=0.0050 A\n",
+ "\n",
+ "ammeter reading case2:\n",
+ "Ir1=0.0040 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example1_4,pg 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# unknown resistance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vs=3.0 #supply voltage\n",
+ "Vu=2.75 #voltmeter reading\n",
+ "Rp=10*10**3 #parallel resistance\n",
+ "\n",
+ "#Calculations\n",
+ "Ru=Rp*((Vs/Vu)-1)\n",
+ "\n",
+ "#Result\n",
+ "print(\"unknown resistance:\")\n",
+ "print(\"Ru=%.2f ohm\"%Ru)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "unknown resistance:\n",
+ "Ru=909.09 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example1_5,pg 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Find input vlotage\n",
+ "\n",
+ "#with input voltage exceding 2Vd,diodes conduct and the voltage divider circuit with diodes can allow only a Vi given by Vi=2Vd\n",
+ "\n",
+ "#Result\n",
+ "print(\"input voltage to amplifier:\")\n",
+ "print(\"Vi=2Vd\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input voltage to amplifier:\n",
+ "Vi=2Vd\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Example1_6,pg 482"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# find shunt resistance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rm=1000.0 #meter resistance\n",
+ "Is=900*10**-6 #shunt current\n",
+ "Vm=100*10**-3 #drop across meter\n",
+ "\n",
+ "#Result\n",
+ "Rs=Vm/Is\n",
+ "It=1*10**-3\n",
+ "#Is=It*(Rm/(Rs+Rm))\n",
+ "Rs=(Rm*(It-Is))/Is\n",
+ "\n",
+ "#Result\n",
+ "print(\"shunt resistance:\")\n",
+ "print(\"Rs=%.2f ohm\"%Rs)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "shunt resistance:\n",
+ "Rs=111.11 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example1_7,pg 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# find series resistor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "If=100*10**-6 #full scale current\n",
+ "Rm=1000.0 #meter resistance\n",
+ "Vf=10.0 #full scale voltage\n",
+ "\n",
+ "#Calculations\n",
+ "Rs=(Vf/If)-Rm\n",
+ "\n",
+ "#Result\n",
+ "print(\"series resistance:\")\n",
+ "print(\"Rs=%.2f ohm\"%Rs)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series resistance:\n",
+ "Rs=99000.00 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Example1_8,pg 483"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# sensitivity\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "If=100*10**-6 # Current\n",
+ "\n",
+ "#Calculations\n",
+ "S=1/If\n",
+ "\n",
+ "#Result\n",
+ "print(\"sensitivity:\")\n",
+ "print(\"S=%.2f ohm/volt\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "sensitivity:\n",
+ "S=10000.00 ohm/volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example1_9,pg 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# error in measurment\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "\n",
+ "#assume that the voltmeter full scale reading is 12V which gives its resistance as 1.2*10^6 ohm \n",
+ "#which is in parallel with 10*10^6 ohm making as equivalent of Rq given as\n",
+ "R=1.2*10**6 #voltmeter resistance\n",
+ "R1=10*10**6 #voltage divider resistance\n",
+ "Vin=12.0 #input voltage to divider network\n",
+ "Rs=4*10**6 # series resistance\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Rq=(R*R1)/(R+R1)\n",
+ "Vq=(Rq*Vin)/(Rq+Rs) #voltage across equivalent combination\n",
+ "Va=(R1*Vin)/(R1+Rs) #actual volatge\n",
+ "er=(Vq-Va)/Va #error\n",
+ "\n",
+ "#Result\n",
+ "print(\"error in measurement:\")\n",
+ "print(\"\\ner=%.3f \"%er)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "error in measurement:\n",
+ "\n",
+ "er=-0.704 \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |