diff options
Diffstat (limited to 'TestContribution/bilal_3.ipynb')
-rwxr-xr-x | TestContribution/bilal_3.ipynb | 406 |
1 files changed, 406 insertions, 0 deletions
diff --git a/TestContribution/bilal_3.ipynb b/TestContribution/bilal_3.ipynb new file mode 100755 index 00000000..22d13091 --- /dev/null +++ b/TestContribution/bilal_3.ipynb @@ -0,0 +1,406 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e19af2f3d200c02cdde989919b1864a16727820a7b37667c650dffdfc779957b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 25: Resonance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.1, page no. 754"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 8 # Value of Inductor (8-H)\n",
+ "C = 20e-6 #Value of Capacitor (20-uF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 12.6 Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 12.5806717862 Hz i.e 12.6 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.2, page no. 755"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 2e-6 # Value of Inductor (2-uH)\n",
+ "C = 3e-12 #Value of Capacitor (3-pF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 65 MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 64966309.7492 Hz i.e 65 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.3, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "L = 239e-6 # Value of Inductor (239-uH)\n",
+ "f = 1000*10^3 #Frequency (1000 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = p*p\n",
+ "b = f*f\n",
+ "C = 1/(4*a*b*L)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Capacitor is\",float(C), \"F i.e 106 pF\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Capacitor is 1.05893477038e-06 F i.e 106 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.4, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "C = 106e-12 # Value of Capacitor (106-pF)\n",
+ "f = 1000000 #Frequency (1 MHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = 4*(p*p)\n",
+ "b = f*f\n",
+ "c = a*b*C\n",
+ "L = 1/(a*C*b)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Inductor is\",float(L), \"H i.e 239 uH\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Inductor is 0.000238903098251 H i.e 239 uH\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.5, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vo = 100e-3 #Output Voltage(100-mV)\n",
+ "Vi = 2e-3 #Input Voltage(2-mV)\n",
+ "\n",
+ "#Calculation\n",
+ "Q = Vo/Vi\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Q is\",round(Q),"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Q is 50.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.6, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 50 #Quality Factor\n",
+ "L = 250e-6 # Value of Inductor (250-uH)\n",
+ "f = 400000 #Frequency (400 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "rs = x/Q\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of AC resistance is\",float(rs),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of AC resistance is 12.568\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.7, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.8, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Z = 17600 #Equivalent Impedence\n",
+ "L = 350e-6 # Value of Inductor (350-uH)\n",
+ "f = 200000 #Frequency (200 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "Q = Z/x\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Quality factor is\", round(Q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Quality factor is 40.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.9, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 2000000 # Resonant frequency (2000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 20000.0 Hz\n",
+ "The edge frequency f1 is 1990000.0 Hz\n",
+ "The edge frequency f2 is 2010000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.10, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 6000000 # Resonant frequency (6000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 60000.0 Hz\n",
+ "The edge frequency f1 is 5970000.0 Hz\n",
+ "The edge frequency f2 is 6030000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |