diff options
author | hardythe1 | 2015-04-07 15:58:05 +0530 |
---|---|---|
committer | hardythe1 | 2015-04-07 15:58:05 +0530 |
commit | c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131 (patch) | |
tree | 725a7d43dc1687edf95bc36d39bebc3000f1de8f /Optical_Communication | |
parent | 62aa228e2519ac7b7f1aef53001f2f2e988a6eb1 (diff) | |
download | Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.gz Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.bz2 Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.zip |
added books
Diffstat (limited to 'Optical_Communication')
-rwxr-xr-x | Optical_Communication/Chapter_2.ipynb | 1146 | ||||
-rwxr-xr-x | Optical_Communication/Chapter_4.ipynb | 1221 | ||||
-rwxr-xr-x | Optical_Communication/Chapter_5.ipynb | 1335 | ||||
-rwxr-xr-x | Optical_Communication/Chapter_6.ipynb | 888 | ||||
-rwxr-xr-x | Optical_Communication/screenshots/finding_angles.png | bin | 0 -> 59376 bytes | |||
-rwxr-xr-x | Optical_Communication/screenshots/optical_power.png | bin | 0 -> 47182 bytes | |||
-rwxr-xr-x | Optical_Communication/screenshots/responsivity.png | bin | 0 -> 51139 bytes |
7 files changed, 4590 insertions, 0 deletions
diff --git a/Optical_Communication/Chapter_2.ipynb b/Optical_Communication/Chapter_2.ipynb new file mode 100755 index 00000000..ddfaa1d5 --- /dev/null +++ b/Optical_Communication/Chapter_2.ipynb @@ -0,0 +1,1146 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:afd6588cf456d4d425f74443bb32014c9097e23d883f51c38473cadd2c6f5ba9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Optical Fibers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page number 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine maximum thickness of film'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 3.5 #core refractive index\n", + "n2 = 3.0 #cladding refractive index\n", + "v = 6 #no. of modes\n", + "lamda = 1.5 #propagating wavelength(um)\n", + "\n", + "#Calculations\n", + "theta_c = math.degrees(math.asin(n2/n1))\n", + "h = (2*math.pi*v*lamda)/(2*math.pi*n1*math.cos(math.radians(theta_c)))\n", + "\n", + "#Result\n", + "print \"The thickness of the film should be less than\",round(h),\"um\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thickness of the film should be less than 5.0 um\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, Page number 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''find the angle of acceptance and crtitical angle'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.53 #core refractive index\n", + "n2 = 1.48 #cladding refractive index\n", + "n0 = 1 #refractive index for air\n", + "\n", + "#calculations\n", + "theta_a = math.degrees(math.asin(((n1**2-n2**2)**0.5)/n0)) \n", + "\n", + "theta_c = math.degrees(math.asin(n2/n1))\n", + "\n", + "#Result\n", + "print \"Angle of acceptance =\",round(theta_a,2),\"degrees\"\n", + "print \"Critical angle =\",round(theta_c,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of acceptance = 22.83 degrees\n", + "Critical angle = 75.31 degrees\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3, Page number 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the numerical aperture'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "v = 26.6 #frequency(Hz)\n", + "lamda = 1.3 #propagating wavelength(um)\n", + "a = 25 #core radius(um)\n", + "\n", + "#Calculation\n", + "NA = (v*lamda)/(2*math.pi*a)\n", + "\n", + "#Result\n", + "print \"Numerical aperture =\",round(NA,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture = 0.22\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4, Page number 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the numerical aperture'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.4675 #core refractive index\n", + "n2 = 1.4622 #cladding refractive index\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "#Result\n", + "print \"Numerical aperture =\",round(NA,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture = 0.125\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5, Page number 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine cut-off wavelength for step index fiber'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.5 #core refractive index\n", + "n2 = 1.47 #cladding refractive index\n", + "a = 4 #core radius(um)\n", + "\n", + "#Calculation\n", + "lamda_c = (2*math.pi*a*((n1**2-n2**2)**0.5))/2.405\n", + "\n", + "#Result\n", + "print \"The cut-off wavelength is\",round(lamda_c,2),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut-off wavelength is 3.12 um\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6, Page number 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine maximum diameter of the core for single mode fiber'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.55 #core refractive index\n", + "n2 = 1.48 #cladding refractive index\n", + "lamda = 1.55 #wavelength(um)\n", + "\n", + "#Calculations\n", + "a = (2.405*lamda)/(2*math.pi*(n1**2-n2**2)**0.5)\n", + "d = 2*a #diameter\n", + "\n", + "#Result\n", + "print \"Maximum diameter of the core is\",round(d,2),\"um\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum diameter of the core is 2.58 um\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7, Page number 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the number of modes propagating'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.48 #core refractive index\n", + "n2 = 0.01 #cladding refractive index\n", + "a = 25 #core radius(um)\n", + "lamda = 0.84 #Wavelength(um)\n", + "\n", + "#Calculation\n", + "m = 2*(2*math.pi/lamda)**2*(a**2/2)*(n1**2-n2**2)\n", + "v = math.sqrt(2*m)\n", + "\n", + "#Result\n", + "print \"Number of modes =\",v, \"(Calculation mistake in textbook while calculating 'm'. Hence, the answer differs)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of modes = 391.074660134 (Calculation mistake in textbook while calculating 'm'. Hence, the answer differs)\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8, Page number 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the number of modes for multimode fiber and calculate the same when lamda is changed to 1.3um'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.475 #core refractive index\n", + "n2 = 1.472 #cladding refractive index\n", + "a = 20 #core radius(um)\n", + "lamda = 0.85 #Wavelength(um)\n", + "\n", + "#Calculation\n", + "v = (2*math.pi*a*math.sqrt((n1**2-n2**2)))/lamda\n", + "M1 = v**2/2\n", + "\n", + "lamda2 = 1.3 #um\n", + "v2 = (2*math.pi*a*math.sqrt((n1**2-n2**2)))/lamda2\n", + "M2 = v2**2/2\n", + "\n", + "#Results\n", + "print \"Number of modes when lamda is changed =\",round(M1) #v is calculated wrongly in the book and answer for case a M not given\n", + "print \"Number of modes when lamda is changed =\",round(M2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of modes when lamda is changed = 97.0\n", + "Number of modes when lamda is changed = 41.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9, Page number 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the numerical aperture'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.5 #core refractive index\n", + "n2 = 1.48 #cladding refractive index\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "#Result\n", + "print \"Numerical aperture =\",round(NA,5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture = 0.24413\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10, Page number 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine core radius, NA and maximum acceptance angle'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.450 #core refractive index\n", + "n2 = 1.447 #cladding refractive index\n", + "lamda = 1.3 #Wavelength(um)\n", + "\n", + "#Calculation\n", + "v = 2.405\n", + "a = (v*lamda)/(2*math.pi*math.sqrt((n1**2-n2**2)))\n", + "\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "theta_max = math.degrees(math.asin(NA))\n", + "\n", + "#Results\n", + "print \"Core radius =\",round(a,3),\"um\"\n", + "print \"Numerical aperture =\",round(NA,4)\n", + "print \"Maximum acceptance angle =\",round(theta_max,3),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core radius = 5.338 um\n", + "Numerical aperture = 0.0932\n", + "Maximum acceptance angle = 5.349 degrees\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11, Page number 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine critical angle at core cladding interface, NA and acceptance angle'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.50 #core refractive index\n", + "n2 = 1.47 #cladding refractive index\n", + "\n", + "#calculations\n", + "theta_c = math.degrees(math.asin(n2/n1))\n", + "\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "theta_a = math.degrees(math.asin(NA))\n", + "\n", + "#Result\n", + "print \"Critical angle at core cladding interface =\",round(theta_c,1),\"degrees\"\n", + "print \"Numerical aperture =\",round(NA,2)\n", + "print \"Maximum acceptance angle =\",round(theta_a,1),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle at core cladding interface = 78.5 degrees\n", + "Numerical aperture = 0.3\n", + "Maximum acceptance angle = 17.4 degrees\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12, Page number 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the acceptance angle for skew rays'''\n", + "\n", + "#Variable declaration\n", + "NA = 0.4 #numerical aperture\n", + "#Since skew rays change direction by 100 degrees at each reflection,\n", + "r = 50 #degrees\n", + "\n", + "#Calculations\n", + "theta_as = math.degrees(math.asin(NA/math.cos(math.radians(r))))\n", + "\n", + "#print\n", + "print \"Acceptance angle =\",round(theta_as,1),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptance angle = 38.5 degrees\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13, Page number 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine normalized frequency and number of guided modes'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.48 #core refractive index\n", + "lamda = 0.85 #wavelength(um)\n", + "a = 80/2 #core radius(um)\n", + "delta = 1.5/100 #relative index difference\n", + "\n", + "#Calculations\n", + "v = (2*math.pi*a*n1*(2*delta)**0.5)/lamda\n", + "\n", + "M = v**2/2\n", + "\n", + "#Results\n", + "print \"Normalized frequency =\",round(v,1),\"Hz\"\n", + "print \"Number of guided modes =\",round(M)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized frequency = 75.8 Hz\n", + "Number of guided modes = 2872.0\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14, Page number 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine cut off value for normalized frequency and maximum core radius'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.5 #core refractive index\n", + "lamda = 1.3 #wavelength(um)\n", + "delta = 1./100. #relative index difference\n", + "alpha = 2\n", + "\n", + "#Calculations\n", + "v = 2.4*(1+2/alpha)**0.5\n", + "\n", + "a = (v*lamda)/(2*math.pi*n1*(2*delta)**0.5)\n", + "\n", + "#Results\n", + "print \"Cut off value for normalized frequency =\",round(v,2)\n", + "print \"Maximum core radius =\",round(a,2),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off value for normalized frequency = 3.39\n", + "Maximum core radius = 3.31 um\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15, Page number 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine cut-off wavelength for step index fiber'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.46 #core refractive index\n", + "a = 4.5 #core radius(um)\n", + "delta = 0.25/100\n", + "\n", + "#Calculation\n", + "lamda_c = (2*math.pi*a*n1*(2*delta)**0.5)/2.405\n", + "\n", + "#Result\n", + "print \"The cut-off wavelength is\",round(lamda_c,3),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut-off wavelength is 1.214 um\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16, Page number 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the numerical aperture and acceptance angle'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.45 #core refractive index\n", + "n2 = 1.4 #cladding refractive index\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "theta_m = math.degrees(math.asin(NA))\n", + "\n", + "#Result\n", + "print \"Numerical aperture =\",round(NA,4)\n", + "print \"Acceptance angle =\",round(theta_m,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture = 0.3775\n", + "Acceptance angle = 22.18 degrees\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17, Page number 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate cladding index, crtical internal reflection angle, external critical acceptance angle and numerical aperture'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.5 #core refractive index\n", + "delta = 0.0005\n", + "\n", + "#Calculations\n", + "n2 = n1*(1-delta)\n", + "\n", + "theta_c = math.degrees(math.asin(n2/n1))\n", + "\n", + "n0 = 1 #refractive index for air\n", + "theta_m = math.degrees(math.asin(((n1**2-n2**2)**0.5)/n0))\n", + "\n", + "NA = n1*math.sqrt(2*delta)\n", + "\n", + "#Results\n", + "print \"Cladding index =\",round(n2,5)\n", + "print \"Crtical internal reflection angle =\",round(theta_c,1),\"degrees\"\n", + "print \"External critical acceptance angle =\",round(theta_m,2),\"Degrees\"\n", + "print \"Numerical aperture =\",round(NA,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cladding index = 1.49925\n", + "Crtical internal reflection angle = 88.2 degrees\n", + "External critical acceptance angle = 2.72 Degrees\n", + "Numerical aperture = 0.0474\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18, Page number 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine acceptance angle for fiber in water'''\n", + "\n", + "#Variable declaration\n", + "NA = 0.20 #numerical aperture\n", + "n2 = 1.59 #cladding refractive index\n", + "n0 = 1.33 #refractive index for water \n", + "\n", + "#Calculations\n", + "n1 = math.sqrt(NA**2+n2**2)\n", + "NA = math.sqrt(n1**2-n2**2)/n0\n", + "theta_m = math.degrees(math.asin(NA))\n", + "\n", + "#Result\n", + "print \"Acceptance angle for fiber in water =\",round(theta_m,1),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptance angle for fiber in water = 8.6 degrees\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19, Page number 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the numerical aperture and acceptance angle'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.55 #core refractive index\n", + "n2 = 1.51 #cladding refractive index\n", + "\n", + "#Calculation\n", + "delta = (n1-n2)/n1\n", + "NA = 2*math.sqrt(delta)\n", + "\n", + "theta_m = math.degrees(math.asin(NA))\n", + "\n", + "#Result\n", + "print \"Numerical aperture =\",round(NA,4)\n", + "print \"Acceptance angle =\",round(theta_m,2),\"degrees\"\n", + "print \"\\nCalculation mistakes in textbook. Hence, the answers differ.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture = 0.3213\n", + "Acceptance angle = 18.74 degrees\n", + "\n", + "Calculation mistakes in textbook. Hence, the answers differ.\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20, Page number 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine normalized frequency'''\n", + "\n", + "#Variable declaration\n", + "n = 1.45 #core refractive index\n", + "lamda = 0.1 #wavelength(um)\n", + "a = 60/2 #core radius(um)\n", + "NA = 0.16 #numerical aperture\n", + "\n", + "#Calculations\n", + "v = (2*math.pi*a*NA)/lamda\n", + "\n", + "#Results\n", + "print \"Normalized frequency =\",round(v,1),\"(Calculation mistake in textbook)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized frequency = 301.6 (Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21, Page number 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate NA and multi path dospersion per unit length'''\n", + "\n", + "#Variable declaration\n", + "c = 3.*10**8 #speed of light in vacuum(m/s)\n", + "v = 2.*10**8 #speed of light in core(m/s)\n", + "theta_c = 75 #cricial angle(degrees)\n", + "\n", + "#Calculations\n", + "n1 = c/v\n", + "n2 = n1*math.sin(math.radians(theta_c))\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "delta_n = n1-n2\n", + "md = (n1/n2)*(delta_n/c) #multipath dispersion\n", + "\n", + "#Results\n", + "print \"Numerical aperture =\",round(NA,2)\n", + "print \"Multi path dospersion per unit length =\",round((md/1E-9),3),\"*10^-9 s/m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture = 0.39\n", + "Multi path dospersion per unit length = 0.176 *10^-9 s/m\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22, Page number 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine maximum thickness of guide slab'''\n", + "\n", + "#Variable declaration\n", + "n1 = 3.6 #core refractive index\n", + "n2 = 3.56 #cladding refractive index\n", + "lamda = 0.85 #wavelength(um)\n", + "#For TE10 mode,\n", + "m = 1\n", + "n = 0\n", + "vc = 2.405 #for planar guide\n", + "\n", + "#Calculation\n", + "a = (vc*lamda)/(2*math.pi*math.sqrt(n1**2-n2**2))\n", + "\n", + "#Result\n", + "print \"Maximum thickness of guide slab =\",round(a,3),\"um\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum thickness of guide slab = 0.608 um\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23, Page number 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate diameter of core'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.5 #core refractive index\n", + "lamda = 1.3*10**-6 #wavelength(um)\n", + "delta = 1./100. #relative index difference\n", + "M = 1100\n", + "\n", + "#Calculations\n", + "V = math.sqrt(2*M)\n", + "\n", + "a = (V*lamda)/(2*math.pi*n1*(2*delta)**0.5)\n", + "\n", + "d = 2*a\n", + "\n", + "#Result\n", + "print \"Diameter =\",round(d/1E-5,2),\"um(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 9.15 um(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24, Page number 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine critical angle and numerical aperture'''\n", + "\n", + "\n", + "#Variable declaration\n", + "n1 = 1.50 #core refractive index\n", + "n2 = 1.46 #cladding refractive index\n", + "\n", + "#Calculation\n", + "theta_c = math.degrees(math.asin(n2/n1))\n", + "\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "#Result\n", + "print \"Critical angle =\",round(theta_c,2),\"degrees\"\n", + "print \"Numerical aperture =\",round(NA,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle = 76.74 degrees\n", + "Numerical aperture = 0.34\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.25, Page number 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the acceptance angle for skew rays'''\n", + "\n", + "#Variable declaration\n", + "NA = 0.344 #numerical aperture\n", + "#Since skew rays change direction by 100 degrees at each reflection,\n", + "gamma = 100/2 #degrees\n", + "\n", + "#Calculations\n", + "#For meridional rays\n", + "theta_a = math.degrees(math.asin(NA))\n", + "#For speed rays\n", + "theta_as = math.degrees(math.asin(NA/math.cos(math.radians(gamma))))\n", + "\n", + "#print\n", + "print \"Acceptance angle for meridional rays =\",round(theta_a,2),\"degrees\"\n", + "print \"Acceptance angle for speed rays =\",round(theta_as,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptance angle for meridional rays = 20.12 degrees\n", + "Acceptance angle for speed rays = 32.36 degrees\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26, Page number 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the no. of guided modes and cut-off value of normalized frequency'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.5 #core refractive index\n", + "lamda = 1.55 #wavelength(um)\n", + "delta = 1.3/100. #relative index difference\n", + "alpha = 1.90 #index profile\n", + "a = 40/2 #core radius(um)\n", + "\n", + "#Calculations\n", + "Mg = (alpha/(alpha+2))*((n1*2*math.pi*a)/lamda)**2*delta\n", + "\n", + "Vc = 2.405*math.sqrt(1+2/alpha)\n", + "\n", + "#Results\n", + "print \"Number of guided modes =\",round(Mg)\n", + "print \"Cut-off value of normalized frequency =\",round(Vc,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of guided modes = 94.0\n", + "Cut-off value of normalized frequency = 3.45\n" + ] + } + ], + "prompt_number": 61 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication/Chapter_4.ipynb b/Optical_Communication/Chapter_4.ipynb new file mode 100755 index 00000000..875e1b2a --- /dev/null +++ b/Optical_Communication/Chapter_4.ipynb @@ -0,0 +1,1221 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d4d0afedfad591dd3db7bcb4692f0b80c70309a906e9699c9f80be4fd8fe4dbc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Signal Degradation in Optical Fibers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1, Page number 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the loss of fiber'''\n", + "\n", + "from sympy import *\n", + "import math\n", + "\n", + "#Variable declaration\n", + "L = 400./1000. #distance(km)\n", + "Pi = Symbol(\"Pi\")\n", + "Po = 0.25*Pi\n", + "\n", + "#Calculations\n", + "Loss = (10*math.log10(Pi/Po))/L\n", + "\n", + "#Result\n", + "print \"Loss =\",round(Loss),\"dB/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss = 15.0 dB/km\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2, Page number 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate power level'''\n", + "\n", + "#Variable declaration\n", + "L = 3 #distance(km)\n", + "a = 0.5 #attenuation loss(dB/km)\n", + "lamda = 0.82 #wavelength(um)\n", + "Pi = 1 #input power(mW)\n", + "\n", + "#Calculation\n", + "Po = Pi*10**((-a*L)/10)\n", + "\n", + "#Result\n", + "print \"Power level =\",round(Po,2),\"mW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power level = 0.71 mW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3, Page number 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine maximum possible link length'''\n", + "\n", + "#Variable declaration\n", + "a = 0.5 #attenuation loss(dB/km)\n", + "Pi = 1.5*10**-3 #input power(uW)\n", + "Po = 2.*10**-6 #output power(uW)\n", + "\n", + "#Calculation\n", + "L = (10*math.log10(Pi/Po))/a\n", + "\n", + "#Result\n", + "print \"Maximum possible link length =\",round(L,2),\"km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum possible link length = 57.5 km\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4, Page number 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine pulse dispersion per unit length'''\n", + "\n", + "#Variable declaration\n", + "pd = 1.2*10**-3 #pulse broadening(ns)\n", + "d = 30 #distance\n", + "\n", + "#Calculation\n", + "D = pd/d\n", + "\n", + "#Result\n", + "print \"Pulse dispersion per unit length =\",D,\"ns/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse dispersion per unit length = 4e-05 ns/m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5, Page number 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine the optical output power'''\n", + "\n", + "#Variable declaration\n", + "L = 30 #distance(km)\n", + "a = 0.8 #attenuation loss(dB/km)\n", + "lamda = 1300 #wavelength(nm)\n", + "Pi = 200 #input power(uW)\n", + "\n", + "#Calculation\n", + "Po = Pi*10**((-a*L)/10)\n", + "\n", + "#Result\n", + "print \"Optical output power =\",round(Po,3),\"uW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optical output power = 0.796 uW\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6, Page number 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine\n", + "a)Overall signal attenuation\n", + "b)signal attenuation per km\n", + "c)signal attenuation for the link\n", + "d)input output power ratio'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "L = 8 #distance(km)\n", + "Pi = 120*10**-6 #input power(W)\n", + "Po = 3*10**-6 #output power(W)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "a = 10*math.log10(Pi/Po)\n", + "\n", + "#Part b\n", + "adb = a/L\n", + "\n", + "#Part c\n", + "l = 10\n", + "x = adb*l #loss occured along 10km of fiber\n", + "y = 9 #loss due to splices(dB)\n", + "dB = x+y\n", + "\n", + "#Part d\n", + "pi_by_po = 10**(round(dB)/10)\n", + "\n", + "#Results\n", + "print \"a) Overall signal attenuation =\",round(a),\"dB\"\n", + "print \"b) Signal attenuation per km =\",round(adb),\"dB/km\"\n", + "print \"c) Signal attenuation for the link =\",round(dB),\"dB\"\n", + "print \"d) Input output power ratio =\",round(pi_by_po,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Overall signal attenuation = 16.0 dB\n", + "b) Signal attenuation per km = 2.0 dB/km\n", + "c) Signal attenuation for the link = 29.0 dB\n", + "d) Input output power ratio = 794.3\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7, Page number 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine theoretical attenuation for two given wavelengths'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tf = 1400 #fictive temperature(K)\n", + "p = 0.286 #photoelastic coeeficient for silica\n", + "n = 1.46 #refractive index\n", + "Bo = 7*10**-11 #isothermal compressibility\n", + "K = 1.381*10**-23 #Boltzman's constant(J/k)\n", + "L = 10**3\n", + "\n", + "#Calculation\n", + "#For lamda = 0.63 um\n", + "lamda1 = 0.63*10**-6 #wavelength(m)\n", + "Yr1 = (8*math.pi**3*n**8*p**2*Bo*K*Tf)/(3*lamda1**4)\n", + "E1 = math.exp(-Yr1*L)\n", + "a1 = 10.*math.log10(1/E1)\n", + "\n", + "#For lamda = 1.30 um\n", + "lamda2 = 1.30*10**-6 #wavelength(m)\n", + "Yr2 = (8*math.pi**3*n**8*p**2*Bo*K*Tf)/(3*lamda2**4)\n", + "E2 = math.exp(-Yr2*L)\n", + "a2 = 10.*math.log10(1/E2)\n", + "\n", + "\n", + "#Result\n", + "print \"(solutions of example 4.8 and 4.7 are interchanged in the textbook)\"\n", + "print \"Theoretical attenuation =\",round(a1,3),\"dB/km\"\n", + "print \"Theoretical attenuation =\",round(a2,3),\"dB/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(solutions of example 4.8 and 4.7 are interchanged in the textbook)\n", + "Theoretical attenuation = 5.21 dB/km\n", + "Theoretical attenuation = 0.287 dB/km\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8, Page number 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculating the refractive index of glass'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 1*10**-6 #wavelength(m)\n", + "p = 0.245 #photoelastic coefficient\n", + "Bc = 8.4*10**-11 #isothermal compressebility(m^2/N)\n", + "Tf = 758 #fictive temperature(K)\n", + "K = 1.381*10**-23 #Boltzman's constant(J/k)\n", + "alpha = 0.46 #attenuation(Db/Km)\n", + "L = 1.*10**3 #distance(km)\n", + "\n", + "#Calculations\n", + "Yr = (8*math.pi**3*p**2*Bc*K*Tf)/(3*lamda**4)\n", + "n= (alpha/(4.34*Yr*10**3))**(1./8.)\n", + "\n", + "#Result\n", + "print \"Refractive index =\",round(n,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index = 1.49\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9, Page nuber 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculating the operating wavelength of laser and attenuation of fiber'''\n", + "\n", + "#Variable declaration\n", + "Pb = 150.*10**-3 #threshold optical power for brillouin(W)\n", + "Pr = 1.5 #threshold optical power for raman(W)\n", + "d = 8.0 #core diameter(um)\n", + "v = 1 #bandwidth(GHz)\n", + "\n", + "#Calculations\n", + "'''\n", + "Pb is given by,\n", + "Pb = 4.4*10**-3*d^2*lamda^2*alpha*v ----(1)\n", + "\n", + "Pr is given by,\n", + "Pr = 5.9*10**-2*d^2*lamda*alpha ----(2)\n", + "\n", + "Dividing (1) by (2), we get,\n", + "'''\n", + "\n", + "lamda = (Pb*5.9*10**-2*d**2)/(Pr*4.4*10**-3*d**2)\n", + "\n", + "alpha = Pr/(5.9*10**-2*d**2*lamda)\n", + "\n", + "#Results\n", + "print \"Operating wavelength =\",round(lamda,2),\"um\"\n", + "print \"Attenuation =\",round(alpha,3),\"dB/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating wavelength = 1.34 um\n", + "Attenuation = 0.296 dB/km\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10, Page number 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Estimating the threshold optical powers for Brillowin and raman scattering'''\n", + "\n", + "#Variable declaration\n", + "d = 6 #core diameter(um)\n", + "v = 0.8 #bandwidth(GHz) \n", + "lamda = 1.5 #wavelength(um)\n", + "alpha = 0.5 #attenuation(dB/Km)\n", + "\n", + "#Calculations\n", + "Pb = 4.4*10**-3*d**2*lamda**2*alpha*v\n", + "\n", + "Pr = 5.9*10**-3*d**2*lamda*alpha\n", + "\n", + "#Results\n", + "print \"Threshold optical power for SBS =\",round((Pb/1E-3),2),\"mW\"\n", + "print \"Threshold optical power for SRS =\",round((Pr/1E-1),2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Threshold optical power for SBS = 142.56 mW\n", + "Threshold optical power for SRS = 1.59 W\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11, Page number 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determing the critical radius of curvature'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "delta = 3./100 #relative refracive index difference\n", + "n1 = 1.5 #refractive index of core\n", + "lamda = 0.82*10**-6 #operating wavelength(m)\n", + "\n", + "#Calculations\n", + "n2 = math.sqrt(n1**2-2*delta*n1**2)\n", + "\n", + "Rc = (3*n1**2*lamda)/(4*math.pi*(n1**2-n2**2)**0.5)\n", + "\n", + "#Results\n", + "print \"The critical radius of curvature is\",round((Rc/1E-6),3),\"um(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical radius of curvature is 1.199 um(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12, Page number 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculating the crtitical radius of curvature'''\n", + "\n", + "#Variable declaration\n", + "delta = 3./100 #relative refracive index difference\n", + "n1 = 2.0 #refractive index of core\n", + "lamda = 1.55*10**-6 #operating wavelength(m)\n", + "d = 8 #core diameter(um)\n", + "\n", + "#Calculations\n", + "a = d/2\n", + "n2 = math.sqrt(n1**2-2*delta*n1**2)\n", + "lamda_c = (2*math.pi*a*10**-6*n1*((2*delta)**0.5))/2.405\n", + "Rc = (20*lamda*(2.748-0.996*(lamda/lamda_c))**-3)/((n1**2-n2**2)**0.5)\n", + "\n", + "#Result\n", + "print \"The critical radius of curvature is\",round((Rc/1E-6),3),\"um\"\n", + "\n", + "#note There is a calculation mistake in calculating 'n' in the textbook. Hence, the difference in results\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical radius of curvature is 4.322 um\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13, Page number 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determine-\n", + "a)Maximum possible bandwidth\n", + "b)pulse dispersion per unit length\n", + "c)bandwidth length product'''\n", + "\n", + "#Variable declaration\n", + "t = 0.1*10**-6 #pulse broadening(sec)\n", + "L = 10 #distance(km)\n", + "\n", + "#Calculatons\n", + "#Part a\n", + "Bt = 1/(2*t)\n", + "\n", + "#Part b\n", + "D = t/L\n", + "\n", + "#Part c\n", + "Bl = Bt*L\n", + "\n", + "#Results\n", + "print \"a)Maximum possible bandwidth =\",Bt/1E+6,\"MHz\"\n", + "print \"b)Pulse dispersion per unit length =\",D/1E-6,\"us/km\"\n", + "print \"c)Bandwidth length product =\",Bl/1E+6,\"Mhz km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Maximum possible bandwidth = 5.0 MHz\n", + "b)Pulse dispersion per unit length = 0.01 us/km\n", + "c)Bandwidth length product = 50.0 Mhz km\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14, Page number 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Estimating the wavelength of transmitted light'''\n", + "\n", + "#Variable declaration\n", + "Rc = 84*10**-6 #radius of curvature(m)\n", + "n1 = 1.46 #core refractive index\n", + "n2 = 1.45 #cladding refractive index\n", + "\n", + "#Calculations\n", + "lamda = (Rc*4*math.pi*(n1**2-n2**2)**0.5)/(3*n1**2)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-6,2),\"um(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 28.16 um(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15, Page number 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculating the pulse broadening due to dispersion'''\n", + "\n", + "#Variable declaration\n", + "lamda = 1.5 #wavelength(um)\n", + "M = 20 #dispersion parameter(ps n/m-km)\n", + "L = 30 #length of fiber(km)\n", + "s_l = 2 #spectral width(nm)\n", + "\n", + "#Calculations\n", + "s_m = s_l*L*M\n", + "\n", + "#Result\n", + "print \"Pulse broadening =\",s_m,\"ps\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse broadening = 1200 ps\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16, Page number 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculating material dispersion parameter and rms pulse broadening'''\n", + "\n", + "#Variable declaration\n", + "lamda = 850 #wavelength(nm)\n", + "s_l = 20 #spectral width(nm)\n", + "Dh = 0.025 #material dispersion\n", + "c = 2.998*10**5 #speed of light(km/s)\n", + "L = 1 #length of fiber(km)\n", + "\n", + "#Calculations\n", + "M = Dh/(c*lamda)\n", + "\n", + "s_m = s_l*L*M\n", + "\n", + "#Results\n", + "print \"Material dispersion parameter =\",round((M/1E-12),2),\"ps n/m km^-1\"\n", + "print \"RMS pulse broadening =\",round((s_m/1E-9),2),\"ns/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material dispersion parameter = 98.1 ps n/m km^-1\n", + "RMS pulse broadening = 1.96 ns/km\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17, Pge number 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determing the pulse boradening per km'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.9 #wavelength(um)\n", + "s_l = 45 #spectral width(um)\n", + "Dh = 4*10**-2 #material dispersion\n", + "c = 3*10**8 #speed of light(m/s)\n", + "L = 1 #length of fiber(km)\n", + "\n", + "#Calculations\n", + "s_m = (s_l*L*Dh*lamda)/c\n", + "\n", + "#Result\n", + "print \"Pulse boradening =\",s_m/1E-9,\"ns/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse boradening = 5.4 ns/km\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18, Page number 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Determing the pulse boradening per km'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.85 #wavelength(nm)\n", + "M = 95 #material dispersion parameter(ps n/m km^-1)\n", + "\n", + "#Calculations\n", + "s_l = 0.0012*lamda\n", + "s_m = s_l*L*M\n", + "\n", + "#Result\n", + "print \"Pulse boradening =\",s_m,\"ns/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse boradening = 0.0969 ns/km\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19, Page number 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculating the pulse broadening'''\n", + "\n", + "#Variable declaration\n", + "NA = 0.275 #numerical aperture\n", + "n1 = 1.48 #core refractive index\n", + "L = 5 #length of fiber(km)\n", + "c = 3.*10**5 #speed of light(km/sec)\n", + "\n", + "#Calculations\n", + "STs = (L*NA**2)/(2*n1*c)\n", + "\n", + "#Result\n", + "print \"Pulse broadening =\",round((STs/1E-9),2),\"ns(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse broadening = 425.82 ns(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20, Page number 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate -\n", + "a)delay difference between modes\n", + "b)rms pulse broadening\n", + "c)maximum bit rate\n", + "d)bandwidth length product'''\n", + "\n", + "from math import sqrt\n", + "\n", + "#Variable declaration\n", + "L = 3*10**3 #length of link(m)\n", + "n1 = 1.5 #refractive index of core\n", + "D = 2./100 #refractive index difference\n", + "c = 2.998*10**8 #speed of light(m/s)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Sts = (L*n1*D)/c\n", + "\n", + "#Part b\n", + "s_s = (L*n1*D)/(2*sqrt(3)*c)\n", + "\n", + "#Part c\n", + "Bt = 1/(2*Sts)\n", + "\n", + "#Part d\n", + "Bl = Bt*L\n", + " \n", + "#Results\n", + "print \"Delay difference is\",round(Sts/1E-9),\"ns\"\n", + "print \"rms pulse broadening due to intermodal dispersion is\",round((s_s/1E-9),1),\"ns\"\n", + "print \"Maximum bit rate is\",round((Bt/1E+6),1),\"Mbits/sec\"\n", + "print \"Bandwidth length product is\",round((Bl/1E+9),1),\"MHz km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delay difference is 300.0 ns\n", + "rms pulse broadening due to intermodal dispersion is 86.7 ns\n", + "Maximum bit rate is 1.7 Mbits/sec\n", + "Bandwidth length product is 5.0 MHz km\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21, Page number 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculating the rms pulse broadening per km for multimode step index fiber and graded index fiber'''\n", + "\n", + "#Variable declaration\n", + "s_s = 86.7 #pulse broadening(ns)\n", + "L = 6 #length of link(km)\n", + "n1 = 1.5 #core refractive index\n", + "delta = 1./100 #refractive index difference\n", + "c = 2.998*10**8 #speed of light(m/s)\n", + "\n", + "#Calculations\n", + "s_m = s_s/L\n", + "\n", + "L1 = 10**3\n", + "s_g = (L1*n1*delta**2)/(20*sqrt(3)*c)\n", + "\n", + "#Result\n", + "print \"The rms pulse broadening per km for multimode step index fiber is\",s_m,\"ns/km\"\n", + "print \"The rms pulse broadening per km for graded index fiber is\",round((s_g/1E-12),2),\"ps/km\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rms pulse broadening per km for multimode step index fiber is 14.45 ns/km\n", + "The rms pulse broadening per km for graded index fiber is 14.44 ps/km\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22, Page number 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Estimating the total pulse broadening per km '''\n", + "\n", + "#Variable declaration\n", + "NA = 0.4 #numerical aperture\n", + "n1 = 1.48 #core refractive index\n", + "n2 = 1.47 #cladding refractive index\n", + "M = 30 #material dispersion parameter(ps n/m /km)\n", + "s_l = 25 #spectral width(ns)\n", + "L = 1 #length of fiber(km)\n", + "delta = 1./100 #refractive index difference\n", + "\n", + "#Calculations\n", + "s_m = M*L*s_l\n", + "s_s = (L1*n1*delta**2)/(20*sqrt(3)*c)\n", + "s_t = math.sqrt(s_m**2+s_s**2)\n", + "\n", + "#Results\n", + "print \"Total pulse broadening per km is\",s_t,\"ps\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pulse broadening per km is 750.0 ps\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23, Page number 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate-\n", + "a)total pulse broadening per km\n", + "b)bandwidth length product'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "NA = 0.3 #numerical aperture\n", + "n1 = 1.45 #core refractive index\n", + "M = 250 #material dispersion parameter(ps n/m /km)\n", + "s_l = 50 #spectral width(ns)\n", + "L = 1 #length of fiber(km)\n", + "c = 2.998*10**8 #speed of light(m/s)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "s_m = (M*L*s_l)*10**-3 #ns/km\n", + "s_s = ((L*10**3*NA**2)/(4*math.sqrt(3)*n1*c*10**3))*10**12 #ns/km\n", + "s_t = math.sqrt(s_m**2+s_s**2)\n", + "\n", + "#Part b\n", + "Bl = 0.2/s_t\n", + "\n", + "#Results\n", + "print \"a)total pulse broadening =\",round(s_t,2),\"ns/km\" #Answer varies due to rounding-off errors\n", + "print \"b)bandwidth length product =\",round((Bl/1E-3),1),\"Mhz km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)total pulse broadening = 32.39 ns/km\n", + "b)bandwidth length product = 6.2 Mhz km\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24, Page number 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Finding the beat length'''\n", + "\n", + "#Variable declaration\n", + "lamda = 1.32 #wavelength(um)\n", + "Lbc = 100 #length of fiber(km)\n", + "Sf = 1.5 #spectral width(nm)\n", + "\n", + "#Calculations\n", + "Bf = lamda**2/(Lbc*Sf)\n", + "Lb = lamda/Bf\n", + "\n", + "#Result\n", + "print \"Beat length =\",round(Lb,1),\"km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Beat length = 113.6 km\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25, Page number 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate modal birefringence'''\n", + "\n", + "#Variable declaration\n", + "lamda = 1.3*10**-6 #wavelength(um)\n", + "Lb1 = 0.5*10**-3 #length of fiber(mm)\n", + "Lb2 = 60 #(m)\n", + "\n", + "#Calculations\n", + "#for beat length of 0.5mm,\n", + "Bf1 = lamda/Lb1\n", + "\n", + "#for beat length of 60m,\n", + "Bf2 = lamda/Lb2\n", + "\n", + "#Result\n", + "print \"The modal birefringences are \",Bf1/1E-3, \"*10^-3 and\",round((Bf2/1E-8),2),\"*10^-4\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The modal birefringences are 2.6 *10^-3 and 2.17 *10^-4\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26, Page number 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the modal birefringence, coherence length and difference between propagation constants'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.5*10**-6 #wavelength(um)\n", + "Lb = 5*10**-2 #length of fiber(km)\n", + "S_l = 1*10**-9 #spectral width(nm)\n", + "\n", + "#Calculations\n", + "Bf = lamda/Lb\n", + "\n", + "Lbc = lamda**2/(Bf*S_l)\n", + "\n", + "B = (2*math.pi)/Lb #Bx-By\n", + "\n", + "#Results\n", + "print \"Modal birefringence =\",Bf\n", + "print \"Coherence length =\",Lbc,\"m\"\n", + "print \"Difference between propagation constants =\",round(B,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Modal birefringence = 1e-05\n", + "Coherence length = 25.0 m\n", + "Difference between propagation constants = 125.7\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.27, Page number 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculating the maximum bit rate'''\n", + "\n", + "#Variable declaration\n", + "L = 10*10**3 #length of fiber(m)\n", + "St2 = 600*10**-12 #mode dispersion(s/km)\n", + "\n", + "#Calculations\n", + "Bt = 0.9/(0.55*St2*L)\n", + "\n", + "#Result\n", + "print \"Maximum bit rate =\",round(Bt/1E+3),\"Kbps\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum bit rate = 273.0 Kbps\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication/Chapter_5.ipynb b/Optical_Communication/Chapter_5.ipynb new file mode 100755 index 00000000..6b192b74 --- /dev/null +++ b/Optical_Communication/Chapter_5.ipynb @@ -0,0 +1,1335 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:adfcaa081bb7f14f2178d52935bce7ffac6e527935ac706afefb7bf81046d312" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Optical Sources:Light emitting diode and Lasers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page number 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find-\n", + "a)bulk recombination life time\n", + "b)internal quantum efficiency\n", + "c)internal power level'''\n", + "\n", + "#Variable declaration\n", + "lamda = 1310*10**-9 #operating wavelength(m)\n", + "Tr = 30. #radiative recombination times(ns)\n", + "Tnr = 100. #non-radiative recombination times(ns)\n", + "i = 40*10**-3 #injected current(A)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "c = 3*10**8 #speed of light(m/s)\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "T = 1/(1/Tr+1/Tnr)\n", + "\n", + "#Part b\n", + "Nint = T/Tr\n", + "\n", + "#Part c\n", + "Pint = (Nint*h*c*i)/(e*lamda)\n", + "\n", + "#Results\n", + "print \"a)Bulk recombination life time =\",round(T,2),\"ns\"\n", + "print \"b)Internal quantum efficiency =\",round(Nint,3)\n", + "print \"c)Internal power level =\",round((Pint/1E-3),2),\"mW(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Bulk recombination life time = 23.08 ns\n", + "b)Internal quantum efficiency = 0.769\n", + "c)Internal power level = 29.15 mW(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page number 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the power radiated by an LED'''\n", + "\n", + "#Variable declaration\n", + "lamda = 670*10**-9 #operating wavelength(m)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "c = 3*10**8 #speed of light(m/s)\n", + "i = 50*10**-3 #injected current(mA)\n", + "Nint = 3./100 #quantum efficiency\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "P = (Nint*h*c*i)/(lamda*e)\n", + "\n", + "#Result\n", + "print \"Power radiated =\",round((P/1E-3),4),\"mW(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power radiated = 2.7789 mW(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3, Page number 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the non-radiative recombination time'''\n", + "\n", + "#Variable declaration\n", + "lamda = 890.*10**-9 #operating wavelength(m)\n", + "Tr = 100. #radiative recombination times(ns)\n", + "T = 130. #bulk-radiative recombination times(ns)\n", + "i = 14.*10**-3 #injected current(mA)\n", + "\n", + "#Calculation\n", + "Tnr = 1/(1/Tr-1/T)\n", + "\n", + "#Result\n", + "print \"The non-radiative recombination time is\",round(Tnr,1),\"ns\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The non-radiative recombination time is 433.3 ns\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page number 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the power internally generated within the device'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.87*10**-6 #operating wavelength(m)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "c = 3*10**8 #speed of light(m/s)\n", + "i = 40*10**-3 #injected current(mA)\n", + "Nint = 0.625 #quantum efficiency\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "P = (Nint*h*c*i)/(lamda*e)\n", + "\n", + "#Result\n", + "print \"Power radiated =\",round((P/1E-3),2),\"mW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power radiated = 35.67 mW\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5, Page number 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Estimate the optical power emitted into air'''\n", + "\n", + "from sympy import *\n", + "\n", + "#Variable declaration\n", + "F = 0.68 #transmission factor\n", + "nx = 3.6 #refractive index of GaAs\n", + "n = 1 #refractive index of air\n", + "\n", + "#Calculations\n", + "Pint = Symbol('Pint')\n", + "Pe = round(((F*n**2)/(4*F*nx**2)),4)*Pint\n", + "\n", + "#Result\n", + "print \"Optical power emitted =\",Pe" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optical power emitted = 0.0193*Pint\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6, Page number 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find -\n", + "a)coupling efficiency\n", + "b)optical loss relative to power emitted from LED'''\n", + "\n", + "import math \n", + "\n", + "#Variable declaration\n", + "NA = 0.2 #numerical paerture\n", + "n = 1.4 #refractive index of core\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Nc = NA**2\n", + "\n", + "#Part b\n", + "Loss = -math.log10(Nc)\n", + "\n", + "#Results\n", + "print \"a)Coupling efficiency =\",Nc\n", + "print \"b)Optical loss =\",round(Loss,2),\"dB(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Coupling efficiency = 0.04\n", + "b)Optical loss = 1.4 dB(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7, Page number 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the optical power coupled into the fiber'''\n", + "\n", + "import math \n", + "\n", + "#Variable declaration\n", + "r = 0.01 #Fresnel reflection coefficient\n", + "NA = 0.15 #numerical aperture\n", + "Rd = 30 #radiance(s/r-cm^2)\n", + "i = 40 #drive current(mA)\n", + "R = 50./2*10**-4 #radius(cm)\n", + "\n", + "#Calculations\n", + "A = math.pi*R**2 #area\n", + "Pc = math.pi*(1-r)*A*Rd*NA**2\n", + "\n", + "#Result\n", + "print \"Optical power coupled into the fiber =\",round((Pc/1E-6),1),\"uW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optical power coupled into the fiber = 41.2 uW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8, Page number 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the overall power conversion efficiency'''\n", + "\n", + "#Variable declaration\n", + "Pc = 150*10**-6 #optical power(W)\n", + "If = 25*10**-3 #forward current(A)\n", + "Vf = 2.5 #forward voltage(V)\n", + "\n", + "#Calculation\n", + "P = If*Vf\n", + "Npc = (Pc/P)*100\n", + "\n", + "#Result\n", + "print \"The overall power conversion efficiency is\",round(Npc,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The overall power conversion efficiency is 0.24 %\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9, Page number 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the output power when device is modulated'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Pdc = 300*10**-6 #optical o/p power(W)\n", + "f = 20*10**6 #frequency(Hz)\n", + "Ti = 5*10**-9 #recombination life time(sec)\n", + "\n", + "#Calculation\n", + "w = 2*math.pi*f\n", + "Pe = Pdc*(1+((w*Ti)**2))**-0.5\n", + "\n", + "#Result\n", + "print \"Output power of the device =\",round((Pe/1E-6),2),\"uW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power of the device = 254.02 uW\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10, Page number 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find-\n", + "a)internal quantum efficiency and internal power level\n", + "b)power emiited from device'''\n", + "\n", + "#Variable declaration\n", + "lamda = 1310*10**-9 #operating wavelength(m)\n", + "Tr = 25. #radiative recombination times(ns)\n", + "Tnr = 90. #non-radiative recombination times(ns)\n", + "i = 35*10**-3 #injected current(A)\n", + "n = 3.5 #refractive index\n", + "h = 6.625*10**-34 #Planck's constant\n", + "c = 3*10**8 #speed of light(m/s)\n", + "q = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "T = 1/(1/Tr+1/Tnr)\n", + "Nint = T/Tr\n", + "Pint = (Nint*h*c*i)/(q*lamda)\n", + "\n", + "#Part b\n", + "P = Pint/(n*(n+1)**2)\n", + "\n", + "#Results\n", + "print \"a)Internal quantum efficiency =\",round(Nint,3)\n", + "print \" Internal power level =\",round((Pint/1E-3),2),\"mW(Calculation mistake in textbook)\"\n", + "print \"b)Power emitted from device =\",round((P/1E-3),3),\"mW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Internal quantum efficiency = 0.783\n", + " Internal power level = 25.97 mW(Calculation mistake in textbook)\n", + "b)Power emitted from device = 0.366 mW\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11, Page number 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the transmission factor'''\n", + "\n", + "#Varible declaration\n", + "I = 37 #drive current(mA)\n", + "V = 1.6 #potential difference(V)\n", + "Nep = 0.75 #power efficiency(%)\n", + "Pint = 30 #optical power(mW)\n", + "nx = 3.46 #refractive index of InP\n", + "n = 1 #refractive index of air\n", + "\n", + "#Calculations\n", + "P = I*V\n", + "Pe = (P*Nep)/100\n", + "F = (Pe*4*nx**2)/(Pint*n**2)\n", + "\n", + "#Result\n", + "print \"Transmission factor =\",round(F,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmission factor = 0.7\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12, Page number 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the external power efficiency'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.85*10**-6 #operating wavelength(m)\n", + "Nint = 60./100 #internal quantum efficiency\n", + "i = 20*100**-3 #forward current(A/s)\n", + "v = 1 #potential difference(V)\n", + "F = 0.68 #transmission factor\n", + "nx = 3.6 #refractive index of GaAs\n", + "n = 1 #refractive index of air\n", + "h = 6.625*10**-34 #Planck's constant\n", + "c = 3*10**8 #speed of light(m/s)\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "Pint = (Nint*h*c*i)/(e*lamda)\n", + "Pe = (Pint*F*v)/(4*nx**2)\n", + "Nep = (Pe/(i*v))*100\n", + "\n", + "#Result\n", + "print \"External power efficiency =\",round(Nep,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "External power efficiency = 1.15 %\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13, Page number 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the ratio of stimulated emission rate to spontaneous emission rate'''\n", + "\n", + "import math \n", + "\n", + "#Variable declaration\n", + "lamda = 0.5*10**-6 #operating wavelength(m)\n", + "T = 1000 #temperature(K)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.625*10**-34 #Planck's constant\n", + "k = 1.38*10**-23 #Boltman's constant\n", + "\n", + "#Calculations\n", + "f = c/lamda\n", + "r = 1/(math.exp((h*f)/(k*T))-1)\n", + "\n", + "#Result\n", + "print \"Ratio = \",round((r/1E-13),2),\"*10^-13\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio = 3.09 *10^-13\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14, Page number 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the optical spacing between mirrors'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.5*10**-6 #operating wavelength(m)\n", + "n = 1.38 #refractive index of laser\n", + "T = 1000 #temperature(K)\n", + "q = 1.3*10**4 #longitudnal modes\n", + "\n", + "#Calculation\n", + "L = (lamda*q)/(2*n)\n", + "\n", + "#Result\n", + "print \"The optical spacing between mirrors is\",round((L/1E-3),1),\"*10^-3 m(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The optical spacing between mirrors is 2.4 *10^-3 m(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15, Page number 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the number of longitudnal modes and their frequency seperation'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.55*10**-6 #operating wavelength(m)\n", + "n = 1.78 #refractive index of laser\n", + "L = 4*10**-2 #crystal length(m)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "\n", + "#Calculation\n", + "q = (2*n*L)/lamda\n", + "\n", + "Sf = c/(2*n*L)\n", + "\n", + "#Result\n", + "print \"The number of longitudnal modes are\",round((q/1E+5),1),\"*10^5\"\n", + "print \"The frequency seperations is\",round((Sf/1E+9),1),\"GHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of longitudnal modes are 2.6 *10^5\n", + "The frequency seperations is 2.1 GHz\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16, Page number 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the optical gain'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "R1 = 0.32\n", + "R2 = R1\n", + "alpha = 10*10**-2 #cm\n", + "L = 500*10**-6 #m\n", + "\n", + "#Calculation\n", + "gth = alpha+((math.log(1/(R1*R2)))/(2*L))\n", + "\n", + "#Result\n", + "print \"Optical gain =\",round((gth/1E+2),1),\"cm^-1(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optical gain = 22.8 cm^-1(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17, Page number 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find frequency and wavelength spacing'''\n", + "\n", + "#Variable declaration\n", + "lamda = 850*10**-9 #operating wavelength(m)\n", + "n = 3.7 #refractive index of laser\n", + "L = 500*10**-6 #length(m)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "\n", + "#Calculations\n", + "Sf = c/(2*n*L)\n", + "\n", + "Sl = lamda**2/(2*L*n)\n", + "\n", + "#Results\n", + "print \"Frequency =\",round(Sf/1E+9),\"GHz\"\n", + "print \"Wavelength spacing =\",round((Sl/1E-9),3),\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 81.0 GHz\n", + "Wavelength spacing = 0.195 nm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18, Page number 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the radiative minority carrier lifetimes in GaAs nd Si'''\n", + "\n", + "#Variable declaration\n", + "Br1 = 7.21*10**-10 #for GaAs\n", + "Br2 = 1.79*10**-15 #for Si\n", + "N = 10**18 #hole concentration(/cm^3)\n", + "\n", + "#Calculations\n", + "#For GaAs\n", + "Tr = (Br1*N)**-1\n", + "\n", + "#For Si\n", + "Tt = (Br2*N)**-1\n", + "\n", + "#Results\n", + "print \"The radiative minority carrier lifetimes in GaAs is\",round((Tr/1E-9),1),\"ns\"\n", + "print \"The radiative minority carrier lifetimes in Si is\",round((Tt/1E-9),1),\"ns\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radiative minority carrier lifetimes in GaAs is 1.4 ns\n", + "The radiative minority carrier lifetimes in Si is 558659.2 ns\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19, Page number 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the threshold density'''\n", + "\n", + "import math \n", + "\n", + "#Varaible declaration\n", + "B = 21*10**-3 #gain factor(A/cm^3)\n", + "alpha = 10 #loss coefficent(/cm)\n", + "L = 250*10**-6 #optical cavity length(m)\n", + "r = 0.32 #reflectivity\n", + "\n", + "#Calculation\n", + "Jth = (alpha+(1/L)*math.log(1/r))/B\n", + "\n", + "#Result\n", + "print \"Threshold density =\",round((Jth/1E+3),2),\"*10^3 A/cm^2(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Threshold density = 217.51 *10^3 A/cm^2(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20, Page number 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the external power efficiency of the device'''\n", + "\n", + "#Variable declaration\n", + "Nt = 18./100 #total efficiency\n", + "Eg = 1.43 #bandgap energy(eV)\n", + "V = 2.5 #voltage(V)\n", + "\n", + "#Calculation\n", + "Next = ((Nt*Eg)/V)*100\n", + "\n", + "#Result\n", + "print \"External power efficiiency =\",round(Next),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "External power efficiiency = 10.0 %\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21, Page number 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Estimate the ratio of threshold current densities'''\n", + "\n", + "import math \n", + "\n", + "#Variable declaration\n", + "T1 = 293. #tempearute(K)\n", + "T2 = 353. #K\n", + "To = 160. #K\n", + "\n", + "#Calculations\n", + "#At 20C\n", + "Jth1 = math.exp(T1/To)\n", + "\n", + "#At 80C\n", + "Jth2 = math.exp(T2/To)\n", + "\n", + "Jth = Jth2/Jth1\n", + "\n", + "#Result\n", + "print \"Ratio of current densities =\",round(Jth,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of current densities = 1.45\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22, Page number 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the optical emission wavelength'''\n", + "\n", + "#Varaible declaraion\n", + "Eg = 1.43 #bandgap energy(eV)\n", + "h = 6.625*10**-34 #Planck's constant\n", + "c = 3*10**8 #speed of light(m/s)\n", + "e = 1.602*10**-19 #charge of an electron\n", + "\n", + "#Calculations\n", + "lamda = (h*c)/(Eg*e)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-6,3),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 0.868 um\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23, Page number 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the threshold coefficient gain'''\n", + "\n", + "#Variable declaration\n", + "L = 0.5 #cavity length(mm)\n", + "alpha = 1.5 #loss coefficent\n", + "R1 = 0.35 #refractivities\n", + "R2=R1\n", + "T = 0.8 #confinement factor\n", + "\n", + "#Calculation\n", + "gth = alpha+((math.log(1/(R1*R2)))/(2*L))\n", + "t = gth/T\n", + "\n", + "#Result\n", + "print \"Threshold coeeficient =\",round(t,2),\"mm^-1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Threshold coeeficient = 4.5 mm^-1\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24, Page number 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the cavity length and no. of longitudnal modes'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.87*10**-6 #operating wavelength(m)\n", + "n = 3.6 #refractive index of laser\n", + "Sf = 278.*10**9 #frequency(Hz)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "\n", + "#Calculations\n", + "L = c/(2*n*Sf)\n", + "\n", + "x = (2*n*L)/lamda\n", + "\n", + "#Results\n", + "print \"Cavity length =\",round((L/1E-2),4),\"cm\"\n", + "print \"No. of longitudnal modes =\",round((x/1E+3),2),\"*10^3\"\n", + "\n", + "#Answers are calculated incorrectly in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cavity length = 0.015 cm\n", + "No. of longitudnal modes = 1.24 *10^3\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25, Page number 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the internal quantum efficiency'''\n", + "\n", + "#Variable declaration\n", + "n = 3.6 #refractive index of laser\n", + "L = 500*10**-6 #cavity length(mm)\n", + "alpha = 20 #loss coefficent(/cm)\n", + "Nd = 45./100 #differential quantum efficiency\n", + "\n", + "#Calculations\n", + "r1 = ((n-1)/(n+1))**2\n", + "r2=r1\n", + "Ni = Nd*(1+((2*alpha*L)/(math.log(1/(r1*r2)))))\n", + "\n", + "#Result\n", + "print \"Internal quantum efficiency =\",round((Ni*100),2),\"%(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal quantum efficiency = 45.39 %(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26, Page number 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Estimate the no. of longitudnal modes and frequency seperation'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.5*10**-6 #operating wavelength(m)\n", + "n = 1.5 #refractive index of laser\n", + "L = 7*10**-2 #crystal length(m)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "\n", + "#Calculation\n", + "q = (2*n*L)/lamda\n", + "\n", + "Sf = c/(2*n*L)\n", + "\n", + "#Result\n", + "print \"The number of longitudnal modes are\",round((q/1E+5),1),\"*10^5\"\n", + "print \"The frequency seperations is\",round((Sf/1E+9),2),\"GHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of longitudnal modes are 4.2 *10^5\n", + "The frequency seperations is 1.43 GHz\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27, Page number 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''find the length of optical cavity and no. of longitudnal modes'''\n", + "\n", + "#Variable declaration\n", + "lamda = 0.87*10**-6 #operating wavelength(m)\n", + "n = 3.6 #refractive index of laser\n", + "Sf = 278.*10**9 #frequency(Hz)\n", + "c = 2.99*10**8 #speed of light(m/s)\n", + "\n", + "#Calculations\n", + "L = c/(2*n*Sf)\n", + "\n", + "x = (2*n*L)/lamda\n", + "\n", + "#Results\n", + "print \"Cavity length =\",round((L/1E-6),1),\"um\"\n", + "print \"No. of longitudnal modes =\",round((x),2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cavity length = 149.4 um\n", + "No. of longitudnal modes = 1236.25\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28, Page number 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find hole concentration'''\n", + "\n", + "#Variable declaration\n", + "Tr = 1*10**-9 #minority carrier lifetime(sec)\n", + "Br = 2.39*10**-10\n", + "\n", + "#Calculation\n", + "P = 1/(Tr*Br)\n", + "\n", + "#Result\n", + "print \"Hole concentration =\",round((P/1E+18),2),\"*10^18 cm^-3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hole concentration = 4.18 *10^18 cm^-3\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29, Page number 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the gain factor'''\n", + "\n", + "#Variable declaration\n", + "L = 50*10**-6 #cavity length(m)\n", + "w = 15 #width(/cm)\n", + "Ith = 50*10**-3 #threshold current(A)\n", + "r1 = 0.3 #reflectivity\n", + "r2=r1\n", + "alpha = 10 #loss coefficient(/cm)\n", + "\n", + "\n", + "#Calculations\n", + "Jth = Ith/(L*w)\n", + "B = (1/Jth)*(alpha+((1/(2*L))*math.log(1/(r1*r2))))\n", + "\n", + "#Result\n", + "print \"Gain factor =\",round((B/1E+2),2),\"*10^2 cm/A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain factor = 3.61 *10^2 cm/A\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30, Page number 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the internal quantum efficiency'''\n", + "\n", + "#Variable declaration\n", + "n = 3.6 #refractive index of laser\n", + "L = 500*10**-6 #cavity length(mm)\n", + "alpha = 20 #loss coefficent(/cm)\n", + "N = 22.5/100 #external quantum efficiency\n", + "\n", + "#Calculations\n", + "r1 = ((n-1)/(n+1))**2\n", + "r2=r1\n", + "Ni = N/(1/((1+((2*alpha*L)/(math.log(1/(r1*r2)))))))\n", + "ni=N*(1+((2*alpha*L*10**-4)/(math.log(1/(r1*r2)))))\n", + "\n", + "\n", + "#Result\n", + "print \"Internal quantum efficiency =\",round((Ni*100),2),\"%(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal quantum efficiency = 22.7 %(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Example 5.31 is same as example 5.14\n", + "Example 5.32 is same as example 5.16\n", + "Example 5.33 is same as example 5.18\n", + "Example 5.34 is same as example 5.19\n", + "Example 5.35 is same as example 5.21\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 1, + "text": [ + "'\\nExample 5.31 is same as example 5.14\\nExample 5.32 is same as example 5.16\\nExample 5.33 is same as example 5.18\\nExample 5.34 is same as example 5.19\\nExample 5.35 is same as example 5.21\\n'" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication/Chapter_6.ipynb b/Optical_Communication/Chapter_6.ipynb new file mode 100755 index 00000000..dd5d0e2a --- /dev/null +++ b/Optical_Communication/Chapter_6.ipynb @@ -0,0 +1,888 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a50462da831719a6431c94babed9d22bf70a3961b6e3e7b72f3c1cbaed2eb5dc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Optical detectors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1, Page number 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the quantum efficiency'''\n", + "\n", + "#Varaible declaration \n", + "re = 4.2*10**6 #EHP's\n", + "rp = 6*10**6 #no. of photons\n", + "lamda = 1200 #wavelength(nm)\n", + "\n", + "#Calculation\n", + "N = re/rp\n", + "\n", + "#Result\n", + "print \"Quantum efficiency =\",N*100,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantum efficiency = 70.0 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2, Page number 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find photocurrent'''\n", + "\n", + "#Varaible declaration \n", + "R = 0.85 #responsivity(A/W)\n", + "Po = 1 #incident power(mW)\n", + "\n", + "#Calculation\n", + "Ip = R*Po\n", + "\n", + "#Result\n", + "print \"Photocurrent =\",Ip,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Photocurrent = 0.85 mA\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3, Page number 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find responsivity of photo diode'''\n", + "\n", + "#Varaible declaration \n", + "E = 0.75*1.6*10**-19 #energy gap(V)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "N = 60./100 #quantum efficiency\n", + "h = 6.62*10**-34 #Planck's constant\n", + "\n", + "#Calculation\n", + "lamda = (h*c)/E\n", + "R = (N*lamda)/1248\n", + "\n", + "#Result\n", + "print \"Responsivity =\",round((R/1E-9),1),\"A/W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Responsivity = 0.8 A/W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4, Page number 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find responsivity and quantum efficiency'''\n", + "\n", + "#Varaible declaration \n", + "re = 1.5*10**12 #EHP's\n", + "rp = 3*10**12 #no. of photons\n", + "lamda = 0.65*10**-6 #wavelength(m)\n", + "h = 6.62*10**-34 #Palnck's constant\n", + "c = 3*10**8 #speed of light(m/s)\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculation\n", + "N = re/rp\n", + "\n", + "R = (N*e*lamda)/(h*c)\n", + "\n", + "#Result\n", + "print \"Quantum efficiency =\",N*100,\"%\"\n", + "print \"Responsivity =\",round(R,3),\"A/W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantum efficiency = 50.0 %\n", + "Responsivity = 0.262 A/W\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5, Page number 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Estimate -\n", + "a)operating walength\n", + "b)incident optical power'''\n", + "\n", + "#Varaible declaration \n", + "E = 1.5*10**-19 #photon energy(J)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "N = 65./100 #quantum efficiency\n", + "Ip = 1.5*10**-6 #photocurrent(A)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "c = 3*10**8 #speed of light(m/s)\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "lamda = (h*c)/E\n", + "\n", + "#Part b\n", + "f = c/lamda\n", + "R = (N*e)/(h*f)\n", + "Po = Ip/R\n", + "\n", + "#Results\n", + "print \"a)Operating waelength =\",lamda/1E-6,\"um\"\n", + "print \"b)Optical power =\",round((Po/1E-6),2),\"uW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Operating waelength = 1.324 um\n", + "b)Optical power = 2.16 uW\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6, Page number 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find wavelength'''\n", + "\n", + "#Varaible declaration \n", + "Eg = 1.43*1.6*10**-19 #energy gap(V)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "\n", + "#Calculations\n", + "lamda_c = (h*c)/Eg\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round((lamda_c/1E-6),2),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 0.87 um\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7, Page number 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find -\n", + "a)responsivity\n", + "b)Optical power received\n", + "c)no. of received photons'''\n", + "\n", + "#Varaible declaration \n", + "N = 50./100 #quantum efficiency\n", + "lamda = 900 #wavelength(nm)\n", + "Ip = 10**-6 #photocurrent(A)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "\n", + "#Calculations\n", + "#Part a\n", + "R = (N*lamda)/1248\n", + "\n", + "#Part b\n", + "Po = Ip/R\n", + "\n", + "#Part c\n", + "n = (Po*lamda*10**-9)/(h*c)\n", + "\n", + "#Results\n", + "print \"a)Responsivity =\",round(R,2),\"A/W\"\n", + "print \"b)Optical power =\",round((Po/1E-6),2),\"*10^-6 W\"\n", + "print \"c)No. of photons =\",round((n/1e+13),3),\"*10^13(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Responsivity = 0.36 A/W\n", + "b)Optical power = 2.77 *10^-6 W\n", + "c)No. of photons = 1.257 *10^13(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8, Page number 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the multiplication factor of photodiode'''\n", + "\n", + "#Varaible declaration \n", + "N = 80./100 #quantum efficiency\n", + "lamda = 0.9*10**-6 #wavelength(m)\n", + "I = 12*10**-6 #output current(A)\n", + "Po = 0.5*10**-6 #incident power(W)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.626*10**-34 #Planck's constant\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "R = (N*e*lamda)/(h*c) #responsivity(A/W)\n", + "Ip = Po*R #photocurrent(A)\n", + "M = I/Ip\n", + "\n", + "#Result\n", + "print \"Multiplication factor =\",M" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Multiplication factor = 41.4125\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9, Page number 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the responsivity and multiplication factor'''\n", + "\n", + "#Varaible declaration \n", + "N = 65./100 #quantum efficiency\n", + "lamda = 850*10**-9 #wavelength(m)\n", + "I = 10*10**-6 #output current(A)\n", + "Po = 0.5*10**-6 #incident power(W)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.626*10**-34 #Planck's constant\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "R = (N*e*lamda)/(h*c) #responsivity(A/W)\n", + "\n", + "M = I/(R*Po)\n", + "\n", + "#Result\n", + "print \"Responsiviy =\",round(R,3),\"A/W\"\n", + "print \"Multiplication factor =\",M" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Responsiviy = 0.445 A/W\n", + "Multiplication factor = 44.9728506787\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10, Page number 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Estimate -\n", + "a)noise equivalent power\n", + "b)specific detectivity'''\n", + "\n", + "#Varaible declaration \n", + "N = 55./100 #quantum efficiency\n", + "lamda = 1.3*10**-6 #wavelength(nm)\n", + "Id = 8*10**-9 #dark current(A)\n", + "A = 75*50*10**-12 #dimensions(m)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "\n", + "#Calculations\n", + "#Part a\n", + "NEP = (h*c*((2*e*Id)**0.5))/(N*e*lamda)\n", + "\n", + "#Part b\n", + "D = A**0.5/NEP\n", + "\n", + "#Results\n", + "print \"a)Noise equivalent power =\",round((NEP/1E-14),2),\"*10^-14 W\"\n", + "print \"b)Specific detectivity =\",round((D/1E+8),2),\"*10^8\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Noise equivalent power = 8.78 *10^-14 W\n", + "b)Specific detectivity = 6.97 *10^8\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11, Page number 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find -\n", + "a)optical gain\n", + "b)CE current'''\n", + "\n", + "#Varaible declaration \n", + "N = 60./100 #quantum efficiency\n", + "lamda = 1.26*10**-6 #wavelength(m)\n", + "Ic = 15*10**-3 #output current(A)\n", + "Po = 125*10**-6 #incident power(W)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.626*10**-34 #Planck's constant\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Go = (h*c*Ic)/(lamda*e*Po)\n", + "\n", + "#Part b\n", + "Nfe = Go/N\n", + "\n", + "#Results\n", + "print \"a)Optical gain =\",round(Go,1)\n", + "print \"b)Common emiiter current =\",round(Nfe,1),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Optical gain = 118.3\n", + "b)Common emiiter current = 197.2 A\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12, Page number 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the maximum 3dB bandwidth'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "tf = 5*10**-12 #transit time(sec)\n", + "G = 70 #photoconductive gain\n", + "\n", + "#Calculation\n", + "Bm = 1/(2*math.pi*tf*G)\n", + "\n", + "#Result\n", + "print \"The maximum 3dB bandwidth permitted by photoconductor is\",round((Bm/1E+6),1),\"MHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum 3dB bandwidth permitted by photoconductor is 454.7 MHz\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13, Page number 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the output photocurrent'''\n", + "\n", + "#Variable declaration\n", + "rp = 10**11 #no. of photons/sec\n", + "hf = 1.28*10**19 #energy of photons(J)\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "Po = rp/hf\n", + "N = 1 #efficiency for an ideal photodiode\n", + "Ip = (N*Po*e)/hf\n", + "\n", + "#Result\n", + "print \"Output photocurrent =\",round((Ip/1E-47),2),\"*10^-47 A(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output photocurrent = 9.77 *10^-47 A(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14, Page number 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the output photocurrent'''\n", + "\n", + "#Variable declaration\n", + "R = 0.40 #responsivity(A/W)\n", + "phi = 100 #incident flux(uW/mm^2)\n", + "A = 2 #active area(mm^2)\n", + "\n", + "#Calculations\n", + "Po = phi*A #incident power(uW)\n", + "Ip = R*Po\n", + "\n", + "#Result\n", + "print \"Photocurrent =\",Ip/1e+3,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Photocurrent = 0.08 mA\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15, Page number 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the multiplication factor of photodiode'''\n", + "\n", + "#Varaible declaration \n", + "N = 50./100 #quantum efficiency\n", + "lamda = 1.3*10**-6 #wavelength(m)\n", + "I = 8*10**-6 #output current(A)\n", + "Po = 0.4*10**-6 #incident power(W)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.626*10**-34 #Planck's constant\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "R = (N*e*lamda)/(h*c) #responsivity(A/W)\n", + "Ip = Po*R #photocurrent(A)\n", + "M = I/Ip\n", + "\n", + "#Result\n", + "print \"Multiplication factor =\",round(M,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Multiplication factor = 38.23\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16, Page number 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Calculate the maximum 3dB bandwidth'''\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "tf = 4.5*10**-12 #transit time(sec)\n", + "G = 80 #photoconductive gain\n", + "\n", + "#Calculation\n", + "Bm = 1/(2*math.pi*tf*G)\n", + "\n", + "#Result\n", + "print \"The maximum 3dB bandwidth permitted by photoconductor is\",round((Bm/1E+10),4),\"GHz(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum 3dB bandwidth permitted by photoconductor is 0.0442 GHz(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17, Page number 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Estimate responsivity and received optical power'''\n", + "\n", + "#Varaible declaration \n", + "N = 50./100 #quantum efficiency\n", + "lamda = 0.9*10**-6 #wavelength(m)\n", + "Ip = 10**-6 #photocurrent(A)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "R = (N*e*lamda)/(h*c)\n", + "\n", + "Po = Ip/R\n", + "\n", + "\n", + "#Results\n", + "print \"Responsivity =\",round(R,2),\"A/W\"\n", + "print \"Optical power =\",round((Po/1E-6),2),\"*10^-6 W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Responsivity = 0.36 A/W\n", + "Optical power = 2.76 *10^-6 W\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18, Page number 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the efficiency of a PIN silicon photodiode'''\n", + "\n", + "#Varaible declaration \n", + "R = 0.374 #responsivity(A/W)\n", + "lamda = 1300*10**-9 #wavelength(m)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "e = 1.6*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "N = (R*h*c)/(e*lamda)\n", + "\n", + "#Result\n", + "print \"Efficiency =\",round((N*100),1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency = 35.7 %\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20, Page number 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the thickness of the intrinsic region'''\n", + "\n", + "#Variable declaration\n", + "A = 1.5*10**-3 #area(mm^2)\n", + "R = 100 #load resistance(Ohms)\n", + "Eo = 1.04*10**-10 #permitivitty for Si(F/m)\n", + "vd = 10**7 #electron saturation velocity(m/s)\n", + "\n", + "#Calculation\n", + "w = (R*Eo*A*vd)**0.5\n", + "\n", + "#Result\n", + "print \"The required thickness is\",round(w/1E-6),\"um(Calculation mistake in textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required thickness is 12490.0 um(Calculation mistake in textbook)\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21, Page number 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'''Find the dark current'''\n", + "\n", + "import math\n", + "\n", + "#Varaible declaration \n", + "N = 64./100 #quantum efficiency\n", + "lamda = 0.85*10**-6 #wavelength(m)\n", + "B = 1 #bandwidth(Hz)\n", + "D = 7*10**10 #specific detectivity(/MHz-W)\n", + "A = 10*10**-6 #dimensions(m)\n", + "c = 3*10**8 #speed of light(m/s)\n", + "h = 6.62*10**-34 #Planck's constant\n", + "e = 1.602*10**-19 #charge of an electron(C)\n", + "\n", + "#Calculations\n", + "Id = ((N*math.sqrt(e*A)*lamda)/(h*c*math.sqrt(2)*D))**0.5\n", + "\n", + "#Result\n", + "print \"Dark current =\",round((Id/1E-3),2),\"mA\"\n", + "#Square root of Id has not been taken in the textbook.Hence, the difference in solution" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dark current = 5.92 mA\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication/screenshots/finding_angles.png b/Optical_Communication/screenshots/finding_angles.png Binary files differnew file mode 100755 index 00000000..e05d7786 --- /dev/null +++ b/Optical_Communication/screenshots/finding_angles.png diff --git a/Optical_Communication/screenshots/optical_power.png b/Optical_Communication/screenshots/optical_power.png Binary files differnew file mode 100755 index 00000000..2e06f4a8 --- /dev/null +++ b/Optical_Communication/screenshots/optical_power.png diff --git a/Optical_Communication/screenshots/responsivity.png b/Optical_Communication/screenshots/responsivity.png Binary files differnew file mode 100755 index 00000000..b0cd045d --- /dev/null +++ b/Optical_Communication/screenshots/responsivity.png |