Вы находитесь на странице: 1из 76

Scilab Code for

Optical Fiber Communication


by Gerd Keiser 1

Created by
Prof. R. Senthilkumar
Institute of Road and Transport Technology
rsenthil signalprocess@in.com

Cross-Checked by
Prof. Saravanan Vijayakumaran, IIT Bombay
sarva@ee.iitb.ac.in

11 January 2011

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


http://spoken-tutorial.org/NMEICT-Intro. This Text Book Companion and
Scilab codes written in it can be downloaded from the website www.scilab.in
Book Details

Authors: G. Keiser

Title: Optical Fiber Communication

Publisher: Tata McGrawHill

Edition: 4th Edition, 8th Reprint

Year: 2010

Place: New Delhi

ISBN: 0-07-064810-7

1
Scilab numbering policy used in this document and the relation to the
above book.

Exa Example (Solved example)

Fig Code for Figure(Scilab code that is used for plotting the respective figure
of the above book )

For example, Exa 4.56 means solve example 4.56 of the above book.

2
Contents

List of Scilab Codes 4

1 First chapter 2

2 Second chapter 7

3 Third chapter 11

4 Fourth chapter 16

5 Fifth chapter 22

6 Sixth chapter 26

7 Seventh chapter 31

8 Eight chapter 35

9 Ninth chapter 40

10 Tenth chapter 46

11 Eleventh chapter 54

12 Twelve chapter 59

13 Thirteen chapter 64

14 Fourteen chapter 68

3
List of Scilab Codes

Exa 1.1 Program to calculate time period and phase shift . . . 2


Exa 1.2 Example 1.2 . . . . . . . . . . . . . . . . . . . . . . . 3
Exa 1.4 Shannon Channel Capacity formula . . . . . . . . . . 3
Exa 1.5 Capacity of a channel using Shannon’s formula . . . . 4
Exa 1.6 Program to calculate attenuation loss of power . . . . 5
Exa 1.7 Power gain calculation for a signal travelling from one
point to another point . . . . . . . . . . . . . . . . . . 5
Exa 2.1 Critical Angle of incidence . . . . . . . . . . . . . . . 7
Exa 2.2 Finding Critical angle, numerical aperture, acceptance
angle . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Exa 2.3 Program to Calculate NORMALIZED FREQUENCY
’V’ and Numerical Aperture . . . . . . . . . . . . . . . 8
Exa 2.4 Power flow in the core and cladding of step index fiber 8
Exa 2.5 Program to calculate Fiber Birefringence Betaf . . . 9
Exa 3.1 Program to Find Attenuation in dB/km . . . . . . . 11
Exa 3.2 To calculate input and output power in dBm . . . . . 11
Exa 3.3 Rayleigh scattering loss . . . . . . . . . . . . . . . . . 12
Exa 3.4 Program to calculate percent in decrease of number of
modes . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Exa 3.5 Calculation of pulse broadening . . . . . . . . . . . . 13
Exa 3.6 Calculation of bandwidth distance . . . . . . . . . . . 14
Exa 3.7 Program to Find out the Material Dispersion . . . . . 14
Exa 3.8 Program to Find out Waveguide Dispersion . . . . . . 15
Exa 4.1 Program to find intrinsic carrier concentration . . . . 16
Exa 4.3 Finding Enegy gap and Wavelength . . . . . . . . . . 16
Exa 4.4 Finding Enegy gap and Wavelength . . . . . . . . . . 17
Exa 4.5 To find out the Internal Quantum Efficiency and Inter-
nal Power level of LED source . . . . . . . . . . . . . . 17

4
Exa 4.6 External Quantum Efficiency in percentage . . . . . . 18
Exa 4.7 Program to find Lasing Threshold gain . . . . . . . . 19
Exa 4.8 Program TO Calculate Frequency Spacing and Wave-
length Spacing . . . . . . . . . . . . . . . . . . . . . . 19
Exa 4.9 Calculation of number of half-wavelengths and wave-
length spacing between lasing modes . . . . . . . . . . 20
Exa 5.1 Calculation of Lateral power distribution coefficient . 22
Exa 5.2 Program to Calculate Optical Power Emitted from the
Light source and Optical power coupled to step-index
fiber . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Exa 5.3 Fresnel reflection, power coupled and power loss . . . 23
Exa 5.4 Power coupled between two graded index fibers . . . . 24
Exa 5.5 Loss between single mode fibers due to Lateral mis-
alignment . . . . . . . . . . . . . . . . . . . . . . . . . 24
Exa 5.6 Loss between single mode fibers due to angular mis-
alignment . . . . . . . . . . . . . . . . . . . . . . . . . 25
Exa 6.1 Cut-off wavelength of photodiode . . . . . . . . . . . 26
Exa 6.2 Calculation of Quantum efficiency . . . . . . . . . . . 26
Exa 6.3 Calculation of photocurrent . . . . . . . . . . . . . . 27
Exa 6.4 Calculation of Responsivity of photodiode . . . . . . 27
Exa 6.5 To find primary photocurrent and multiplication factor 28
Exa 6.6 Mean-square shot noise current, Mean-square dark cur-
rent and Mean-Square thermal noise current . . . . . . 29
Exa 6.7 Circuit bandwidth of a photodiode . . . . . . . . . . 30
Exa 7.1 To find optimum decision threshold . . . . . . . . . . 31
Exa 7.2 To find out signal-to-noise ratio and probability of error
for given ’Q’ . . . . . . . . . . . . . . . . . . . . . . . 31
Exa 7.3 Plotting Bit Error Rate versus Q factor . . . . . . . . 33
Exa 7.4 To find the energy of the photon incident on photodiode
and Minimum incident optical power . . . . . . . . . . 34
Exa 8.1 Program to calculate the Total Optical Power loss . . 35
Exa 8.2 Program to calculate the system margin . . . . . . . 35
Exa 8.3 Program to calculate link rise time . . . . . . . . . . 36
Exa 8.4 Program to calculate link rise time . . . . . . . . . . 36
Exa 8.5 Calculation of Number of bits affected by a burst error 37
Exa 8.6 Program to find coefficients of generator polynomial . 37
Exa 8.7 Program to find CRC(Cyclic Redundancy Check) . . 38
Exa 8.8 Program to percentage of burst error detected by CRC 39

5
Exa 8.9 Percent overhead to the information stream Using Reed-
Solomon code for error correction . . . . . . . . . . . . 39
Exa 9.1 Program to find Relative Intensity Noise (RIN) . . . . 40
Exa 9.2 Program to Find limiting conditions for pin-photodiode 40
Exa 10.1 Finding the center wavelength . . . . . . . . . . . . . 46
Exa 10.2 Finding mean frequency spacing . . . . . . . . . . . . 46
Exa 10.3 Program to find coupling ratio, Excess loss, Insertion
loss, Return loss of 2x2 Fiber coupler . . . . . . . . . . 47
Exa 10.5 Finding output powers at output port of 2x2 coupler 48
Exa 10.6 Program to find waveguide length . . . . . . . . . . . 48
Exa 10.7 Program to find Excess loss, Splitting loss and total loss 49
Exa 10.8 Program to Waveguide Length difference . . . . . . . 49
Exa 10.9 Fiber Bragg Grating: Peak Reflectivity, Coupling coef-
ficient, full-bandwidth . . . . . . . . . . . . . . . . . . 50
Exa 10.10 Phased-Array-Based-Devices: Channel spacing in terms
of wavelength and path-length difference . . . . . . . . 51
Exa 10.11 Phased-Array-Based Devices: Length difference between
adjacent array waveguides . . . . . . . . . . . . . . . . 52
Exa 10.12 Maximum number of channels that can be placed in
the tuning range . . . . . . . . . . . . . . . . . . . . . 53
Exa 11.1 Program to calculate Photon density . . . . . . . . . 54
Exa 11.2 Pumping rate and zero-signal gain . . . . . . . . . . . 54
Exa 11.3 Maximum input power and maximum output power . 55
Exa 11.6 Optical Signal-to-noise ratio (OSNR) . . . . . . . . . 56
Exa 11.7 Pump power of EDFA . . . . . . . . . . . . . . . . . 56
Exa 11.8 OSNR for different ASE noise level . . . . . . . . . . 57
Exa 11.9 Noise penalty factor . . . . . . . . . . . . . . . . . . . 57
Exa 11.10 Upper bound on input optical signal power . . . . . . 58
Exa 12.1 Effective length of fiber . . . . . . . . . . . . . . . . . 59
Exa 12.2 Calculation of Stimulated Brillouin Scattering (SBS)
threshold power . . . . . . . . . . . . . . . . . . . . . 59
Exa 12.3 Four-wave mixing-calculation of power generated due
to the interaction of signals at different frequencies . . 60
Exa 12.4 Full-width Half-Maximum (FWHM) soliton pulse nor-
malized time . . . . . . . . . . . . . . . . . . . . . . . 61
Exa 12.5 Calculation of normalized distance parameter for dis-
persion shifted fiber . . . . . . . . . . . . . . . . . . . 61
Exa 12.6 Program to calculate soliton peak power . . . . . . . 62

6
Exa 12.7 FWHM soliton pulse width and fraction of bit slot oc-
cupied by a soliton . . . . . . . . . . . . . . . . . . . . 62
Exa 13.1 Calculation of power budget for optical link . . . . . . 64
Exa 13.2 Calculation of Number stations for given loss . . . . . 65
Exa 13.3 Calculation of worst case Dynamic Range . . . . . . . 66
Exa 13.4 Calculation of power margin between transmitter and
receiver for Star architectures . . . . . . . . . . . . . . 66
Exa 13.5 Determination of maximum length of multimode fiber
link . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Fig 14.10 Performance Measurement and Monitoring for sce . . 68

1
Chapter 1

First chapter

Scilab code Exa 1.1 Program to calculate time period and phase shift

1 // C a p t i o n : Program t o c a l c u l a t e t i m e p e r i o d and p h a s e
shift
2 // Example1 . 1
3 // Page 8
4 clear ;
5 clc ;
6 close ;
7 f1 = 10^5; // f 1 = 100KHz
8 f2 = 10^9; // f 2 = 1GHz
9 T1 = 1/ f1 ;
10 T2 = 1/ f2 ;
11 phi = (1/4) *360;
12 phi_rad = phi /57.3;
13 disp ( T1 , ’ Time p e r i o d o f s i n e wave w i t h f r e q u e n c y =
100 KHZ ’ )
14 disp ( T2 , ’ Time p e r i o d o f s i n e wave w i t h f r e q u e n c y = 1
GHZ ’ )
15 disp ( phi , ’ p h a s e s h i f t i n d e g r e e s ’ ) ;
16 disp ( phi_rad , ’ p h a s e s h i f t i n r a d i a n s ’ ) ;
17 // R e s u l t
18 // Time p e r i o d o f s i n e wave w i t h f r e q u e n c y = 100 KHZ
19 // 0.00001
20 // Time p e r i o d o f s i n e wave w i t h f r e q u e n c y = 1GHZ

2
21 // 1 . 0 0 0D−09
22 // p h a s e s h i f t i n d e g r e e s
23 // 90.
24 // p h a s e s h i f t i n r a d i a n s
25 // 1.5706806

Scilab code Exa 1.2 Example 1.2

1 // C a p t i o n : Program t o c a l c u l a t e t i m e p e r i o d and p h a s e
shift
2 // Example1 . 1
3 // Page 8
4 clear ;
5 clc ;
6 close ;
7 f1 = 10^5; // f 1 = 100KHz
8 f2 = 10^9; // f 2 = 1GHz
9 T1 = 1/ f1 ;
10 T2 = 1/ f2 ;
11 phi = (1/4) *360;
12 phi_rad = phi /57.3;
13 disp ( T1 , ’ Time p e r i o d o f s i n e wave w i t h f r e q u e n c y =
100 KHZ ’ )
14 disp ( T2 , ’ Time p e r i o d o f s i n e wave w i t h f r e q u e n c y = 1
GHZ ’ )
15 disp ( phi , ’ p h a s e s h i f t i n d e g r e e s ’ ) ;
16 disp ( phi_rad , ’ p h a s e s h i f t i n r a d i a n s ’ ) ;
17 // R e s u l t
18 // Time p e r i o d o f s i n e wave w i t h f r e q u e n c y = 100 KHZ
19 // 0.00001
20 // Time p e r i o d o f s i n e wave w i t h f r e q u e n c y = 1GHZ
21 // 1 . 0 0 0D−09
22 // p h a s e s h i f t i n d e g r e e s
23 // 90.
24 // p h a s e s h i f t i n r a d i a n s
25 // 1.5706806

3
Scilab code Exa 1.4
1 // C a p t i o n : Shannon Channel C a p a c i t y f o r m u l a
2 // Example1 . 4
3 // p a g e 12
4 clear ;
5 clc ;
6 close ;
7 B = 10^6; // Bandwidth o f n o i s y c h a n n e l 10MHZ
8 S_N = 1; // s i g n a l −to −n o i s e r a t i o n i s 1
9 C = B * log2 (1+ S_N ) ;
10 disp (C , ’ The maximum c a p a c i t y f o r t h i s c h a n n e l i n
bits / sec C =’)
11 // R e s u l t
12 // The maximum c a p a c i t y f o r t h i s c h a n n e l i n b i t s / s e c
C = 1000000.

Scilab code Exa 1.5 1 // C a p t i o n : C a p a c i t y o f a c h a n n e l


u s i n g shannon ’ s f o r m u l a
2 // Example1 . 5
3 // p a g e 12
4 clear ;
5 clc ;
6 close ;
7 fLow = 3*(10^6) ; // low f r e q u e n c y = 3MHz
8 fHigh = 4*(10^6) ; // h i h g f r e q u e n c y = 4MHz
9 S_N_dB = 20; // s i g n a l −to −n o i s e r a t i o 20 dB
10 S_N = 10^( S_N_dB /10) ;
11 B = fHigh - fLow ;
12 C = B * log2 (1+ S_N ) ;
13 disp (B , ’ Bandwidth i n Hz B = ’ )
14 disp (C , ’ C a p a c i t y o f a c h a n n e l i n b i t s / s e c s C = ’ )
15 disp ( S_N , ’ s i g n a l t o n o i s e r a t i o S /N = ’ )
16 // R e s u l t
17 // Bandwidth i n Hz B = 1000000.
18 // C a p a c i t y o f a c h a n n e l i n b i t s / s e c s C =
6658211.5
19 // s i g n a l t o n o i s e r a t i o S /N = 100.

4
Scilab code Exa 1.6 1 // C a p t i o n : Program t o c a l c u l a t e
a t t e n u a t i o n ( o r ) l o s s o s power
2 // Example 1 . 6
3 // p a g e 14
4 clear ;
5 clc ;
6 close ;
7 P1 =1; // one w a t t
8 P2 = P1 /2; // r e d u c e d by h a l f v a l u e
9 Atten_dB = 10* log10 ( P2 / P1 ) ;
10 disp ( Atten_dB , ’ A t t e n u a t i o n i n dB = ’ ) ;
11 power_lost = 10^( Atten_dB /10)
12 disp ( power_lost , ’ The amount o f power l o s t = ’ ) ;
13 // R e s u l t
14 // A t t e n u a t i o n i n dB = − 3.0103
15 // The amount o f power l o s t = 0.5

Scilab code Exa 1.7 1 // C a p t i o n : Power g a i n c a l c u l a t i o n


f o r a s i g n a l t r a v e l l i n g from
2 // one p o i n t t o a n o t h e r p o i n t
3 // Example 1 . 7
4 // p a g e 14
5 clear ;
6 clc ;
7 close ;
8 Loss_line1 = -9; //−9 dB
9 Amp_gain2 = 14; // 14 dB
10 Loss_line3 = -3; //−3 dB
11 dB_at_line4 = Loss_line1 + Amp_gain2 + Loss_line3 ;
12 disp ( dB_at_line4 , ’ The amount o f power g a i n e d by a
s i g n a l t r a v e l l i n g from p o i n t 1 t o p o i n t 4 i n dB = ’
)
13 // R e s u l t

5
14 // The amount o f power g a i n e d by a s i g n a l t r a v e l l i n g
from p o i n t 1 t o p o i n t 4 i n dB = 2.

6
Chapter 2

Second chapter

Scilab code Exa 2.1


1 // C a p t i o n : C r i t i c a l Angle o f i n c i d e n c e
2 // Example 2 . 1
3 // p a g e 37
4 clear ;
5 close ;
6 clc ;
7 n1 = 1.48;
8 n2 = 1.00;
9 phic = asin ( n2 / n1 ) ;
10 disp ( phic *57.3 , ’ T o t a l I n t e r f l e c t i o n r e f l e c t i o n angle
: c r i t i c a l angle of incidence in degrees ’)
11 // R e s u l t
12 // T o t a l I n t e r f l e c t i o n r e f l e c t i o n angle : c r i t i c a l
angle of incidence 42.509773

Scilab code Exa 2.2


1 // C a p t i o n : F i n d i n g C r i t i c a l a n g l e ,
numerical aperture , acceptance angle
2 // Example 2 . 2
3 // p a g e 45
4 clear ;
5 close ;
6 clc ;

7
7 n1 = 1.48; // c o r e r e f r a c t i v e i n d e x
8 n2 = 1.46; // c l a d d i n g i n d e x
9 phic = asin ( n2 / n1 ) *57.3;
10 NA = sqrt ( n1 ^2 - n2 ^2) ;
11 phi0 = asin ( NA ) *57.3;
12 disp ( phic , ’ C r i t i c a l a n l g e ’ )
13 disp ( NA , ’ n u m e r i c a l a p e r t u r e ’ )
14 disp ( phi0 , ’ a c c e p t a n c e a n g e l i n a i r ’ )
15 // R e s u l t
16 // C r i t i c a l a n l g e
17 // 80.575927
18 // n u m e r i c a l a p e r t u r e
19 // 0.2424871
20 // a c c e p t a n c e a n g e l i n a i r
21 // 14.034412

Scilab code Exa 2.3 1 // C a p t i o n : Program to Calculate


NORMALIZED FREQUENCY ’V’ and N u m e r i c a l A p e r t u r e
2 // Example2 . 3
3 // Page 58
4 clear all ;
5 close ;
6 clc ;
7 a = 25 e -06;
8 Lambda =1300 e -09;
9 V = 26.6;
10 Numerical_Aperture = V * Lambda /(2* %pi * a )
11 disp ( Numerical_Aperture , ” N u m e r i c a l A p e r t u r e i s ” ) ;
12 disp ( M = ( V ^2) /2 , ’ T o t a l number o f modes M e n t e r i n g
the f i b e r i s : ’ )
13 // R e s u l t
14 // N u m e r i c a l A p e r t u r e i s : 0.2201431
15 // T o t a l number o f modes M e n t e r i n g t h e f i b e r i s :
353.78

8
Scilab code Exa 2.4 1 // C a p t i o n : Power f l o w i n t h e c o r e and
c l a d d i n g o f s t e p −i n d e x f i b e r
2 // Example 2 . 4
3 // p a g e 62
4 clear ;
5 close ;
6 clc ;
7 V = [22 ,39];
8 M = V ^2/2;
9 Pcladd_P = (4/3) *( M .^( -0.5) ) ;
10 Pcore_P = 1 - Pcladd_P ;
11 disp (M , ’ T o t a l number o f modes ’ )
12 disp ( Pcladd_P *100 , ’ P e r c e n t a g e o f power p r o p a g a t e s i n
the cladding ’ )
13 // R e s u l t
14 // T o t a l number o f modes
15 // 242. 760.5
16 // P e r c e n t a g e o f power p r o p a g a t e s i n t h e c l a d d i n g
17 // 8.5709913 4.8349182

Scilab code Exa 2.5 1 // C a p t i o n : Program t o c a l c u l a t e


F i b e r B i r e f r i n g e n c e BETA f
2 // Example2 . 5
3 // p a g e 65
4 clear all ;
5 close ;
6 clc ;
7 Lambda = input ( ’ E n t e r t h e w a v e l e n g t h o f O p t i c a l
S i g n a l ’ );
8 Lp = input ( ’ Beat Length ’ ) ;
9 BETA_f_FORMULA1 = 2* %pi / Lp ;
10 disp ( BETA_f_FORMULA1 , ” The f i b e r b i r e f r i e n g e n c e u s i n g
formula 1”);
11 BETA_f_FORMULA2 = Lambda / Lp ;
12 disp ( BETA_f_FORMULA2 , ” The f i b e r b i r e f r i e n g e n c e u s i n g
formula 2”);
13 // R e s u l t

9
14 // E n t e r t h e w a v e l e n g t h o f O p t i c a l S i g n a l 1 3 0 0 e −09
15 // Beat Length 8 e −02
16 // The f i b e r b i r e f r i e n g e n c e u s i n g f o r m u l a 1
78.539816
17 // The f i b e r b i r e f r i e n g e n c e u s i n g f o r m u l a 2
0.0000162

10
Chapter 3

Third chapter

Scilab code Exa 3.1


1 // C a p t i o n : Program t o Find A t t e n u a t i o n i n dB/km
2 // Example3 . 1
3 // p a g e 91
4 clear ;
5 clc ;
6 z = [1 2]; // d i a t a n c e s a r e i n k i l o m e t e r
7 alpha_in_dB_per_km = 3;
8 r = ( alpha_in_dB_per_km * z ) /10;
9 P0_Pz = (10^ r ) ;
10 for i = 1: length ( P0_Pz )
11 Pz_P0 ( i ) = 1 -(1/ P0_Pz ( i ) ) ;
12 end
13 disp ( Pz_P0 *100 , ’ O p t i c a l s i g n a l power d e c r e a s e d by i n
percentage ’)
14 //RESULT
15 // O p t i c a l s i g n a l power d e c r e a s e d by i n p e r c e n t a g e
16 // 49.881277
17 // 74.881136

Scilab code Exa 3.2 1 // C a p t i o n : To C a l c u l a t e i n p u t and


o u t p u t power i n dBm
2 // Example3 . 2

11
3 // p a g e 91
4 clear ;
5 close ;
6 clc ;
7 Pin = 200 e -06; // power l a u n c h e d i n t o t h e f i b e r
8 alpha = 0.4; // a t t e n u a t i o n i n dB p e r KM
9 z = 30; // o p t i c a l f i b e r l e n g t h 30 KM
10 Pin_dBm = 10* log10 ( Pin /1 e -03) ;
11 Pout_dBm = 10* log10 ( Pin /1 e -03) - alpha * z ;
12 Pout = 10^( Pout_dBm /10)
13 disp ( Pin_dBm , ’ Pin dBm ’ )
14 disp ( Pout_dBm , ’ Pout dBm ’ )
15 disp ( Pout *1 e -03 , ’ Output power i n w a t t s ’ )
16 // R e s u l t
17 // Pin dBm = − 6.9897
18 // Pout dBm = − 18.9897
19 // Output power i n w a t t s = 0 . 0 0 0 0 1 2 6

Scilab code Exa 3.3


1 // C a p t i o n : R a y l e i g h s c a t t e r i n g l o s s
2 // Example3 . 3
3 // p a g e 9 7
4 clear ;
5 close ;
6 clc ;
7 alpha_0 = 1.64; // a t t e n u a t i o n a t Lambda 0 i n dB/KM
8 Lambda_0 = 850 e -09; // w a v e l e n g t h 850 n a n o m e t e r
9 Lambda = 1310 e -09; // w a v e l e n g t h 1 3 5 0 n a n o m e t e r
10 alpha_Lambda = alpha_0 *(( Lambda_0 / Lambda ) ^4) ;
11 disp ( alpha_Lambda , ’ R a y l e i g h s c a t t e r i n g l o s s a l p h a (
Lambda ) = ’ )
12 // R e s u l t
13 // R a y l e i g h s c a t t e r i n g l o s s a l p h a ( Lambda ) = 0 . 2 9 0 6 9 2 9

Scilab code Exa 3.4 1 // C a p t i o n : Program t o c a l c u l a t e


p e r c e n t i n d e c r e a s e o f number o f modes

12
2 // Example 3 . 4
3 // p a g e 99
4 clear ;
5 clc ;
6 alpha = 2; // g r a d e d i n d e x p r o f i l e
7 n2 = 1.5; // c l a d d i n g
8 Lamda = 1.3 e -06; // w a v e l e n g t h
9 R = 0.01; // bend r a d i u s o f c u r v a t u r e
10 a = 25 e -06; // c o r e r a d i u s
11 delta = 0.01; // c o r e −c l a d d i n g i n d e x p r o f i l e
12 k = 4.83 e06 ; // p r o p a g a t i o n c o n s t a n t
13 disp (k , ’ k = ’ )
14 part1 = (2* a / R ) + floor ((3/(2* n2 * k * R ) ) ^(2/3) ) ;
15 part2 = ( alpha +2) /(2* alpha * delta ) ;
16 Neff_Ninf = 1 - part1 * part2 ;
17 disp ( ’ number o f modes d e c r e a s e d by ’ )
18 disp ( ’ P e r c e n t i n g r a d e d −i n d e x f i b e r ’ , Neff_Ninf *100)
19 //RESULTS
20 // number o f modes d e c r e a s e d by 50 P e r c e n t i n graded
−i n d e x f i b e r

Scilab code Exa 3.5


1 // C a p t i o n : C a l c u l a t i o n o f p u l s e b r o a d e n i n g
2 // Example3 . 5
3 // p a g e 103
4 clear ;
5 clc ;
6 close ;
7 C = 3 e08 ; // f r e e s p a c e v e l o c i t y i n m e t r e / s e c
8 n1 = 1.48; // c o r e r e f r a c t i v e i n d e x
9 n2 = 1.465; // c l a d d i n g r e f r a c t i v e i n d e x
10 delta = 0.01; // i n d e x d i f f e r e n c e
11 L = 10^3; // f i b e r l e n g t h 10KM
12 deltaT = ( L *( n1 ^2) /( C * n2 ) ) * delta ;
13 disp (( deltaT / L ) *10^12 , ’ p u l s e b r o a d e n i n g i n n s /KM’ )
14 // R e s u l t
15 // p u l s e b r o a d e n i n g i n n s /KM = 4 9 . 8 3 8 4 5 3

13
Scilab code Exa 3.6
1 // C a p t i o n : C a l c u l a t i o n o f bandwidth d i s t a n c e
2 // Example3 . 6
3 // p a g e 104
4 clear ;
5 clc ;
6 close ;
7 n1 = 1.48; // c o r e r e f r a c t i v e i n d e x
8 n2 = 1.465; // c l a d d i n i g r e f r a c t i v e i n d e x
9 delta = 0.01; // i n d e x d i f f e r e n c e
10 C =3*(10^8) ; // f r e e s p a c e v e l c o t i y
11 BL = ( n2 /( n1 ^2) ) *( C / delta ) ;
12 disp ( BL , ’ Bandwidth d i s t a n c e i n bPS−M’ )
13 disp ( BL /10^9 , ’ Bandwidth d i s t a n c e i n MbPS−KM’ )
14 // R e s u l t
15 // Bandwidth d i s t a n c e i n bPS−M
16 // 2 . 0 0 6D+10
17 // Bandwidth d i s t a n c e i n MbPS−KM
18 // 20.064828

Scilab code Exa 3.7 1 // C a p t i o n : Program t o Find o u t t h e


Material Dispersion
2 // Example3 . 7
3 // p a g e 1 0 7
4 clear ;
5 clc ;
6 Lamda = 800 e -09; // Wavelength i n m e t e r
7 sigma_Lamda_LED = 40 e -09; // s p e c t r a l w i d t h i n m e t e r s
8 pulse_spread = 4.4 e -12; // p u l s e s p r e a d i n s e c / m e t e r
9 mat_dispersion = pulse_spread / sigma_Lamda_LED
10 disp ( mat_dispersion , ’ m a t e r i a l d i s p e r s i o n i n s e c o n d s /
square meter ’ )
11 // R e s u l t
12 // m a t e r i a l d i s p e r s i o n i n s e c o n d s / s q u a r e m e t e r

14
0.00011

Scilab code Exa 3.8 1 // C a p t i o n : Program t o Find o u t


Waveguide D i s p e r s i o n
2 // Example3 . 8
3 // p a g e 1 1 0
4 clear ;
5 clc ;
6 n2 = 1.48; // i n d e x o f c l a d d i n g
7 delta = 0.002; // i n d e x d i f f e r e n c e
8 Lamda = 1320 e -09; // Wavelength i n m e t e r s
9 V_dVb_dV = 0.26; // The v a l u e i n s q u a r e b r a c k e t s f o r
v = 2.4
10 C =3 e08 ; // E n t e r t h e v e l o c i t y o f l i g h t i n f r e e s p a c e
11 Dwg_Lamda = -((( n2 * delta ) / C ) *(1/ Lamda ) ) * V_dVb_dV
12 disp ( Dwg_Lamda *1 e06 , ’ The w a v e g u i d e d i s p e r s i o n i n p s /
nm . km ’ ) ;
13 //RESULTS
14 // The w a v e g u i d e d i s p e r s i o n i n p s /nm . km = −
1.9434343

15
Chapter 4

Fourth chapter

Scilab code Exa 4.1 1 // C a p t i o n : Program t o f i n d i n t r i n s i c


carrier concentration
2 // Example4 . 1
3 // p a g e 1 3 6
4 clear ;
5 close ;
6 clc ;
7 m = 9.11 e -31; // E l e c t r o n r e s t mass i n kg
8 me = 0.068* m ; // E f f e c t i v e e l e c t r o n mass kg
9 mh = 0.56* m ; // E f f e c t i v e h o l e mass i n kg
10 Eg = 1.42*1.60218 e -19; // band−gap e n e r g y i n v o l t s
11 kB = 1.38054 e -23; // Boltzma ’ s c o n s t a n t
12 T = 300; // room t e m p e r a t u r e i n k e l v i n
13 h = 6.6256 e -34; // Planck ’ s c o n s t a n t
14 K = 2*((2* %pi * kB * T /( h ^2) ) ^1.5) *(( me * mh ) ^0.75) ; //
c h a r a c t e r i s t i c constant of material
15 ni = K * %e ^( - Eg /(2* kB * T ) ) ;
16 disp ( ni , ’ i n t r i n s i c c a r r i e r c o n c e n t r a t i o n i n c u b i c
meter ’ )
17 // R e s u l t
18 // i n t r i n s i c c a r r i e r c o n c e n t r a t i o n i n c u b e m e t e r
2 . 5 5 1D+12

16
Scilab code Exa 4.3
1 // C a p t i o n : F i n d i n g Enegy gap and Wavelength
2 // Example4 . 3
3 // p a g e 1 4 6
4 clear ;
5 close ;
6 clc ;
7 x =0.07; // c o m p o s i t i o n a l p a r a m e t e r o f GaAlAs
8 Eg = 1.424+1.266* x +0.266* x ^2;
9 Lamda = 1.240/ Eg ;
10 disp ( Eg , ’ Band Energy gap i n ev ’ )
11 disp ( Lamda , ’ Wavelength i n m i c r o m e t e r s ’ )
12 // R e s u l t
13 // Band Energy gap i n ev 1.5139234
14 // Wavelength i n m i c r o m e t e r s 0 . 8 1 9 0 6 3 9

Scilab code Exa 4.4


1 // C a p t i o n : F i n d i n g Enegy gap and Wavelength
2 // Example4 . 4
3 // p a g e 1 4 6
4 clear ;
5 close ;
6 clc ;
7 y =0.57; // c o m p o s i t i o n a l p a r a m e t e r o f InGaAsP
8 Eg = 1.35 -0.72* y +0.12*( y ^2) ;
9 Lamda = 1.240/ Eg ;
10 disp ( Eg , ’ Band Energy gap i n ev ’ )
11 disp ( Lamda , ’ Wavelength i n m i c r o m e t e r s ’ )
12 // R e s u l t
13 // Band Energy gap i n ev 0 . 9 7 8 5 8 8
14 // Wavelength i n m i c r o m e t e r s 1 . 2 6 7 1 3 1 8

Scilab code Exa 4.5


1 // C a p t i o n : To f i n d o u t t h e I n t e r n a l Quantum
E f f i c i e n c y and I n t e r n a l Power l e v e l o f LED s o u r c e
2 // Example4 . 5

17
3 // p a g e 1 4 9
4 clear ;
5 clc ;
6 tuo_r = 30 e -09; // r a d i a t i v e r e c o m b i n a t i o n i n s e c o n d s
7 tuo_nr =100 e -09; // non−r a d i a t i v e r e c o m b i n a t i o n i n
seconds
8 Etta_internal = 1/(1+( tuo_r / tuo_nr ) ) ; // i n t e r n a l
quantum e f f i c i e n c y
9 h = 6.6256 e -34; // Plank ’ s c o n s t a n t
10 C = 3 e08 ; // v e l o c i t y i n m/ s e c
11 q = 1.602 e -19; // e l e c t r o n c h a r g e i n c o u l o m b s
12 I = 40 e -03; // d r i v e c u r r e n t i n Amps
13 Lamda = 1310 e -09; // peak w a v e l e n g t h o f InGaAsP LED
14 Pinternal = ( Etta_internal *(( h * C ) / q ) ) *( I / Lamda ) ; //
i n t e r n a l power l e v e l
15 disp ( Pinternal , ’THE INTERNAL POWER GENRATED WITH IN
LED SOURCE IN WATTS I S ’ ) ;
16 disp ( Etta_internal , ’ The i n t e r n a l Quantum e f f i c i e n c y
f o r t h e g i v e n r a d i a t i v e and non−r a d i a t i v e
r e c o m b i n a t i o n time i s ’ );
17 disp ( Etta_internal *100 , ’ I n t e r n a l Quantum E f f i c i e n c y
i n P e r c e n t a g e ’ );
18 //RESULT
19 //THE INTERNAL POWER GENRATED WITH IN LED SOURCE IN
WATTS I S
20 // 0 . 0 2 9 1 4 2 7
21 // The i n t e r n a l Quantum e f f i c i e n c y f o r t h e g i v e n
r a d i a t i v e and non−r a d i a t i v e r e c o m b i n a t i o n t i m e i s
0.7692308
22 // I n t e r n a l Quantum E f f i c i e n c y i n P e r c e n t a g e
23 // 7 6 . 9 2 3 0 7 7

Scilab code Exa 4.6


1 // C a p t i o n : E x t e r n a l Quantum
Efficiency in percentage
2 // Example 4 . 6
3 // p a g e 1 5 1
4 clear ;

18
5 close ;
6 clc ;
7 n = 3.5; // r e f r a c t i v e i n d e x o f an LED
8 Etta_External = 1/( n *( n +1) ^2) ;
9 disp ( Etta_External *100 , ’ E x t e r n a l E f f i c i e n c y in
percentage ’)
10 // R e s u l t
11 // E x t e r n a l E f f i c i e n c y i n p e r c e n t a g e 1.4109347

Scilab code Exa 4.7


1 // C a p t i o n : Program t o f i n d L a s i n g T h r e s h o l d g a i n
2 // Example4 . 7
3 // p a g e 1 5 6
4 clear ;
5 clc ;
6 L = 500 e -06; // L a s e r d i o d e l e n g t h i n m e t e r s
7 R1 = 0.32 // r e f l e c t i o n c o e f f i c i e n t v a l u e o f one end ;
8 R2 = 0.32 // r e f l e c t i o n c o e f f i c i e n t v a l u e o f a n o t h e r
end ;
9 alpha_bar =10/1 e -02; // a b s o r p t i o n c o e f f i c i e n t ;
10 alpha_end = (1/(2* L ) ) * log (1/( R1 * R2 ) ) ; // m i r r o r l o s s
in the l a s i n g cavity
11 alpha_threshold = alpha_bar + alpha_end ; // t o t a l l o s s
12 disp ( alpha_threshold , ” The T h r e s h o l d Gain p e r m e t r e ” )
13 alpha_threshold_cm = alpha_threshold /100
14 disp ( alpha_threshold_cm ,” The T h r e s h o l d Gain p e r
c e n t i m e t r e ”);
15 // R e s u l t
16 // The T h r e s h o l d Gain p e r m e t r e 3 2 7 8 . 8 6 8 6
17 // The T h r e s h o l d Gain p e r c e n t i m e t r e 3 2 . 7 8 8 6 8 6

Scilab code Exa 4.8 1 // C a p t i o n : Program TO C a l c u l a t e


F r e q u e n c y S p a c i n g & Wavelength S p a c i n g
2 // Example4 . 8
3 // p a g e 1 6 0
4 clear ;

19
5 clc ;
6 Lamda = 850 e -9 // E m i s s i o n w a v e l e n g t h o f LASER d i o d e
7 n = 3.7 // r e f r a c t i v e i n d e x o f LASER d i o d e
8 L = 500 e -6 // l e n g t h o f LASER d i o d e
9 C = 3 e08 // v e l o c i t y o f L i g h t i n f r e e s p a c e
10 delta_frequency = C /((2* L ) * n ) ;
11 delta_Lamda = ( Lamda ^2) /((2* L ) * n ) ;
12 Half_power = 2e -09; // h a l f power p o i n t 3 n a n o m e t e r
13 sigma = sqrt ( -( Half_power ^2) /(2* log (0.5) ) ) ;
14 disp ( delta_frequency , ’ E n t e r t h e f r e q u e n c y s p a c i n g i n
Hertz ’ );
15 disp ( delta_Lamda , ’ E n t e r t h e w a e l e n g t h s p a c i n g i n
metres ’ );
16 disp ( sigma , ’ s p e c t r a l w i d t h o f t h e g a i n ’ ) ;
17 //RESULT
18 // E n t e r t h e f r e q u e n c y s p a c i n g i n H e r t z
19 // 8 . 1 0 8D+10
20 // E n t e r t h e w a e l e n g t h s p a c i n g i n m e t r e s
21 // 1 . 9 5 3D−10
22 // s p e c t r a l w i d t h o f t h e g a i n
23 // 1 . 6 9 9D−09

Scilab code Exa 4.9 1 // C a p t i o n : C a l c u a l t i o n o f number o f


h a l f −w a v e l e n g t h s and w a v e l e n g t h s p a c i n g b e t w e e n
l a s i n g modes
2 // Example4 . 9
3 // p a g e 1 6 1
4 clear ;
5 clc ;
6 close ;
7 Lambda = 900 e -09; // w a v e l e n g t h o f l i g t h e m i t t e d by
l a s e r dioda
8 L = 300 e -06; // l e n g t h o f l a s e r c h i p
9 n = 4.3; // r e f r a c t i v e i n d e x o f t h e l a s e r m a t e r i a l
10 m = 2* L * n / Lambda ; // number o f h a l f −w a v e l e n g t h s
11 delta_Lambda = ( Lambda ^2) /(2* L * n ) ; // w a v e l e n g t h
spacing

20
12 disp (m , ’ number o f h a l f −w a v e l e n g t h s s p a n n i n g t h e
r e g i o n between m i r r o r s u r f a c e s ’ )
13 disp ( delta_Lambda , ’ s p a c i n g b e t w e e n l a s i n g modes i s ’ )
14 // R e s u l t
15 // number o f h a l f −w a v e l e n g t h s s p a n n i n g t h e r e g i o n
between m i r r o r s u r f a c e s 2866.6667
16 // s p a c i n g b e t w e e n l a s i n g modes i s 3 . 1 4 0D−10

21
Chapter 5

Fifth chapter

Scilab code Exa 5.1 1 // C a p t i o n : C a l c u l a t i o n o f L a t e r a l


power d i s t r i b u t i o n c o e f f i c i e n t
2 // Example5 . 1
3 // p a g e 1 9 2
4 clear ;
5 clc ;
6 close ;
7 phi = 0; // l a t e r a l c o o r d i n a t e
8 Half_power = 10; // h a l f power beam w i d t h
9 teta = Half_power /2;
10 teta_rad = teta /57.3;
11 L = log (0.5) / log ( cos ( teta_rad ) ) ;
12 disp (L , ’ L a t e r a l power d i s t r i b u t i o n c o e f f i c i e n t L= ’ )
13 // R e s u l t
14 // L a t e r a l power d i s t r i b u t i o n c o e f f i c i e n t L =
181.83303

Scilab code Exa 5.2 1 // C a p t i o n : Program t o Calcualte


O p t i c a l Power E m i t t e d from t h e L i g h t s o u r c e and
O p t i c a l power c o u p l e d t o s t e p −i n d e x f i b e r
2 // Example5 . 2
3 // p a g e 1 9 4
4 clear ;

22
5 close ;
6 clc ;
7 rs = 35 e -06; // t h e s o u r c e r a d i u s i n m e t e r
8 a = 25 e -06; // t h e c o r e r a d i i o f s t e p −i n d e x fiber
meter
9 NA = 0.20; // t h e n u m e r i c a l a p e r t u r e v a l u e
10 Bo = 150 e04 ; // r a d i a n c e i n W/ s q u a r e m e t e r . s r
11 Ps = (( %pi ^2) *( rs ^2) ) * Bo ; // power e m i t t e d by t h e
source
12 if ( rs <= a ) then
13 PLED_step = Ps *( NA ^2) ;
14 elseif ( rs > a ) then
15 PLED_step = ((( a / rs ) ^2) * Ps ) *( NA ^2) ;
16 end
17 disp ( Ps , ’ O p t i c a l power e m i t t e d by LED l i g h t s o u r c e
Ps = ’ )
18 disp ( PLED_step , ’ O p t i c a l Power c o u p l e d i n t o s t e p
i n d e x f i b e r i n Watts PLED step = ’ ) ;
19 //RESULT
20 // O p t i c a l power e m i t t e d by LED l i g h t s o u r c e Ps =
0.0181354
21 // O p t i c a l Power c o u p l e d i n t o s t e p i n d e x f i b e r i n
Watts PLED step = 0.0003701

Scilab code Exa 5.3 1 // C a p t i o n : F r e s n e l r e f l e c t i o n , power


c o u p l e d and power l o s s
2 // Example5 . 3
3 // p a g e 1 9 4
4 clear ;
5 clc ;
6 close ;
7 n1 =3.6; // r e f r a c t i v e i n d e x o f o p t i c a l s o u r c e
8 n = 1.48; // r e f r a c t i v e i n d e x o f s i l i c a f i b e r
9 R = (( n1 - n ) /( n1 + n ) ) ^2;
10 L = -10* log10 (1 - R ) ;
11 disp (L , ’ Power l o s s i n dB L = ’ )
12 // R e s u l t

23
13 // Power l o s s i n dB L = 0 . 8 3 1 0 3 2 2

Scilab code Exa 5.4 1 // C a p t i o n : Power c o u p l e d b e t w e e n two


graded index f i b e r s
2 // Example5 . 4
3 // p a g e 2 0 5
4 clear ;
5 clc ;
6 close ;
7 a =1 e -06; // c o r e r a d i i i n m e t e r s
8 d = 0.3* a ; // a x i a l o f f s e t
9 PT_P = (2/ %pi ) *( acos ( d /(2* a ) ) -(1 -( d /(2* a ) ) ^2) ^0.5*( d
/(6* a ) ) *(5 -0.5*( d / a ) ^2) ) ;
10 PT_P_dB = 10* log10 ( PT_P )
11 disp ( PT_P_dB , ’ O p t i c a l power c o u p l e d from f i r s t f i b e r
i n t o s e c o n d f i b e r i n dB i s = ’ )
12 // R e s u l t
13 // O p t i c a l power c o u p l e d from f i r s t f i b e r i n t o s e c o n d
f i b e r i n dB i s = − 1.2597813

Scilab code Exa 5.5 1 // C a p t i o n : L o s s b e t w e e n s i n g l e mode


f i b e r s due t o L a t e r a l m i s a l i g n m e n t
2 // Example5 . 5
3 // p a g e 211
4 clear ;
5 clc ;
6 close ;
7 V = 2.405; // n o r m a l i z e d f r e q u e n c y
8 n1 =1.47; // c o r e r e f r a c t i v e i n d e x
9 n2 = 1.465; // c l a d d i n g r e f r a c t i v e i n d e x
10 a = (9/2) *10^ -06; // c o r e r a d i i i n m e t e r s
11 d = 1e -06; // l a t e r a l o f f s e t i n m e t e r s
12 W = a *(0.65+1.619* V ^( -1.5) +2.879* V ^ -6) ;
13 Lsm = -10* log10 ( exp ( -( d / W ) ^2) ) ;
14 disp (W , ’ mode− f i e l d d i a m e t e r i n m e t e r s W = ’ ) ;

24
15 disp ( Lsm , ’ L o s s b e t w e e n s i n g l e mode o p t i c a l f i b e r s
due t o l a t e r a l o f f s e t Lsm = ’ )
16 // R e s u l t
17 // mode− f i e l d d i a m e t e r i n m e t e r s W = 0 . 0 0 0 0 0 4 9
18 // L o s s b e t w e e n s i n g l e mode o p t i c a l f i b e r s due t o
l a t e r a l o f f s e t Lsm = 0 . 1 7 7 5 7 9 7

Scilab code Exa 5.6 1 // C a p t i o n : L o s s b e t w e e n s i n g l e mode


f i b e r s due t o a n g u l a r m i s a l i g n m e n t
2 // Example5 . 6
3 // p a g e 2 1 2
4 clear ;
5 clc ;
6 close ;
7 clear ;
8 clc ;
9 close ;
10 V = 2.405; // n o r m a l i z e d f r e q u e n c y
11 n1 =1.47; // c o r e r e f r a c t i v e i n d e x
12 n2 = 1.465; // c l a d d i n g r e f r a c t i v e i n d e x
13 a = (9/2) *10^ -06; // c o r e r a d i i i n m e t e r s
14 d = 1e -06; // l a t e r a l o f f s e t i n m e t e r s
15 W = a *(0.65+1.619* V ^( -1.5) +2.879* V ^ -6) ; // mode− f i e l d
diameter
16 teta = 1; // i n d e g r e e s
17 teta = 1/57.3; // i n r a d a i a n s
18 Lambda = 1300 e -09; // w a v e l e n g t h i n m e t e r s
19 Lsm_ang = -10* log10 ( exp ( -( %pi * n2 * W * teta / Lambda ) ^2) ) ;
20 disp ( Lsm_ang , ’ L o s s b e t w e e n s i n g l e mode f i b e r s due t o
a n g u l a r m i s a l i g n m e n t Lsm ang = ’ )
21 // R e s u l t
22 // L o s s b e t w e e n s i n g l e mode f i b e r s due t o a n g u l a r
m i s a l i g n m e n t Lsm ang = 0 . 4 0 5 4 6 5 8

25
Chapter 6

Sixth chapter

Scilab code Exa 6.1


1 // C a p t i o n : Cut− o f f w a v e l e n g t h o f p h o t o d i o d e
2 // Example6 . 1
3 // p a g e 2 2 4
4 clear ;
5 clc ;
6 close ;
7 h = 6.625*(10^ -34) ; // p l a n k s c o n s t a n t
8 C = 3*(10^8) ; // f r e e s p a c e v e l o c i t y
9 Eg = 1.43*1.6*(10^ -19) ; // j o u l e s
10 LambdaC = h * C / Eg ;
11 disp ( LambdaC , ’ Cut− o f f Wavelength o f p h o t o d i o d e i n
meters =’ )
12 // R e s u l t
13 // Cut− o f f Wavelength o f p h o t o d i o d e i n m e t e r s=
0.0000009

Scilab code Exa 6.2


1 // C a p t i o n : C a l c u l a t i o n o f Quantum e f f i c i e n c y
2 // Example6 . 2
3 // p a g e 226
4 clear ;
5 clc ;

26
6 close ;
7 Ip_q = 5.4*(10^6) ; // e l e c t r o n −h o l e p a i r s g e n e r a t e d
8 Pin_hv = 6*(10^6) ; // number o f i n c i d e n t p h o t o n s
9 etta = Ip_q / Pin_hv ;
10 disp ( etta , ’ Quantum e f f i c i e n c y = ’ )
11 disp ( etta *100 , ’ Quantum e f f i c i e n c y i n p e r c e n t a g e = ’ )
12 // R e s u l t
13 // Quantum e f f i c i e n c y = 0 . 9
14 // Quantum e f f i c i e n c y i n p e r c e n t a g e = 9 0 .

Scilab code Exa 6.3


1 // C a p t i o n : C a l c u l a t i o n o f p h o t o c u r r e n t
2 // Example6 . 3
3 // p a g e 2 2 6
4 clear ;
5 clc ;
6 close ;
7 R = 0.65; // R e s p o n s i v i t y o f p h o t o d i o d e
8 Pin = 10*(10^ -6) ; // O p t i c a l power l e v e l i n w a t t s
9 Ip = R * Pin ;
10 disp ( Ip *10^6 , ’ The amount o f p h o t o c u r r e n t g e n e r a t e d
i n uA = ’ )
11 // R e s u l t
12 // The amount o f p h o t o c u r r e n t g e n e r a t e d i n uA = 6 . 5

Scilab code Exa 6.4


1 // C a p t i o n : C a l c u l a t i o n o f
Responsivity of photodiode
2 // Example6 . 4
3 // p a g e 2 2 7
4 clear ;
5 clc ;
6 close ;
7 Lambda = 1300 e -09; // w a v e l e n g t h i n m e t e r s
8 C = 3*(10^8) ; // f r e e s p a c e v e l o c i t y
9 v = C / Lambda ; // f r e q u e n c y i n Hz
10 q = 1.6*(10^ -19) ; // Change i n c o u l o m b s

27
11 etta = 0.9; // quantum e f f i c i e n c y 90%
12 h = 6.625*10^ -34; // p l a n k s c o n s t a n t
13 R = ( etta * q ) /( h * v ) ; // R e s p o n s i v i t y
14 disp (R , ’ R e s p o n s i v i t y o f p h o t o d i o d e a t 1 3 3 0nm i n A/W
R = ’)
15 Eg = 0.73; // e n e r g y gap i n e l e c t r o n v o l t s
16 LambdaC = 1.24/ Eg ; // cut − o f f w a v e l e n g t h i n m e t e r s
17 disp ( LambdaC , ’ cut − o f f w a v e l e n g t h i n m e t e r s = ’ )
18 // R e s u l t
19 // R e s p o n s i v i t y o f p h o t o d i o d e a t 1 3 3 0nm i n A/W R =
0.9418868
20 // cut − o f f w a v e l e n g t h i n m e t e r s = 1 . 6 9 8 6 3 0 1

Scilab code Exa 6.5 1 // C a p t i o n : To f i n d p r i m a r y


p h o t o c u r r e n t and m u l t i p l i c a t i o n f a c t o r
2 // Example6 . 5
3 // p a g e 2 3 0
4 clear ;
5 clc ;
6 close ;
7 etta = 0.65; // quantum e f f i c i e n c y o f s i l i c o n
qavalanche photodiode
8 C = 3*(10^8) ; // f r e e s p a c e v e l o c i t y i n m/ s
9 Lambda = 900 e -09; // w a v e l e n g t h i n m e t e r s
10 q = 1.6*(10^ -19) ; // c h a r g e i n c o u l o m b s
11 h = 6.625*(10^ -34) ; // p l a n k s c o n s t a n t
12 v = C / Lambda ; // f r e q u n e c y i n Hz
13 Pin = 0.5*10^ -06; // o p t i c a l power
14 Ip = (( etta * q ) /( h * v ) ) * Pin ;
15 Im = 10*(10^ -06) ; // m u l t i p l i e d p h o t o c u r r e n t
16 M = Im / Ip ; // m u l t i p l i c a t i o n f a c t o r
17 disp ( Ip *10^6 , ’ Primary p h o t o c u r r e n t i n uAmps I p= ’ )
18 disp ( ceil ( M ) , ’ Primary p h o t o c u r r e n t i s m u l t i p l i e d by
a factor of M =’)
19 // R e s u l t
20 // Primary p h o t o c u r r e n t i n uAmps I p = 0.2354717

28
21 // Primary p h o t o c u r r e n t i s m u l t i p l i e d by a f a c t o r o f
M = 43.

Scilab code Exa 6.6 1 // C a p t i o n : Mean−s q u a r e s h o t n o i s e


c u r r e n t , Mean−s q u a r e d a r k c u r r e n t and Mean−S q u a r e
thermal noise current
2 // Example6 . 6
3 // p a g e 234
4 clear ;
5 clc ;
6 close ;
7 Lambda = 1330 e -09; // w a v e l e n g t h i n m e t e r s
8 ID = 4e -09; // p h o t o d i o d e c u r r e n t
9 etta = 0.90; // quantum e f i c i e n c y
10 RL = 1000; // Load r e s i s t a n c e 1 0 0 0 ohms
11 Pin = 300 e -09; // i n c i d e n t o p t i c a l power i s 300 nano
watts
12 Be = 20*(10^6) ; // r e c e i v e r bandwidth
13 q = 1.6*(10^ -19) ; // c h a r g e i n c o u l o m b s
14 h = 6.625*10^ -34; // p l a n k s c o n s t a n t
15 v = (3*10^8) / Lambda ; // f r e q u e n c y i n Hz
16 Ip = ( etta * q * Pin ) /( h * v ) ; // p r i m a r y p h o t o c u r r e n t
17 Ishot = 2* q * Ip * Be ; // s h o t −n o i s e c u r r e n t
18 Ishot = sqrt ( Ishot ) ;
19 IDB = 2* q * ID * Be ; // d a r k c u r r e n t
20 IDB = sqrt ( IDB ) ;
21 T = 283; // room t e m p e r a t u r e i n k e l v i n
22 KB = 1.38*10^ -23; // boltzmann ’ s c o n s t a n t
23 RL = 1000; // l o a d r e s i s t a n c e
24 IT = (4* KB * T ) * Be / RL ; // Thermal n o i s e c u r r e n t
25 IT = sqrt ( IT ) ;
26 disp ( Ip *10^6 , ’ p r i m a r y p h o t o c u r r e n t i n uA IP = ’ )
27 disp ( Ishot *10^9 , ’ mean−s q u a r e s h o t n o i s e c u r r e n t f o r
a p i n p h o t o d i o d e i n nA I s h o t = ’ )
28 disp ( IDB *10^9 , ’ mean−s q u a r e d a r k c u r r e n t i n nA IDB= ’ )
29 disp ( IT *10^9 , ’ mean−s q u a r e t h e r m a l n o i s e c u r r e n t f o r
t h e r e c e i v e r i n nA IT = ’ )

29
30 // R e s u l t
31 // p r i m a r y p h o t o c u r r e n t i n uA IP = 0 . 2 8 9 0 8 6 8
32 // mean−s q u a r e s h o t n o i s e c u r r e n t f o r a p i n
p h o t o d i o d e i n nA I s h o t = 1 . 3 6 0 2 0 4 2
33 // mean−s q u a r e d a r k c u r r e n t i n nA IDB = 0 . 1 6
34 // mean−s q u a r e t h e r m a l n o i s e c u r r e n t f o r t h e r e c e i v e r
i n nA IT = 1 7 . 6 7 5 7 4 6

Scilab code Exa 6.7


1 // C a p t i o n : c i r c u i t bandwidth o f a p h o t o d i o d e
2 // Example6 . 7
3 // p a g e 239
4 clear ;
5 clc ;
6 close ;
7 CP = 3*10^ -12; // p h o t o d i o d e c a p a c i t a n c e i s 3 p i c o
farad
8 CA = 4*10^ -12; // a m p l i f i e r c a p c i t a n c e i s 4 p i c o f a r a d
9 CT = CP + CA ; // t o t a l c a p a c i t a n c e
10 RT1 = 1000; // p h o t o d i o d e l o a d r e s i s t a n c e
11 BC1 = 1/(2* %pi * RT1 * CT ) ; // c i r c u i t bandwidth
12 RT2 = 50; // p h o t o d i o d e l o a d r e s i s t a n c e
13 BC2 = 1/(2* %pi * RT2 * CT ) ; // c i r c u i t bandwidth
14 disp ( BC1 , ’ C i r c u i t bandwidth f o r 1 k i l o Ohm p h o t o d i o d e
r e s i s t a n c e BC1 = ’ )
15 disp ( BC2 , ’ C i r c u i t bandwidth f o r 50 ohm p h o t o d i o d e
r e s i s t a n c e BC2 = ’ )
16 // R e s u l t
17 // C i r c u i t bandwidth f o r 1 k i l o Ohm p h o t o d i o d e
r e s i s t a n c e BC1 = 2 2 7 3 6 4 2 0 .
18 // C i r c u i t bandwidth f o r 50 ohm p h o t o d i o d e r e s i s t a n c e
BC2 = 4 . 5 4 7D+08

30
Chapter 7

Seventh chapter

Scilab code Exa 7.1


1 // C a p t i o n : To f i n d optimum d e c i s i o n t h r e s h o l d
2 // Example7 . 1
3 // Page 258
4 clear ;
5 clc ;
6 close ;
7 bon = 1;
8 boff =0;
9 sigma_on = 1;
10 sigma_off = 1;
11 Q = ( bon - boff ) /( sigma_on + sigma_off )
12 Vth = bon - Q * sigma_on
13 disp (Q , ’Q p a r a m e t e r v a l u e = ’ )
14 disp ( Vth , ’ optimum d e c i s i o n t h r e s h o l d Vth = ’ )
15 // R e s u l t
16 //Q p a r a m e t e r v a l u e = 0 . 5
17 // optimum d e c i s i o n t h r e s h o l d Vth = 0 . 5

Scilab code Exa 7.2


1 // C a p t i o n : To f i n d o u t s i g n a l −to −n o i s e r a t i o and
p r o b a b i l i t y o f e r r o r f o r g i v e n ’Q’
2 // Example7 . 2

31
Figure 7.1: Figure for Example7.3

3 // Page 258
4 clear ;
5 clc ;
6 close ;
7 Q = 6;
8 Pe = (1/2) *(1 - erf ( Q / sqrt (2) ) ) ;
9 S_N_dB = 10* log10 (2* Q ) ;
10 disp ( Pe , ’ P r o b a b i l i t y o f e r r o r Pe (Q) = ’ )
11 disp ( S_N_dB , ’ S i g n a l −to −n o i s e r a t i o i n dB S/N = ’ )
12 // R e s u l t
13 // P r o b a b i l i t y o f e r r o r Pe (Q) = 9 . 8 6 6D−10
14 // S i g n a l −to −n o i s e r a t i o i n dB S/N = 1 0 . 7 9 1 8 1 2

32
Scilab code Exa 7.3
1 // C a p t i o n : P l o t t i n g B i t −E r r o r −Rate v e r s u s Q f a c t o r
2 // Example7 . 3
3 // p a g e 259
4 clear ;
5 clc ;
6 close ;
7 Q = 0:0.01:8;
8 Pe = (1/2) *(1 - erf ( Q ./ sqrt (2) ) ) ;
9 a = gca () ;
10 a . data_bounds =[0 ,1 e -16;8 ,0.5];
11 plot (Q , Pe , ’ r ’ )
12 xlabel ( ’Q ’ )
13 ylabel ( ’ Pe ’ )
14 title ( ’BER( Pe ) v e r s u s t h e f a c t o r Q ’ )
15 disp ( Pe (1) , ’ P r o b a b i l i t y o f e r r o r a t Q =0 ’ )
16 disp ( Pe (101) , ’ P r o b a b i l i t y o f e r r o r a t Q =1 ’ )
17 disp ( Pe (201) , ’ P r o b a b i l i t y o f e r r o r a t Q =2 ’ )
18 disp ( Pe (301) , ’ P r o b a b i l i t y o f e r r o r a t Q =3 ’ )
19 disp ( Pe (401) , ’ P r o b a b i l i t y o f e r r o r a t Q =4 ’ )
20 disp ( Pe (501) , ’ P r o b a b i l i t y o f e r r o r a t Q =5 ’ )
21 disp ( Pe (601) , ’ P r o b a b i l i t y o f e r r o r a t Q =6 ’ )
22 disp ( Pe (701) , ’ P r o b a b i l i t y o f e r r o r a t Q =7 ’ )
23 disp ( Pe (801) , ’ P r o b a b i l i t y o f e r r o r a t Q =8 ’ )
24 // R e s u l t
25 // P r o b a b i l i t y o f e r r o r a t Q =0
26 // 0.5
27 // P r o b a b i l i t y o f e r r o r a t Q =1
28 // 0.1586553
29 // P r o b a b i l i t y o f e r r o r a t Q =2
30 // 0.0227501
31 // P r o b a b i l i t y o f e r r o r a t Q =3
32 // 0.0013499
33 // P r o b a b i l i t y o f e r r o r a t Q =4
34 // 0.0000317
35 // P r o b a b i l i t y o f e r r o r a t Q =5
36 // 0.0000003
37 // P r o b a b i l i t y o f e r r o r a t Q =6

33
38 // 9 . 8 6 6D−10
39 // P r o b a b i l i t y o f e r r o r a t Q =7
40 // 1 . 2 8 0D−12
41 // P r o b a b i l i t y o f e r r o r a t Q =8
42 // 6 . 1 0 6D−16

Scilab code Exa 7.4 1 // C a p t i o n : To f i n d t h e e n e r g y o f t h e


p h o t o n i n c i d e n t on p h o t o d i o d e
2 // and Minimum i n c i d e n t o p t i c a l power
3 // Example7 . 4
4 // p a g e 262
5 clear ;
6 clc ;
7 close ;
8 h = 6.626 e -34; // p l a n k s c o n s t a n t J / s
9 C = 3 e08 ; // f r e e s p a c e v e l o c i t y i n m/ s
10 B = 10 e06 ; // d a t a r a t e 10 Mb/ s e c
11 tuo = 2/ B ; // 1/ t u o = h a l f t h e d a t a r a t e B
12 Lambda = 850 e -09; // o p e r a t i n g w a v e l e n g t h i n nm
13 E = 20.7* h * C / Lambda ;
14 Pi = E / tuo ;
15 disp (E , ’ Energy o f t h e i n c i d e n t p h o t o n E = ’ )
16 disp ( Pi , ’ minimum i n c i d e n t o p t i c a l power Pi = ’ )
17 disp (10* log10 ( Pi *1000) , ’ minimum i n c i d e n t o p t i c a l
power i n dBm = ’ )
18 // R e s u l t
19 // Energy o f t h e i n c i d e n t p h o t o n E = 4 . 8 4 1D−18
20 // minimum i n c i d e n t o p t i c a l power Pi = 2 . 4 2 0D−11
21 // minimum i n c i d e n t o p t i c a l power i n dBm = −
76.161059

34
Chapter 8

Eight chapter

Scilab code Exa 8.1 1 // C a p t i o n : Program t o c a l c u l a t e t h e


T o t a l O p t i c a l Power l o s s
2 // Example8 . 1
3 // p a g e 287
4 clear ;
5 clc ;
6 close ;
7 system_margin = 6; // i n dB
8 alpha = 3.5; // a t t e n u a t i o n i n dB/Km
9 L =6; // Length o f t r a n s m i s s i o n p a t h i n Km
10 lc = 1; // c o n n e c t o r l o s s i n dB
11 PT = 2* lc + alpha * L + system_margin ;
12 disp ( PT , ’ The t o t a l o p t i c a l power l o s s i n dB PT = ’ )
13 // R e s u l t
14 // The t o t a l o p t i c a l power l o s s i n dB PT = 2 9 .

Scilab code Exa 8.2


1 // C a p t i o n : Program t o c a l c u l a t e t h e s y s t e m m a r g i n
2 // Example8 . 2
3 // p a g e 288
4 clear ;
5 clc ;
6 close ;

35
7 Ps = 3; // l a s e r o u t p u t i n dBm
8 APD_sen = -32; //APD s e n s i t i v i t y i n dBm
9 Allowed_Loss = Ps - APD_sen ; // i n dB
10 lsc = 1; // s o u r c e c o n n e c t o r l o s s i n dB
11 ljc = 2*4; // two ( jumper+c o n n e c t o r l o s s ) i n dB
12 alpha = 0.3; // a t t e n u a t i o n i n dB/Km
13 L = 60; // c a b l e l e n g t h i n Km
14 cable_att = alpha *60; // c a b l e a t t e n u a t i o n i n dB
15 lrc = 1; // r e c e i v e r c o n n e c t o r l o s s i n dB
16 system_margin = Allowed_Loss - lsc - ljc - cable_att - lrc ;
17 disp ( system_margin , ’ The F i n a l Margin i n dB = ’ )
18 // R e s u l t
19 // ’ The F i n a l Margin i n dB = 7 .

Scilab code Exa 8.3


1 // C a p t i o n : Program t o c a l c u l a t e l i n k r i s e t i m e
2 // Example8 . 3
3 // p a g e 291
4 clear ;
5 clc ;
6 close ;
7 t_tx = 15 e -09; // t r a n s m i t t e r r i s e t i m e
8 t_mat = 21 e -09; // m a t e r i a l d i s p e r s i o n r e l a t e d r i s e
time
9 t_mod = 3.9 e -09; // r i s e t i m e r e s u l t i n g from modal
dispersion
10 t_rx =14 e -09; // r e c e i v e r r i s e t i m e
11 tsys = sqrt ( t_tx ^2+ t_mat ^2+ t_mod ^2+ t_rx ^2)
12 disp ( tsys *1 e09 , ’ l i n k r i s e t i m e i n nano s e c o n d s t s y s
=’)
13 // R e s u l t
14 // l i n k r i s e t i m e i n nano s e c o n d s t s y s = 2 9 . 6 1 7 7 3 1

Scilab code Exa 8.4


1 // C a p t i o n : Program t o c a l c u l a t e l i n k r i s e t i m e
2 // Example8 . 4

36
3 // p a g e 2 9 2
4 clear ;
5 clc ;
6 close ;
7 t_tx = 25 e -12; // t r a n s m i s s i o n r i s e t i m e i n s e c
8 t_GVD = 12 e -12; //GVD r i s e t i m e i n s e c
9 t_rx = 0.14 e -09; // r e c e i v e r r i s e t i m e i n s e c
10 tsys = sqrt ( t_tx ^2+ t_GVD ^2+ t_rx ^2)
11 disp ( tsys *1 e09 , ’ l i n k r i s e t i m e i n nano s e c o n d s tsys
=’)
12 // R e s u l t
13 // l i n k r i s e t i m e i n nano s e c o n d s t s y s = 0 . 1 4 2 7 2 0 0

Scilab code Exa 8.5 1 // C a p t i o n : C a l c u l a t i o n o f Number o f


b i t s a f f e c t e d by a b u r s t e r r o r
2 // Example8 . 5
3 // p a g e 306
4 clear ;
5 clc ;
6 close ;
7 bit_error_dur = 1e -03; // b i t −c o r r u p t i n g b u r s t n o i s e
d u r a t i o n i n msec
8 B = 10 e03 ; // d a t a r a t e 10 kb / s e c
9 N = B * bit_error_dur ;
10 disp (N , ’ Number o f b i t s a f f e c t e d by a b u r s t e r r o r N= ’
)
11 // R e s u l t
12 // Number o f b i t s a f f e c t e d by a b u r s t e r r o r N = 1 0 .

Scilab code Exa 8.6 1 // C a p t i o n : Program t o f i n d


c o e f f i c i e n t s of generator polynomial
2 // Example8 . 6
3 // p a g e 308
4 clear ;
5 clc ;

37
6 close ;
7 x = poly (0 , ’ x ’ ) ;
8 G = x ^7+0+ x ^5+0+0+ x ^2+ x +1;
9 C = coeff ( G ) ;
10 disp ( C ( $ : -1:1) , ’ C o e f f i c i e n t s of generator polynomial
C =’)
11 // R e s u l t
12 // C o e f f i c i e n t s o f g e n e r a t o r p o l y n o m i a l C = 1 . 0.
1. 0. 0. 1. 1. 1.

Scilab code Exa 8.7 1 // C a p t i o n : Program t o f i n d CRC(


C y c l i c Redundancy Check )
2 // Example8 . 7
3 // p a g e 308
4 clear ;
5 clc ;
6 close ;
7 x = poly (0 , ’ x ’ ) ;
8 m = [1 ,1 ,1 ,1 ,0];
9 G = x ^7+ x ^6+ x ^5+ x ^4+0+0+0+0;
10 D = x ^3+0+ x +1;
11 [R , Q ] = pdiv (G , D )
12 R = coeff ( R ) ;
13 Q = coeff ( Q ) ;
14 R = abs ( modulo (R ,2) ) ;
15 Q = abs ( modulo (Q ,2) ) ;
16 disp (R , ’ Remainder R = ’ )
17 disp (Q , ’ Q u o t i e n t Q = ’ )
18 disp ([ m R ] , ’CRC f o r t h e g i v e n i n f o r m a t i o n CRC = ’ )
19 // R e s u l t
20 // Remainder R =
21 // 1. 0. 1.
22 // Q u o t i e n t Q =
23 // 1. 1. 0. 1. 1.
24 //CRC f o r t h e g i v e n i n f o r m a t i o n CRC =
25 // 1. 1. 1. 1. 0. 1. 0. 1.

38
Scilab code Exa 8.8 1 // C a p t i o n : Program t o p e r c e n t a g e o f
b u r s t e r r o r d e t e c t e d by CRC
2 // Example8 . 8
3 // p a g e 309
4 clear ;
5 clc ;
6 close ;
7 N =32;
8 Ped = 1 -(1/(2^ N ) ) ;
9 disp ( Ped *100 , ’ P e r c e n t o f b u r s t e r r o r d e t e c t e d by CRC
f o r a l e n g t h o f 32 Ped= ’ )
10 // R e s u l t
11 // P e r c e n t o f b u r s t e r r o r d e t e c t e d by CRC f o r a
l e n g t h o f 32 Ped =100.

Scilab code Exa 8.9 1 // C a p t i o n : P e r c e n t o v e r h e a d t o t h e


i n f o r a m t i o n s t r e a m U s i n g Reed−Solomon c o d e f o r
error correction
2 // Example8 . 9
3 // p a g e 309
4 clear ;
5 clc ;
6 close ;
7 S =8; // Reed−Solomon c o d e w i t h 1 b y t e
8 n = (2^ S -1) ; // l e n g t h o f c o d e d s e q u e n c e
9 k = 239; // l e n g t h o f m e s s a g e s e q u e n c e
10 r = n-k;
11 disp (r , ’ number o f r e d u n d a n t b y t e s r = ’ )
12 disp (( r / k ) *100 , ’ P e r c e n t o v e r h e a d = ’ )
13 // R e s u l t
14 // number o f r e d u n d a n t b y t e s r = 1 6 .
15 // P e r c e n t o v e r h e a d = 6.6945607

39
Chapter 9

Ninth chapter

Scilab code Exa 9.1 1 // C a p t i o n : Program t o f i n d R e l a t i v e


I n t e n s i t y N o i s e ( RIN )
2 // Example9 . 1
3 // p a g e 320
4 clear ;
5 clc ;
6 close ;
7 IB_Ith = [1.3 ,1.4 ,1.5 ,1.6]; // r a t i o b e t w e e n b i a s
c u r r e n t and t h r e s h o l d c u r r e n t
8 f = 100 e06 ; // f r e q u e n c y = 100MHz
9 RIN = (( IB_Ith -1) ^ -3) / f ;
10 RIN_dB = 20* log10 ( RIN ) ;
11 disp ( RIN_dB , ’ R e l a t i v e I n t e n s i t y N o i s e ( RIN ) i n dB/Hz
RIN dB = ’ )
12 // R e s u l t
13 // R e l a t i v e I n t e n s i t y N o i s e ( RIN ) i n dB/Hz RIN dB =
14 // − 128.62728 − 136.1236 − 141.9382 −
146.68908

Scilab code Exa 9.2 1 // C a p t i o n : Program t o Find l i m i t i n g


c o n d i t i o n s f o r pin −p h o t o d i o d e
2 // Example9 . 3

40
Figure 9.1: Figure for Example9.2Preamplifier

41
Figure 9.2: Figure for Example9.2quantumnoise

42
Figure 9.3: Figure for Example9.2reflectionnoise

