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
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Ch-7 : .Optical Fiber Connection : Connectors, Joints and Couplers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.1 Pg: 311"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The fiber loss =0.13 db\n",
"\n",
" there is a similar loss at the other interface\n",
"\n",
" The total fiber loss =0.26 db\n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"n1=1.46## core refractive index\n",
"n=1## refractive index due to air\n",
"r=((n1-n)/(n1+n))**2#\n",
"r1=0.03## r take upto two decimal place\n",
"l_s=-10*log(1-r1)/log(10)## fiber loss in db\n",
"l_t=2*l_s## total loss in db\n",
"print \"The fiber loss =%0.2f db\"%( l_s)#\n",
"print \"\\n there is a similar loss at the other interface\"#\n",
"print \"\\n The total fiber loss =%0.2f db\"%( l_t)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.2 Pg: 311"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The coupling efficiency for multimode step index fiber =0.86\n",
"\n",
" The insertion loss for lateral misalignment =0.65 dB\n",
"\n",
" The coupling efficiency when there is no air gap =0.92\n",
"\n",
" The insertion loss for lateral misalignment when there is no air gap =0.34 dB\n"
]
}
],
"source": [
"from math import log,pi,acos\n",
"from __future__ import division\n",
"n1=1.46## core refractive index\n",
"n=1## refractive index due to air\n",
"a=25*10**-6## core radius in m\n",
"y=3*10**-6## in m\n",
"A=(y/a)*(1-(y/(2*a))**2)**0.5#\n",
"B=acos(y/(2*a))#\n",
"C=n1/n#\n",
"M=(16*C**2)/(pi*(1+C)**4)#\n",
"n_lat=M*(2*B-A)## coupling efficiency for multimode step index fiber\n",
"L_lat=-10*log(n_lat)/log(10)## insertion loss for lateral misalignment\n",
"n_lat1=(1/pi)*(2*B-A)## coupling efficiency when there is no air gap\n",
"L_lat1=-10*log(n_lat1)/log(10)## insertion loss for lateral misalignment when there is no air gap\n",
"print \"The coupling efficiency for multimode step index fiber =%0.2f\"%( n_lat)#\n",
"print \"\\n The insertion loss for lateral misalignment =%0.2f dB\"%( L_lat)#\n",
"print \"\\n The coupling efficiency when there is no air gap =%0.2f\"%( n_lat1)#\n",
"print \"\\n The insertion loss for lateral misalignment when there is no air gap =%0.2f dB\"%( L_lat1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.3 Pg: 311"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The total insertion loss =1.15 dB\n",
"\n",
" the answer is wrong in the textbook\n"
]
}
],
"source": [
"from math import log,acos,pi,sqrt\n",
"from __future__ import division\n",
"n1=1.50## core refractive index\n",
"n=1## refractive index due to air\n",
"a=25*10**-6## core radius in m\n",
"y=4*10**-6## in m\n",
"A=(y/a)*(1-(y/(2*a))**2)**0.5#\n",
"B=acos(y/(2*a))#\n",
"C=n1/n#\n",
"M=(16*C**2)/(pi*(1+C)**4)#\n",
"n_lat=M*(2*B-A)## coupling efficiency for multimode step index fiber\n",
"L_lat=-10*log(n_lat)/log(10)## insertion loss for lateral misalignment\n",
"dx=4*(3.14/180)## angular misalignment in radian\n",
"dl=0.02## relative index difference\n",
"NA=n1*sqrt(2*dl)## numerical aperture\n",
"n_ang=1-(0.069/(3.14*NA))## coupling efficiency due to angular misalignment\n",
"L_ang=-10*log(n_ang)/log(10)## loss due to angular misalignment\n",
"Lt=L_lat+L_ang## total insertion loss in dB\n",
"print \"The total insertion loss =%0.2f dB\"%( Lt)#\n",
"print \"\\n the answer is wrong in the textbook\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.4 Pg: 312"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The insertion loss when there is a smsll air gap =0.65 dB\n",
"\n",
" The insertion loss when the joint is indexed matched =0.34 dB\n"
]
}
],
"source": [
"from math import log,acos,pi,sqrt\n",
"from __future__ import division\n",
"n1=1.46## core refractive index\n",
"n=1## refractive index due to air\n",
"a=1## core radius in m\n",
"y=0.12## lateral offset\n",
"A=(y/a)*(1-(y/(2*a))**2)**0.5#\n",
"B=acos(y/(2*a))#\n",
"C=n1/n#\n",
"M=(16*C**2)/(pi*(1+C)**4)#\n",
"n_lat=M*(2*B-A)## coupling efficiency when there is a smsll air gap\n",
"L_lat=-10*log(n_lat)/log(10)## insertion loss when there is a smsll air gap\n",
"n_lat1=(1/pi)*(2*B-A)## coupling efficiency when the joint is indexed matched\n",
"L_lat1=-10*log(n_lat1)/log(10)## insertion loss when the joint is indexed matched\n",
"print \"The insertion loss when there is a smsll air gap =%0.2f dB\"%( L_lat)#\n",
"print \"\\n The insertion loss when the joint is indexed matched =%0.2f dB\"%( L_lat1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.5 Pg: 313"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The total coupling efficiency in the frw direction =0.52\n",
"\n",
" The total loss at the joint in the frw direction =2.81 dB\n",
"\n",
" In the backward direction n_cd & n_a are all unity therefore there will be no loss in the backward direction of transmission of the signal \n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"d1=60*10**-6## core diameter of fiber 1 in m\n",
"d2=50*10**-6## core diameter of fiber 1 in m\n",
"NA1=0.25## numerical aerture of fiber 1\n",
"NA2=0.22## numerical aerture of fiber 2\n",
"a1=2.0## for fiber 1\n",
"a2=1.9## for fiber 2\n",
"n_cd=(d2/d1)**2#\n",
"n_NA=(NA2/NA1)**2#\n",
"n_a=(1+(2/a1))/(1+(2/a2))#\n",
"n_t=n_cd*n_NA*n_a## total coupling efficiency\n",
"Lt=-10*log(n_t)/log(10)## total loss at the joint in dB\n",
"print \"The total coupling efficiency in the frw direction =%0.2f\"%( n_t)#\n",
"print \"\\n The total loss at the joint in the frw direction =%0.2f dB\"%( Lt)#\n",
"print \"\\n In the backward direction n_cd & n_a are all unity therefore there will be no loss in the backward direction of transmission of the signal \""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.6 Pg: 313"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The total loss at the joint in the frw direction =4.22 dB\n",
"\n",
" The total loss at the joint in the backward direction =0.22 dB\n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"d1=80*10**-6## core diameter of fiber 1 in m\n",
"d2=60*10**-6## core diameter of fiber 1 in m\n",
"NA1=0.25## numerical aerture of fiber 1\n",
"NA2=0.20## numerical aerture of fiber 2\n",
"a1=1.9## for fiber 1\n",
"a2=2.1## for fiber 2\n",
"n_cd=(d2/d1)**2#\n",
"n_NA=(NA2/NA1)**2#\n",
"n_a=(1+(2/a1))/(1+(2/a2))#\n",
"n_t=n_cd*n_NA*n_a## total coupling efficiency in the frw direction\n",
"Lt=-10*log(n_t)/log(10)## total loss at the joint in the frw direction in dB\n",
"n_cd1=1#\n",
"n_NA1=1#\n",
"n_a1=(1+(2/a2))/(1+(2/a1))#\n",
"n_t1=n_cd1*n_NA1*n_a1## total coupling efficiency in the backward direction\n",
"Lt1=-10*log(n_t1)/log(10)## total loss at the joint in the backward direction in dB\n",
"print \"The total loss at the joint in the frw direction =%0.2f dB\"%( Lt)#\n",
"print \"\\n The total loss at the joint in the backward direction =%0.2f dB\"%( Lt1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.7 Pg: 314"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The insertion loss of the splice =0.35 dB\n"
]
}
],
"source": [
"from math import log,acos,pi\n",
"from __future__ import division\n",
"n1=1.5## core refractive index\n",
"n=1.47## refractive index due to air\n",
"a=1## core radius in m\n",
"y=0.12## lateral offset\n",
"A=(y/a)*(1-(y/(2*a))**2)**0.5#\n",
"B=acos(y/(2*a))#\n",
"C=n1/n#\n",
"M=(16*C**2)/(pi*(1+C)**4)#\n",
"n_lat=M*(2*B-A)## coupling efficiency of the splice\n",
"L_lat=-10*log(n_lat)/log(10)## insertion loss of the splice\n",
"print \"The insertion loss of the splice =%0.2f dB\"%( L_lat)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.8 Pg: 315"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The refractive index of the fiber core =1.51\n"
]
}
],
"source": [
"from math import pi,sqrt\n",
"from __future__ import division\n",
"L_f=0.036#\n",
"n_f=10**(-0.036)#\n",
"# here we get a quadratic equation in n1 and on solving we get\n",
"n1=(2.17+sqrt((-2.17)**2-4*1*1))/2## refractive index of the fiber core\n",
"print \"The refractive index of the fiber core =%0.2f\"%( n1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.9 Pg: 315"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The numerical aperture =0.34\n"
]
}
],
"source": [
"from math import pi\n",
"from __future__ import division\n",
"n1=1.46## core refractive index\n",
"n=4## refractive index due to air\n",
"x=pi/180#\n",
"A=(16*n1**2)/((1+n1)**4)#\n",
"B=n*x#\n",
"n_ang=10**(-0.06)## angular coupling efficiency\n",
"NA=B/((pi)*(1-(n_ang/A)))## numerical aperture\n",
"print \"The numerical aperture =%0.2f\"%( NA)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.10 Pg: 316"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The insertion loss =0.81 dB\n",
"\n",
" The insertion loss,if we have both guided and leaky modes =0.71 dB\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"y=5*10**-6## lateral misalignment in m\n",
"a=25*10**-6## core diameter in m\n",
"Lt=0.85*(y/a)## misalignment loss\n",
"n_c=1-Lt## coupling efficiency\n",
"L_i=-10*log(n_c)/log(10)## insertion loss in dB\n",
"Lt1=0.75*(y/a)## misalignment loss if we have both guided and leaky modes\n",
"n_c1=1-Lt1## coupling efficiency\n",
"L_i1=-10*log(n_c1)/log(10)## insertion loss in dB if we have both guided and leaky modes\n",
"print \"The insertion loss =%0.2f dB\"%( L_i)#\n",
"print \"\\n The insertion loss,if we have both guided and leaky modes =%0.2f dB\"%( L_i1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.11 Pg: 316"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The inserion loss when NA=0.22 =0.94 dB\n",
"\n",
" The inserion loss when NA=0.32 =0.75 dB\n"
]
}
],
"source": [
"from math import log,pi\n",
"from __future__ import division\n",
"n1=1.5## core refractive index\n",
"n=1## refractive index due to air\n",
"x=5*pi/180#\n",
"C=n1/n#\n",
"A=(16*C**2)/((1+C)**4)#\n",
"B=n*x#\n",
"NA=0.22## numerical aperture\n",
"n_ang=A*(1-(B/(pi*NA)))## angular coupling efficiency\n",
"L_ang=-10*log(n_ang)/log(10)## inserion loss when NA=0.22\n",
"NA1=0.32## numerical aperture\n",
"n_ang1=A*(1-(B/(pi*NA1)))## angular coupling efficiency\n",
"L_ang1=-10*log(n_ang1)/log(10)## inserion loss when NA=0.32\n",
"print \"The inserion loss when NA=0.22 =%0.2f dB\"%( L_ang)#\n",
"print \"\\n The inserion loss when NA=0.32 =%0.2f dB\"%( L_ang1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.12 Pg: 317"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The total insertion loss =1.81 dB\n",
"\n",
" The answer is wrong in the textbook\n"
]
}
],
"source": [
"from math import pi\n",
"from __future__ import division\n",
"V=2.50## normalised frequency\n",
"n1=1.5## core refractive index\n",
"a=4.5*10**-6## core radius in m\n",
"NA=0.2## numerical aperture\n",
"y=3*10**-6## lateral misalignment in m\n",
"w=a*((0.65+1.62*(V)**-1.5+2.88*(V)**-6)/2**0.5)## normalised spot size in m\n",
"T1=2.17*(y/w)**2## Loss due to lateral offset in dB\n",
"x=(pi/180)*w#\n",
"Ta=2.17*((x*n1*V)/(a*NA))**2## loss due to angular misalignment in dB\n",
"T=T1+Ta## total insertion loss in dB\n",
"print \"The total insertion loss =%0.2f dB\"%( T)#\n",
"print \"\\n The answer is wrong in the textbook\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.13 Pg: 317"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Excess loss =1.10 dB\n",
"\n",
" The insertion loss port 1 to 3 =4.33 dB\n",
"\n",
" The insertion loss port 1 to 4 =3.90 dB\n",
"\n",
" The cross talk =-41.14 dB\n",
"\n",
" The split ratio =47.52 %\n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"P1=65## optical power in uW\n",
"P2=0.005## output power at port 2 in uW\n",
"P3=24## output power at port 3 in uW\n",
"P4=26.5## output power at port 4 in uW\n",
"Le=10*log(P1/(P3+P4))/log(10)## Excess loss in dB\n",
"Le1=10*log(P1/P3)/log(10)## insertion loss port 1 to 3 in dB\n",
"Le2=10*log(P1/P4)/log(10)## insertion loss port 1 to 4 in dB\n",
"ct=10*log(P2/P1)/log(10)## cross talk in dB\n",
"sr=(P3/(P3+P4))*100## split ratio\n",
"print \"The Excess loss =%0.2f dB\"%( Le)#\n",
"print \"\\n The insertion loss port 1 to 3 =%0.2f dB\"%( Le1)#\n",
"print \"\\n The insertion loss port 1 to 4 =%0.2f dB\"%( Le2)#\n",
"print \"\\n The cross talk =%0.2f dB\"%( ct)#\n",
"print \"\\n The split ratio =%0.2f %%\"%( sr)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.14 Pg: 318"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The total fresnel loss =0.33 dB\n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"n=1#\n",
"n1=1.48#\n",
"r=((n1-n)/(n1+n))**2## fresnel's reflection\n",
"Ls=-10*log(1-r)/log(10)## optical loss in dB\n",
"Lt=2*Ls## total fresnel loss\n",
"print \"The total fresnel loss =%0.2f dB\"%( Lt)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.15 Pg: 318"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The NA mismatch coupling loss =3.25 dB\n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"NA1=0.32## numerical aperture for fiber1\n",
"NA2=0.22## numerical aperture for fiber2\n",
"Lc=20*log(NA1/NA2)/log(10)## NA mismatch coupling loss\n",
"print \"The NA mismatch coupling loss =%0.2f dB\"%( Lc)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.16 Pg: 319"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The coupling ratio =46.67 %\n",
"\n",
" The Excess loss =2.22 dB\n",
"\n",
" The insertion loss port 0 to 1 =4.95 dB\n",
"\n",
" The insertion loss port 0 to 2 =5.53 dB\n",
"\n",
" The cross talk =-46.99 dB\n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"P0=250## optical power in uW\n",
"P1=80## output power at port 1 in uW\n",
"P2=70## output power at port 2 in uW\n",
"P3=5*10**-3## output power at port 3 in uW\n",
"cr=(P2/(P1+P2))*100## coupling ratio\n",
"Le=10*log(P0/(P1+P2))/log(10)## Excess loss in dB\n",
"Le1=10*log(P0/P1)/log(10)## insertion loss port 0 to 1 in dB\n",
"Le2=10*log(P0/P2)/log(10)## insertion loss port 0 to 2 in dB\n",
"ct=10*log(P3/P0)/log(10)## cross talk in dB\n",
"print \"The coupling ratio =%0.2f %%\"%( cr)#\n",
"print \"\\n The Excess loss =%0.2f dB\"%( Le)#\n",
"print \"\\n The insertion loss port 0 to 1 =%0.2f dB\"%( Le1)#\n",
"print \"\\n The insertion loss port 0 to 2 =%0.2f dB\"%( Le2)#\n",
"print \"\\n The cross talk =%0.2f dB\"%( ct)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.17 Pg: 319"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The throughput loss =0.97 dB\n",
"\n",
" The tap loss =6.99 dB\n",
"\n",
" Directionality=-10*log(0/Pi=infinity)\n",
"\n",
" The excess loss =0 dB\n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"P_21=4/5## ratio of the input available at port2 \n",
"P_31=1/5## ratio of the input available at port3 \n",
"Lt=-10*log(P_21)/log(10)## throughput loss\n",
"Lp=-10*log(P_31)/log(10)## tap loss\n",
"Le=-10*log(P_21+P_31)/log(10)## excess loss\n",
"print \"The throughput loss =%0.2f dB\"%( Lt)#\n",
"print \"\\n The tap loss =%0.2f dB\"%( Lp)#\n",
"print \"\\n Directionality=-10*log(0/Pi=infinity)\"#\n",
"print \"\\n The excess loss =%d dB\"%( Le)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.18 Pg: 320"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The fraction of the input power goes to each of the ports =0.54 dB\n",
"\n",
" The throughput loss =2.71 dB\n",
"\n",
" The tap loss =8.73 dB\n",
"\n",
" The loss due to radiation scattering =1.74 dB\n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"Le=4## excess loss in dB\n",
"D=60## Directionality in dB\n",
"P_41=10**-6## the ratio of P4 to P1\n",
"P_31=0.670/5## the ratio of P3 to P1\n",
"P_21=P_31*4## the ratio of P2 to P1\n",
"Lt=-10*log(P_21)/log(10)## throughput loss\n",
"Lp=-10*log(P_31)/log(10)## tap loss\n",
"Ls=-10*log(0.670)/log(10)## loss due to radiation scattering in dB\n",
"print \"The fraction of the input power goes to each of the ports =%0.2f dB\"%( P_21)#\n",
"print \"\\n The throughput loss =%0.2f dB\"%( Lt)#\n",
"print \"\\n The tap loss =%0.2f dB\"%( Lp)#\n",
"print \"\\n The loss due to radiation scattering =%0.2f dB\"%( Ls)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.19 Pg: 320"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The attenuation per km =5.92 dB/km\n"
]
}
],
"source": [
"from math import log\n",
"from __future__ import division\n",
"L1=1.5## length in km\n",
"L2=2/1000## length in km\n",
"Pi=50.1*10**-6## optical power in W\n",
"Po=385.4*10**-6## output power in W\n",
"a=(10/(L1-L2))*log(Po/Pi)/log(10)## attenuation per km\n",
"print \"The attenuation per km =%0.2f dB/km\"%( a)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:7.20 Pg: 321"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The scattering loss in the fiber =3.91 dB/km\n"
]
}
],
"source": [
"from __future__ import division\n",
"Psc=5.31*10**-9##\n",
"Popt=98.45*10**-6## \n",
"L=5.99## length in km\n",
"asc=(4.343*10**5/L)*(Psc/Popt)## scattering loss in the fiber in dB\n",
"print \"The scattering loss in the fiber =%0.2f dB/km\"%( asc)"
]
}
],
"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
}
|