You are on page 1of 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 gure
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 Shannons 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 ow in the core and cladding of step index ber 8
Exa 2.5 Program to calculate Fiber Birefringence Beta
f
. . . 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 nd 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 nd out the Internal Quantum Eciency and Inter-
nal Power level of LED source . . . . . . . . . . . . . . 17
4
Exa 4.6 External Quantum Eciency in percentage . . . . . . 18
Exa 4.7 Program to nd 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 coecient . 22
Exa 5.2 Program to Calculate Optical Power Emitted from the
Light source and Optical power coupled to step-index
ber . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Exa 5.3 Fresnel reection, power coupled and power loss . . . 23
Exa 5.4 Power coupled between two graded index bers . . . . 24
Exa 5.5 Loss between single mode bers due to Lateral mis-
alignment . . . . . . . . . . . . . . . . . . . . . . . . . 24
Exa 5.6 Loss between single mode bers due to angular mis-
alignment . . . . . . . . . . . . . . . . . . . . . . . . . 25
Exa 6.1 Cut-o wavelength of photodiode . . . . . . . . . . . 26
Exa 6.2 Calculation of Quantum eciency . . . . . . . . . . . 26
Exa 6.3 Calculation of photocurrent . . . . . . . . . . . . . . 27
Exa 6.4 Calculation of Responsivity of photodiode . . . . . . 27
Exa 6.5 To nd 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 nd optimum decision threshold . . . . . . . . . . 31
Exa 7.2 To nd 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 nd 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 aected by a burst error 37
Exa 8.6 Program to nd coecients of generator polynomial . 37
Exa 8.7 Program to nd 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 nd 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 nd 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 nd waveguide length . . . . . . . . . . . 48
Exa 10.7 Program to nd Excess loss, Splitting loss and total loss 49
Exa 10.8 Program to Waveguide Length dierence . . . . . . . 49
Exa 10.9 Fiber Bragg Grating: Peak Reectivity, Coupling coef-
cient, full-bandwidth . . . . . . . . . . . . . . . . . . 50
Exa 10.10 Phased-Array-Based-Devices: Channel spacing in terms
of wavelength and path-length dierence . . . . . . . . 51
Exa 10.11 Phased-Array-Based Devices: Length dierence 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 dierent 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 Eective length of ber . . . . . . . . . . . . . . . . . 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 dierent 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 ber . . . . . . . . . . . . . . . . . . . 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 ber
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 // Capti on : Program t o c a l c u l a t e ti me pe r i o d and phase
s h i f t
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 pe r i o d o f s i n e wave wi th f r e que nc y =
100 KHZ )
14 disp(T2, Time pe r i o d o f s i n e wave wi th f r e que nc y = 1
GHZ )
15 disp(phi , phase s h i f t i n de g r e e s );
16 disp(phi_rad , phase s h i f t i n r a di a ns );
17 // Re s ul t
18 //Time pe r i o d o f s i n e wave wi th f r e que nc y = 100 KHZ
19 // 0. 00001
20 //Time pe r i o d o f s i n e wave wi th f r e que nc y = 1GHZ
2
21 // 1. 000D09
22 // phase s h i f t i n de g r e e s
23 // 9 0 .
24 // phase s h i f t i n r a di a ns
25 // 1. 5706806
Scilab code Exa 1.2 Example 1.2
1 // Capti on : Program t o c a l c u l a t e ti me pe r i o d and phase
s h i f t
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 pe r i o d o f s i n e wave wi th f r e que nc y =
100 KHZ )
14 disp(T2, Time pe r i o d o f s i n e wave wi th f r e que nc y = 1
GHZ )
15 disp(phi , phase s h i f t i n de g r e e s );
16 disp(phi_rad , phase s h i f t i n r a di a ns );
17 // Re s ul t
18 //Time pe r i o d o f s i n e wave wi th f r e que nc y = 100 KHZ
19 // 0. 00001
20 //Time pe r i o d o f s i n e wave wi th f r e que nc y = 1GHZ
21 // 1. 000D09
22 // phase s h i f t i n de g r e e s
23 // 9 0 .
24 // phase s h i f t i n r a di a ns
25 // 1. 5706806
3
Scilab code Exa 1.4
1 // Capti on : Shannon Channel Capaci t y f or mul a
2 // Example1 . 4
3 // page 12
4 clear;
5 clc;
6 close;
7 B = 10^6; // Bandwi dth o f noi s y c hanne l 10MHZ
8 S_N = 1; // s i g na l tono 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 pa c i t y f o r t h i s c hanne l i n
b i t s / s e c C = )
11 // Re s ul t
12 //The maximum c a pa c i t y f o r t h i s c hanne l i n b i t s / s e c
C = 1000000.
Scilab code Exa 1.5 1 // Capti on : Capaci t y o f a c hanne l
us i ng shannon s f or mul a
2 // Example1 . 5
3 // page 12
4 clear;
5 clc;
6 close;
7 fLow = 3*(10^6); // l ow f r e que nc y = 3MHz
8 fHigh = 4*(10^6); // hi hg f r e que nc y = 4MHz
9 S_N_dB = 20; // s i g na l tono 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, Bandwi dth i n Hz B = )
14 disp(C, Capaci t y o f a c hanne l i n b i t s / s e c s C = )
15 disp(S_N , s i g n a l t o no i s e r a t i o S/N = )
16 // Re s ul t
17 // Bandwi dth i n Hz B = 1000000.
18 // Capaci t y o f a c hanne l i n b i t s / s e c s C =
6658211. 5
19 // s i g n a l t o no i s e r a t i o S/N = 100.
4
Scilab code Exa 1.6 1 // Capti on : Program t o c a l c u l a t e
a t t e nua t i o n ( or ) l o s s os power
2 // Example 1 . 6
3 // page 14
4 clear;
5 clc;
6 close;
7 P1 =1; // one watt
8 P2 = P1/2; // r educed by h a l f val ue
9 Atten_dB = 10* log10(P2/P1);
10 disp(Atten_dB , At t e nuat i on i n dB = );
11 power_lost = 10^( Atten_dB /10)
12 disp(power_lost , The amount o f power l o s t = );
13 // Re s ul t
14 // At t e nuat i on i n dB = 3. 0103
15 //The amount o f power l o s t = 0 . 5
Scilab code Exa 1.7 1 // Capti on : Power gai 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 f rom
2 // one poi nt t o anot he r poi nt
3 // Example 1 . 7
4 // page 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 gai ne d by a
s i g n a l t r a v e l l i n g f rom poi nt 1 t o poi nt 4 i n dB =
)
13 // Re s ul t
5
14 //The amount o f power gai ne d by a s i g n a l t r a v e l l i n g
f rom poi nt 1 t o poi nt 4 i n dB = 2 .
6
Chapter 2
Second chapter
Scilab code Exa 2.1
1 // Capti on : Cr i t i c a l Angl e o f i n c i d e n c e
2 // Example 2 . 1
3 // page 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, Tot al I n t e r f l e c t i o n r e f l e c t i o n angl e
: c r i t i c a l angl e o f i n c i d e n c e i n de g r e e s )
11 // Re s ul t
12 // Tot al I n t e r f l e c t i o n r e f l e c t i o n angl e : c r i t i c a l
angl e o f i n c i d e n c e 42. 509773
Scilab code Exa 2.2 1 // Capti on : Fi ndi ng Cr i t i c a l angl e ,
nume r i c al ape r t ur e , ac c e pt anc e angl e
2 // Example 2 . 2
3 // page 45
4 clear;
5 close;
6 clc;
7
7 n1 = 1.48; // c or e r e f r a c t i v e i ndex
8 n2 = 1.46; // c l a ddi ng i ndex
9 phic = asin(n2/n1)*57.3;
10 NA = sqrt(n1^2 - n2^2);
11 phi0 = asin(NA)*57.3;
12 disp(phic , Cr i t i c a l anl ge )
13 disp(NA, nume r i c al a pe r t ur e )
14 disp(phi0 , ac c e pt anc e ange l i n a i r )
15 // Re s ul t
16 // Cr i t i c a l anl ge
17 // 80. 575927
18 // nume r i c al a pe r t ur e
19 // 0. 2424871
20 // ac c e pt anc e ange l i n a i r
21 // 14. 034412
Scilab code Exa 2.3 1 // Capti on : Program t o Ca l c ul a t e
NORMALIZED FREQUENCY V and Numer i cal Aper t ur e
2 // Example2 . 3
3 // Page 58
4 clear all;
5 close;
6 clc;
7 a = 25e-06;
8 Lambda =1300e-09;
9 V = 26.6;
10 Numerical_Aperture = V*Lambda /(2* %pi*a)
11 disp(Numerical_Aperture , Numer i cal Aper t ur e i s );
12 disp(M = (V^2)/2, Tot al number o f modes M e nt e r i ng
t he f i b e r i s : )
13 // Re s ul t
14 // Numer i cal Aper t ur e i s : 0. 2201431
15 // Tot al number o f modes M e nt e r i ng t he f i b e r i s :
353. 78
8
Scilab code Exa 2.4 1 // Capti on : Power f l ow i n t he c or e and
c l a ddi ng o f s t epi ndex f i b e r
2 // Example 2 . 4
3 // page 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, Tot al number o f modes )
12 disp(Pcladd_P *100, Pe r c e nt age o f power pr opagat e s i n
t he c l a ddi ng )
13 // Re s ul t
14 // Tot al number o f modes
15 // 242. 760. 5
16 // Pe r c e nt age o f power pr opagat e s i n t he c l a ddi ng
17 // 8. 5709913 4. 8349182
Scilab code Exa 2.5 1 // Capti on : Program t o c a l c u l a t e
Fi be r Bi r e f r i n g e n c e BETA f
2 // Example2 . 5
3 // page 65
4 clear all;
5 close;
6 clc;
7 Lambda = input( Enter t he wavel engt h o f Opt i c al
Si g na 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 us i ng
f or mul a 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 us i ng
f or mul a 2);
13 // Re s ul t
9
14 // Enter t he wavel engt h o f Opt i c al Si g na l 1300 e 09
15 // Beat Length 8e 02
16 //The f i b e r b i r e f r i e n g e n c e us i ng f or mul 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 us i ng f or mul a 2
0. 0000162
10
Chapter 3
Third chapter
Scilab code Exa 3.1
1 // Capti on : Program t o Fi nd At t e nuat i on i n dB/km
2 // Example3 . 1
3 // page 91
4 clear;
5 clc;
6 z = [1 2]; // di a t a nc e s ar e i n k i l o me 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, Opt i c al s i g n a l power de c r e as e d by i n
pe r c e nt age )
14 //RESULT
15 // Opt i c al s i g n a l power de c r e as e d by i n pe r c e nt age
16 // 49. 881277
17 // 74. 881136
Scilab code Exa 3.2 1 // Capti on : To Ca l c ul a t e i nput and
out put power i n dBm
2 // Example3 . 2
11
3 // page 91
4 clear;
5 close;
6 clc;
7 Pin = 200e-06; // power l aunched i nt o t he f i b e r
8 alpha = 0.4; // a t t e nua t i o n i n dB per KM
9 z = 30; // o p t i c a l f i b e r l e ng t h 30 KM
10 Pin_dBm = 10* log10(Pin/1e-03);
11 Pout_dBm = 10* log10(Pin/1e-03)-alpha*z;
12 Pout = 10^( Pout_dBm /10)
13 disp(Pin_dBm , Pin dBm )
14 disp(Pout_dBm , Pout dBm )
15 disp(Pout*1e-03, Output power i n wat t s )
16 // Re s ul t
17 //Pin dBm = 6. 9897
18 //Pout dBm = 18. 9897
19 // Output power i n wat t s = 0. 0000126
Scilab code Exa 3.3 1 // Capti on : Rayl e i gh s c a t t e r i n g l o s s
2 // Example3 . 3
3 // page97
4 clear;
5 close;
6 clc;
7 alpha_0 = 1.64; // a t t e nua t i o n at Lambda 0 i n dB/KM
8 Lambda_0 = 850e-09; // wavel engt h 850 nanometer
9 Lambda = 1310e-09; // wavel engt h 1350 nanometer
10 alpha_Lambda = alpha_0 *(( Lambda_0/Lambda)^4);
11 disp(alpha_Lambda , Rayl e i gh s c a t t e r i n g l o s s al pha (
Lambda ) = )
12 // Re s ul t
13 // Rayl e i gh s c a t t e r i n g l o s s al pha ( Lambda ) = 0. 2906929
Scilab code Exa 3.4 1 // Capti on : Program t o c a l c u l a t e
pe r c e nt i n de c r e a s e o f number o f modes
12
2 // Example 3 . 4
3 // page 99
4 clear;
5 clc;
6 alpha = 2; // gr aded i ndex p r o f i l e
7 n2 = 1.5; // c l a ddi ng
8 Lamda = 1.3e-06; // wavel engt h
9 R = 0.01; // bend r a di us o f c ur vat ur e
10 a = 25e-06; // c or e r a di us
11 delta = 0.01; // cor e c l a ddi ng i ndex p r o f i l e
12 k = 4.83 e06; // pr opagat i on c ons t ant
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 de c r e as e d by )
18 disp( Pe r ce nt i n gradedi ndex f i b e r ,Neff_Ninf *100)
19 //RESULTS
20 // number o f modes de c r e as e d by 50 Per c ent i n graded
i ndex f i b e r
Scilab code Exa 3.5
1 // Capti on : Ca l c ul a t i o n o f pul s e br oade ni ng
2 // Example3 . 5
3 // page 103
4 clear;
5 clc;
6 close;
7 C = 3e08; // f r e e s pac e v e l o c i t y i n metre / s e c
8 n1 = 1.48; // c or e r e f r a c t i v e i ndex
9 n2 = 1.465; // c l a ddi ng r e f r a c t i v e i ndex
10 delta = 0.01; // i ndex d i f f e r e n c e
11 L = 10^3; // f i b e r l e ng t h 10KM
12 deltaT = (L*(n1^2)/(C*n2))*delta;
13 disp(( deltaT/L)*10^12 , pul s e br oade ni ng i n ns /KM )
14 // Re s ul t
15 // pul s e br oade ni ng i n ns /KM = 49. 838453
13
Scilab code Exa 3.6
1 // Capti on : Ca l c ul a t i o n o f bandwi dth di s t a nc e
2 // Example3 . 6
3 // page 104
4 clear;
5 clc;
6 close;
7 n1 = 1.48; // c or e r e f r a c t i v e i ndex
8 n2 = 1.465; // c l a d d i n i g r e f r a c t i v e i ndex
9 delta = 0.01; // i ndex d i f f e r e n c e
10 C =3*(10^8); // f r e e s pac e v e l c o t i y
11 BL = (n2/(n1^2))*(C/delta);
12 disp(BL, Bandwi dth di s t a nc e i n bPSM )
13 disp(BL/10^9, Bandwi dth di s t a nc e i n MbPSKM )
14 // Re s ul t
15 // Bandwi dth di s t a nc e i n bPSM
16 // 2. 006D+10
17 // Bandwi dth di s t a nc e i n MbPSKM
18 // 20. 064828
Scilab code Exa 3.7 1 // Capti on : Program t o Fi nd out t he
Mat e r i al Di s pe r s i o n
2 // Example3 . 7
3 // page107
4 clear;
5 clc;
6 Lamda = 800e-09; // Wavel ength i n meter
7 sigma_Lamda_LED = 40e-09; // s p e c t r a l wi dth i n met er s
8 pulse_spread = 4.4e-12; // pul s e s pr e ad i n s e c / meter
9 mat_dispersion = pulse_spread/sigma_Lamda_LED
10 disp(mat_dispersion , ma t e r i a l d i s p e r s i o n i n s e c onds /
s quar e meter )
11 // Re s ul t
12 // ma t e r i a l d i s p e r s i o n i n s e c onds / s quar e meter
14
0. 00011
Scilab code Exa 3.8 1 // Capti on : Program t o Fi nd out
Wavegui de Di s pe r s i o n
2 // Example3 . 8
3 // page110
4 clear;
5 clc;
6 n2 = 1.48; // i ndex o f c l a ddi ng
7 delta = 0.002; // i ndex d i f f e r e n c e
8 Lamda = 1320e-09; // Wavel ength i n met er s
9 V_dVb_dV = 0.26; //The val ue i n s quar e br a c ke t s f o r
v = 2 . 4
10 C =3e08;// Enter t he v e l o c i t y o f l i g h t i n f r e e s pac e
11 Dwg_Lamda = -(((n2*delta)/C)*(1/ Lamda))*V_dVb_dV
12 disp(Dwg_Lamda *1e06 , The wavegui de d i s p e r s i o n i n ps /
nm. km );
13 //RESULTS
14 //The wavegui de d i s p e r s i o n i n ps /nm. km =
1. 9434343
15
Chapter 4
Fourth chapter
Scilab code Exa 4.1 1 // Capti on : Program t o f i nd i n t r i n s i c
c a r r i e r c o nc e nt r a t i o n
2 // Example4 . 1
3 // page136
4 clear;
5 close;
6 clc;
7 m = 9.11e-31; // El e c t r o n r e s t mass i n kg
8 me = 0.068*m; // Ef f e c t i v e e l e c t r o n mass kg
9 mh = 0.56*m; // Ef f e c t i v e hol e mass i n kg
10 Eg = 1.42*1.60218e-19; //bandgap ener gy i n v o l t s
11 kB = 1.38054e-23; // Bol tzma s c ons t ant
12 T = 300; //room t e mpe r at ur e i n k e l v i n
13 h = 6.6256e-34; // Pl anck s c ons t ant
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 c ons t ant o f ma t e r i a l
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 nc e nt r a t i o n i n c ubi c
meter )
17 // Re s ul t
18 // i n t r i n s i c c a r r i e r c o nc e nt r a t i o n i n cube meter
2. 551D+12
16
Scilab code Exa 4.3
1 // Capti on : Fi ndi ng Enegy gap and Wavel ength
2 // Example4 . 3
3 // page146
4 clear;
5 close;
6 clc;
7 x =0.07; // c o mpo s i t i o na l par amet er 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 , Wavel ength i n mi cr o met er s )
12 // Re s ul t
13 // Band Energy gap i n ev 1. 5139234
14 // Wavel ength i n mi cr o met er s 0. 8190639
Scilab code Exa 4.4
1 // Capti on : Fi ndi ng Enegy gap and Wavel ength
2 // Example4 . 4
3 // page146
4 clear;
5 close;
6 clc;
7 y =0.57; // c o mpo s i t i o na l par amet er 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 , Wavel ength i n mi cr o met er s )
12 // Re s ul t
13 // Band Energy gap i n ev 0. 978588
14 // Wavel ength i n mi cr o met er s 1. 2671318
Scilab code Exa 4.5
1 // Capti on : To f i nd out t he I n t e r n a l Quantum
Ef 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 ur c e
2 // Example4 . 5
17
3 // page149
4 clear;
5 clc;
6 tuo_r = 30e-09; // r a d i a t i v e r e c ombi nat i on i n s e c onds
7 tuo_nr =100e-09; //nonr a d i a t i v e r e c ombi nat i on i n
s e c onds
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.6256e-34; // Pl ank s c ons t ant
10 C = 3e08; // v e l o c i t y i n m/ s e c
11 q = 1.602e-19; // e l e c t r o n c har ge i n coul ombs
12 I = 40e-03; // dr i v e c ur r e nt i n Amps
13 Lamda = 1310e-09; // peak wavel engt 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 he gi ve n r a d i a t i v e and nonr a d i a t i v e
r e c ombi nat i on ti me i s );
17 disp(Etta_internal *100, I n t e r n a l Quantum Ef f i c i e n c y
i n Pe r c e nt age );
18 //RESULT
19 //THE INTERNAL POWER GENRATED WITH IN LED SOURCE IN
WATTS I S
20 // 0. 0291427
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 he gi ve n
r a d i a t i v e and nonr a d i a t i v e r e c ombi nat i on ti me i s
0. 7692308
22 // I n t e r n a l Quantum Ef f i c i e n c y i n Pe r c e nt age
23 // 76. 923077
Scilab code Exa 4.6 1 // Capti on : Ext e r nal Quantum
Ef f i c i e n c y i n pe r c e nt age
2 // Example 4 . 6
3 // page151
4 clear;
18
5 close;
6 clc;
7 n = 3.5; // r e f r a c t i v e i ndex o f an LED
8 Etta_External = 1/(n*(n+1)^2);
9 disp(Etta_External *100, Ext e r nal Ef f i c i e n c y i n
pe r c e nt age )
10 // Re s ul t
11 // Ext e r nal Ef f i c i e n c y i n pe r c e nt age 1. 4109347
Scilab code Exa 4.7
1 // Capti on : Program t o f i nd Las i ng Thr es hol d gai n
2 // Example4 . 7
3 // page156
4 clear;
5 clc;
6 L = 500e-06; // Las e r di ode l e ng t h i n met er 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 val ue 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 val ue o f anot he r
end ;
9 alpha_bar =10/1e-02; // a bs o r pt i o n c o e f f i c i e n t ;
10 alpha_end = (1/(2*L))*log (1/(R1*R2));// mi r r or l o s s
i n t he l a s i n g c a v i t y
11 alpha_threshold = alpha_bar+alpha_end;// t o t a l l o s s
12 disp(alpha_threshold ,The Thr es hol d Gain per metre )
13 alpha_threshold_cm = alpha_threshold /100
14 disp(alpha_threshold_cm ,The Thr es hol d Gain per
c e nt i me t r e );
15 // Re s ul t
16 //The Thr es hol d Gain per metre 3278. 8686
17 //The Thr es hol d Gain per c e nt i me t r e 32. 788686
Scilab code Exa 4.8 1 // Capti on : Program TO Ca l c ul a t e
Frequency Spaci ng & Wavel ength Spaci ng
2 // Example4 . 8
3 // page160
4 clear;
19
5 clc;
6 Lamda = 850e-9 // Emi s s i on wavel engt h o f LASER di ode
7 n = 3.7 // r e f r a c t i v e i ndex o f LASER di ode
8 L = 500e-6// l e ng t h o f LASER di ode
9 C = 3e08 // v e l o c i t y o f Li ght i n f r e e s pac 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 poi nt 3 nanometer
13 sigma = sqrt(-( Half_power ^2) /(2* log (0.5)));
14 disp(delta_frequency , Enter t he f r e que nc y s pac i ng i n
Her t z );
15 disp(delta_Lamda , Enter t he wael engt h s pac i ng i n
met r es );
16 disp(sigma , s p e c t r a l wi dth o f t he gai n );
17 //RESULT
18 // Enter t he f r e que nc y s pac i ng i n Her t z
19 // 8. 108D+10
20 // Enter t he wael engt h s pac i ng i n met r es
21 // 1. 953D10
22 // s p e c t r a l wi dth o f t he gai n
23 // 1. 699D09
Scilab code Exa 4.9 1 // Capti on : Ca l c ua l t i o n o f number o f
hal f wave l e ngt hs and wavel engt h s pac i ng between
l a s i n g modes
2 // Example4 . 9
3 // page161
4 clear;
5 clc;
6 close;
7 Lambda = 900e-09; // wavel engt h o f l i g t h e mi t t e d by
l a s e r di oda
8 L = 300e-06; // l e ng t h o f l a s e r c hi p
9 n = 4.3; // r e f r a c t i v e i ndex o f t he l a s e r ma t e r i a l
10 m = 2*L*n/Lambda;// number o f hal f wave l e ngt hs
11 delta_Lambda = (Lambda ^2) /(2*L*n);// wavel engt h
s pac i ng
20
12 disp(m, number o f hal f wave l e ngt hs s panni ng t he
r e g i o n between mi r r or s u r f a c e s )
13 disp(delta_Lambda , s pac i ng between l a s i n g modes i s )
14 // Re s ul t
15 // number o f hal f wave l e ngt hs s panni ng t he r e g i o n
between mi r r or s u r f a c e s 2866. 6667
16 // s pac i ng between l a s i n g modes i s 3. 140D10
21
Chapter 5
Fifth chapter
Scilab code Exa 5.1 1 // Capti on : Ca l c ul a t i o n o f La 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 // page192
4 clear;
5 clc;
6 close;
7 phi = 0; // l a t e r a l c o o r di na t e
8 Half_power = 10; // h a l f power beam wi dth
9 teta = Half_power /2;
10 teta_rad = teta /57.3;
11 L = log (0.5)/log(cos(teta_rad));
12 disp(L, La 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 // Re s ul t
14 // La 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 // Capti on : Program t o Ca l c ua l t e
Opt i c al Power Emi tted f rom t he Li ght s o ur c e and
Opt i c al power c oupl e d t o s t epi ndex f i b e r
2 // Example5 . 2
3 // page194
4 clear;
22
5 close;
6 clc;
7 rs = 35e-06; // t he s o ur c e r a di us i n meter
8 a = 25e-06; // t he c or e r a d i i o f s t epi ndex f i b e r
meter
9 NA = 0.20; // t he nume r i c al a pe r t ur e val ue
10 Bo = 150e04;// r a di a nc e i n W/ s quar e meter . s r
11 Ps = ((%pi ^2)*(rs^2))*Bo;// power e mi t t e d by t he
s our c e
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, Opt i c al power e mi t t e d by LED l i g h t s o ur c e
Ps = )
18 disp(PLED_step , Opt i c al Power c oupl e d i nt o s t e p
i ndex f i b e r i n Watts PLED step = );
19 //RESULT
20 // Opt i c al power e mi t t e d by LED l i g h t s our c e Ps =
0. 0181354
21 // Opt i c al Power c oupl e d i nt o s t e p i ndex f i b e r i n
Watts PLED step = 0. 0003701
Scilab code Exa 5.3 1 // Capti on : Fr e s ne l r e f l e c t i o n , power
c oupl e d and power l o s s
2 // Example5 . 3
3 // page194
4 clear;
5 clc;
6 close;
7 n1 =3.6; // r e f r a c t i v e i ndex o f o p t i c a l s our c e
8 n = 1.48; // r e f r a c t i v e i ndex 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 // Re s ul t
23
13 // Power l o s s i n dB L = 0. 8310322
Scilab code Exa 5.4 1 // Capti on : Power c oupl e d between two
gr aded i ndex f i b e r s
2 // Example5 . 4
3 // page205
4 clear;
5 clc;
6 close;
7 a =1e-06; // c or e r a d i i i n met er 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 , Opt i c al power c oupl e d f rom f i r s t f i b e r
i nt o s econd f i b e r i n dB i s = )
12 // Re s ul t
13 // Opt i c al power c oupl e d f rom f i r s t f i b e r i nt o s econd
f i b e r i n dB i s = 1. 2597813
Scilab code Exa 5.5 1 // Capti on : Los s between s i n g l e mode
f i b e r s due t o La t e r a l mi s al i gnment
2 // Example5 . 5
3 // page 211
4 clear;
5 clc;
6 close;
7 V = 2.405; // nor mal i z e d f r e que nc y
8 n1 =1.47; // c or e r e f r a c t i v e i ndex
9 n2 = 1.465; // c l a ddi ng r e f r a c t i v e i ndex
10 a = (9/2) *10^ -06; // c or e r a d i i i n met er s
11 d = 1e-06; // l a t e r a l o f f s e t i n met er 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, modef i e l d di ame t e r i n met er s W = );
24
15 disp(Lsm , Los s between 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 // Re s ul t
17 //modef i e l d di ame t e r i n met er s W = 0. 0000049
18 // Los s between 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. 1775797
Scilab code Exa 5.6 1 // Capti on : Los s between s i n g l e mode
f i b e r s due t o angul ar mi s al i gnment
2 // Example5 . 6
3 // page212
4 clear;
5 clc;
6 close;
7 clear;
8 clc;
9 close;
10 V = 2.405; // nor mal i z e d f r e que nc y
11 n1 =1.47; // c or e r e f r a c t i v e i ndex
12 n2 = 1.465; // c l a ddi ng r e f r a c t i v e i ndex
13 a = (9/2) *10^ -06; // c or e r a d i i i n met er s
14 d = 1e-06; // l a t e r a l o f f s e t i n met er s
15 W = a*(0.65+1.619*V^( -1.5) +2.879*V^-6);//modef i e l d
di ame t e r
16 teta = 1; // i n de g r e e s
17 teta = 1/57.3; // i n r a da i a ns
18 Lambda = 1300e-09; // wavel engt h i n met er s
19 Lsm_ang = -10* log10(exp(-(%pi*n2*W*teta/Lambda)^2));
20 disp(Lsm_ang , Los s between s i n g l e mode f i b e r s due t o
angul ar mi s al i gnme nt Lsm ang = )
21 // Re s ul t
22 // Los s between s i n g l e mode f i b e r s due t o angul ar
mi s al i gnment Lsm ang = 0. 4054658
25
Chapter 6
Sixth chapter
Scilab code Exa 6.1
1 // Capti on : Cuto f f wavel engt h o f phot odi ode
2 // Example6 . 1
3 // page224
4 clear;
5 clc;
6 close;
7 h = 6.625*(10^ -34); // pl anks c ons t ant
8 C = 3*(10^8); // f r e e s pac 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 , Cuto f f Wavel ength o f phot odi ode i n
met er s = )
12 // Re s ul t
13 //Cuto f f Wavel ength o f phot odi ode i n met er s=
0. 0000009
Scilab code Exa 6.2
1 // Capti on : Ca l c ul a t i o n o f Quantum e f f i c i e n c y
2 // Example6 . 2
3 // page 226
4 clear;
5 clc;
26
6 close;
7 Ip_q = 5.4*(10^6);// e l e c t r o n hol e p a i r s ge ne r at e d
8 Pin_hv = 6*(10^6);// number o f i n c i d e n t phot ons
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 pe r c e nt age = )
12 // Re s ul 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 pe r c e nt age = 9 0 .
Scilab code Exa 6.3
1 // Capti on : Ca l c ul a t i o n o f phot oc ur r e nt
2 // Example6 . 3
3 // page226
4 clear;
5 clc;
6 close;
7 R = 0.65; // Re s po ns i vi t y o f phot odi ode
8 Pin = 10*(10^ -6); // Opt i c al power l e v e l i n wat t s
9 Ip = R*Pin;
10 disp(Ip*10^6, The amount o f phot oc ur r e nt ge ne r at e d
i n uA = )
11 // Re s ul t
12 //The amount o f phot oc ur r e nt ge ne r at e d i n uA = 6 . 5
Scilab code Exa 6.4 1 // Capti on : Ca l c ul a t i o n o f
Re s po ns i vi t y o f phot odi ode
2 // Example6 . 4
3 // page227
4 clear;
5 clc;
6 close;
7 Lambda = 1300e-09; // wavel engt h i n met er s
8 C = 3*(10^8); // f r e e s pac e v e l o c i t y
9 v =C/Lambda; // f r e que nc y i n Hz
10 q = 1.6*(10^ -19);// Change i n coul ombs
27
11 etta = 0.9; //quantum e f f i c i e n c y 90%
12 h = 6.625*10^ -34; // pl anks c ons t ant
13 R = (etta*q)/(h*v); // Re s po ns i vi t y
14 disp(R, Re s po ns i vi t y o f phot odi ode at 1330nm i n A/W
R = )
15 Eg = 0.73; // ener gy 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 wavel engt h i n met er s
17 disp(LambdaC , cut o f f wavel engt h i n met er s = )
18 // Re s ul t
19 // Re s po ns i vi t y o f phot odi ode at 1330nm i n A/W R =
0. 9418868
20 // cut o f f wavel engt h i n met er s = 1. 6986301
Scilab code Exa 6.5 1 // Capti on : To f i nd pr i mar y
phot oc ur r e nt and mu l t i p l i c a t i o n f a c t o r
2 // Example6 . 5
3 // page230
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
qaval anc he phot odi ode
8 C = 3*(10^8); // f r e e s pac e v e l o c i t y i n m/ s
9 Lambda = 900e-09; // wavel engt h i n met er s
10 q = 1.6*(10^ -19);// c har ge i n coul ombs
11 h = 6.625*(10^ -34);// pl anks c ons t ant
12 v = C/Lambda; // f r e qune 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); // mu l t i p l i e d phot oc ur r e nt
16 M = Im/Ip; // mu l t i p l i c a t i o n f a c t o r
17 disp(Ip*10^6, Pri mary phot oc ur r e nt i n uAmps I p= )
18 disp(ceil(M), Pri mary phot oc ur r e nt i s mu l t i p l i e d by
a f a c t o r o f M = )
19 // Re s ul t
20 // Pri mary phot oc ur r e nt i n uAmps I p = 0. 2354717
28
21 // Pri mary phot oc ur r e nt i s mu l t i p l i e d by a f a c t o r o f
M = 4 3 .
Scilab code Exa 6.6 1 // Capti on : Means quar e s hot no i s e
c ur r e nt , Means quar e dark c ur r e nt and MeanSquare
t her mal no i s e c ur r e nt
2 // Example6 . 6
3 // page 234
4 clear;
5 clc;
6 close;
7 Lambda = 1330e-09; // wavel engt h i n met er s
8 ID = 4e-09; // phot odi ode c ur r e nt
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 1000 ohms
11 Pin = 300e-09; // i n c i d e n t o p t i c a l power i s 300 nano
wat t s
12 Be = 20*(10^6); // r e c e i v e r bandwi dth
13 q = 1.6*(10^ -19); // c har ge i n coul ombs
14 h = 6.625*10^ -34; // pl anks c ons t ant
15 v= (3*10^8)/Lambda; // f r e que nc y i n Hz
16 Ip = (etta*q*Pin)/(h*v);// pr i mar y phot oc ur r e nt
17 Ishot = 2*q*Ip*Be; // shot no i s e c ur r e nt
18 Ishot = sqrt(Ishot);
19 IDB = 2*q*ID*Be; // dark c ur r e nt
20 IDB = sqrt(IDB);
21 T = 283; //room t e mpe r at ur e i n k e l v i n
22 KB = 1.38*10^ -23; // bol tzmann s c ons t ant
23 RL = 1000; // l oad r e s i s t a n c e
24 IT = (4*KB*T)*Be/RL;// Thermal no i s e c ur r e nt
25 IT = sqrt(IT);
26 disp(Ip*10^6, pr i mar y phot oc ur r e nt i n uA IP = )
27 disp(Ishot *10^9, means quar e s hot no i s e c ur r e nt f o r
a pi n phot odi ode i n nA I s ho t = )
28 disp(IDB*10^9, means quar e dark c ur r e nt i n nA IDB= )
29 disp(IT*10^9, means quar e t her mal no i s e c ur r e nt f o r
t he r e c e i v e r i n nA IT = )
29
30 // Re s ul t
31 // pr i mar y phot oc ur r e nt i n uA IP = 0. 2890868
32 //means quar e s hot no i s e c ur r e nt f o r a pi n
phot odi ode i n nA I s ho t = 1. 3602042
33 //means quar e dark c ur r e nt i n nA IDB = 0. 16
34 //means quar e t her mal no i s e c ur r e nt f o r t he r e c e i v e r
i n nA IT = 17. 675746
Scilab code Exa 6.7
1 // Capti on : c i r c u i t bandwi dth o f a phot odi ode
2 // Example6 . 7
3 // page 239
4 clear;
5 clc;
6 close;
7 CP = 3*10^ -12; // phot odi ode c a pa c i t a nc e i s 3 pi c o
f a r a d
8 CA = 4*10^ -12; // a mp l i f i e r c a pc i t a nc e i s 4 pi c o f ar ad
9 CT = CP+CA; // t o t a l c a pa c i t a nc e
10 RT1 = 1000; // phot odi ode l oad r e s i s t a n c e
11 BC1 = 1/(2* %pi*RT1*CT); // c i r c u i t bandwi dth
12 RT2 = 50; // phot odi ode l oad r e s i s t a n c e
13 BC2 = 1/(2* %pi*RT2*CT);// c i r c u i t bandwi dth
14 disp(BC1 , Ci r c u i t bandwi dth f o r 1 k i l o Ohm phot odi ode
r e s i s t a n c e BC1 = )
15 disp(BC2 , Ci r c u i t bandwi dth f o r 50 ohm phot odi ode
r e s i s t a n c e BC2 = )
16 // Re s ul t
17 // Ci r c u i t bandwi dth f o r 1 k i l o Ohm phot odi ode
r e s i s t a n c e BC1 = 22736420.
18 // Ci r c u i t bandwi dth f o r 50 ohm phot odi ode r e s i s t a n c e
BC2 = 4. 547D+08
30
Chapter 7
Seventh chapter
Scilab code Exa 7.1
1 // Capti on : To f i nd optimum d e c i s i o n t hr e s ho 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 par amet er val ue = )
14 disp(Vth , optimum d e c i s i o n t hr e s ho l d Vth = )
15 // Re s ul t
16 //Q par amet er val ue = 0 . 5
17 //optimum d e c i s i o n t hr e s ho l d Vth = 0 . 5
Scilab code Exa 7.2
1 // Capti on : To f i nd out s i g na l tono 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 gi ve 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, Pr o b a bi l i t y o f e r r o r Pe (Q) = )
11 disp(S_N_dB , Si gnal tono i s e r a t i o i n dB S/N = )
12 // Re s ul t
13 // Pr o b a b i l i t y o f e r r o r Pe (Q) = 9. 866D10
14 // Si gnal tono i s e r a t i o i n dB S/N = 10. 791812
32
Scilab code Exa 7.3
1 // Capti on : Pl o t t i ng Bi t Error Rate ve r s us Q f a c t o r
2 // Example7 . 3
3 // page 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,1e -16;8 ,0.5];
11 plot(Q,Pe, r )
12 xlabel( Q )
13 ylabel( Pe )
14 title( BER( Pe ) ve r s us t he f a c t o r Q )
15 disp(Pe(1), Pr o b a bi l i t y o f e r r o r at Q =0 )
16 disp(Pe (101), Pr o b a bi l i t y o f e r r o r at Q =1 )
17 disp(Pe (201), Pr o b a bi l i t y o f e r r o r at Q =2 )
18 disp(Pe (301), Pr o b a bi l i t y o f e r r o r at Q =3 )
19 disp(Pe (401), Pr o b a bi l i t y o f e r r o r at Q =4 )
20 disp(Pe (501), Pr o b a bi l i t y o f e r r o r at Q =5 )
21 disp(Pe (601), Pr o b a bi l i t y o f e r r o r at Q =6 )
22 disp(Pe (701), Pr o b a bi l i t y o f e r r o r at Q =7 )
23 disp(Pe (801), Pr o b a bi l i t y o f e r r o r at Q =8 )
24 // Re s ul t
25 // Pr o b a b i l i t y o f e r r o r at Q =0
26 // 0 . 5
27 // Pr o b a b i l i t y o f e r r o r at Q =1
28 // 0. 1586553
29 // Pr o b a b i l i t y o f e r r o r at Q =2
30 // 0. 0227501
31 // Pr o b a b i l i t y o f e r r o r at Q =3
32 // 0. 0013499
33 // Pr o b a b i l i t y o f e r r o r at Q =4
34 // 0. 0000317
35 // Pr o b a b i l i t y o f e r r o r at Q =5
36 // 0. 0000003
37 // Pr o b a b i l i t y o f e r r o r at Q =6
33
38 // 9. 866D10
39 // Pr o b a b i l i t y o f e r r o r at Q =7
40 // 1. 280D12
41 // Pr o b a b i l i t y o f e r r o r at Q =8
42 // 6. 106D16
Scilab code Exa 7.4 1 // Capti on : To f i nd t he ener gy o f t he
photon i n c i d e n t on phot odi ode
2 // and Minimum i n c i d e n t o p t i c a l power
3 // Example7 . 4
4 // page 262
5 clear;
6 clc;
7 close;
8 h = 6.626e-34; // pl anks c ons t ant J/ s
9 C = 3e08; // f r e e s pac e v e l o c i t y i n m/ s
10 B = 10e06; // data r a t e 10 Mb/ s e c
11 tuo = 2/B; // 1/ tuo = h a l f t he data r a t e B
12 Lambda = 850e-09; // o pe r a t i ng wavel engt h i n nm
13 E = 20.7*h*C/Lambda;
14 Pi = E/tuo;
15 disp(E, Energy o f t he i n c i d e n t photon 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 // Re s ul t
19 // Energy o f t he i n c i d e n t photon E = 4. 841D18
20 // minimum i n c i d e n t o p t i c a l power Pi = 2. 420D11
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 // Capti on : Program t o c a l c u l a t e t he
Tot al Opt i c al Power l o s s
2 // Example8 . 1
3 // page 287
4 clear;
5 clc;
6 close;
7 system_margin = 6; // i n dB
8 alpha = 3.5; // a t t e nua t i o n i n dB/Km
9 L =6; // Length o f t r a ns mi s s i o n path i n Km
10 lc = 1; // c onne c t or 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 // Re s ul 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 // Capti on : Program t o c a l c u l a t e t he system margi n
2 // Example8 . 2
3 // page 288
4 clear;
5 clc;
6 close;
35
7 Ps = 3; // l a s e r out put 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 ur c e c onne c t or l o s s i n dB
11 ljc = 2*4; // two ( j umper+c onne c t or l o s s ) i n dB
12 alpha = 0.3; // a t t e nua t i o n i n dB/Km
13 L = 60; // c a bl e l e ng t h i n Km
14 cable_att = alpha *60; // c a bl e a t t e nua t i o n i n dB
15 lrc = 1; // r e c e i v e r c onne c t or l o s s i n dB
16 system_margin = Allowed_Loss -lsc -ljc -cable_att -lrc;
17 disp(system_margin , The Fi nal Margi n i n dB = )
18 // Re s ul t
19 // The Fi nal Margi n i n dB = 7 .
Scilab code Exa 8.3
1 // Capti on : Program t o c a l c u l a t e l i n k r i s e ti me
2 // Example8 . 3
3 // page 291
4 clear;
5 clc;
6 close;
7 t_tx = 15e-09; // t r a ns mi t t e r r i s e ti me
8 t_mat = 21e-09; // ma 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
ti me
9 t_mod = 3.9e-09; // r i s e ti me r e s u l t i n g f rom modal
d i s p e r s i o n
10 t_rx =14e-09; // r e c e i v e r r i s e ti me
11 tsys = sqrt(t_tx ^2+ t_mat ^2+ t_mod ^2+ t_rx ^2)
12 disp(tsys*1e09 , l i n k r i s e ti me i n nano s e c onds t s y s
= )
13 // Re s ul t
14 // l i n k r i s e ti me i n nano s e c onds t s y s = 29. 617731
Scilab code Exa 8.4
1 // Capti on : Program t o c a l c u l a t e l i n k r i s e ti me
2 // Example8 . 4
36
3 // page292
4 clear;
5 clc;
6 close;
7 t_tx = 25e-12; // t r a ns mi s s i o n r i s e ti me i n s e c
8 t_GVD = 12e-12; //GVD r i s e ti me i n s e c
9 t_rx = 0.14e-09; // r e c e i v e r r i s e ti me i n s e c
10 tsys = sqrt(t_tx ^2+ t_GVD ^2+ t_rx ^2)
11 disp(tsys*1e09 , l i n k r i s e ti me i n nano s e c onds t s y s
= )
12 // Re s ul t
13 // l i n k r i s e ti me i n nano s e c onds t s y s = 0. 1427200
Scilab code Exa 8.5 1 // Capti on : Ca l c ul a t i o n o f Number o f
b i t s a f f e c t e d by a bur s t e r r o r
2 // Example8 . 5
3 // page 306
4 clear;
5 clc;
6 close;
7 bit_error_dur = 1e-03; // bi t c o r r upt i ng bur s t no i s e
dur at i on i n msec
8 B = 10e03; // data r a t e 10kb/ 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 bur s t e r r o r N=
)
11 // Re s ul t
12 // Number o f b i t s a f f e c t e d by a bur s t e r r o r N = 1 0 .
Scilab code Exa 8.6 1 // Capti on : Program t o f i nd
c o e f f i c i e n t s o f g e ne r a t o r pol ynomi al
2 // Example8 . 6
3 // page 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), Co e f f i c i e n t s o f g e ne r a t o r pol ynomi al
C = )
11 // Re s ul t
12 // Co e f f i c i e n t s o f g e ne r a t o r pol ynomi al C = 1 . 0 .
1 . 0 . 0 . 1 . 1 . 1 .
Scilab code Exa 8.7 1 // Capti on : Program t o f i nd CRC(
Cyc l i c Redundancy Check )
2 // Example8 . 7
3 // page 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, Remai nder R = )
17 disp(Q, Quot i ent Q = )
18 disp([m R], CRC f o r t he gi ve n i nf o r ma t i o n CRC = )
19 // Re s ul t
20 // Remai nder R =
21 // 1 . 0 . 1 .
22 // Quot i ent Q =
23 // 1 . 1 . 0 . 1 . 1 .
24 //CRC f o r t he gi ve n i nf o r ma t i o n CRC =
25 // 1 . 1 . 1 . 1 . 0 . 1 . 0 . 1 .
38
Scilab code Exa 8.8 1 // Capti on : Program t o pe r c e nt age o f
bur s t e r r o r de t e c t e d by CRC
2 // Example8 . 8
3 // page 309
4 clear;
5 clc;
6 close;
7 N =32;
8 Ped = 1 -(1/(2^N));
9 disp(Ped*100, Pe r ce nt o f bur s t e r r o r de t e c t e d by CRC
f o r a l e ng t h o f 32 Ped= )
10 // Re s ul t
11 // Per c ent o f bur s t e r r o r de t e c t e d by CRC f o r a
l e ng t h o f 32 Ped=100.
Scilab code Exa 8.9 1 // Capti on : Pe r c e nt over head t o t he
i nf o r a mt i o n s t r eam Usi ng ReedSol omon code f o r
e r r o r c o r r e c t i o n
2 // Example8 . 9
3 // page 309
4 clear;
5 clc;
6 close;
7 S =8; //ReedSol omon code wi th 1 byt e
8 n = (2^S-1); // l e ng t h o f coded s e que nc e
9 k = 239; // l e ng t h o f message s e que nc e
10 r = n-k;
11 disp(r, number o f r edundant byt e s r = )
12 disp((r/k)*100, Pe r ce nt over head = )
13 // Re s ul t
14 // number o f r edundant byt e s r = 1 6 .
15 // Per c ent over head = 6. 6945607
39
Chapter 9
Ninth chapter
Scilab code Exa 9.1 1 // Capti on : Program t o f i nd Re l a t i v e
I n t e n s i t y Noi s e ( RIN)
2 // Example9 . 1
3 // page 320
4 clear;
5 clc;
6 close;
7 IB_Ith = [1.3 ,1.4 ,1.5 ,1.6]; // r a t i o between bi a s
c ur r e nt and t hr e s ho l d c ur r e nt
8 f = 100e06; // f r e que nc y = 100MHz
9 RIN = ((IB_Ith -1)^-3)/f;
10 RIN_dB = 20* log10(RIN);
11 disp(RIN_dB , Re l a t i v e I n t e n s i t y Noi s e ( RIN) i n dB/Hz
RIN dB = )
12 // Re s ul t
13 // Re l a t i v e I n t e n s i t y Noi s e ( RIN) i n dB/Hz RIN dB =
14 // 128. 62728 136. 1236 141. 9382
146. 68908
Scilab code Exa 9.2 1 // Capti on : Program t o Fi nd l i mi t i n g
c o n d i t i o n s f o r pi nphot odi ode
2 // Example9 . 3
40
Figure 9.1: Figure for Example9.2Preamplier
41
Figure 9.2: Figure for Example9.2quantumnoise
42
Figure 9.3: Figure for Example9.2reectionnoise
43
3 // page 323
4 clear;
5 clc;
6 close;
7 T =300; //room t e mpe r at ur e i n k e l v i n
8 kB = 1.38054e-23; // Boltzmann s c ons t ant i n J o ul e s /k
9 m =0.25; // modual t i on i ndex
10 RIN_dB = -143; // Re 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))*1e-3; // power c oupl e d t o o p t i c a l
f i b e r i n dBm
13 R = 0.6; // Re s po ns i vi t y A/w
14 Be = 10e06; // bandwi dth 10MHz
15 ID = 10e-09; // dark c ur r e nt 10nA
16 Req = 750; // e q ui v a l e nt r e s i s t a n c e 750 ohm
17 Ft = 10^(3/10); // i n 3 dB
18 M = 1; // Mu l t i p l i c a t i o n f a c t o r f o r pi n phot odi ode
19 R = 0.6; // r e s p o n s i v i t y i n A/m
20 q = 1.602e-19; // c har ge i n coul ombs
21 p = 0:-1: -20;
22 P = (10^(p/10))*1e-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( Recei ved Opt i c al Power (dBm) )
29 ylabel( Car r i e r tono i s e r a t i o ( dB) )
30 title( Car r i e r tono i s e r a t i o 1 ( Pr e a mp l i f i e r
r e c e i v e r no i s e ) )
31 figure
32 plot(p,10* log10(C_N_2), m )
33 xlabel( Recei ved Opt i c al Power (dBm) )
34 ylabel( Car r i e r tono i s e r a t i o ( dB) )
35 title( Car r i e r tono i s e r a t i o 2 ( Quantum no i s e ) )
36 figure
37 plot(p,10* log10(C_N_3)*ones(1,length(p)))
38 xlabel( Recei ved Opt i c al Power (dBm) )
44
39 ylabel( Car r i e r tono i s e r a t i o ( dB) )
40 title( Car r i e r tono i s e r a t i o 3 ( Re f l e c t i o n no i s e ) )
45
Chapter 10
Tenth chapter
Scilab code Exa 10.1
1 // Capti on : Fi ndi ng t he c e nt e r wavel engt h
2 // Exampl e10 . 1
3 // page 343
4 clear;
5 clc;
6 close;
7 delta_v = 14e12; // o p t i c a l bandwi dth
8 Lambda = 1520; // s p e c t r a l band
9 C = 3e08; // f r e e s pac e v e l o c i t y
10 delta_Lambda = (Lambda ^2)*delta_v/C;
11 disp(delta_Lambda *1e-09, s p e c t r a l band i n nano meter
)
12 // Re s ul t
13 // s p e c t r a l band i n nano meter = 107. 81867
Scilab code Exa 10.2
1 // Capti on : Fi ndi ng mean f r e que nc y s pac i ng
2 // Exampl e10 . 2
3 // page 343
4 clear;
5 clc;
6 close;
46
7 C = 3e08; // f r e e s pac e v e l o c i t y
8 delta_Lambda = 0.8e-09; // s p e c t r a l band i n meter
9 Lambda = 1550e-09; // wavel engt h i n meter
10 delta_v = C*delta_Lambda/Lambda ^2;
11 disp(ceil(delta_v *1e-09), Mean Frequency s pac i ng i n
GHz = )
12 // Re s ul t
13 // Mean Frequency s pac i ng i n GHz = 100.
Scilab code Exa 10.3 1 // Capti on : Program t o f i nd c o upl i ng
r a t i o , Exces 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 2x2 Fi be r c o upl e r
2 // Exampl e10 . 3
3 // page 348
4 clear;
5 clc;
6 close;
7 P0 = 200e-06; // i nput o p t i c a l power l e v e l i n wat t s
8 P1 = 90e-06; // out put power at por t 1
9 P2 = 85e-06; // out put power at por t 2
10 P3 = 6.3e-09; // out put power at por 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 , Coupl i ng r a t i o )
17 disp(Excess_loss , Exces 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 ( por t 0 t o
por t 1) i n dB )
19 disp(Insertion_loss_0_2 , I n s e r t i o n l o s s ( por t 0 t o
por t 2) i n dB )
20 disp(Return_loss , Retunr l o s s i n dB )
21 // Re s ul t
22 // Coupl i ng r a t i o
23 // 48. 571429
24 // Exces 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 ( por t 0 t o por t 1) i n dB
27 // 3. 4678749
28 // I n s e r t i o n l o s s ( por t 0 t o por 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 // Capti on : Fi ndi ng out put powers at
out put por t o f 2x2 c o upl e r
2 // Exampl e10 . 5
3 // page 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 mat 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 at por t 1 Pout1 = )
13 disp(Pout2 , Output power at por t 2 Pout2 = )
14 // Re s ul t
15 // Output power at por t 1 Pout1 = 0 . 5
16 // Output power at por t 2 Pout2 = 0 . 5
Scilab code Exa 10.6
1 // Capti on : Program t o f i nd wavegui de l e ng t h
2 // Exampl e10 . 6
3 // page 353
4 clear;
5 clc;
6 close;
7 k = 0.6/1e-03; // c o upl i ng c o e f f i c i e n t per mi l l i
meter
8 m =1; //mode=1
48
9 L = %pi*(m+1) /(2*k);
10 disp(L*1e03 , Coupl i ng Length i n mm L = )
11 // Re s ul t
12 // Coupl i ng Length i n mm L = 5. 2359878
Scilab code Exa 10.7 1 // Capti on : Program t o f i nd Exces 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 // Exampl e10 . 7
3 // page 355
4 clear;
5 clc;
6 close;
7 Power_Lost = 5/100;
8 FT = 1-Power_Lost; // power c oupl 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 , Exces s Los s i n dB )
14 disp(Splitting_Loss , S p l i t t i n g Los s i n dB )
15 disp(Total_Loss , Tot al Los s e xpe r i e nc e d i n St ar
Coupl e r s i n dB )
16 // Re s ul t
17 // Exces s Los s
18 // 1. 1138197
19 // S p l i t t i n g Los s
20 // 15. 0515
21 // Tot al Los s e xpe r i e nc e d i n St ar Coupl e r s
22 // 16. 16532
Scilab code Exa 10.8
1 // Capti on : Program t o Wavegui de Length d i f f e r e n c e
2 // Exampl e10 . 8
3 // Page 357
4 clear;
5 close;
49
6 clc;
7 delta_Lambda = 0.08e-09; // wavel engt h s pac i ng i n
nano met er s
8 Lambda = 1550e-09; // wavel engt h i n met er 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 ndex i n t he
wavegui de
10 C =3e08; // f r e e s pac e v e l o c i t y
11 delta_v1 = 10e09; // f r e que nc y s pac i ng 1
12 delta_v2 = 130 e09; // f r e que nc y s pac i ng 2
13 delta_L1 = C/(2* neff*delta_v1);
14 delta_L2 = C/(2* neff*delta_v2);
15 disp(delta_L1 *1e03 , wavegui de l e ng t h d i f f e r e n c e i n
mi l l i met er s )
16 disp(delta_L2 *1e03 , wavegui de l e ng t h d i f f e r e n c e i n
mi l l i met er s )
17 // Re s ul t
18 // wavegui de l e ng t h d i f f e r e n c e i n mi l l i met er s
19 // 1 0 .
20 // wavegui de l e ng t h d i f f e r e n c e i n mi l l i met er s
21 // 0. 7692308
Scilab code Exa 10.9
1 // Capti on : Fi be r Bragg Gr at i ng : Peak Re f l e c t i v i t y ,
Coupl i ng c o e f f i c i e n t , f u l l bandwi dth
2 // Exampl e10 . 9 . a
3 clear;
4 close;
5 clc;
6 kL = [1,2,3];
7 Rmax = tanh(kL)^2;
8 // Exampl e10 . 9 . b
9 L =0.5e-02;
10 Lambda_Bragg = 1530e-09;
11 neff = 1.48;
12 delta_n = 2.5e-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, Coupl i ng c o e f f i c i e n t per cm k = )
17 disp(delta_Lambda *1e09 , f u l l bandwi dth i n nm = )
18 disp( )
19 disp( kL Rmax(%) )
20 disp( )
21 disp(kL, kL )
22 disp(Rmax *100, Rmax )
23 disp( )
24 // Re s ul t
25 // Coupl i ng c o e f f i c i e n t per cm k = 4. 2093235
26 // f u l l bandwi dth 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 // Capti on : PhasedArrayBased
De vi c e s : Channel s pac i ng i nt e r ms o f wavel engt h and
pathl e ng t h d i f f e r e n c e
2 // Exampl e10 . 1 0
3 // page 372
4 clear;
5 clc;
6 close;
7 Lambda_c = 1550e-09; // c e n t r a l de s i gn wavel engt h
8 nc = 1.45; // r e f r a c t i v e i ndex o f g r a t i ng ar r ay
wavegui de
9 ns = 1.45; // r e f r a c t i v e i ndex o f t eh s t a r c o upl e r
10 ng = 1.47; // group i ndex o f g r a t i ng ar r ay wavegui de
51
11 x = 5e-06 ; // c e nt e r toc e nt e r s pac i ng between t he
i nput wavegui des
12 d = 5e-06 ; // c e nt e r toc e nt e r s pac i ng between t he
out put wavegui des
13 m =1;
14 Lf = 10e-03; // di s t a nc e between t r a ns mi t t e r and
o bj e c t
15 delta_L = m*Lambda_c/nc;
16 delta_Lambda = (x/Lf)*(ns*d/m)*(nc/ng);
17 disp(delta_L *1e06 , Wavegui de l e ng t h d i f f e r e n c e i n um
= )
18 disp(delta_Lambda *1e09 , Channel s pac i ng i nt e r ms o f
wavel engt h i n nm= )
19 // Re s ul t
20 // Wavegui de l e ng t h d i f f e r e n c e i n um = 1. 0689655
21 // Channel s pac i ng i nt e r ms o f wavel engt h i n nm =
3. 5756803
Scilab code Exa 10.11
1 // Capti on : PhasedArrayBased De vi c e s : Length
d i f f e r e n c e between adj ac e nt ar r ay wavegui des
2 // Exampl e10 . 1 1
3 // page 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 ndex
8 Lambda_C = 1550.5e-09; // c e nt e r wavel engt h
9 delta_Lambda = 32.2e-09; // f r e e s p e c t r a l r ange
10 C = 3e08; // f r e e s pac 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 *1e06 , l e ng t h d i f f e r e n c e between
adj ac e nt ar r ay wavegui des i n um = )
13 // Re s ul t
14 // l e ng t h d i f f e r e n c e between adj ac e nt ar r ay
wavegui des i n um =51. 489618
52
Scilab code Exa 10.12 1 // Capti on : Maximum number o f
c hanne l s t hat can be pl ac e d i n t he t uni ng r ange
2 // Exampl e10 . 1 2
3 // page 383
4 clear;
5 clc;
6 close;
7 Lambda = 1550e-09; //DBR l a s e r o pe r a t i ng wavel engt h
8 delta_neff = 0.0065; //maximum i ndex change
9 delta_Lambda_tune = Lambda*delta_neff; // t uni ng
r ange i n met er s
10 delta_Lambda_signal = 0.02e-09; // s o ur c e s p e c t r a l
wi dth i n met er s
11 delta_Lambda_channel = 10* delta_Lambda_signal;
12 N = delta_Lambda_tune/delta_Lambda_channel;
13 disp(N, The number c hanne l s t hat can ope r at e i n t h i s
t uni ng r ange i s N= )
14 // Re s ul t
15 //The number c hanne l s t hat can ope r at e i n t h i s
t uni ng r ange i s N = 50. 375
53
Chapter 11
Eleventh chapter
Scilab code Exa 11.1
1 // Capti on : Program t o c a l c u l a t e Photon de ns i t y
2 // Exampl e11 . 1
3 // page 397
4 clear;
5 clc;
6 close;
7 Vg = 2e08; // group v e l o c i t y i n m/ s
8 h = 6.625e-34; // pl anks c ons t ant
9 C = 3e08; // f r e e s pac e v e l o c i t y i n m/ s
10 Lamda = 1550e-09; // o pe r a t i ng wavel engt h
11 V = C/Lamda; // f r e que nc y i n Hz
12 w = 5e-06; // wi dth o f o p t i c a l a mp l i f i e r i n met er s
13 d = 0.5e-06; // t h i c k n e s s o f o p t i c a l a mp l i f i e r i n
met er s
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 photon de ns i t y i n phot ons / c ubi c meter
i s Nph = )
17 // Re s ul t
18 //The photon de ns i t y i n phot ons / c ubi c meter i s Nph =
1. 560D+16
54
Scilab code Exa 11.2
1 // Capti on : Pumping r a t e and zer o s i g n a l gai n
2 // Exampl e11 . 2 ( a ) and ( b)
3 // page 397
4 clear;
5 clc;
6 close;
7 I = 100e-03; // bi a s c ur r e nt i n Amps
8 w = 3e-06; // a c t i v e ar e a wi dth i n met er s
9 L = 500e-06; // a mp l i f i e r l e ng ht i n met er s
10 d = 0.3e-06; // a c t i v e ar e a t h i c k n e s s i n met er s
11 q = 1.602e-19; // c har ge i n coul ombs
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 ubi c me t e r
i s Rp = )
14 Tuo = 0.3; // t he c onf i ne me nt f a c t o r
15 a = 2e-20; // gai n c o e f f i c i e n t i n s quar e meter
16 J = I/(w*L); // bi a s c ur r e nt de ns i t y i n Amp/ s qur e
meter
17 nth = 1e24; // t hr e s ho l d de ns i t y per c ubi c meter
18 Tuor = 1e-09; //Time c ons t ant i n s e c onds
19 g0 = Tuo*a*Tuor *((J/(q*d))-(nth/Tuor))
20 disp(g0/100, The zer o s i g n a l gai n per cm i s g0 = )
21 // Re s ul t
22 // The pumping r a t e i n e l e c t r o n s / s . c ubi c me t e r i s Rp
= 1. 387D+33
23 // The zer o s i g n a l gai n per cm i s g0 = 23. 229297
Scilab code Exa 11.3 1 // Capti on : Maximum i nput power and
maxmimum out put power
2 // Example 11. 3
3 // page 404
4 clear;
5 clc;
6 close;
7 Lambda_p = 980e-09; //pump wavel engt h
8 Lambda_s = 1550e-09; // s i g n a l wavel engt h
55
9 Pp_in = 30e-03; // i nput pump power i n wat t s
10 G = 10^(20/10); // gai n
11 Ps_in = (Lambda_p/Lambda_s)*Pp_in/(G-1)
12 disp(Ps_in*1e06 , The maximum i nput power i n uW i s
Ps i n = )
13 Ps_out = Ps_in+( Lambda_p/Lambda_s)*Pp_in;
14 disp(Ps_out *1e03 , The maximum out put power i n mW i s
Ps out = )
15 disp (10* log10(Ps_out *1e03), The maximum out put power
i n dBm i s Ps out = )
16 // Re s ul t
17 //The maximum i nput power i n uW i s Ps i n = 191. 59335
18 //The maximum out put power i n mW i s Ps out =
19. 159335
19 //The maximum out put power i n dBm i s Ps out =
12. 823804
Scilab code Exa 11.6
1 // Capti on : Opt i c al Si gnal tono i s e r a t i o (OSNR)
2 // Exampl e11 . 6
3 // page 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), Opt i c al Si gnal tono i s e r a t i o
i n dB OSNR = )
10 // Re s ul t
11 // Opt i c al Si gnal tono i s e r a t i o i n dB OSNR =
13. 471863
Scilab code Exa 11.7 1 // Capti on : Pump power o f EDFA
2 // Exampl e11 . 7
3 // page 413
4 clear;
56
5 clc;
6 close;
7 Lambda_p = 980e-09; //pump wavel engt h i n met er s
8 Lambda_s = 1540e-09; // s i g n a l wavel engt h i n met er s
9 Ps_out = 10e-03; // out put s i g n a l power
10 Ps_in = 1e-03; // i nput s i g n a l power
11 Pp_in = (Lambda_s/Lambda_p)*(Ps_out -Ps_in)
12 disp(Pp_in*1e03 , Pump power i n mi l l i wat t s Pp i n = )
13 // Re s ul t
14 //Pump power i n mi l l i wat t s Pp i n = 14. 142857
Scilab code Exa 11.8
1 // Capti on : OSNR f o r d i f f e r e n t ASE no i s e l e v e l
2 // Exampl e11 . 8
3 // page 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 mpl i f i e d s i g n a l l e v e l i n dBm
10 OSNR1 = Pout - P_ASE1; // Opt i c al SNR i n dBm
11 OSNR2 = Pout - P_ASE2; // Opt i c al SNR i n dBm
12 disp(OSNR1 , Opt i c al SNR i n dBm OSNR = )
13 disp(OSNR2 , Opt i c al SNR i n dBm OSNR = )
14 // Re s ul t
15 // Opt i c al SNR i n dBm OSNR = 2 8 .
16 // Opt i c al SNR i n dBm OSNR = 2 2 .
Scilab code Exa 11.9 1 // Capti on : Noi s e pe nal t y f a c t o r
2 // Exampl e11 . 9
3 // page 414
4 clear;
5 clc;
6 close;
7 G =[10^(30/10) ,10^(20/10) ]; // Ampl 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)), Noi s e pe nal t y f a c t o r i n
dB Fpath = );
11 disp(G(i), f o r a gai n o f G = );
12 end
13 // Re s ul t
14 // Noi s e pe nal t y f a c t o r i n dB Fpath = 13. 204571
15 // f o r a gai n o f G = 1000.
16 // Noi s e pe nal t y f a c t o r i n dB Fpath = 6. 6477902
17 // f o r a gai n o f G = 100.
Scilab code Exa 11.10 1 // Capti on : Upper bound on i nput
o p t i c a l s i g n a l power
2 // Exampl e11 . 1 0
3 // page 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; // popul at i on i n v e r s i o n between two l e v e l s
9 R =50; // l oad r e s i s t a n c e i nohms
10 Lambda = 1550e-09; // o pe r a t i ng wavel engt h i n met er s
11 T = 300; //room t e mpe r at ur e i n k e l v i n s
12 kB = 1.38054e-23; // bol tzmann s c ons t ant
13 h = 6.6256e-34; // pl ank s c ons t ant
14 C = 3e08; // f r e e s pac e v e l o c i t y i n m/ s
15 V = C/Lambda; // f r e que nc y i n Hz
16 q = 1.602e-19; // c har ge i n col umbs
17 Ps_in = kB*T*h*V/(R*nsp*(etta ^2)*(q^2));
18 disp(Ps_in*1e06 , Upper bound on i nput o p t i c a l s i g n a l
power i n mi cr o wat t s Ps i n= )
19 // Re s ul t
20 // Upper bound on i nput o p t i c a l s i g n a l power i n mi cr o
wat t s Ps i n = 489. 81635
58
Chapter 12
Twelve chapter
Scilab code Exa 12.1 1 // Capti on : Ef f e c t i v e l e ng t h o f f i b e r
2 // Exampl e12 . 1
3 // page 432
4 clear;
5 clc;
6 close;
7 L = 75; // a mp l i f i e r s pc ai ng i n k i l o me t e r
8 alpha = 4.61e-02; // f i b e r a t t e nua t i o n per Km
9 Leff = (1-exp(-alpha*L))/alpha;
10 disp(Leff , Ef f e c t i v e l e ng t h o f f i b e r i n k i l o met er s
Le f f = )
11 // Re s ul t
12 // Ef f e c t i v e l e ng t h o f f i b e r i n k i l o met er s Le f f =
21. 008494
Scilab code Exa 12.2
1 // Capti on : Ca l c ul a t i o n o f St i mul at e d Br i l l o u i n
S c a t t e r i n g ( SBS) t hr e s ho l d power
2 // Exampl e12 . 2
3 // page 433
4 clear;
5 clc;
6 close;
59
7 delta_VB = 20e06; // Br i l l o u i n l i ne wi dt h i n Hz
8 Aeff = 55e-12; // e f f e c t i v e c r os s s e c t i o n a l ar e a o f
t he pr opagat i ng wave i n s quar e meter
9 Leff = 20e03; // e f f e c t i v e l e ng 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; // Br i l l o u s gai n c o e f f i c i e n t m/W
12 delta_Vsource = 40e06; // o p t i c a l s o ur c e l i ne wi dt h i n
Hz
13 Pth = 21*( Aeff*b/(gB*Leff))*(1+( delta_Vsource/
delta_VB));
14 disp(Pth*1e03 , SBS t hr e s ho l d power i n mi l l i wat t s
Pth= )
15 // Re s ul t
16 //SBS t hr e s ho l d power i n mi l l i wat t s Pth= 8. 6625
Scilab code Exa 12.3 1 // Capti on : Fourwave mi xi ng
c a l c u l a t i o n o f power ge ne r at e d due t o t he
2 // i n t e r a c t i o n o f s i g n a l s at d i f f e r e n t f r e q u e n c i e s
3 // Exampl e12 . 3
4 // page 438
5 clear;
6 clc;
7 close;
8 chi1111 = 6e-15; // Thi rd or de r no nl i ne a r
s u c e p t i b i l i t y c ubi c me t e r /W. s
9 D =3; // de g e ne r a t i ng f a c t o r
10 Leff = 22e03;// e f f e c t i v e l e ng t h i n met er s
11 Aeff = 6.4e-11; // e f f e c t i v e c r os s s e c t i o n a l ar e a o f
t he f i b e r i n s quar e meter
12 etta = 0.05; //quantum e f f i c i e n c y
13 Lambda = 1540e-09; // Wavel ength i n s i n g l e mode
f i b e r s i n meter
14 C = 3e08; // f r e e s pac e v e l o c i t y i n m/ s e c
15 alpha =0.0461; // a t t t e nua t i o n per Km
16 L =75; // f i b e r l i n k l e ng t h i n Km
17 P = 1e-03; // each c hanne l i nput power o f 1 mi l l i
wat t s
60
18 n = 1.48; // r e f r a c t i v e i ndex
19 k = ((32*( %pi ^3)*chi1111)/((n^2)*Lambda*C))*(Leff/
Aeff); // no nl i ne a r i n t e r a c t i o n c ons t ant
20 P112 = etta*(D^2)*(k^2)*(P^3)*exp(-alpha*L);
21 disp(P112*1e03 , Power ge ne r at 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 at d i f f e r e n t f r e q . i n mi l l i wat t s P112
= )
22 // Re s ul t
23 // Power ge ne r at 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 at
d i f f e r e n t f r e q . i n mi l l i wat t s P112= // 5. 798D08
Scilab code Exa 12.4 1 // Capti on : Ful l wi dth Hal f Maximum(
FWHM) s o l i t o n pul s e nor mal i z e d ti me
2 // Exampl e12 . 4
3 // page 446
4 clear;
5 clc;
6 close;
7 Ts = [15e-12 ,50e -12]; //FWHM s o l i t o n pul s e wi dth
8 To = Ts /1.7627;
9 disp(To*1e12 , Nor mal i zed ti me f o r FWHM s o l i t o n pul s e
i n pi c o s e c onds To = )
10 // Re s ul t
11 // Nor mal i zed ti me f o r FWHM s o l i t o n pul s e i n pi c o
s e c onds To = [ 8 . 5 0 9 6 7 2 7 2 8 . 3 6 5 5 7 6 ]
Scilab code Exa 12.5 1 // Capti on : Ca l c ul a t i o n o f nor mal i z e d
di s t a nc e par amet er 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 // Exampl e12 . 5
3 // page 446
4 clear;
5 clc;
6 close;
7 Ts = 20e-12; //FWHM s o l i t o n pul s e wi dth i n s e c onds
8 D = 0.5e-06; // d i s p e r s i o n o f t he f i b e r ps /(nm. km)
61
9 Lambda = 1550e-9; // wavel engt h i n meter
10 C = 3e08;// f r e e s pac 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 ng t h i n Km Ldi s p = )
13 // Re s ul t
14 // d i s p e r s i o n l e ng t h i n Km Ldi s p = 202. 10804
Scilab code Exa 12.6 1 // Capti on : Program t o c a l c u l a t e
s o l i t o n peak power
2 // Exampl e12 . 6
3 // page 447
4 clear;
5 clc;
6 close;
7 Lambda = 1550e-9; // wavel engt h i n met er s
8 n2 = 2.6e-20; // power i n s quar e meter /w
9 Aeff = 50e-12; // e f f e c t i v e ar e a i n s quar e meter
10 Ldisp = 202 e03; // d i s p e r s i o n l e ng t h i n met er s
11 Ppeak = (Aeff /(2* %pi*n2))*( Lambda/Ldisp);
12 disp(Ppeak*1e03 , S o l i t o n peak power i n mi l l i wat t s
Ppeak = )
13 // Re s ul t
14 // S o l i t o n peak power i n mi l l i wat t s Ppeak =
2. 3485354
Scilab code Exa 12.7 1 // Capti on :FWHM s o l i t o n pul s e wi dth
and f r a c t i o n o f b i t s l o t oc c upi e d by a s o l i t o n
2 // Exampl e12 . 7
3 // page 448
4 clear;
5 clc;
6 close;
7 // Exampl e12 . 7 . a
8 Ldisp = 100 e03; // d i s p e r i s o n l e ng t h i n meter
9 omega = 4682; // o s c i l l a t i o n pe r i o d
62
10 LI = omega*Ldisp;
11 disp(LI, i n t e r a c t i o n di s t a nc e i n meter LI= )
12 // Exampl e12 . 7 . b
13 D = 0.5e-06; // d i s p e r i s o n o f f i b e r i n ps /nm. km
14 C = 3e08;// f r e e s pac e v e l o c i t y
15 S0 = 8;// nor mal i z e d s e pa r a t i o n o f ne i g hno r i ng
s o l i t o n s
16 B = 10e09; // data r a t e 10 Gb/ s e c
17 Lambda = 1550e-9; // wavel engt h i n met er s
18 Beta2 = (Lambda /(2* %pi));
19 LT = (C*exp(S0))/(16*D*B^2*( Beta2 ^2)*(S0^2));
20 disp(LT*1e03 , Tot al t r a ns mi s s i o n di s t a nc e i n Km LT =
)
21 // Exampl e12 . 7 . c
22 Ts = 0.881/( S0*B);
23 disp(Ts*1e12 , FWHM s o l i t o n pul s e wi dth i n pi c o
s e c onds Ts = )
24 // Exampl e12 . 7 . d
25 Ts_TB = 0.881/ S0;
26 disp(Ts_TB *100, Fr ac t i on o f t he b i t s l o t oc c upi e d by
a s o l i t o n i n pe r c e nt age Ts TB= )
27 // Re s ul t
28 // i n t e r a c t i o n di s t a nc e i n meter LI = 4. 682D+08
29 // Tot al t r a ns mi s s i o n di s t a nc e i n Km LT = 2. 870D+11
30 //FWHM s o l i t o n pul s e wi dth i n pi c o s e c onds Ts =
11. 0125
31 // Fr ac t i on o f t he b i t s l o t oc c upi e d by a s o l i t o n i n
pe r c e nt age Ts TB = 11. 0125
63
Chapter 13
Thirteen chapter
Scilab code Exa 13.1 1 // Capti on : Ca l c ul a t i o n o f power
budget f o r o p t i c a l l i n k
2 // Exampl e13 . 1
3 // page 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 nua t i o n i n dB/Km
9 L_tap = 10; // c o upl i ng l o s s i n dB
10 L_thru = 0.9; // c o upl e r t hr oughput i n dB
11 Li = 0.5; // I n t r i n s i c c o upl e r l o s s i n dB
12 Lc = 1.0; // c oupl e r tof i b e r l o s s i n dB
13 L = 0.5; // l i n k l e ng 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 budget i n dB f o r o p t i c a l l i n k
when N = 5 , 10 and 50 s t a t i o n s r e s p e c t i v e l y = )
18 // Re s ul 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 budget i n dB f o r o p t i c a l l i n k when N = 5 , 10
and 50 s t a t i o n s r e s p e c t i v e l y =
22 // 3 6 . 5 4 . 198.
Scilab code Exa 13.2 1 // Capti on : Ca l c ul a t i o n o f Number
s t a t i o n s f o r gi ve n l o s s
2 // Exampl e13 . 2
3 // page 465
4 clear;
5 clc;
6 close;
7 alpha = 0.4; // a t t e nua t i o n i n dB/Km
8 L_tap = 10; // c o upl i ng l o s s i n dB
9 L_thru = 0.9; // c o upl e r t hr oughput i n dB
10 Li = 0.5; // I n t r i n s i c c o upl e r l o s s i n dB
11 Lc = 1.0; // c oupl e r tof i b e r l o s s i n dB
12 L = 0.5; // l i n k l e ng t h i n Km
13 Pbudget_LED = 38; // power l o s s between s our c e and
r e c e i v e r i n dB f o r LED s o ur c e
14 Pbudget_LASER = 51; // power l o s s between s o ur c e and
r e c e i v e r i n dB f o r LASER s o ur 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 al l owe d f o r
gi ve n l o s s o f 38 dB wi th LED s o ur c e )
18 disp(floor(N_LASER), Number o f s t a t i o n s al l owe d f o r
gi ve n l o s s o f 51 dB wi th LASER s o ur c e )
19 // Re s ul t
20 //Number o f s t a t i o n s al l owe d f o r gi ve n l o s s o f 38 dB
wi th LED s o ur c e
21 // 5 .
22 //Number o f s t a t i o n s al l owe d f o r gi ve n l o s s o f 51 dB
wi th LASER s o ur c e
23 // 8 .
65
Scilab code Exa 13.3 1 // Capti on : Ca l c ul a t i o n o f wor s t
c as e Dynamic Range
2 // Exampl e13 . 3
3 // page 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 nua t i o n i n dB/Km
9 L = 0.5; // l i n k l e ng t h i n Km
10 Lc = 1.0; // c oupl e r tof i b e r l o s s i n dB
11 L_thru = 0.9; // c o upl e r t hr oughput i n dB
12 Li = 0.5; // I n t r i n s i c c o upl e r l o s s i n dB
13 DR = (N-2)*(alpha*L+2*Lc+Li+L_thru);
14 disp(DR, worst c as e dyanmi c r ange i n dB f o r N =5 and
10 r e s p e c t i v e l y DR = )
15 // Re s ul t
16 // worst c as e dyanmi c r ange 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 // Capti on : Ca l c ul a t i o n o f power margi n between
t r a ns mi t t e r and r e c e i v e r f o r St ar a r c h i t e c t u r e s
2 // Exampl e13 . 4
3 // page 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 nua t i o n i n dB/Km
9 L = 0.5 ;// di s t a nc 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 onne c t or 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 margi n i n dB between t he
t r a ns mi t t e r and r e c e i v e r f o r N=10 i s PsPr = )
15 disp(Ps_Pr (2), The power margi n i n dB between t he
t r a ns mi t t e r and r e c e i v e r f o r N=50 i s PsPr = )
16 // Re s ul t
17 //The power margi n i n dB between t he t r a ns mi t t e r and
r e c e i v e r f o r N=10 i s PsPr = 13. 15
18 //The power margi n i n dB between t he t r a ns mi t t e r and
r e c e i v e r f o r N=50 i s PsPr = 20. 6397
Scilab code Exa 13.5 1 // Capti on : De t e r mi nat i on o f maximum
l e ng t h o f mul ti mode f i b e r l i n k
2 // Exampl e13 . 5
3 // page 477
4 clear;
5 clc;
6 close;
7 L_OM2 = 40; // l e ng t h o f OM2 f i b e r
8 L_OM3 = 100; // l e ng t h o f OM3 f i b e r
9 BW_OM2 = 500e06;// bandwi dth o f OM2 f i b e r
10 BW_OM3 = 2000 e06; // bandwi dth 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 ng t h i n meter i s Lmax
= )
13 // Re s ul t
14 //The maximum l i n k l e ng t h i n meter i s Lmax = 260.
67
Chapter 14
Fourteen chapter
Scilab code Fig 14.10
1 // Capti on : Per f or mance Measurement and Moni t or i ng
2 // Fi gur e : 1 4 . 1 0 Pl o t t i ng pul s e shape o f g a us s i a n
d i s t r i b u t i o n
3 // and de t e r mi ni ng 3dB o p t i c a l and e l e c t r i c a l
bandwi dth
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( Re l a t i v e pul s e ampl i t ude P( t ) )
17 title( Fi gur e : 1 4 . 1 0 De f i n i t i o n s o f pul s e shape
par ame t e r s )
18 xgrid (1)
19 // Re s ul 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. 133
69

You might also like