{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter10 - Optical Fiber Systems" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:10.1 Page No: 349" ] }, { "cell_type": "code", "execution_count": 16, "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: 350" ] }, { "cell_type": "code", "execution_count": 2, "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: 350" ] }, { "cell_type": "code", "execution_count": 5, "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: 351" ] }, { "cell_type": "code", "execution_count": 6, "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: 351" ] }, { "cell_type": "code", "execution_count": 7, "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: 352" ] }, { "cell_type": "code", "execution_count": 9, "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: 353" ] }, { "cell_type": "code", "execution_count": 10, "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": [ "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: 353" ] }, { "cell_type": "code", "execution_count": 12, "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: 353" ] }, { "cell_type": "code", "execution_count": 14, "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: 354" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "ename": "ZeroDivisionError", "evalue": "integer division or modulo by zero", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mZeroDivisionError\u001b[0m Traceback (most recent call last)", "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[0;32m 11\u001b[0m \u001b[0mLmax\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0.35\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0my\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdy\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m## material dispersion limited distance for RZ coding in m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 12\u001b[0m \u001b[0mL_GI\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1.4\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mn1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mn12\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m## model dispersion limited distance for RZ coding in m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 13\u001b[1;33m \u001b[0mL_At\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mPt\u001b[0m\u001b[1;33m-\u001b[0m\u001b[0mPr\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mLa\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m## attenuation limited distance for RZ coding in m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 14\u001b[0m \u001b[1;32mprint\u001b[0m \u001b[1;34m\"The material dispersion limited distance = %0.2f*10**10*1/Br m\"\u001b[0m\u001b[1;33m%\u001b[0m\u001b[1;33m(\u001b[0m \u001b[0mLmax\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m#\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 15\u001b[0m \u001b[1;32mprint\u001b[0m \u001b[1;34m\"\\n The model dispersion limited distance = %0.2f*10**10*1/Br m\"\u001b[0m\u001b[1;33m%\u001b[0m\u001b[1;33m(\u001b[0m \u001b[0mL_GI\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;31m#\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;31mZeroDivisionError\u001b[0m: integer division or modulo by zero" ] } ], "source": [ "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 }