summaryrefslogtreecommitdiff
path: root/Optical_Fiber_Communication_by_R._R._Dudeja/Chapter10_1.ipynb
blob: 22b4a658bc344861e6d30bbda163b0011530a3f1 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:cf07634df992def504a143e6666719b95350cb053657de1ded2573417a8b0796"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10 : Optical Fiber System-II"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1: PgNo-505"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variable initialisation\n",
      "r=30.8*math.pow(10,-12) # electro optice coefficient in m/V\n",
      "L=3*math.pow(10,-2) # length in m\n",
      "y=1.3*math.pow(10,-6) # wavelength in m\n",
      "n=2.1\n",
      "d=30*math.pow(10,-6) # distance between the electrodes in m\n",
      "V=(y*d)/(math.pow(n,3)*r*L) # voltage required to have a pi radian phase change in volt\n",
      "\n",
      "# Results\n",
      "print ('%s %.3f %s' %(\" The voltage required to have a pi radian phase change  = \",V,\"volt\"))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The voltage required to have a pi radian phase change  =  4.558 volt\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2: PgNo-511"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable initialisation\n",
      "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",
      "\n",
      "# Results\n",
      "print ('%s %.f %s' %(\" The total channel loss = \",CL,\"dB\"))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The total channel loss =  31 dB\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3: PgNo-517"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# variable initialisation\n",
      "p=0.5*math.pow(10,-9) # pulse broadening in s/km\n",
      "L=12 # length in km\n",
      "\n",
      "# calculations\n",
      "Pt=p*math.sqrt(L) # with mode coupling, the total rms broadening in s\n",
      "BT=20*math.pow(10,6)\n",
      "DL=2*pow((2*Pt*BT*math.sqrt(2)),4) # dispersion equalization penalty in dB\n",
      "Pt1=p*L # without mode coupling, the total rms broadening in s\n",
      "DL1=2*math.pow((2*Pt1*BT*math.sqrt(2)),4) # without mode coupling, equalization penalty in dB\n",
      "DL2=2*math.pow((2*Pt1*150*math.pow(10,6)*math.sqrt(2)),4) # without mode coupling,dispersion equalization penalty with 125 Mb/s\n",
      "DL3=2*math.pow((2*Pt*125*math.pow(10,6)*math.sqrt(2)),4) # with mode coupling,dispersion equalization penalty with 125 Mb/s\n",
      "\n",
      "# Results\n",
      "print ('%s %.2f %s' %(\" With mode coupling, the total rms broadening = \",Pt*pow(10,9),\"ns\"))\n",
      "print ('%s %.2f %s' %(\"\\n The dispersion equalization penalty = \",DL*pow(10,4),\"dB\"))\n",
      "print ('%s %.f %s' %(\"\\n without mode coupling, the total rms broadening = \",Pt1*pow(10,9),\"dB\"))\n",
      "print ('%s %.3f %s' %(\"\\n without mode coupling, equalization penalty = \",DL1,\"dB\"))\n",
      "print ('%s %.2f %s' %(\"\\n without mode coupling,dispersion equalization penalty with 125 Mb/s = \",DL2,\"dB\"))\n",
      "print ('%s %.2f %s' %(\"\\n with mode coupling,dispersion equalization penalty with 125 Mb/s = \",DL3,\"dB\"))\n",
      "print (\"\\n The answer is wrong in the textbook\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "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 dB\n",
        "\n",
        " without mode coupling, equalization penalty =  0.027 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"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Example 4: PgNo-522"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variable initialisation\n",
      "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",
      "\n",
      "# Results\n",
      "print ('%s %.2f %s' %(\" The length when system operating at 25 Mbps = \",L,\"km\"))\n",
      "print ('%s %.2f %s' %(\"\\n The length when system operating at 350 Mbps = \",L1,\"km\"))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "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"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5: PgNo-526"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# variable initialisation\n",
      "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",
      "\n",
      "# Results\n",
      "print ('%s %.1f %s' %(\" The fider loss = \",fl,\"dB\"))\n",
      "print ('%s %.2f %s' %(\"\\n The total splicing loss = \",tl,\"dB\"))\n",
      "print ('%s %.1f %s' %(\"\\n The fangle effects & future splice = \",ae,\"dB\"))\n",
      "print ('%s %.2f %s' %(\"\\n The total attenuation = \",ta,\"dB\"))\n",
      "print ('%s %.1f %s' %(\"\\n The excess power margin = \",Ep,\"dB\"))\n",
      "print (\"\\n Hence the system can operate with small excess power margin \")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The fider loss =  20.0 dB\n",
        "\n",
        " The total splicing loss =  3.20 dB\n",
        "\n",
        " The fangle effects & future splice =  5.0 dB\n",
        "\n",
        " The total attenuation =  29.20 dB\n",
        "\n",
        " The excess power margin =  2.8 dB\n",
        "\n",
        " Hence the system can operate with small excess power margin \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6: PgNo-529"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# variable initialisation\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.0\n",
      "L=(Ps-Pr-Ls-4*Lc-(10*math.log(N))/math.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*math.log(N1))/math.log(10)-sm)/(2*af) # max transmission length in km when reflection star coupler is used\n",
      "\n",
      "# Results\n",
      "print ('%s %.2f %s' %(\" The max transmission length when transmission star coupler is used = \",L,\"km\"))\n",
      "print ('%s %.2f %s' %(\"\\n The max transmission length when reflection star coupler is used = \",L1,\"km\"))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "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"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7: PgNo-531"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# variable declaration\n",
      "y=860*math.pow(10,-9) # wavelength in m\n",
      "L=5000 # length in m\n",
      "X=0.024\n",
      "dy=20*math.pow(10,-9) # spectral width in m\n",
      "dts=6*math.pow(10,-9) # silica optical link rise time in s\n",
      "dtr=8*math.pow(10,-9) # detector rise in s\n",
      "c=3*math.pow(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*math.pow(10,-12) # intermodel dispersion in s/m\n",
      "dti=id*L # intermodel dispersion delay time\n",
      "dtsy=math.sqrt(math.pow(dts,2)+math.pow(dtr,2)+math.pow(dtm,2)+math.pow(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",
      "\n",
      "# Results\n",
      "print ('%s %.2f %s' %(\" The system rise time = \",dtsy*pow(10,9),\"ns\"))\n",
      "print ('%s %.2f %s' %(\"\\n The max bit rate for NRZ coding = \",Br_max/pow(10,6),\"Mbit/s\"))\n",
      "print ('%s %.2f %s' %(\"\\n The max bit rate for RZ coding = \",Br_max1/pow(10,6),\"Mbit/s\"))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "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"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8: PgNo-533"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#variable declaration\n",
      "Br=50*math.pow(10,6) # data rate in b/s\n",
      "c=3*math.pow(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*math.pow(n1,2))/(2*n1*n12*Br) # transmission distance for GRIN fiber\n",
      "\n",
      "# Results\n",
      "print ('%s %.3f %s' %(\" The transmission distance for Si fiber = \",L_si,\"m\"))\n",
      "print ('%s %.f %s' %(\"\\n The transmission distance for GRIN fiber = \",L_GI,\"m\"))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The transmission distance for Si fiber =  71.429 m\n",
        "\n",
        " The transmission distance for GRIN fiber =  420 m\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9: PgNo-537"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initialisation of variables\n",
      "Br=20*math.pow(10,6) # data rate in b/s\n",
      "c=3*math.pow(10,8)# speed of light in m/s\n",
      "y=86*math.pow(10,-9)# wavelength in m\n",
      "dy=30*math.pow(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",
      "\n",
      "# Results\n",
      "print ('%s %.3f %s' %(\" The material dispersion limited transmission distance = \",Lmax,\"m\"))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The material dispersion limited transmission distance =  627.083 m\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10: PgNo-543"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# variable declaration\n",
      "y=860*math.pow(10,-9) # wavelength in m\n",
      "c=3*math.pow(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.0 # loss a in dB/m\n",
      "Pr=-65 # receiver power in dB\n",
      "Pt=-5 #transmitted power in dB\n",
      "dy=30*math.pow(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",
      "\n",
      "# Results\n",
      "print ('%s %.2f %s' %(\" The material dispersion limited distance = \",Lmax/pow(10,10),\"*10^10*1/Br m\"))\n",
      "print ('%s %.1f %s' %(\"\\n The model dispersion limited distance = \",L_GI/pow(10,10),\"*10^10*1/Br m\"))\n",
      "print ('%s %.f %s' %(\"\\n The attenuation limited distance = \",L_At/pow(10,3),\"-20log(Br) km\"))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The material dispersion limited distance =  12.54 *10^10*1/Br m\n",
        "\n",
        " The model dispersion limited distance =  2.1 *10^10*1/Br m\n",
        "\n",
        " The attenuation limited distance =  60 -20log(Br) km\n"
       ]
      }
     ],
     "prompt_number": 10
    }
   ],
   "metadata": {}
  }
 ]
}