{ "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 }