summaryrefslogtreecommitdiff
path: root/Optical_Communication/Chapter_5.ipynb
diff options
context:
space:
mode:
authorhardythe12015-04-07 15:58:05 +0530
committerhardythe12015-04-07 15:58:05 +0530
commit92cca121f959c6616e3da431c1e2d23c4fa5e886 (patch)
tree205e68d0ce598ac5caca7de839a2934d746cce86 /Optical_Communication/Chapter_5.ipynb
parentb14c13fcc6bb6d01c468805d612acb353ec168ac (diff)
downloadPython-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.gz
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.bz2
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.zip
added books
Diffstat (limited to 'Optical_Communication/Chapter_5.ipynb')
-rwxr-xr-xOptical_Communication/Chapter_5.ipynb1335
1 files changed, 1335 insertions, 0 deletions
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