diff options
Diffstat (limited to 'Fiber_Optics_Communication_by_H._Kolimbiris/chapter12_1.ipynb')
-rwxr-xr-x | Fiber_Optics_Communication_by_H._Kolimbiris/chapter12_1.ipynb | 2095 |
1 files changed, 2095 insertions, 0 deletions
diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12_1.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12_1.ipynb new file mode 100755 index 00000000..43b64692 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12_1.ipynb @@ -0,0 +1,2095 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:03bffc5718fcd6defcb7667288d869c25c0041319549754d2fa9939094b7e52f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Optical Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1,Page number 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Pt=10.; #in microW\n", + "Pr=1.; #in microW\n", + "PtdBm=10*math.log10(Pt*10**-6/10**-3) #in dBm\n", + "print\"Transmitter Power =\",round(PtdBm,4),\"dBm\";\n", + "PrdBm=10*math.log10(Pr*10**-6/10**-3) #in dBm\n", + "print\"Receiver Power =\",round(PrdBm,4),\"dBm\";\n", + "Pm=PtdBm-PrdBm;\n", + "print\"Power margin=\",round(Pm,4),\"dBm\"; #misprint in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmitter Power = -20.0 dBm\n", + "Receiver Power = -30.0 dBm\n", + "Power margin= 10.0 dBm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2,Page number 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Pt=25.; #in microW\n", + "Prd=15.; #in dBm\n", + "Ptd=10*math.log10(Pt*10**-6/10**-3) #in dBm\n", + "print\"Transmitter Power =\",round(Ptd,4),\"dBm\";\n", + "Pm=Ptd-Prd;\n", + "print\"Power margin=\",round(Pm,4),\"dBm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmitter Power = -16.0206 dBm\n", + "Power margin= -31.0206 dBm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3,Page number 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Pt1=-18; #in dBm for 50/125 micron fiber\n", + "Pt2=-10; #in dBm for 100/125 micron fiber\n", + "Pd=Pt1-Pt2;\n", + "print\" Additional Power =\",round(Pd,4),\"dBm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Additional Power = -8.0 dBm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4,Page number 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Plb=10; #in dBm for 50/125 micron fiber\n", + "Ps=3; #in dBm for safety margin\n", + "Prs=-30; #in dBm for receiver sensivity\n", + "Pt=Plb+Ps+Prs;\n", + "print\"Link power budget =\",round(Pt,4),\"dBm\";\n", + "Ptw=10**(Pt/10.)*1000;\n", + "print\"Transmitter Power =\",round(Ptw,4),\"microW\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Link power budget = -17.0 dBm\n", + "Transmitter Power = 19.9526 microW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5,Page number 433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Is=0.5; #in A/W\n", + "Ir=1.5; #in microA\n", + "Xw=Ir/Is;\n", + "print\"Electrical power required by PIN diode is =\",round(Xw,4),\"microW\";\n", + "Pxw=10*math.log10(Xw/10**3);\n", + "print\"Therefore, Electrical power required by PIN diode is =\",round(Pxw,4),\"dBm\";\n", + "\n", + "Ps=3; #in dB for safety margin\n", + "Tp=5; #in dB\n", + "Pt=Tp+Ps+Pxw;\n", + "print\"Total Power Required =\",round(Pt,4),\"dBm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electrical power required by PIN diode is = 3.0 microW\n", + "Therefore, Electrical power required by PIN diode is = -25.2288 dBm\n", + "Total Power Required = -17.2288 dBm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6,Page number 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "fb=1.25; #in Gb/s\n", + "D=17; #in ps/nm.km\n", + "dL=0.5; #in nm\n", + "Lmax=1/fb/10**9/dL/10**-9/D/10**-12*10**-9;\n", + "print\"Maximum Link span,Lmax =\",round(Lmax,4),\"km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Link span,Lmax = 94.1176 km\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7,Page number 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "fb=2.5; #in Gb/s\n", + "Lmax=50.; #in km\n", + "dL=0.4; #in nm\n", + "D=1./fb/10**9/dL/10**-9/Lmax/10**-12*10**-9;\n", + "print\"Maximum allowable dispersion,D =\",round(D,4),\"ps/nm-km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum allowable dispersion,D = 20.0 ps/nm-km\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8,Page number 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Lmax=60.; #in km\n", + "D=17.; #in ps/nm.km\n", + "dL=0.5; #in nm\n", + "fb=1/Lmax/10**9/dL/10**-9/D/10**-12*10**-9;\n", + "print\"Maximum system bit rate,fb =\",round(fb,4),\"Gb/s\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum system bit rate,fb = 1.9608 Gb/s\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9,Page number 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "c1=4; #channel1\n", + "c2=8; #channel2\n", + "c3=16; #channel3\n", + "fb=2.5; #in Gb/s\n", + "Lmax1=6.1*10**3/(c1*fb)**2;\n", + "print\"Maximum Link span for\",c1,\"channel, Lmax =\",Lmax1,\"km\";\n", + "Lmax2=6.1*10**3/(c2*fb)**2;\n", + "print\"Maximum Link span for\",c2,\"channel, Lmax =\",Lmax2,\"km\";\n", + "Lmax3=6.1*10**3/(c3*fb)**2;\n", + "print\"Maximum Link span for\",c3,\"channel, Lmax =\",Lmax3,\"km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Link span for 4 channel, Lmax = 61.0 km\n", + "Maximum Link span for 8 channel, Lmax = 15.25 km\n", + "Maximum Link span for 16 channel, Lmax = 3.8125 km\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10,Page number 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=200; #in km\n", + "dL=1550; #in nm\n", + "R=10; #in Gb/s\n", + "Cd=17; #in ps/nm-km\n", + "w=0.1; #Assused bandwidth\n", + "Cd200=Cd*L;\n", + "print\"Dispersion by 200km ofc =\",\"{0:.1e}\".format(Cd200),\"ps/nm\";\n", + "TCd=w*Cd200;\n", + "print\"total chromatic dispersion =\",\"{0:.1e}\".format(TCd),\"ps\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dispersion by 200km ofc = 3.4e+03 ps/nm\n", + "total chromatic dispersion = 3.4e+02 ps\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11,Page number 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=1.5; #in km\n", + "Ls=L/3; #in km\n", + "BwF=600; #in MHz\n", + "fb=1; #in Gbps\n", + "Bdlaser=0.71*BwF*L**-0.7*Ls**-0.25;\n", + "print\"Laser bandwidth is\",round(Bdlaser,4),\"MHz\"; \n", + "mD=0.85*(fb*10**3/Bdlaser)**2;\n", + "print\"Mean dispersion penalty is\",round(mD,4),\"dB\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Laser bandwidth is 381.4198 MHz\n", + "Mean dispersion penalty is 5.8427 dB\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12,Page number 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "E=0.182; #from table 12-11 for 2dB dispersion penalty\n", + "fb=622; #in Mb/s\n", + "dl=4; #in nm\n", + "ofdisp=3; #in ps/km-nm\n", + "Dmax=E/(10**-6*fb*dl);\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 73.1511 ps/nm\n", + "Maximum link distance is 24.3837 km\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.13,Page number 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "E=0.115; #from table 12-11 for 2dB dispersion penalty\n", + "fb=622; #in Mb/s\n", + "dl=4; #in nm\n", + "ofdisp=3; #in ps/km-nm\n", + "Dmax=E/(10**-6*fb*dl);\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 46.2219 ps/nm\n", + "Maximum link distance is 15.4073 km\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.14,Page number 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "mc=0.4; #in dB\n", + "sc=0.0; #in dB\n", + "dmax=2.8; #in dB\n", + "mt=-4.9; #in dBm\n", + "st=0.5; #in dBm\n", + "mr=-38.1; #in dBm\n", + "sr=0.48; #in dBm\n", + "mco=0.35; #in dB\n", + "sco=0.20; #in dB\n", + "ms=0.2; #in dB\n", + "ss=0.1; #in dB\n", + "E=0.182; #from table 12-11 for 2dB dispersion penalty\n", + "fb=156; #in Mb/s\n", + "dl=4; #in nm\n", + "ofdisp=2.8; #in ps/nm-km\n", + "Nco=7;\n", + "mD=2;\n", + "sD=0.1;\n", + "sH=2;\n", + "sCR=0.25;\n", + "Ns=4;\n", + "mH=0;\n", + "mCR=0.5;\n", + "L=50;\n", + "Ls=10;\n", + "Dmax=E/(10**-6*fb*dl);\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; \n", + "mM=mt-mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);\n", + "print\"Mean link margin is\",round(mM,4),\"dB\"; \n", + "sM=math.sqrt(st**2+sr**2+sc**2*L*Ls+sco**2*Nco+sD**2*sH**2+sCR**2);\n", + "print\"Sigma link margin is\",round(sM,4),\"dB\"; \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 291.6667 ps/nm\n", + "Maximum link distance is 104.1667 km\n", + "Mean link margin is 7.45 dB\n", + "Sigma link margin is 0.9289 dB\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.15,Page number 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "E=0.115; \n", + "fb=622; #in Mb/s\n", + "dl=4; #in nm\n", + "mt=0.1; #in dBm\n", + "mr=-31.5; #in dBm\n", + "mc=0.41; #in dB\n", + "L=25;\n", + "mco=0.12; #in dB\n", + "Nco=2;\n", + "ms=0.15; #in dB\n", + "Ns=4;\n", + "mD=1;\n", + "mH=0;\n", + "mCR=0;\n", + "sc=0.0; #in dB\n", + "st=-0.15; #in dBm\n", + "sr=0.3; #in dBm\n", + "sco=0.08; #in dB\n", + "ss=0.1; #in dB\n", + "ofdisp=2.8; #in ps/nm-km\n", + "sD=2;\n", + "sH=0;\n", + "sCR=0.0;\n", + "Ls=12;\n", + "\n", + "Dmax=E/(10**-6*fb*dl);\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; #in book 4 is misprint for solving \n", + "mM=mt-mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);\n", + "print\"Mean link margin is\",round(mM,4),\"dB\"; #wrong in book\n", + "L=60;\n", + "Ls=12; \n", + "sM=math.sqrt(st**2+sr**2+sc**2*L*Ls+sco**2*Nco+ss**2*Ns+sD**2*sH**2+sCR**2);\n", + "print\"Sigma link margin is\",round(sM,4),\"dB\"; \n", + "spm=mM-2*sM-1;\n", + "print\"System power margin is\",round(spm,4),\"dB\"; #answer is slighty difeerent due to mM=19.5" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 46.2219 ps/nm\n", + "Maximum link distance is 16.5078 km\n", + "Mean link margin is 19.51 dB\n", + "Sigma link margin is 0.4066 dB\n", + "System power margin is 17.6969 dB\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.16,Page number 484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "E=0.115; \n", + "fb=1062; #in Mb/s\n", + "dl=6; #in nm\n", + "mt=-8; #in dBm\n", + "mr=28.7; #in dBm\n", + "mc=0.4; #in dB\n", + "L=5;\n", + "mco=0.12; #in dB\n", + "Nco=8;\n", + "ms=0.2; #in dB\n", + "Ns=4;\n", + "mD=1;\n", + "mH=0;\n", + "mCR=1;\n", + "sc=0.0; #in dB\n", + "st=0.6; #in dBm\n", + "sr=0.75; #in dBm\n", + "sco=0.08; #in dB\n", + "ss=0.1; #in dB\n", + "ofdisp=2.8; #in ps/nm-km\n", + "sD=2;\n", + "sH=0;\n", + "sCR=0.25;\n", + "Ls=12;\n", + "\n", + "Dmax=round(E/(10**-6*fb*dl)); #taking to nearest integer in ps/nm\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; \n", + "mM=mt+mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);\n", + "print\"Mean link margin is\",round(mM,4),\"dB\";\n", + "L=60;\n", + "Ls=12; \n", + "sM=math.sqrt(st**2+sr**2+sc**2*L*Ls+sco**2*Nco+ss**2*Ns+sD**2*sH**2+sCR**2);\n", + "print\"Sigma link margin is\",round(sM,4),\"dB\"; \n", + "mM=round(mM*10)/10; #talking only to 1 decimal place and rounding of other values\n", + "spm=mM-2*sM-1;\n", + "print\"mM-2*sM =\",mM-2*sM;\n", + "print\"System power margin is\",round(spm,4),\"dB\"; #answer is slighty diferent due to m\\sM=1.03" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 18.0 ps/nm\n", + "Maximum link distance is 6.4286 km\n", + "Mean link margin is 14.94 dB\n", + "Sigma link margin is 1.0374 dB\n", + "mM-2*sM = 12.8251988047\n", + "System power margin is 11.8252 dB\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.17,Page number 486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ncso=50;\n", + "a=3.6*10**-3;\n", + "m=0.05;\n", + "CSO=10*math.log10(Ncso*(a*m)**2);\n", + "print\"CSO distortion for 50 channel optical system =\",round(CSO,4),\"dB\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CSO distortion for 50 channel optical system = -57.9048 dB\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.18,Page number 486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "CSO=-59.8; #in dB\n", + "y=10**(CSO/10);\n", + "print\"AM modulation depth (m) = \",\"{0:.3e}\".format(y);\n", + "asq=3.6*10**-3;\n", + "Ncso=50;\n", + "msq=(y/Ncso/asq/asq);\n", + "print\"m^2 =\",\"{0:.3e}\".format(msq);\n", + "print\"Decrease of AM modulation depth decrease the CSO distortion by =\",round(math.sqrt(msq)*100,1),\"percent\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "AM modulation depth (m) = 1.047e-06\n", + "m^2 = 1.616e-03\n", + "Decrease of AM modulation depth decrease the CSO distortion by = 4.0 percent\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.19,Page number 486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ncto=50;\n", + "b=1.07*10**-2;\n", + "m=0.05;\n", + "CTO=10*math.log10(Ncto*(1.5*b*m)**2);\n", + "print\"CTO distortion for 50 channel optical system =\",round(CTO,4),\"dB\"; \n", + "#Answer in the book is misprinted\n", + "#The solution in the book is calculated without multipication of Ncto" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CTO distortion for 50 channel optical system = -44.9214 dB\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.20,Page number 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ncso=80;\n", + "a=2.43*10**-3;\n", + "b=4.65*10**-3;\n", + "m=0.05;\n", + "\n", + "#Part (i)\n", + "CSO=10*math.log10(Ncso*(a*m)**2);\n", + "print\"CSO distortion for 50 channel optical system for m = 5 percent CSOdB =\",round(CSO,4),\"dB\"; \n", + "\n", + "#Part (ii)\n", + "CTO=10*log10(Ncso*(1.5*b*m)**2);\n", + "print\"CTO distortion for 50 channel optical system for m = 5 percent CTOdB =\",round(CTO,4),\"dB\";\n", + "\n", + "#Part (iii)\n", + "m=0.03;\n", + "\n", + "CSO=10*log10(Ncso*(a*m)**2); \n", + "# Value of a in the book is considered 2.4 instead of 2.43\n", + "print\"CSO distortion for 50 channel optical system for m = 3 percent CSOdB =\",round(CSO,4),\"dB\"; \n", + "\n", + "#Part (iv)\n", + "CTO=10*math.log10(Ncso*(1.5*b*m)**2);\n", + "print\"CTO distortion for 50 channel optical system for m = 3 percent CTOdB =\",round(CTO,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CSO distortion for 50 channel optical system for m = 5 percent CSOdB = -59.2776 dB\n", + "CTO distortion for 50 channel optical system for m = 5 percent CTOdB = -50.1188 dB\n", + "CSO distortion for 50 channel optical system for m = 3 percent CSOdB = -63.7145 dB\n", + "CTO distortion for 50 channel optical system for m = 3 percent CTOdB = -54.5558 dB\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.21,Page number 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "RIN=-150; #in dB\n", + "B=4*10**6;\n", + "m=0.04;\n", + "CNR=10*math.log10(m**2/(2*10**-15*B));\n", + "print\" CNR =\",round(CNR,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " CNR = 53.0103 dB\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.22,Page number 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "CNR=50; #in dB\n", + "Bch=4*10**6;\n", + "m=0.03;\n", + "RIN=m**2/2/Bch/10**(CNR/10)\n", + "print\"RIN =\",\"{0:.3e}\".format(RIN);\n", + "#Miscalculated answer in the book\n", + "RINdB=10*log10(RIN);\n", + "print\"RIN in Db is\",round(RINdB,4);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RIN = 1.125e-15\n", + "RIN in Db is -149.4885\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.23,Page number 490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ipd=0.15; #in mA\n", + "n=0.75;\n", + "e=1.6*10**-19; #electron charge\n", + "hv=1.55*10**-19;\n", + "Pin=hv*Ipd/n/e;\n", + "print\"Pin =\",round(Pin,4),\"mW\"; #Result\n", + "#answer in book is misprint" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pin = 0.1937 mW\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.24,Page number 492" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "OBR=-40; #in dB\n", + "#y=Pref/Pin\n", + "y=10**(OBR/10.);\n", + "print\" Prefl =\",round(y*100,4),\"percent Pin\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Prefl = 0.01 percent Pin\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.25,Page number 493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "R=800; #in V/W\n", + "Pin=1.5; #in mW\n", + "m=0.04;\n", + "Voutp=R*Pin*m;\n", + "print\"Vout(peak) =\",Voutp,\"mV\";\n", + "Vavg=Voutp/math.sqrt(2);\n", + "print\"Vavg =\",round(Vavg,4),\"mV\";\n", + "#in dB\n", + "Vavgd=20*math.log10(Vavg*10**-3);\n", + "print\"Vavg(in dBmV) =\",round(Vavgd,4);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vout(peak) = 48.0 mV\n", + "Vavg = 33.9411 mV\n", + "Vavg(in dBmV) = -29.3855\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.26,Page number 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Voutp=20; #in dB\n", + "Pin=1.2; #in mW\n", + "m=0.035;\n", + "Vavg=10**(Voutp/20); #in \n", + "R=Vavg*math.sqrt(2)/Pin/m;\n", + "print\"R =\",round(R,4),\"V/W\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 336.7175 V/W\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.27,Page number 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Voutp=28.; #in dB\n", + "Pin=1; #in mW\n", + "R=800; #in V/W\n", + "Vavg=10**(Voutp/20); #in \n", + "m=Vavg*math.sqrt(2)/Pin/R;\n", + "print\"The modulation depth ,m =\",round(m*100,4),\"percent\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The modulation depth ,m = 4.4404 percent\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.28,Page number 495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ipd=1.2; #in mA\n", + "m=0.04; \n", + "RINd=-160.; #in dB/Hz\n", + "e=1.6*10**-19; \n", + "nth=8; #in pA/Hz\n", + "BW=4; #in MHz\n", + "Rin=10**(RINd/10); #in \n", + "\n", + "CNR=(0.5*(m*Ipd*10**-3)**2)/((2*e*Ipd*10**-3)+(Rin*Ipd*10**-3)**2+((nth*10**-12)**2)*BW/10**6);\n", + "print\"Value of CNR=\",\"{0:.3e}\".format(CNR);\n", + "CNRdB=10*math.log10(CNR)\n", + "print\"Value of CNR in dB=\",round(CNRdB,4),\"dB\"\n", + "#Answer in the book is misprinted or wrong calculation performed in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of CNR= 3.000e+12\n", + "Value of CNR in dB= 124.7712 dB\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.29,Page number 509" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L1=40; #in km\n", + "L2=100; #in km\n", + "A=0.2; #in dB/Km\n", + "TFA1=A*L1;\n", + "\n", + "print\"Total fibre span attenuation\",round(TFA1,4),\"dB\";\n", + "TFA2=A*L2;\n", + "print\"Total fibre span attenuation\",round(TFA2,4),\"dB\";\n", + "nsd=TFA2-TFA1;\n", + "print\"Noise spectral density =\",round(nsd,4),\"dB\";\n", + "nsd_abs=10**(nsd/10)\n", + "print\"Absolute value of noise spectral density =\",round(nsd_abs,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total fibre span attenuation 8.0 dB\n", + "Total fibre span attenuation 20.0 dB\n", + "Noise spectral density = 12.0 dB\n", + "Absolute value of noise spectral density = 15.8489 dB\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.30,Page number 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "P1=2.75; #in mW\n", + "NFd=5; #in dB\n", + "bw=5; #in GHz\n", + "G=10; #in dB\n", + "hv=1.6*10**-19; #photon energy in J\n", + "N=1; #no of amplifiers\n", + "NF=10**(NFd/10.); #amplifier noise figure\n", + "SNR=10*math.log10(P1*10**-3/(G*hv*bw*10**9*N*NF)); #signal to nois eratio\n", + "print\"Spectral Noise density =\",round(SNR,4),\"dB\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Spectral Noise density = 50.3624 dB\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.31,Page number 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "SNRdB=40; #in dB\n", + "NFd=6; #in dB\n", + "bw=4; #in GHz\n", + "Gd=8; #in dB\n", + "hv=1.6*10**-19; #photon energy in J\n", + "N=8; #no of amplifiers\n", + "SNR=10**(SNRdB/10.);\n", + "NF=10**(NFd/10.); #amplifier noise figure\n", + "G=10**(Gd/10.); #amplifer gain\n", + "P1=10*(SNR/10.)*(G*hv*bw*10**9*N*NF)/10**-3; #optical power launched into fibre\n", + "print\"Optical power required , Pl =\",round(P1,4),\"mW \";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optical power required , Pl = 1.2861 mW \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.32,Page number 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "l=1550; #wavelength in nm\n", + "fb=10; #system bit rate Gb/s\n", + "Df=17; #fiber dispersion in ps/nm-km\n", + "L=10**5/Df/fb**2; #fiber length in km \n", + "print\"Transmission length is\",round(L,4),\"km\";\n", + "fb2=2.5; #system bit rate Gb/s\n", + "print\"for fb=2.5 Gb/s\"\n", + "L2=10**5/Df/fb2**2; #fiber length in km \n", + "print\"Transmission length is\",round(L2,4),\"km\"; #answer misprint in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmission length is 58.0 km\n", + "for fb=2.5 Gb/s\n", + "Transmission length is 941.12 km\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.33,Page number 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "lembda=1550; #wavelength in nm\n", + "Df=17; #fiber dispersion in ps/nm-km\n", + "L=80 #fiber length in km \n", + "fb=math.sqrt(10**5/Df/L)\n", + "print\"Maximum bit rate fb =\",round(fb,4),\"Mb/s\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum bit rate fb = 8.544 Mb/s\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.34,Page number 530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "D=0.2; #dispersion constant in ps/nm/km\n", + "Tfwhm=18; #ps\n", + "Zs=0.25*Tfwhm**2/D; #Characteristic length\n", + "print\" Zs =\",Zs,\"km\"; #answer in book is miscalculated\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Zs = 405.0 km\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.35,Page number 530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "lembda=1550; #wavelength in nm\n", + "c=3*10**5; #speed of light in km/s\n", + "Zs=600; #in km\n", + "Tfwhm=20; #in ps\n", + "D=1/1.763**2*(2*math.pi*c*Tfwhm**2/(lembda**2*Zs)); #dispersion constant\n", + "print\"dispersion constant, D =\",round(D,4),\"ps/nm/km\"; \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dispersion constant, D = 0.1683 ps/nm/km\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.36,Page number 530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "l=1557; #wavelength in nm\n", + "c=3*10**5; #speed of light in km/s\n", + "Zs=550; #in km\n", + "D=0.25; #in ps/nm/km\n", + "Tfwhm=math.sqrt(1.763**2*l**2*D*Zs/(2*math.pi*c)); #Soliton pulse width \n", + "print\"Tfwhm =\",round(Tfwhm,3),\"ps\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tfwhm = 23.445 ps\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.37,Page number 531" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Aeff=55; #in sq micrometer\n", + "l=1557; #wavelength in nm\n", + "c=3*10**5; #speed of light in km/s\n", + "n2=2.6*10**-16; #in cm**2/W\n", + "D=0.20; #Dispersion constant in ps/nm/km\n", + "Tfwhm=30; #in ps\n", + "Zs=(2*math.pi*c*Tfwhm**2/l**2/D)/(1.763)**2 ; #charecteristic length \n", + "print\" Zs =\",round(Zs,4),\"km\"; \n", + "Ps=(Aeff*10**-12*l*10**-9)/(2*math.pi*n2*10**-4*Zs*10**3); #Peak pulse power\n", + "#Miscalculation in the book\n", + "print\" Ps =\",round(Ps*1000,4),\"mW\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Zs = 1125.7236 km\n", + " Ps = 0.4657 mW\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.38,Page number 533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Z=10; #in mm\n", + "Tfwhm=22; #in ps\n", + "D=0.5; #ps/nm/km\n", + "Aeff=55; #in microm^2\n", + "A=0.05; #in km^-1\n", + "nsp=1.5; #spontaneous emission \n", + "F=2; #amplifier noise\n", + "s=3.6*10**3*nsp*F*A*D*Z**3/(Aeff*Tfwhm);\n", + "print\" sigma =\",round(s,4),\"ps\"; \n", + "#answer in book is misprint\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " sigma = 223.1405 ps\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.39,Page number 533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Q1=4; #quality factor\n", + "Q2=6; #quality factor\n", + "BER1=(2*math.pi*(Q1**2+2))**-0.5*math.e**(-Q1*Q1/2); \n", + "BER2=(2*math.pi*(Q2**2+2))**-0.5*math.e**(-Q2*Q2/2);\n", + "print\"For Q=4 ,BER =\",\"{0:.3e}\".format(BER1); \n", + "print\"For Q=6 ,BER =\",\"{0:.3e}\".format(BER2); \n", + "#Answer second is misprinted in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For Q=4 ,BER = 3.154e-05\n", + "For Q=6 ,BER = 9.856e-10\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.40,Page number 534" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "D=0.5; #Dispersion constant ps/nm/km\n", + "Ts=22; #Pulse width in ps\n", + "fb=10; #system transmission rate in Gb/s\n", + "Z1=1; #System total length Mm\n", + "Z2=10; #System total length Mm\n", + "sa1=8.6*D*D*Z1*Z1*math.sqrt(fb-0.99)/22/2; #standard deviation based on accoustic effect\n", + "sa2=8.6*D*D*Z2*Z2*math.sqrt(fb-0.99)/22/2; #standard deviation based on accoustic effect\n", + "print\"For Z=1000km ,sigma acoustic =\",round(sa1,4),\"ps\"; \n", + "print\"For Z=10000km ,sigma acoustic =\",round(sa2,4),\"ps \"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For Z=1000km ,sigma acoustic = 0.1467 ps\n", + "For Z=10000km ,sigma acoustic = 14.6672 ps \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.41,Page number 535" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "D=0.45; #dispersion coefficient in ps/nm/km\n", + "Ts=22; #Pulse width in ps\n", + "l=0.5; #length in nm\n", + "Lcollision=2*Ts/l/D; #collision length in km\n", + "print\"Lcollision =\",round(Lcollision,4),\"km\"; \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lcollision = 195.5556 km\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.42,Page number 537" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "f=70; #Maximum frequencyshift in Ghz\n", + "Ts=22; #Pulse width in ps\n", + "CS=1.783*f*10**9*Ts*10**-12; #half channel seperation \n", + "print\"The half channel seperation\",round(CS,4);\n", + "\n", + "df=0.105/f/10**9/Ts/Ts/10**-24; #maximum frequency shift\n", + "print\"The maximum frequency shift\",round(df/10**9,4),\"GHz\";\n", + "\n", + "dt=0.1786/f/10**9/f/10**9/Ts/10**-12; #time displacement\n", + "print\"The time displacement\",round(dt*10**12,4),\"ps\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The half channel seperation 2.7458\n", + "The maximum frequency shift 3.0992 GHz\n", + "The time displacement 1.6568 ps\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.43,Page number 538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "M=1.; \n", + "N=1.; #no of collision \n", + "S1=4.; #soliton colllision \n", + "S2=5.; #soliton colllision \n", + "Nc=S1*S1/4*(M*S1/2-M+N); #minimum no of collision\n", + "print\"Ncollision for S=4,is\",Nc;\n", + "Nc2=(S2*S2-1)/4*(M*S2/2-M+N); #minimum no of collision\n", + "print\"Ncollision for S=5,is\",Nc2;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ncollision for S=4,is 8.0\n", + "Ncollision for S=5,is 15.0\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.44,Page number 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "S=4.;\n", + "n=5;\n", + "print\"Maximum number of solition Collisions\";\n", + "for M in range(1,n+1):\n", + " N=M;\n", + " Nc=S*(M*S*S/3.+S*(N/2.-M)-N/2.+2*M/3.); #minimum no of collision\n", + " print\" M=\",M,\" N=\",N,\" S=\",S,\"is\",Nc;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum number of solition Collisions\n", + " M= 1 N= 1 S= 4.0 is 14.0\n", + " M= 2 N= 2 S= 4.0 is 28.0\n", + " M= 3 N= 3 S= 4.0 is 42.0\n", + " M= 4 N= 4 S= 4.0 is 56.0\n", + " M= 5 N= 5 S= 4.0 is 70.0\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.45,Page number 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "M=1; #number of solition Collisions\n", + "N=1; # number of solition Collisions\n", + "x=2; \n", + "y=1./2;\n", + "p=3;\n", + "p2=4;\n", + "Tb=100; #ps\n", + "l=1; #difference in wavelength in nm \n", + "D=7*10**-2; #ps/nm**2*km\n", + "Zr=y*y*(Tb/l/l/D); #regeration spacing in km\n", + "print\" Zr =\",Zr,\"km\";\n", + "P=(p-1)*N+(p-2)*(p-1)*M/2.;\n", + "print\" P(\",p,\") =\",P; #result number of Collisions\n", + "P2=(p2-1)*N+(p2-2)*(p2-1)*M/2.; \n", + "print\" P(\",p2,\") =\",P2; #result number of Collisions" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Zr = 357.142857143 km\n", + " P( 3 ) = 3.0\n", + " P( 4 ) = 6.0\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.46,Page number 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Tb=100; #bit period in ps\n", + "dZ=0.4; #in ps/nm/km\n", + "Zr=150; #Modulator spacing in km\n", + "Ta=Tb/(dZ*Zr); #channel spacing in nm\n", + "print\"Channel spacing\",round(Ta,4),\"nm\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Channel spacing 1.6667 nm\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.47,Page number 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Zr=200; #Modulator spacing in km\n", + "D=0.6; #in ps/nm/km\n", + "l=2; #in nm\n", + "Tb=l*(Zr*D); #bit period in ps\n", + "print\"Bit period Tb =\",Tb,\"ps\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bit period Tb = 240.0 ps\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.48,Page number 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "D=0.5; #ps/nm-km\n", + "Tb=80; #bit period in ps\n", + "l=1.5; #in nm\n", + "Zr=Tb/(D*l); #Modulator spacing in km\n", + "print\" Maximum modulator spacing Zr =\",round(Zr,4),\"km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Maximum modulator spacing Zr = 106.6667 km\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.49,Page number 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Zd=100; #in km\n", + "Do=0.07; #in ps/nm**2\n", + "D1=-0.3; #in ps/nm**2\n", + "Ldsf=(Zd*Do)/(Do-D1); #length of dispersion compensation fiber in km\n", + "print\"Length of Dispersion compensation fiber, Ldsf =\",round(Ldsf,4),\"km\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of Dispersion compensation fiber, Ldsf = 18.9189 km\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.50,Page number 542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "m=3;\n", + "n=1;\n", + "Tb=100; #ps\n", + "l=1; #nm\n", + "D=0.07; #ps/nm**2*km\n", + "lmn=1; #nm\n", + "lmo=2; #nm\n", + "Do=0.1; #ps/nm-km\n", + "Lc=4*Tb/(5*D*lmn*(lmn+2*lmo)); #Collision length in km\n", + "print\"Collision length without dispersion slope compensation =\",round(Lc,4),\"km\";\n", + "Lc2=2*Tb/(5*Do*lmn); #Collision length in km\n", + "print\"Collision length with dispersion slope compensation =\",Lc2,\"km\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collision length without dispersion slope compensation = 228.5714 km\n", + "Collision length with dispersion slope compensation = 400.0 km\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.51,Page number 542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Zr=200; #in km\n", + "S=4;\n", + "Ltot1=2*Zr*(S-1); #total solition collion length in km\n", + "print\"Total solition Collisions length With DSC ,Ltotal =\",round(Ltot1,4),\"km\";\n", + "Ltot2=(2./5)*Zr*(S-1); #total solition collion length in km\n", + "print\"Total solition Collisions length With non-DSC ,Ltotal =\",round(Ltot2,4),\"km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total solition Collisions length With DSC ,Ltotal = 1200.0 km\n", + "Total solition Collisions length With non-DSC ,Ltotal = 240.0 km\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |