diff options
Diffstat (limited to 'Optical_Communication_by_Anasuya_Kalavar')
9 files changed, 3143 insertions, 0 deletions
diff --git a/Optical_Communication_by_Anasuya_Kalavar/chapter1.ipynb b/Optical_Communication_by_Anasuya_Kalavar/chapter1.ipynb new file mode 100755 index 00000000..a271cc5c --- /dev/null +++ b/Optical_Communication_by_Anasuya_Kalavar/chapter1.ipynb @@ -0,0 +1,128 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:985ad452c65fa6c321f3f5a416b2ee95d94eb6cba2ef0da1eac4d7b73a848422" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter1 - Overview of optical fiber communications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6.1, page 1-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Bit_rate = 2*10**9 # bit rate of channel\n", + "# Given sequence is 010111101110\n", + "Shortest_duration = 1*(1/Bit_rate) # shortest duration is '1'\n", + "Widest_duration = 4*(1/Bit_rate) #widest duration is '1111'\n", + "Shortest_duration = Shortest_duration # seconds\n", + "Widest_duration = Widest_duration # seconds\n", + "print \"Shortest duration is %.1g seconds.\" %Shortest_duration\n", + "print \"Widest duration is %.1g seconds.\" %Widest_duration" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Shortest duration is 5e-10 seconds.\n", + "Widest duration is 2e-09 seconds.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12.1, page 1-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import log2\n", + "Bandwidth = 2*10**6 #Bandwidth of channel\n", + "Signal_to_Noise_ratio = 1 #Signal to Noise ratio of channel\n", + "Capacity = Bandwidth * log2(1 + Signal_to_Noise_ratio) #computing capacity\n", + "Capacity=Capacity/10**6 \n", + "print \"Maximum capacity of channel is %d Mb/sec.\" %Capacity" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum capacity of channel is 2 Mb/sec.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Question 10, page 1-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Bit_rate = 2*10**9 # bit rate of channel\n", + "# Given sequence is 010111101110\n", + "Shortest_duration = 1*(1/Bit_rate) # shortest duration is '1'\n", + "Widest_duration = 4*(1/Bit_rate) #widest duration is '1111'\n", + "Shortest_duration = Shortest_duration # seconds\n", + "Widest_duration = Widest_duration # seconds\n", + "print \"Shortest duration is %.1g seconds.\" %Shortest_duration\n", + "print \"Widest duration is %.1g seconds.\" %Widest_duration" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Shortest duration is 5e-10 seconds.\n", + "Widest duration is 2e-09 seconds.\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication_by_Anasuya_Kalavar/chapter10.ipynb b/Optical_Communication_by_Anasuya_Kalavar/chapter10.ipynb new file mode 100755 index 00000000..6479ba9e --- /dev/null +++ b/Optical_Communication_by_Anasuya_Kalavar/chapter10.ipynb @@ -0,0 +1,96 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0e6d6451a42a64c2f14a17049d585a97e1d159d84d0a7abf55f333e84dfeeece" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter10 - Performance measurement and monitoring" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5.1, page 10-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt\n", + "from __future__ import division\n", + "To=12.6 #width of output pulse\n", + "Ti=0.3 #width of input pulse\n", + "l=1.2 #length of measurement\n", + "Pulse_dispersion = sqrt(To**2 - Ti**2) #computing pulse dispersion\n", + "PDKM=Pulse_dispersion/l #computing pulse dispersion per Kilometer\n", + "BW=0.44/PDKM #computing optical bandwidth\n", + "BW=BW*1000 \n", + "print \"Pulse broadning is %.1f ns/km.\\nOptical bandwidth is %.1f MHz.Km.\" %(PDKM,BW) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse broadning is 10.5 ns/km.\n", + "Optical bandwidth is 41.9 MHz.Km.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6.1, page 10-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import log10\n", + "V2=12 \n", + "V1=2.5 \n", + "L2=3 \n", + "L1=0.004 \n", + "alpha_dB = 10* log10(V2/V1)/(L2-L1) \n", + "un = 0.2/(L2-L1) \n", + "print \"Attenuation is %.2f dB/km\\nUncertainity +/- %.3f dB.\" %(alpha_dB,un) \n", + "#answer for attenuation in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Attenuation is 2.27 dB/km\n", + "Uncertainity +/- 0.067 dB.\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication_by_Anasuya_Kalavar/chapter2.ipynb b/Optical_Communication_by_Anasuya_Kalavar/chapter2.ipynb new file mode 100755 index 00000000..934feb4e --- /dev/null +++ b/Optical_Communication_by_Anasuya_Kalavar/chapter2.ipynb @@ -0,0 +1,886 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:94ac7a20c62e9612d243d85d9b1b3699e50dc46a0975e66ae373ce7747106bc9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2 - Optical Fibers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.1 page 2-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import arcsin, sqrt, pi\n", + "#Numerical Aperture and critical angle\n", + "n1=1.46 #refractive index\n", + "d=0.01 #difference\n", + "na=n1*sqrt(2*d) #numerical aperture\n", + "x=1-d #\n", + "oc=arcsin(x)*180/pi #in degree\n", + "print \"numerical aperture = \",round(na,2)\n", + "print \"critical angle at core cladding interface =\",round(oc,1),\" degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "numerical aperture = 0.21\n", + "critical angle at core cladding interface = 81.9 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5.1, page 2-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import arcsin, sqrt, pi\n", + "#Numerical Aperture ,critical angle and acceptance angle\n", + "n2=1.45 #core refrative index\n", + "n1=1.49 #cladding refrative index\n", + "oc=arcsin(n2/n1)*180/pi #in degree\n", + "na=sqrt(n1**2-n2**2) #numerical aperture\n", + "pc=arcsin(na)*180/pi #degree\n", + "print \"critical angle is =\",round(oc,2),\" degree\"\n", + "print \"numerical aperture =\",round(na,3)\n", + "print \"acceptance angle is\",round(pc,2),\" degree\"\n", + "# Answer in the book are not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical angle is = 76.69 degree\n", + "numerical aperture = 0.343\n", + "acceptance angle is 20.06 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5.2, page 2-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import arcsin, sqrt, pi\n", + "delta = 1.2/100 # Relative refractive difference index\n", + "n1=1.45 # Core refractive index \n", + "NA= n1*sqrt(2*delta) #computing numerical aperture\n", + "Acceptance_angle = arcsin(NA)*180/pi #computing acceptance angle\n", + "si = pi*NA**2 #computing solid acceptance angle\n", + "print \"Numerical aperture is %.3f.\\nAcceptance angle is %.2f degree.\\nSolid acceptance angle is %.3f radians.\" %(NA,Acceptance_angle,si) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture is 0.225.\n", + "Acceptance angle is 12.98 degree.\n", + "Solid acceptance angle is 0.159 radians.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5.3, page 2-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NA = 0.45 # Numerical Aperture\n", + "Acceptance_angle = arcsin(NA)*180/pi #computing acceptance angle.\n", + "print \"Acceptance angle is %.1f degree.\" %Acceptance_angle" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptance angle is 26.7 degree.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5.4, page 2-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import arctan\n", + "diameter = 1 #Diameter in centimeter\n", + "Focal_length = 10 #Focal length in centimeter\n", + "radius=diameter/2 #computing radius\n", + "Acceptance_angle = arctan(radius/Focal_length)*180/pi #computing acceptance angle\n", + "Conical_full_angle = 2*Acceptance_angle #computing conical angle\n", + "Solid_acceptance_angle = pi*Acceptance_angle**2 #computing solid acceptance angle\n", + "NA = sqrt(Solid_acceptance_angle/pi) #computing Numerical aperture\n", + "print \"Numerical aperture is %.2f.\\nConical full angle is %.2f degree.\" %(NA,Conical_full_angle) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture is 2.86.\n", + "Conical full angle is 5.72 degree.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.1, page 2-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import cos\n", + "NA = 0.45 #Numerical aperture\n", + "betaB = 45 # Skew ray change direction by 90 degree at each reflection\n", + "Meridional_theta = arcsin(NA)*180/pi #computing acceptacne angle for meridoinal ray\n", + "Skew_theta = arcsin(NA/cos(betaB*pi/180))*180/pi #computing acceptacne angle for skew ray\n", + "print \"Acceptacne angle for Meridoinal ray is %.2f degree.\\nAcceptance angle for Skew ray %.1f degree.\" %(Meridional_theta,Skew_theta) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptacne angle for Meridoinal ray is 26.74 degree.\n", + "Acceptance angle for Skew ray 39.5 degree.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8.1, page 2-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "core_diameter=78*10**-6 #core diameter\n", + "delta=1.4/100 #relative index difference\n", + "lamda=0.8*10**-6 #operating wavelength\n", + "n1=1.47 #core refractive index\n", + "a=core_diameter/2 #computing core radius\n", + "v= 2*3.14*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n", + "M=(v)**2/2 #computing guided modes\n", + "print \"Normalized Frequency is %.3f.\\nTotal number of guided modes are %.1f\" %(v,M)\n", + "#answer in the book are incorrect." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized Frequency is 75.306.\n", + "Total number of guided modes are 2835.5\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8.2, page 2-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.47 #refractive index of core\n", + "a=4.3*10**-6 #radius of core\n", + "delta=0.2/100 #relative index difference\n", + "lamda= 2*3.14*a*n1*sqrt(2*delta)/2.405 #computing wavelength\n", + "lamda=lamda*10**9 \n", + "print \"Wavelength of fiber is %d nm.\" %lamda\n", + "#answer in the book is given as 1230nm which is incorrect." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of fiber is 1043 nm.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8.3, page 2-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.482 #refractive index of core\n", + "n2=1.474 #refractive index of cladding\n", + "lamda=820*10**-9 #Wavelength\n", + "NA=sqrt(n1**2 - n2**2) #computing Numerical aperture\n", + "theta= arcsin(NA)*180/pi #computing acceptance angle\n", + "solid_angle=pi*(NA)**2 #computing solid angle\n", + "a=2.405*lamda/(2*3.14*NA) #computing core radius\n", + "a=a*10**6 \n", + "print \"Numerical aperture is %.3f.\\nAcceptance angle is %.1f degrees.\\nSolid angle is %.3f radians.\\nCore radius is %.2f micrometer.\" %(NA,theta,solid_angle,a) \n", + "#answer in the book are not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture is 0.154.\n", + "Acceptance angle is 8.8 degrees.\n", + "Solid angle is 0.074 radians.\n", + "Core radius is 2.04 micrometer.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8.4, page 2-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import ceil\n", + "NA=0.16 #Numerical aperture\n", + "n1=1.45 #core refractive index\n", + "d=60*10**-6 #core diameter\n", + "lamda=0.82*10**-6 #wavelength\n", + "a=d/2 #core radius\n", + "v=2*3.14*a*NA/lamda #computing normalized frequency\n", + "M=v**2/2 #computing guided modes\n", + "print \"if normalized frequency is taken as %d, then there are %d guided modes.\" %(ceil(v),M) \n", + "#Answer given in the textbook is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "if normalized frequency is taken as 37, then there are 675 guided modes.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8.5, page 2-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NA=0.2 #Numericla aperture\n", + "d=50*10**-6 #Diameter of core\n", + "lamda=1*10**-6 #Wavelength\n", + "a=d/2 #computing radius\n", + "v=2*3.14*a*NA/lamda #computing normalized frequency\n", + "Mg=v**2/4 #computing mode volume for parabollic profile\n", + "Mg=round(Mg) \n", + "print \"Normalized Frequency is %.1f.\\nTotal number of guided modes are %.d.\" %(v,Mg) \n", + "#answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized Frequency is 31.4.\n", + "Total number of guided modes are 246.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8.6, page 2-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "delta=0.015 #relative refractive index\n", + "n1=1.48 #core refractive index\n", + "lamda=0.85*10**-6 #wavelength\n", + "a=(2.4*lamda)/(2*3.14*n1*sqrt(2*delta)) #computing radius of core\n", + "d=2*a #computing diameter of core\n", + "a=a*10**7 \n", + "a=round(a,2) \n", + "a=a/10\n", + "d=d*10**6 \n", + "print \"Core radius is %.1f micrometer.\\nCore diameter is %.1f micrometer.\" %(a,2*a) \n", + "print \"When delta is reduced by 10 percent-\"\n", + "delta=0.0015 \n", + "a=(2.4*lamda)/(2*3.14*n1*sqrt(2*delta)) #computing radius of core\n", + "d=2*a #computing diameter of core\n", + "a=a*10**7 \n", + "a=round(a) \n", + "a=a/10\n", + "d=d*10**6 \n", + "print \"Core radius is %.1f micrometer.\\nCore diameter is %.1f micrometer.\" %(a,2*a) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core radius is 1.3 micrometer.\n", + "Core diameter is 2.5 micrometer.\n", + "When delta is reduced by 10 percent-\n", + "Core radius is 4.0 micrometer.\n", + "Core diameter is 8.0 micrometer.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8.7, page 2-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NA=0.25 #Numericla aperture\n", + "d=45*10**-6 #Diameter of core\n", + "lamda=1.5*10**-6 #Wavelength\n", + "a=d/2 #computing radius\n", + "v=2*3.14*a*NA/lamda #computing normalized frequency\n", + "Mg=v**2/4 #computing mode volume for parabollic profile\n", + "Mg=round(Mg,2) \n", + "print \"Normalized Frequency is %.2f.\\nTotal number of guided modes are %.d.\" %(v,ceil(Mg) )\n", + "#answer in the book for normalized frequency is 23.55, deviation 0.05" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized Frequency is 23.55.\n", + "Total number of guided modes are 139.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8.8, page 2-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NA=0.25 #Numericla aperture\n", + "d=45*10**-6 #Diameter of core\n", + "lamda=1.2*10**-6 #Wavelength\n", + "a=d/2 #computing radius\n", + "v=2*3.14*a*NA/lamda #computing normalized frequency\n", + "Mg=v**2/4 #computing mode volume for parabollic profile\n", + "Mg=round(Mg,2) \n", + "print \"Normalized Frequency is %.1f.\\nTotal number of guided modes are %.d.\" %(v,Mg) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized Frequency is 29.4.\n", + "Total number of guided modes are 216.\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8.9, page 2-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.54 #refractive index of core\n", + "n2=1.5 #refractive index of cladding\n", + "a=25*10**-6 #Radius of core in um\n", + "lamda=1.3*10**-6 #Wavelength in m\n", + "NA=sqrt(n1**2-n2**2) \n", + "v=2*3.14*a*NA/lamda #computing normalized frequency\n", + "Mg=v**2/4 #computing mode volume for parabollic profile\n", + "lamda_cut_off=v*lamda/2.405 #computing cut off wavelength\n", + "lamda_cut_off=lamda_cut_off*10**6 \n", + "print \"Normalized Frequency is %0.f.\\nTotal number of guided modes are %.d.\\nCut off wavelength is %.1f micrometer.\" %(v,Mg,lamda_cut_off) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized Frequency is 42.\n", + "Total number of guided modes are 443.\n", + "Cut off wavelength is 22.8 micrometer.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9.1 page 2-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L_BL=8*10**-2 #beat length\n", + "Br=2*3.14/L_BL #computing modal briefringence\n", + "print \"Modal briefringence is %.1f per meter.\" %Br" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Modal briefringence is 78.5 per meter.\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9.2, page 2-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import log10\n", + "Pin=500*10**-6 #input power\n", + "L=200 #length of fiber\n", + "loss=2 #loss associated with fiber\n", + "Pin_dbm=10*log10(Pin/(10**-3)) #computing input power in dBm\n", + "Pin_dbm=round(Pin_dbm) \n", + "Pout_dbm=Pin_dbm-L*loss #computing output power level\n", + "Pout= 10**(Pout_dbm/10) \n", + "print \"Output power is %.2e mW.\" %Pout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power is 5.01e-41 mW.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12.1, page 2-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=4.5*10**-6 #core diameter\n", + "delta=0.25/100 #relative index difference\n", + "lamda=0.85*10**-6 #operating wavelength\n", + "n1=1.46 #core refractive index\n", + "v= 2*pi*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n", + "lamda_cut_off=v*lamda/2.405 #computing cut off wavelength\n", + "lamda_cut_off=lamda_cut_off*10**9 \n", + "print \"Cut off wavelength is %.d nanometer.\" %(lamda_cut_off)\n", + "print \"When delta is 1.25 percent-\" \n", + "delta=1.25/100 \n", + "v= 2*pi*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n", + "lamda_cut_off=v*lamda/2.405 #computing cut off wavelength\n", + "lamda_cut_off=lamda_cut_off*10**7 \n", + "lamda_cut_off=round(lamda_cut_off) \n", + "lamda_cut_off=lamda_cut_off*100 \n", + "print \"Cut off wavelength is %.d nanometer.\" %(lamda_cut_off) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off wavelength is 1213 nanometer.\n", + "When delta is 1.25 percent-\n", + "Cut off wavelength is 2700 nanometer.\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12.2, page 2-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=50*10**-6 #core radius\n", + "lamda=1500*10**-9 #operating wavelength\n", + "n1=2.53 #core refractive index\n", + "n2=1.5 #cladding refractive index\n", + "delta=(n1-n2)/n1 #computing delta\n", + "v= 2*3.14*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n", + "M=(v)**2/2 #computing guided modes\n", + "print \"Normalized Frequency is %.1f\\nTotal number of guided modes are %.d\" %(v,M) \n", + "\n", + "#Calculation error in book. Answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized Frequency is 477.9\n", + "Total number of guided modes are 114191\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12.3, page 2-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "core_diameter=8*10**-6 #core diameter\n", + "delta=0.92/100 #relative index difference\n", + "lamda=1550*10**-9 #operating wavelength\n", + "n1=1.45 #core refractive index\n", + "a=core_diameter/2 #computing core radius\n", + "v= 2*pi*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n", + "M=(v)**2/2 #computing guided modes\n", + "print \"Normalized Frequency is %.1f.\\nTotal number of guided modes are %.d.\" %(v,M) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized Frequency is 3.2.\n", + "Total number of guided modes are 5.\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12.4, page 2-39 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "delta=1/100 #relative index difference\n", + "n1=1.5 #core refractive index\n", + "c=3*10**8 \n", + "L=6 \n", + "n2=sqrt(n1**2-2*delta*n1**2) #computing refractive index of cladding\n", + "delta_T=L*n1**2*delta/(c*n2) #computing pulse broadning\n", + "delta_T=delta_T*10**11 \n", + "delta_T=round(delta_T) \n", + "print \"Delay difference between slowest and fastest mode is %d ns/km.\" %delta_T \n", + "print \"This means that a pulse broadnes by %d ns after travel time a distance of %d km.\" %(delta_T,L)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delay difference between slowest and fastest mode is 30 ns/km.\n", + "This means that a pulse broadnes by 30 ns after travel time a distance of 6 km.\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17.1, page 2-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.48 #core refractive index\n", + "n2=1.46 #cladding refractive index\n", + "phi = arcsin(n2/n1)*180/pi #computing critical angle\n", + "NA = sqrt(n1**2 - n2**2) #computing numericla aperture\n", + "theta= arcsin(NA)*180/pi #computing acceptance angle\n", + "print \"Critical angle is %.2f degrees.\\nNumerical aperture is %.3f.\\nAcceptance angle is %.2f degree.\" %(phi,NA,theta) \n", + "#answers in the book are wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle is 80.57 degrees.\n", + "Numerical aperture is 0.242.\n", + "Acceptance angle is 14.03 degree.\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Question 4, page 2-61 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L_BL=8*10**-2 #beat length\n", + "Br=2*3.14/L_BL #computing modal briefringence\n", + "print \"Modal briefringence is %.1f per meter.\" %Br " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Modal briefringence is 78.5 per meter.\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Question 5, page 2-62 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L_BL=0.6*10**-3 #beat length\n", + "lamda=1.4*10**-6 #wavelength\n", + "L_BL1=70 \n", + "Bh=lamda/L_BL #computing high briefringence\n", + "Bl=lamda/L_BL1 #computing low briefringence\n", + "print \"High briefringence is %.2e.\\nLow briefringence is %.1e.\"%(Bh,Bl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "High briefringence is 2.33e-03.\n", + "Low briefringence is 2.0e-08.\n" + ] + } + ], + "prompt_number": 38 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication_by_Anasuya_Kalavar/chapter4.ipynb b/Optical_Communication_by_Anasuya_Kalavar/chapter4.ipynb new file mode 100755 index 00000000..408746a4 --- /dev/null +++ b/Optical_Communication_by_Anasuya_Kalavar/chapter4.ipynb @@ -0,0 +1,413 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c80be9ee73d5adb979ad6bf2343ea3cff1243505e35fc82560bd445f960931b7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4 - Signal Degradation in fibers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3.1, page 4-4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi, log10\n", + "L=10 #fiber length in km\n", + "Pin=150*10**-6 #input power\n", + "Pout=5*10**-6 #output power\n", + "ln=20 #length of optical link\n", + "interval=1 #splices after interval of 1 km\n", + "l=1.2 #loss due to 1 splice\n", + "attenuation=10*log10(Pin/Pout) \n", + "alpha=attenuation/L \n", + "attenuation_loss=alpha*20 \n", + "splices_loss=(ln-interval)*l \n", + "total_loss=attenuation_loss+splices_loss \n", + "power_ratio=10**(total_loss/10) \n", + "print \"Signal attenuation is %.2f dBs.\\nSignal attenuation is %.3f dB/Km.\\nTotal loss in 20 Km fiber is %.2f dbs.\\nTotal attenuation is %.2f dBs.\\ninput/output ratio is %0.e.\" %(attenuation,alpha,attenuation_loss,total_loss,power_ratio) \n", + "# Answer wrong for last part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal attenuation is 14.77 dBs.\n", + "Signal attenuation is 1.477 dB/Km.\n", + "Total loss in 20 Km fiber is 29.54 dbs.\n", + "Total attenuation is 52.34 dBs.\n", + "input/output ratio is 2e+05.\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.1, page 4-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import exp\n", + "beta_c=8*10**-11 #isothermal compressibility\n", + "n=1.46 #refractive index\n", + "P=0.286 #photoelastic constat\n", + "k=1.38*10**-23 #Boltzmnn constant\n", + "T=1500 #temperature\n", + "L=1000 #length\n", + "lamda=1000*10**-9 #wavelength\n", + "gamma_r = 8*(3.14**3)*(P**2)*(n**8)*beta_c*k*T/(3*(lamda**4)) #computing coefficient\n", + "attenuation=exp(-gamma_r*L) #computing attenuation\n", + "print \"Attenuation due to Rayleigh scattering is %.3f.\" %(attenuation) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Attenuation due to Rayleigh scattering is 0.794.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.2, page 4-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "beta_c=7*10**-11 #isothermal compressibility\n", + "n=1.46 #refractive index\n", + "P=0.29 #photoelastic constat\n", + "k=1.38*10**-23 #Boltzmnn constant\n", + "T=1400 #temperature\n", + "L=1000 #length\n", + "lamda=0.7*10**-6 #wavelength\n", + "gamma_r = 8*(3.14**3)*(P**2)*(n**8)*beta_c*k*T/(3*(lamda**4)) #computing coefficient\n", + "attenuation=exp(-gamma_r*L) #computing attenuation\n", + "gamma_r=gamma_r\n", + "print \"Raleigh Scattering corfficient is %.3e per meter\" %(gamma_r) \n", + "#Attenuation is not calcualted in textbook\"\n", + "print \"Attenuation due to Rayleigh scattering is %.3f\" %(attenuation) \n", + "#answer for Raleigh Scattering corfficient in the book is given as 0.804d-3, deviation of 0.003d-3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Raleigh Scattering corfficient is 8.074e-04 per meter\n", + "Attenuation due to Rayleigh scattering is 0.446\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7.1, page 4-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "d=5 #core diameter\n", + "alpha=0.4 #attenuation\n", + "B=0.5 #Bandwidth\n", + "lamda=1.4 #wavelength\n", + "PB=4.4*10**-3*d**2*lamda**2*alpha*B #computing threshold power for SBS\n", + "PR=5.9*10**-2*d**2*lamda*alpha #computing threshold power for SRS\n", + "PB=PB*10**3 \n", + "PR=PR*10**3 \n", + "print \"Threshold power for SBS is %.1f mW.\\nThreshold power for SRS is %.3f mW.\" %(PB,PR) \n", + "#NOTE - Calculation error in the book while calculating threshold for SBS.\n", + "#Also, while calculating SRS, formula is taken incorrectly, \n", + "#Bandwidth is multiplied in second step, which is not in the formula.\") " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Threshold power for SBS is 43.1 mW.\n", + "Threshold power for SRS is 826.000 mW.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.1, page 4-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.5 #refractive index of core\n", + "delta=0.03/100 #relative refractive index\n", + "lamda=0.82*10**-6 #wavelength\n", + "n2=sqrt(n1**2-2*delta*n1**2) #computing cladding refractive index\n", + "Rc=(3*n1**2*lamda)/(4*3.14*(n1**2-n2**2)**1.5) #computing critical radius\n", + "Rc=Rc*10**3 \n", + "print \"Critical radius is %.f micrometer.\" %(Rc) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical radius is 9 micrometer.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.2, page 4-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.45 #refractive index of core\n", + "delta=3.0/100 #relative refractive index\n", + "lamda=1.5*10**-6 #wavelength\n", + "a=5*10**-6 #core radius\n", + "n2=sqrt(n1**2-2*delta*n1**2) #computing cladding refractive index\n", + "Rc=(3*n1**2*lamda)/(4*3.14*(n1**2-n2**2)**0.5) #computing critical radius for single mode\n", + "Rc=Rc*10**6 \n", + "print \"Critical radius is %.2f micrometer\" %(Rc) \n", + "lamda_cut_off= 2*3.14*a*n1*sqrt(2*delta)/2.405 \n", + "RcSM= (20*lamda/(n1-n2)**1.5)*(2.748-0.996*lamda/lamda_cut_off)**-3 #computing critical radius for single mode\n", + "RcSM=RcSM*10**6 \n", + "print \"Critical radius for single mode fiber is %.2f micrometer.\" %(RcSM) \n", + "#Calculation error in the book.(2.748-0.996*lamda/lamda_cut_off)**-3 in this term raised to -3 is not taken in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical radius is 2.12 micrometer\n", + "Critical radius for single mode fiber is 226.37 micrometer.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13.1, page 4-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=1550*10**-9 \n", + "lamda0=1.3*10**-6 \n", + "s0=0.095 \n", + "Dt=lamda*s0/4*(1-(lamda0/lamda)**4) #computing material dispersion\n", + "Dt=Dt*10**9 \n", + "print \"Material dispersion at 1550 nm is %.1f ps/nm/km\" %Dt\n", + "#answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material dispersion at 1550 nm is 18.6 ps/nm/km\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14.1, page 4-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "tau=0.1*10**-6 #pulse broadning\n", + "dist=20*10**3 #distance\n", + "Bopt=1/(2*tau) #computing optical bandwidth\n", + "Bopt=Bopt*10**-6 \n", + "dispertion=tau/dist #computing dispersion\n", + "dispertion=dispertion*10**12 \n", + "BLP=Bopt*dist #computing Bandwidth length product\n", + "BLP=BLP*10**-3 \n", + "print \"optical bandwidth is %d MHz.\\nDispersion per unit length is %d ns/km.\\nBandwidth length product is %d MHz.km.\" %(Bopt,dispertion,BLP) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "optical bandwidth is 5 MHz.\n", + "Dispersion per unit length is 5 ns/km.\n", + "Bandwidth length product is 100 MHz.km.\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.1, page 4-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "RSW=0.0012 #relative spectral width\n", + "lamda=0.90*10**-6 #wavelength\n", + "L=1 #distance in km (assumed)\n", + "P=0.025 #material dispersion parameter\n", + "c=3*10**5 #speed of light in km/s\n", + "M=10**3*P/(c*lamda) #computing material dispersion\n", + "sigma_lamda=RSW*lamda \n", + "sigmaM=sigma_lamda*L*M*10**7 #computing RMS pulse broadning\n", + "sigmaB=25*L*M*10**-3 \n", + "print \"Material dispersion parameter is %.2f ps/nm/km.\\nRMS pulsr broadning when sigma_lamda is 25 is %.1f ns/km.\\nRMS pulse broadning is %.2f ns/km.\" %(M,sigmaB,sigmaM) \n", + "#answer in the book for RMS pulse broadning is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material dispersion parameter is 92.59 ps/nm/km.\n", + "RMS pulsr broadning when sigma_lamda is 25 is 2.3 ns/km.\n", + "RMS pulse broadning is 1.00 ns/km.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17.1, page 4-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L=10 #length of optical link\n", + "n1=1.49 #refractive index\n", + "c=3*10**8 #speed of light\n", + "delta=1.0/100 #relative refractive index\n", + "delTS=L*n1*delta/c #computing delay difference\n", + "delTS=delTS*10**12 \n", + "sigmaS=L*n1*delta/(2*sqrt(3)*c) #computing rms pulse broadning\n", + "sigmaS=sigmaS*10**12 \n", + "B=1/(2*delTS) #computing maximum bit rate\n", + "B=B*10**3 \n", + "B_acc=0.2/(sigmaS) #computing accurate bit rate\n", + "B_acc=B_acc*10**3 \n", + "BLP=B_acc*L #computing Bandwidth length product\n", + "print \"Delay difference is %d ns.\\nRMS pulse broadning is %.1f ns.\\nBit rate is %.1f Mbit/s.\\nAccurate bit rate is %.3f Mbits/s.\\nBandwidth length product is %.1f MHz.km\" %(delTS,sigmaS,B,B_acc,BLP) \n", + "#answer for maximum bit rate is given as 1.008 Mb/s, deviation of 0.008 Mb/s." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delay difference is 496 ns.\n", + "RMS pulse broadning is 143.4 ns.\n", + "Bit rate is 1.0 Mbit/s.\n", + "Accurate bit rate is 1.395 Mbits/s.\n", + "Bandwidth length product is 13.9 MHz.km\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication_by_Anasuya_Kalavar/chapter5.ipynb b/Optical_Communication_by_Anasuya_Kalavar/chapter5.ipynb new file mode 100755 index 00000000..1c8edfa4 --- /dev/null +++ b/Optical_Communication_by_Anasuya_Kalavar/chapter5.ipynb @@ -0,0 +1,281 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:69c313bd7e7f4ca84b1b5e5f091a7854a8c80d86bc1470f5cbc9e6d39211d1ba" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter5 - Optical fiber connection : splicing" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2.1, page 5-2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi, log10\n", + "n1=1.47 #refractive index of fiber\n", + "n=1 #refractive index of air\n", + "r=((n1-n)/(n1+n))**2 #computing fraction of light reflected\n", + "loss=-10*log10(1-r) #loss\n", + "total_loss=2*loss \n", + "print \"r = %.3f, which means %.1f percent of the transimitted light is reflected at one interface\" %(r,r*100) \n", + "print \"Total loss is %.3f dB\" %(total_loss) \n", + "#answer in the book for total loss of fiber is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "r = 0.036, which means 3.6 percent of the transimitted light is reflected at one interface\n", + "Total loss is 0.320 dB\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2.2, page 5-4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import arccos\n", + "n1=1.47 #refractive index of fiber\n", + "n=1 #refractive index of air\n", + "d=40*10**-6 #core diameter\n", + "y=4*10**-6 #lateral dispalcement\n", + "a=d/2 #computing core radius\n", + "eta_lateral = (16*(n1/n)**2)/(pi*(1+(n1/n))**4)*(2*arccos(y/(2*a))-(y/a)*(1-(y/(2*a))**2)**0.5) #computing eta_lateral with air gap\n", + "loss=-10*log10(eta_lateral) #computing loss when air gap is present\n", + "eta_lateral1=(2*arccos(y/(2*a))-(y/a)*(1-(y/(2*a))**2)**0.5)/pi #computing eta_lateral without air gap\n", + "loss1=-10*log10(eta_lateral1) #computing loss when air gap is not present\n", + "print \"loss with air gap is %.2f dB.\\nloss with no air gap is %.2f dB.\" %(loss,loss1) \n", + "#answer in the book for loss with air gap is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "loss with air gap is 0.91 dB.\n", + "loss with no air gap is 0.59 dB.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2.3, page 5-5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.48 #refractive index of fiber\n", + "n=1 #refractive index of air\n", + "theta=10 #angle in degree\n", + "NA1=0.3 \n", + "NA2=0.6\n", + "eta_angular1= (16*(n1/n)**2)/((1+(n1/n))**4)*(1-((n*theta*pi/180)/(pi*NA1))) #computing eta angular\n", + "eta_angular2= (16*(n1/n)**2)/((1+(n1/n))**4)*(1-((n*theta*pi/180)/(pi*NA2))) #computing eta angular\n", + "loss1=-10*log10(eta_angular1) #computing loss\n", + "loss2=-10*log10(eta_angular2) #computing loss\n", + "print \"\\nLoss when NA is %.1f is %.2f dB.\\nLoss when NA is %.1f is %.2f dB.\" %(NA1,loss1,NA2,loss2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Loss when NA is 0.3 is 1.22 dB.\n", + "Loss when NA is 0.6 is 0.75 dB.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4.1, page 5-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import exp\n", + "d=1*10**-6 #lateral displacement\n", + "W=4.95*10**-6 #MFD\n", + "Lsm_lat= -10*log10(exp(-(d/W)**2)) #computing loss\n", + "print \"Insertion loss is %.2f dB.\" %(Lsm_lat) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Insertion loss is 0.18 dB.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4.2, page 5-15 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=1.3*10**-6 #wavelength\n", + "theta=1 #angle in degree\n", + "n2=1.465 #cladding refractive index\n", + "W=4.95*10**-6 #MFD\n", + "Lsm_ang= -10*log10(exp(-(pi*n2*W*(theta*pi/180)/lamda)**2)) #computing loss\n", + "print \"Insertion loss is %.2f dB.\" %(Lsm_ang) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Insertion loss is 0.41 dB.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6.1, page 5-28 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "p1=50*10**-6 \n", + "p2=0.003*10**-6 \n", + "p3=25*10**-6 \n", + "p4=26.5*10**-6\n", + "EL=10*log10(p1/(p3+p4)) #computing excess loss\n", + "IL13=10*log10(p1/p3) #computing insertion loss\n", + "IL14=10*log10(p1/p4) #computing insertion loss\n", + "ct=10*log10(p2/p1) #computing cross talk\n", + "sr=(p3/(p3+p4))*100 #computing split ratio\n", + "print \"\"\"Excess loss is %.2f dB.\n", + "Insertion loss from port 1 to port 3 is %.2f dB.\n", + "Insertion loss from port 1 to port 4 is %.2f dB.\n", + "cross talk is %.2f dB.\\nSplit ratio is %.2f percent\"\"\" %(EL,IL13,IL14,ct,sr ) \n", + "#Printing and calculation error in the book.Minus sign is not printed in the answer of excess loss.\n", + "#P1 is taken 25 instead of 50 while calculating cross talk. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Excess loss is -0.13 dB.\n", + "Insertion loss from port 1 to port 3 is 3.01 dB.\n", + "Insertion loss from port 1 to port 4 is 2.76 dB.\n", + "cross talk is -42.22 dB.\n", + "Split ratio is 48.54 percent\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6.2, page 5-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "N=16 #Number of ports\n", + "Pin=1*10**-3 #input power\n", + "Pout=12*10**-6 #output power\n", + "split_loss=10*log10(N) #computing split loss\n", + "excess_loss=10*log10(Pin/(Pout*N)) #computing excess loss\n", + "total_loss=split_loss+excess_loss #computing total loss\n", + "insertion_loss= 10*log10(Pin/Pout) #computing insertion loss\n", + "print \"Total loss is %.2f dB.\\nInsertion loss is %.2f dB.\" %(total_loss,insertion_loss) \n", + "#answer in the book for Total loss & insertion loss are wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total loss is 19.21 dB.\n", + "Insertion loss is 19.21 dB.\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication_by_Anasuya_Kalavar/chapter6.ipynb b/Optical_Communication_by_Anasuya_Kalavar/chapter6.ipynb new file mode 100755 index 00000000..2383415f --- /dev/null +++ b/Optical_Communication_by_Anasuya_Kalavar/chapter6.ipynb @@ -0,0 +1,252 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1a1f7133700fa452f49cfaeb319a776f69d7e64235d3f11f1abd2825b262e6e8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter6 - Optical sources" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3.1, page 6-7 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "x=0.07 \n", + "Eg=1.424+1.266*x+0.266*x**2 \n", + "lamda=1.24/Eg #computing wavelength\n", + "print \"Wavlength is %.3f micrometer.\" %lamda " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavlength is 0.819 micrometer.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3.2, page 6.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n=1.7 #refractive index\n", + "L=5*10**-2 #distance between mirror\n", + "c=3*10**8 #speed of light\n", + "lamda=0.45*10**-6 #wavelength\n", + "k=2*n*L/lamda #computing number of modes\n", + "delf=c/(2*n*L) #computing mode separation\n", + "delf=delf*10**-9 \n", + "print \"Number of modes are %.2e.\\nFrequency separation is %.2f GHz.\"%(k,delf) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of modes are 3.78e+05.\n", + "Frequency separation is 1.76 GHz.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7.1, page 6-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "tr=50 #radiative recombination lifetime\n", + "tnr=85 #non-radiative recombination lifetime\n", + "h=6.624*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "i=35*10**-3 #current\n", + "lamda=0.85*10**-6 #wavelength\n", + "t=tr*tnr/(tr+tnr) #computing total recombination time\n", + "eta=t/tr #computing internal quantum efficiency\n", + "Pint=eta*h*c*i/(q*lamda) #computing internally generated power\n", + "Pint=Pint*10**3\n", + "print \"Total recombinaiton time is %.2f ns.\\nInternal quantum efficiency is %.3f.\\nInternally generated power is %.2f mW.\" %(t,eta,Pint) \n", + "#answer in the book for Internal quantum efficiency & Internally generated power is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total recombinaiton time is 31.48 ns.\n", + "Internal quantum efficiency is 0.630.\n", + "Internally generated power is 32.20 mW.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8.1, page 6-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt, pi\n", + "f1=10*10**6 #frequency\n", + "f2=100*10**6\n", + "t=4*10**-9 \n", + "Pdc=280*10**-6 #optincal output power\n", + "w1=2*pi*f1 #computing omega\n", + "Pout1=Pdc*10**6/(sqrt(1+(w1*t)**2)) #computing output power\n", + "w2=2*pi*f2 #computing omega\n", + "Pout2=Pdc*10**6/(sqrt(1+(w2*t)**2)) #computing output power\n", + "print \"\"\"Ouput power at 10 MHz is %.2f microwatt.\n", + "Ouput power at 100 MHz is %.2f microwatt.\n", + "Conclusion when device is drive at higher frequency the optical power reduces.\"\"\" %(Pout1,Pout2) \n", + "BWopt = sqrt(3)/(2*pi*t) \n", + "BWelec = BWopt/sqrt(2) \n", + "BWopt=BWopt*10**-6 \n", + "BWelec=BWelec*10**-6 \n", + "print \"3 dB optical power is %.2f MHz.\\n3 dB electrical power is %.2f MHz.\" %(BWopt,BWelec) \n", + "#calculation error. In the book square term in the denominater is not taken.\n", + "#answers in the book are wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ouput power at 10 MHz is 271.55 microwatt.\n", + "Ouput power at 100 MHz is 103.52 microwatt.\n", + "Conclusion when device is drive at higher frequency the optical power reduces.\n", + "3 dB optical power is 68.92 MHz.\n", + "3 dB electrical power is 48.73 MHz.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8.2, page 6-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=3.5 #refractive index\n", + "n=1 #refractive index of air\n", + "F=0.69 #transmission factor\n", + "eta = 100*(n1*(n1+1)**2)**-1 #computing eta\n", + "print \"eta external is %.1f percent i.e. small fraction of intrnally generated opticalpower is emitted from the device.\" %eta \n", + "r= 100*F*n**2/(4*n1**2) #computing ratio of Popt/Pint\n", + "print \"Popt/Pint is %.1f percent\" %r\n", + "#printing mistake at final answer." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "eta external is 1.4 percent i.e. small fraction of intrnally generated opticalpower is emitted from the device.\n", + "Popt/Pint is 1.4 percent\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8.3, page 6-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import log, exp\n", + "beta0=1.85*10**7 \n", + "T=293 #temperature\n", + "k=1.38*10**-23 #Boltzman constant\n", + "Ea=0.9*1.6*10**-19 \n", + "theta=0.65 #thershold\n", + "betar=beta0*exp(-Ea/(k*T)) \n", + "t=-log(theta)/betar \n", + "print \"Degradation rate is %.1e per hour.\\nOperating lifetime is %.1e hour.\" %(betar,t) \n", + "#answer in the book for Degradation rate & Operating lifetime is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Degradation rate is 6.3e-09 per hour.\n", + "Operating lifetime is 6.8e+07 hour.\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication_by_Anasuya_Kalavar/chapter7.ipynb b/Optical_Communication_by_Anasuya_Kalavar/chapter7.ipynb new file mode 100755 index 00000000..59a13011 --- /dev/null +++ b/Optical_Communication_by_Anasuya_Kalavar/chapter7.ipynb @@ -0,0 +1,716 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7b09bc4939eefcfd52ab3af51ad805d4dcc13501d36382e73f4451d0d172843b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter7 - Source to fiber power launching and photodetectors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2.1, page 7-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi, sqrt, log10\n", + "n1=3.4 #refractive index of optical source\n", + "n=1.46 #refractive index of silica fiber\n", + "r=((n1-n)/(n1+n))**2 #computing Frensel reflection\n", + "L=-10*log10(1-r) #computing loss\n", + "print \"Frensel reflection is %.3f.\\nPower loss is %.2f dB.\" %(r,L) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frensel reflection is 0.159.\n", + "Power loss is 0.75 dB.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2.2, page 7-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "r=35*10**-6 #radius\n", + "R=150 #Lambertian emission pattern\n", + "NA=0.2 #Numerical aperture\n", + "Pled = pi**2*r**2*R*NA**2 \n", + "Pled=Pled*10**7 \n", + "print \"Optical power for larger core of 35 micrometer is %.3f mW.\" %(Pled) \n", + "r1=25*10**-6 \n", + "Pled1=(r1/r)**2*Pled \n", + "print \"Optical power for smaller core of 25 micrometer is %.2f mW.\" %(Pled1) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optical power for larger core of 35 micrometer is 0.725 mW.\n", + "Optical power for smaller core of 25 micrometer is 0.37 mW.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2.3, page 7-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "r=25*10**-6 #radius\n", + "R=39 #Lambertian emission pattern\n", + "NA=0.25 #numerical aperture\n", + "a=35*10**-6 #area\n", + "Pc1= pi**2*a**2*R*NA**2 #computing coupled power when r<a\n", + "Pc1=Pc1*10**7 \n", + "Pc= pi**2*r**2*R*NA**2 #computing coupled power when r>a\n", + "Pc=Pc*10**7 \n", + "print \"Optical power when r>a is %.2f mW.\\nOptical power when r<a is %.3f mW.\" %(Pc,Pc1) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optical power when r>a is 0.15 mW.\n", + "Optical power when r<a is 0.295 mW.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.1, page 7-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "e=1.6*10**-19 #charge of electron\n", + "q=1.43 #Bandgap energy\n", + "lamda=h*c/(q*e)*10**9 #computing wavelength\n", + "print \"Wavelength is %d nm\" %(lamda) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength is 868 nm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.2, page 7-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R=0.6 #responsivity\n", + "Pin=15 #optical power in microwatt\n", + "Ip=R*Pin #computing photocurrent\n", + "print \"Photocurrent generated is %d microAmpere.\" %Ip " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Photocurrent generated is 9 microAmpere.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.3, page 7-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda1=1300*10**-9 \n", + "lamda2=1600*10**-9 \n", + "h=6.625*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "eta=90/100 #quantum efficiency\n", + "E=0.73 #energy gap in eV\n", + "R1=eta*q*lamda1/(h*c) \n", + "R2=eta*q*lamda2/(h*c) \n", + "lamdac=1.24/E \n", + "print \"Responsivity at 1300nm is %.2f A/W.\\nResponsivity at 1600nm is %.2f A/W.\\nCut-off wavelength is %.1f micrometer.\" %(R1,R2,lamdac) \n", + "#R1 is calculated wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Responsivity at 1300nm is 0.94 A/W.\n", + "Responsivity at 1600nm is 1.16 A/W.\n", + "Cut-off wavelength is 1.7 micrometer.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.4, page 7-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=0.8*10**-6 \n", + "h=6.625*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "ne=1.8*10**11 #electrons collected\n", + "np=4*10**11 #photons incident\n", + "eta=ne/np #computing quantum efficiency\n", + "R=eta*q*lamda/(h*c) #computing responsivity\n", + "print \"Responsivity of photodiode at 0.8 micrometer is %.3f A/W.\" %R \n", + "#answer in the book is wrong. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Responsivity of photodiode at 0.8 micrometer is 0.290 A/W.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.5, page 7-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "E=1.8*10**-19 # Energy of photon\n", + "nq=70/100 # Quantum\n", + "Ip=3 # current in uA\n", + "h=6.625*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "lamda=h*c/E*10**6 # wavelength in micro meter\n", + "print \"Photodiode operates at %0.2f micro meter\" %lamda\n", + "q=1.6*10**-19 #charge of electron\n", + "R=nq*q/E #computing responsivity\n", + "Popt=Ip/R\n", + "print \"Incident optical power required = %.3f uW.\" %Popt " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Photodiode operates at 1.10 micro meter\n", + "Incident optical power required = 4.821 uW.\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.6, page 7-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "E=1.35 #energy gap in eV\n", + "lamda=h*c/(q*E) #computing wavelength\n", + "lamda=lamda*10**6 \n", + "print \"The InP photodetector will stop operation above %.2f micrometer.\" %(lamda) \n", + "#calculation error in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The InP photodetector will stop operation above 0.92 micrometer.\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.7, page 7-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "eta=65/100 #quantum efficiency\n", + "I=2.5*10**-6 #photocurrent \n", + "E=1.5*10**-19 #energy of photns\n", + "q=1.6*10**-19 #charge of electron\n", + "lamda=h*c/E #computing wavelength\n", + "R=eta*q*lamda/(h*c) #computing responsivity\n", + "Popt=I/R #computing optical power\n", + "lamda=lamda*10**6 \n", + "Popt=Popt*10**6 \n", + "print \"Wavelength is %.3f micrometer.\\nResponsivity is %.3f A/W.\\nIncident optical power required is %.1f microWatt.\" %(lamda,R,Popt) \n", + "#answer of R(responsivity) in the book is calculated as 0.694 A/W, deviation of 0.001." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength is 1.325 micrometer.\n", + "Responsivity is 0.693 A/W.\n", + "Incident optical power required is 3.6 microWatt.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.8, page 7-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ne=3.9*10**6 #electrons collected\n", + "np=6*10**6 #photons incident\n", + "eta=100*ne/np #computing efficiency\n", + "print \"Quantum efficiency is %d percent.\" %(eta) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantum efficiency is 65 percent.\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8.1, page 7-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "w=25*10**-6 #width\n", + "v=1*10**5 #velocity\n", + "r=40*10**-6 #radius\n", + "eps=12.5*10**-13 \n", + "t=w/v #computing drift time\n", + "c=eps*3.14*(r)**2/w #computing junction capacitance\n", + "c=c*10**16 \n", + "print \"Drift time %.1e sec.\\nJunction capacitance %.1f pf.\" %(t,c) \n", + "#calculation error in drift time answer." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Drift time 2.5e-10 sec.\n", + "Junction capacitance 2.5 pf.\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8.2, page 7-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "w=20*10**-6 #width\n", + "v=4*10**4 #velocity\n", + "t=w/v #computing drift time\n", + "BW=(2*pi*t)**-1 #computing bandwidth\n", + "rt=1/BW #computing response time\n", + "rt=rt*10**9 \n", + "print \"Maximum response time is %.1f ns.\" %(rt)\n", + "#Calculation error in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum response time is 3.1 ns.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9.1, page 7-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=1.4*10**-6 \n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "eta=65/100 #quantum efficiency\n", + "I=10*10**-9 #current\n", + "NEP= h*c*sqrt(2*q*I)/(eta*q*lamda) \n", + "D=NEP**-1 \n", + "print \"Noise equivalent power is %.3e W.\\nSpecific directivity is %.2e.\" %(NEP,D) \n", + "#answers in the book for NEP & D is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise equivalent power is 7.723e-14 W.\n", + "Specific directivity is 1.29e+13.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9.2, page 7-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=1300*10**-9 \n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "eta=90/100 #quantum efficiency\n", + "P0=300*10**-9 #optical power\n", + "Id=4 #dark current\n", + "B=20*10**6 #bandwidth\n", + "K=1.39*10**-23 #Boltzman constant\n", + "T=298 #temperature\n", + "R=1000 #load resister\n", + "Ip= 10**9*eta*P0*q*lamda/(h*c) \n", + "Its=10**9*(2*q*B*(Ip+Id)) \n", + "Its=sqrt(Its) \n", + "print \"rms shot noise current is %.2f nA.\" %(Its) \n", + "It= 4*K*T*B/R \n", + "It=sqrt(It) \n", + "print \"Thermal noise is %.2e A.\" %(It) \n", + "#answer given in book for shot noise & Thermal noise are wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms shot noise current is 1.35 nA.\n", + "Thermal noise is 1.82e-08 A.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10.1, page 7-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import floor\n", + "lamda=0.85*10**-6 \n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "eta=75/100 #quantum efficiency\n", + "P0=0.6*10**-6 #incident optical power\n", + "Im=15*10**2 #avalanche gain\n", + "R= eta*q*lamda/(h*c) #computing responsivity\n", + "Ip=10**8*P0*R #computing photocurrent\n", + "Ip=floor(Ip) \n", + "M=Im/Ip #computing multiplication factor\n", + "print \"Multiplication factor is %d.\" %(M) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Multiplication factor is 50.\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10.2, page 7-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "lamda=900*10**-9 # Wavelength in m\n", + "P0=0.5 # Optical power\n", + "Im=10 # Photocurrent\n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "eta=65.0/100 #quantum efficiency\n", + "R= eta*q*lamda/(h*c) #computing responsivity\n", + "Ip=P0*R #computing photocurrent \n", + "M=Im/Ip #computing multiplication factor\n", + "print \"Multiplication factor is %0.2f.\" %(M) \n", + "# Answer is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Multiplication factor is 42.47.\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10.3, page 7-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=900*10**-9 \n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "eta=65/100 #quantum efficiency\n", + "P0=0.5*10**-6 #incident optical power\n", + "Im=10*10**2 #avalanche gain\n", + "R= eta*q*lamda/(h*c) #computing responsivity\n", + "Ip=10**8*P0*R #computing photocurrent\n", + "M=Im/Ip #computing multiplication factor\n", + "print \"Multiplication factor is %d.\" %(M) \n", + "#answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Multiplication factor is 42.\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10.3, page 7-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=900*10**-9 \n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "eta=65/100 #quantum efficiency\n", + "P0=0.5*10**-6 #incident optical power\n", + "Im=10*10**2 #avalanche gain\n", + "R= eta*q*lamda/(h*c) #computong responsivity\n", + "Ip=10**8*P0*R #computing photocurrent\n", + "M=Im/Ip #computing multiplication factor\n", + "print \"Multiplication factor is %d.\" %M " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Multiplication factor is 42.\n" + ] + } + ], + "prompt_number": 48 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication_by_Anasuya_Kalavar/chapter8.ipynb b/Optical_Communication_by_Anasuya_Kalavar/chapter8.ipynb new file mode 100755 index 00000000..11017e30 --- /dev/null +++ b/Optical_Communication_by_Anasuya_Kalavar/chapter8.ipynb @@ -0,0 +1,272 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3deb63e976713f6e36585549e6b144389b0fc28fe2982a2838d929f3804cde18" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter8 - Optical receiver operation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2.1, page 8-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import log, sqrt, pi, log10\n", + "P=10**-9 #probability of error\n", + "eta=1 #ideal detector\n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "lamda=1*10**-6 #wavelength\n", + "B=10**7 #bit rate\n", + "Mn = -log(P) \n", + "print \"The quantum limit at the receiver to maintain bit error rate 10**-9 is (%.1f*h*f)/eta.\" %Mn\n", + "f=c/lamda\n", + "Popt= 0.5*Mn*h*f*B/eta #computing optical power\n", + "Popt_dB = 10 * log10(Popt) + 30 #optical power in dbm\n", + "Popt=Popt*10**12 \n", + "print \"Minimum incident optical power is %.1f W or %.1f dBm.\" %(Popt,Popt_dB) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The quantum limit at the receiver to maintain bit error rate 10**-9 is (20.7*h*f)/eta.\n", + "Minimum incident optical power is 20.6 W or -76.9 dBm.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2.2, page 8-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SN_dB=60 #signal to noise ratio\n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "lamda=1.3*10**-6 #wavelength\n", + "eta=1 \n", + "B=6.5*10**6 #Bandwidth\n", + "SN=10**(SN_dB/10) \n", + "f=c/lamda\n", + "Popt= 2*SN*h*f*B/eta #computing optical power\n", + "Popt_dB = 10 * log10(Popt) + 30 #optical power in dbm\n", + "Popt=Popt*10**6 \n", + "print \"Incident power required to get an SNR of 60 dB at the receiver is %.4f microWatt or %.3f dBm\" %(Popt,Popt_dB)\n", + "#Calculation error in the book.They have take SN as 10**5 while calculating, which has lead to an error in final answer\n", + "#answer in the book 198.1nW and -37.71 dBm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Incident power required to get an SNR of 60 dB at the receiver is 1.9878 microWatt or -27.016 dBm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3.1, page 8-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=0.85*10**-6 \n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "eta=65/100 #quantum efficiency\n", + "P0=300*10**-9 #optical power\n", + "Id=3.5 #dark current\n", + "B=6.5*10**6 #bandwidth\n", + "K=1.39*10**-23 #Boltzman constant\n", + "T=293 #temperature\n", + "R=5*10**3 #load resister\n", + "Ip= 10**9*eta*P0*q*lamda/(h*c) \n", + "Its=10**9*(2*q*B*(Ip+Id)) \n", + "Its=sqrt(Its) \n", + "print \"rms shot noise current is %.2f nA.\" %(Its) \n", + "It= 4*K*T*B/R \n", + "It=sqrt(It) \n", + "It=It*10**9 \n", + "print \"Thermal noise is %.2f nA.\" %(It) \n", + "#answer given in book for Thermal noise is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms shot noise current is 0.53 nA.\n", + "Thermal noise is 4.60 nA.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3.2, page 8-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=0.85*10**-6 \n", + "h=6.626*10**-34 #plank's constant\n", + "c=3*10**8 #speed of light\n", + "q=1.6*10**-19 #charge of electron\n", + "eta=65/100 #quantum efficiency\n", + "P0=300*10**-9 #optical power\n", + "Id=3.5 #dark current\n", + "B=6.5*10**6 #bandwidth\n", + "K=1.39*10**-23 #Boltzman constant\n", + "T=293 #temperature\n", + "R=5*10**3 #load resister\n", + "F_dB=3 #noise figure\n", + "F=10**(F_dB/10) \n", + "Ip=10**9*eta*P0*q*lamda/(h*c) \n", + "Its=10**9*(2*q*B*(Ip+Id)) \n", + "It1= 4*K*T*B*F/R \n", + "SN= Ip**2/(Its+It1) \n", + "SN_dB=10*log10(SN) \n", + "SN=SN\n", + "print \"SNR is %.2e or %.2f dB.\" %(SN,SN_dB) \n", + "#answer given in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "SNR is 6.25e+04 or 47.96 dB.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4.1, page 8-14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Cd=7*10**-12 \n", + "B=9*10**6 \n", + "Ca=7*10**-12 \n", + "R=(2*3.14*Cd*B)**-1 \n", + "B1=(2*3.14*R*(Cd+Ca))**-1 \n", + "R=R/1000 \n", + "B1=B1/10**6 \n", + "print \"\"\"Thus for 9MHz bandwidth maximum load resistance is %.2f Kohm\n", + "Now if we consider input capacitance of following amplifier Ca then Bandwidth is %.2fMHz\n", + "Maximum post detection bandwidth is half.\"\"\"%(R,B1) \n", + "#answer for resistance in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus for 9MHz bandwidth maximum load resistance is 2.53 Kohm\n", + "Now if we consider input capacitance of following amplifier Ca then Bandwidth is 4.50MHz\n", + "Maximum post detection bandwidth is half.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Question 7, page 8.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "w=25*10**-6 #width\n", + "v=3*10**4 #velocity\n", + "t=w/v #computing drift time\n", + "BW=(2*pi*t)**-1 #computing bandwidth\n", + "rt=1/BW #response time\n", + "rt=rt*10**9 \n", + "print \"Maximum response time is %.2f ns.\" %(rt) \n", + "#Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum response time is 5.24 ns.\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Optical_Communication_by_Anasuya_Kalavar/chapter9.ipynb b/Optical_Communication_by_Anasuya_Kalavar/chapter9.ipynb new file mode 100755 index 00000000..ba8336a3 --- /dev/null +++ b/Optical_Communication_by_Anasuya_Kalavar/chapter9.ipynb @@ -0,0 +1,99 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c071b41323ac94460e204090d265021c7f2c7744a035dad84fc7193e1854e444" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter9 - Link design" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4.1, page 9-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "output=13 #laser output\n", + "sensitivity=-31 #APD sensitivity\n", + "coupling_loss=0.5 \n", + "L=80 #length in km\n", + "sl=0.1 #loss correspond to one splice in dB\n", + "fl=0.35 #fiber loss in dB/km\n", + "noise=1.5 \n", + "allowed_loss=output-sensitivity \n", + "splices_loss=(L-1)*sl \n", + "fiber_loss=L*fl \n", + "margin=allowed_loss-(splices_loss+fiber_loss+coupling_loss+noise) \n", + "print \"Final margin is %.1f dB.\" %margin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final margin is 6.1 dB.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6.1, page 9-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt\n", + "L=10 \n", + "ts=10 \n", + "tD=8 \n", + "tmod=L*6 \n", + "tt=L*2 \n", + "Tsys=1.1*sqrt(ts**2+tmod**2+tt**2+tD**2) \n", + "Bt=0.7/Tsys \n", + "Bt=Bt*10**3 \n", + "print \"Maximum bit rate for link using NRZ data format is %.2f Mbits/sec.\" %Bt \n", + "#calculation error in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum bit rate for link using NRZ data format is 9.86 Mbits/sec.\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |