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
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Ch-4 : Attenuation and Absorption in Optical Fiber"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.1 Pg: 138"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The signal attenuation =16.99 dB\n",
"\n",
" The signal attenuation per km =2.83 dB/km\n",
"\n",
" The trgth =22.65 km\n",
"\n",
" The overall signal attenuation =29.65 dB\n",
"\n",
" The i/p o/p power ratio =870.96 \n"
]
}
],
"source": [
"from math import sqrt,pi,log\n",
"from __future__ import division\n",
"Pi=100*10**-6## mean optical power in watt\n",
"Po=2*10**-6## output mean power in watt\n",
"L=6## length in km\n",
"L1=8## length in km\n",
"As=10*log(Pi/Po)/log(10)## signal attenuation in dB\n",
"as1=As/L## signal attenuation per km\n",
"Li=as1*L1## Loss incurred along 8 km\n",
"Ls=7## Loss due to splice in dB\n",
"as2=Li+Ls## overall signal attenuation in dB\n",
"As2=29.4## aprox. overall signal attenuation in dB\n",
"Pio=10**(As2/10)## i/p o/p power ratio\n",
"print \"The signal attenuation =%0.2f dB\"%(As)#\n",
"print \"\\n The signal attenuation per km =%0.2f dB/km\"%( as1)#\n",
"print \"\\n The trgth =%0.2f km\"%( Li)#\n",
"print \"\\n The overall signal attenuation =%0.2f dB\"%( as2)#\n",
"print \"\\n The i/p o/p power ratio =%0.2f \"%( Pio)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.2 Pg: 138"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The max possible link Length =57.50 km\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"Pi=1.5*10**-3## mean optical power in watt\n",
"Po=2*10**-6## output mean power in watt\n",
"a=0.5## dB/km\n",
"L=(10*log(Pi/Po)/log(10))/a## max possible link Length in km\n",
"print \"The max possible link Length =%0.2f km\"%( L)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.3 Pg: 138"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Loss of an optical fiber =1.57 dB/km\n",
"\n",
" The Loss of an optical fiber =0.14 dB/km\n",
"\n",
" The Loss of an optical fiber =0.29 dB/km\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"n=1.46## core refractive index\n",
"p=0.286## photoelastic coeff\n",
"b=7*10**-11## isothermal compressibility\n",
"k=1.381*10**-23## boltzmann's constant\n",
"tf=1400## fictive temperature in k\n",
"y1=0.85*10**-6## wavelength in m\n",
"yr=((8*pi**3)*(n**8)*(p**2)*(b*k*tf))/(3*y1**4)#\n",
"e=2.718281828#\n",
"akm=e**(-yr*10**3)#\n",
"at=10*log(1/akm)/log(10)## attenuation at y=0.85 um\n",
"y2=1.55*10**-6## wavelength in m\n",
"yr1=((8*pi**3)*(n**8)*(p**2)*(b*k*tf))/(3*y2**4)#\n",
"akm1=e**(-yr1*10**3)#\n",
"at1=10*log(1/akm1)/log(10)## attenuation at y=1.55 um\n",
"y3=1.30*10**-6## wavelength in m\n",
"yr2=((8*pi**3)*(n**8)*(p**2)*(b*k*tf))/(3*y3**4)#\n",
"akm2=e**(-yr2*10**3)#\n",
"at2=10*log(1/akm2)/log(10)## attenuation at y=1.30 um\n",
"print \"The Loss of an optical fiber =%0.2f dB/km\"%( at)#\n",
"print \"\\n The Loss of an optical fiber =%0.2f dB/km\"%( at1)#\n",
"print \"\\n The Loss of an optical fiber =%0.2f dB/km\"%( at2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.4 Pg: 139"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The threshold power for SBS =76 mw\n",
"\n",
" The threshold power for SRS =1.65 W\n"
]
}
],
"source": [
"from __future__ import division\n",
"d=6## core diameter in m\n",
"y=1.55## wavelength in m\n",
"a=0.5## attenuation in dB/km\n",
"v=0.4#\n",
"Pb=4.4*10**-3*d**2*y**2*a*v## threshold power for SBS\n",
"Pr=5.9*10**-2*d**2*y*a## threshold power for SRS\n",
"print \"The threshold power for SBS =%d mw\"%( Pb*10**3)#\n",
"print \"\\n The threshold power for SRS =%0.2f W\"%( Pr)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.5 Pg: 139"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The critical radius of curvature for multimode fiber =9.46 um\n",
"\n",
" The critical radius of curvature for a single mode fiber =29.26 um\n"
]
}
],
"source": [
"from math import sqrt,pi\n",
"from __future__ import division\n",
"n1=1.46## core refractive index\n",
"dl=0.03## relative refractive index difference\n",
"y=0.85*10**-6## operating wavelength in m\n",
"a=4*10**-6## core radous in m\n",
"n2=sqrt(n1**2-2*dl*n1**2)## cladding refractive index\n",
"Rc=(3*n1**2*y)/(4*pi*(n1**2-n2**2)**1.5)## critical radius of curvature for multimode fiber\n",
"Dl=0.003## relative refractive index difference\n",
"N2=sqrt(n1**2-2*Dl*n1**2)## \n",
"yc=(2*pi*a*n1*(2*Dl)**0.5)/2.405## cut off wavelength in m\n",
"y1=1.55*10**-6## operating wavelength in m\n",
"Rcs=(20*y1*(2.748-0.996*(y1/yc))**-3)/(0.005)**1.5## critical radius of curvature for a single mode fiber\n",
"print \"The critical radius of curvature for multimode fiber =%0.2f um\"%( Rc*10**6)##\n",
"print \"\\n The critical radius of curvature for a single mode fiber =%0.2f um\"%( Rcs*10**3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.6 Pg: 139"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The macrobend loss = 14.22 dB\n",
"\n",
" The answer is wrong in the textbook\n"
]
}
],
"source": [
"from sympy import log,N\n",
"from __future__ import division\n",
"x=2## index profile\n",
"dl=0.0126## index difference\n",
"a=(85/2)*10**-6## core radius\n",
"R=2*10**-3## curve of radius\n",
"n1=1.45## core refractive index\n",
"k=6.28#\n",
"y=850*10**-9## wavelength in m\n",
"A=(x+2)/(2*x*dl)#\n",
"B=(2*a/R)#\n",
"C=(3*y/(2*k*R*n1))**(2/3)#\n",
"D=B+C#\n",
"E=A*D#\n",
"F=1-E#\n",
"Lm=-10*log(1-A*(B+C))/log(10)## macrobend loss in dB\n",
"print \"The macrobend loss = \",abs(N(Lm,4)),\"dB\"#\n",
"print \"\\n The answer is wrong in the textbook\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.7 Pg: 140"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Loss of an optical fiber =22 dB\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"Pi=15## optical power in uw\n",
"Po=7## ouput power in uw\n",
"L=0.15## length in km\n",
"Ls=(10*log(Pi/Po)/log(10))/L## Loss of an optical fiber in dB\n",
"print \"The Loss of an optical fiber =%d dB\"%( Ls)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.8 Pg: 140"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The signal attenuation per km =0.80 dB/km\n",
"\n",
" The overall signal attenuation=14.11 dB \n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"Pi=200*10**-6## average optical power in watt\n",
"Po=5*10**-6## average output power in watt\n",
"L=20## in km\n",
"L1=12## in km\n",
"ns=5## number of attenuation\n",
"a=0.9## attenuation in dB\n",
"sa=10*log(Pi/Po)/log(10)## signal attenuation\n",
"sp=sa/L## signal attenuation per km\n",
"sn=sp*L1## signal attenuation for 12 km\n",
"sn1=ns*a## attenuation in dB\n",
"sn2=sn+sn1## overall signal attenuation in dB\n",
"print \"The signal attenuation per km =%0.2f dB/km\"%( sp)#\n",
"print \"\\n The overall signal attenuation=%0.2f dB \"%( sn2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.9 Pg: 141"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The signal attenuation=13.98 dB\n",
"\n",
" The signal attenuation per km =2.33 dB/km\n",
"\n",
" The overall signal attenuation=32 dB \n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"Pi=100*10**-6## average optical power in watt\n",
"Po=4*10**-6## average output power in watt\n",
"L=6## in km\n",
"L1=10## in km\n",
"sa=10*log(Pi/Po)/log(10)## signal attenuation\n",
"sp=sa/L## signal attenuation per km\n",
"sn=sp*L1## signal attenuation for 12 km\n",
"sn1=sn+9## overall signal attenuation in dB\n",
"print \"The signal attenuation=%0.2f dB\"%( sa)#\n",
"print \"\\n The signal attenuation per km =%0.2f dB/km\"%( sp)#\n",
"print \"\\n The overall signal attenuation=%d dB \"%( sn1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.10 Pg: 141"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The signal Loss =4.26 dB\n",
"\n",
" The signal Loss per km=0.28 dB/km\n",
"\n",
" The overall signal attenuation=37.52 dB\n",
"\n",
" The input output power ratio=75.16\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"Pi=20*10**-6## average optical power in watt\n",
"Po=7.5*10**-6## average output power in watt\n",
"sl=10*log(Pi/Po)/log(10)## signal Loss in dB\n",
"L=15## in km\n",
"L1=30## in km\n",
"ns=29## number of attenuation\n",
"sp=sl/L## signal Loss per km\n",
"sn=sp*L1## signal attenuation for 30 km\n",
"sn1=sn+ns## overall signal attenuation in dB\n",
"i_o=10**(sn1/20)## input output power ratio\n",
"print \"The signal Loss =%0.2f dB\"%( sl)#\n",
"print \"\\n The signal Loss per km=%0.2f dB/km\"%( sp)#\n",
"print \"\\n The overall signal attenuation=%0.2f dB\"%( sn1)#\n",
"print \"\\n The input output power ratio=%0.2f\"%( i_o)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.11 Pg: 142"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Attenuation=0.82 dB/km\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"Tf=1400## temperature in k\n",
"Bc=7*10**-11## in m**2/N\n",
"n=1.38## \n",
"P=0.29## Photoelastic coefficient\n",
"y=0.9*10**-6## wavelength in m\n",
"K=1.38*10**-23## boltzman's constant\n",
"Rrs=((8*pi**3)*(n**8)*(P**2)*(Bc*Tf*K))/(3*y**4)#\n",
"Rrs1=Rrs/10**-3## per km\n",
"e=2.718281828## Exponential term\n",
"Lkm=e**(-Rrs1)## transmission loss facter\n",
"At=10*log(1/Lkm)/log(10)## Attenuation in dB/km\n",
"print \"The Attenuation=%0.2f dB/km\"%( At)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.12 Pg: 142"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The ratio of threshold power level=4.53 %\n"
]
}
],
"source": [
"from __future__ import division\n",
"y=1.35## wavelength in um\n",
"d=5## core diamater in um\n",
"a=0.75## attenuation in dB/km\n",
"v=0.45## bandwidth in GHz\n",
"Pb=4.4*10**-3*(d**2)*(y**2)*(a*v)## threshold optical power for sbs\n",
"Pr=5.9*10**-2*(d**2)*(y)*(a)## threshold optical power for sbr\n",
"Pbr=Pb/Pr## the ratio of threshold power level\n",
"print \"The ratio of threshold power level=%0.2f %%\"%( Pbr*100)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.13 Pg: 143"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The critical radius of curvature =11.21 um\n"
]
}
],
"source": [
"from math import log,pi,sqrt\n",
"from __future__ import division\n",
"n1=1.5## core refractive index\n",
"y=0.85*10**-6## wavelength in m\n",
"dl=0.024## relative refractive index difference\n",
"N2=sqrt(n1**2-2*dl*n1**2)## cladding refractive index\n",
"n2=1.46#\n",
"Rcs=(3*n1**2*y)/((4*pi)*(n1**2-n2**2)**1.5)## critical radius of curvature for multimode fiber\n",
"print \"The critical radius of curvature =%0.2f um\"%( Rcs*10**6)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.14 Pg: 143"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The critical radius of curvature for single mode fiber =46.89 um\n",
"\n",
" The answer is wrong in the textbook\n",
"\n",
" The critical radius of curvature for multimode fiber =16.80 um\n"
]
}
],
"source": [
"from math import log,pi,sqrt\n",
"from __future__ import division\n",
"n1=1.45## core refractive index\n",
"y=1.5*10**-6## wavelength in m\n",
"dl=0.03## relative refractive index difference\n",
"a=5*10**-6## core radius\n",
"n2=sqrt(n1**2-2*dl*n1**2)## cladding refractive index\n",
"yc=(2*pi*a*n1*sqrt(2*dl))/(2.405)#\n",
"Rcs=(20*y*(2.748-0.996*(y/yc))**-3)/(n1**2-n2**2)**1.5## critical radius of curvature for single mode fiber\n",
"Rcs1=(3*n1**2*y)/((4*pi)*(n1**2-n2**2)**1.5)## critical radius of curvature for multimode fiber\n",
"print \"The critical radius of curvature for single mode fiber =%0.2f um\"%( Rcs*10**6)#\n",
"print \"\\n The answer is wrong in the textbook\"#\n",
"print \"\\n The critical radius of curvature for multimode fiber =%0.2f um\"%( Rcs1*10**6)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.15 Pg: 144"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Loss =12.04 dB/km\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"L=500/1000## distance in km\n",
"Pio=(1/(1-0.75))#\n",
"Ls=10*log(Pio)/log(10)/L## Loss in dB/km\n",
"print \"The Loss =%0.2f dB/km\"%( Ls)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.16 Pg: 144"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The power level =0.56 mW\n"
]
}
],
"source": [
"from __future__ import division\n",
"L=5## length in km\n",
"a=0.5## attenuaion loss in dB/km\n",
"Po=10**-3*10**(-(a*L)/10)## power level in mW\n",
"print \"The power level =%0.2f mW\"%( Po*10**3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.17 Pg: 144"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Loss =2.22 dB/km\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"L=1## distance in km\n",
"Pio=(1/(1-0.40))#\n",
"Ls=10*log(Pio)/log(10)/L## Loss in dB/km\n",
"print \"The Loss =%0.2f dB/km\"%( Ls)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.18 Pg: 145"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The transmission length =2.50 km\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"Pi=1*10**-3## input power in watt\n",
"Po=0.75*10**-3## output power in watt\n",
"a=0.5## in dB/km\n",
"L=(10*log(Pi/Po)/log(10))/a## transmission length in km\n",
"print \"The transmission length =%0.2f km\"%( L)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.19 Pg: 145"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The mode field diameter =11.63 um\n",
"\n",
" The macrobend loss =127.25 dB\n",
"\n",
" The answer is wrong in the textbook\n"
]
}
],
"source": [
"from math import pi\n",
"from sympy import log,N\n",
"from __future__ import division\n",
"y=1300*10**-9## wavelemgth in m\n",
"yc=1200*10**-9## cut off wavelength in m\n",
"rc=5*10**-6## core diameter in m\n",
"n=1.5## refractive index\n",
"R=1.2/100## curve of radius in m\n",
"dmf=2*rc*((0.65)+0.434*(y/yc)**1.5+0.0149*(y/yc)**6)## mode field diameter\n",
"K=(2*pi)/y#\n",
"Lm=-10*log(1-(K**4)*(n**4)*((3.95*10**-6)/(8*R**2))**6)/log(10)## macrobend loss\n",
"print \"The mode field diameter =%0.2f um\"%( dmf*10**6)#\n",
"print \"\\n The macrobend loss =%0.2f dB\"%abs(N(Lm,4))\n",
"print \"\\n The answer is wrong in the textbook\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:4.20 Pg: 146"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The transmission length =-6.46 km\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"Pi=10*10**-3## input power in watt\n",
"Po=8*10**-3## output power in watt\n",
"L=0.150## length in km\n",
"Ls=(10*log(Po/Pi)/log(10))/L#\n",
"print \"The transmission length =%0.2f km\"%( Ls)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|