0% found this document useful (0 votes)
78 views

Envi

This document provides the Scilab code solution for experiment 4 on computing the acceptance angle for an optical fiber in water. The code defines the refractive indices of the core, cladding and water, and calculates the numerical aperture and critical angle at the core-cladding interface. It then uses these values to determine the acceptance angle in degrees for light propagation through the fiber in water. The code presents the solution in 3 steps: 1) defining parameters and calculating numerical aperture, 2) determining the critical angle, and 3) displaying the acceptance angle value.

Uploaded by

Asha J
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views

Envi

This document provides the Scilab code solution for experiment 4 on computing the acceptance angle for an optical fiber in water. The code defines the refractive indices of the core, cladding and water, and calculates the numerical aperture and critical angle at the core-cladding interface. It then uses these values to determine the acceptance angle in degrees for light propagation through the fiber in water. The code presents the solution in 3 steps: 1) defining parameters and calculating numerical aperture, 2) determining the critical angle, and 3) displaying the acceptance angle value.

Uploaded by

Asha J
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Scilab Manual for

Optical Fiber Communication


by Prof Harsha Sanap
Others
Padmabhushan Vasantdada Patil
Pratishthan’s College of Engineering/Mumbai
University1

Solutions provided by
Prof RAJIV S. TAWDE
Others
Mumbai University/PVPPCOE

December 9, 2018

1 Funded by a grant from the National Mission on Education through ICT,


http://spoken-tutorial.org/NMEICT-Intro. This Scilab Manual and Scilab codes
written in it can be downloaded from the ”Migrated Labs” section at the website
http://scilab.in
1
Contents

List of Scilab Solutions 3

1 To compute the Thermal noise,Signal to noise ratio and


Shot noise power for a PIN photodiode 4

2 To compute the responsivity,received optical power & the


number of photons received by a pn photodiode 6

3 Compute the resulting output voltage of a photodetector 8

4 Compute the acceptance angle for the optical fiber in water 10

5 Compute the numerical aperture and the critical angle at


the core cladding interface for the step index fiber 12

6 Computation of maximum bit rate for RZ & NRZ encoding


for the pulse spreading constants certain cable lengths 14

7 Computing overall signal attenuation,signal attenuation/km,overall


signal attenuation for 20km link with splices at 2km inter-
val 16

8 To compute the maximum link span for 4,8,16 channel;


2.5Gb/s channel optical link. 18

9 Compute the numerical aperture & the acceptance angle


for the fiber in air 20

10 Compute the absorption loss taking place in an optical fiber 22

2
List of Experiments

Solution 1.1 Experiment Number 1 . . . . . . . . . . . . . . . 4


Solution 2.1 Experiment Number 2 . . . . . . . . . . . . . . . 6
Solution 3.1 Experiment Number 3 . . . . . . . . . . . . . . . 8
Solution 4.1 Experiment Number 4 . . . . . . . . . . . . . . . 10
Solution 5.1 Experiment Number 5 . . . . . . . . . . . . . . . 12
Solution 6.1 Experiment Number 6 . . . . . . . . . . . . . . . 14
Solution 7.1 Experiment Number 7 . . . . . . . . . . . . . . . 16
Solution 8.1 Experiment Number 8 . . . . . . . . . . . . . . . 18
Solution 9.1 Experiment Number 9 . . . . . . . . . . . . . . . 20
Solution 10.1 Experiment Number 10 . . . . . . . . . . . . . . . 22

3
Experiment: 1

To compute the Thermal


noise,Signal to noise ratio and
Shot noise power for a PIN
photodiode

Scilab code Solution 1.1 Experiment Number 1

1 //AIM : To compute t h e Thermal n o i s e , S i g n a l t o n o i s e


r a t i o and S h o t n o i s e power
2 // f o r a PIN p h o t o d i o d e
3
4 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
5 //OS Windows 7
6 clc ;
7 clear ;
8 // C o n s i d e r r e s p o n s i v i t y 0 . 5 A/W, l o a d
r e s i s t a n c e =2000
ohms , s y s t e m
9 // bandwidth =50MHz, t e m p e r a t u r e =40 d e g r e e s c e n t i g r a d e
10 // ( a ) Thermal n o i s e :
11 T =40+273; //T=T e m p e r a t u r e
12 disp ( ’K ’ ,T , ’T= ’ )
13 delF =50*(10^3) ; // d e l F=Bandwidth

4
14 k =1.38*(10^ -23) ; // k=Boltzmann c o n s t a n t
15 e =1.6*(10^ -19) ; //E=E l e c t r o n
16 RL =2000; //RL=Load r e s i s t a n c e
17 //PNT=4∗k ∗T∗ d e l F where PNT=Thermal n o i s e
18 // I f s h o t n o i s e i s e q u a l t o t h e r m a l n o i s e , t h e n PNT=
PNS
19 //PNS i s t h e s h o t n o i s e power
20 // So , 4∗ k ∗T∗ d e l F =2∗ e ∗ i S ∗ d e l F ∗RL
21 // Hence i S =(2∗ k ∗T) / ( e ∗RL)
22 iS =(2* k * T ) /( e * RL ) ; // i S= s i g n a l p h o t o c u r r e n t
23 disp ( ’Amp ’ ,iS , ’ i S= ’ )
24 R =0.5; //R= r e s p o n s i v i t y =0.5
25 PR = iS / R ;
26 disp ( ’ Watts ’ ,PR , ’ R e c e i v e d o p t i c power PR= ’ ) ;
27 PNT =4* k * T * delF ;
28 disp ( PNT , ’ Thermal n o i s e PNT= ’ )
29
30 // ( b ) S i g n a l t o n o i s e r a t i o :
31 // S i n c e PNS=PNT ;
32 // T o t a l n o i s e ; N=PNS+PNT
33 // So , N=2∗PNS
34 // But PNS=2∗ e ∗ i S ∗ d e l F ∗RL
35 S_by_N =( iS ) /(4* e * delF ) ;
36 disp ( S_by_N , ’ S i g n a l t o n o i s e r a t i o ( S /N)= ’ )
37
38 // ( c ) S h o t n o i s e power :
39 PNS =2* e * iS * delF * RL ;
40 disp ( ’ Watts ’ ,PNS , ’ S h o t n o i s e power PNS= ’ )

5
Experiment: 2

To compute the
responsivity,received optical
power & the number of photons
received by a pn photodiode

Scilab code Solution 2.1 Experiment Number 2

1 //AIM : To compute t h e r e s p o n s i v i t y , r e c e i v e d o p t i c a l
power & t h e number o f
2 // p h o t o n s r e c e i v e d by a pn p h o t o d i o d e
3
4 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
5 //OS Windows 7
6 clc ;
7 clear ;
8 // L e t u s c o n s i d e r quantum e f f i c i e n c y o f 50% a t a
wavelength of 0.9 micrometres
9 //& mean p h o t o c u r r e n t i s 10ˆ −6 Amp
10 n =50/100; // n=Quantum e f f i c i e n c y =50%( g i v e n )
11 lambda =0.9*(10^ -6) ;
12 // ( a ) : R e s p o n s i v i t y
13 // R e s p o n s i v i t y R i s r e l a t e d t o t h e quantum

6
e f f i c i e n c y n a s R=(n∗ e ∗ lambda ) / ( h∗ e )
14 e =1.6*(10^ -19) ;
15 h =6.6*(10^ -34) ;
16 c =3*(10^8) ;
17 R =( n * e * lambda ) /( h * c ) ;
18 disp ( ’AWˆ−1 ’ ,R , ’R= ’ )
19
20 // ( b ) : R e c e i v e d o p t i c a l power :
21 //R=I p /P0
22 Ip =10^ -6;
23 P0 = Ip / R ;
24 disp ( ’ Watts ’ ,P0 , ’ R e c e i v e d o p t i c a l power ( P0 )= ’ )
25
26 //No . o f r e c e i v e d p h o t o n s :
27 E =( h * c ) /( lambda ) ;
28 disp ( ’ Watts ’ ,E , ’E= ’ )
29 // O p t i c a l power=No . o f p h o t o n s ∗ Energy o f a p h o t o n
30 NOP = P0 / E ;
31 disp ( ’ p h o t o n s / s e c ’ ,NOP , ’ Number o f p h o t o n s= ’ )

7
Experiment: 3

Compute the resulting output


voltage of a photodetector

Scilab code Solution 3.1 Experiment Number 3

1 //AIM : Compute t h e r e s u l t i n g o u t p u t v o l t a g e o f a
photodetector
2 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
3 //OS Windows 7
4 clc ;
5 clear ;
6 // L e t quantum e f f i c i e n c y = 0 . 9 , w a v e l e n g t h =1.3
m i c r o m e t r e & i n c i d e n t power l e v e l
7 // o f −37dBm
8 // A l s o we c o n s i d e r l o a d r e s i s t a n c e i s 50 ohms and
1 0 0 0 ohms .
9 n =0.9; // n=Quantum e f f i c i e n c y
10 lambda =1.3*(10^( -6) ) ; // lambda=w a v e l e n g t h
11 // I n c i d e n t o p t i c a l power P i a=−37dBm
12 Pia = -37; // P i a=I n c i d e n t power l e v e l
13 Pi =(10^( -3) ) *(10^( Pia /10) ) ; // Computing t h e i n c i d e n t
o p t i c a l power i n Watts
14 disp ( ’ Watts ’ ,Pi , ’ I n c i d e n t o p t i c a l power ( Pi ) i n
Watts= ’ )

8
15 h =(6.625) *(10^( -34) ) ; // h=Planck ’ s c o n s t a n t
16 c =(3) *(10^(8) ) ; // c=Speed o f l i g h t
17 e =(1.6) *(10^( -19) ) ; // E l e c t r o n
18 I =( n * e * lambda * Pi ) /( h * c ) ; // Computing c u r r e n t I
19 disp ( ’Amp ’ ,I , ’ C u r r e n t ( I )= ’ )
20 // V o l t a g e a c r o s s r e s i s t o r o f 50 ohms
21 R1 =50;
22 V1 = I * R1 ; // B a s i c r e l a t i o n : V o l t a g e=C u r r e n t ∗ R e s i s t a n c e
23 disp ( ’ V o l t s ’ ,V1 , ’ V1= ’ )
24
25 // V o l t a g e a c r o s s r e s i s t o r o f ohms
26 R2 =1000;
27 V2 = I * R2 ; // B a s i c r e l a t i o n : V o l t a g e=C u r r e n t ∗ R e s i s t a n c e
28 disp ( ’ V o l t s ’ ,V2 , ’ V2= ’ )

9
Experiment: 4

Compute the acceptance angle


for the optical fiber in water

Scilab code Solution 4.1 Experiment Number 4

1 //AIM : Compute t h e a c c e p t a n c e a n g l e f o r t h e o p t i c a l
f i b e r in water
2 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
3 //OS Windows 7
4 clc ;
5 clear ;
6 // L e t r e f r a c t i v e i n d e x be 1 . 3 3 , n u m e r i c a l a p e r t u r e be
0 . 2 0 and c l a d d i n g
7 // r e f r a c t i v e i n d e x be 1 . 5 9 .
8 na =1.33;
9 n2 =1.59;
10 NA =0.20;
11 // The r e f r a c t i v e i n d e x o f t h e c o r e n1 i s n o t g i v e n .
So i s h a s t o be c a l c u l a t e d .
12 //NA=s q r t ( ( n1 ˆ 2 ) −(n2 ˆ 2 ) )
13 n1 = sqrt (( NA ^2) +( n2 ^2) ) ;
14 disp ( n1 , ’ n1= ’ )
15 fiy_c = asin ( n2 / n1 ) ;
16 fiy_c_degrees =( fiy_c ) *(180/ %pi ) ;

10
17 disp ( ’ d e g r e e s ’ , fiy_c_degrees , ’ C r i t i c a l a n g l e a t t h e
c o r e −c l a d d i n g i n t e r f a c e : f i y c = ’ )
18 // Computing t h e a c c e p t a n c e a n g l e
19 theta_a = asin ( NA / na ) ;
20 theta_a_degrees =( theta_a ) *(180/ %pi ) ;
21 disp ( ’ d e g r e e s ’ , theta_a_degrees , ’ A c c e p t a n c e a n g l e :
t h e t a a= ’ )

11
Experiment: 5

Compute the numerical


aperture and the critical angle
at the core cladding interface
for the step index fiber

Scilab code Solution 5.1 Experiment Number 5

1 //AIM : Compute t h e n u m e r i c a l a p e r t u r e and t h e


c r i t i c a l angle at the core
2 // c l a d d i n g i n t e r f a c e f o r t h e s t e p i n d e x f i b e r
3
4 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
5 //OS Windows 7
6 clc ;
7 clear ;
8 // L e t t h e a c c e p t a n c e a n g l e i n a i r be 22 d e g r e e s and
a r e l a t i v e r e f r a c t i v e index
9 // d i f f e r e n c e o f 3%
10 theta_a_degrees =22;
11 theta_a_radians =( theta_a_degrees ) *( %pi /180) ;
12 del =0.03;
13 NA = sin ( theta_a_radians ) ;

12
14 disp ( NA , ’NA= ’ )
15 n1 =( NA ) /( sqrt (2* del ) ) ;
16 disp ( n1 , ’ n1= ’ )
17 // Computing n2 :
18 n2 = n1 -( del * n1 ) ;
19 disp ( n2 , ’ n2= ’ )
20 // Computing t h e c r i t i c a l a n g l e
21 fiy_c = asin ( n2 / n1 ) ;
22 fiy_c_degrees =( fiy_c ) *(180/ %pi ) ;
23 disp ( ’ d e g r e e s ’ , fiy_c_degrees , ’ C r i t i c a l a n g l e= ’ )

13
Experiment: 6

Computation of maximum bit


rate for RZ & NRZ encoding
for the pulse spreading
constants certain cable lengths

Scilab code Solution 6.1 Experiment Number 6

1 //AIM : Computation o f maximum b i t r a t e f o r RZ & NRZ


encoding f o r the pulse
2 // s p r e a d i n g c o n s t a n t s & c e r t a i n c a b l e l e n g t h s
3
4 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
5 //OS Windows 7
6 clc ;
7 clear ;
8 // C o n s i d e r p u l s e s p r e a d i n g c o n s t a n t s & c a b l e
lengths
as f o l l o w s :
9 // ( i ) : T =10 n s /mm, L=100m; ( i i ) : T =20 n s /m, L=1000m ; (
i i i ) : T =2000 n s /m, L=2km
10
11 //To f i n d maximum b i t r a t e f o r RZ & NRZ e n c o d i n g
12 // ( i ) : S i n c e d e l T 1 =10 n s /mm and 1mm=10ˆ−6 km

14
13 delT1 =10*(10^( -9) ) *(10^(6) ) ;
14 disp ( ’ s e c /km ’ , delT1 , ’ d e l T 1= ’ )
15 tao1 =0.1* delT1 ; // Computing t o t a l d i s p e r s i o n f o r 100
m
16 disp ( ’ s e c ’ , tao1 , ’ T o t a l d i s p e r s i o n f o r 100 m= ’ )
17 //Maximum p o s s i b l e o p t i c a l bandwidth=maximum
p o s s i b l e b i t r a t e f o r RZ
18 Bopt1 =1/(2* tao1 )
19 disp ( ’ b i t s / s e c ’ , Bopt1 , ’ Maximum p o s s i b l e b i t r a t e f o r
RZ= ’ )
20 NRZ1 = Bopt1 /2;
21 disp ( ’ b i t s / s e c ’ , NRZ1 , ’ Maximum p o s s i b l e b i t r a t e f o r
NRZ= ’ )
22 // ( i i ) : S i n c e d e l T 2 =20 n s /m and 1m=10ˆ−3km
23 delT2 =20*(10^( -9) ) /(10^( -3) ) ;
24 disp ( ’ s e c ’ , delT2 , ’ T o t a l d i s p e r s i o n f o r 1 0 0 0 m o r 1
km = ’ )
25 tao2 = delT2 ;
26 Bopt2 =1/(2* tao2 )
27 disp ( ’ b i t s / s e c ’ , Bopt2 , ’ Maximum p o s s i b l e b i t r a t e f o r
RZ= ’ )
28 NRZ2 = Bopt2 /2;
29 disp ( ’ b i t s / s e c ’ , NRZ2 , ’ Maximum p o s s i b l e b i t r a t e f o r
NRZ= ’ )
30 // ( i i i ) : S i n c e d e l T 3 =2000 n s /m and 1m=10ˆ−3km
31 delT3 =2000*(10^( -9) ) /(10^( -3) ) ;
32 disp ( ’ s e c /km ’ , delT3 , ’ d e l T 3= ’ )
33 tao3 = delT3 *2;
34 disp ( ’ s e c ’ , tao3 , ’ T o t a l d i s p e r s i o n o v e r a l e n g t h o f 2
km = ’ )
35 Bopt3 =1/(2* tao3 )
36 disp ( ’ b i t s / s e c ’ , Bopt3 , ’ Maximum p o s s i b l e b i t r a t e f o r
RZ= ’ )
37 NRZ3 = Bopt3 /2;
38 disp ( ’ b i t s / s e c ’ , NRZ3 , ’ Maximum p o s s i b l e b i t r a t e f o r
NRZ= ’ )

15
Experiment: 7

Computing overall signal


attenuation,signal
attenuation/km,overall signal
attenuation for 20km link with
splices at 2km interval

Scilab code Solution 7.1 Experiment Number 7

1 //AIM : Computing o v e r a l l s i g n a l a t t e n u a t i o n , s i g n a l
a t t e n u a t i o n /km , o v e r a l l
2 // s i g n a l a t t e n u a t i o n f o r 20km l i n k w i t h s p l i c e s a t 2
km i n t e r v a l
3
4 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
5 //OS Windows 7
6 clc ;
7 clear ;
8 // L e t u s c o n s i d e r t h a t e a c h s p l i c e gives attenuation
o f 1 . 5 dB f o r 10km l o n g
9 // o p t i c a l f i b e r h a v i n g o u t p u t o p t i c a l power o f 4 W
10 // and i n p u t o p t i c a l power o f 100 W

16
11
12 Pin =100*(10^( -6) ) ; // Pin=I n p u t o p t i c a l power
13 Pout =4*(10^( -6) ) ; // Pout=Output o p t i c a l power
14 alphaT =10* log10 ( Pin / Pout ) ; // alphaT=O v e r a l l
attenuation
15 disp ( ’ dB ’ , alphaT , ’ O v e r a l l a t t e n u a t i o n ( alphaT )= ’ )
16 // The l e n g t h o f t h e o p t i c a l f i b e r i s 10km
17 L1 =10*(10^(3) ) ;
18 // Computing S i g n a l a t t e n u a i o n p e r km
19 alpha = alphaT /10;
20 disp ( ’ dB/km ’ , alpha , ’ The s i g n a l a t t e n u a t i o n p e r
kilometer ( alpha ) =’ )
21 // Computation f o r 20 kms l e n g t h :
22 L2 =20*(10^(3) ) ;
23 TSA = alpha /(10^(3) ) * L2 ; //TSA=T o t a l s i g n a l a t t e n u a t i o n
24 disp ( ’ dB ’ ,TSA , ’ T o t a l s i g n a l a t t e n u a t i o n= ’ )
25 //A s p l i c e i s c o n n e c t e d a t e a c h 2km d i s t a n c e . Thus
t o t a l 9 s p l i c e s are used .
26 //Now e a c h s p l i c e g i v e s 1 . 5 dB a t t e n u a t i o n .
27 S =9; // S=T o t a l No . o f s p l i c e s u s e d
28 A =1.5; //A=A t t e n u a t i o n by e a c h s p l i c e
29 TAFS = S * A ; //TAFS=T o t a l a t t e n u a t i o n from s p l i c e s
30 disp ( ’ dB ’ , TAFS , ’ T o t a l a t t e n u a t i o n from s p l i c e s = ’ )
31 // Computing o v e r a l l s i g n a l a t t e n u a t i o n i n c l u d i n g
a t t e n u a t i o n due t o s p l i c e s
32 a = TAFS + TSA ;
33 disp ( ’ dB ’ ,a , ’ O v e r a l l s i g n a l a t t e n u a t i o n i n c l u d i n g
a t t e n u a t i o n due t o s p l i c e s = ’ )

17
Experiment: 8

To compute the maximum link


span for 4,8,16 channel;
2.5Gb/s channel optical link.

Scilab code Solution 8.1 Experiment Number 8

1 //AIM : To compute t h e maximum l i n k s p a n f o r 4 , 8 , 1 6


c h a n n e l ; 2 . 5 Gb/ s c h a n n e l
2 // o p t i c a l l i n k .
3
4 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
5 //OS Windows 7
6 clc ;
7 clear ;
8 // ( i ) : Computing maximum l i n k s p a n f o r 4− c h a n n e l , 2 . 5
Gb/ s p e r c h a n n e l
9 // o p t i c a l l i n k
10
11 fb1 =4*2.5;
12 Lmax1 =(6.1*(10^3) ) /(( fb1 ) ^2) ;
13 disp ( ’km ’ , Lmax1 , ’ Maximum l i n k s p a n f o r 4− c h a n n e l , 2 . 5
Gb/ s p e r c h a n n e l o p t i c a l l i n k ( i . e . Lmax1 ) = ’ )
14

18
15 // ( i i ) : Computing maximum l i n k s p a n f o r 8− c h a n n e l , 2 . 5
Gb/ s p e r c h a n n e l
16 // o p t i c a l l i n k
17
18 fb2 =8*2.5;
19 Lmax2 =(6.1*(10^3) ) /(( fb2 ) ^2) ;
20 disp ( ’km ’ , Lmax2 , ’ Maximum l i n k s p a n f o r 8− c h a n n e l , 2 . 5
Gb/ s p e r c h a n n e l o p t i c a l l i n k ( i . e . Lmax2 ) = ’ )
21
22 // ( i i i ) : Computing maximum l i n k s p a n f o r 16− c h a n n e l
, 2 . 5 Gb/ s p e r c h a n n e l
23 // o p t i c a l l i n k
24
25 fb3 =16*2.5;
26 Lmax3 =(6.1*(10^3) ) /(( fb3 ) ^2) ;
27 disp ( ’km ’ , Lmax3 , ’ Maximum l i n k s p a n f o r 16− c h a n n e l
, 2 . 5 Gb/ s p e r c h a n n e l o p t i c a l l i n k ( i . e . Lmax3 ) = ’
)

19
Experiment: 9

Compute the numerical


aperture & the acceptance
angle for the fiber in air

Scilab code Solution 9.1 Experiment Number 9

1 //AIM : Compute t h e n u m e r i c a l a p e r t u r e & t h e


acceptance angle f o r the f i b e r in a i r
2 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
3 //OS Windows 7
4 clc ;
5 clear ;
6 // L e t t h e v e l o c i t y o f l i g h t i n vacuum be 2 . 9 9 8 ∗ 1 0 ˆ 8
m/ s e c , c r i t i c a l a n g l e a t t h e
7 // c o r e −c l a d d i n g i n t e r f a c e be 80 d e g r e e s & v e l o c i t y
of l i g h t in the core
8 // o f a s t e p i n d e x f i b e r be 2 . 0 1 ∗ 1 0 ˆ 8 m/ s e c
9
10 c =2.998*10^8; // c= v e l o c i t y o f l i g h t i n vacuum
11 v1 =2.01*10^8; // v1= v e l o c i t y o f l i g h t i n t h e c o r e
12 theta_c =80*( %pi /180) ; // E x p r e s s i n g t h e t a c i n r a d i a n s
13 n1 = c / v1 ;
14 disp ( n1 , ’ n1= ’ )

20
15 // S i n c e s i n ( t h e t a c )=n2 / n1
16 n2 = sin ( theta_c ) * n1 ;
17 disp ( n2 , ’ n2= ’ )
18 NA = sqrt (( n1 ^2) -( n2 ^2) )
19 disp ( NA , ’ N u m e r i c a l a p e r t u r e (NA)= ’ )
20 // Computing t h e a c c e p t a n c e a n g l e
21 theta_a = asin ( NA )
22 theta_a_degrees =( theta_a ) *(180/ %pi ) ;
23 disp ( ’ d e g r e e s ’ , theta_a_degrees , ’ A c c e p t a n c e a n g l e (
t h e t a a )= ’ )

21
Experiment: 10

Compute the absorption loss


taking place in an optical fiber

Scilab code Solution 10.1 Experiment Number 10

1 //AIM : Compute t h e a b s o r p t i o n l o s s t a k i n g p l a c e i n an
optical fiber
2 // S o f t w a r e v e r s i o n S c i l a b 5 . 5 . 2
3 //OS Windows 7
4 clc ;
5 clear ;
6 // L e t t h e l e n g t h o f t h e o p t i c a l f i b e r be 3 . 5 cm i n an
i n t e r f e r e n c e sphere , while
7 // t h e t o t a l l e n g t h o f t h e f i b e r be 1km .
8 // A l s o c o n s i d e r t h a t i t g i v e s 5 . 1 nV & 165 m i c r o
Volts corresponding to
9 // s c a t t e r e d & u n s c a t t e r e d l i g h t r e s p e c t i v e l y w h i l e
f o r t h e c u t b a c k method ,
10 // i t g i v e s 5 . 2 0V & 22V f o r o r i g i n a l & c u t b a c k
optical fibers respectively .
11
12 l =3.5*(10^( -5) ) ; // l =Length o f optical in integrating
sphere
13 Vsc =5.1*(10^( -9) ) ; // Vsc=V o l t a g e l e v e l c o r r e s p o n d i n g

22
to s c a t t e r e d l i g h t
14 Vop =165*(10^( -6) ) ; // Vop=V o l t a g e l e v e l c o r r e s p o n d i n g
to unscattered l i g h t
15 // Computing t h e s c a t t e r i n g l o s s :
16 alpha_sc =(4.343/ l ) *( Vsc / Vop ) ;
17 disp ( ’ dB/km ’ , alpha_sc , ’ S c a t t e r i n g l o s s ( a l p h a s c )= ’ )
18 // Computation o f t o t a l a t t e n u a t i o n :
19 L1 =1; // L1=Length o f t h e o r i g i n a l f i b e r
20 L2 =0.002; // L2=Length o f c u t b a c k o p t i c a l f i b e r
21 V2 =22; //V2=V o l t a g e l e v e l f o r c u t b a c k o p t i c a l f i b e r
22 V1 =5.20; //V1=V o l t a g e l e v e l f o r o r i g i n a l o p t i c a l
fiber
23 alpha_T =(1/( L1 - L2 ) ) *(10* log10 ( V2 / V1 ) ) ; // a l p h a T=
total attenuation
24 disp ( ’ dB/km ’ , alpha_T , ’ T o t a l a t t e n u a t i o n ( a l p h a T ) = ’
)
25 // Computing t h e a b s o r p t i o n l o s s :
26 AL = alpha_T - alpha_sc ; //AL=A b s o r p t i o n l o s s
27 disp ( ’ dB/km ’ ,AL , ’ A b s o r p t i o n l o s s = ’ )

23

You might also like