43
3 // p a g e 323
4 clear ;
5 clc ;
6 close ;
7 T =300; // room t e m p e r a t u r e i n k e l v i n
8 kB = 1.38054 e -23; // Boltzmann ’ s c o n s t a n t i n J o u l e s / k
9 m =0.25; // m o d u a l t i o n i n d e x
10 RIN_dB = -143; // R e l a t i v e i n t e n s i t y i n dB/Hz
11 RIN = 10^( RIN_dB /10) ;
12 Pc = (10^(0/10) ) *1 e -3; // power c o u p l e d t o o p t i c a l
f i b e r i n dBm
13 R = 0.6; // R e s p o n s i v i t y A/w
14 Be = 10 e06 ; // bandwidth 10MHz
15 ID = 10 e -09; // d a r k c u r r e n t 10nA
16 Req = 750; // e q u i v a l e n t r e s i s t a n c e 750 ohm
17 Ft = 10^(3/10) ; // i n 3 dB
18 M = 1; // M u l t i p l i c a t i o n f a c t o r f o r p i n p h o t o d i o d e
19 R = 0.6; // r e s p o n s i v i t y i n A/m
20 q = 1.602 e -19; // c h a r g e i n c o u l o m b s
21 p = 0: -1: -20;
22 P = (10^( p /10) ) *1 e -3;
23 C_N_1 = 0.5*(( m * R * P ) ^2) /(4* kB * T * Be * Ft / Req ) ;
24 C_N_3 = 0.5* m ^2/( RIN * Be ) ;
25 C_N_2 = 0.5* m ^2* R * P /(2* q * Be ) ;
26 figure
27 plot (p ,10* log10 ( C_N_1 ) , ’ r ’ )
28 xlabel ( ’ R e c e i v e d O p t i c a l Power (dBm) ’ )
29 ylabel ( ’ C a r r i e r −to −n o i s e r a t i o ( dB ) ’ )
30 title ( ’ C a r r i e r −to −n o i s e r a t i o 1 ( P r e a m p l i f i e r
receiver noise ) ’)
31 figure
32 plot (p ,10* log10 ( C_N_2 ) , ’m ’ )
33 xlabel ( ’ R e c e i v e d O p t i c a l Power (dBm) ’ )
34 ylabel ( ’ C a r r i e r −to −n o i s e r a t i o ( dB ) ’ )
35 title ( ’ C a r r i e r −to −n o i s e r a t i o 2 ( Quantum n o i s e ) ’ )
36 figure
37 plot (p ,10* log10 ( C_N_3 ) * ones (1 , length ( p ) ) )
38 xlabel ( ’ R e c e i v e d O p t i c a l Power (dBm) ’ )

44
39 ylabel ( ’ C a r r i e r −to −n o i s e r a t i o ( dB ) ’ )
40 title ( ’ C a r r i e r −to −n o i s e r a t i o 3 ( R e f l e c t i o n n o i s e ) ’ )

45
Chapter 10

Tenth chapter

Scilab code Exa 10.1


1 // C a p t i o n : F i n d i n g t h e c e n t e r w a v e l e n g t h
2 // Example10 . 1
3 // p a g e 343
4 clear ;
5 clc ;
6 close ;
7 delta_v = 14 e12 ; // o p t i c a l bandwidth
8 Lambda = 1520; // s p e c t r a l band
9 C = 3 e08 ; // f r e e s p a c e v e l o c i t y
10 delta_Lambda = ( Lambda ^2) * delta_v / C ;
11 disp ( delta_Lambda *1 e -09 , ’ s p e c t r a l band i n nano m e t e r
’)
12 // R e s u l t
13 // s p e c t r a l band i n nano m e t e r = 1 0 7 . 8 1 8 6 7

Scilab code Exa 10.2


1 // C a p t i o n : F i n d i n g mean f r e q u e n c y s p a c i n g
2 // Example10 . 2
3 // p a g e 343
4 clear ;
5 clc ;
6 close ;

46
7 C = 3 e08 ; // f r e e s p a c e v e l o c i t y
8 delta_Lambda = 0.8 e -09; // s p e c t r a l band i n m e t e r
9 Lambda = 1550 e -09; // w a v e l e n g t h i n m e t e r
10 delta_v = C * delta_Lambda / Lambda ^2;
11 disp ( ceil ( delta_v *1 e -09) , ’ Mean F r e q u e n c y s p a c i n g i n
GHz = ’ )
12 // R e s u l t
13 // Mean F r e q u e n c y s p a c i n g i n GHz = 1 0 0 .

Scilab code Exa 10.3 1 // C a p t i o n : Program t o f i n d c o u p l i n g


r a t i o , E x c e s s l o s s , I n s e r t i o n l o s s , Return l o s s
o f 2 x2 F i b e r c o u p l e r
2 // Example10 . 3
3 // p a g e 348
4 clear ;
5 clc ;
6 close ;
7 P0 = 200 e -06; // i n p u t o p t i c a l power l e v e l i n w a t t s
8 P1 = 90 e -06; // o u t p u t power a t p o r t 1
9 P2 = 85 e -06; // o u t p u t power a t p o r t 2
10 P3 = 6.3 e -09; // o u t p u t power a t p o r t 3
11 Coupling_ratio = ( P2 /( P1 + P2 ) ) *100;
12 Excess_loss = 10* log10 ( P0 /( P1 + P2 ) ) ;
13 Insertion_loss_0_1 = 10* log10 ( P0 / P1 ) ;
14 Insertion_loss_0_2 = 10* log10 ( P0 / P2 ) ;
15 Return_loss = 10* log10 ( P3 / P0 ) ;
16 disp ( Coupling_ratio , ’ C o u p l i n g r a t i o ’ )
17 disp ( Excess_loss , ’ E x c e s s l o s s i n dB ’ )
18 disp ( Insertion_loss_0_1 , ’ I n s e r t i o n l o s s ( p o r t 0 t o
p o r t 1 ) i n dB ’ )
19 disp ( Insertion_loss_0_2 , ’ I n s e r t i o n l o s s ( p o r t 0 t o
p o r t 2 ) i n dB ’ )
20 disp ( Return_loss , ’ Retunr l o s s i n dB ’ )
21 // R e s u l t
22 // C o u p l i n g r a t i o
23 // 48.571429
24 // E x c e s s l o s s i n dB

47
25 // 0.5799195
26 // I n s e r t i o n l o s s ( p o r t 0 t o p o r t 1 ) i n dB
27 // 3.4678749
28 // I n s e r t i o n l o s s ( p o r t 0 t o p o r t 2 ) i n dB
29 // 3.7161107
30 // Retunr l o s s i n dB
31 // − 45.016894

Scilab code Exa 10.5 1 // C a p t i o n : F i n d i n g o u t p u t p o w e r s a t


o u t p u t p o r t o f 2 x2 c o u p l e r
2 // Example10 . 5
3 // p a g e 350
4 clear ;
5 clc ;
6 close ;
7 S = sqrt (1/2) *[1 , %i ; %i ,1]; // s c a t t e r i n g m a t r i x
8 Ein = [1;0];
9 Eout = S * Ein ;
10 Pout1 = Eout (1) * conj ( Eout (1) ) ;
11 Pout2 = Eout (2) * conj ( Eout (2) ) ;
12 disp ( Pout1 , ’ Output power a t p o r t 1 Pout1 = ’ )
13 disp ( Pout2 , ’ Output power a t p o r t 2 Pout2 = ’ )
14 // R e s u l t
15 // Output power a t p o r t 1 Pout1 = 0 . 5
16 // Output power a t p o r t 2 Pout2 = 0 . 5

Scilab code Exa 10.6


1 // C a p t i o n : Program t o f i n d w a v e g u i d e l e n g t h
2 // Example10 . 6
3 // p a g e 353
4 clear ;
5 clc ;
6 close ;
7 k = 0.6/1 e -03; // c o u p l i n g c o e f f i c i e n t p e r m i l l i
meter
8 m =1; // mode=1

48
9 L = %pi *( m +1) /(2* k ) ;
10 disp ( L *1 e03 , ’ C o u p l i n g Length i n mm L = ’ )
11 // R e s u l t
12 // C o u p l i n g Length i n mm L = 5 . 2 3 5 9 8 7 8

Scilab code Exa 10.7 1 // C a p t i o n : Program t o f i n d E x c e s s


l o s s , S p l i t t i n g l o s s and t o t a l l o s s
2 // Example10 . 7
3 // p a g e 355
4 clear ;
5 clc ;
6 close ;
7 Power_Lost = 5/100;
8 FT = 1 - Power_Lost ; // power c o u p l e d
9 N = 32;
10 Excess_Loss = -10* log10 ( FT ^ log2 ( N ) ) ;
11 Splitting_Loss = -10* log10 (1/ N ) ;
12 Total_Loss = Excess_Loss + Splitting_Loss ;
13 disp ( Excess_Loss , ’ E x c e s s L o s s i n dB ’ )
14 disp ( Splitting_Loss , ’ S p l i t t i n g L o s s i n dB ’ )
15 disp ( Total_Loss , ’ T o t a l L o s s e x p e r i e n c e d i n S t a r
C o u p l e r s i n dB ’ )
16 // R e s u l t
17 // E x c e s s L o s s
18 // 1.1138197
19 // S p l i t t i n g L o s s
20 // 15.0515
21 // T o t a l L o s s e x p e r i e n c e d i n S t a r C o u p l e r s
22 // 16.16532

Scilab code Exa 10.8


1 // C a p t i o n : Program t o Waveguide Length d i f f e r e n c e
2 // Example10 . 8
3 // Page 357
4 clear ;
5 close ;

49
6 clc ;
7 delta_Lambda = 0.08 e -09; // w a v e l e n g t h s p a c i n g i n
nano m e t e r s
8 Lambda = 1550 e -09; // w a v e l e n g t h i n m e t e r s
9 neff = 1.5; // e f f e c t i v e r e f r a c t i v e i n d e x i n t h e
waveguide
10 C =3 e08 ; // f r e e s p a c e v e l o c i t y
11 delta_v1 = 10 e09 ; // f r e q u e n c y s p a c i n g 1
12 delta_v2 = 130 e09 ; // f r e q u e n c y s p a c i n g 2
13 delta_L1 = C /(2* neff * delta_v1 ) ;
14 delta_L2 = C /(2* neff * delta_v2 ) ;
15 disp ( delta_L1 *1 e03 , ’ w a v e g u i d e l e n g t h d i f f e r e n c e i n
m i l l i meters ’ )
16 disp ( delta_L2 *1 e03 , ’ w a v e g u i d e l e n g t h d i f f e r e n c e i n
m i l l i meters ’ )
17 // R e s u l t
18 // w a v e g u i d e l e n g t h d i f f e r e n c e i n m i l l i m e t e r s
19 // 10.
20 // w a v e g u i d e l e n g t h d i f f e r e n c e i n m i l l i m e t e r s
21 // 0.7692308

Scilab code Exa 10.9


1 // C a p t i o n : F i b e r Bragg G r a t i n g : Peak R e f l e c t i v i t y ,
C o u p l i n g c o e f f i c i e n t , f u l l −bandwidth
2 // Example10 . 9 . a
3 clear ;
4 close ;
5 clc ;
6 kL = [1 ,2 ,3];
7 Rmax = tanh ( kL ) ^2;
8 // Example10 . 9 . b
9 L =0.5 e -02;
10 Lambda_Bragg = 1530 e -09;
11 neff = 1.48;
12 delta_n = 2.5 e -04;
13 etta = 82/100;
14 k = %pi * delta_n * etta / Lambda_Bragg ;

50
15 delta_Lambda = ( Lambda_Bragg ^2) *((( k * L ) ^2+ %pi ^2)
^0.5) /( %pi * neff * L ) ;
16 disp ( k /100 , ’ C o u p l i n g c o e f f i c i e n t p e r cm k = ’ )
17 disp ( delta_Lambda *1 e09 , ’ f u l l bandwidth i n nm = ’ )
18 disp ( ’ ’)
19 disp ( ’ kL Rmax (%) ’ )
20 disp ( ’ ’)
21 disp ( kL , ’ kL ’ )
22 disp ( Rmax *100 , ’ Rmax ’ )
23 disp ( ’ ’)
24 // R e s u l t
25 // C o u p l i n g c o e f f i c i e n t p e r cm k = 4 . 2 0 9 3 2 3 5
26 // f u l l bandwidth i n nm = 0.3807652
27 //
28 // kL Rmax (%)
29 //
30 // kL
31 //
32 // 1. 2. 3.
33 // Rmax
34 // 58.002566 92.934918 99.013396
35 //

Scilab code Exa 10.10 1 // C a p t i o n : Phased−Array−Based−


D e v i c e s : Channel s p a c i n g i n t e r m s o f w a v e l e n g t h and
path−l e n g t h d i f f e r e n c e
2 // Example10 . 1 0
3 // p a g e 372
4 clear ;
5 clc ;
6 close ;
7 Lambda_c = 1550 e -09; // c e n t r a l d e s i g n w a v e l e n g t h
8 nc = 1.45; // r e f r a c t i v e i n d e x o f g r a t i n g a r r a y
waveguide
9 ns = 1.45; // r e f r a c t i v e i n d e x o f t e h s t a r c o u p l e r
10 ng = 1.47; // g r o u p i n d e x o f g r a t i n g a r r a y w a v e g u i d e

51
11 x = 5e -06 ; // c e n t e r −to −c e n t e r s p a c i n g between the
input waveguides
12 d = 5e -06 ; // c e n t e r −to −c e n t e r s p a c i n g between the
output waveguides
13 m =1;
14 Lf = 10 e -03; // d i s t a n c e b e t w e e n t r a n s m i t t e r and
object
15 delta_L = m * Lambda_c / nc ;
16 delta_Lambda = ( x / Lf ) *( ns * d / m ) *( nc / ng ) ;
17 disp ( delta_L *1 e06 , ’ Waveguide l e n g t h d i f f e r e n c e i n um
=’)
18 disp ( delta_Lambda *1 e09 , ’ Channel s p a c i n g i n t e r m s o f
w a v e l e n g t h i n nm= ’ )
19 // R e s u l t
20 // Waveguide l e n g t h d i f f e r e n c e i n um = 1 . 0 6 8 9 6 5 5
21 // Channel s p a c i n g i n t e r m s o f w a v e l e n g t h i n nm =
3.5756803

Scilab code Exa 10.11


1 // C a p t i o n : Phased−Array−Based D e v i c e s : Length
d i f f e r e n c e between a d j a c e n t a r r a y waveguides
2 // Example10 . 1 1
3 // p a g e 373
4 clear ;
5 close ;
6 clc ;
7 nc = 1.45; // e f f e c t i v e r e f r a c t i v e i n d e x
8 Lambda_C = 1550.5 e -09; // c e n t e r w a v e l e n g t h
9 delta_Lambda = 32.2 e -09; // f r e e s p e c t r a l r a n g e
10 C = 3 e08 ; // f r e e s p a c e v e l o c i t y i n m/ s
11 delta_L = Lambda_C ^2/( nc * delta_Lambda ) ;
12 disp ( delta_L *1 e06 , ’ l e n g t h d i f f e r e n c e b e t w e e n
a d j a c e n t a r r a y w a v e g u i d e s i n um = ’ )
13 // R e s u l t
14 // l e n g t h d i f f e r e n c e b e t w e e n a d j a c e n t a r r a y
w a v e g u i d e s i n um = 5 1 . 4 8 9 6 1 8

52
Scilab code Exa 10.12 1 // C a p t i o n : Maximum number o f
c h a n n e l s t h a t can be p l a c e d i n t h e t u n i n g r a n g e
2 // Example10 . 1 2
3 // p a g e 383
4 clear ;
5 clc ;
6 close ;
7 Lambda = 1550 e -09; //DBR l a s e r o p e r a t i n g w a v e l e n g t h
8 delta_neff = 0.0065; //maximum i n d e x c h a n g e
9 delta_Lambda_tune = Lambda * delta_neff ; // t u n i n g
range in meters
10 delta_Lambda_signal = 0.02 e -09; // s o u r c e s p e c t r a l
width i n meters
11 delta_Lambda_channel = 10* delta_Lambda_signal ;
12 N = delta_Lambda_tune / delta_Lambda_channel ;
13 disp (N , ’ The number c h a n n e l s t h a t can o p e r a t e i n t h i s
t u n i n g r a n g e i s N= ’ )
14 // R e s u l t
15 // The number c h a n n e l s t h a t can o p e r a t e i n t h i s
tuning range i s N = 50.375

53
Chapter 11

Eleventh chapter

Scilab code Exa 11.1


1 // C a p t i o n : Program t o c a l c u l a t e Photon d e n s i t y
2 // Example11 . 1
3 // p a g e 397
4 clear ;
5 clc ;
6 close ;
7 Vg = 2 e08 ; // g r o u p v e l o c i t y i n m/ s
8 h = 6.625 e -34; // p l a n k s c o n s t a n t
9 C = 3 e08 ; // f r e e s p a c e v e l o c i t y i n m/ s
10 Lamda = 1550 e -09; // o p e r a t i n g w a v e l e n g t h
11 V = C / Lamda ; // f r e q u e n c y i n Hz
12 w = 5e -06; // w i d t h o f o p t i c a l a m p l i f i e r i n m e t e r s
13 d = 0.5 e -06; // t h i c k n e s s o f o p t i c a l a m p l i f i e r i n
meters
14 Ps = 1e -06; // o p t i c a l s i g n a l o f power
15 Nph = Ps /( Vg * h * V * w * d ) ;
16 disp ( Nph , ’ The p h o t o n d e n s i t y i n p h o t o n s / c u b i c m e t e r
i s Nph = ’ )
17 // R e s u l t
18 // The p h o t o n d e n s i t y i n p h o t o n s / c u b i c m e t e r i s Nph =
1 . 5 6 0D+16

54
Scilab code Exa 11.2
1 // C a p t i o n : Pumping r a t e and z e r o −s i g n a l g a i n
2 // Example11 . 2 ( a ) and ( b )
3 // p a g e 397
4 clear ;
5 clc ;
6 close ;
7 I = 100 e -03; // b i a s c u r r e n t i n Amps
8 w = 3e -06; // a c t i v e a r e a w i d t h i n m e t e r s
9 L = 500 e -06; // a m p l i f i e r l e n g h t i n m e t e r s
10 d = 0.3 e -06; // a c t i v e a r e a t h i c k n e s s i n m e t e r s
11 q = 1.602 e -19; // c h a r g e i n c o u l o m b s
12 Rp = I /( q * d * w * L ) ;
13 disp ( Rp , ’ The pumping r a t e i n e l e c t r o n s / s . c u b i c m e t e r
i s Rp = ’ )
14 Tuo = 0.3; // t h e c o n f i n e m e n t f a c t o r
15 a = 2e -20; // g a i n c o e f f i c i e n t i n s q u a r e m e t e r
16 J = I /( w * L ) ; // b i a s c u r r e n t d e n s i t y i n Amp/ s q u r e
meter
17 nth = 1 e24 ; // t h r e s h o l d d e n s i t y p e r c u b i c m e t e r
18 Tuor = 1e -09; // Time c o n s t a n t i n s e c o n d s
19 g0 = Tuo * a * Tuor *(( J /( q * d ) ) -( nth / Tuor ) )
20 disp ( g0 /100 , ’ The z e r o −s i g n a l g a i n p e r cm i s g0 = ’ )
21 // R e s u l t
22 // The pumping r a t e i n e l e c t r o n s / s . c u b i c m e t e r i s Rp
= 1 . 3 8 7D+33
23 // The z e r o −s i g n a l g a i n p e r cm i s g0 = 2 3 . 2 2 9 2 9 7

Scilab code Exa 11.3


1 // C a p t i o n : Maximum i n p u t power and
maxmimum o u t p u t power
2 // Example 1 1 . 3
3 // p a g e 404
4 clear ;
5 clc ;
6 close ;
7 Lambda_p = 980 e -09; //pump w a v e l e n g t h
8 Lambda_s = 1550 e -09; // s i g n a l w a v e l e n g t h

55
9 Pp_in = 30 e -03; // i n p u t pump power i n w a t t s
10 G = 10^(20/10) ; // g a i n
11 Ps_in = ( Lambda_p / Lambda_s ) * Pp_in /( G -1)
12 disp ( Ps_in *1 e06 , ’ The maximum i n p u t power i n uW i s
Ps in =’)
13 Ps_out = Ps_in +( Lambda_p / Lambda_s ) * Pp_in ;
14 disp ( Ps_out *1 e03 , ’ The maximum o u t p u t power i n mW i s
Ps out =’ )
15 disp (10* log10 ( Ps_out *1 e03 ) , ’ The maximum o u t p u t power
i n dBm i s P s o u t = ’ )
16 // R e s u l t
17 // The maximum i n p u t power i n uW i s P s i n = 1 9 1 . 5 9 3 3 5
18 // The maximum o u t p u t power i n mW i s P s o u t =
19.159335
19 // The maximum o u t p u t power i n dBm i s P s o u t =
12.823804

Scilab code Exa 11.6


1 // C a p t i o n : O p t i c a l S i g n a l −to −n o i s e r a t i o (OSNR)
2 // Example11 . 6
3 // p a g e 412
4 clear ;
5 close ;
6 clc ;
7 Q = 6; //Q f a c t o r o f 6
8 OSNR = (1/2) * Q *( Q + sqrt (2) ) ;
9 disp (10* log10 ( OSNR ) , ’ O p t i c a l S i g n a l −to −n o i s e r a t i o
i n dB OSNR = ’ )
10 // R e s u l t
11 // O p t i c a l S i g n a l −to −n o i s e r a t i o i n dB OSNR =
13.471863

Scilab code Exa 11.7


1 // C a p t i o n : Pump power o f EDFA
2 // Example11 . 7
3 // p a g e 413
4 clear ;

56
5 clc ;
6 close ;
7 Lambda_p = 980 e -09; //pump w a v e l e n g t h i n m e t e r s
8 Lambda_s = 1540 e -09; // s i g n a l w a v e l e n g t h i n m e t e r s
9 Ps_out = 10 e -03; // o u t p u t s i g n a l power
10 Ps_in = 1e -03; // i n p u t s i g n a l power
11 Pp_in = ( Lambda_s / Lambda_p ) *( Ps_out - Ps_in )
12 disp ( Pp_in *1 e03 , ’Pump power i n m i l l i w a t t s P p i n = ’ )
13 // R e s u l t
14 //Pump power i n m i l l i w a t t s P p i n = 1 4 . 1 4 2 8 5 7

Scilab code Exa 11.8


1 // C a p t i o n : OSNR f o r d i f f e r e n t ASE n o i s e l e v e l
2 // Example11 . 8
3 // p a g e 413
4 clear ;
5 clc ;
6 close ;
7 P_ASE1 = -22; //ASE l e v e l i n dBm
8 P_ASE2 = -16; //ASE l e v e l i n dBm
9 Pout = 6; // a m p l i f i e d s i g n a l l e v e l i n dBm
10 OSNR1 = Pout - P_ASE1 ; // O p t i c a l SNR i n dBm
11 OSNR2 = Pout - P_ASE2 ; // O p t i c a l SNR i n dBm
12 disp ( OSNR1 , ’ O p t i c a l SNR i n dBm OSNR = ’ )
13 disp ( OSNR2 , ’ O p t i c a l SNR i n dBm OSNR = ’ )
14 // R e s u l t
15 // O p t i c a l SNR i n dBm OSNR = 2 8 .
16 // O p t i c a l SNR i n dBm OSNR = 2 2 .

Scilab code Exa 11.9


1 // C a p t i o n : N o i s e p e n a l t y f a c t o r
2 // Example11 . 9
3 // p a g e 414
4 clear ;
5 clc ;
6 close ;
7 G =[10^(30/10) ,10^(20/10) ]; // A m p l i f i e r Gain

57
8 for i = 1: length ( G )
9 Fpath ( i ) = (1/ G ( i ) ) *(( G ( i ) -1) / log ( G ( i ) ) ) ^2;
10 disp (10* log10 ( Fpath ( i ) ) , ’ N o i s e p e n a l t y f a c t o r in
dB Fpath = ’ ) ;
11 disp ( G ( i ) , ’ f o r a g a i n o f G = ’ ) ;
12 end
13 // R e s u l t
14 // N o i s e p e n a l t y f a c t o r i n dB Fpath = 1 3 . 2 0 4 5 7 1
15 // f o r a g a i n o f G = 1 0 0 0 .
16 // N o i s e p e n a l t y f a c t o r i n dB Fpath = 6 . 6 4 7 7 9 0 2
17 // f o r a g a i n o f G = 1 0 0 .

Scilab code Exa 11.10 1 // C a p t i o n : Upper bound on i n p u t


o p t i c a l s i g n a l power
2 // Example11 . 1 0
3 // p a g e 415
4 clear ;
5 clc ;
6 close ;
7 etta = 0.65; // Quantum e f f i c i e n c y
8 nsp = 2; // p o p u l a t i o n i n v e r s i o n b e t w e e n two l e v e l s
9 R =50; // l o a d r e s i s t a n c e inohms
10 Lambda = 1550 e -09; // o p e r a t i n g w a v e l e n g t h i n m e t e r s
11 T = 300; // room t e m p e r a t u r e i n k e l v i n s
12 kB = 1.38054 e -23; // boltzmann ’ s c o n s t a n t
13 h = 6.6256 e -34; // p l a n k ’ s c o n s t a n t
14 C = 3 e08 ; // f r e e s p a c e v e l o c i t y i n m/ s
15 V = C / Lambda ; // f r e q u e n c y i n Hz
16 q = 1.602 e -19; // c h a r g e i n c o l u m b s
17 Ps_in = kB * T * h * V /( R * nsp *( etta ^2) *( q ^2) ) ;
18 disp ( Ps_in *1 e06 , ’ Upper bound on i n p u t o p t i c a l s i g n a l
power i n m i c r o w a t t s P s i n= ’ )
19 // R e s u l t
20 // Upper bound on i n p u t o p t i c a l s i g n a l power i n m i c r o
watts Ps in = 489.81635

58
Chapter 12

Twelve chapter

Scilab code Exa 12.1 1 // C a p t i o n : E f f e c t i v e l e n g t h o f f i b e r


2 // Example12 . 1
3 // p a g e 432
4 clear ;
5 clc ;
6 close ;
7 L = 75; // a m p l i f i e r s p c a i n g i n k i l o m e t e r
8 alpha = 4.61 e -02; // f i b e r a t t e n u a t i o n p e r Km
9 Leff = (1 - exp ( - alpha * L ) ) / alpha ;
10 disp ( Leff , ’ E f f e c t i v e l e n g t h o f f i b e r i n k i l o m e t e r s
Leff =’)
11 // R e s u l t
12 // E f f e c t i v e l e n g t h o f f i b e r i n k i l o m e t e r s L e f f =
21.008494

Scilab code Exa 12.2


1 // C a p t i o n : C a l c u l a t i o n o f S t i m u l a t e d B r i l l o u i n
S c a t t e r i n g ( SBS ) t h r e s h o l d power
2 // Example12 . 2
3 // p a g e 433
4 clear ;
5 clc ;
6 close ;

59
7 delta_VB = 20 e06 ; // B r i l l o u i n l i n e w i d t h i n Hz
8 Aeff = 55 e -12; // e f f e c t i v e c r o s s − s e c t i o n a l a r e a o f
t h e p r o p a g a t i n g wave i n s q u a r e m e t e r
9 Leff = 20 e03 ; // e f f e c t i v e l e n g t h
10 b = 2; // p o l a r i z a t i o n f a c t o r
11 gB = 4e -11; // B r i l l o u s g a i n c o e f f i c i e n t m/W
12 delta_Vsource = 40 e06 ; // o p t i c a l s o u r c e l i n e w i d t h i n
Hz
13 Pth = 21*( Aeff * b /( gB * Leff ) ) *(1+( delta_Vsource /
delta_VB ) ) ;
14 disp ( Pth *1 e03 , ’ SBS t h r e s h o l d power i n m i l l i w a t t s
Pth= ’ )
15 // R e s u l t
16 // SBS t h r e s h o l d power i n m i l l i w a t t s Pth= 8 . 6 6 2 5

Scilab code Exa 12.3 1 // C a p t i o n : Four−wave mixing −


c a l c u l a t i o n o f power g e n e r a t e d due t o t h e
2 // i n t e r a c t i o n o f s i g n a l s a t d i f f e r e n t f r e q u e n c i e s
3 // Example12 . 3
4 // p a g e 438
5 clear ;
6 clc ;
7 close ;
8 chi1111 = 6e -15; // T h i r d o r d e r n o n l i n e a r
s u c e p t i b i l i t y c u b i c m e t e r /W. s
9 D =3; // d e g e n e r a t i n g f a c t o r
10 Leff = 22 e03 ; // e f f e c t i v e l e n g t h i n m e t e r s
11 Aeff = 6.4 e -11; // e f f e c t i v e c r o s s − s e c t i o n a l a r e a o f
the f i b e r i n square meter
12 etta = 0.05; // quantum e f f i c i e n c y
13 Lambda = 1540 e -09; // Wavelength i n s i n g l e mode
f i b e r s i n meter
14 C = 3 e08 ; // f r e e s p a c e v e l o c i t y i n m/ s e c
15 alpha =0.0461; // a t t t e n u a t i o n p e r Km
16 L =75; // f i b e r l i n k l e n g t h i n Km
17 P = 1e -03; // e a c h c h a n n e l i n p u t power o f 1 m i l l i
watts

60
18 n = 1.48; // r e f r a c t i v e i n d e x
19 k = ((32*( %pi ^3) * chi1111 ) /(( n ^2) * Lambda * C ) ) *( Leff /
Aeff ) ; // n o n l i n e a r i n t e r a c t i o n c o n s t a n t
20 P112 = etta *( D ^2) *( k ^2) *( P ^3) * exp ( - alpha * L ) ;
21 disp ( P112 *1 e03 , ’ Power g e n e r a t e d due t o i n t e r a c t i o n
o f s i g n a l s a t d i f f e r e n t f r e q . i n m i l l i w a t t s P112
=’)
22 // R e s u l t
23 // Power g e n e r a t e d due t o i n t e r a c t i o n o f s i g n a l s a t
d i f f e r e n t f r e q . i n m i l l i w a t t s P112= // 5 . 7 9 8D−08

Scilab code Exa 12.4 1 // C a p t i o n : F u l l −w i d t h H a l f −Maximum (


FWHM) s o l i t o n p u l s e n o r m a l i z e d t i m e
2 // Example12 . 4
3 // p a g e 446
4 clear ;
5 clc ;
6 close ;
7 Ts = [15 e -12 ,50 e -12]; //FWHM s o l i t o n p u l s e w i d t h
8 To = Ts /1.7627;
9 disp ( To *1 e12 , ’ N o r m a l i z e d t i m e f o r FWHM s o l i t o n p u l s e
i n p i c o s e c o n d s To = ’ )
10 // R e s u l t
11 // N o r m a l i z e d t i m e f o r FWHM s o l i t o n p u l s e i n p i c o
s e c o n d s To = [ 8 . 5 0 9 6 7 2 7 28.365576]

Scilab code Exa 12.5 1 // C a p t i o n : C a l c u l a t i o n o f n o r m a l i z e d


d i s t a n c e parameter f o r d i s p e r s i o n s h i f t e d f i b e r
2 // Example12 . 5
3 // p a g e 446
4 clear ;
5 clc ;
6 close ;
7 Ts = 20 e -12; //FWHM s o l i t o n p u l s e w i d t h i n s e c o n d s
8 D = 0.5 e -06; // d i s p e r s i o n o f t h e f i b e r p s / (nm . km)

61
9 Lambda = 1550 e -9; // w a v e l e n g t h i n m e t e r
10 C = 3 e08 ; // f r e e s p a c e v e l o c i t y i n m/ s
11 Ldisp = 0.322*2* %pi * C *( Ts ^2) /(( Lambda ^2) * D ) ;
12 disp ( Ldisp /1000 , ’ d i s p e r s i o n l e n g t h i n Km L d i s p = ’ )
13 // R e s u l t
14 // d i s p e r s i o n l e n g t h i n Km L d i s p = 2 0 2 . 1 0 8 0 4

Scilab code Exa 12.6 1 // C a p t i o n : Program t o c a l c u l a t e


s o l i t o n peak power
2 // Example12 . 6
3 // p a g e 447
4 clear ;
5 clc ;
6 close ;
7 Lambda = 1550 e -9; // w a v e l e n g t h i n m e t e r s
8 n2 = 2.6 e -20; // power i n s q u a r e m e t e r /w
9 Aeff = 50 e -12; // e f f e c t i v e a r e a i n s q u a r e m e t e r
10 Ldisp = 202 e03 ; // d i s p e r s i o n l e n g t h i n m e t e r s
11 Ppeak = ( Aeff /(2* %pi * n2 ) ) *( Lambda / Ldisp ) ;
12 disp ( Ppeak *1 e03 , ’ S o l i t o n peak power i n m i l l i w a t t s
Ppeak = ’ )
13 // R e s u l t
14 // S o l i t o n peak power i n m i l l i w a t t s Ppeak =
2.3485354

Scilab code Exa 12.7 1 // C a p t i o n :FWHM s o l i t o n p u l s e w i d t h


and f r a c t i o n o f b i t s l o t o c c u p i e d by a s o l i t o n
2 // Example12 . 7
3 // p a g e 448
4 clear ;
5 clc ;
6 close ;
7 // Example12 . 7 . a
8 Ldisp = 100 e03 ; // d i s p e r i s o n l e n g t h i n m e t e r
9 omega = 4682; // o s c i l l a t i o n p e r i o d

62
10 LI = omega * Ldisp ;
11 disp ( LI , ’ i n t e r a c t i o n d i s t a n c e i n m e t e r LI= ’ )
12 // Example12 . 7 . b
13 D = 0.5 e -06; // d i s p e r i s o n o f f i b e r i n p s /nm . km
14 C = 3 e08 ; // f r e e s p a c e v e l o c i t y
15 S0 = 8; // n o r m a l i z e d s e p a r a t i o n o f n e i g h n o r i n g
solitons
16 B = 10 e09 ; // d a t a r a t e 10 Gb/ s e c
17 Lambda = 1550 e -9; // w a v e l e n g t h i n m e t e r s
18 Beta2 = ( Lambda /(2* %pi ) ) ;
19 LT = ( C * exp ( S0 ) ) /(16* D * B ^2*( Beta2 ^2) *( S0 ^2) ) ;
20 disp ( LT *1 e03 , ’ T o t a l t r a n s m i s s i o n d i s t a n c e i n Km LT =
’)
21 // Example12 . 7 . c
22 Ts = 0.881/( S0 * B ) ;
23 disp ( Ts *1 e12 , ’FWHM s o l i t o n p u l s e w i d t h i n p i c o
s e c o n d s Ts = ’ )
24 // Example12 . 7 . d
25 Ts_TB = 0.881/ S0 ;
26 disp ( Ts_TB *100 , ’ F r a c t i o n o f t h e b i t s l o t o c c u p i e d by
a s o l i t o n i n p e r c e n t a g e Ts TB= ’ )
27 // R e s u l t
28 // i n t e r a c t i o n d i s t a n c e i n m e t e r LI = 4 . 6 8 2D+08
29 // T o t a l t r a n s m i s s i o n d i s t a n c e i n Km LT = 2 . 8 7 0D+11
30 //FWHM s o l i t o n p u l s e w i d t h i n p i c o s e c o n d s Ts =
11.0125
31 // F r a c t i o n o f t h e b i t s l o t o c c u p i e d by a s o l i t o n i n
p e r c e n t a g e Ts TB = 1 1 . 0 1 2 5

63
Chapter 13

Thirteen chapter

Scilab code Exa 13.1 1 // C a p t i o n : C a l c u l a t i o n o f power


budget f o r o p t i c a l l i n k
2 // Example13 . 1
3 // p a g e 464
4 clear ;
5 clc ;
6 close ;
7 N = [5 ,10 ,50]; // number s t a t i o n s
8 alpha = 0.4; // a t t e n u a t i o n i n dB/Km
9 L_tap = 10; // c o u p l i n g l o s s i n dB
10 L_thru = 0.9; // c o u p l e r t h r o u g h p u t i n dB
11 Li = 0.5; // I n t r i n s i c c o u p l e r l o s s i n dB
12 Lc = 1.0; // c o u p l e r −to − f i b e r l o s s i n dB
13 L = 0.5; // l i n k l e n g t h i n Km
14 fiber_Loss = alpha * L ; // f i b e r l o s s i n dB
15 Pbudget = N *( alpha * L +2* Lc + Li + L_thru ) - alpha *L -2*
L_thru +2* L_tap ;
16 disp ( fiber_Loss , ’ f i b e r l o s s i n dB f o r L =500 m ’ )
17 disp ( Pbudget , ’ power b u d g e t i n dB f o r o p t i c a l l i n k
when N = 5 , 1 0 and 50 s t a t i o n s r e s p e c t i v e l y = ’ )
18 // R e s u l t
19 // f i b e r l o s s i n dB f o r L =500 m
20 // 0.2

64
21 // power b u d g e t i n dB f o r o p t i c a l l i n k when N = 5 , 1 0
and 50 s t a t i o n s r e s p e c t i v e l y =
22 // 36. 54. 198.

Scilab code Exa 13.2 1 // C a p t i o n : C a l c u l a t i o n o f Number


stations for given l o s s
2 // Example13 . 2
3 // p a g e 465
4 clear ;
5 clc ;
6 close ;
7 alpha = 0.4; // a t t e n u a t i o n i n dB/Km
8 L_tap = 10; // c o u p l i n g l o s s i n dB
9 L_thru = 0.9; // c o u p l e r t h r o u g h p u t i n dB
10 Li = 0.5; // I n t r i n s i c c o u p l e r l o s s i n dB
11 Lc = 1.0; // c o u p l e r −to − f i b e r l o s s i n dB
12 L = 0.5; // l i n k l e n g t h i n Km
13 Pbudget_LED = 38; // power l o s s b e t w e e n s o u r c e and
r e c e i v e r i n dB f o r LED s o u r c e
14 Pbudget_LASER = 51; // power l o s s b e t w e e n s o u r c e and
r e c e i v e r i n dB f o r LASER s o u r c e
15 N_LED = ( Pbudget_LED + alpha *L -2* L_thru -2* L_tap ) /(
alpha * L +2* Lc + Li + L_thru )
16 N_LASER = ( Pbudget_LASER + alpha *L -2* L_thru -2* L_tap ) /(
alpha * L +2* Lc + Li + L_thru )
17 disp ( ceil ( N_LED ) , ’ Number o f s t a t i o n s a l l o w e d f o r
g i v e n l o s s o f 38 dB w i t h LED s o u r c e ’ )
18 disp ( floor ( N_LASER ) , ’ Number o f s t a t i o n s a l l o w e d f o r
g i v e n l o s s o f 51 dB w i t h LASER s o u r c e ’ )
19 // R e s u l t
20 // Number o f s t a t i o n s a l l o w e d f o r g i v e n l o s s o f 38 dB
w i t h LED s o u r c e
21 // 5.
22 // Number o f s t a t i o n s a l l o w e d f o r g i v e n l o s s o f 51 dB
w i t h LASER s o u r c e
23 // 8.

65
Scilab code Exa 13.3 1 // C a p t i o n : C a l c u l a t i o n o f w o r s t
c a s e Dynamic Range
2 // Example13 . 3
3 // p a g e 465
4 clear ;
5 clc ;
6 close ;
7 N = [5 ,10] ; // number o f s t a t i o n s
8 alpha = 0.4; // a t t e n u a t i o n i n dB/Km
9 L = 0.5; // l i n k l e n g t h i n Km
10 Lc = 1.0; // c o u p l e r −to − f i b e r l o s s i n dB
11 L_thru = 0.9; // c o u p l e r t h r o u g h p u t i n dB
12 Li = 0.5; // I n t r i n s i c c o u p l e r l o s s i n dB
13 DR = (N -2) *( alpha * L +2* Lc + Li + L_thru ) ;
14 disp ( DR , ’ w o r s t −c a s e dyanmic r a n g e i n dB f o r N =5 and
10 r e s p e c t i v e l y DR = ’ )
15 // R e s u l t
16 // w o r s t −c a s e dyanmic r a n g e i n dB f o r N =5 and 10
r e s p e c t i v e l y DR =
17 // 10.8 28.8

Scilab code Exa 13.4


1 // C a p t i o n : C a l c u l a t i o n o f power m a r g i n b e t w e e n
t r a n s m i t t e r and r e c e i v e r f o r S t a r a r c h i t e c t u r e s
2 // Example13 . 4
3 // p a g e 466
4 clear ;
5 close ;
6 clc ;
7 N = [10 ,50]; // number o f s t a t i o n s
8 alpha = 0.4; // a t t e n u a t i o n i n dB/Km
9 L = 0.5 ; // d i s t a n c e i n Km
10 Lexcess = [0.75 ,1.25]; // e x c e s s l o s s i n dB f o r N =10
and 50
11 Lc = 1.0; // c o n n e c t o r l o s s i n dB
12 Ps_Pr (1) = Lexcess (1) + alpha *2* L +2* Lc +10* log10 ( N (1) ) ;
13 Ps_Pr (2) = Lexcess (2) + alpha *2* L +2* Lc +10* log10 ( N (2) ) ;

66
14 disp ( Ps_Pr (1) , ’ The power m a r g i n i n dB b e t w e e n t h e
t r a n s m i t t e r and r e c e i v e r f o r N=10 i s Ps−Pr = ’ )
15 disp ( Ps_Pr (2) , ’ The power m a r g i n i n dB b e t w e e n t h e
t r a n s m i t t e r and r e c e i v e r f o r N=50 i s Ps−Pr = ’ )
16 // R e s u l t
17 // The power m a r g i n i n dB b e t w e e n t h e t r a n s m i t t e r and
r e c e i v e r f o r N=10 i s Ps−Pr = 1 3 . 1 5
18 // The power m a r g i n i n dB b e t w e e n t h e t r a n s m i t t e r and
r e c e i v e r f o r N=50 i s Ps−Pr = 2 0 . 6 3 9 7

Scilab code Exa 13.5 1 // C a p t i o n : D e t e r m i n a t i o n o f maximum


l e n g t h o f multimode f i b e r l i n k
2 // Example13 . 5
3 // p a g e 477
4 clear ;
5 clc ;
6 close ;
7 L_OM2 = 40; // l e n g t h o f OM2 f i b e r
8 L_OM3 = 100; // l e n g t h o f OM3 f i b e r
9 BW_OM2 = 500 e06 ; // bandwidth o f OM2 f i b e r
10 BW_OM3 = 2000 e06 ; // bandwidth o f OM3 f i b e r
11 Lmax = L_OM2 *( BW_OM3 / BW_OM2 ) + L_OM3 ;
12 disp ( Lmax , ’ The maximum l i n k l e n g t h i n m e t e r i s Lmax
=’)
13 // R e s u l t
14 // The maximum l i n k l e n g t h i n m e t e r i s Lmax = 2 6 0 .

67
Chapter 14

Fourteen chapter

Scilab code Fig 14.10


1 // C a p t i o n : P e r f o r m a n c e Measurement and M o n i t o r i n g
2 // F i g u r e : 1 4 . 1 0 P l o t t i n g p u l s e s h a p e o f g a u s s i a n
distribution
3 // and d e t e r m i n i n g 3−dB o p t i c a l and e l e c t r i c a l
bandwidth
4 clear ;
5 close ;
6 clc ;
7 sigma = 1;
8 t = -3* sigma :0.01:3* sigma ;
9 p = (1/( sigma * sqrt (2* %pi ) ) ) * exp ( - t ^2./(2* sigma ^2) ) ;
10 fdB_optical = 0.187/ sigma ;
11 fdB_electrical = 0.133/ sigma ;
12 disp ( fdB_optical , ’ f d B o p t i c a l ’ )
13 disp ( fdB_electrical , ’ f d B e l e c t r i c a l ’ )
14 plot (t ,p , ’ r ’ )
15 xlabel ( ’ Time t ’ )
16 ylabel ( ’ R e l a t i v e p u l s e a m p l i t u d e P( t ) ’ )
17 title ( ’ F i g u r e : 1 4 . 1 0 D e f i n i t i o n s o f p u l s e −s h a p e
parameters ’)
18 xgrid (1)
19 // R e s u l t
20 // f d B o p t i c a l = 0.187

68
Figure 14.1: Performance Measurement and Monitoring

21 // f d B e l e c t r i c a l = 0 . 1 3 3

69

Вам также может понравиться