summaryrefslogtreecommitdiff
path: root/Optical_Fiber_Communication_Principles_and_Practice/Chapter12_1.ipynb
blob: 288c514a6e1f63cb94d17e3366c7951d948151e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
{
 "metadata": {
  "name": "Chapter_12"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Chapter 12 :- Optical fiber systems 1: Intensity modulation/direct detection\n"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.1, page 706"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#Variable declaration\nn=8                             #bits in a time slot\nt=32                            #bits in a frame\nf=8*10**3                       #frequency\nm=16                            #bits in a multiframe\n\n#Calculation\nnb=n*t                          #number of bits in a frame\nfr=nb*f                         #transmission rate\ntr=fr**-1                       #bit duration\nts=tr*n                         #duration of a time slot\ntf=ts*t                         #duration of a frame\ntm=tf*m                         #duration of a multiframe\n\n#Result\nprint'(a) Bit rate for the system = %.3f Mbit s^-1'%(fr*10**-6)\nprint'(b) Duration of the time slot = %.1f \u03bcs'%(ts*10**6)\nprint'(c) Duration of a frame = %d \u03bcs' %(tf*10**6)\nprint'Duration of a multiframe = %d ms' %(tm*10**3)\n\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "(a) Bit rate for the system = 2.048 Mbit s^-1\n(b) Duration of the time slot = 3.9 \u03bcs\n(c) Duration of a frame = 125 \u03bcs\nDuration of a multiframe = 2 ms\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.2, page 720"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nm=4.24                                  #erfc = 2*10^9\na=2*math.sqrt(2)\n\n#Calculation\nsn=m*a                                 #root of S/N = optical\nsn1=10*math.log10(sn)                  #in dB\nisq=sn**2                              #S/N = electrical    \nisq1=10*math.log10(isq)                #in dB\n#Result\nprint'Optical SNR = %.1f'%sn\nprint'            = %.1f dB'%sn1\nprint'Electrical SNR = %.1f'%round(isq)\nprint'               = %.1f dB'%isq1",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Optical SNR = 12.0\n            = 10.8 dB\nElectrical SNR = 144.0\n               = 21.6 dB\n"
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.3, page 723"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nm=100                             #multiplication factor\nk=0.02                            #ratio of carrier ionization rates \nsn=144                            #electrical SNR\nn=0.8                             #quantum efficiency\nB=0.6\n\n#Calculation\nfm=(k*m)+(2-(1/m))*(1-k)                 #avalanche noise factor\nzm=2*B*round(fm)*sn/n                    #average number of photons\n\n#Result\nprint'Average no of photons = %d photons'%round(zm)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Average no of photons = 864 photons\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.4, page 724"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nzm=864                                       #average no of photons\nh=6.626*10**-34                             #plancks constant\nc=2.998*10**8                               #velocity of light\nl1=10**-6                                   #wavelength\nl2=10**-14                                  #wavelength\nbt=10**7                       \nn=14\n\n\n#Calculation\npo1=(zm*h*c*bt)/(2*l1)                        #At 10 Mbit s^-1\npo2=(zm*h*c*n*bt)/(2*l2)                      #At 140 Mbit s^-1\n\n#Result\nprint'Incident optical power (10 Mbit s^-l) = %.1f pW'%(po1*10**12)\nprint'Incident optical power (140 Mbit s^-l) = %.3f W'%po2                 #value given in a textbook is incorrect",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Incident optical power (10 Mbit s^-l) = 858.2 pW\nIncident optical power (140 Mbit s^-l) = 1.201 W\n"
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.5, page 726"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#Variable declaration\nafc=5                                    #fibre cable attenuation\nai=2                                     #splice losses\nl=4                                      #length in Km\naf=3.5+2.5                               #connector losses at source and detector resp\n\n#Calculation\nCl=(afc+ai)*l+af                          #total channel loss\n\n#Result\nprint'Total channel loss = %d dB'%Cl",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Total channel loss = 34 dB\n"
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.6, page 727"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\ns=0.6*10**-9                                      #rms pulse broadening\nL=8                                               #length in km\nbt=25*10**6                                       #bit rates\nbt1=150*10**6                                     #bit rates\n\n#Calculation\nst=s*L                                            #total rms pulse broadening\ndl1=2*(2*st*bt*math.sqrt(2))**4                   #without mode coupling\nst1=s*math.sqrt(L)                                #total rms pulse broadening\ndl2=2*(2*st1*bt*math.sqrt(2))**4                  #with mode coupling\ndl3=2*(2*st*bt1*math.sqrt(2))**4                  #without mode coupling\ndl4=2*(2*st1*bt1*math.sqrt(2))**4                 #with mode coupling\n\n#Result\nprint'(a) For 25 Mbit per sec'\nprint'dispersion\u2013equalization penalty (without mode coupling) = %.2f dB'%dl1\nprint'dispersion\u2013equalization penalty (with mode coupling) = %.2f x 10^-4 dB\\n'%(dl2*10**4)\nprint'(b) For 150 Mbit per sec'\nprint'dispersion\u2013equalization penalty (without mode coupling) = %.2f dB'%dl3\nprint'dispersion\u2013equalization penalty (with mode coupling) = %.2f dB'%dl4",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "(a) For 25 Mbit per sec\ndispersion\u2013equalization penalty (without mode coupling) = 0.03 dB\ndispersion\u2013equalization penalty (with mode coupling) = 4.15 x 10^-4 dB\n\n(b) For 150 Mbit per sec\ndispersion\u2013equalization penalty (without mode coupling) = 34.40 dB\ndispersion\u2013equalization penalty (with mode coupling) = 0.54 dB\n"
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.7, page 731"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nts=8                                    #rise time for source in ns\ntn=5*ts                                 #for fiber intermodal\ntc=1*ts                                 #for pulse broadening\ntd=6                                    #for detector\n\n#Calculation\ntsys=1.1*(ts**2+tn**2+tc**2+td**2)**0.5             #total system rise time\nBt=0.7/(tsys*10**-9)                                #max bit rate\n\n\n#Result\nprint'Bt (Max) = %.1f Mbit per sec'%(Bt/10**6)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Bt (Max) = 15.2 Mbit per sec\n"
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.8, page 732"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\npo=-55                          #mean power required at the APD receiver at 35 Mbit s^-1\npo1=-44                         #mean power required at the APD receiver at 400 Mbit s^-1\npi=-3                           #mean power launched from the laser transmitter\nl1=0.4                         #cable fiber loss\nl2=0.1                         #splice losses\nl3=1                            #connector loss \nma=7                            #safety margin\na=0.5 \nacr=2\ndl=1.5\n\n#Calculation \nL1=(pi-po-acr-ma)/a                          #for 35 Mbit s^-1\nL2=(pi-po1-acr-ma)/a                         #for 400 Mbit s^-1\nL3=(pi-po1-acr-dl-ma)/a                      #reduction in the maximum possible link\n\n#Result\nprint'(a) Maximum possible link length (operating at 35 Mbit s^-1) = %d km'%L1\nprint'(b) Maximum possible link length (operating at 400 Mbit s^-1) = %d km'%L2\nprint'(c) Reduction in the maximum possible link length = %d km'%L3",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "(a) Maximum possible link length (operating at 35 Mbit s^-1) = 86 km\n(b) Maximum possible link length (operating at 400 Mbit s^-1) = 64 km\n(c) Reduction in the maximum possible link length = 61 km\n"
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.9, page 734"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\npo=-10                          #mean optical power launched into the fiber from the transmitter (100 \u03bcm)\nrs=-41                          #receiver sensitivity at 20 Mbit s^-1\nl1=7*2.6                        #cabled fiber loss\nl2=6*0.5                        #splice losses\nl3=1*1.5                        #connector loss \nms=6                            #safety margin\n\n#Calculation\nts=po-rs                             #Total system margin\ntsl=l1+l2+l3+ms                      #Total system loss\npm=ts-tsl                            #Excess power margin \n\n#Result\nprint'Total system margin = %d dB'%ts\nprint'Total system loss = %.1f dB'%tsl\nprint'Excess power margin = %.1f dB'%pm\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Total system margin = 31 dB\nTotal system loss = 28.7 dB\nExcess power margin = 2.3 dB\n"
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.10, page 740"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nv=5                                         #output voltage\nh=6.626*10**-34                             #plancks constant\nc=2.998*10**8                               #velocity of light\nk=1.385*10**-23                             #boltzman constant\nt=290                                       #tempreture in kelvin\nzo=100                                      #cable impedance\nn=0.7                                       #quantum efficiency\npi=10**-3                                   #optical power\nlam=0.85*10**-6                             #wavelength\n\n#Calculation\nratio=(v**2*h*c)/(2*k*t*zo*n*pi*lam)        #ratio\nratio1=10*math.log10(ratio)                 #ration in dB\n\n#Result\nprint'Ratio = %d dB'%ratio1",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Ratio = 40 dB\n"
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.11, page 744"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nma=0.8                                      #modulation index\nR=0.5                                       #responsivity\nb=0.7                                       #ratio of luminance to composite video\nsnr=3.162*10**5                             #SNR\ne=1.602*10**-19                             #electron volt\nB=5*10**6                                   #bandwidth\nK=1.385*10**-23                             #boltzman constant  \nT=293                                       #tempreture in kelvin\nFn=1.413\nRl=10**6\n\n#Calculation\na=(2*ma*R*b)**2\nc=snr*2*e*B*R\nd=snr*4*K*T*B*Fn/Rl\nf = (c**2)+(4*a*d)\npo=(c+math.sqrt(f))/(2*a)                  #average incident optical power \npo1=10*math.log10(po*1000)                 #in dB\n\n#Result\nprint'Average incident optical power = %.2f uW'%(po*10**6)\nprint'                               = %.1f dB m'%po1\n\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Average incident optical power = 0.93 uW\n                               = -30.3 dB m\n"
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.12, page 747"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nh=6.626*10**-34                             #plancks constant\nc=2.998*10**8                               #velocity of light\ne=1.602*10**-19                             #1 electron volt\nn=0.6                                       #p\u2013i\u2013n photodiode quantum efficiency\nma=0.5                                      #modulation index\nlam=10**-6                                  #wavelength\nk=1.385*10**-23                             #boltzman constant                          \nt=300                                       #tempreture in kelvin\nf=4                                         #amplifier noise figure\nrl=50*10**3                                 #effective load impedance\nsn=3.162*10**4                              #signal to noise ratio\nB=10**7                                     #bandwidth\n\n#Calculation\na=h*c/(e*n*ma**2*lam)\nb=math.sqrt((8*k*t*f)/rl)\nc=math.sqrt(sn*B)\npo=a*b*c                                     #optical power\npo1=10*math.log10(po*1000)                   #optical power in dB\n\n#Result\nprint'Optical power, Po = %.2f uW'%(po*10**6)\nprint'                  = %.1f dBm'%po1",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Optical power, Po = 7.58 uW\n                  = -21.2 dBm\n"
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.13, page 748"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\npo=-10                          #mean optical power launched into the fiber from the transmitter (100 \u03bcm)\nrs=-25                          #receiver sensitivity \nl1=2*3.5                        #cable fiber loss\nl2=2*0.7                        #splice losses\nl3=1.6                          #connector loss \nms=4.0                           #safety margin\nafc=3.5\nai=0.7\nacr=1.6\nma=7\n\n#Calculation\nts=po-rs                             #Total system margi\ntsl=l1+l2+l3+ms                      #Total system loss\npm=ts-tsl                            #Excess power margin \nL=((0-rs)-(acr+ma))/(afc+ai)\n\n#Result\nprint'(a) Total system margin = %d dB'%ts\nprint'    Total system loss = %.1f dB'%tsl\nprint'    Excess power margin = %.1f dB'%pm\nprint'\\n(b) Increase in link length = %.1f Km'%(L)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "(a) Total system margin = 15 dB\n    Total system loss = 14.0 dB\n    Excess power margin = 1.0 dB\n\n(b) Increase in link length = 3.9 Km\n"
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.14, page 750"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#Variable declaration\nBop=6*10**6\nts=10                                   #rise time for source in ns\ntn=5*9                                 #for fiber intermodal\ntc=5*2                                 #for pulse broadening\ntd=3                                    #for detector\n\n\n#Calculation\ntsys=0.35/Bop\ntsys1=1.1*(ts**2+tn**2+tc**2+td**2)**0.5             #total system rise time\n\n#Result\nprint'Maximum permitted system rise time = %.1f ns'%(tsys*10**9)\nprint'Total system rise time = %.1f ns'%(tsys1)\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Maximum permitted system rise time = 58.3 ns\nTotal system rise time = 52.0 ns\n"
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.15, page 755"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nfd=400*10**3                                      #peak frequency deviation\nBa=4*10**3                                        #bandwidth\n\n#Calculation\nDf=fd/Ba                                            #frequency deviation ratio\nsnr=1.76+(20*math.log10(Df))                        #SNR improvement\nBm=2*(Df+1)*Ba                                      #bandwidth of the FM\u2013IM signal \n \n#Result\nprint'(a) SNR improvement = %.2f dB'%snr\nprint'(b) Frequency deviation ratio = %d'%Df\nprint'    Bandwidth of FM-IM signal = %d kHz'%(Bm/1000)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "(a) SNR improvement = 41.76 dB\n(b) Frequency deviation ratio = 100\n    Bandwidth of FM-IM signal = 808 kHz\n"
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.16, page 757"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nfm=3                                    #output FM ratio\npm=1                                    #output PM ratio\n\n#Calculation\nratio=fm/pm                              #SNR ratio\nratio1=10*math.log10(ratio)              #SNR ratio in dB\n\n#Result\nprint'Ratio of output SNR = %.2f dB'%(ratio1)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Ratio of output SNR = 4.77 dB\n"
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.17, page 759"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nto=5*10**-8                          #nominal pulse period\nfd=5*10**6                           #Peak-to-peak frequency deviation\nM=60                                 #A PD multiplication factor\nR=0.7                                #A PD responsivity\npo=10**-7                            #peak optical power at receiver\ntr=12*10**-9                         #Total system 10\u201390% rise time\nB=6*10**6                            #baseband noise bandwidth\ni=10**-17                            #Receiver mean square noise current\n\n\n#Calculation\nsnp=(3*(to*fd*M*R*po)**2)/(i*(2*math.pi*tr*B)**2)          #peak-to-peak signal to rms noise ratio\nsnp1=10*math.log10(snp)                                    #in dB\n\n#Result\nprint'Peak-to-peak signal to rms noise ratio = %.1f dB'%snp1\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Peak-to-peak signal to rms noise ratio = 62.1 dB\n"
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.18, page 763"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "%pylab inline\nimport math\nfrom pylab import *\nfrom numpy import *\n\n#Variable declaration\nacr=1                                     #connector loss in dB\nafc=5                                     #loss per kilometer in dB\nLbu=0.1                                   #fiber length between each of the access couplers\nLac=1                                     #insertion loss\nLtr=10                                    #loss due to the tap ratio\nLsp=3                                     #splitting loss\n \n#Calculating, we get two equation in terms of N, no of nodes, i.e C(1,N-1)=(3.5*N)+8.5 and C(star)=4.5+(10*log10(N)) \n\n#For Bus distribution system\n\nfor N in range(1,13,1):\n    C=(3.5*N)+8.5;\n    a=plot(N,C,'.r')\n    \n \n#for Star distribution system\n    \nfor N in range(1,30,1):\n    C1=4.5+(10*log10(N));\n    b=plot(N,C1,'.g')\n    \n \n#To show plot in same graph\n#Graphical comparison showing total channel loss against number of nodes\n\nxlabel(\"Number of nodes $N$\")\nylabel(\"Total channel loss $CL$ (dB)\")\ngrid()\nshow(a)\nshow(b)\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Populating the interactive namespace from numpy and matplotlib\n"
      },
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEOCAYAAABmVAtTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVHX6B/DPqCgpJWgxmPprfJmoXIRREbdCpxAsTUQU\nq/UCarLpul1Nrd2Ktq1wU1O77UvXTUqp2LYIWzE1QbEyFbDLamIpWi2gCSheUIHv7w/irCjinMOc\nmTnf+bxfr14xw1yep7N7Hs7znPM9JiGEABEREYA2rg6AiIjcB4sCEREpWBSIiEjBokBERAoWBSIi\nUrAoEBGRwqlFoaqqChMmTED//v0RFBSEL7/8EhUVFYiJiUFgYCBiY2NRVVXlzJCIiOgiTi0KDz30\nEEaNGoV9+/bh66+/Rr9+/ZCWloaYmBgUFxcjOjoaaWlpzgyJiIguYnLWxWsnTpyA1WrFwYMHmzzf\nr18/bN26FWazGWVlZbDZbPjuu++cERIREV2inbO+6NChQ7jhhhswbdo0fPXVVxg0aBCWLl2K8vJy\nmM1mAIDZbEZ5efll7zWZTM4Kk4hIKmr/7nda+6i2thaFhYWYPXs2CgsL0alTp8taRSaT6YoFQAgh\n7T/PPPOMy2NgbsyP+cn3jxZOKwo9evRAjx49EBERAQCYMGECCgsLERAQgLKyMgBAaWkp/P39nRWS\n2ygpKXF1CLqROTeA+Rmd7Plp4bSiEBAQgJ49e6K4uBgAsHnzZgQHB2PMmDFIT08HAKSnpyM+Pt5Z\nIRER0SWcNlMAgFdeeQWTJk3C+fPn0bt3b7z55puoq6vDxIkTsWrVKlgsFmRmZjozJLeQnJzs6hB0\nI3NuAPMzOtnz08JpZx+1hslk0twfIyLyVFr2nbyi2Q3k5eW5OgTdyJwbwPyMT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c+ZMpXXUUrFqLtaWPuuee+5BWFgY\n/P39ld/379//ijF/8803ePzxx5UjpjfeeKPJ923ZsgWpqak4d+4cJkyYAKChlda1a9crxkyejUtn\nExGRgu0jIiJSsCgQEZGCRYGIiBQsCkREpGBRICIiBYsCEREpWBSIiEjBokBERIr/B5KTkPe2LreW\nAAAAAElFTkSuQmCC\n",
       "text": "<matplotlib.figure.Figure at 0x3f7ea90>"
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.19, page 782"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#Variable declaration\nh=6.626*10**-34                             #plancks constant\nc=2.998*10**8                               #velocity of light\nlam=1.55*10**-6                             #wavelength\nL=100*10**3                                 #length\nK=4                                         \nB=1.2*10**9                                 #bandwidth\nsnr=50                                      #SNR\na=10**-2.5\npi=10**-3\n\n#Calculation\nLt=(pi*lam*a*L)/(K*h*c*B*snr)                #link with a large number of cascaded amplifiers\n\n#Result\nprint'Maximum system length = %d x 10^4 km'%(Lt/10**7)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Maximum system length = 1 x 10^4 km\n"
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.21, page 791"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nb=17                                     #second-order dispersion coefficient for the latter path\nL2=20                                    #path length in km\nL1=160.00                                   #path length in km\ns1=-0.075                                #dispersion slope\n\n#Calculation\na=-b*L2\nG=a/L1                                   #second-order dispersion coefficient\ns2=s1*L1/L2                              #chromatic dispersion slope\n\n#Result\nprint'(a) Second-order dispersion coefficient = %.3f ps nm^-1 km^-1'%G \nprint'(b) chromatic dispersion slope = %.1f ps nm^-2 km^-1'%s2",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "(a) Second-order dispersion coefficient = -2.125 ps nm^-1 km^-1\n(b) chromatic dispersion slope = -0.6 ps nm^-2 km^-1\n"
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.22, page 798"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nto=70*10**-12                                       #bit period\nt=6*10**-12                                         #RZ pulse width\nB2=50*10**-12*10**-12*10**-3                        #second-order dispersion coefficient\nL=50*10**3                                          #amplifier spacing\n\n#Calculation\nqo=0.5*to/t                                          #separation of the soliton pulses \nBt=(2*qo*math.sqrt(B2*L))**-1                        #transmission bit rate \n\n#Result\nprint'(a) Separation = %.1f'%qo\nprint'(b) Transmission bit rate = %.2f x 10^9'%(Bt*10**-8)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "(a) Separation = 5.8\n(b) Transmission bit rate = 17.14 x 10^9\n"
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.23, page 799"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#Variable declaration\nto=40*10**-12                             #bit period\nt=4*10**-12                               #RZ pulse width\na=0.2*10**-3                              #attenuation coefficient\nB2=1.25*10**-12*10**-12*10**-3            #second-order dispersion coefficient\n\n#Calculation\nqo=0.5*to/t                            #separation of the soliton pulses \nb=1/(2*qo)\nc=math.sqrt(a/B2)\nBt=b*c                                  #transmission bit rate \n\n#Result\nprint'(a) Separation = %.1f'%qo\nprint'(b) Transmission bit rate = %.2f x 10^10 bit s^-1'%(Bt*10**-10)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "(a) Separation = 5.0\n(b) Transmission bit rate = 4.00 x 10^10 bit s^-1\n"
      }
     ],
     "prompt_number": 22
    }
   ],
   "metadata": {}
  }
 ]
}