diff options
author | Trupti Kini | 2016-05-08 23:30:29 +0600 |
---|---|---|
committer | Trupti Kini | 2016-05-08 23:30:29 +0600 |
commit | 7262656f9b42f6e2cf6313c7bb6d96ff0db4a2f8 (patch) | |
tree | 9f6786d3263760b1c0c5af6dd9a6dbdcc6e99aba /Optical_Fiber_Communication_System_by_Dr._M.K._Raina | |
parent | 004c6da6287fbcb9e7935acbd40b37b88c5bd6f8 (diff) | |
download | Python-Textbook-Companions-7262656f9b42f6e2cf6313c7bb6d96ff0db4a2f8.tar.gz Python-Textbook-Companions-7262656f9b42f6e2cf6313c7bb6d96ff0db4a2f8.tar.bz2 Python-Textbook-Companions-7262656f9b42f6e2cf6313c7bb6d96ff0db4a2f8.zip |
Added(A)/Deleted(D) following books
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap10.ipynb
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap2.ipynb
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap3.ipynb
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap4.ipynb
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap5.ipynb
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap6.ipynb
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap7.ipynb
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap9.ipynb
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/Sc1.png
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc2.png
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc3.png
Diffstat (limited to 'Optical_Fiber_Communication_System_by_Dr._M.K._Raina')
12 files changed, 7359 insertions, 0 deletions
diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap10.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap10.ipynb new file mode 100644 index 00000000..69e8c604 --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap10.ipynb @@ -0,0 +1,441 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter10 - Optical Fiber Systems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.1 Page No: 412" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The voltage required to have a pi radian phase change = 4.56 volt\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "r=30.8*10**-12## electro optice coefficient in m/V\n", + "L=3*10**-2## length in m\n", + "y=1.3*10**-6## wavelength in m\n", + "n=2.1#\n", + "d=30*10**-6## distance between the electrodes in m\n", + "V=(y*d)/((n)**3*r*L)## voltage required to have a pi radian phase change in volt\n", + "print \"The voltage required to have a pi radian phase change = %0.2f volt\"%( V)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.2 Page No: 412" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total channel loss =31 dB\n" + ] + } + ], + "source": [ + "a_fc=4## fider cable loss in dB/km\n", + "aj=0.7## splice loss in db/km\n", + "L=5## length in km\n", + "a_cr1=4## connector losses\n", + "a_cr2=3.5## connector losses\n", + "CL=(a_fc+aj)*L+(a_cr1+a_cr2)## total channel loss in dB\n", + "print \"The total channel loss =%d dB\"%( CL)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.3 Page No: 413" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "with mode coupling, the total rms broadening = 1.73 ns\n", + "\n", + " The dispersion equalization penalty = 1.84 dB\n", + "\n", + " without mode coupling, the total rms broadening = 6.00 dB\n", + "\n", + " without mode coupling, equalization penalty = 0.03 dB\n", + "\n", + " without mode coupling,dispersion equalization penalty with 125 Mb/s = 83.98 dB\n", + "\n", + " with mode coupling,dispersion equalization penalty with 125 Mb/s = 0.28 dB\n", + "\n", + " The answer is wrong in the textbook\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "p=0.5*10**-9## pulse broadening in s/km\n", + "L=12## length in km\n", + "Pt=p*sqrt(L)## with mode coupling, the total rms broadening in s\n", + "BT=20*10**6##\n", + "DL=2*(2*Pt*BT*sqrt(2))**4## dispersion equalization penalty in dB\n", + "Pt1=p*L## without mode coupling, the total rms broadening in s\n", + "DL1=2*(2*Pt1*BT*sqrt(2))**4## without mode coupling, equalization penalty in dB\n", + "DL2=2*(2*Pt1*150*10**6*sqrt(2))**4## without mode coupling,dispersion equalization penalty with 125 Mb/s\n", + "DL3=2*(2*Pt*125*10**6*sqrt(2))**4## with mode coupling,dispersion equalization penalty with 125 Mb/s\n", + "print \"with mode coupling, the total rms broadening = %0.2f ns\"%( Pt*10**9)#\n", + "print \"\\n The dispersion equalization penalty = %0.2f dB\"%( DL*10**4)#\n", + "print \"\\n without mode coupling, the total rms broadening = %0.2f dB\"%( Pt1*10**9)#\n", + "print \"\\n without mode coupling, equalization penalty = %0.2f dB\"%( DL1)#\n", + "print \"\\n without mode coupling,dispersion equalization penalty with 125 Mb/s = %0.2f dB\"%( DL2)#\n", + "print \"\\n with mode coupling,dispersion equalization penalty with 125 Mb/s = %0.2f dB\"%( DL3)#\n", + "print \"\\n The answer is wrong in the textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.4 Page No: 414" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The length when system operating at 25 Mbps = 78.89 km\n", + "\n", + " The length when system operating at 350 Mbps = 56.67 km\n" + ] + } + ], + "source": [ + "Pi=-2.5## mean optical power launched into the fiber in dBm\n", + "Po=-45## mean output optical power available at the receiver in dBm\n", + "a_fc=0.35## fider cable loss in dB/km\n", + "aj=0.1## splice loss in db/km\n", + "a_cr=1## connector losses\n", + "Ma=6## safety margin in dB\n", + "L=(Pi-Po-a_cr-Ma)/(a_fc+aj)## length in km when system operating at 25 Mbps\n", + "Po1=-35## mean output optical power available at the receiver in dBm\n", + "L1=(Pi-Po1-a_cr-Ma)/(a_fc+aj)## length in km when system operating at 350 Mbps\n", + "print \"The length when system operating at 25 Mbps = %0.2f km\"%( L)#\n", + "print \"\\n The length when system operating at 350 Mbps = %0.2f km\"%( L1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.5 Page No: 414" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fider loss = 20.00 dB\n", + "\n", + " The total splicing loss = 3.20 dB\n", + "\n", + " The fangle effects & future splice = 5.00 dB\n", + "\n", + " The total attenuation = 29.20 dB\n", + "\n", + " The excess power margin = 2.80 dB\n", + "\n", + " hence the system can operate with small excess power margin\n" + ] + } + ], + "source": [ + "Tx=-80## transmitter output in dBm\n", + "Rx=-40## receiver sensitivity in dBm\n", + "sm=32## system margin in dB\n", + "L=10## in km\n", + "fl=2*L## fider loss in dB\n", + "cl=1## detector coupling loss in dB\n", + "tl=0.4*8## total splicing loss in dB\n", + "ae=5## angle effects & future splice in dB\n", + "ta=29.2## total attenuation in dB\n", + "Ep=2.8## excess power margin in dB\n", + "print \"The fider loss = %0.2f dB\"%( fl)#\n", + "print \"\\n The total splicing loss = %0.2f dB\"%( tl)#\n", + "print \"\\n The fangle effects & future splice = %0.2f dB\"%( ae)#\n", + "print \"\\n The total attenuation = %0.2f dB\"%( ta)#\n", + "print \"\\n The excess power margin = %0.2f dB\"%( Ep)#\n", + "print \"\\n hence the system can operate with small excess power margin\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.6 Page No: 415" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max transmission length when transmission star coupler is used = 1.99 km\n", + "\n", + " The max transmission length when reflection star coupler is used = 1.24 km\n" + ] + } + ], + "source": [ + "from math import log\n", + "Lc=1## connector loss in db\n", + "Ls=5## star coupler insertion loss in dB\n", + "af=2## fider loss in dB\n", + "Ps=-14## transmitted power in dBm\n", + "Pr=-49## receiver sensitivity in dBm\n", + "sm=6## system margin in dB\n", + "N=16#\n", + "L=(Ps-Pr-Ls-4*Lc-(10*log(N))/log(10)-sm)/(2*af)## max transmission length in km when transmission star coupler is used\n", + "N1=32#\n", + "L1=(Ps-Pr-Ls-4*Lc-(10*log(N1))/log(10)-sm)/(2*af)## max transmission length in km when reflection star coupler is used\n", + "print \"The max transmission length when transmission star coupler is used = %0.2f km\"%( L)#\n", + "print \"\\n The max transmission length when reflection star coupler is used = %0.2f km\"%( L1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.7 Page No: 416" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The system rise time = 18.51 ns\n", + "\n", + " The max bit rate for NRZ coding = 37.81 Mbit/s\n", + "\n", + " The max bit rate for RZ coding = 18.90 Mbit/s\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "y=860*10**-9## wavelength in m\n", + "L=5000## length in m\n", + "X=0.024#\n", + "dy=20*10**-9## spectral width in m\n", + "dts=6*10**-9## silica optical link rise time in s\n", + "dtr=8*10**-9## detector rise in s\n", + "c=3*10**8## speed of light in m/s\n", + "dtm=-(L*dy*X)/(c*y)## material dispersion delay time in s\n", + "id=2.5*10**-12## intermodel dispersion in s/m\n", + "dti=id*L## intermodel dispersion delay time\n", + "dtsy=sqrt((dts**2)+(dtr**2)+(dtm**2)+(dti**2))## system rise time in s\n", + "Br_max=0.7/dtsy## max bit rate for NRZ coding in bit/s\n", + "Br_max1=0.35/dtsy## max bit rate for RZ coding in bit/s\n", + "print \"The system rise time = %0.2f ns\"%( dtsy*10**9)#\n", + "print \"\\n The max bit rate for NRZ coding = %0.2f Mbit/s\"%( Br_max/10**6)#\n", + "print \"\\n The max bit rate for RZ coding = %0.2f Mbit/s\"%( Br_max1/10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.8 Page No: 417" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The transmission distance for Si fiber = 71.43 m\n", + "\n", + " The transmission distance for GRIN fiber = 420.00 m\n" + ] + } + ], + "source": [ + "Br=50*10**6## data rate in b/s\n", + "c=3*10**8## speed of light in m/s\n", + "n1=1.47## \n", + "dl=0.02## \n", + "n12=n1*dl## the difference b/w n1 and n2\n", + "L_si=(0.35*c)/(n12*Br)## transmission distance for Si fiber\n", + "L_GI=(2.8*c*n1**2)/(2*n1*n12*Br)## transmission distance for GRIN fiber\n", + "print \"The transmission distance for Si fiber = %0.2f m\"%( L_si)#\n", + "print \"\\n The transmission distance for GRIN fiber = %0.2f m\"%( L_GI)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.9 Page No: 417" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The material dispersion limited transmission distance =627 m\n" + ] + } + ], + "source": [ + "Br=20.0*10**6## data rate in b/s\n", + "c=3*10**8## speed of light in m/s\n", + "y=86*10**-9## wavelength in m\n", + "dy=30*10**-9## spectral width in m\n", + "X=0.024#\n", + "Tb=1/Br#\n", + "Lmax=(0.35*Tb*c*y)/(dy*X)## material dispersion limited transmission distance for RZ coding in m\n", + "print \"The material dispersion limited transmission distance =%d m\"%( Lmax)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:10.10 Page No: 418" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The material dispersion limited distance = 12.54*10**10*1/Br m\n", + "\n", + " The model dispersion limited distance = 2.10*10**10*1/Br m\n", + "\n", + " The attenuation limited distance =60-20log(Br) km\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "y=860*10**-9## wavelength in m\n", + "c=3*10**8## speed of light in m/s\n", + "n1=1.47## \n", + "dl=0.02## \n", + "n12=n1*dl## the difference b/w n1 and n2\n", + "La=1/1000## loss a in dB/m\n", + "Pr=-65## receiver power in dB\n", + "Pt=-5## transmitted power in dB\n", + "dy=30*10**-9## line width in m\n", + "X=0.024#\n", + "Lmax=(0.35*c*y)/(dy*X)## material dispersion limited distance for RZ coding in m\n", + "L_GI=(1.4*c*n1)/(n12)## model dispersion limited distance for RZ coding in m\n", + "L_At=(Pt-Pr)/(La)## attenuation limited distance for RZ coding in m \n", + "print \"The material dispersion limited distance = %0.2f*10**10*1/Br m\"%( Lmax/10**10)#\n", + "print \"\\n The model dispersion limited distance = %0.2f*10**10*1/Br m\"%( L_GI/10**10)#\n", + "print \"\\n The attenuation limited distance =%d-20log(Br) km\"%( L_At/10**3)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap2.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap2.ipynb new file mode 100644 index 00000000..945ece3f --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap2.ipynb @@ -0,0 +1,636 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ch-2 : Ray Theory Transmission in Optical Fibers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2_1 Pg: 54" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Critical angle in degree= 75.41 degree\n", + "\n", + " Numerical aperture= 0.39 \n", + "\n", + " Acceptance angle in degree= 23.00 degree\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import asin,pi,ceil,sqrt\n", + "n1=1.55## core refractive index\n", + "n2=1.50## cladding refractive index\n", + "x=asin(n2/n1)# # Critical angle in radians\n", + "x1=x*180/(pi)## Critical angle in degree\n", + "n_a=sqrt(n1**2-n2**2)## Numerical aperture\n", + "x_a=asin(n_a)*180/(pi)#\n", + "x_a1=ceil(x_a)## Acceptance angle in Degree\n", + "print \"Critical angle in degree= %0.2f degree\"%(x1)#\n", + "print \"\\n Numerical aperture= %0.2f \"%(n_a)#\n", + "print \"\\n Acceptance angle in degree= %0.2f degree\"%(x_a1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.2 Pg: 56" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.42\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sin,sqrt\n", + "c=3*10**8## speed of light in m/s\n", + "v=2*10**8## in m/s\n", + "n1=c/v#\n", + "x=75## in degree\n", + "n2=n1*sin((x*3.14/180))#\n", + "n_2=1.44#\n", + "n_a=sqrt(n1**2-n_2**2)## numerical aperture\n", + "print \"Numerical aperture = %0.2f\"%(n_a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.3 Pg: 57" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.30\n", + "\n", + " acceptance angle in degree = 17.46 degree\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt,asin,pi\n", + "n1=1.50## core refractive index\n", + "n2=1.47## cladding refractive index\n", + "dl=(n1-n2)/n1#\n", + "n_a=n1*(sqrt(2*dl))## numerical aperture\n", + "x_a=(asin(n_a))*180/pi## acceptance angle in degree\n", + "print \"Numerical aperture = %0.2f\"%(n_a)#\n", + "print \"\\n acceptance angle in degree = %0.2f degree\"%(x_a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.4 Pg: 58" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.39\n", + "\n", + " acceptance angle in degree = 22.79 degree\n", + "\n", + " critical angle in degree = 75.20 degree\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt,asin,pi\n", + "n1=1.50## core refractive index\n", + "n2=1.45## cladding refractive index\n", + "dl=(n1-n2)/n1#\n", + "n_a=n1*(sqrt(2*dl))## numerical aperture\n", + "x_a=(asin(n_a))*180/pi## acceptance angle in degree\n", + "x_c=(asin(n2/n1))*180/3.14## critical angle in degree\n", + "print \"Numerical aperture = %0.2f\"%(n_a)#\n", + "print \"\\n acceptance angle in degree = %0.2f degree\"%(x_a)#\n", + "print \"\\n critical angle in degree = %0.2f degree\"%(x_c)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.5 Pg: 58" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "core refractive ondex = 1.42\n", + "\n", + " cladding refractive index = 1.40\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt\n", + "dl=0.012#\n", + "n_a=0.22## numerical aperture\n", + "n1=n_a/(sqrt(2*dl))## core refractive ondex\n", + "n2=n1-(dl*n1)## cladding refractive index\n", + "print \"core refractive ondex = %0.2f\"%(n1)#\n", + "print \"\\n cladding refractive index = %0.2f\"%(n2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.6 Pg: 59" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "core refractive ondex = 2.47\n", + "\n", + " cladding refractive index = 2.45\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "dl=0.01#\n", + "n_a=0.35## numerical aperture\n", + "n1=n_a/(sqrt(2*dl))## core refractive ondex\n", + "n2=n1-(dl*n1)## cladding refractive index\n", + "print \"core refractive ondex = %0.2f\"%(n1)#\n", + "print \"\\n cladding refractive index = %0.2f\"%(n2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.7 Pg: 59" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "acceptance angle in degree = 7.72 degree\n", + "\n", + " critical angle in degree = 82.83 degree\n", + "\n", + " number of modes transmitted = 288\n" + ] + } + ], + "source": [ + "from math import sqrt,asin,pi,floor\n", + "from __future__ import division\n", + "n2=1.59## cladding refractive index\n", + "n_a=0.2## numerical aperture\n", + "n1=sqrt(n2**2+n_a**2)## core refractive index\n", + "n_1=1.60## core refractive index\n", + "n_o=1.33#\n", + "A=(sqrt(n_1**2-n2**2))/n_o#\n", + "x_a=(asin(A))*180/pi## acceptance angle in degree\n", + "x_c=(asin(n2/n1))*180/pi## critical angle in degree\n", + "y=1300*10**(-9)## in meter\n", + "a=25*10**(-6)## in meter\n", + "v=(2*pi*a*n_a)/y#\n", + "V=floor(v)#\n", + "M=V**2/2## number of modes transmitted\n", + "print \"acceptance angle in degree = %0.2f degree\"%(x_a)#\n", + "print \"\\n critical angle in degree = %0.2f degree\"%(x_c)#\n", + "print \"\\n number of modes transmitted = %d\"%(M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.8 Pg: 60" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.30\n", + "\n", + " the maximum entrance angle in degree = 17.46 degree\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,asin\n", + "from __future__ import division\n", + "n1=1.50## core refractive index\n", + "n2=1.47## cladding refractive index\n", + "dl=(n1-n2)/n1#\n", + "n_a=n1*(sqrt(2*dl))## numerical aperture\n", + "x_e=(asin(n_a))*180/pi## the maximum entrance angle in degree\n", + "print \"Numerical aperture = %0.2f\"%(n_a)#\n", + "print \"\\n the maximum entrance angle in degree = %0.2f degree\"%(x_e)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.9 Pg: 61" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.29\n", + "\n", + " acceptance angle in degree = 16.74 degree\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,asin\n", + "from __future__ import division\n", + "n1=1.44## core refractive index\n", + "dl=0.02#\n", + "n_a=n1*sqrt(2*dl)#\n", + "n_a=n1*(sqrt(2*dl))## numerical aperture\n", + "x_a=(asin(n_a))*180/pi## acceptance angle in degree\n", + "print \"Numerical aperture = %0.2f\"%(n_a)#\n", + "print \"\\n acceptance angle in degree = %0.2f degree\"%(x_a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.10 Pg: 61" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical angle = 81.89 degree\n", + "\n", + " numerical aperture = 0.21\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,asin\n", + "from __future__ import division\n", + "n1=1.50## core refractive index\n", + "n2=(99/100)*1.50## cladding refractive index\n", + "x_c=(asin(n2/n1))*180/pi## critical angle in degree\n", + "n_m=sqrt(n1**2-n2**2)## numerical aperture\n", + "print \"critical angle = %0.2f degree\"%(x_c)#\n", + "print \"\\n numerical aperture = %0.2f\"%(n_m)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.11 Pg: 61" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture = 0.38\n", + "\n", + " fractional difference = 0.03\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.50## core refractive index\n", + "n2=1.45## cladding refractive index\n", + "n_m=sqrt(n1**2-n2**2)## numerical aperture\n", + "dl=(n1-n2)/n1## fractional difference\n", + "print \"numerical aperture = %0.2f\"%(n_m)#\n", + "print \"\\n fractional difference = %0.2f\"%(dl)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.12 Pg: 62" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical angle = 83.29 degree\n", + "\n", + " acceptance angle = 9.82 degree\n", + "\n", + " numerical aperture = 0.17\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,asin\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "n2=1.45## cladding refractive index\n", + "x_c=(asin(n2/n1))*180/pi## critical angle in degree\n", + "n_m=sqrt(n1**2-n2**2)## numerical aperture\n", + "x_a=(asin(n_m))*180/pi## acceptance angle in degree\n", + "print \"critical angle = %0.2f degree\"%(x_c)#\n", + "print \"\\n acceptance angle = %0.2f degree\"%(x_a)#\n", + "print \"\\n numerical aperture = %0.2f\"%(n_m)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.13 Pg: 62" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "core refractive index = 1.44\n", + "\n", + " cladding refractive index = 1.43\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n_m=0.204## numerical aperture\n", + "dl=0.01## index difference\n", + "n1=n_m/(sqrt(2*dl))## core refractive index\n", + "n2=n1*(1-dl)## cladding refractive index\n", + "print \"core refractive index = %0.2f\"%(n1)#\n", + "print \"\\n cladding refractive index = %0.2f\"%(n2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.14 Pg: 62" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical angle = 81.89 degree\n", + "\n", + " numerical aperture = 0.21\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,asin\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "dl=0.01## index difference\n", + "n_2=n1-(n1*dl)## cladding refractive index\n", + "x_c=(asin(n_2/n1))*180/pi## critical angle in degree\n", + "n_m=sqrt(n1**2-n_2**2)## numerical aperture\n", + "print \"critical angle = %0.2f degree\"%(x_c)#\n", + "print \"\\n numerical aperture = %0.2f\"%(n_m)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.15 Pg: 62" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical angle=75.16 degree\n", + "\n", + " acceptance angle=22.59 degree\n", + "\n", + " numerical aperture=0.38\n", + "\n", + " percentage of light=14.75%\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,asin\n", + "from __future__ import division\n", + "n1=1.50## core refractive index\n", + "n2=1.45## cladding refractive index\n", + "x_c=(asin(n2/n1))*180/pi## critical angle in degree\n", + "n_m=sqrt(n1**2-n2**2)## numerical aperture\n", + "x_a=(asin(n_m))*180/pi## acceptance angle in degree\n", + "n_c=(n_m)**2*100## percentage of light\n", + "print \"critical angle=%0.2f degree\"%(x_c)#\n", + "print \"\\n acceptance angle=%0.2f degree\"%(x_a)#\n", + "print \"\\n numerical aperture=%0.2f\"%(n_m)#\n", + "print \"\\n percentage of light=%0.2f%%\"%(n_c)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:2.16 Pg: 63" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture=0.21\n", + "\n", + " acceptance angle=0.14 radian\n", + "\n", + " critical angle=81.89 degree\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,asin\n", + "from __future__ import division\n", + "n1=1.50## core refractive index\n", + "dl=0.01## index difference\n", + "n_m=n1*(sqrt(2*dl))## numerical aperture\n", + "x_a=pi*(n_m)**2## acceptance angle in radian\n", + "n2_1=1-dl## the ratio of n2 to n1\n", + "x_c=(asin(n2_1))*180/pi## critical angle in degree\n", + "print \"numerical aperture=%0.2f\"%(n_m)#\n", + "print \"\\n acceptance angle=%0.2f radian\"%(x_a)#\n", + "print \"\\n critical angle=%0.2f degree\"%(x_c)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap3.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap3.ipynb new file mode 100644 index 00000000..82ba5ae8 --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap3.ipynb @@ -0,0 +1,1165 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ch-3 : Modes and Rays" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.1 Pg: 84" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "core radius=37.90 micrometer\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.50## core refractive index\n", + "n2=1.48## cladding refractive index\n", + "y=1.3*10**-6#\n", + "m=1000## the no. of models\n", + "v=sqrt(2*m)#\n", + "a=(v*y)/(2*pi*(sqrt(n1**2-n2**2)))*10**6## core radius in micrometer\n", + "print \"core radius=%0.2f micrometer\"%(a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.2 Pg: 84" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture=0.09\n", + "\n", + " core radius=5.23 micrometer\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.505## core refractive index\n", + "n2=1.502## cladding refractive index\n", + "n_m=sqrt(n1**2-n2**2)## numerical aperture\n", + "y=1.3*10**-6#\n", + "v=2.4#\n", + "a=(v*y)/(2*pi*(sqrt(n1**2-n2**2)))*10**6## core radius in micrometer\n", + "print \"numerical aperture=%0.2f\"%(n_m)#\n", + "print \"\\n core radius=%0.2f micrometer\"%(a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.3 Pg: 85" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "propagation constant=7.22 rad/um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "dl=0.01##index difference\n", + "m=0## for the dominant mode\n", + "v=0## for the dominant mode\n", + "y=1.3## in micrometer\n", + "a=5## radius in micrometer\n", + "k=(2*pi)/y#\n", + "b=k**2*n1**2-(2*k*n1*sqrt(2*dl))/a#\n", + "B=sqrt(b)## propagation constant in rad/um\n", + "print \"propagation constant=%0.2f rad/um\"%(B)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.5 Pg: 85" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total no. of models allowed=8\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,ceil\n", + "from __future__ import division\n", + "n1=3.6## core refractive index\n", + "n2=3.3## cladding refractive index\n", + "d=2.0## thickness in um\n", + "y=0.8## wavelength in um\n", + "m=(2*d*sqrt(n1**2-n2**2))/y## total no. of models allowed\n", + "M=ceil(m)## total no. of models allowed\n", + "print \"total no. of models allowed=%d\"%(M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.6 Pg: 86" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "normalised frequency=75.80\n", + "\n", + " the total no. of guided modess =2873\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,ceil\n", + "from __future__ import division\n", + "n1=1.48## core refractive index\n", + "a=40*(10**-6)## core radius in meter\n", + "dl=0.015## index difference\n", + "y=0.85*(10**-6)## wavelength in um\n", + "v=(2*pi*a*n1*sqrt(2*dl))/y## normalised frequency\n", + "M=v**2/2#\n", + "m=ceil(M)## the total no. of guided modes\n", + "print \"normalised frequency=%0.2f\"%(v)#\n", + "print \"\\n the total no. of guided modess =%d\"%(m)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " ## Ex:3.7 Pg: 87" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cladding refractive index=1.44\n", + "\n", + " normalised frequency=56.08\n", + "\n", + " the total no. of guided modess =1572\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "dl=0.015## index difference\n", + "a=30*(10**-6)## core radius in meter\n", + "y=0.85*(10**-6)## wavelength in um\n", + "n2=n1-(n1*dl)## cladding refractive index\n", + "v=(2*pi*a*n1*sqrt(2*dl))/y## normalised frequency\n", + "M=v**2/2## the total no. of guided modes\n", + "print \"cladding refractive index=%0.2f\"%(n2)#\n", + "print \"\\n normalised frequency=%0.2f\"%(v)#\n", + "print \"\\n the total no. of guided modess =%d\"%(M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.8 Pg: 87" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "normalised frequency=46.90\n", + "\n", + " the diameter of the fiber core =91.50 um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "dl=0.01## index difference\n", + "M=1100## the total no. of guided modes\n", + "y=1.3*(10**-6)## wavelength in um\n", + "v=sqrt(2*M)## normalised frequency\n", + "a=(v*y)/(2*pi*n1*sqrt(2*dl))*10**6## core radius in meter\n", + "print \"normalised frequency=%0.2f\"%(v)#\n", + "print \"\\n the diameter of the fiber core =%0.2f um\"%(2*a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " ## Ex:3.9 Pg: 87" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "normalised frequency=60.32\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.45## core refractive index\n", + "n_m=0.16## numerical aperture\n", + "a=30*10**-6## core radius in micrometer\n", + "y=0.5*(10**-6)## wavelength in um\n", + "v=(2*pi*a*n_m)/y## normalised frequency\n", + "print \"normalised frequency=%0.2f\"%(v)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.10 Pg: 88" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the max thickness=0.61 um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=3.6## core refractive index\n", + "n2=3.56## cladding refractive index\n", + "y=0.85*(10**-6)## wavelength in um\n", + "m=1#\n", + "n=0#\n", + "v_c=2.405## for planner guide\n", + "a=(v_c*y)/(2*pi*sqrt(n1**2-n2**2))## core radius in micrometer\n", + "print \"the max thickness=%0.2f um\"%(a*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.11 Pg: 88" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the core diameter=92 um\n" + ] + } + ], + "source": [ + "from math import pi,sqrt,ceil\n", + "from __future__ import division\n", + "n1=1.5 #core refractive index\n", + "y=1.3*(10**-6) #wavelength in um\n", + "M=1100 #total no. of models\n", + "dl=0.01 #index difference\n", + "v=sqrt(2*M) #\n", + "V=ceil(v) #\n", + "a=(V*y)/(2*pi*n1*sqrt(2*dl))*10**6 #core radius in micrometer\n", + "a1=ceil(a) #core radius in micrometer\n", + "print \"the core diameter=%d um\"%(2*a1) " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.12 Pg: 89" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max core diameter in meter=3.66 um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.45## core refractive index\n", + "dl=0.015## index difference\n", + "y=0.85*(10**-6)## wavelength in meter\n", + "v=2.4*(1+(2/2))**(0.5)## Max normalised frequency\n", + "a=(v*y)/(2*pi*n1*(2*dl)**(0.5))## Max core radius in m\n", + "d=2*a## The max core diameter in meter\n", + "print \"The max core diameter in meter=%0.2f um\"%( d*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.13 Pg: 89" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of modes=10.11\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.48## core refractive index\n", + "n2=1.46## cladding refractive index\n", + "a=2.5## radius in um\n", + "y=0.85## wavelength in um\n", + "dl=(n1-n2)/n1## index difference\n", + "v=(2*pi*a*n1*(2*dl)**(0.5))/y## the normaised frequency\n", + "M=(v*v)/2## number of modes\n", + "print \"The number of modes=%0.2f\"%( M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.14 Pg: 90" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of modes=0.22\n", + "\n", + " The number of modes=0.15\n", + "\n", + " answer in textbook is wrong\n", + "\n", + " The number of modes=353.78\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "a=25## radius in um\n", + "y=1.3## wavelength in um\n", + "v=26.6## the normaised frequency\n", + "NA=(v*y)/(2*pi*a)## Numerical aperture\n", + "a_c=pi*(NA)**2#\n", + "M=(v*v)/2#\n", + "print \"The number of modes=%0.2f\"%( NA)#\n", + "print \"\\n The number of modes=%0.2f\"%( a_c)#\n", + "print \"\\n answer in textbook is wrong\"#\n", + "print \"\\n The number of modes=%0.2f\"%( M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.15 Pg: 90" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off wavelength =1.27 um\n", + "\n", + " The min core radius =2.05 um\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.49## core refractive index\n", + "n2=1.47## cladding refractive index\n", + "a=2## radius in um\n", + "dl=(n1-n2)/n1## index difference\n", + "v_c=2.405#\n", + "y_c=(2*3.14*a*n1*(2*dl)**(0.5))/v_c## cut off wavelength in um\n", + "Y=1.31## wavelength in um\n", + "A=(v_c*Y)/(2*3.14*n1*(2*dl)**(0.5))## min core radius in um\n", + "print \"The cut off wavelength =%0.2f um\"%( y_c)#\n", + "print \"\\n The min core radius =%0.2f um\"%( A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.16 Pg: 91" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The normalised frequency =47.12\n", + "\n", + " The mode volume =554 guided modes\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "a=25## radius in um\n", + "NA=0.3## Numerical aperture\n", + "y=1## wavelength in um\n", + "v=(2*pi*a*NA)/y## the normalised frequency\n", + "V=47.1## the normalised frequency\n", + "M=(V*V)/4## The mode volume\n", + "print \"The normalised frequency =%0.2f\"%( v)#\n", + "print \"\\n The mode volume =%d guided modes\"%( M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.17 Pg: 91" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off wavelength =1.21 um\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "a=4.5## radius in um\n", + "dl=0.0025## relative index difference\n", + "v_c=2.405#\n", + "y_c=(2*3.14*a*n1*(2*dl)**(0.5))/v_c## cut off wavelength in um\n", + "print \"The cut off wavelength =%0.2f um\"%( y_c)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.18 Pg: 92" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut of numbers =91.83\n", + "\n", + " The number of modes =4216.48\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "n2=1.45## cladding refractive index\n", + "a=50## radius in um\n", + "y=1.3## operating wavelength in um\n", + "NA=sqrt(n1**2-n2**2)## numerical aperture\n", + "N_A=0.38#\n", + "v=(2*pi*a*N_A)/y## cut of numbers\n", + "M=v**2/2## number of modes\n", + "print \"The cut of numbers =%0.2f\"%( v)#\n", + "print \"\\n The number of modes =%0.2f\"%( M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.19 Pg: 92" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max core radius =1.91 um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.53## core refractive index\n", + "n2=1.5## cladding refractive index\n", + "y=1.5## operating wavelength in um\n", + "NA=sqrt(n1**2-n2**2)## numerical aperture\n", + "a=(2.405*y)/(2*3.14*NA)## max radius in um\n", + "print \"The max core radius =%0.2f um\"%( a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.20 Pg: 92" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The v-number =67.35\n", + "\n", + " The number of modes =2267.87\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "a=25## max radius in um\n", + "y=0.8## operating wavelength in um\n", + "NA=0.343## numerical aperture\n", + "v=(2*pi*a*NA)/y## v-number\n", + "M=v**2/2##number of modes\n", + "print \"The v-number =%0.2f\"%( v)#\n", + "print \"\\n The number of modes =%0.2f\"%( M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.21 Pg: 93" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The core radius =40.84 um\n", + "\n", + " The cladding refractive index =1.45\n", + "\n", + " answer in textbook is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "NA=0.38## numerical aperture\n", + "v=75## v-number\n", + "y=1.3## operating wavelength in um\n", + "a=(v*y)/(2*pi*NA)## core radius in um\n", + "n2=sqrt(n1**2-NA**2)## cladding refractive index\n", + "print \"The core radius =%0.2f um\"%( a)#\n", + "print \"\\n The cladding refractive index =%0.2f\"%( n2)#\n", + "print \"\\n answer in textbook is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.22 Pg: 94" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The divergence angle =0.15 degree\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "y=1.2## operating wavelength in um\n", + "w=5## spot size in um\n", + "x=(2*y)/(pi*w)## the divergence angle in degree\n", + "print \"The divergence angle =%0.2f degree\"%( x)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.23 Pg: 94" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off wavelength =1.21 um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "a=4.5## core radius in um\n", + "dl=0.0025## relative index difference\n", + "NA=n1*(sqrt(2*dl))## numerical aperture\n", + "v=2.405#\n", + "y=(2*pi*a*NA)/(v)## cut off wavelength in um\n", + "print \"The cut off wavelength =%0.2f um\"%( y)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.24 Pg: 94" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of modes at 870 nm =726.14 um\n", + "\n", + " The number of modes =244.27 um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "n2=1.47## cladding refractive index\n", + "y1=0.87## operating wavelength in um\n", + "y2=1.5## operating wavelength in um\n", + "a=25## max radius in um\n", + "NA=sqrt(n1**2-n2**2)## numerical aperture\n", + "v1=(2*pi*a*NA)/y1#\n", + "v2=(2*pi*a*NA)/y2#\n", + "al=2## parabolic index profile for GRIN\n", + "M1=(al/(al+2))*(v1**2/2)## number of modes\n", + "M2=(al/(al+2))*(v2**2/2)## number of modes\n", + "print \"The number of modes at 870 nm =%0.2f um\"%( M1)#\n", + "print \"\\n The number of modes =%0.2f um\"%( M2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.25 Pg: 95" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The numerical aperture =0.34 um\n", + "\n", + " The max core radius =0.94 um\n", + "\n", + " The spot size =2.27 um\n", + "\n", + " The divergence angle =0.22 degree\n", + "\n", + " The spot size at 50 meter =5.97 m\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "n2=1.46## cladding refractive index\n", + "v=2.4## cut off parameter\n", + "y=0.85## operating wavelength in um\n", + "NA=sqrt(n1**2-n2**2)## numerical aperture\n", + "a=(v*y)/(2*3.14*NA)## max radius in um\n", + "w=v*a## spot size\n", + "x=(2*y)/(3.4*w)## divergence angle in degree\n", + "d=50## distance in meter\n", + "w_s=(y*d)/(pi*w)## spot size at 50 meter\n", + "print \"The numerical aperture =%0.2f um\"%( NA)#\n", + "print \"\\n The max core radius =%0.2f um\"%( a)#\n", + "print \"\\n The spot size =%0.2f um\"%( w)#\n", + "print \"\\n The divergence angle =%0.2f degree\"%( x)#\n", + "print \"\\n The spot size at 50 meter =%0.2f m\"%( w_s)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.26 Pg: 95" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max diameter=3.05 um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.53## core refractive index\n", + "n2=1.50## cladding refractive index\n", + "y=1.2## wavelength in um\n", + "v=2.405#\n", + "a=(v*y)/(2*3.14*(sqrt(n1**2-n2**2)))## core radius in micrometer\n", + "print \"The max diameter=%0.2f um\"%(2*a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.27 Pg: 95" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The largest core radius =2.91 um\n", + "\n", + " The fractional refractive index=1.46\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.47## core refractive index\n", + "n2=1.46## cladding refractive index\n", + "y=1.3## wavelength in um\n", + "dl=(n1-n2)/n1## fractional refractive index diff\n", + "NA=sqrt(n1**2-n2**2)#\n", + "v=2.405#\n", + "a=(v*y)/(2*3.14*(sqrt(n1**2-n2**2)))## largest core radius in micrometer\n", + "n_eff=n1-(NA/(2*3.14*(a/y)))## fractional refractive index\n", + "print \"The largest core radius =%0.2f um\"%( a)#\n", + "print \"\\n The fractional refractive index=%0.2f\"%(n_eff)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.28 Pg: 95" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off parameter =45.09\n", + "\n", + " The number of modes =1016\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.50## core refractive index\n", + "n2=1.48## cladding refractive index\n", + "NA=sqrt(n1**2-n2**2)## numerical aperture\n", + "a=25## core radius in um\n", + "y=0.85## wavelength in um\n", + "v=(2*3.14*a*NA)/y## cut off parameter\n", + "M=v**2/2## number of modes\n", + "print \"The cut off parameter =%0.2f\"%( v)#\n", + "print \"\\n The number of modes =%d\"%(M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.29 Pg: 96" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max value of D =0.00\n", + "\n", + " The cladding refractive index =1.50\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.50## core refractive index\n", + "a=25## core radius in um\n", + "y=1.5## wavelength in um\n", + "v=2.405#\n", + "NA=(v*y)/(2*3.14*a)## numerical aperture\n", + "D=(NA/n1)**2/(2)## max value of D\n", + "n2=n1-(D*n1)## cladding refractive index\n", + "print \"The max value of D =%0.2f\"%(D)#\n", + "print \"\\n The cladding refractive index =%0.2f\"%(n2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.30 Pg: 96" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max value of D =0.03\n", + "\n", + " The critical angle =76.87 degree\n", + "\n", + " The acceptance angle =40.56 degree\n", + "\n", + " The solid acceptance angle =0.38 degree\n", + "\n", + " The numerical aperture =0.35\n", + "\n", + " The normalise v-number =113.04\n", + "\n", + " The number of guided modes =6389\n", + "\n", + " The reduction in modes =6310\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,asin\n", + "from __future__ import division\n", + "n1=1.52## core refractive index\n", + "n2=1.48## cladding refractive index\n", + "a=45## core radius in um\n", + "y=0.85## wavelength in um\n", + "dl=(n1-n2)/n1## relative refractive index\n", + "x=(asin(n2/n1))*(180/3.14)## critical angle in degree\n", + "NA=sqrt(n1**2-n2**2)## numerical aperture\n", + "a_c=(asin(NA))*(180/3.14)## acceptance angle in degree\n", + "a_s=3.14*(n1**2-n2**2)## solid acceptance angle\n", + "v=(2*3.14*a*0.34)/y## normalise v-number\n", + "M=v**2/2## number of guided modes\n", + "a1=5## for single mode step fiber\n", + "v1=(2*3.14*a1*0.34)/y#\n", + "M1=v1**2/2#\n", + "R=M-M1## reduction in modes\n", + "print \"The max value of D =%0.2f\"%(dl)#\n", + "print \"\\n The critical angle =%0.2f degree\"%(x)#\n", + "print \"\\n The acceptance angle =%0.2f degree\"%(2*a_c)#\n", + "print \"\\n The solid acceptance angle =%0.2f degree\"%(a_s)#\n", + "print \"\\n The numerical aperture =%0.2f\"%(NA)#\n", + "print \"\\n The normalise v-number =%0.2f\"%(v)#\n", + "print \"\\n The number of guided modes =%d\"%(M)#\n", + "print \"\\n The reduction in modes =%d\"%(R)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.31 Pg: 97" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The normalised frequency =28.26\n", + "\n", + " The number of modes =399\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "a=45/2## max radius in um\n", + "y=0.85## operating wavelength in um\n", + "NA=0.17## numerical aperture\n", + "v=(2*3.14*a*NA)/y##normalised frequency\n", + "M=v**2/2## number of modes\n", + "print \"The normalised frequency =%0.2f\"%( v)#\n", + "print \"\\n The number of modes =%d\"%( M)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap4.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap4.ipynb new file mode 100644 index 00000000..18ccea74 --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap4.ipynb @@ -0,0 +1,801 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ch-4 : Attenuation and Absorption in Optical Fiber" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.1 Pg: 138" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The signal attenuation =16.99 dB\n", + "\n", + " The signal attenuation per km =2.83 dB/km\n", + "\n", + " The trgth =22.65 km\n", + "\n", + " The overall signal attenuation =29.65 dB\n", + "\n", + " The i/p o/p power ratio =870.96 \n" + ] + } + ], + "source": [ + "from math import sqrt,pi,log\n", + "from __future__ import division\n", + "Pi=100*10**-6## mean optical power in watt\n", + "Po=2*10**-6## output mean power in watt\n", + "L=6## length in km\n", + "L1=8## length in km\n", + "As=10*log(Pi/Po)/log(10)## signal attenuation in dB\n", + "as1=As/L## signal attenuation per km\n", + "Li=as1*L1## Loss incurred along 8 km\n", + "Ls=7## Loss due to splice in dB\n", + "as2=Li+Ls## overall signal attenuation in dB\n", + "As2=29.4## aprox. overall signal attenuation in dB\n", + "Pio=10**(As2/10)## i/p o/p power ratio\n", + "print \"The signal attenuation =%0.2f dB\"%(As)#\n", + "print \"\\n The signal attenuation per km =%0.2f dB/km\"%( as1)#\n", + "print \"\\n The trgth =%0.2f km\"%( Li)#\n", + "print \"\\n The overall signal attenuation =%0.2f dB\"%( as2)#\n", + "print \"\\n The i/p o/p power ratio =%0.2f \"%( Pio)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.2 Pg: 138" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max possible link Length =57.50 km\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "Pi=1.5*10**-3## mean optical power in watt\n", + "Po=2*10**-6## output mean power in watt\n", + "a=0.5## dB/km\n", + "L=(10*log(Pi/Po)/log(10))/a## max possible link Length in km\n", + "print \"The max possible link Length =%0.2f km\"%( L)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.3 Pg: 138" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Loss of an optical fiber =1.57 dB/km\n", + "\n", + " The Loss of an optical fiber =0.14 dB/km\n", + "\n", + " The Loss of an optical fiber =0.29 dB/km\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "n=1.46## core refractive index\n", + "p=0.286## photoelastic coeff\n", + "b=7*10**-11## isothermal compressibility\n", + "k=1.381*10**-23## boltzmann's constant\n", + "tf=1400## fictive temperature in k\n", + "y1=0.85*10**-6## wavelength in m\n", + "yr=((8*pi**3)*(n**8)*(p**2)*(b*k*tf))/(3*y1**4)#\n", + "e=2.718281828#\n", + "akm=e**(-yr*10**3)#\n", + "at=10*log(1/akm)/log(10)## attenuation at y=0.85 um\n", + "y2=1.55*10**-6## wavelength in m\n", + "yr1=((8*pi**3)*(n**8)*(p**2)*(b*k*tf))/(3*y2**4)#\n", + "akm1=e**(-yr1*10**3)#\n", + "at1=10*log(1/akm1)/log(10)## attenuation at y=1.55 um\n", + "y3=1.30*10**-6## wavelength in m\n", + "yr2=((8*pi**3)*(n**8)*(p**2)*(b*k*tf))/(3*y3**4)#\n", + "akm2=e**(-yr2*10**3)#\n", + "at2=10*log(1/akm2)/log(10)## attenuation at y=1.30 um\n", + "print \"The Loss of an optical fiber =%0.2f dB/km\"%( at)#\n", + "print \"\\n The Loss of an optical fiber =%0.2f dB/km\"%( at1)#\n", + "print \"\\n The Loss of an optical fiber =%0.2f dB/km\"%( at2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.4 Pg: 139" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The threshold power for SBS =76 mw\n", + "\n", + " The threshold power for SRS =1.65 W\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "d=6## core diameter in m\n", + "y=1.55## wavelength in m\n", + "a=0.5## attenuation in dB/km\n", + "v=0.4#\n", + "Pb=4.4*10**-3*d**2*y**2*a*v## threshold power for SBS\n", + "Pr=5.9*10**-2*d**2*y*a## threshold power for SRS\n", + "print \"The threshold power for SBS =%d mw\"%( Pb*10**3)#\n", + "print \"\\n The threshold power for SRS =%0.2f W\"%( Pr)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.5 Pg: 139" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical radius of curvature for multimode fiber =9.46 um\n", + "\n", + " The critical radius of curvature for a single mode fiber =29.26 um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "dl=0.03## relative refractive index difference\n", + "y=0.85*10**-6## operating wavelength in m\n", + "a=4*10**-6## core radous in m\n", + "n2=sqrt(n1**2-2*dl*n1**2)## cladding refractive index\n", + "Rc=(3*n1**2*y)/(4*pi*(n1**2-n2**2)**1.5)## critical radius of curvature for multimode fiber\n", + "Dl=0.003## relative refractive index difference\n", + "N2=sqrt(n1**2-2*Dl*n1**2)## \n", + "yc=(2*pi*a*n1*(2*Dl)**0.5)/2.405## cut off wavelength in m\n", + "y1=1.55*10**-6## operating wavelength in m\n", + "Rcs=(20*y1*(2.748-0.996*(y1/yc))**-3)/(0.005)**1.5## critical radius of curvature for a single mode fiber\n", + "print \"The critical radius of curvature for multimode fiber =%0.2f um\"%( Rc*10**6)##\n", + "print \"\\n The critical radius of curvature for a single mode fiber =%0.2f um\"%( Rcs*10**3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.6 Pg: 139" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The macrobend loss = 14.22 dB\n", + "\n", + " The answer is wrong in the textbook\n" + ] + } + ], + "source": [ + "from sympy import log,N\n", + "from __future__ import division\n", + "x=2## index profile\n", + "dl=0.0126## index difference\n", + "a=(85/2)*10**-6## core radius\n", + "R=2*10**-3## curve of radius\n", + "n1=1.45## core refractive index\n", + "k=6.28#\n", + "y=850*10**-9## wavelength in m\n", + "A=(x+2)/(2*x*dl)#\n", + "B=(2*a/R)#\n", + "C=(3*y/(2*k*R*n1))**(2/3)#\n", + "D=B+C#\n", + "E=A*D#\n", + "F=1-E#\n", + "Lm=-10*log(1-A*(B+C))/log(10)## macrobend loss in dB\n", + "print \"The macrobend loss = \",abs(N(Lm,4)),\"dB\"#\n", + "print \"\\n The answer is wrong in the textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.7 Pg: 140" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Loss of an optical fiber =22 dB\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "Pi=15## optical power in uw\n", + "Po=7## ouput power in uw\n", + "L=0.15## length in km\n", + "Ls=(10*log(Pi/Po)/log(10))/L## Loss of an optical fiber in dB\n", + "print \"The Loss of an optical fiber =%d dB\"%( Ls)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.8 Pg: 140" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The signal attenuation per km =0.80 dB/km\n", + "\n", + " The overall signal attenuation=14.11 dB \n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "Pi=200*10**-6## average optical power in watt\n", + "Po=5*10**-6## average output power in watt\n", + "L=20## in km\n", + "L1=12## in km\n", + "ns=5## number of attenuation\n", + "a=0.9## attenuation in dB\n", + "sa=10*log(Pi/Po)/log(10)## signal attenuation\n", + "sp=sa/L## signal attenuation per km\n", + "sn=sp*L1## signal attenuation for 12 km\n", + "sn1=ns*a## attenuation in dB\n", + "sn2=sn+sn1## overall signal attenuation in dB\n", + "print \"The signal attenuation per km =%0.2f dB/km\"%( sp)#\n", + "print \"\\n The overall signal attenuation=%0.2f dB \"%( sn2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.9 Pg: 141" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The signal attenuation=13.98 dB\n", + "\n", + " The signal attenuation per km =2.33 dB/km\n", + "\n", + " The overall signal attenuation=32 dB \n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "Pi=100*10**-6## average optical power in watt\n", + "Po=4*10**-6## average output power in watt\n", + "L=6## in km\n", + "L1=10## in km\n", + "sa=10*log(Pi/Po)/log(10)## signal attenuation\n", + "sp=sa/L## signal attenuation per km\n", + "sn=sp*L1## signal attenuation for 12 km\n", + "sn1=sn+9## overall signal attenuation in dB\n", + "print \"The signal attenuation=%0.2f dB\"%( sa)#\n", + "print \"\\n The signal attenuation per km =%0.2f dB/km\"%( sp)#\n", + "print \"\\n The overall signal attenuation=%d dB \"%( sn1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.10 Pg: 141" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The signal Loss =4.26 dB\n", + "\n", + " The signal Loss per km=0.28 dB/km\n", + "\n", + " The overall signal attenuation=37.52 dB\n", + "\n", + " The input output power ratio=75.16\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "Pi=20*10**-6## average optical power in watt\n", + "Po=7.5*10**-6## average output power in watt\n", + "sl=10*log(Pi/Po)/log(10)## signal Loss in dB\n", + "L=15## in km\n", + "L1=30## in km\n", + "ns=29## number of attenuation\n", + "sp=sl/L## signal Loss per km\n", + "sn=sp*L1## signal attenuation for 30 km\n", + "sn1=sn+ns## overall signal attenuation in dB\n", + "i_o=10**(sn1/20)## input output power ratio\n", + "print \"The signal Loss =%0.2f dB\"%( sl)#\n", + "print \"\\n The signal Loss per km=%0.2f dB/km\"%( sp)#\n", + "print \"\\n The overall signal attenuation=%0.2f dB\"%( sn1)#\n", + "print \"\\n The input output power ratio=%0.2f\"%( i_o)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.11 Pg: 142" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Attenuation=0.82 dB/km\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "Tf=1400## temperature in k\n", + "Bc=7*10**-11## in m**2/N\n", + "n=1.38## \n", + "P=0.29## Photoelastic coefficient\n", + "y=0.9*10**-6## wavelength in m\n", + "K=1.38*10**-23## boltzman's constant\n", + "Rrs=((8*pi**3)*(n**8)*(P**2)*(Bc*Tf*K))/(3*y**4)#\n", + "Rrs1=Rrs/10**-3## per km\n", + "e=2.718281828## Exponential term\n", + "Lkm=e**(-Rrs1)## transmission loss facter\n", + "At=10*log(1/Lkm)/log(10)## Attenuation in dB/km\n", + "print \"The Attenuation=%0.2f dB/km\"%( At)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.12 Pg: 142" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The ratio of threshold power level=4.53 %\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "y=1.35## wavelength in um\n", + "d=5## core diamater in um\n", + "a=0.75## attenuation in dB/km\n", + "v=0.45## bandwidth in GHz\n", + "Pb=4.4*10**-3*(d**2)*(y**2)*(a*v)## threshold optical power for sbs\n", + "Pr=5.9*10**-2*(d**2)*(y)*(a)## threshold optical power for sbr\n", + "Pbr=Pb/Pr## the ratio of threshold power level\n", + "print \"The ratio of threshold power level=%0.2f %%\"%( Pbr*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.13 Pg: 143" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical radius of curvature =11.21 um\n" + ] + } + ], + "source": [ + "from math import log,pi,sqrt\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "y=0.85*10**-6## wavelength in m\n", + "dl=0.024## relative refractive index difference\n", + "N2=sqrt(n1**2-2*dl*n1**2)## cladding refractive index\n", + "n2=1.46#\n", + "Rcs=(3*n1**2*y)/((4*pi)*(n1**2-n2**2)**1.5)## critical radius of curvature for multimode fiber\n", + "print \"The critical radius of curvature =%0.2f um\"%( Rcs*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.14 Pg: 143" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical radius of curvature for single mode fiber =46.89 um\n", + "\n", + " The answer is wrong in the textbook\n", + "\n", + " The critical radius of curvature for multimode fiber =16.80 um\n" + ] + } + ], + "source": [ + "from math import log,pi,sqrt\n", + "from __future__ import division\n", + "n1=1.45## core refractive index\n", + "y=1.5*10**-6## wavelength in m\n", + "dl=0.03## relative refractive index difference\n", + "a=5*10**-6## core radius\n", + "n2=sqrt(n1**2-2*dl*n1**2)## cladding refractive index\n", + "yc=(2*pi*a*n1*sqrt(2*dl))/(2.405)#\n", + "Rcs=(20*y*(2.748-0.996*(y/yc))**-3)/(n1**2-n2**2)**1.5## critical radius of curvature for single mode fiber\n", + "Rcs1=(3*n1**2*y)/((4*pi)*(n1**2-n2**2)**1.5)## critical radius of curvature for multimode fiber\n", + "print \"The critical radius of curvature for single mode fiber =%0.2f um\"%( Rcs*10**6)#\n", + "print \"\\n The answer is wrong in the textbook\"#\n", + "print \"\\n The critical radius of curvature for multimode fiber =%0.2f um\"%( Rcs1*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.15 Pg: 144" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Loss =12.04 dB/km\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "L=500/1000## distance in km\n", + "Pio=(1/(1-0.75))#\n", + "Ls=10*log(Pio)/log(10)/L## Loss in dB/km\n", + "print \"The Loss =%0.2f dB/km\"%( Ls)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.16 Pg: 144" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The power level =0.56 mW\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "L=5## length in km\n", + "a=0.5## attenuaion loss in dB/km\n", + "Po=10**-3*10**(-(a*L)/10)## power level in mW\n", + "print \"The power level =%0.2f mW\"%( Po*10**3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.17 Pg: 144" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Loss =2.22 dB/km\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "L=1## distance in km\n", + "Pio=(1/(1-0.40))#\n", + "Ls=10*log(Pio)/log(10)/L## Loss in dB/km\n", + "print \"The Loss =%0.2f dB/km\"%( Ls)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.18 Pg: 145" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The transmission length =2.50 km\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "Pi=1*10**-3## input power in watt\n", + "Po=0.75*10**-3## output power in watt\n", + "a=0.5## in dB/km\n", + "L=(10*log(Pi/Po)/log(10))/a## transmission length in km\n", + "print \"The transmission length =%0.2f km\"%( L)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.19 Pg: 145" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mode field diameter =11.63 um\n", + "\n", + " The macrobend loss =127.25 dB\n", + "\n", + " The answer is wrong in the textbook\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from sympy import log,N\n", + "from __future__ import division\n", + "y=1300*10**-9## wavelemgth in m\n", + "yc=1200*10**-9## cut off wavelength in m\n", + "rc=5*10**-6## core diameter in m\n", + "n=1.5## refractive index\n", + "R=1.2/100## curve of radius in m\n", + "dmf=2*rc*((0.65)+0.434*(y/yc)**1.5+0.0149*(y/yc)**6)## mode field diameter\n", + "K=(2*pi)/y#\n", + "Lm=-10*log(1-(K**4)*(n**4)*((3.95*10**-6)/(8*R**2))**6)/log(10)## macrobend loss\n", + "print \"The mode field diameter =%0.2f um\"%( dmf*10**6)#\n", + "print \"\\n The macrobend loss =%0.2f dB\"%abs(N(Lm,4))\n", + "print \"\\n The answer is wrong in the textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:4.20 Pg: 146" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The transmission length =-6.46 km\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "Pi=10*10**-3## input power in watt\n", + "Po=8*10**-3## output power in watt\n", + "L=0.150## length in km\n", + "Ls=(10*log(Po/Pi)/log(10))/L#\n", + "print \"The transmission length =%0.2f km\"%( Ls)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap5.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap5.ipynb new file mode 100644 index 00000000..e743d136 --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap5.ipynb @@ -0,0 +1,1271 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ch-5 : Dispersion in Optical Fibers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.1 Pg: 198" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max bandwidth =5 MHz\n", + "\n", + " The dispersion =8.33 ns/km\n", + "\n", + " bandwidth length product =60 MHz km\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "t=0.1*10**-6## pulse broading in sec\n", + "d=12## disance in km\n", + "B=1/(2*t)## max bandwidth MHz\n", + "ds=t/d## dispersion in ns/km\n", + "bl=B*d## bandwidth length product\n", + "print \"The max bandwidth =%d MHz\"%( B/10**6)#\n", + "print \"\\n The dispersion =%0.2f ns/km\"%( ds*10**9)#\n", + "print \"\\n bandwidth length product =%d MHz km\"%( bl/10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.2 Pg: 198" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max bandwidth =5 MHz\n", + "\n", + " The dispersion =6.67 ns/km\n", + "\n", + " bandwidth length product =75 MHz km\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "t=0.1*10**-6## pulse broadening in sec\n", + "d=15## disance in km\n", + "B=1/(2*t)## max bandwidth MHz\n", + "ds=t/d## dispersion in ns/km\n", + "bl=B*d## bandwidth length product\n", + "print \"The max bandwidth =%d MHz\"%( B/10**6)#\n", + "print \"\\n The dispersion =%0.2f ns/km\"%( ds*10**9)#\n", + "print \"\\n bandwidth length product =%d MHz km\"%( bl/10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.3 Pg: 199" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The numerical aperture =0.21\n", + "\n", + " The multipath pulse broadening =0.05 ns/km\n", + "\n", + " The bandwidth length product =20 GHz km\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "n1=1.465## core refractive index\n", + "n2=1.45## cladding refractive index\n", + "c=3*10**8## the speed of light in m/s\n", + "NA=sqrt(n1**2-n2**2)## numerical aperture\n", + "Mp=(NA**2)/(2*n1*c)## multipath pulse broadening in ns/km\n", + "bl=(1/NA**2)*(2*n1*c)## bandwidth length product in GHz km\n", + "print \"The numerical aperture =%0.2f\"%( NA)#\n", + "print \"\\n The multipath pulse broadening =%0.2f ns/km\"%( Mp*10**9)#\n", + "print \"\\n The bandwidth length product =%d GHz km\"%( bl/10**9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.4 Pg: 201" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The material dispersion parameter =51.28 ps/nm/km\n", + "\n", + " The rms pulse broadening =0.31 ns/km\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "ds=0.020## material dispersion\n", + "c=3*10**8## the speed of light m/s\n", + "y=1.3## wavelength in um\n", + "M=ds/(c*y)## material dispersion parameter in ps/nm/km\n", + "w=6## spectral width in nm\n", + "l=1## length in km\n", + "rm=w*l*M## rms pulse broadening in ns/km\n", + "print \"The material dispersion parameter =%0.2f ps/nm/km\"%( M*10**12)#\n", + "print \"\\n The rms pulse broadening =%0.2f ns/km\"%(rm*10**9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.5 Pg: 201" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rms pulse broadening =0.09 ns/km\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "wr=0.0014## relative spectral width in nm\n", + "y=1.3*10**-6## wavelength in m\n", + "w=wr*y## spectral width in nm\n", + "ds=0.020## material dispersion\n", + "c=3*10**8## the speed of light in m/s\n", + "M=ds/(c*y)## material dispersion parameter in ps/nm/km\n", + "l=1## length in km\n", + "rm=w*l*M## rms pulse broadening in ns/km\n", + "print \"The rms pulse broadening =%0.2f ns/km\"%(rm*10**9*10**3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.6 Pg: 202" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The delay difference =486 ns\n", + "\n", + " The rms pulse broadening =140.49 ns\n", + "\n", + " The max bit rate =1.42 M bits/sec\n", + "\n", + " The bandwidth length product =14.24 MHz km\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "dl=0.01## relative index difference\n", + "L=10*10**3## optical length in meter\n", + "c=3*10**8## the speed of light in m/s\n", + "dt=(L*n1*dl)/c## delay difference in s\n", + "dT=dt*10**9## delay difference in ns\n", + "rm=(L*n1*dl)/(2*sqrt(3)*c)## rms pulse broadening s\n", + "rM=rm*10**9## rms pulse broadening ns\n", + "bt=0.2/rm## max bit rate in bit/sec\n", + "bT=bt/10**6## max bit rate in M bits/sec\n", + "bl=bt*L## bandwidth length product in Hz meter\n", + "bL=(bt*L)/(10**6*10**3)## bandwidth length product in MHz km\n", + "print \"The delay difference =%d ns\"%( dT)#\n", + "print \"\\n The rms pulse broadening =%0.2f ns\"%( rM)#\n", + "print \"\\n The max bit rate =%0.2f M bits/sec\"%( bT)#\n", + "print \"\\n The bandwidth length product =%0.2f MHz km\"%( bL)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.7 Pg: 202" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rms pulse broadening =86.60 ns\n", + "\n", + " The max bit rate =2.31 M bits/sec\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "dl=0.01## relative index difference\n", + "L=6*10**3## optical length in meter\n", + "c=3*10**8## the speed of light in m/s\n", + "rm=(L*n1*dl)/(2*sqrt(3)*c)## rms pulse broadening s\n", + "rM=rm*10**9## rms pulse broadening ns\n", + "bt=0.2/rm## max bit rate in bit/sec\n", + "bT=bt/10**6## max bit rate in M bits/sec\n", + "print \"The rms pulse broadening =%0.2f ns\"%( rM)#\n", + "print \"\\n The max bit rate =%0.2f M bits/sec\"%( bT)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.8 Pg: 203" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The delay difference =336 ns\n", + "\n", + " The rms pulse broadening =96.99 ns\n", + "\n", + " The max bit rate =2.06 M bits/sec\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "n1=1.4## core refractive index\n", + "dl=0.012## relative index difference\n", + "L=6*10**3## optical length in meter\n", + "c=3*10**8## the speed of light in m/s\n", + "dt=(L*n1*dl)/c## delay difference in s\n", + "dT=dt*10**9## delay difference in ns\n", + "rm=(L*n1*dl)/(2*sqrt(3)*c)## rms pulse broadening s\n", + "rM=rm*10**9## rms pulse broadening ns\n", + "bt=0.2/rm## max bit rate in bit/sec\n", + "bT=bt/10**6## max bit rate in M bits/sec\n", + "print \"The delay difference =%d ns\"%( dT)#\n", + "print \"\\n The rms pulse broadening =%0.2f ns\"%( rM)#\n", + "print \"\\n The max bit rate =%0.2f M bits/sec\"%( bT)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.9 Pg: 204" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total rms pulse broadening =22.40 ns/km\n", + "\n", + " The bandwidth length product =8.93 MHz km\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "c=3*10**8## the speed of light m/s\n", + "w=6*10**-6## rms spectral width in m\n", + "M=200## material dispersion parameter in ps/nm/km\n", + "NA=0.25## numerical aperture\n", + "w=50## spectral width in nm\n", + "L=1## length in m\n", + "rm=w*L*M## rms pulse broadening in s/km\n", + "rM=rm/10**3## rms pulse broadening in ns/km due to material dispersion\n", + "rm1=(L*1000*(NA)**2)/(4*sqrt(3)*n1*c)##rms pulse broadening in ns/km due to material dispersion in sec/m\n", + "rM1=rm1*10**9## rms pulse broadening in ns/km due to intermodel dispersion in ns/km\n", + "rmt=sqrt(rM**2+rM1**2)## total rms pulse broadening in ns/km\n", + "bl=0.2/(rmt*10**-9)## bandwidth length product in Hz km\n", + "bL=bl/10**6## bandwidth length product in MHz km\n", + "print \"The total rms pulse broadening =%0.2f ns/km\"%(rmt)#\n", + "print \"\\n The bandwidth length product =%0.2f MHz km\"%(bL)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.10 Pg: 204" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The toal first order dispersion at 1290 nm =-2.86 ps/nm/km\n", + "\n", + " The toal first order dispersion at 1550 nm =17.46 ps/nm/km\n", + "\n", + " The wavelength dispersion at 1550 nm =3.56 ps/nm/km\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "yo=1320## zero dispersion wavelength in nm\n", + "y=1290## dispersion wavelength in nm\n", + "so=0.092## dispersion slop\n", + "dt=(y*so/4)*(1-(yo/y)**4)## toal first order dispersion at 1290 nm in ps/nm/km\n", + "yo1=1310## zero dispersion wavelength in um\n", + "y1=1550## dispersion wavelength in nm\n", + "so=0.092## dispersion slop\n", + "dt1=(y1*so/4)*(1-(yo1/y1)**4)## toal first order dispersion at 1550 nm in ps/nm/km\n", + "DM=13.5## profile dispersion in ps/nm/km\n", + "DP=0.4## profile dispersion in ps/nm/km\n", + "DW=dt1-(DM+DP)## wavelength dispersion in ps/nm/km\n", + "print \"The toal first order dispersion at 1290 nm =%0.2f ps/nm/km\"%( dt)#\n", + "print \"\\n The toal first order dispersion at 1550 nm =%0.2f ps/nm/km\"%( dt1)#\n", + "print \"\\n The wavelength dispersion at 1550 nm =%0.2f ps/nm/km\"%( DW)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.11 Pg: 205" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The model birefrigence =21.67 um\n", + "\n", + " The coherence length=13.00 m\n", + "\n", + " The difference beween two propagation constants=104.67\n", + "\n", + " The difference beween two propagation constants=104.67\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "L=6*10**-2## beat length in m\n", + "dy=6*10**-9## spectral width in m\n", + "y=1.3*10**-6## operating wavelength in m\n", + "BF=y/(L)##model birefrigence in um\n", + "Lc=y**2/(BF*dy)## coherence length in m\n", + "db=2*3.14/(L)## difference beween two propagation constants\n", + "dB=(2*3.14*BF)/y#\n", + "print \"The model birefrigence =%0.2f um\"%( BF*10**6)#\n", + "print \"\\n The coherence length=%0.2f m\"%( Lc)#\n", + "print \"\\n The difference beween two propagation constants=%0.2f\"%( db)#\n", + "print \"\\n The difference beween two propagation constants=%0.2f\"%( dB)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.12 Pg: 206" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The model birefrigenceat 0.5 nm =0.00*10**-3\n", + "\n", + " The model birefrigence at 75 m =1.13*10**-8 \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "y=0.85*10**-6## operating wavelength in m\n", + "L=0.5*10**-3## beat length in m\n", + "BF=y/(L)##model birefrigence in um\n", + "L1=75## beat length in m\n", + "BF1=y/(L1)##model birefrigence in um\n", + "print \"The model birefrigenceat 0.5 nm =%0.2f*10**-3\"%( BF)#\n", + "print \"\\n The model birefrigence at 75 m =%0.2f*10**-8 \"%( BF1*10**8)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.13 Pg: 206" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The beat length=113.64 m\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Lc=100000## coherence length in m\n", + "y=1.32*10**-6## operating wavelength in m\n", + "dy=1.5*10**-9## spectral width in m\n", + "BF=y**2/(Lc*dy)##model birefrigence in um\n", + "L=y/BF## beat length in m\n", + "print \"The beat length=%0.2f m\"%( L)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.14 Pg: 206" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intermodel pulse broadening =144.17 ns/km\n", + "\n", + " The bandwidth =1.30 MHz\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "NA=0.25## numerical aperture\n", + "c=3*10**5## the speed of light km/s\n", + "L=7## length in km\n", + "si=NA**2/(4*sqrt(3)*n1*c)##intermodel pulse broadening ns/km\n", + "st=si*L##total intermodel pulse broadening\n", + "BW=0.187/st## bandwidth in MHz\n", + "print \"The intermodel pulse broadening =%0.2f ns/km\"%( st*10**9)#\n", + "print \"\\n The bandwidth =%0.2f MHz\"%( BW/10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.15 Pg: 207" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max dispersion =0.19 ns/m\n", + "\n", + " The answer in the textbook is wrong\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "df=0.025#\n", + "L=500## length in m\n", + "c=3*10**8## the speed of light in m/s\n", + "dt=(n1*L*df**2)/(8*c)## max dispersion in ns/m\n", + "print \"The max dispersion =%0.2f ns/m\"%( dt*10**9)#\n", + "print \"\\n The answer in the textbook is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.16 Pg: 207" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max dispersion =4.27e-03 ns/km**2/nm\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "dy=15## spectral width in nm\n", + "L=25## optical length in km\n", + "ps=1.60##pulse spreads in ns/km\n", + "pS=1.6## pulse spreads in ns/km\n", + "d=pS/(dy*L)## material dispersion in ns/km**2/nm\n", + "print \"The max dispersion =%0.2e ns/km**2/nm\"%( d)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.17 Pg: 208" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intermodel dispersion =68.49 ns/km\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "NA=0.2## numerical aperture\n", + "L=1.5*10**3## length in m\n", + "c=3*10**8## the spee of light in m/s\n", + "dt=(L*NA**2)/(2*c*n1)##intermodel dispersion in ns/km\n", + "print \"The intermodel dispersion =%0.2f ns/km\"%( dt*10**9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:3.18 Pg: 209" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intermodel pulse width broadening =1.28 ns/km\n", + "\n", + " pulse broadening due to material dispersion =2.25 ns/km\n", + "\n", + " The combine pulse broadening =2.59 ns/km\n", + "\n", + " The actual BLP =142.22 MHz.km\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "BLP=250*10**6## bandwidth length product in Hz\n", + "tr=0.32/BLP## intermodel pulse width broadening\n", + "md=75## material dispersion in ps/nm.km\n", + "tm=2.25##pulse broadening due to material dispersion in ns/km\n", + "tc=sqrt((tr*10**9)**2+tm**2)## combine pulse broadening in ns/km\n", + "Ba=0.32/tm*10**9## actual BLP in Hz.km\n", + "Bac=Ba/10**6## actual BLP in MHz.km\n", + "print \"The intermodel pulse width broadening =%0.2f ns/km\"%( tr*10**9)#\n", + "print \"\\n pulse broadening due to material dispersion =%0.2f ns/km\"%( tm)#\n", + "print \"\\n The combine pulse broadening =%0.2f ns/km\"%( tc)#\n", + "print \"\\n The actual BLP =%0.2f MHz.km\"%( Bac)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.19 Pg: 209" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The chromatic/material dispersion =0.24 ns\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "L=40## length in m\n", + "Ny=.75## in ps/nm\n", + "dy=8## spectral width in nm\n", + "t_mat=L*Ny*dy## chromatic/material dispersion in ps\n", + "t_mat1=t_mat/1000## chromatic/material dispersion in ns\n", + "print \"The chromatic/material dispersion =%0.2f ns\"%( t_mat1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.20 Pg: 210" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The received pulse width =3.44 ns\n", + "\n", + " The max bit rate =58.07 mbps\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "y=1.3## operating wavelength in um\n", + "md=2.80## material dispersion in ns\n", + "wd=0.50## waveguide dispersion in ns\n", + "wt=0.60## width of transmitted pulse in ns\n", + "td=sqrt(md**2+wd**2)## total dispersion in ns\n", + "dt=wt+td## received pulse width in ns\n", + "br=1/(5*dt*10**-9)## max bit rate bit/sec\n", + "Br=br/10**6## max bit rate in mbps\n", + "print \"The received pulse width =%0.2f ns\"%( dt)#\n", + "print \"\\n The max bit rate =%0.2f mbps\"%( Br)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.21 Pg: 210" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The received pulse width =3.29 ns\n", + "\n", + " The max bit rate =60.85 mbps\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "y=0.85## operating wavelength in um\n", + "md=2.75## material dispersion in ns\n", + "wd=0.45## waveguide dispersion in ns\n", + "wt=0.50## width of transmitted pulse in ns\n", + "td=sqrt(md**2+wd**2)## total dispersion in ns\n", + "dt=wt+td## received pulse width in ns\n", + "br=1/(5*dt*10**-9)## max bit rate bit/sec\n", + "Br=br/10**6## max bit rate in mbps\n", + "print \"The received pulse width =%0.2f ns\"%( dt)#\n", + "print \"\\n The max bit rate =%0.2f mbps\"%( Br)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.22 Pg: 211" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max dispersion =187 ns\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "df=0.025#\n", + "L=1500## length in meter\n", + "c=3*10**8## the speed of ligth in m/s\n", + "md=(n1*L*df)/(c*(1-df))## max dispersion in sec\n", + "Md=md*10**9## max dispersion in ns\n", + "print \"The max dispersion =%d ns\"%( Md)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.23 Pg: 212" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max dispersion =53 ns\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "L=1000## length in meter\n", + "NA=0.22## numerical aperture\n", + "dl=(NA/n1)**2/2#\n", + "c=3*10**8## the speed of ligth in m/s\n", + "dt=(L*n1*dl)/c##intermodel dispersion in sec\n", + "dT=dt*10**9##intermodel dispersion in ns\n", + "print \"The max dispersion =%d ns\"%( dT)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.24 Pg: 212" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max dispersion =9 ns\n", + "\n", + " The max dispersion =3.83 ns\n", + "\n", + " The max dispersion =9.78 ns\n", + "\n", + " answer in the textbook is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "w=30## line width in nm\n", + "L=1.5## length in km\n", + "d1=6## in ns/km\n", + "d2=85## in ps/km/nm\n", + "d3=d2/1000## in ns/km/nm\n", + "dt=d1*L## intermodel dispersion in ns\n", + "dt1=w*d3*L## intramodel dispersion in ns\n", + "dT=sqrt(dt**2+dt1**2)## total dispersion in ns\n", + "print \"The max dispersion =%d ns\"%( dt)#\n", + "print \"\\n The max dispersion =%0.2f ns\"%( dt1)#\n", + "print \"\\n The max dispersion =%0.2f ns\"%( dT)#\n", + "print \"\\n answer in the textbook is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.25 Pg: 213" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intermodel dispersion =52.70 ns\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.55## core refractive index\n", + "n2=1.48## cladding refractive index\n", + "l=150##fiber length in m\n", + "c=3*10**8##the speed of light in m/s\n", + "dl=(n1**2-n2**2)/(2*n1)#\n", + "dL=0.068#\n", + "dt=(l*n1*dL)/(c)## intermodel dispersion in s\n", + "dT=dt*10**9## intermodel dispersion in ns\n", + "print \"The intermodel dispersion =%0.2f ns\"%( dT)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.29 Pg: 214" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intermodel dispersion per km =94.67 ns/km\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.42## core refractive index\n", + "dl=0.02#\n", + "c=3*10**8##the speed of light in m/s\n", + "dt=(n1*dl)/c## intermodel disersion in sec/m\n", + "dt1=dt*1000## intermodel disersion in sec/km\n", + "dt2=dt1*10**9## intermodel disersion in ns/km\n", + "print \"The intermodel dispersion per km =%0.2f ns/km\"%( dt2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.28 Pg: 214" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The pulse spreading =634.57 ns\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "y=900## operating wavelength in nm\n", + "yo=1343## wavelength in nm\n", + "so=0.095## in ps/nm**2-km\n", + "L=150## in km\n", + "dy=50##in nm\n", + "Dy=(so*y/4)*(1-(yo/y)**4)## inps/nm-km\n", + "Dy1=Dy*(-1)## do not consider -ve sign\n", + "dt=Dy1*L*dy## pulse spreading in ps\n", + "dt1=dt/1000## pulse spreading in ns\n", + "print \"The pulse spreading =%0.2f ns\"%( dt1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.29 Pg: 215" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The pulse spreading =2.14 ps\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n1=1.48## core refractive index\n", + "y=900## operating wavelength in nm\n", + "yo=1343## wavelength in nm\n", + "so=0.095## in ps/nm**2-km\n", + "L=1.5## in km\n", + "dy=50##in nm\n", + "dl=0.002#\n", + "c=3*10**8## the speed of ligth in m/s\n", + "Dm=(so*y/4)*(1-(yo/y)**4)## inps/nm-km\n", + "Dm1=Dm*(-1)## do not consider -ve sign\n", + "Vd=0.26#\n", + "Dw=((n1*dl)/(c*y*10**-9))*(Vd)#\n", + "DW=Dw*10**6## in ps/nm-km\n", + "dt=DW*L*dy## pulse spreading in ps\n", + "dt1=dt/100## pulse spreading in ns\n", + "print \"The pulse spreading =%0.2f ps\"%( dt1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.30 Pg: 215" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of wo =5.20 um\n", + "\n", + " The value of wp =5.13 um\n", + "\n", + " The value of wo1 =6.23 um\n", + "\n", + " The value of wp1 =5.10 um\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "a=4.1*10**-6## core radius in um\n", + "dl=0.0036#\n", + "y1=1.310*10**-6## operating wavelength in um\n", + "y2=1.550*10**-6## operating wavelength in um\n", + "n1=1.4677## core refrative index at y=1.310\n", + "n2=1.4682## core refrative index at y=1.550\n", + "v1=(2*3.14*a*n1*sqrt(2*dl))/y1## normalised frequency at y=1.310\n", + "v2=(2*3.14*a*n2*sqrt(2*dl))/y2## normalised frequency at y=1.550\n", + "wo=a*(0.65+(1.619/v1**1.5)+2.879/v1**3)#\n", + "wp=wo-a*(0.016+1.567/v1**7)#\n", + "wo1=a*(0.65+(1.619/v2**1.5)+2.879/v2**3)#\n", + "wp1=wo-a*(0.016+1.567/v2**7)#\n", + "print \"The value of wo =%0.2f um\"%( wo*10**6)#\n", + "print \"\\n The value of wp =%0.2f um\"%( wp*10**6)#\n", + "print \"\\n The value of wo1 =%0.2f um\"%( wo1*10**6)#\n", + "print \"\\n The value of wp1 =%0.2f um\"%( wp1*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.31 Pg: 215" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max core radius =4.83 um\n", + "\n", + " The max core radius =48.31 um\n", + "\n", + " The beat length =1.30 m\n", + "\n", + " The beat length =13.00 cm\n", + "\n", + " Hence, range of beat length# 13cm-1.3m\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "y=1.30*10**-6## operating wavelength in m\n", + "dn1=10**-6#\n", + "dn2=10**-5#\n", + "db1=(dn1*2*3.14)/y## in per m\n", + "db2=(dn2*2*3.14)/y## in per m\n", + "Lp1=(2*3.14)/(db1)## beat length in m\n", + "Lp2=(2*3.14)/(db2)## beat length in m\n", + "print \"The max core radius =%0.2f um\"%( db1)#\n", + "print \"\\n The max core radius =%0.2f um\"%( db2)#\n", + "print \"\\n The beat length =%0.2f m\"%( Lp1)#\n", + "print \"\\n The beat length =%0.2f cm\"%( Lp2*100)#\n", + "print \"\\n Hence, range of beat length# 13cm-1.3m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:5.32 Pg: 216" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength dispersion =-2.52 ps n/m/km\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "n1=1.48## core refractive index\n", + "dl=0.0027#\n", + "a=4.4*10**-6## radius in m\n", + "y=1.32*10**-6## operating wavelength in m\n", + "n2=n1*(1-dl)#\n", + "c=3*10**8## the speed of ligth in m/s\n", + "v=(2*3.14*a*n1*sqrt(2*dl))/y#\n", + "VD=0.080+0.549*(2.834-v)**2#\n", + "DW=(-1)*(n2*dl*VD)/(c*y)## wavelength dispersion in s /um/m\n", + "Dw=DW*10**6## wavelength dispersion in ps /nm/km\n", + "print \"The wavelength dispersion =%0.2f ps n/m/km\"%( Dw)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa:5.33 Pg: 216" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The core radius =2.75 um\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division\n", + "n1=1.48## core refractive index\n", + "dl=0.01## refractive index difference\n", + "c=3*10**8## the speed of light in m/s\n", + "y=1.55## wavelength in um\n", + "DM=7## in ps/nm-km\n", + "DW=(-1)*DM## in ps/nm-km\n", + "X=-10**12*(n1*dl)/(c*y)## in ps/nm/km\n", + "Z=(DW/X)-0.08## \n", + "V=2.834-sqrt(Z/0.549)#\n", + "a=(V*y)/(2*pi*n1*sqrt(2*dl))## core radius in um\n", + "print \"The core radius =%0.2f um\"%( a)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap6.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap6.ipynb new file mode 100644 index 00000000..064e42e5 --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap6.ipynb @@ -0,0 +1,102 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ch-6 : Preparation of Optical Fibers and Cables" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:6.1 Pg: 287" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The percentage of strain =0.16 %\n", + "\n", + " If this condition is maintained the fiber will maintain without any break\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "r=125*10**-6## cladding radius in meter\n", + "R=8*10**-2## curve of radius in meter\n", + "s=((R+2*r)/(R+r))-1#\n", + "s_p=s*100## percentage of strain\n", + "print \"The percentage of strain =%0.2f %%\"%( s_p)#\n", + "print \"\\n If this condition is maintained the fiber will maintain without any break\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:6.2 Pg: 287" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The puttling tension at the exit of an optical cable =49.17 kg\n" + ] + } + ], + "source": [ + "from math import asinh,sinh\n", + "from __future__ import division\n", + "w=40*10**-3## cable weighing in kg/m\n", + "R=20*10**-2## radius of curvature in meter\n", + "n=0.19## co-efficient of friction\n", + "x=(3.14/4)## angle in rad\n", + "si=42.36## pulling tension at the entrance in kg\n", + "X=(si/(w*R))##\n", + "Y=asinh(si/(w*R))#\n", + "Z=w*R*sinh(n*x+Y)##puttling tension at the exit of an optical cable\n", + "print \"The puttling tension at the exit of an optical cable =%0.2f kg\"%( Z)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap7.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap7.ipynb new file mode 100644 index 00000000..acf26313 --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap7.ipynb @@ -0,0 +1,844 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ch-7 : .Optical Fiber Connection : Connectors, Joints and Couplers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.1 Pg: 311" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fiber loss =0.13 db\n", + "\n", + " there is a similar loss at the other interface\n", + "\n", + " The total fiber loss =0.26 db\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "n=1## refractive index due to air\n", + "r=((n1-n)/(n1+n))**2#\n", + "r1=0.03## r take upto two decimal place\n", + "l_s=-10*log(1-r1)/log(10)## fiber loss in db\n", + "l_t=2*l_s## total loss in db\n", + "print \"The fiber loss =%0.2f db\"%( l_s)#\n", + "print \"\\n there is a similar loss at the other interface\"#\n", + "print \"\\n The total fiber loss =%0.2f db\"%( l_t)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.2 Pg: 311" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The coupling efficiency for multimode step index fiber =0.86\n", + "\n", + " The insertion loss for lateral misalignment =0.65 dB\n", + "\n", + " The coupling efficiency when there is no air gap =0.92\n", + "\n", + " The insertion loss for lateral misalignment when there is no air gap =0.34 dB\n" + ] + } + ], + "source": [ + "from math import log,pi,acos\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "n=1## refractive index due to air\n", + "a=25*10**-6## core radius in m\n", + "y=3*10**-6## in m\n", + "A=(y/a)*(1-(y/(2*a))**2)**0.5#\n", + "B=acos(y/(2*a))#\n", + "C=n1/n#\n", + "M=(16*C**2)/(pi*(1+C)**4)#\n", + "n_lat=M*(2*B-A)## coupling efficiency for multimode step index fiber\n", + "L_lat=-10*log(n_lat)/log(10)## insertion loss for lateral misalignment\n", + "n_lat1=(1/pi)*(2*B-A)## coupling efficiency when there is no air gap\n", + "L_lat1=-10*log(n_lat1)/log(10)## insertion loss for lateral misalignment when there is no air gap\n", + "print \"The coupling efficiency for multimode step index fiber =%0.2f\"%( n_lat)#\n", + "print \"\\n The insertion loss for lateral misalignment =%0.2f dB\"%( L_lat)#\n", + "print \"\\n The coupling efficiency when there is no air gap =%0.2f\"%( n_lat1)#\n", + "print \"\\n The insertion loss for lateral misalignment when there is no air gap =%0.2f dB\"%( L_lat1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.3 Pg: 311" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total insertion loss =1.15 dB\n", + "\n", + " the answer is wrong in the textbook\n" + ] + } + ], + "source": [ + "from math import log,acos,pi,sqrt\n", + "from __future__ import division\n", + "n1=1.50## core refractive index\n", + "n=1## refractive index due to air\n", + "a=25*10**-6## core radius in m\n", + "y=4*10**-6## in m\n", + "A=(y/a)*(1-(y/(2*a))**2)**0.5#\n", + "B=acos(y/(2*a))#\n", + "C=n1/n#\n", + "M=(16*C**2)/(pi*(1+C)**4)#\n", + "n_lat=M*(2*B-A)## coupling efficiency for multimode step index fiber\n", + "L_lat=-10*log(n_lat)/log(10)## insertion loss for lateral misalignment\n", + "dx=4*(3.14/180)## angular misalignment in radian\n", + "dl=0.02## relative index difference\n", + "NA=n1*sqrt(2*dl)## numerical aperture\n", + "n_ang=1-(0.069/(3.14*NA))## coupling efficiency due to angular misalignment\n", + "L_ang=-10*log(n_ang)/log(10)## loss due to angular misalignment\n", + "Lt=L_lat+L_ang## total insertion loss in dB\n", + "print \"The total insertion loss =%0.2f dB\"%( Lt)#\n", + "print \"\\n the answer is wrong in the textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.4 Pg: 312" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The insertion loss when there is a smsll air gap =0.65 dB\n", + "\n", + " The insertion loss when the joint is indexed matched =0.34 dB\n" + ] + } + ], + "source": [ + "from math import log,acos,pi,sqrt\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "n=1## refractive index due to air\n", + "a=1## core radius in m\n", + "y=0.12## lateral offset\n", + "A=(y/a)*(1-(y/(2*a))**2)**0.5#\n", + "B=acos(y/(2*a))#\n", + "C=n1/n#\n", + "M=(16*C**2)/(pi*(1+C)**4)#\n", + "n_lat=M*(2*B-A)## coupling efficiency when there is a smsll air gap\n", + "L_lat=-10*log(n_lat)/log(10)## insertion loss when there is a smsll air gap\n", + "n_lat1=(1/pi)*(2*B-A)## coupling efficiency when the joint is indexed matched\n", + "L_lat1=-10*log(n_lat1)/log(10)## insertion loss when the joint is indexed matched\n", + "print \"The insertion loss when there is a smsll air gap =%0.2f dB\"%( L_lat)#\n", + "print \"\\n The insertion loss when the joint is indexed matched =%0.2f dB\"%( L_lat1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.5 Pg: 313" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total coupling efficiency in the frw direction =0.52\n", + "\n", + " The total loss at the joint in the frw direction =2.81 dB\n", + "\n", + " In the backward direction n_cd & n_a are all unity therefore there will be no loss in the backward direction of transmission of the signal \n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "d1=60*10**-6## core diameter of fiber 1 in m\n", + "d2=50*10**-6## core diameter of fiber 1 in m\n", + "NA1=0.25## numerical aerture of fiber 1\n", + "NA2=0.22## numerical aerture of fiber 2\n", + "a1=2.0## for fiber 1\n", + "a2=1.9## for fiber 2\n", + "n_cd=(d2/d1)**2#\n", + "n_NA=(NA2/NA1)**2#\n", + "n_a=(1+(2/a1))/(1+(2/a2))#\n", + "n_t=n_cd*n_NA*n_a## total coupling efficiency\n", + "Lt=-10*log(n_t)/log(10)## total loss at the joint in dB\n", + "print \"The total coupling efficiency in the frw direction =%0.2f\"%( n_t)#\n", + "print \"\\n The total loss at the joint in the frw direction =%0.2f dB\"%( Lt)#\n", + "print \"\\n In the backward direction n_cd & n_a are all unity therefore there will be no loss in the backward direction of transmission of the signal \"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.6 Pg: 313" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total loss at the joint in the frw direction =4.22 dB\n", + "\n", + " The total loss at the joint in the backward direction =0.22 dB\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "d1=80*10**-6## core diameter of fiber 1 in m\n", + "d2=60*10**-6## core diameter of fiber 1 in m\n", + "NA1=0.25## numerical aerture of fiber 1\n", + "NA2=0.20## numerical aerture of fiber 2\n", + "a1=1.9## for fiber 1\n", + "a2=2.1## for fiber 2\n", + "n_cd=(d2/d1)**2#\n", + "n_NA=(NA2/NA1)**2#\n", + "n_a=(1+(2/a1))/(1+(2/a2))#\n", + "n_t=n_cd*n_NA*n_a## total coupling efficiency in the frw direction\n", + "Lt=-10*log(n_t)/log(10)## total loss at the joint in the frw direction in dB\n", + "n_cd1=1#\n", + "n_NA1=1#\n", + "n_a1=(1+(2/a2))/(1+(2/a1))#\n", + "n_t1=n_cd1*n_NA1*n_a1## total coupling efficiency in the backward direction\n", + "Lt1=-10*log(n_t1)/log(10)## total loss at the joint in the backward direction in dB\n", + "print \"The total loss at the joint in the frw direction =%0.2f dB\"%( Lt)#\n", + "print \"\\n The total loss at the joint in the backward direction =%0.2f dB\"%( Lt1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.7 Pg: 314" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The insertion loss of the splice =0.35 dB\n" + ] + } + ], + "source": [ + "from math import log,acos,pi\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "n=1.47## refractive index due to air\n", + "a=1## core radius in m\n", + "y=0.12## lateral offset\n", + "A=(y/a)*(1-(y/(2*a))**2)**0.5#\n", + "B=acos(y/(2*a))#\n", + "C=n1/n#\n", + "M=(16*C**2)/(pi*(1+C)**4)#\n", + "n_lat=M*(2*B-A)## coupling efficiency of the splice\n", + "L_lat=-10*log(n_lat)/log(10)## insertion loss of the splice\n", + "print \"The insertion loss of the splice =%0.2f dB\"%( L_lat)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.8 Pg: 315" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The refractive index of the fiber core =1.51\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "from __future__ import division\n", + "L_f=0.036#\n", + "n_f=10**(-0.036)#\n", + "# here we get a quadratic equation in n1 and on solving we get\n", + "n1=(2.17+sqrt((-2.17)**2-4*1*1))/2## refractive index of the fiber core\n", + "print \"The refractive index of the fiber core =%0.2f\"%( n1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.9 Pg: 315" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The numerical aperture =0.34\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division\n", + "n1=1.46## core refractive index\n", + "n=4## refractive index due to air\n", + "x=pi/180#\n", + "A=(16*n1**2)/((1+n1)**4)#\n", + "B=n*x#\n", + "n_ang=10**(-0.06)## angular coupling efficiency\n", + "NA=B/((pi)*(1-(n_ang/A)))## numerical aperture\n", + "print \"The numerical aperture =%0.2f\"%( NA)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.10 Pg: 316" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The insertion loss =0.81 dB\n", + "\n", + " The insertion loss,if we have both guided and leaky modes =0.71 dB\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "y=5*10**-6## lateral misalignment in m\n", + "a=25*10**-6## core diameter in m\n", + "Lt=0.85*(y/a)## misalignment loss\n", + "n_c=1-Lt## coupling efficiency\n", + "L_i=-10*log(n_c)/log(10)## insertion loss in dB\n", + "Lt1=0.75*(y/a)## misalignment loss if we have both guided and leaky modes\n", + "n_c1=1-Lt1## coupling efficiency\n", + "L_i1=-10*log(n_c1)/log(10)## insertion loss in dB if we have both guided and leaky modes\n", + "print \"The insertion loss =%0.2f dB\"%( L_i)#\n", + "print \"\\n The insertion loss,if we have both guided and leaky modes =%0.2f dB\"%( L_i1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.11 Pg: 316" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The inserion loss when NA=0.22 =0.94 dB\n", + "\n", + " The inserion loss when NA=0.32 =0.75 dB\n" + ] + } + ], + "source": [ + "from math import log,pi\n", + "from __future__ import division\n", + "n1=1.5## core refractive index\n", + "n=1## refractive index due to air\n", + "x=5*pi/180#\n", + "C=n1/n#\n", + "A=(16*C**2)/((1+C)**4)#\n", + "B=n*x#\n", + "NA=0.22## numerical aperture\n", + "n_ang=A*(1-(B/(pi*NA)))## angular coupling efficiency\n", + "L_ang=-10*log(n_ang)/log(10)## inserion loss when NA=0.22\n", + "NA1=0.32## numerical aperture\n", + "n_ang1=A*(1-(B/(pi*NA1)))## angular coupling efficiency\n", + "L_ang1=-10*log(n_ang1)/log(10)## inserion loss when NA=0.32\n", + "print \"The inserion loss when NA=0.22 =%0.2f dB\"%( L_ang)#\n", + "print \"\\n The inserion loss when NA=0.32 =%0.2f dB\"%( L_ang1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.12 Pg: 317" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total insertion loss =1.81 dB\n", + "\n", + " The answer is wrong in the textbook\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division\n", + "V=2.50## normalised frequency\n", + "n1=1.5## core refractive index\n", + "a=4.5*10**-6## core radius in m\n", + "NA=0.2## numerical aperture\n", + "y=3*10**-6## lateral misalignment in m\n", + "w=a*((0.65+1.62*(V)**-1.5+2.88*(V)**-6)/2**0.5)## normalised spot size in m\n", + "T1=2.17*(y/w)**2## Loss due to lateral offset in dB\n", + "x=(pi/180)*w#\n", + "Ta=2.17*((x*n1*V)/(a*NA))**2## loss due to angular misalignment in dB\n", + "T=T1+Ta## total insertion loss in dB\n", + "print \"The total insertion loss =%0.2f dB\"%( T)#\n", + "print \"\\n The answer is wrong in the textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.13 Pg: 317" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Excess loss =1.10 dB\n", + "\n", + " The insertion loss port 1 to 3 =4.33 dB\n", + "\n", + " The insertion loss port 1 to 4 =3.90 dB\n", + "\n", + " The cross talk =-41.14 dB\n", + "\n", + " The split ratio =47.52 %\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "P1=65## optical power in uW\n", + "P2=0.005## output power at port 2 in uW\n", + "P3=24## output power at port 3 in uW\n", + "P4=26.5## output power at port 4 in uW\n", + "Le=10*log(P1/(P3+P4))/log(10)## Excess loss in dB\n", + "Le1=10*log(P1/P3)/log(10)## insertion loss port 1 to 3 in dB\n", + "Le2=10*log(P1/P4)/log(10)## insertion loss port 1 to 4 in dB\n", + "ct=10*log(P2/P1)/log(10)## cross talk in dB\n", + "sr=(P3/(P3+P4))*100## split ratio\n", + "print \"The Excess loss =%0.2f dB\"%( Le)#\n", + "print \"\\n The insertion loss port 1 to 3 =%0.2f dB\"%( Le1)#\n", + "print \"\\n The insertion loss port 1 to 4 =%0.2f dB\"%( Le2)#\n", + "print \"\\n The cross talk =%0.2f dB\"%( ct)#\n", + "print \"\\n The split ratio =%0.2f %%\"%( sr)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.14 Pg: 318" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total fresnel loss =0.33 dB\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "n=1#\n", + "n1=1.48#\n", + "r=((n1-n)/(n1+n))**2## fresnel's reflection\n", + "Ls=-10*log(1-r)/log(10)## optical loss in dB\n", + "Lt=2*Ls## total fresnel loss\n", + "print \"The total fresnel loss =%0.2f dB\"%( Lt)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.15 Pg: 318" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The NA mismatch coupling loss =3.25 dB\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "NA1=0.32## numerical aperture for fiber1\n", + "NA2=0.22## numerical aperture for fiber2\n", + "Lc=20*log(NA1/NA2)/log(10)## NA mismatch coupling loss\n", + "print \"The NA mismatch coupling loss =%0.2f dB\"%( Lc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.16 Pg: 319" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The coupling ratio =46.67 %\n", + "\n", + " The Excess loss =2.22 dB\n", + "\n", + " The insertion loss port 0 to 1 =4.95 dB\n", + "\n", + " The insertion loss port 0 to 2 =5.53 dB\n", + "\n", + " The cross talk =-46.99 dB\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "P0=250## optical power in uW\n", + "P1=80## output power at port 1 in uW\n", + "P2=70## output power at port 2 in uW\n", + "P3=5*10**-3## output power at port 3 in uW\n", + "cr=(P2/(P1+P2))*100## coupling ratio\n", + "Le=10*log(P0/(P1+P2))/log(10)## Excess loss in dB\n", + "Le1=10*log(P0/P1)/log(10)## insertion loss port 0 to 1 in dB\n", + "Le2=10*log(P0/P2)/log(10)## insertion loss port 0 to 2 in dB\n", + "ct=10*log(P3/P0)/log(10)## cross talk in dB\n", + "print \"The coupling ratio =%0.2f %%\"%( cr)#\n", + "print \"\\n The Excess loss =%0.2f dB\"%( Le)#\n", + "print \"\\n The insertion loss port 0 to 1 =%0.2f dB\"%( Le1)#\n", + "print \"\\n The insertion loss port 0 to 2 =%0.2f dB\"%( Le2)#\n", + "print \"\\n The cross talk =%0.2f dB\"%( ct)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.17 Pg: 319" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The throughput loss =0.97 dB\n", + "\n", + " The tap loss =6.99 dB\n", + "\n", + " Directionality=-10*log(0/Pi=infinity)\n", + "\n", + " The excess loss =0 dB\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "P_21=4/5## ratio of the input available at port2 \n", + "P_31=1/5## ratio of the input available at port3 \n", + "Lt=-10*log(P_21)/log(10)## throughput loss\n", + "Lp=-10*log(P_31)/log(10)## tap loss\n", + "Le=-10*log(P_21+P_31)/log(10)## excess loss\n", + "print \"The throughput loss =%0.2f dB\"%( Lt)#\n", + "print \"\\n The tap loss =%0.2f dB\"%( Lp)#\n", + "print \"\\n Directionality=-10*log(0/Pi=infinity)\"#\n", + "print \"\\n The excess loss =%d dB\"%( Le)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.18 Pg: 320" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fraction of the input power goes to each of the ports =0.54 dB\n", + "\n", + " The throughput loss =2.71 dB\n", + "\n", + " The tap loss =8.73 dB\n", + "\n", + " The loss due to radiation scattering =1.74 dB\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "Le=4## excess loss in dB\n", + "D=60## Directionality in dB\n", + "P_41=10**-6## the ratio of P4 to P1\n", + "P_31=0.670/5## the ratio of P3 to P1\n", + "P_21=P_31*4## the ratio of P2 to P1\n", + "Lt=-10*log(P_21)/log(10)## throughput loss\n", + "Lp=-10*log(P_31)/log(10)## tap loss\n", + "Ls=-10*log(0.670)/log(10)## loss due to radiation scattering in dB\n", + "print \"The fraction of the input power goes to each of the ports =%0.2f dB\"%( P_21)#\n", + "print \"\\n The throughput loss =%0.2f dB\"%( Lt)#\n", + "print \"\\n The tap loss =%0.2f dB\"%( Lp)#\n", + "print \"\\n The loss due to radiation scattering =%0.2f dB\"%( Ls)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.19 Pg: 320" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The attenuation per km =5.92 dB/km\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division\n", + "L1=1.5## length in km\n", + "L2=2/1000## length in km\n", + "Pi=50.1*10**-6## optical power in W\n", + "Po=385.4*10**-6## output power in W\n", + "a=(10/(L1-L2))*log(Po/Pi)/log(10)## attenuation per km\n", + "print \"The attenuation per km =%0.2f dB/km\"%( a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:7.20 Pg: 321" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The scattering loss in the fiber =3.91 dB/km\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Psc=5.31*10**-9##\n", + "Popt=98.45*10**-6## \n", + "L=5.99## length in km\n", + "asc=(4.343*10**5/L)*(Psc/Popt)## scattering loss in the fiber in dB\n", + "print \"The scattering loss in the fiber =%0.2f dB/km\"%( asc)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb new file mode 100644 index 00000000..8175459c --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb @@ -0,0 +1,1069 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ch-8 : Optical Sources" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.1 Pg: 335" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total carrier recombination lifetime =24 ns\n", + "\n", + " The internal power =30.66 mW\n", + "\n", + " the answer is wrong in textbook\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division\n", + "tr=40## rediative life time in ns\n", + "tnr=60## nonrediative life time in ns\n", + "i=35*10**-3## drive current in amp\n", + "y=0.85*10**-6## wavelength in m\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## the speed of light in m/s\n", + "e=1.602*10**-19## charge\n", + "t=tr*tnr/(tr+tnr)## total carrier recombination lifetime ns\n", + "ni=t/tr## internal quantam efficiency\n", + "pi=(ni*h*c*i)/(e*y)## internal power in watt\n", + "p_int=pi*10**3## internal power in mW\n", + "print \"The total carrier recombination lifetime =%d ns\"%( t)#\n", + "print \"\\n The internal power =%0.2f mW\"%( p_int)#\n", + "print \"\\n the answer is wrong in textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.2 Pg: 335" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total carrier recombination lifetime =18.75 ns\n", + "\n", + " The peak emission wavelength =1.09 um\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division\n", + "tr=30## rediative life time in ns\n", + "tnr=50## nonrediative life time in ns\n", + "i=40*10**-3## drive current in amp\n", + "pi=28.4*10**-3## internal power in watt\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## the speed of light in m/s\n", + "e=1.602*10**-19## charge\n", + "t=tr*tnr/(tr+tnr)## total carrier recombination lifetime ns\n", + "ni=t/tr## internal quantam efficiency\n", + "y=(ni*h*c*i)/(e*pi)## peak emission wavelength in m\n", + "print \"The total carrier recombination lifetime =%0.2f ns\"%( t)#\n", + "print \"\\n The peak emission wavelength =%0.2f um\"%( y*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.3 Pg: 336" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The external power efficiency =0.39 %\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division\n", + "nx=3.6## refractive index\n", + "Fn=0.68## transmission factor\n", + "pe_pi=(Fn)/(4*nx**2)#\n", + "pi_p=0.3#\n", + "nep=pe_pi*pi_p## external power efficiency\n", + "print \"The external power efficiency =%0.2f %%\"%( nep*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.4 Pg: 337" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The coupling efficiency =2.25 %\n", + "\n", + " The loss =16.48 db\n", + "\n", + " The loss in decibels relative to Pint=45.24 db\n" + ] + } + ], + "source": [ + "from math import pi,log\n", + "from __future__ import division\n", + "n=3.6## core refractive index\n", + "NA=0.15## numerical aperture\n", + "nc=NA**2## coupling efficiency\n", + "l_s=-10*log(nc)/log(10)## loss in db\n", + "pe_pi=0.023*0.0013## from ex 8.3\n", + "pc=-10*log(pe_pi)/log(10)## loss in decibels relative to Pint\n", + "print \"The coupling efficiency =%0.2f %%\"%( nc*100)#\n", + "print \"\\n The loss =%0.2f db\"%( l_s)#\n", + "print \"\\n The loss in decibels relative to Pint=%0.2f db\"%( pc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.5 Pg: 337" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The optical power coupled into the fiber =7.19 uW\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "r=45*10**-6## radius in m\n", + "NA=0.3## numerical aperture\n", + "rd=40## radiance\n", + "A=3.14*(r*100)**2## area in cm**2\n", + "pe=3.14*(1-r)*A*rd*NA**2## optical power coupled into the fiber\n", + "Pe=pe*10**4## optical power coupled into the fiber uW\n", + "print \"The optical power coupled into the fiber =%0.2f uW\"%( Pe)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.6 Pg: 337" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The percentage of overall efficiency =0.37 %\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "pc=150*10**-6## coupling power W\n", + "p=20*10**-3*2## optical power W\n", + "npc=pc/p## overall efficiency\n", + "Npc=npc*100## percentage of overall efficiency\n", + "print \"The percentage of overall efficiency =%0.2f %%\"%( Npc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.7 Pg: 338" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of longitudinal modes =300000.00\n", + "\n", + " The frequency separation of the modes =2.00 GHz\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=1.5## refractive index\n", + "L=0.05## crystal length in m\n", + "y=0.5*10**-6## wavelength in m\n", + "c=3*10**8## speed of light in m/s\n", + "q=2*n*L/y## the number of longitudinal modes\n", + "df=c/(2*n*L)## frequency separation of the modes in Hz\n", + "Df=df/10**9## frequency separation of the modes in GHz\n", + "print \"The number of longitudinal modes =%0.2f\"%( q)#\n", + "print \"\\n The frequency separation of the modes =%0.2f GHz\"%( Df)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.8 Pg: 338" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength of optical emission =0.87 um\n", + "\n", + " The frequency separation of the modes =59 GHz\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Eg=1.43## bandgap energy in eV\n", + "dy=0.15*10**-9#\n", + "c=3*10**8## speed of light in m/s\n", + "y=1.24/Eg## in um\n", + "y1=y*10**-6## wavelength of optical emission in m\n", + "df=(c*dy)/(y1**2)## the line width in Hz\n", + "Df=df/10**9## the line width in GHz\n", + "print \"The wavelength of optical emission =%0.2f um\"%( y)#\n", + "print \"\\n The frequency separation of the modes =%d GHz\"%( Df)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.9 Pg: 338" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The crystal length =151.52 um\n", + "\n", + " The the number of longitudinal modes =1283\n", + "\n", + " answer is wrong in textbook\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=3.6## refractive index\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.85*10**-6## wavelength in m\n", + "df=275*10**9## frequency separation of the modes in Hz\n", + "L=c/(2*n*df)## crystal length in m\n", + "L1=L*10**6## crystal length in um\n", + "q=2*n*L/y## the number of longitudinal modes\n", + "print \"The crystal length =%0.2f um\"%( L1)#\n", + "print \"\\n The the number of longitudinal modes =%d\"%( q)#\n", + "print \"\\n answer is wrong in textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.10 Pg: 339" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The external power efficiency =13.00 %\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "nt=0.20## total efficiency\n", + "Eg=1.43## bandgap energy in eV\n", + "V=2.2## applied voltage in volts\n", + "nep=(nt*Eg)/V## external power efficiency\n", + "Nep=nep*100## percentage of external power efficiency\n", + "print \"The external power efficiency =%0.2f %%\"%( Nep)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.11 Pg: 339" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The divergence angle =48.91 degree \n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "h=0.35*10**-3## irradiance W/cm**2\n", + "po=0.45*10**-3## power output in watt\n", + "d=1.5## separation distance in cm\n", + "x=sqrt((4*po)/(3.14*d**2*h))## divergence angle in radians\n", + "X=(x*180)/3.14## divergence angle in degree\n", + "print \"The divergence angle =%0.2f degree \"%( X)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.12 Pg: 339" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The irradiance =14.44 mwatt/cm**2 \n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division\n", + "ni=0.09## normal efficiency\n", + "d=2*2.54## separation distance in cm\n", + "x=0.2## divergence angle in radians\n", + "vf=2.0## forward voltage in volts\n", + "i_f=65*10**-3## forward current in amp\n", + "pi=vf*i_f## input power in Watt\n", + "po=ni*pi## output power in Watt\n", + "H=4*po/(3.14*d**2*x**2)## irradiance in watt/cm**2\n", + "H1=H*1000## irradiance in mwatt/cm**2\n", + "print \"The irradiance =%0.2f mwatt/cm**2 \"%( H1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.13 Pg: 340" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The internal quantam efficiency =93.46 %\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "tr=3.5## relative life time in ms\n", + "tnr=50## nonrelative life time in ms\n", + "ni=tnr/(tr+tnr)## internal quantam efficiency\n", + "print \"The internal quantam efficiency =%0.2f %%\"%( ni*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.14 Pg: 340" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The optical power coupled into optical fiber =0.80 mW \n" + ] + } + ], + "source": [ + "from math import pi,sin\n", + "from __future__ import division\n", + "ni=0.15## internal quantam efficiency\n", + "vf=2.0## forward voltage in volts\n", + "i_f=15*10**-3## forward current in amp\n", + "x=25## acceptance angle in degree\n", + "pi=vf*i_f## input power in Watt\n", + "po=ni*pi## output power in Watt\n", + "NA=(sin(x*3.14/180))#\n", + "nc=NA**2## numerical aperture\n", + "pf=nc*po## optical power coupled into optical fiber in w\n", + "print \"The optical power coupled into optical fiber =%0.2f mW \"%( pf*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.15 Pg: 340" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rediative life time =182 ns\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "tnr=10## nonrediative life time in ns\n", + "n_inj=0.80## injection efficiency\n", + "n_ex=0.60## extraction efficiency\n", + "nt=0.025## total efficiency\n", + "nr=nt/(n_inj*n_ex)## non rediative life time in ns\n", + "tr=((1/nr)-1)*tnr## rediative life time in ns\n", + "print \"The rediative life time =%d ns\"%( tr)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.16 Pg: 341" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The bandwidth =11.67 MHz\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "tr=30*10**-9## rise time in s\n", + "Bw=0.35/tr## bandwidth in Hz\n", + "print \"The bandwidth =%0.2f MHz\"%( Bw/10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.17 Pg: 341" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The divergence angle =0.02 radians\n", + "\n", + " The divergence angle =0.92 degree\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "y=630*10**-9## operating wavelength in m\n", + "w=25*10**-6## spot size in m\n", + "x=2*y/(3.14*w)## divergence angle in radians\n", + "x1=x*180/3.14## divergence angle in degree\n", + "print \"The divergence angle =%0.2f radians\"%( x)#\n", + "print \"\\n The divergence angle =%0.2f degree\"%( x1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.18 Pg: 341" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The energy =2.25 electron volts\n", + "\n", + " The energy =0.12 electron volts\n", + "\n", + " The energy =0.52 electron volts\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "y1=550*10**-3## peak of eyes response in um\n", + "y2=10.6## standard wavelength in um\n", + "y3=2.39## predominant IR line of He-Ne laser in um\n", + "E1=1.24/y1## energy in electron volts\n", + "E2=1.24/y2## energy in electron volts\n", + "E3=1.24/y3## energy in electron volts\n", + "print \"The energy =%0.2f electron volts\"%( E1)#\n", + "print \"\\n The energy =%0.2f electron volts\"%( E2)#\n", + "print \"\\n The energy =%0.2f electron volts\"%( E3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.19 Pg: 342" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off wavelength =885 nm\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Eg=1.4## energy in electron volts\n", + "y=1.24/Eg## cut off wavelength in um\n", + "y1=y*1000## cut off wavelength in nm\n", + "print \"The cut off wavelength =%d nm\"%( y1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.20 Pg: 342" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The divergence angle =0.15 radians\n", + "\n", + " The divergence angle =8.76 degree\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "y=1200*10**-9## operating wavelength in m\n", + "w=5*10**-6## spot size in m\n", + "x=2*y/(3.14*w)## divergence angle in radians\n", + "x1=x*180/3.14## divergence angle in degree\n", + "print \"The divergence angle =%0.2f radians\"%( x)#\n", + "print \"\\n The divergence angle =%0.2f degree\"%( x1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.21 Pg: 342" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The acceptance angle =14.03 degree\n", + "\n", + " The coupling efficiency =5.88 %\n" + ] + } + ], + "source": [ + "from math import pi,asin\n", + "from __future__ import division\n", + "n1=1.48## core refractive index\n", + "n2=1.46## cladding refractive index \n", + "NA=sqrt(n1**2-n2**2)## numerical aperture\n", + "xa=(asin(NA))*(180/pi)## acceptance angle in degree\n", + "nc=NA**2## coupling efficiency\n", + "print \"The acceptance angle =%0.2f degree\"%( xa)#\n", + "print \"\\n The coupling efficiency =%0.2f %%\"%( nc*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.22 Pg: 343" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The frequency separation =0.27 GHz\n", + "\n", + " The energy separation =1.13 meV\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "c=3*10**8## speed of light in m/s\n", + "n=3.66## for GaAs\n", + "L=150*10**-6## cavity length in m\n", + "dv=c/(2*n*L)##frequency separation in Hz\n", + "dv1=dv/10**12## frequency separation in GHz\n", + "h=6.64*10**-34## plank constant\n", + "q=1.6*10**-19## charge of an electron\n", + "dE=(h*dv)/q## energy separation eV\n", + "print \"The frequency separation =%0.2f GHz\"%( dv1)#\n", + "print \"\\n The energy separation =%0.2f meV\"%( dE*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.23 Pg: 343" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The conversion efficiency =1 %\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "po=2*10**-3## optical power in watts\n", + "I=100*10**-3## current in amp\n", + "V=2## applied voltage in volt\n", + "pe=I*V## electrical power in watts\n", + "n=(po/pe)*100## conversion efficiency\n", + "print \"The conversion efficiency =%d %%\"%( n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.24 Pg: 343" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength =0.87 um\n", + "\n", + " The width =39 GHz\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "c=3*10**8## speed of light in m/s\n", + "h=6.64*10**-34## plank constant\n", + "Eg=1.43## gap energy in eV\n", + "y=(1.24*10**-6)/Eg## wavelength in m\n", + "dy=0.1*10**-9## in m\n", + "df=(dy*c)/y**2## width in Hz\n", + "print \"The wavelength =%0.2f um\"%( y*10**6)#\n", + "print \"\\n The width =%d GHz\"%( df/10**9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.25 Pg: 344" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total carrier recombination lifetime =19.57 ns\n", + "\n", + " The internal quantam efficiency =0.78 \n", + "\n", + " The internal power =2.60 mW\n", + "\n", + " The power emitted =1.86 mW\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "tr=25## rediative life time in ns\n", + "tnr=90## nonrediative life time in ns\n", + "i=3.5*10**-3## drive current in amp\n", + "y=1.31*10**-6## wavelength in m\n", + "h=6.625*10**-34## plank constant\n", + "c=3*10**8## the speed of light in m/s\n", + "e=1.6*10**-19## charge\n", + "t=tr*tnr/(tr+tnr)## total carrier recombination lifetime ns\n", + "ni=t/tr## internal quantam efficiency\n", + "pi=(ni*h*c*i)/(e*y)## internal power in watt\n", + "p_int=pi*10**3## internal power in mW\n", + "P=p_int/(ni*(ni+1))## power emitted in mW\n", + "print \"The total carrier recombination lifetime =%0.2f ns\"%( t)#\n", + "print \"\\n The internal quantam efficiency =%0.2f \"%( ni)#\n", + "print \"\\n The internal power =%0.2f mW\"%( p_int)#\n", + "print \"\\n The power emitted =%0.2f mW\"%( P)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.26 Pg: 344" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The external efficiency =10.30 %\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "nt=0.18## total efficiency\n", + "Eg=1.43## band gape energy eV\n", + "V=2.5## appied voltage in volt\n", + "n_ex=(nt*(Eg/V))*100## external efficiency\n", + "print \"The external efficiency =%0.2f %%\"%( n_ex)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.27 Pg: 345" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cavity length =149 um\n", + "\n", + " The number of longitudinal modes =1233\n" + ] + } + ], + "source": [ + "from math import floor\n", + "from __future__ import division\n", + "c=3*10**8## speed of light in m/s\n", + "n=3.6## for GaAs\n", + "df=278*10**9## separation in Hz\n", + "y=0.87*10**-6## wavelength in m\n", + "L=c/(2*n*df)## cavity length in m\n", + "l=L*10**6## cavity length in um\n", + "L1=floor(l)*10**-6## cavity length in m\n", + "q=(2*n*L1)/y## number of longitudinal modes\n", + "print \"The cavity length =%d um\"%( l)#\n", + "print \"\\n The number of longitudinal modes =%d\"%( q)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.28 Pg: 345" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The coupling efficiency =0.06\n", + "\n", + " The loss =12.33 decibels\n" + ] + } + ], + "source": [ + "from math import log,sin\n", + "from __future__ import division\n", + "ac=14## acceptance angle in degree\n", + "nc=(sin(ac*3.14/180))**2## coupling efficiency\n", + "l_s=-10*log(nc)/log(10)## loss in decibels\n", + "print \"The coupling efficiency =%0.2f\"%( nc)#\n", + "print \"\\n The loss =%0.2f decibels\"%( l_s)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:8.29 Pg: 346" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The frequency separation =81 GHz\n", + "\n", + " The wavelength separation =0.20 nm\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "c=3*10**8## speed of light in m/s\n", + "n=3.7## for GaAs\n", + "L=500*10**-6## cavity length in m\n", + "y=850*10**-9##\n", + "df=c/(2*n*L)##frequency separation in Hz\n", + "df1=df/10**9## frequency separation in GHz\n", + "dy=(y*y)/(2*L*n)## wavelength in m\n", + "dy1=dy*10**9## wavelength in nm\n", + "print \"The frequency separation =%d GHz\"%( df1)#\n", + "print \"\\n The wavelength separation =%0.2f nm\"%( dy1)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap9.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap9.ipynb new file mode 100644 index 00000000..e3ff12fa --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap9.ipynb @@ -0,0 +1,1030 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ch-9 : Optical Detectors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.1 Pg: 374" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The responsivity =0.72 Amp/Watt\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "e_c=550## number of electron collected\n", + "p=800## number of photon incident\n", + "n=e_c/p## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=1.3*10**-6# wavelength in m\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "print \"The responsivity =%0.2f Amp/Watt\"%( R)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.2 Pg: 374" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The quantum efficiency =40.00 %\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.85*10**-6# wavelength in m\n", + "R=0.274## responsivity in A/W\n", + "n=(R*h*c)/(e*y)## quantum efficiency\n", + "n1=n*100## % of quantum efficiency\n", + "print \"The quantum efficiency =%0.2f %%\"%( n1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.3 Pg: 374" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The quantum efficiency =33.33 %\n", + "\n", + " band gap energy =24.85*10**-20 J\n", + "\n", + " The output photo current =21.49 nA\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "e_c=1## number of electron collected\n", + "p=3## number of photon incident\n", + "n=e_c/p## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.8*10**-6# wavelength in m\n", + "Eg=(h*c)/y## band gap energy in J\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "Po=10**-7## in W\n", + "Ip=R*Po## output photo current\n", + "print \"The quantum efficiency =%0.2f %%\"%( n*100)#\n", + "print \"\\n band gap energy =%0.2f*10**-20 J\"%( Eg*10**20)#\n", + "print \"\\n The output photo current =%0.2f nA\"%( Ip*10**9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.4 Pg: 375" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The responsivity =0.34 A/W\n", + "\n", + " The received optical power =2.92 uW\n", + "\n", + " The number of received photons =1.25*10**13 photons/sec\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.50## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.85*10**-6# wavelength in m\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "Ip=10**-6## mean photo current\n", + "Po=Ip/R## received optical power in W\n", + "f=c/y#\n", + "re=(n*Po)/(h*f)#\n", + "rp=re/n## number of received photons\n", + "print \"The responsivity =%0.2f A/W\"%( R)#\n", + "print \"\\n The received optical power =%0.2f uW\"%( Po*10**6)#\n", + "print \"\\n The number of received photons =%0.2f*10**13 photons/sec\"%( rp/10**13)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.5 Pg: 375" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off wavelength =0.87 um\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "Eg=1.43## in eV\n", + "Eg1=Eg*1.602*10**-19## in J\n", + "y=(h*c)/Eg1## cut off wavelength in m\n", + "print \"The cut off wavelength =%0.2f um\"%( y*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.6 Pg: 376" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max response time =7.54 ns\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division\n", + "vd=2.5*10**4## carrier velocity in m/s\n", + "w=30*10**-6## width in m\n", + "Bm=vd/(2*pi*w)#\n", + "Tm=1/Bm## max response time in sec\n", + "Tm1=Tm*10**9## max response time in ns\n", + "print \"The max response time =%0.2f ns\"%( Tm1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.7 Pg: 376" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The multiplication factor =58\n" + ] + } + ], + "source": [ + "from math import ceil,pi\n", + "from __future__ import division\n", + "n=0.65## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.85*10**-6# wavelength in m\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "Po=0.35*10**-6## in W\n", + "Ip=R*Po## output photo current\n", + "I=9*10**-6## output current in A\n", + "M=I/Ip## multiplication factor\n", + "M1=ceil(M)#\n", + "print \"The multiplication factor =%d\"%( M1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.8 Pg: 377" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off wavelength =1.33 um\n", + "\n", + " The responsivity =0.53 A/W \n", + "\n", + " The incident optical power =5.06 uW\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.50## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "Eg=1.5*10**-19## in J\n", + "y=(h*c)/Eg## cut off wavelength in m\n", + "f=c/y#\n", + "R=(n*e)/(h*f)## responsivity in A/W\n", + "Ip=2.7*10**-6## photo current in A\n", + "Po=Ip/R## incident optical power in W\n", + "Po1=Po*10**6## incident optical power in uW\n", + "print \"The cut off wavelength =%0.2f um\"%( y*10**6)#\n", + "print \"\\n The responsivity =%0.2f A/W \"%( R)#\n", + "print \"\\n The incident optical power =%0.2f uW\"%( Po1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.9 Pg: 377" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The responsivity =0.10 A/W \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.15## quantum efficiency\n", + "e=1.6*10**-19## charge\n", + "h=6.63*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.85*10**-6## cut off wavelength in m\n", + "f=c/y## frequency in Hz\n", + "R=(n*e)/(h*f)## responsivity in A/W\n", + "print \"The responsivity =%0.2f A/W \"%( R)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.10 Pg: 377" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The responsivity =0.10 A/W \n", + "\n", + " The external quantum efficiency =14.59% \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Iph=75*10**-6## output photocurrent in A\n", + "y=0.85## operating wavelength in um\n", + "Pi=750*10**-6## incident optical power in uW\n", + "R=Iph/Pi## responsivity in A/W\n", + "n=1.24*R/y## external quantum efficiency\n", + "n1=n*100## percentage of external quantum efficiency\n", + "print \"The responsivity =%0.2f A/W \"%( R)#\n", + "print \"\\n The external quantum efficiency =%0.2f%% \"%( n1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.11 Pg: 378" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The transit time =70.00 ps\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Vs=10**5## saturation in m/s\n", + "W=7*10**-6## depletion layer width in m\n", + "tr=W/Vs## transit time in sec\n", + "print \"The transit time =%0.2f ps\"%( tr*10**12)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.12 Pg: 378" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The max 3 dB bandwidth =420 MHz\n", + "\n", + " The answer is wrong in the textbook\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Vs=3*10**4## saturation in m/s\n", + "W=25*10**-6## depletion layer width in m\n", + "tr=W/Vs## transit time in sec\n", + "f=0.35/tr## max 3 dB bandwidth Hz\n", + "f1=f/10**6## max 3 dB bandwidth Hz\n", + "print \"The max 3 dB bandwidth =%d MHz\"%( f1)#\n", + "print \"\\n The answer is wrong in the textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.13 Pg: 378" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The transit time =0.83 ns\n", + "\n", + " The junction capacitance =1.05 pF\n", + "\n", + " The time constant =15.75 us\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Vs=3*10**4## saturation in m/s\n", + "W=25*10**-6## depletion layer width in m\n", + "E=10.5*10**-11## in F/m\n", + "RL=15*10**6## load resister in ohm\n", + "A=0.25*10**-6## area in m**2\n", + "tr=W/Vs## transit time in sec\n", + "Cj=E*A/W## junction capacitance in F\n", + "t=RL*Cj## time constant in sec\n", + "print \"The transit time =%0.2f ns\"%( tr*10**9)#\n", + "print \"\\n The junction capacitance =%0.2f pF\"%( Cj*10**12)#\n", + "print \"\\n The time constant =%0.2f us\"%( t*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.14 Pg: 379" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off wavelength for Si =1.11 um\n", + "\n", + " The cut off wavelength for Ge =1.86 um\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "Eg1=1.12## band gap for Si in eV\n", + "Eg2=0.667## band gap for Ge in eV\n", + "y_si=1.24/Eg1## cut off wavelength for Si in um\n", + "y_he=1.24/Eg2## cut off wavelength for Ge in um\n", + "print \"The cut off wavelength for Si =%0.2f um\"%( y_si)#\n", + "print \"\\n The cut off wavelength for Ge =%0.2f um\"%( y_he)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.15 Pg: 379" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The responsivity =0.36 A/W\n", + "\n", + " The received optical power =2.76 uW\n", + "\n", + " The number of received photons =1.25*10**13 photons/sec\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.50## quantum efficiency\n", + "e=1.6*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.9*10**-6# wavelength in m\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "Ip=10**-6## mean photo current\n", + "Po=Ip/R## received optical power in W\n", + "f=c/y#\n", + "re=(n*Po)/(h*f)#\n", + "rp=re/n## number of received photons\n", + "print \"The responsivity =%0.2f A/W\"%( R)#\n", + "print \"\\n The received optical power =%0.2f uW\"%( Po*10**6)#\n", + "print \"\\n The number of received photons =%0.2f*10**13 photons/sec\"%( rp/10**13)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.16 Pg: 379" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The photon current =80 uA\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "R=0.40## Responsivity in A/W\n", + "m=100*10**-6## incident flux in W/m-m\n", + "A=2## area in m-m\n", + "Po=m*A## incident power in W\n", + "Ip=R*Po## photon current in A\n", + "print \"The photon current =%d uA\"%( Ip*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.17 Pg: 380" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off wavelength =1.33 um\n", + "\n", + " The responsivity =0.69 A/W \n", + "\n", + " The incident optical power =3.60 uW\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.65## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "Eg=1.5*10**-19## in J\n", + "y=(h*c)/Eg## cut off wavelength in m\n", + "f=c/y#\n", + "R=(n*e)/(h*f)## responsivity in A/W\n", + "Ip=2.5*10**-6## photo current in A\n", + "Po=Ip/R## incident optical power in W\n", + "Po1=Po*10**6## incident optical power in uW\n", + "print \"The cut off wavelength =%0.2f um\"%( y*10**6)#\n", + "print \"\\n The responsivity =%0.2f A/W \"%( R)#\n", + "print \"\\n The incident optical power =%0.2f uW\"%( Po1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.18 Pg: 380" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut off wavelength =0.87 um\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "Eg=1.43## in eV\n", + "Eg1=Eg*1.602*10**-19## in J\n", + "y=(h*c)/Eg1## cut off wavelength in m\n", + "print \"The cut off wavelength =%0.2f um\"%( y*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.19 Pg: 381" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The optical gain =0.17\n", + "\n", + " The common emitter gain =0.38\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.45## quantum efficiency\n", + "h=6.62*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=1.2*10**-6## cut off wavelength in m\n", + "Ic=20*10**-6## collector current in A\n", + "Po=120*10**-6## incident optical power in W\n", + "e=1.602*10**-19## charge\n", + "Go=(h*c*Ic)/(y*Po*e)## optical gain\n", + "h_e=Go/n## common emitter gain\n", + "print \"The optical gain =%0.2f\"%( Go)#\n", + "print \"\\n The common emitter gain =%0.2f\"%( h_e)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.20 Pg: 381" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The multiplication factor =38\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.5## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=1.3*10**-6# wavelength in m\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "Po=0.4*10**-6## in W\n", + "Ip=R*Po## output photo current\n", + "I=8*10**-6## output current in A\n", + "M=I/Ip## multiplication factor\n", + "print \"The multiplication factor =%d\"%( M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.21 Pg: 382" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The multiplication factor =27\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.85## quantum efficiency\n", + "e=1.6*10**-19## charge\n", + "h=6.625*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.9*10**-6# wavelength in m\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "Po=0.6*10**-6## in W\n", + "Ip=R*Po## output photo current\n", + "I=10*10**-6## output current in A\n", + "M=I/Ip## multiplication factor\n", + "print \"The multiplication factor =%d\"%( M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.22 Pg: 382" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The quantum efficiency =60 %\n", + "\n", + " The wavelength =1.33 um\n", + "\n", + " The responsivity =0.64 Amp/Watt\n", + "\n", + " The incident optical power =4.06 uW\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "e_c=1.2*10**11## number of electron collected\n", + "p=2*10**11## number of photon incident\n", + "n=e_c/p## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "E=1.5*10**-19## energy in J\n", + "y=(h*c)/E# wavelength in m\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "Ip=2.6*10**-6## photocurrent in A\n", + "Po=Ip/R## incident optical power in W\n", + "print \"The quantum efficiency =%d %%\"%( n*100)#\n", + "print \"\\n The wavelength =%0.2f um\"%( y*10**6)#\n", + "print \"\\n The responsivity =%0.2f Amp/Watt\"%( R)#\n", + "print \"\\n The incident optical power =%0.2f uW\"%( Po*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.23 Pg: 383" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The multiplication factor =56\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.40## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=1.35*10**-6# wavelength in m\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "Po=0.2*10**-6## in W\n", + "Ip=R*Po## output photo current\n", + "I=4.9*10**-6## output current in A\n", + "M=I/Ip## multiplication factor\n", + "print \"The multiplication factor =%d\"%( M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.24 Pg: 383" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The responsivity =0.38 A/W\n", + "\n", + " The received optical power =5.31 uW\n", + "\n", + " The number of received photons =1.25*10**13 photons/sec\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "n=0.55## quantum efficiency\n", + "e=1.6*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.85*10**-6# wavelength in m\n", + "R=(n*e*y)/(h*c)## responsivity in A/W\n", + "Ip=2*10**-6## mean photo current\n", + "Po=Ip/R## received optical power in W\n", + "re=(n*Po*y)/(h*c)## number of received photons\n", + "print \"The responsivity =%0.2f A/W\"%( R)#\n", + "print \"\\n The received optical power =%0.2f uW\"%( Po*10**6)#\n", + "print \"\\n The number of received photons =%0.2f*10**13 photons/sec\"%( re/10**13)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.25 Pg: 384" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength =1.53 um\n", + "\n", + " The output power =1.30 uW\n", + "\n", + " The photocurrent =28.84 uA\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "h=6.625*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "n=1## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "E=1.3*10**-19## energy in J\n", + "y=(h*c)/E## wavelength in m\n", + "M=18## multiplication factor\n", + "rp=10**13## no. of photon per sec\n", + "Po=rp*E## output power in w\n", + "Ip=(n*Po*e)/E## output photocurrent in A\n", + "I=M*Ip## photocurrent in A\n", + "print \"The wavelength =%0.2f um\"%( y*10**6)#\n", + "print \"\\n The output power =%0.2f uW\"%( Po*10**6)#\n", + "print \"\\n The photocurrent =%0.2f uA\"%( I*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex:9.26 Pg: 384" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The quantum efficiency =40 %\n", + "\n", + " The bandgap energy =2.34*10**-19 J\n", + "\n", + " The bandgap energy =1.46 eV\n", + "\n", + " The mean output photocurrent =2.74 uA\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "e_c=2*10**10## number of electron collected\n", + "p=5*10**10## number of photon incident\n", + "n=e_c/p## quantum efficiency\n", + "e=1.602*10**-19## charge\n", + "h=6.626*10**-34## plank constant\n", + "c=3*10**8## speed of light in m/s\n", + "y=0.85*10**-6## wavelength in m\n", + "y1=0.85## wavelength in um\n", + "Eg=(h*c)/y## bandgap energy in J\n", + "Eg1=1.24/y1## bandgap energy in terms of eV\n", + "Po=10*10**-6## incident power in W\n", + "Ip=(n*e*Po)/Eg## mean output photocurrent in A\n", + "print \"The quantum efficiency =%d %%\"%( n*100)#\n", + "print \"\\n The bandgap energy =%0.2f*10**-19 J\"%( Eg*10**19)#\n", + "print \"\\n The bandgap energy =%0.2f eV\"%( Eg1)#\n", + "print \"\\n The mean output photocurrent =%0.2f uA\"%( Ip*10**6)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/Sc1.png b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/Sc1.png Binary files differnew file mode 100644 index 00000000..7b04785a --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/Sc1.png diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc2.png b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc2.png Binary files differnew file mode 100644 index 00000000..ca381cd2 --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc2.png diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc3.png b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc3.png Binary files differnew file mode 100644 index 00000000..401cc15d --- /dev/null +++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc3.png |