optical fiber communication_a. kalavar

105
Scilab Textbook Companion for Optical Fiber Communication by A. Kalavar 1 Created by Sadashiv Pradhan Bachelor of Engineering Others Pune University College Teacher Abhijit V Chitre Cross-Checked by Mukul Kulkarni and Lavitha Pereira May 13, 2015 1 Funded by a grant from the National Mission on Education through ICT, http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab codes written in it can be downloaded from the ”Textbook Companion Project” section at the website http://scilab.in

Upload: swati

Post on 16-Aug-2015

240 views

Category:

Documents


3 download

DESCRIPTION

gchfggbngcngngcngnnbcgncngcnnncnccvbbv

TRANSCRIPT

Scilab Textbook Companion forOptical Fiber Communicationby A. Kalavar1CreatedbySadashivPradhanBachelorofEngineeringOthersPuneUniversityCollegeTeacherAbhijitVChitreCross-CheckedbyMukulKulkarniandLavithaPereiraMay13,20151Fundedbyagrant fromtheNational MissiononEducationthroughICT,http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilabcodes written in it can be downloaded from the Textbook Companion Projectsection at the website http://scilab.inBookDescriptionTitle: OpticalFiberCommunicationAuthor: A.KalavarPublisher: Tech-MaxPublications,PuneEdition: 1Year: 2012ISBN: 978-81-8492-951-51Scilabnumberingpolicyusedinthisdocumentandtherelationtotheabovebook.ExaExample(Solvedexample)EqnEquation(Particularequationoftheabovebook)APAppendixtoExample(ScilabCodethatisanAppednixtoaparticularExampleoftheabovebook)For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 meansascilabcodewhosetheoryisexplainedinSection2.3ofthebook.2ContentsList of Scilab Codes 41 IntroductiontoOpticalFiberCommunication 82 OpticalFibers 104 SignalDegradationinFibers 375 FiberOpticSplicesConnectorsandCouplers 546 OpticalSources 637 SourcetoFiberPowerLaunchingandPhotodetectors 728 OpticalReceiverOperation 889 LinkDesignsandOpticalAmpliers 9510FiberMeasurements 1033ListofScilabCodesExa1.10.1Computingmaximumcapacityofchannel . . . . . . . 8Exa1.13.1Determinedurationofshortestandwidestopticalpulse 8Exa4.q Findbriefrengence . . . . . . . . . . . . . . . . . . . . 10Exa5.q Determinemodalbriefringence . . . . . . . . . . . . . 10Exa2.3.1 Estimatenumericalapertureandcriticalangle . . . . 11Exa2.3.2 Estimatenumericalaperture . . . . . . . . . . . . . . 11Exa2.4.1 Determinecriticalanglenumericalapertureandaccep-tanceangle . . . . . . . . . . . . . . . . . . . . . . . . 12Exa2.4.2 Determinenumericalaperture . . . . . . . . . . . . . . 13Exa2.4.3 Findnumericalapertureandacceptanceangle . . . . . 13Exa2.4.4 Findacceptanceangle . . . . . . . . . . . . . . . . . . 14Exa2.4.5 Computenumericalapertureandfullconeangle . . . 14Exa2.5.1 Findacceptanceangle . . . . . . . . . . . . . . . . . . 15Exa2.7.1 Find normalized frequency and number of guided modes 16Exa2.7.2 Findwavelength . . . . . . . . . . . . . . . . . . . . . 16Exa2.7.3 FindcoreradiusNAandacceptanceangle. . . . . . . 17Exa2.7.4 Estimatenumberofguidedmodes . . . . . . . . . . . 18Exa2.7.5 Determinenormalizedfrequencyandnumberofguidedmodes . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Exa2.7.6 Estimatediameterofcore . . . . . . . . . . . . . . . . 20Exa2.7.7 CalculateNAandmaximumangleofentrance . . . . 21Exa2.7.8 Calculatenormalizedfrequencyandnumberof guidedmodes . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Exa2.7.9 Estimatediameterofthecore. . . . . . . . . . . . . . 22Exa2.7.10Determinenormalizedfrequencyandnumberofguidedmodes . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Exa2.7.11ComputeNAandnumberofguidedmodes . . . . . . 24Exa2.7.12Computecoreradiusandacceptanceangle . . . . . . . 254Exa2.7.13Estimate range of wavelength for single mode transmis-sion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Exa2.7.14Estimatenumberofguidedmodes . . . . . . . . . . . 27Exa2.7.15Determinecorediameter . . . . . . . . . . . . . . . . . 27Exa2.7.16Findnumberofguidedmodes. . . . . . . . . . . . . . 28Exa2.7.17Estimatenumberofguidedmodes . . . . . . . . . . . 29Exa2.7.18Computecutoparameterandnumberofmodes . . . 30Exa2.10.1Determinecutowavelength . . . . . . . . . . . . . . 31Exa2.10.2Calculatecutonumberandnumberofmodes . . . . 32Exa2.10.3Computenumberofmodes . . . . . . . . . . . . . . . 33Exa2.10.4Calculatedelaydierence . . . . . . . . . . . . . . . . 33Exa2.13.1Findmodalbriefringence . . . . . . . . . . . . . . . . 34Exa2.13.2Findoutputpower . . . . . . . . . . . . . . . . . . . . 35Exa2.16.1CalculateNAandmaximumacceptanceangle. . . . . 35Exa4.3.1 FindsignalattenuationandInputOutputratio . . . . 37Exa4.4.1 Findoutputpower . . . . . . . . . . . . . . . . . . . . 38Exa4.6.1 FindattenuationduetoRayleighscattering . . . . . . 38Exa4.6.2 DetermineattenuationduetoRayleighscattering. . . 39Exa4.8.1 CompareSRSandSBSthresholdpowers . . . . . . . . 40Exa4.9.1 Findcriticalradiusofcurvature . . . . . . . . . . . . . 41Exa4.9.2 Find critical radius for both single mode and multi modeber . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Exa4.14.1Computematerialdispersion . . . . . . . . . . . . . . 43Exa4.15.1Find maximum possible bandwidth pulse dispersion andbandwidthlengthproduct. . . . . . . . . . . . . . . . 43Exa4.15.2Calculateoverallsignalattenuation. . . . . . . . . . . 44Exa4.15.3Calculatebandwidthdispersionandbandwidthlengthproduct . . . . . . . . . . . . . . . . . . . . . . . . . . 45Exa4.15.4Determinemaximumbitrate . . . . . . . . . . . . . . 46Exa4.15.5Calculatemaximumpossiblebandwidthanddispersion 47Exa4.15.6Compute delay dierence rms pulse broadening and max-imumbitrate . . . . . . . . . . . . . . . . . . . . . . . 47Exa4.15.7Estimatermspulsebroadeningandbandwidthlengthproduct . . . . . . . . . . . . . . . . . . . . . . . . . . 49Exa4.15.8EstimateBandwidthdispersionandbandwidthlengthproduct . . . . . . . . . . . . . . . . . . . . . . . . . . 49Exa4.15.9Estimatermspulsebroadening . . . . . . . . . . . . . 505Exa 4.15.10Estimatebandwidthpulsebroadeningandbandwidthlengthproduct . . . . . . . . . . . . . . . . . . . . . . 51Exa4.16.1Estimatermspulsebroadening . . . . . . . . . . . . . 52Exa4.18.1Finddelaydierenceandrmspulsebroadening . . . . 52Exa5.2.1 CalculatelossduetoFresnelreection . . . . . . . . . 54Exa5.2.2 Estimateinsertionlossduetolateralmisalingment . . 55Exa5.2.3 Estimateangularmisalignmentinsertionloss . . . . . 56Exa5.2.4 LossduetoFresnelreection . . . . . . . . . . . . . . 56Exa5.2.5 Estimateinsertionlossduetolateralmisalignment . . 57Exa5.2.6 Totalinsertionloss. . . . . . . . . . . . . . . . . . . . 58Exa5.4.1 Findinsertionloss . . . . . . . . . . . . . . . . . . . . 59Exa5.4.2 Findangularmisalignmentloss . . . . . . . . . . . . . 59Exa5.6.1 Determineexcesslossinsertionlosscrosstalkandsplitratio. . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Exa5.6.2 Findtotallossandaverageinsertionloss. . . . . . . . 61Exa6.3.1 Findoperatingwavelength . . . . . . . . . . . . . . . 63Exa6.3.2 Findoutnumberof longitudinal modesandfrequencyseparation . . . . . . . . . . . . . . . . . . . . . . . . . 63Exa6.14.1Singlelongitudinalmode . . . . . . . . . . . . . . . . 64Exa6.21.1Determinetotal recombinationlifetimeandinternallygeneratedpoweremission . . . . . . . . . . . . . . . . 65Exa6.21.2Determinetotal recombinationlifetimeinternal quan-tumeciencyinternalpowerlevel . . . . . . . . . . . 66Exa6.21.3Determinetotal recombinationlifetimeandinternallygeneratedpower . . . . . . . . . . . . . . . . . . . . . 67Exa6.22.1Determineopticalpower. . . . . . . . . . . . . . . . . 68Exa6.22.2To calculate emitted optical power as percent of internalopticalpower . . . . . . . . . . . . . . . . . . . . . . . 69Exa6.22.3Findoperatinglifetime . . . . . . . . . . . . . . . . . 70Exa7.2.1 FindFresnelreectionandpowerloss . . . . . . . . . 72Exa7.2.2 Computeopticalpowercoupled. . . . . . . . . . . . . 72Exa7.2.3 Calculatecoupledpower. . . . . . . . . . . . . . . . . 73Exa7.2.4 Estimateexternalpowereciency . . . . . . . . . . . 74Exa7.5.1 Estimateupperwavelengthcuto . . . . . . . . . . . . 74Exa7.5.2 Findphotocurrent . . . . . . . . . . . . . . . . . . . . 75Exa7.5.3 Findcutowavelength . . . . . . . . . . . . . . . . . 75Exa7.5.4 Determinequantumeciencyandresponsivity . . . . 76Exa7.5.5 Findwavelengthandincidentpower . . . . . . . . . . 776Exa7.5.6 Determinewavelength . . . . . . . . . . . . . . . . . . 78Exa7.5.7 Calculatewavelengthandincidentopticalpower . . . 78Exa7.5.8 Findquantumeciency . . . . . . . . . . . . . . . . . 79Exa7.8.1 Determinedrifttimeandjunctiontemperature . . . . 80Exa7.8.2 Findmaximumresponsetime. . . . . . . . . . . . . . 80Exa7.9.1 Calculatenoiseequivalentpowerandspecicdirectivity 81Exa7.9.2 Find mean square quantum noise current and mean squaredarkcurrent . . . . . . . . . . . . . . . . . . . . . . . 82Exa7.10.1Findmultiplicationfactor . . . . . . . . . . . . . . . . 83Exa7.10.2Findavalanchegain . . . . . . . . . . . . . . . . . . . 83Exa7.10.3Findmultiplicationfactor . . . . . . . . . . . . . . . . 84Exa7.10.4Find wavelength incident optical power and responsivity 85Exa7.10.5Findmultiplicationfactor . . . . . . . . . . . . . . . . 85Exa7.10.6Calculatequantumeciencyandoutputphotocurrent 86Exa7.q Determinemaximumresponsetime . . . . . . . . . . . 88Exa8.3.1 Findquantumeciencyandminimumincidentpower 88Exa8.3.2 Calculateincidentopticalpower . . . . . . . . . . . . 89Exa8.10.1Findsignaltonoiseratio . . . . . . . . . . . . . . . . 90Exa8.11.1Findphotonenergy . . . . . . . . . . . . . . . . . . . 91Exa8.17.1Calculateshotnoiseandthermalnoise. . . . . . . . . 91Exa8.17.2Findsignaltonoiseratio . . . . . . . . . . . . . . . . 92Exa8.18.1Calculatemaximumloadresistance. . . . . . . . . . . 93Exa9.4.1 Findsaftymargin . . . . . . . . . . . . . . . . . . . . 95Exa9.4.2 Determinesafetymargin . . . . . . . . . . . . . . . . . 96Exa9.4.3 Determinesafetymargin . . . . . . . . . . . . . . . . . 96Exa9.4.4 Determinesafetymarginandlinklength. . . . . . . . 97Exa9.4.5 Determinelinklength . . . . . . . . . . . . . . . . . . 98Exa9.6.1 Findmaximumbitrate . . . . . . . . . . . . . . . . . 99Exa9.6.2 Estimatemaximumbitrate . . . . . . . . . . . . . . . 99Exa9.6.3 Determine whether or not combinationof componentgivesanadequateresponse . . . . . . . . . . . . . . . 100Exa9.16.1Findampliergainandminimumpumppowerrequired 101Exa9.20.1Maximuminputandoutputpower . . . . . . . . . . . 101Exa10.5.1Calculate 3 dB pulse broadening and bandwidth lengthproduct . . . . . . . . . . . . . . . . . . . . . . . . . . 103Exa10.6.1Determineattenuationandestimateaccuracy . . . . . 1047Chapter1IntroductiontoOpticalFiberCommunicationScilabcodeExa1.10.1Computingmaximumcapacityofchannel1 // Example 1 . 1 0 . 1 page 1. 1923 clc;4 clear;56 Bandwidth = 2d6; // Bandwi dth o f c hanne l7 Signal_to_Noise_ratio = 1; // Si g na l t oNoi s e r a t i o o f c hanne l89 Capacity = Bandwidth * log2(1 +Signal_to_Noise_ratio); // computi ng c a pa c i t y10 Capacity=Capacity /10^6;1112 printf(Maximum c a pa c i t y o f c hanne l i s %dMb/ s e c. ,Capacity);8ScilabcodeExa1.13.1Determine duration of shortest and widest opticalpulse1 // Example 1 . 1 3 . 1 page 1. 3023 clc;4 clear;56 Bit_rate = 2d9; // b i t r a t e o f c hanne l7 // Gi ven s e que nc e i s 01011110111089 Shortest_duration = 1 * (1/ Bit_rate); //s h o r t e s t dur at i on i s 1 10 Widest_duration = 4 * (1/ Bit_rate); // wi de s tdur at i on i s 1111 1112 Shortest_duration=Shortest_duration *10^9; //Conver t i ng i nt o nano s e c onds13 Widest_duration=Widest_duration *10^9; //Conver t i ng i nt o nano s e c onds1415 printf(\ nShor t e s t dur at i on i s %. 1f nano s econd . ,Shortest_duration);16 printf(\ nWi dest dur at i on i s %d nano s econd . ,Widest_duration);9Chapter2OpticalFibersScilabcodeExa4.qFindbriefrengence1 // Ques t i on 4 page 2. 7523 clc;4 clear;56 L_BL=8d-2; // beat l e ng t h78 Br =2*3.14/ L_BL; // computi ng modal b r i e f r i n g e n c e9 printf(\nModal b r i e f r i n g e n c e i s %. 1f per meter . ,Br);ScilabcodeExa5.qDeterminemodalbriefringence1 // Ques t i on 5 page 2. 7623 clc;4 clear;5106 L_BL =0.6d-3; // beat l e ng t h7 lamda =1.4d-6; // wavel engt h8 L_BL1 =70;9 Bh=lamda/L_BL; // computi ng hi gh b r i e f r i n g e n c e10 Bl=lamda/L_BL1; // computi ng l ow b r i e f r i n g e n c e1112 printf(\nHi gh b r i e f r i n g e n c e i s %. 2 e . \ nLowb r i e f r i n g e n c e i s %. 1 e . ,Bh ,Bl);ScilabcodeExa2.3.1Estimatenumericalapertureandcriticalangle1 // Example 2 . 3 . 1 page 2. 1023 clc;4 clear;56 delta = 1/100; // Re l a t i v e r e f r a c t i v ed i f f e r e n c e i ndex7 n1 =1.46; // Core r e f r a c t i v e i ndex ( as s umpt i on)89 NA= n1*sqrt (2* delta); // computi ng nume r i c ala pe r t ur e10 theta = 1 - delta;11 Critical_angle = asind(theta); // computi ng c r i t i c a langl e1213 printf(\ nNumeri cal a pe r t ur e i s %. 2f. \n Cr i t i c a langl e i s %. 1f de gr e e. ,NA ,Critical_angle);ScilabcodeExa2.3.2Estimatenumericalaperture1 // Example 2 . 3 . 2 page 2. 101123 clc;4 clear;56 delta = 1/100; // Re l a t i v e r e f r a c t i v ed i f f e r e n c e i ndex7 n1 =1.47; // Core r e f r a c t i v e i ndex89 NA= n1*sqrt (2* delta); // computi ng nume r i c ala pe r t ur e1011 printf(\ nNumeri cal a pe r t ur e i s %. 1f. ,NA)ScilabcodeExa2.4.1Determine critical angle numerical aperture and ac-ceptanceangle1 // Example 2 . 4 . 1 page 2. 1123 clc;4 clear;56 n1 =1.49; // c or e r e f r a c t i v e i ndex7 n2 =1.45; // c l a ddi ng r e f r a c t i v e i ndex89 phi = asind(n2/n1); // computi ng c r i t i c a l angl e10 NA = sqrt(n1^2 - n2^2); // computi ng nume r i c l aa pe r t ur e11 theta= asind(NA); // computi ng ac c e pt anc e angl e1213 printf(\ n Cr i t i c a l angl e i s %. 2f de g r e e s . \ nNumeri cala pe r t ur e i s %. 3f. \ nAccept ance angl e i s %. 2fde gr e e. ,phi ,NA,theta);1415 // answer i n t he book f o r Numer i cal a pe r t ur e i s0 . 3 4 3 , de v i a t i o n o f 0. 0031216 // answer i n t he book f o r Accept ance angl e i s 2 0 . 2 4 ,de v i a t i o n o f 0. 18ScilabcodeExa2.4.2Determinenumericalaperture1 // Example 2 . 4 . 2 page 2. 1223 clc;4 clear;56 delta = 1/100; // Re l a t i v e r e f r a c t i v ed i f f e r e n c e i ndex7 n1 =1.47; // Core r e f r a c t i v e i ndex89 NA= n1*sqrt (2* delta); // computi ng nume r i c ala pe r t ur e10 printf(\ nNumeri cal a pe r t ur e i s %. 1f. ,NA)ScilabcodeExa2.4.3Findnumericalapertureandacceptanceangle1 // Example 2 . 4 . 3 page 2. 1223 clc;4 clear;56 delta = 1.2/100; // Re l a t i v e r e f r a c t i v ed i f f e r e n c e i ndex7 n1 =1.45; // Core r e f r a c t i v e i ndex89 NA= n1*sqrt (2* delta); // computi ng nume r i c ala pe r t ur e10 Acceptance_angle = asind(NA); // computi ngac c e pt anc e angl e1311 si = %pi * NA^2; // computi ng s o l i d ac c e pt anc eangl e1213 printf(\ nNumeri cal a pe r t ur e i s %. 3f. \ nAccept anceangl e i s %. 2f de gr e e . \ nSo l i d ac c e pt anc e angl e i s%. 3f r a di a ns. ,NA ,Acceptance_angle ,si);1415 // answer i n t he book f o r Numer i cal a pe r t ur e i s0 . 2 2 4 , de v i a t i o n o f 0. 00116 // answer i n t he book f o r s o l i d ac c e pt anc e angl e i s0 . 1 5 7 , de v i a t i o n o f 0. 002ScilabcodeExa2.4.4Findacceptanceangle1 // Example 2 . 4 . 4 page 2. 1323 clc;4 clear;56 NA = 0.45; // Numer i cal Aper t ur e78 Acceptance_angle = asind(NA); // computi ngac c e pt anc e angl e.9 printf(\ nAccept ance angl e i s %. 1f de gr e e. ,Acceptance_angle);ScilabcodeExa2.4.5Computenumericalapertureandfullconeangle1 // Example 2 . 4 . 5 page 2. 1323 clc;4 clear;5146 diameter = 1; // Di ameter i n c e nt i me t e r7 Focal_length = 10; // Focal l e ng t h i n c e nt i me t e r89 radius=diameter /2; // computi ng r a di us10 Acceptance_angle = atand(radius/Focal_length); //computi ng ac c e pt anc e angl e11 Conical_full_angle = 2* Acceptance_angle; //computi ng c o n i c a l angl e12 Solid_acceptance_angle = %pi*Acceptance_angle ^2;// computi ng s o l i d ac c e pt anc e angl e13 NA = sqrt(Solid_acceptance_angle/%pi); //computi ng Numer i cal a pe r t ur e1415 printf(\ nNumeri cal a pe r t ur e i s %. 2f. \ nConi c al f u l langl e i s %. 2f de gr e e. ,NA ,Conical_full_angle);ScilabcodeExa2.5.1Findacceptanceangle1 // Example 2 . 5 . 1 page 2. 1723 clc;4 clear;56 NA = 0.45 // Numer i cal a pe r t ur e7 betaB = 45 // Skew r ay change d i r e c t i o n by 90de gr e e at each r e f l e c t i o n89 Meridional_theta = asind(NA); // computi ngac c e pt ac ne angl e f o r me r i do i na l r ay10 Skew_theta = asind(NA/cosd(betaB)); // computi ngac c e pt ac ne angl e f o r skew r ay1112 printf(\ nAccept acne angl e f o r Me r i doi nal r ay i s %. 2f de gr e e . \ nAccept ance angl e f o r Skew r ay %. 1fde gr e e. ,Meridional_theta ,Skew_theta);15ScilabcodeExa2.7.1Findnormalizedfrequencyandnumberof guidedmodes1 // Example 2 . 7 . 1 page 2. 2323 clc;4 clear;56 core_diameter =78d-6; // c or e di ame t e r7 delta =1.4/100; // r e l a t i v e i ndex d i f f e r e n c e8 lamda =0.8d-6; // o pe r a t i ng wavel engt h9 n1 =1.47; // c or e r e f r a c t i v e i ndex1011 a=core_diameter /2; // computi ng c or e r a di us12 v= 2*3.14*a*n1*sqrt (2* delta)/lamda; // computi ngnor mal i z e d f r e que nc y13 M=(v)^2/2; // computi ng gui ded modes1415 printf(\ nNor mal i zed Frequency i s %. 3f. \ nTot alnumber o f gui ded modes ar e %. 1f ,v,M);16 printf(\nNOTE Ca l c ul a t i o n e r r or , answer i n t hebook f o r nor mal i z e d f r e que nc y i s gi ve n as 75. 156whi ch s houl d be 7 5 . 3 0 6 . );1718 // answer i n t he book f o r nor mal i z e d f r e que nc y i sgi ve n as 7 5 . 1 5 6 (i n c o r r e c t ) and f o r Gui ded modesi s 5 6 4 8 . 5 (i n c o r r e c t )ScilabcodeExa2.7.2Findwavelength1 // Example 2 . 7 . 2 page 2. 241623 clc;4 clear;56 n1=1.47 // r e f r a c t i v e i ndex o f c or e7 a=4.3d-6; // r a di us o f c or e8 delta =0.2/100 // r e l a t i v e i ndex d i f f e r e n c e910 lamda= 2*3.14*a*n1*sqrt (2* delta)/2.405; //computi ng wavel engt h11 lamda=lamda *10^9;12 printf( Wavel ength o f f i b e r i s %d nm. ,lamda);13 printf(\n\nNote :Ca l c ul a t i o n e r r or , answer gi ve n i nt he book ( 1230nm) i s i n c o r r e c t. );1415 // answer i n t he book i s gi ve n as 1230nmwhi ch i si n c o r r e c t.ScilabcodeExa2.7.3FindcoreradiusNAandacceptanceangle1 // Example 2 . 7 . 3 page 2. 2423 clc;4 clear;56 n1 =1.482; // r e f r a c t i v e i ndex o f c or e7 n2 =1.474; // r e f r a c t i v e i ndex o f c l a ddi ng8 lamda =820d-9; // Wavel ength910 NA=sqrt(n1^2 - n2^2); // computi ng Numer i cala pe r t ur e11 theta= asind(NA); // computi ng ac c e pt anc eangl e12 solid_angle=%pi*(NA)^2; // computi ng s o l i d angl e13 a=2.405* lamda /(2*3.14* NA); // computi ng c or e17r a di us14 a=a*10^6;1516 printf(\ nNumeri cal a pe r t ur e i s %. 3f. \ nAccept anceangl e i s %. 1f de g r e e s . \ nSo l i d angl e i s %. 3fr a di a ns . \ nCore r a di us i s %. 2f mi cr omet er . ,NA ,theta ,solid_angle ,a);1718 // answer i n t he book f o r Numer i cal a pe r t ur e i s0 . 1 5 5 , de v i a t i o n o f 0 . 0 0 1 .19 // answer i n t he book f o r ac c e pt anc e angl e i s 8 . 9,de v i a t i o n o f 0 . 1 .20 // answer i n t he book f o r s o l i d ac c e pt anc e angl e i s0 . 0 7 5 , de v i a t i o n o f 0 . 0 0 1 .21 // answer i n t he book f o r c or e r a di us i s 2. 02mi crometer, de v i a t i o n o f 0. 02 mi cr omet er .ScilabcodeExa2.7.4Estimatenumberofguidedmodes1 // Example 2 . 7 . 4 page 2. 2523 clc;4 clear;56 NA=0.16 // Numer i cal a pe r t ur e7 n1=1.45 // c or e r e f r a c t i v e i ndex8 d=60d-6 // c or e di ame t e r9 lamda =0.82d-6 // wavel engt h1011 a=d/2; // c or e r a di us12 v=2*3.14*a*NA/lamda; // computi ng nor mal i z e df r e que nc y13 v=round(v);14 M=v^2/2; // computi ng gui ded modes15 M=floor(M);181617 printf( i f nor mal i z e d f r e que nc y i s t aken as %d, then%d gui ded modes . ,v,M);ScilabcodeExa2.7.5Determine normalized frequency and number of guidedmodes1 // Example 2 . 7 . 5 page 2. 2623 clc;4 clear;56 n1 =1.48; // c or e r e f r a c t i v e i ndex7 n2 =1.46; // c l a ddi ng r e f r a c t i v e i ndex8 a=25d-6; // c or e r a di us9 lamda0 =850d-9;10 lamda1 =1320d-9;11 lamda2 =1550d-9;1213 NA=sqrt(n1^2-n2^2); // computi ng nume r i c ala pe r t ur e14 v0=2*%pi*a*NA/lamda0; // computi ng nor mal i z e df r e que nc y15 M0=v0 ^2/2; // computi ng gui ded modes16 M0=floor(M0);17 v1=2*%pi*a*NA/lamda1;18 M1=v1 ^2/2;19 M1=floor(M1);20 v2=2*%pi*a*NA/lamda2;21 M2=v2 ^2/2;22 M2=floor(M2);23 lamda0=lamda0 *10^9;24 lamda1=lamda1 *10^9;25 lamda2=lamda2 *10^9;26 printf(\ nf o r %d nm, nor mal i z e d f r e que nc y =%. 2 f ,19Gui ded modes =%d. ,lamda0 ,v0,M0);27 printf(\ nf o r %d nm, nor mal i z e d f r e que nc y =%. 2 f ,Gui ded modes =%d. ,lamda1 ,v1,M1);28 printf(\ nf o r %d nm, nor mal i z e d f r e que nc y =%. 2 f ,Gui ded modes =%d. ,lamda2 ,v2,M2);2930 // ans wer s i n t he book (s l i g t d e v i a t i o n s i n each )31 // f o r 850 nm, nor mal i z e d f r e que nc y = 45 , Gui dedmodes =101232 // f o r 1320 nm, nor mal i z e d f r e que nc y = 2 8 . 9 1 , Gui dedmodes =41933 // f o r 1550 nm, nor mal i z e d f r e que nc y = 2 4 . 6 7 , Gui dedmodes =304ScilabcodeExa2.7.6Estimatediameterofcore1 // Example 2 . 7 . 6 page 2. 2723 clc;4 clear;56 delta =1/100; // r e l a t i v e r e f r a c t i v e i ndex7 n1=1.3; // c or e r e f r a c t i v e i ndex8 lamda =1100d-9; // wavel engt h910 a=(2.4* lamda)/(2*3.14* n1*sqrt (2* delta)); //computi ng r a di us o f c or e11 d=2*a; // computi ng di ame t e r o f c or e12 a=a*10^6;13 d=d*10^6;14 printf(\nCore r a di us i s %. 1f mi cr omet er \nCoredi ame t e r i s %. 1f mi cr omet er ,a,d);15 printf(\nNOTE I n t he book t hey have as keddi ame t e r o f c or e. However , t hey have c a l c u l a t e donl y r a di us. );20ScilabcodeExa2.7.7CalculateNAandmaximumangleofentrance1 // Example 2 . 7 . 7 page 2. 2723 clc;4 clear;56 n1 =1.48; // r e f r a c t i v e i ndex o f c or e7 n2 =1.46; // r e f r a c t i v e i ndex o f c l a ddi ng89 NA=sqrt(n1^2-n2^2); // computi ng Numer i cala pe r t ur e10 theta=asind(NA); // computi ng ac c e pt anc e angl e1112 printf(\ nNumeri cal a pe r t ur e i s %. 3f. \ nAccept anceangl e i s %. 2f de g r e e s. ,NA ,theta);1314 // answer i n t he book f o r Numer i cal a pe r t ur e i s0 . 2 4 4 , de v i a t i o n o f 0 . 0 0 2 .15 // answer i n t he book f o r Accept ance angl e i s 1 4 . 1 2 ,de v i a t i o n o f 0 . 0 9 .ScilabcodeExa2.7.8Calculate normalized frequency and number of guidedmodes1 // Example 2 . 7 . 8 page 2. 2823 clc;4 clear;56 core_diameter =80d-6; // c or e di ame t e r217 delta =1.5/100; // r e l a t i v e i ndex d i f f e r e n c e8 lamda =0.85d-6; // o pe r a t i ng wavel engt h9 n1 =1.48; // c or e r e f r a c t i v e i ndex1011 a=core_diameter /2; // computi ng c or e r a di us12 v= 2*%pi*a*n1*sqrt (2* delta)/lamda; // computi ngnor mal i z e d f r e que nc y13 M=(v)^2/2; // computi ng gui ded modes14 printf(\ nNor mal i zed Frequency i s %. 1f. \ nTot alnumber o f gui ded modes ar e %. d . ,v,M);1516 // answer i n t he book f o r Gui ded modes i s 2873 ,de v i a t i o n o f 1 .ScilabcodeExa2.7.9Estimatediameterofthecore1 // Example 2 . 7 . 9 page 2. 2823 clc;4 clear;56 delta =1/100; // r e l a t i v e r e f r a c t i v e i ndex7 n1=1.5; // r e f r a c t i v e i ndex o f c or e8 M=1100; // Gui ded modes9 lamda =1.3d-6; // wavel engt h1011 v=sqrt (2*M); // computi ng nor mal i z e d f r e que c y12 a=(v*lamda)/(2*3.14* n1*sqrt (2* delta)); //computi ng r a di us o f c or e13 d=a*2;14 a=a*10^6;15 d=d*10^6;1617 printf(\ nNor mal i ze f r e que nc y i s %. 1f. \ nCore r a di usi s %. 2f mi cr omet er . \ nCore di ame t e r i s %. 1f22mi cr omet er . ,v,a,d);18 printf(\ nCa l c ul a t i o n e r r o r i n t he book whi l ec a l c u l a t i n g r a di us and di ame t e r . );1920 // c a l c u l a t i o n e r r o r i n t he book .21 // ans wer s i n t he book22 // Core r a di us i s 46. 18 mi cr omet er. (i n c o r r e c t )23 // Core di ame t e r i s 92. 3 mi cr omet er. (i n c o r r e c t )ScilabcodeExa2.7.10Determinenormalizedfrequencyandnumber ofguidedmodes1 // Example 2 . 7 . 1 0 page 2. 2923 clc;4 clear;56 n1 =1.48; // r e f r a c t i v e i ndex o f c or e7 n2 =1.46; // r e f r a c t i v e i ndex o f c l a ddi ng8 lamda1 =1320d-9; // Wavel ength9 lamda2 =1550d-9; // Wavel ength10 a=25d-6; // r a di us o f c or e1112 NA=sqrt(n1^2 - n2^2); // computi ng Numer i cala pe r t ur e13 v1=2*%pi*a*NA/lamda1; // computi ng nor mal i z e df r e que nc y14 v1=round(v1);15 M1=v1 ^2/2; // computi ng number o f gui ded modes16 M1=round(M1);17 v2=2*%pi*a*NA/lamda2;18 M2=v2 ^2/2;19 M2=round(M2);20 lamda1=lamda1 *10^9;21 lamda2=lamda2 *10^9;232223 printf(\ nf o r %d nm, nor mal i z e d f r e que nc y =%d,Gui ded modes =%d. ,lamda1 ,v1,M1);24 printf(\ nf o r %d nm, nor mal i z e d f r e que nc y =%. 2 f ,Gui ded modes =%d. ,lamda2 ,v2,M2);2526 // answer i n t he book,27 // f o r 1550 nm, nor mal i z e d f r e que nc y = 2 4 . 6 9 (de v i a t i o n o f 0 . 0 8 ), Gui ded modes = 305( de v i a t i o no f 3)ScilabcodeExa2.7.11ComputeNAandnumberofguidedmodes1 // Example 2 . 7 . 1 1 page 2. 2923 clc;4 clear all;56 n1=1.5; // r e f r a c t i v e i ndex o f c or e7 n2 =1.38; // r e f r a c t i v e i ndex o f c l a ddi ng8 lamda =1300d-9; // Wavel ength9 a=25d-6; // c or e r a di us1011 NA=sqrt(n1^2 - n2^2); // computi ng Numer i cala pe r t ur e12 theta= asind(NA); // computi ng ac c e pt anc eangl e13 solid_angle=%pi*(NA)^2; // computi ng s o l i d angl e14 v= 2*%pi*a*NA/lamda; // computi ng nor mal i z e df r e que nc y15 M=(v)^2/2; // computi ng gui ded modes16 M=round(M);17 printf(\ nNumeri cal a pe r t ur e i s %. 2f. \ nNor mal i zedf r e que nc y i s %. 2f. \ nAccept ance angl e i s %. 2fde g r e e s . \ nSo l i d angl e i s %. 3f r a di a ns . \ nTot al24number o f modes ar e %d. ,NA ,v,theta ,solid_angle ,M);18 printf(\n\n NOTE Ca l c ul a t i o n e r r o r i n t he book . \ n( 2. 25 1. 9) 0 . 5 =0 . 5 9 ; t hey have t aken 0. 35 );192021 // Ca l c ul a t i o n e r r o r i n t he book . ( 2 . 2 5 1 . 9 ) 0 . 5 =0 . 5 9 ;t hey have t aken 0. 3522 // ans wer s i n t he book,23 // Numer i cal a pe r t ur e i s 0 . 3 5 . (i n c o r r e c t )24 // Nor mal i zed f r e que nc y i s 4 2 . 2 6 . (i n c o r r e c t )25 // Accept ance angl e i s 20. 48 de g r e e s. (i n c o r r e c t )26 // So l i d angl e i s 0. 384 r a di a ns. (i n c o r r e c t )ScilabcodeExa2.7.12Computecoreradiusandacceptanceangle1 // Example 2 . 7 . 1 2 page 2. 3023 clc;4 clear;56 n1 =1.48; // r e f r a c t i v e i ndex o f c or e7 n2 =1.478; // r e f r a c t i v e i ndex o f c l a ddi ng8 lamda =820d-9; // Wavel ength910 NA=sqrt(n1^2 - n2^2); // computi ng Numer i cala pe r t ur e11 theta= asind(NA); // computi ng ac c e pt anc eangl e12 solid_angle=%pi*(NA)^2; // computi ng s o l i d angl e1314 printf(\ nNumeri cal a pe r t ur e i s %. 3f. \ nAccept anceangl e i s %. 2f de g r e e s . \ nSo l i d angl e i s %. 4fr a di a ns. ,NA ,theta ,solid_angle);25ScilabcodeExa2.7.13Estimate range of wavelength for single mode trans-mission12 // Example 2 . 7 . 1 3 page 2. 3134 clc;5 clear;67 n1 =1.447; // r e f r a c t i v e i ndex o f c or e8 n2 =1.442; // r e f r a c t i v e i ndex o f c l a ddi ng9 lamda =1.3d-6; // Wavel ength10 a=3.6d-6; // c or e r a di us1112 NA=sqrt(n1^2 - n2^2); // computi ng Numer i cala pe r t ur e13 v= 2*%pi*a*NA/lamda; // computi ng nor mal i z e df r e que nc y1415 printf(As nor mal i z e d f r e que nc y i s %. 2f whi ch i sl e s s than 2 . 4 0 5 , t h i s f i b e r wi l l per mi t s i n g l emode t r a ns mi s s i o n ,v);1617 lamda_cut_off=v*lamda /2.40518 lamda_cut_off=lamda_cut_off *10^919 printf(\n\ nSi ng l e mode o pe r a t i o n wi l l oc c ur abovet h i s cut o f f wavel engt h o f %. 2f nm,lamda_cut_off);20 printf(\n\n NOTE Ca l c ul a t i o n e r r o r i n t he book . \ n( 1 . 4 4 7 2 1 . 4 4 2 2 ) 0 . 5 =0 . 1 2 1 ; t hey have t aken0. 141\ nHence c a l c u l a t i o n s a f t e r t hat ar ei n c o r r e c t i n t he book);2122 // Ca l c ul a t i o n e r r o r i n t he book . ( 1 . 4 4 7 2 1 . 4 4 2 2 )26 0 . 5 =0 . 1 2 1 ; t hey have t aken 0 . 1 4 1 . Hencec a l c u l a t i o n s a f t e r t hat ar e i n c o r r e c t i n t he book.23 //They have t aken r a di us as 2 . 6 d6, wher eas i nque s t i o n i t i s gi ve n 3 . 6 d6.24 // ans wer s i n t he book25 // Nor mal i zed f r e que nc y i s 1 . 7 7 . (i n c o r r e c t )26 // cut o f f wavel engt h 956nm. (i n c o r r e c t )ScilabcodeExa2.7.14Estimatenumberofguidedmodes1 // Example 2 . 7 . 1 4 page 2. 3423 clc;4 clear;56 NA=0.2; // Numer i cl a a pe r t ur e7 d=50d-6; // Di ameter o f c or e8 lamda=1d-6; // Wavel ength910 a=d/2; // computi ng r a di us11 v=2*3.14*a*NA/lamda; // computi ng nor mal i z e df r e que nc y12 Mg=v^2/4; // computi ng mode vol ume f o rp a r a b o l l i c p r o f i l e13 Mg=round(Mg);14 printf(\ nNor mal i zed Frequency i s %. 1f. \ nTot alnumber o f gui ded modes ar e %. d . ,v,Mg);1516 // answer i n t he book f o r gui ded modes i s 247 ,de v i a t i o n o f 1 .ScilabcodeExa2.7.15Determinecorediameter271 // Example 2 . 7 . 1 5 page 2. 3423 clc;4 clear;56 delta =0.015; // r e l a t i v e r e f r a c t i v e i ndex7 n1 =1.48; // c or e r e f r a c t i v e i ndex8 lamda =0.85d-6; // wavel engt h910 a=(2.4* lamda)/(2*3.14* n1*sqrt (2* delta)); //computi ng r a di us o f c or e11 d=2*a; // computi ng di ame t e r o f c or e12 a=a*10^7;13 a=round(a);14 a=a/1015 d=d*10^6;16 printf(\nCore r a di us i s %. 1f mi cr omet er . \ nCoredi ame t e r i s %. 1f mi cr omet er . ,a,2*a);1718 printf(\n\nWhen de l t a i s r educed by 10 per cent );19 delta =0.0015;20 a=(2.4* lamda)/(2*3.14* n1*sqrt (2* delta)); //computi ng r a di us o f c or e21 d=2*a; // computi ng di ame t e r o f c or e22 a=a*10^7;23 a=round(a);24 a=a/1025 d=d*10^6;26 printf(\nCore r a di us i s %. 1f mi cr omet er . \ nCoredi ame t e r i s %. 1f mi cr omet er . ,a,2*a);ScilabcodeExa2.7.16Findnumberofguidedmodes1 // Example 2 . 7 . 1 6 page 2. 352283 clc;4 clear;56 NA =0.25; // Numer i cl a a pe r t ur e7 d=45d-6; // Di ameter o f c or e8 lamda =1.5d-6; // Wavel ength910 a=d/2; // computi ng r a di us11 v=2*3.14*a*NA/lamda; // computi ng nor mal i z e df r e que nc y12 Mg=v^2/4; // computi ng mode vol ume f o rp a r a b o l l i c p r o f i l e13 Mg=round(Mg);14 printf(\ nNor mal i zed Frequency i s %. 1f. \ nTot alnumber o f gui ded modes ar e %. d . ,v,Mg);1516 // answer i n t he book f o r nor mal i z e d f r e que nc y i s2 3 . 5 5 , de v i a t i o n 0. 05ScilabcodeExa2.7.17Estimatenumberofguidedmodes1 // Example 2 . 7 . 1 7 page 2. 3523 clc;4 clear;56 NA =0.25; // Numer i cl a a pe r t ur e7 d=45d-6; // Di ameter o f c or e8 lamda =1.2d-6; // Wavel ength910 a=d/2; // computi ng r a di us11 v=2*3.14*a*NA/lamda; // computi ng nor mal i z e df r e que nc y12 Mg=v^2/4; // computi ng mode vol ume f o rp a r a b o l l i c p r o f i l e2913 Mg=round(Mg);14 printf(\ nNor mal i zed Frequency i s %. 1f. \ nTot alnumber o f gui ded modes ar e %. d . ,v,Mg);15 printf(\n\nNOTE I n t he que s t i o n NA i s gi ve n 0 . 2 2 .However whi l e s o l v i n g i t i s t aken as 0. 25 );1617 // answer i n t he book f o r number o f gui ded modes i sgi ve n as 216 , de v i a t i o n o f 1 .1819 printf(\nHence s o l v i n g f o r NA= 0. 22 al s o, );20 printf(\n\nWhen NA=0. 22 );2122 NA =0.22; // Numer i cl a a pe r t ur e23 d=45d-6; // Di ameter o f c or e24 lamda =1.2d-6; // Wavel ength2526 a=d/2; // computi ng r a di us27 v=2*3.14*a*NA/lamda; // computi ng nor mal i z e df r e que nc y28 Mg=v^2/4; // computi ng mode vol ume f o rp a r a b o l l i c p r o f i l e29 Mg=round(Mg);30 printf(\ nNor mal i zed Frequency i s %. 1f. \ nTot alnumber o f gui ded modes ar e %. d . ,v,Mg);ScilabcodeExa2.7.18Computecutoparameterandnumberofmodes1 // Example 2 . 7 . 1 8 page 2. 3623 clc;4 clear;56 n1 =1.54; // r e f r a c t i v e i ndex o f c or e7 n2=1.5; // r e f r a c t i v e i ndex o f c l a ddi ng8 a=25d-6; // Radi us o f c or e309 lamda =1.3d-6; // Wavel ength1011 NA=sqrt(n1^2-n2^2);12 v=2*3.14*a*NA/lamda; // computi ng nor mal i z e df r e que nc y13 v=round(v);14 Mg=v^2/4; // computi ng mode vol ume f o rp a r a b o l l i c p r o f i l e15 Mg=round(Mg);16 lamda_cut_off=v*lamda /2.405; // computi ng cut o f fwavel engt h17 lamda_cut_off=lamda_cut_off *10^6;18 printf(\ nNor mal i zed Frequency i s %. d . \ nTot al numbero f gui ded modes ar e %. d . \ nCut o f f wavel engt h i s%. 1f mi cr omet er . ,v,Mg,lamda_cut_off);ScilabcodeExa2.10.1Determinecutowavelength1 // Example 2 . 1 0 . 1 page 2. 3923 clc;4 clear;56 a=4.5d-6; // c or e di ame t e r7 delta =0.25/100; // r e l a t i v e i ndex d i f f e r e n c e8 lamda =0.85d-6; // o pe r a t i ng wavel engt h9 n1 =1.46; // c or e r e f r a c t i v e i ndex1011 v= 2*%pi*a*n1*sqrt (2* delta)/lamda; // computi ngnor mal i z e d f r e que nc y12 lamda_cut_off=v*lamda /2.405; // computi ng cuto f f wavel engt h13 lamda_cut_off=lamda_cut_off *10^9;14 printf(\nCut o f f wavel engt h i s %. d nanometer . ,lamda_cut_off);311516 printf(\n\nWhen de l t a i s 1. 25 per cent );17 delta =1.25/100;18 v= 2*%pi*a*n1*sqrt (2* delta)/lamda; // computi ngnor mal i z e d f r e que nc y19 lamda_cut_off=v*lamda /2.405; // computi ng cuto f f wavel engt h20 lamda_cut_off=lamda_cut_off *10^7;21 lamda_cut_off=round(lamda_cut_off);22 lamda_cut_off=lamda_cut_off *100;23 printf(\nCut o f f wavel engt h i s %. d nanometer . ,lamda_cut_off);2425 // answer i n t he book f o r cut o f f wavel engt h i n t hebook i s gi ve n as 1214nm, de v i a t i o n o f 1nm.ScilabcodeExa2.10.2Calculatecutonumberandnumberofmodes1 // Example 2 . 1 0 . 2 page 2. 4023 clc;4 clear;56 a=50d-6; // c or e r a di us7 lamda =1500d-9; // o pe r a t i ng wavel engt h8 n1 =2.53; // c or e r e f r a c t i v e i ndex9 n2=1.5; // c l a ddi ng r e f r a c t i v e i ndex1011 delta=(n1 -n2)/n1; // computi ng de l t a12 v= 2*3.14*a*n1*sqrt (2* delta)/lamda; // computi ngnor mal i z e d f r e que nc y13 M=(v)^2/2; // computi ng gui ded modes14 printf(\ nNor mal i zed Frequency i s %. 1f \ nTot al numbero f gui ded modes ar e %. d,v,M);15 printf(\nNOTE Ca l c ul a t i o n e r r o r i n book . \n32Nor mal i zed f r e que nc y i s 477 , i t i s c a l c u l a t e d as47. 66 );1617 // Ca l c ul a t i o n e r r o r i n book . Nor mal i zed f r e que nc y i s477 , i t i s c a l c u l a t e d as 4 7 . 6 6 , hence ans wer sa f t e r t hat ar e e r r o ne ous.18 // ans wer s i n t he book19 // nor mal i z e d f r e que nc y = 4 8 . (i n c o r r e c t )20 // gui ded modes = 1 1 5 2 . (i n c o r r e c t )ScilabcodeExa2.10.3Computenumberofmodes1 // Example 2 . 1 0 . 3 page 2. 4123 clc;4 clear;56 core_diameter =8d-6; // c or e di ame t e r7 delta =0.92/100; // r e l a t i v e i ndex d i f f e r e n c e8 lamda =1550d-9; // o pe r a t i ng wavel engt h9 n1 =1.45; // c or e r e f r a c t i v e i ndex1011 a=core_diameter /2; // computi ng c or e r a di us12 v= 2*%pi*a*n1*sqrt (2* delta)/lamda; // computi ngnor mal i z e d f r e que nc y13 M=(v)^2/2; // computi ng gui ded modes14 printf(\ nNor mal i zed Frequency i s %. 1f. \ nTot alnumber o f gui ded modes ar e %. d . ,v,M);ScilabcodeExa2.10.4Calculatedelaydierence1 // Example 2 . 1 0 . 4 page 2. 412333 clc;4 clear;56 delta =1/100; // r e l a t i v e i ndex d i f f e r e n c e7 n1=1.5; // c or e r e f r a c t i v e i ndex8 c=3d8;9 L=6;1011 n2=sqrt(n1^2-2* delta*n1^2); // computi ngr e f r a c t i v e i ndex o f c l a ddi ng12 delta_T=L*n1^2* delta /(c*n2); // computi ng pul s ebr oadni ng13 delta_T=delta_T *10^11;14 delta_T=round(delta_T);15 printf(\ nDel ay d i f f e r e n c e between s l o we s t andf a s t e s t mode i s %d ns /km. ,delta_T);16 printf(\ nThi s means t hat a pul s e br oadnes by %d nsa f t e r t r a v e l ti me a di s t a nc e o f %d km. ,delta_T ,L);ScilabcodeExa2.13.1Findmodalbriefringence1 // Example 2 . 1 3 . 1 page 2. 5423 clc;4 clear;56 L_BL=8d-2; // beat l e ng t h78 Br =2*3.14/ L_BL; // computi ng modal b r i e f r i n g e n c e9 printf(\nModal b r i e f r i n g e n c e i s %. 1f per meter . ,Br);34ScilabcodeExa2.13.2Findoutputpower1 // Example 2 . 1 3 . 2 page 2. 5723 clc;4 clear;56 Pin =500d-6; // i nput power7 L=200; // l e ng t h o f f i b e r8 loss =2; // l o s s a s s o c i a t e d wi th f i b e r910 Pin_dbm =10 * log10 (Pin /(10^ -3)); // computi ngi nput power i n dBm11 Pin_dbm=round(Pin_dbm);12 Pout_dbm=Pin_dbm -L*loss; // computi ng out putpower l e v e l13 Pout= 10^( Pout_dbm /10);14 printf(Output power i s %. 2 e mW. ,Pout);ScilabcodeExa2.16.1CalculateNAandmaximumacceptanceangle1 // Example 2 . 1 6 . 1 page 2. 6723 clc;4 clear;56 n1 =1.48; // c or e r e f r a c t i v e i ndex7 n2 =1.46; // c l a ddi ng r e f r a c t i v e i ndex89 phi = asind(n2/n1); // computi ng c r i t i c a l angl e10 NA = sqrt(n1^2 - n2^2); // computi ng nume r i c l aa pe r t ur e11 theta= asind(NA); // computi ng ac c e pt anc e angl e12 printf(\ n Cr i t i c a l angl e i s %. 2f de g r e e s . \ nNumeri cala pe r t ur e i s %. 3f. \ nAccept ance angl e i s %. 2f35de gr e e. ,phi ,NA,theta);1314 // ans wer s i n t he book15 // Cr i t i c a l angl e i s 80. 56 de gr e e s , de v i a t i o n o f0 . 0 1 .16 // Numer i cal a pe r t ur e i s 0 . 2 4 4 , de v i a t i o n o f 0 . 0 0 2 .17 // Accept ance angl e i s 14. 17 degr ee, de v i a t i o n o f0 . 1 4 .36Chapter4SignalDegradationinFibersScilabcodeExa4.3.1FindsignalattenuationandInputOutputratio123 // Example 4 . 3 . 1 page 4 . 445 clc;6 clear;78 L=10; // f i b e r l e ng t h i n km9 Pin =150d-6; // i nput power10 Pout=5d-6; // out put power11 len =20; // l e ng t h o f o p t i c a l l i n k12 interval =1; // s p l i c e s a f t e r i n t e r v a l o f 1 km13 l=1.2; // l o s s due t o 1 s p l i c e1415 attenuation =10* log10(Pin/Pout);16 alpha=attenuation/L;17 attenuation_loss=alpha *20;18 splices_loss =(len -interval)*l;19 total_loss=attenuation_loss+splices_loss;20 power_ratio =10^( total_loss /10);213722 printf(\ nSi gnal a t t e nua t i o n i s %. 2f dBs . \ nSi gnala t t e nua t i o n i s %. 3f dB/Km. \ nTot al l o s s i n 20 Kmf i b e r i s %. 2f dbs . \ nTot al a t t e nua t i o n i s %. 2f dBs. \ ni nput / out put r a t i o i s %e . ,attenuation ,alpha ,attenuation_loss ,total_loss ,power_ratio);23 printf(\nAs s i g n a l a t t e nua t i o n i s appr oxi mat e l ye qual t o 105 , we can say t hat l i n e i s ver y l o s s y. );ScilabcodeExa4.4.1Findoutputpower1 // Example 4 . 4 . 1 page 4 . 823 clc;4 clear;56 L=30; // f i b e r l e ng t h7 Pin =200d-6; // i nput power8 alpha =0.8; // s i g n a l a t t e nua t i o n per km910 Pout=Pin /(10^( alpha*L/10)); // computi ng out putpower11 Pout=Pout *10^6;12 printf(\nOutput power i s %. 3f mi cr owat t . ,Pout);13 printf(\nNOTE c a l c u l a t i o n e r r o r i n t he book . \nThey have t aken 0. 830=2. 4 whi ch a c t u a l l y i s 2 4 .);1415 // c a l c u l a t i o n e r r o r i n t he book . They have t aken0. 830=2. 4 whi ch a c t u a l l y i s 2 4 .16 // answer i n t he book i s 115. 14 mi cr owat t. (i n c o r r e c t )ScilabcodeExa4.6.1FindattenuationduetoRayleighscattering381 // Example 4 . 6 . 1 page 4. 1223 clc;4 clear;56 beta_c =8d-11; // i s o t he r ma l c o mp r e s s i b i l i t y7 n=1.46; // r e f r a c t i v e i ndex8 P=0.286; // p h o t o e l a s t i c c o ns t a t9 k=1.38d-23; // Bol tzmnn c ons t ant10 T=1500; // t e mpe r at ur e11 L=1000; // l e ng t h12 lamda =1000d-9; // wavel engt h1314 gamma_r = 8*(3.14^3) *(P^2)*(n^8)*beta_c*k*T/(3*(lamda ^4)); // computi ng c o e f f i c i e n t15 attenuation=%e^(-gamma_r*L); // computi nga t t e nua t i o n16 printf(\ nAt t enuat i on due t o Rayl e i gh s c a t t e r i n g i s%. 3f. ,attenuation);ScilabcodeExa4.6.2DetermineattenuationduetoRayleighscattering1 // Example 4 . 6 . 2 page 4. 1323 clc;4 clear;56 beta_c =7d-11; // i s o t he r ma l c o mp r e s s i b i l i t y7 n=1.46; // r e f r a c t i v e i ndex8 P=0.29; // p h o t o e l a s t i c c o ns t a t9 k=1.38d-23; // Bol tzmnn c ons t ant10 T=1400; // t e mpe r at ur e11 L=1000; // l e ng t h12 lamda =0.7d-6; // wavel engt h133914 gamma_r = 8*(3.14^3) *(P^2)*(n^8)*beta_c*k*T/(3*(lamda ^4)); // computi ng c o e f f i c i e n t15 attenuation=%e^(-gamma_r*L); // computi nga t t e nua t i o n16 gamma_r=gamma_r *1000;17 printf(\ nRal e i gh S c a t t e r i n g c o r f f i c i e n t i s %. 3f 103 per meter \n,gamma_r);18 printf(\nNOTE i n que t i on t hey have as ked f o ra t t e nua t i o n but i n s o l u t i o n t hey have notc a l c u a l t e d \n);19 printf(\ nAt t enuat i on due t o Rayl e i gh s c a t t e r i n g i s%. 3f ,attenuation);2021 // answer f o r Ral e i gh S c a t t e r i n g c o r f f i c i e n t i n t hebook i s gi ve n as 0. 804 d3, de v i a t i o n o f 0. 003 d3ScilabcodeExa4.8.1CompareSRSandSBSthresholdpowers1 // Example 4 . 8 . 1 page 4. 1723 clc;4 clear;56 d=5; // c or e di ame t e r7 alpha =0.4; // a t t e nua t i o n8 B=0.5; // Bandwi dth9 lamda =1.4; // wavel engt h10 PB=4.4d-3*d^2* lamda ^2* alpha*B; // computi ngt hr e s ho l d power f o r SBS11 PR=5.9d-2*d^2* lamda*alpha; // computi ngt hr e s ho l d power f o r SRS12 PB=PB *10^3;13 PR=PR *10^3;14 printf(\ nThr es hol d power f o r SBS i s %. 1f mW. \nThr es hol d power f o r SRS i s %. 3f mW. ,PB ,PR);4015 printf(\nNOTE Ca l c ul a t i o n e r r o r i n t he book whi l ec a l c u l a t i n g t hr e s ho l d f o r SBS . \ nAl so, whi l ec a l c u l a t i n g SRS , f or mul a i s t aken i n c o r r e c t l y ,Bandwi dth i s mu l t i p l i e d i n s econd s t ep, whi ch i snot i n t he f or mul a . );1617 // Ca l c ul a t i o n e r r o r i n t he book whi l e c a l c u l a t i n gt hr e s ho l d f o r SBS . Al so, whi l e c a l c u l a t i n g SRS ,f or mul a i s t aken i n c o r r e c t l y , Bandwi dth i smu l t i p l i e d i n s econd s t ep, whi ch i s not i n t hef or mul a18 // ans wer s i n t he book19 //PB=30. 8mW20 //PR=0. 413mWScilabcodeExa4.9.1Findcriticalradiusofcurvature1 // Example 4 . 9 . 1 page 4. 1923 clc;4 clear;56 n1=1.5; // r e f r a c t i v e i ndex o f c or e7 delta =0.03/100; // r e l a t i v e r e f r a c t i v e i ndex8 lamda =0.82d-6; // wavel engt h910 n2=sqrt(n1^2-2* delta*n1^2); // computi ngc l a ddi ng r e f r a c t i v e i ndex11 Rc=(3*n1^2* lamda)/(4*3.14*( n1^2-n2^2) ^1.5); //computi ng c r i t i c a l r a di us12 Rc=Rc *10^3;13 printf(\ n Cr i t i c a l r a di us i s %. 1f mi cr omet er . ,Rc);1415 // answer i n t he book i s 9 mi crometer, de v i a t i o n o f0 . 1 mi cr omet er .41ScilabcodeExa4.9.2Find critical radius for both single mode and multimodeber1 // Example 4 . 9 . 2 page 4. 2023 clc;4 clear;56 n1 =1.45; // r e f r a c t i v e i ndex o f c or e7 delta =3/100; // r e l a t i v e r e f r a c t i v e i ndex8 lamda =1.5d-6; // wavel engt h9 a=5d-6; // c or e r a di us1011 n2=sqrt(n1^2-2* delta*n1^2); // computi ngc l a ddi ng r e f r a c t i v e i ndex12 Rc=(3*n1^2* lamda)/(4*3.14*( n1^2-n2^2) ^0.5); //computi ng c r i t i c a l r a di us f o r s i n g l e mode13 Rc=Rc *10^6;14 printf(\ n Cr i t i c a l r a di us i s %. 2f mi cr omet er ,Rc);1516 lamda_cut_off= 2*3.14*a*n1*sqrt (2* delta)/2.405;1718 RcSM= (20* lamda/(n1-n2)^1.5) *(2.748 -0.996* lamda/lamda_cut_off)^-3; // computi ng c r i t i c a lr a di us f o r s i n g l e mode19 RcSM=RcSM *10^6;20 printf(\ n Cr i t i c a l r a di us f o r s i n g l e mode f i b e r i s %. 2f mi cr omet er . ,RcSM);21 printf(\nNOTE Ca l c ul a t i o n e r r o r i n t he book . \ n( 2. 748 0. 996 lamda/ l a mda c ut o f f ) 3; i n t h i sterm r a i s e d t o 3 i s not t aken i n t he book . );2223 // Ca l c ul a t i o n e r r o r i n t he book . ( 2. 748 0. 996 lamda/l a mda c ut o f f ) 3; i n t h i s term r a i s e d t o 3 i s42not t aken i n t he book .24 // answer i n t he book i s 7. 23mm. (i n c o r r e c t )ScilabcodeExa4.14.1Computematerialdispersion1 // Example 4 . 1 4 . 1 page 4. 3123 clc;4 clear;56 lamda =1550d-9;7 lamda0 =1.3d-6;8 s0 =0.095;910 Dt=lamda*s0/4*(1 -( lamda0/lamda)^4); // computi ngma t e r i a l d i s p e r s i o n11 Dt=Dt *10^9;12 printf(\ nMat e r i al d i s p e r s i o n at 1550 nm i s %. 1f ps /nm/km,Dt);13 printf(\n\nNOTE S l i g h t de v i a t i o n i n t he answerbe c aus e o f p r i n t i g mi s t ake \ nIn probl em t hey havegi ve n l amda0 as 1300 nanometer \ nbut whi l es o l v i n g t hey have t aken i t as 1330 nanometer );1415 // answer i n t he book 15. 6 ps /nm/km, de vi at on due t op r i n t i n g mi s t ake .ScilabcodeExa4.15.1Findmaximumpossiblebandwidthpulsedisper-sionandbandwidthlengthproduct1 // Example 4 . 1 5 . 1 page 4. 3523 clc;434 clear;56 tau =0.1d-6; // pul s e br oadni ng7 dist =20d3; // di s t a nc e89 Bopt =1/(2* tau); // computi ng o p t i c a l bandwi dth10 Bopt=Bopt *10^ -6;11 dispertion=tau/dist; // computi ng d i s p e r s i o n12 dispertion=dispertion *10^12;13 BLP=Bopt*dist; // computi ng Bandwi dth l e ng t hpr oduct14 BLP=BLP *10^ -3;15 printf(\ n o p t i c a l bandwi dth i s %d MHz. \ nDi s pe r s i o nper uni t l e ng t h i s %d ns /km. \ nBandwi dth l e ng t hpr oduct i s %d MHz. km. ,Bopt ,dispertion ,BLP);ScilabcodeExa4.15.2Calculateoverallsignalattenuation1 // Example 4 . 1 5 . 2 page 4. 3623 clc;4 clear;56 L=10; // f i b e r l e ng t h i n km7 Pin =100d-6; // i nput power8 Pout=5d-6; // out put power9 len =12; // l e ng t h o f o p t i c a l l i n k10 interval =1; // s p l i c e s a f t e r i n t e r v a l o f 1 km11 l=0.5; // l o s s due t o 1 s p l i c e1213 attenuation =-10* log10(Pin/Pout); // computi nga t t e nua t i o n14 alpha=attenuation/L;15 signal_attenuation=-alpha*L; // computi ngs i g n a l a t t e nua t i o n4416 splices_loss =(len -interval)*l; // computi ngs p l i c e s l o s s17 attenuation_loss=-len*alpha // computi nga t t e nua t i o n l o s s18 total_attenuation=attenuation_loss+splices_loss;// computi ng t o t a l a t t e nua t i o n1920 printf(\ nSi gnal a t t e nua t i o n i s %. 1f dB/Km. \ nOve r al la t t e nua t i o n i s %d dB f o r 10 km. \ nTot ala t t e nua t i o n i s %. 1f dBs f o r 12km. ,alpha ,signal_attenuation ,total_attenuation);ScilabcodeExa4.15.3Calculate bandwidthdispersionandbandwidthlengthproduct1 // Example 4 . 1 5 . 3 page 4. 3723 clc;4 clear;56 tau =0.1d-6; // pul s e br oadni ng7 dist =12d3; // di s t a nc e89 Bopt =1/(2* tau); // computi ng o p t i c a l bandwi dth10 Bopt=Bopt *10^ -6;11 dispertion=tau/dist; // computi ng d i s p e r s i o n12 dispertion=dispertion *10^12;13 BLP=Bopt*dist; // computi ng Bandwi dth l e ng t hpr oduct14 BLP=BLP *10^ -3;15 printf(\ n o p t i c a l bandwi dth i s %d MHz. \ nDi s pe r s i o nper uni t l e ng t h i s %. 1f ns /km. \ nBandwi dth l e ng t hpr oduct i s %d MHz. km,Bopt ,dispertion ,BLP);45ScilabcodeExa4.15.4Determinemaximumbitrate1 // Example 4 . 1 5 . 4 page 4. 3823 clc;4 clear;56 tau01 =10; // pul s e br oadni ng ns /mm7 L1=0.1; // l e ng t h i n k i l o me t e r8 tau02 =20; // pul s e br oadni ng ns /m9 L2=1; // l e ng t h i n k i l o me t e r10 tau03 =2000; // pul s e br oadni ng ns /m11 L3=2; // l e ng t h i n k i l o me t e r1213 tau1 =10d-9/1d-6;14 tau1=tau1*L1;15 Bopt1 =1/(2* tau1); // computi ng o p t i c a l bandwi dth16 tau2 =20d-9/1d-3;17 tau2=tau2*L2;18 Bopt2 =1/(2* tau2); // computi ng o p t i c a l bandwi dth19 Bopt2=Bopt2 *10^ -3;20 tau3 =2000d-9/1d-3;21 tau3=tau3*L3;22 Bopt3 =1/(2* tau3); // computi ng o p t i c a l bandwi dth232425 printf(\nWhen tau i s %d ns /mm, over l e ng t h %. 1f km,o p t i c a l bandwi dth f o r RZ i s %d MHz and f o r NRZi s %d MHz. ,tau01 ,L1,Bopt1 ,Bopt1/2 );26 printf(\nWhen tau i s %d ns /m, over l e ng t h %d km,o p t i c a l bandwi dth f o r RZ i s %. 1f KHz and f o r NRZi s %. 1f KHz . ,tau02 ,L2,Bopt2 ,Bopt2/2 );27 printf(\nWhen tau i s %d ns /m, over l e ng t h %d km,o p t i c a l bandwi dth f o r RZ i s %d Mz and f o r NRZ i s46%. 1f Hz . ,tau03 ,L3,Bopt3 ,Bopt3/2 );2829 printf(\n NOTE p r i n t i n g e r r o r s i n t he book . \ nInf i r s t two c a s e s tau i s not mu l t i p l i e d by 2);3031 // Ca l c ul a t i o n e r r o r becaus e, I n f i r s t two c a s e s taui s not mu l t i p l i e d by 232 // answers 33 //When tau i s 10 ns /mm, over l e ng t h 0 . 1 km, o p t i c a lbandwi dth f o r RZ i s 1000 MHz and f o r NRZ i s 500MHz.34 //When tau i s 20 ns /m, over l e ng t h 1 km, o p t i c a lbandwi dth f o r RZ i s 50 KHz and f o r NRZ i s 25 KHz .ScilabcodeExa4.15.5Calculatemaximumpossiblebandwidthanddis-persion1 // Example 4 . 1 5 . 5 page 4. 3923 clc;4 clear;56 tau =0.1d-6; // pul s e br oadni ng7 dist =15d3; // di s t a nc e89 Bopt =1/(2* tau); // computi ng o p t i c a l bandwi dth10 Bopt=Bopt *10^ -6;11 dispertion=tau/dist; // computi ng d i s p e r s i o n12 dispertion=dispertion *10^12;13 printf(\ n o p t i c a l bandwi dth i s %d MHz. \ nDi s pe r s i o nper uni t l e ng t h i s %. 2f ns /km. ,Bopt ,dispertion);47ScilabcodeExa4.15.6Computedelaydierencerms pulsebroadeningandmaximumbitrate1 // Example 4 . 1 5 . 6 page 4. 3923 clc;4 clear;56 L=5; // l e ng t h o f o p t i c a l l i n k7 n1=1.5 // r e f r a c t i v e i ndex8 c=3d8; // s peed o f l i g h t9 delta =1/100; // r e l a t i v e r e f r a c t i v e i ndex1011 delTS=L*n1*delta/c; // computi ng de l ay d i f f e r e n c e12 delTS=delTS *10^12;13 sigmaS=L*n1*delta /(2* sqrt (3)*c); // computi ng rmspul s e br oadni ng14 sigmaS=sigmaS *10^12;15 B=1/(2* delTS); // computi ng maximum b i t r a t e16 B=B*10^3;17 B_acc =0.2/( sigmaS); // computi ng a c c ur a t e b i tr a t e18 B_acc=B_acc *10^3;19 BLP=B_acc*L; // computi ng Bandwi dth l e ng t hpr oduct2021 printf(\ nDel ay d i f f e r e n c e i s %d ns . \nRMS pul s ebr oadni ng i s %. 2f ns . \ nBi t r a t e i s %. 1f Mbit / s . \nAccur at e b i t r a t e i s %. 2f Mbi ts / s . \ nBandwi dthl e ng t h pr oduct i s %. 2f MHz. km. ,delTS ,sigmaS ,B,B_acc ,BLP);2223 // answer i n t he book f o r RMS pul s e br oadni ng i s72. 25 ns, de v i a t i o n o f 0. 08 ns .24 // answer i n t he book f o r Bandwi dth l e ng t h pr oduct i s13. 85 MHz. km, de v i a t i o n o f 0. 01MHz. km.48ScilabcodeExa4.15.7Estimate rms pulse broadening andbandwidthlengthproduct1 // Example 4 . 1 5 . 7 page 4. 4023 clc;4 clear;56 NA=0.3; // nume r i c al a pe r t ur e7 n1 =1.45; // r e f r a c t i v e i ndex8 M=250; // ma t e r i a l d i s p e r t i o n par amet er i n ps /nm/km9 L=1; // l e ng t h10 BW=50; // Bandwi dth i n nm11 c=3d8; // s peed o f l i g h t1213 sigmaLamda=BW*L;14 sigmaM=sigmaLamda*L*M*10^ -12;15 sigmaS =10^3*L*(NA)^2/(4* sqrt (3)*n1*c);16 sigmaT=sqrt(sigmaM ^2+ sigmaS ^2); // computi ngt o t a l RMS pul s e br oadni ng17 BLP =0.2/ sigmaT; // computi ng bandwi dth l e ng t hpr oduct18 sigmaT=sigmaT *10^9;19 sigmaM=sigmaM *10^9;20 sigmaS=sigmaS *10^9;21 BLP=BLP /10^6;22 printf(\ nTot al RMS pul s e br oadni ng i s %. 1f ns /km. \nBandwi dth l e ng t h pr oduct i s %. 1f MHz. km,sigmaT ,BLP);49ScilabcodeExa4.15.8Estimate Bandwidthdispersionandbandwidthlengthproduct1 // Example 4 . 1 5 . 8 page 4. 4123 clc;4 clear;56 tau =0.1d-6; // pul s e br oadni ng7 dist =10d3; // di s t a nc e89 Bopt =1/(2* tau); // computi ng o p t i c a l bandwi dth10 Bopt=Bopt *10^ -6;11 dispertion=tau/dist; // computi ng d i s p e r s i o n12 dispertion=dispertion *10^12;13 BLP=Bopt*dist; // computi ng Bandwi dth l e ng t hpr oduct14 BLP=BLP *10^ -3;15 printf(\ n o p t i c a l bandwi dth i s %d MHz. \ nDi s pe r s i o nper uni t l e ng t h i s %. 1f ns /km. \ nBandwi dth l e ng t hpr oduct i s %d MHz. km. ,Bopt ,dispertion ,BLP);ScilabcodeExa4.15.9Estimatermspulsebroadening1 // Example 4 . 1 5 . 9 page 4. 4123 clc;4 clear;56 RSW =0.0012; // r e l a t i v e s p e c t r a l wi dth7 lamda =0.85d-6; // wavel engt h8 L=1; // di s t a nc e i n km ( assumed )9 M=100; // ma t e r i a l d i s p e r s i o n par amet er i n ps /nm/km ( assumed )105011 sigma_lamda=RSW*lamda;12 sigmaM=sigma_lamda*L*M*10^6; // computi ng rmspul s e br oadni ng .13 printf(\nRMS pul s e br oadni ng i s %. 3f ns /km. ,sigmaM);ScilabcodeExa4.15.10Estimate bandwidth pulse broadening and band-widthlengthproduct1 // Example 4 . 1 5 . 1 0 page 4. 4223 clc;4 clear;56 tau =0.1d-6; // pul s e br oadni ng7 dist =18d3; // di s t a nc e89 Bopt =1/(2* tau); // computi ng o p t i c a l bandwi dth10 Bopt=Bopt *10^ -6;11 dispertion=tau/dist; // computi ng d i s p e r s i o n12 dispertion=dispertion *10^12;13 BLP=Bopt*dist; // computi ng Bandwi dth l e ng t hpr oduct14 BLP=BLP *10^ -3;15 printf(\ n o p t i c a l bandwi dth i s %d MHz. \ nDi s pe r s i o nper uni t l e ng t h i s %. 1f ns /km. \ nBandwi dth l e ng t hpr oduct i s %d MHz. km,Bopt ,dispertion ,BLP);16 printf(\nNOTE p r i n t i n g mi s t ake i n t he book atd i s p e r s i o n per uni t l e ng t h . \ nThey have pr i nt e d ps/km; i t s houl d be ns /km);1718 // p r i n t i n g mi s t ake i n t he book at d i s p e r s i o n peruni t l e ng t h. They have pr i nt e d ps /km; i t s houl d bens /km.19 // answer i n t he book 5. 55 ps /km ( i n c o r r e c t )51ScilabcodeExa4.16.1Estimatermspulsebroadening1 // Example 4 . 1 6 . 1 page 4. 4323 clc;4 clear;56 RSW =0.0012; // r e l a t i v e s p e c t r a l wi dth7 lamda =0.90d-6; // wavel engt h8 L=1; // di s t a nc e i n km ( assumed )9 P=0.025; // ma t e r i a l d i s p e r s i o n par amet er10 c=3d5; // s peed o f l i g h t i n km/ s1112 M=10^3*P/(c*lamda); // computi ng ma t e r i a ld i s p e r s i o n13 sigma_lamda=RSW*lamda;14 sigmaM=sigma_lamda*L*M*10^7; // computi ng RMSpul s e br oadni ng15 sigmaB =25*L*M*10^ -3;1617 printf(\ nMat e r i al d i s p e r s i o n par amet er i s %. 2f ps /nm/km. \nRMS pul s r br oadni ng when si gma l amda i s25 i s %. 1f ns /km. \nRMS pul s e br oadni ng i s %. 1f ns/km. ,M,sigmaB ,sigmaM);1819 // answer i n t he book f o r RMS pul s e br oadni ng i s 0. 99ns /km, de v i a t i o n o f 0. 01 ns /km.ScilabcodeExa4.18.1Finddelaydierenceandrmspulsebroadening1 // Example 4 . 1 8 . 1 page 4. 455223 clc;4 clear;56 L=10; // l e ng t h o f o p t i c a l l i n k7 n1=1.49 // r e f r a c t i v e i ndex8 c=3d8; // s peed o f l i g h t9 delta =1/100; // r e l a t i v e r e f r a c t i v e i ndex1011 delTS=L*n1*delta/c; // computi ng de l ay d i f f e r e n c e12 delTS=delTS *10^12;13 sigmaS=L*n1*delta /(2* sqrt (3)*c); // computi ng rmspul s e br oadni ng14 sigmaS=sigmaS *10^12;15 B=1/(2* delTS); // computi ng maximum b i t r a t e16 B=B*10^3;17 B_acc =0.2/( sigmaS); // computi ng a c c ur a t e b i tr a t e18 B_acc=B_acc *10^3;19 BLP=B_acc*L; // computi ng Bandwi dth l e ng t hpr oduct2021 printf(\ nDel ay d i f f e r e n c e i s %d ns . \nRMS pul s ebr oadni ng i s %. 1f ns . \ nBi t r a t e i s %. 1f Mbit / s . \nAccur at e b i t r a t e i s %. 3f Mbi ts / s . \ nBandwi dthl e ng t h pr oduct i s %. 1f MHz. km,delTS ,sigmaS ,B,B_acc ,BLP);2223 // answer f o r maximum b i t r a t e i s gi ve n as 1. 008 Mb/s, de v i a t i o n o f 0. 008 Mb/ s .53Chapter5FiberOpticSplicesConnectorsandCouplersScilabcodeExa5.2.1CalculatelossduetoFresnelreection1 // Example 5 . 2 . 1 page 5 . 223 clc;4 clear;56 n1 =1.47; // r e f r a c t i v e i ndex o f f i b e r7 n=1; // r e f r a c t i v e i ndex o f a i r89 r=((n1-n)/(n1+n))^2; // computi ng f r a c t i o n o fl i g h t r e f l e c t e d10 loss =-10* log10(1-r); // l o s s11 total_loss =2* loss;12 printf( r =%. 3 f , whi ch means %. 1f pe r c e nt o f t het r a n s i mi t t e d l i g h t i s r e f l e c t e d at one i n t e r f a c e ,r,r*100);13 printf(\ nTot al l o s s i s %. 3f dB,total_loss);1415 // answer i n t he book f o r t o t a l l o s s o f f i b e r i s0. 318 dB, de v i a t i o n o f 0. 00254ScilabcodeExa5.2.2Estimate insertion loss due to lateral misalingment1 // Example 5 . 2 . 2 page 5 . 423 clc;4 clear;56 n1 =1.47; // r e f r a c t i v e i ndex o f f i b e r7 n=1; // r e f r a c t i v e i ndex o f a i r8 d=40d-6; // c or e di ame t e r9 y=4d-6; // l a t e r a l di s pal c e me nt1011 a=d/2; // computi ng c or e r a di us12 eta_lateral = (16*( n1/n)^2)/(%pi *(1+(n1/n))^4) *(2*acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2) ^0.5); //computi ng e t a l a t e r a l wi th a i r gap13 loss =-10* log10(eta_lateral); // computi ng l o s swhen a i r gap i s pr e s e nt14 eta_lateral1 =(2* acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2)^0.5)/%pi; // computi ng e t a l a t e r a l wi t houta i r gap15 loss1 =-10* log10(eta_lateral1); // computi ng l o s swhen a i r gap i s not pr e s e nt1617 printf(\ n l o s s wi th a i r gap i s %. 2f dB. \n l o s s wi thno a i r gap i s %. 2f dB. \ n Thus we can say t hatl o s s r e duc e s c o ns i de r a bl y i f t he r e i s no a i r gap .,loss ,loss1);1819 // answer i n t he book f o r l o s s wi th a i r gap i s 0. 91dB, de v i a t i o n o f 0. 01dB.55ScilabcodeExa5.2.3Estimateangularmisalignmentinsertionloss1 // Example 5 . 2 . 3 page 5 . 523 clc;4 clear;56 n1 =1.48; // r e f r a c t i v e i ndex o f f i b e r7 n=1; // r e f r a c t i v e i ndex o f a i r8 theta =10; // angl e i n de gr e e9 NA1 =0.3;10 NA2 =0.611 eta_angular1= (16*(n1/n)^2) /((1+( n1/n))^4) *(1 -((n*theta*%pi /180) /(%pi*NA1))); // computi ng e t aangul ar12 eta_angular2= (16*(n1/n)^2) /((1+( n1/n))^4) *(1 -((n*theta*%pi /180) /(%pi*NA2))); // computi ng e t aangul ar13 loss1 =-10* log10(eta_angular1); // computi ng l o s s14 loss2 =-10* log10(eta_angular2); // computi ng l o s s15 printf(\ nLoss when NA i s %. 1f i s %. 2f dB. \ nLosswhen NA i s %. 1f i s %. 2f dB. ,NA1 ,loss1 ,NA2 ,loss2);16 printf(\nThus we can say t hat i n s e r t i o n l o s s i sc o ns i de r a bl y r educed wi th hi g he r NA. );ScilabcodeExa5.2.4LossduetoFresnelreection1 // Example 5 . 2 . 4 page 5 . 723 clc;4 clear;56 n1=1.5; // r e f r a c t i v e i ndex o f f i b e r7 n=1; // r e f r a c t i v e i ndex o f a i r5689 r=((n1-n)/(n1+n))^2; // computi ng f r a c t i o n o fl i g h t r e f l e c t e d10 loss =-10* log10(1-r); // l o s s11 total_loss =2* loss;12 printf( r =%. 2 f , whi ch means %. 1f pe r c e nt o f t het r a n s i mi t t e d l i g h t i s r e f l e c t e d at one i n t e r f a c e ,r,r*100);13 printf(\ nTot al l o s s i s %. 2f dB,total_loss);1415 // answer i n t he book f o r t o t a l l o s s o f f i b e r i s 0. 36dB, de v i a t i o n o f 0. 01ScilabcodeExa5.2.5Estimate insertion loss due to lateral misalignment1 // Example 5 . 2 . 5 page 5 . 723 clc;4 clear;56 n1=1.5; // r e f r a c t i v e i ndex o f f i b e r7 n=1; // r e f r a c t i v e i ndex o f a i r8 d=50d-6; // c or e di ame t e r9 y=5d-6; // l a t e r a l di s pal c e me nt1011 a=d/2; // computi ng c or e r a di us12 eta_lateral = (16*( n1/n)^2)/(%pi *(1+(n1/n))^4) *(2*acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2) ^0.5); //computi ng e t a l a t e r a l wi th a i r gap13 loss =-10* log10(eta_lateral); // computi ng l o s swhen a i r gap i s pr e s e nt14 eta_lateral1 =(2* acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2)^0.5)/%pi; // computi ng e t a l a t e r a l wi t houta i r gap15 loss1 =-10* log10(eta_lateral1); // computi ng l o s s57when a i r gap i s not pr e s e nt1617 printf(\ n l o s s wi th a i r gap i s %. 2f dB. \n l o s s wi thno a i r gap i s %. 2f dB. ,loss ,loss1);1819 // answer i n t he book f o r l o s s wi th a i r gap i s 0. 95dB, de v i a t i o n o f 0. 01dB.ScilabcodeExa5.2.6Totalinsertionloss1 // Example 5 . 2 . 6 page 5 . 823 clc;4 clear;56 n1 =1.47; // r e f r a c t i v e i ndex o f f i b e r7 n=1; // r e f r a c t i v e i ndex o f a i r8 theta =3; // angl e i n de gr e e9 d=80d-6; // c or e di ame t e r10 y=2d-6; // l a t e r a l di s pal c e me nt11 delta =2/100; // r e l a t i v e r e f r a c t i v e i ndex1213 a=d/2; // computi ng c or e r a di us14 eta_lateral = (16*( n1/n)^2)/(%pi *(1+(n1/n))^4) *(2*acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2) ^0.5); //computi ng e t a l a t e r a l15 loss_lateral =-10* log10(eta_lateral); // computi ngl o s s due t o l a t e r a l mi s al i gnme nt16 eta_angular= (16*(n1/n)^2) /((1+( n1/n))^4) *(1-((n*theta*%pi /180) /(%pi*n1*(sqrt (2* delta))))); //computi ng e t a angul ar17 loss_angular =-10* log10(eta_angular); // computi ngl o s s due t o angul ar mi s al i gnment18 total_loss=loss_lateral+loss_angular; // computi ngt o t a l l o s s due t o mi s al i gnment5819 printf(\ n l o s s due t o l a t e r a l mi s al i gnment i s %. 2fdB. \n l o s s due t o angul ar mi s al i gnment i s %. 2f dB. \ nTot al l o s s i s %. 2f dB,loss_lateral ,loss_angular ,total_loss);2021 // answer i n t he book f o r l o s s due t o l a t e r a lmi s al i gnment i s 0. 48 dB, de v i a t i o n o f 0 . 0 2 .22 // answer i n t he book f o r t o t a l l o s s due i s 1. 05 dB,de v i a t i o n o f 0 . 0 2 .ScilabcodeExa5.4.1Findinsertionloss1 // Example 5 . 4 . 1 page 5. 1723 clc;4 clear;56 d=1d-6; // l a t e r a l di s pl ac e me nt7 W=4.95d-6; //MFD89 Lsm_lat= -10*log10(%e^(-(d/W)^2)); // computi ngl o s s10 printf(\ n I n s e r t i o n l o s s i s %. 2f dB. ,Lsm_lat);ScilabcodeExa5.4.2Findangularmisalignmentloss1 // Example 5 . 4 . 2 page 5. 1823 clc;4 clear;56 lamda =1.3d-6; // wavel engt h7 theta =1; // angl e i n de gr e e598 n2 =1.465; // c l a ddi ng r e f r a c t i v e i ndex9 W=4.95d-6; //MFD1011 Lsm_ang= -10*log10(%e^(-(%pi*n2*W*(theta*%pi /180)/lamda)^2)); // computi ng l o s s12 printf(\ n I n s e r t i o n l o s s i s %. 2f dB. ,Lsm_ang);ScilabcodeExa5.6.1Determineexcesslossinsertionlosscrosstalkandsplitratio1 // Example 5 . 6 . 1 page 5. 3023 clc;4 clear;56 p1=50d-6;7 p2 =0.003d-6;8 p3=25d-6;9 p4=26.5d-61011 EL=10* log10(p1/(p3+p4)); // computi ng e x c e s sl o s s12 IL13 =10* log10(p1/p3); // computi ng i n s e r t i o n l o s s13 IL14 =10* log10(p1/p4); // computi ng i n s e r t i o n l o s s14 ct=10* log10(p2/p1); // computi ng c r o s s t a l k15 sr=(p3/(p3+p4))*100; // computi ng s p l i t r a t i o1617 printf(\ nExces s l o s s i s %. 2f dB. \n I n s e r t i o n l o s sf rom por t 1 t o por t 3 i s %. 2f dB. \n I n s e r t i o n l o s sf rom por t 1 t o por t 4 i s %. 2f dB. \ nc r o s s t a l k i s%. 2f dB. \n S p l i t r a t i o i s %. 2f pe r c e nt ,EL ,IL13 ,IL14 ,ct,sr );18 printf(\nNOTE c a l c u l a t i o n e r r o r i n t he book . \ nMinus s i g n i s not pr i nt e d i n t he answer o f e x c e s sl o s s. \ nP1 i s t aken 25 i ns t e a d o f 50 whi l e60c a l c u l a t i n g c r o s s t a l k. );1920 // c a l c u l a t i o n e r r o r i n t he book . Minus s i g n i s notpr i nt e d i n t he answer o f e x c e s s l o s s. P1 i s t aken25 i ns t e a d o f 50 whi l e c a l c u l a t i n g c r o s s t a l k.21 // ans wer s i n t he book wi th s l i g h t d e v i a t i o n s22 // Exces s l o s s i s 0. 12 dB. (p r i n t i n g e r r o r )23 // I n s e r t i o n l o s s f rom por t 1 t o por t 4 i s 2. 75 dB.24 // c r o s s t a l k i s 39.2 dB. ( c a l c u l a t i o n e r r o r )ScilabcodeExa5.6.2Findtotallossandaverageinsertionloss1 // Example 5 . 6 . 2 page 5. 3223 clc;4 clear;56 N=16; //Number o f po r t s7 Pin=1d-3; // i nput power8 Pout =12d-6; // out put power910 split_loss =10* log10(N); // computi ng s p l i t l o s s11 excess_loss =10* log10(Pin/(Pout*N)); // computi nge x c e s s l o s s12 total_loss=split_loss+excess_loss; // computi ngt o t a l l o s s13 insertion_loss= 10* log10(Pin/Pout); // computi ngi n s e r t i o n l o s s1415 printf(\ nTot al l o s s i s %. 2f dB. \n I n s e r t i o n l o s s i s%. 2f dB. ,total_loss ,insertion_loss);1617 // answer i n t he book f o r Tot al l o s s i s 1 9 . 1 4 ,de v i a t i o n o f 0. 06dB.18 // answer i n t he book f o r i n s e r t i o n l o s s i s 1 9 . 2 0 ,61de v i a t i o n o f 0. 01dB.62Chapter6OpticalSourcesScilabcodeExa6.3.1Findoperatingwavelength1 // Example 6 . 3 . 1 page 6 . 723 clc;4 clear;56 x=0.07;7 Eg =1.424+1.266*x+0.266*x^2;8 lamda =1.24/ Eg; // computi ng wavel engt h9 printf(\nWavl ength i s %. 3f mi cr omet er . ,lamda);ScilabcodeExa6.3.2Findout number of longitudinal modes andfre-quencyseparation1 // Example 6 . 3 . 2 page 6. 1223 clc;4 clear;5636 n=1.7; // r e f r a c t i v e i ndex7 L=5d-2; // di s t a nc e between mi r r or8 c=3d8; // s peed o f l i g h t9 lamda =0.45d-6; // wavel engt h1011 k=2*n*L/lamda; // computi ng number o f modes12 delf=c/(2*n*L); // computi ng mode s e pa r a t i o n13 delf=delf *10^ -9;1415 printf(\nNumber o f modes ar e %. 2 e . \ nFrequencys e pa r a t i o n i s %. 2f GHz . ,k,delf);ScilabcodeExa6.14.1Singlelongitudinalmode1 // Example 6 . 1 4 . 1 page 6. 4223 clc;4 clear;56 // Thi s i s exampl e does not c o n s i s t o f any nume r i c alcomput at i on78 printf(\ nQues t i onWhat do you under s t and bys i n g l e l o n g i t u d i n a l mode l a s e r or SLM? )9 printf(\nAnswer \ nIn l a s e r o pe r a t i o n o p t i c a l gai nal one i s not s u f f i c i e n t f o r l a s e r o pe r a t i o n buta minimum amount o f gai n i s a l s o ne c e s s a r y . \ nThi sgai n can be ac hi e ve d when l a s e r i s pumped abovet hr e s ho l d l e v e l. \ nIn s i mpl e s t l a s e r s t r u c t u r e wehave pn j unc t i o n. Ac t i ve l a y e r i s s andwi t chedbetween p and n t ype l a y e r s o f hi g he r bandgapma t e r i a l. Such broad ar e a s e mi c onduc t or l a s e rneed hi gh t hr e s ho l d c ur r e nt and l i g h t c onf i ne me ntbecomes d i f f i c u l t. \ nGain gui ded s e mi c onduc t orl a s e r l i mi t t he c ur r e nt i n j e c t i o n over a narrow64s t r i p e t hus overcome t he probl em o f l i g h tc onf i ne me nt . They ar e a l s o c a l l e d s t r i p e geometryl a s e r s. \ nIn i ndex gui ded l a s e r an i n i ndex s t e pi s i nt r oduc e d t o f orm wavegui de . \ nIn bur i e dh e t e r o s t r u c t u r e l a s e r t he a c t i v e r e g i o n i n bur i e dby l a y e r s o f l owe r r e f r a c t i v e i n d i c e s. \ nWhenwi dth and t h i c k n e s s o f t he a c t i v e l a y e r i sc o nt r o l l e d, l i g h t can be made t o emerge i n as i n g l e s p a t i a l mode , but t he probl em a r i s e s whensuch l a s e r s o s c i l l a t e i n many l o n g i t u d i n a l modesi n Fabry Per ot c a v i t y . \ nThe s p e c t r a l wi dthobt ai ne d i s about 24 nmwhi ch can be t o l e r a t e df o r 1 . 3 mi cr omet er ope r at i on, but f o r s ys t emso pe r a t i ng near 1. 55 mi cr omet er at hi g he r b i tr a t e s such mul ti mode l a s e r s can not be used . Atsuch t i me s l a s e r whi ch emi t l i g h t i n a s i n g l el o ng i t udna l mode ar e r e q ui r e d t o g i ve hi g he r b i tr a t e s than 1 Gb/ s . They ar e c a l l e d S i n g l eLo ng i t udi na l Mode (SLM) l a s e r s. );ScilabcodeExa6.21.1Determine total recombination lifetime and inter-nallygeneratedpoweremission1 // Example 6 . 2 1 . 1 page 6. 5923 clc;4 clear;56 tr=50; // r a d i a t i v e r e c ombi nat i on l i f e t i me7 tnr =85; //nonr a d i a t i v e r e c ombi nat i on l i f e t i me8 h=6.624d-34; // pl ank s c ons t ant9 c=3d8; // s peed o f l i g h t10 q=1.6d-19; // c har ge o f e l e c t r o n11 i=35d-3; // c ur r e nt12 lamda =0.85d-6; // wavel engt h651314 t=tr*tnr/(tr+tnr); // computi ng t o t a lr e c ombi nat i on ti me15 eta=t/tr; // computi ng i n t e r n a lquantum e f f i c i e n c y16 Pint=eta*h*c*i/(q*lamda); // computi ng i n t e r n a l l yge ne r at e d power17 Pint=Pint *10^31819 printf(\ nTot al r e c ombi nai t on ti me i s %. 2f ns . \nI nt e r na l quantum e f f i c i e n c y i s %. 3f. \n I n t e r n a l l yge ne r at e d power i s %. 1f mW. ,t,eta ,Pint);2021 // answer i n t he book f o r I n t e r n a l quantum e f f i c i e n c yi s 0 . 6 2 9 , de v i a t i o n o f 0 . 0 0 1 .22 // answer i n t he book f o r I n t e r n a l l y ge ne r at e d poweri s 32. 16 mW, de v i a t i o n o f 0. 04 mW.ScilabcodeExa6.21.2Determinetotal recombinationlifetimeinternalquantumeciencyinternalpowerlevel1 // Example 6 . 2 1 . 2 page 6. 5923 clc;4 clear;56 tr=30; // r a d i a t i v e r e c ombi nat i on l i f e t i me7 tnr =100; //nonr a d i a t i v e r e c ombi nat i on l i f e t i me8 h=6.624d-34; // pl ank s c ons t ant9 c=3d8; // s peed o f l i g h t10 q=1.6d-19; // c har ge o f e l e c t r o n11 i=40d-3; // c ur r e nt12 lamda =1310d-9; // wavel engt h1314 t=tr*tnr/(tr+tnr); // computi ng t o t a l66r e c ombi nat i on ti me15 eta=t/tr; // computi ng i n t e r n a lquantum e f f i c i e n c y16 Pint=eta*h*c*i/(q*lamda); // computi ng i n t e r n a l l yge ne r at e d power17 Pint=Pint *10^31819 printf(\ nTot al r e c ombi nai t on ti me i s %. 2f ns . \nI nt e r na l quantum e f f i c i e n c y i s %. 3f. \n I n t e r n a l l yge ne r at e d power i s %. 2f mW. ,t,eta ,Pint);2021 // answer i n t he book f o r Tot al r e c ombi nai t on ti me i s23. 07 ns, de v i a t i o n o f 0. 01 ns .ScilabcodeExa6.21.3Determine total recombination lifetime and inter-nallygeneratedpower1 // Example 6 . 2 1 . 3 page 6. 6023 clc;4 clear;56 tr=50; // r a d i a t i v e r e c ombi nat i on l i f e t i me7 tnr =110; //nonr a d i a t i v e r e c ombi nat i on l i f e t i me8 h=6.624d-34; // pl ank s c ons t ant9 c=3d8; // s peed o f l i g h t10 q=1.6d-19; // c har ge o f e l e c t r o n11 i=40d-3; // c ur r e nt12 lamda =0.87d-6; // wavel engt h1314 t=tr*tnr/(tr+tnr); // computi ng t o t a lr e c ombi nat i on ti me15 eta=t/tr; // computi ng i n t e r n a lquantum e f f i c i e n c y16 Pint=eta*h*c*i/(q*lamda); // computi ng i n t e r n a l l y67ge ne r at e d power17 Pint=Pint *10^31819 printf(\ nTot al r e c ombi nai t on ti me i s %. 2f ns . \nI nt e r na l quantum e f f i c i e n c y i s %. 4f. \n I n t e r n a l l yge ne r at e d power i s %. 2f mW. ,t,eta ,Pint);2021 // ans wer s i n t he book wi th s l i g h t d e v i a i t o n s22 // Tot al r e c ombi nai t on ti me i s 34. 37 ns, de v i a t i o n o f0. 01 ns .23 // I n t e r n a l quantum e f f i c i e n c y i s 0 . 68 7 4 , de v i a i t o no f 0 . 0 0 0 1 .24 // I n t e r n a l l y ge ne r at e d power i s 39. 24 mW, de v i a t i o no f 0. 02mW.ScilabcodeExa6.22.1Determineopticalpower1 // Example 6 . 2 2 . 1 page 6. 6823 clc;4 clear;56 f1=10d6; // f r e que nc y7 f2=100d68 t=4d-9;9 Pdc =280d-6; // o p t i n c a l out put power1011 w1=2*%pi*f1; // computi ng omega12 Pout1=Pdc *10^6/( sqrt (1+(w1*t)^2)); // computi ngout put power1314 w2=2*%pi*f2; // computi ng omega15 Pout2=Pdc *10^6/( sqrt (1+(w2*t)^2)); // computi ngout put power166817 printf(Ouput power at 10 MHz i s %. 2f mi cr owat t . \nOuput power at 100 MHz i s %. 2f mi cr owat t . \nConcl us i on when de vi c e i s dr i v e at hi g he rf r e que nc y t he o p t i c a l power r e duc e s . \nNOTE c a l c u l a t i o n e r r o r. I n t he book s quar e term i n t hedenomi nat er i s not t aken . ,Pout1 ,Pout2);1819 BWopt = sqrt (3) /(2* %pi*t);20 BWelec = BWopt/sqrt (2);21 BWopt=BWopt *10^ -6;22 BWelec=BWelec *10^ -6;2324 printf(\n3 dB o p t i c a l power i s %. 2f MHz. \ n3 dBe l e c t r i c a l power i s %. 2f MHz. ,BWopt ,BWelec);252627 // c a l c u l a t i o n e r r o r. I n t he book s quar e term i n t hedenomi nat er i s not t aken .28 // ans wer s i n t he book29 //Ouput power at 10 MHz i s 228. 7 mi cr owat t. (i n c o r r e c t )30 //Ouput power at 100 MHz i s 175 mi cr owat t. (i n c o r r e c t)31 // 3 dB o p t i c a l power i s 68. 8 MHz, de v i a t i o n o f 0. 1232 // 3 dB e l e c t r i c a l power i s 48. 79 MHz, de v i a t i o n o f0. 06ScilabcodeExa6.22.2Tocalculateemittedoptical poweraspercentofinternalopticalpower1 // Example 6 . 2 2 . 2 page 6. 6923 clc;4 clear;5696 n1=3.5; // r e f r a c t i v e i ndex7 n=1; // r e f r a c t i v e i ndex o f a i r8 F=0.69; // t r a ns mi s s i o n f a c t o r910 eta = 100*( n1*(n1+1)^2)^-1; // computi ng e t a1112 printf(\ net a e x t e r n a l i s %. 1f pe r c e nt i. e . s mal lf r a c t i o n o f i n t r n a l l y ge ne r at e d o pt i c a l po we r i se mi t t e d f rom t he de vi c e. ,eta);13 printf(\n\n ORwe can a l s o a r r i v e at s o l ut i o n, \ n);1415 r= 100*F*n^2/(4* n1^2); // computi ng r a t i o o fPopt / Pi nt1617 printf(\n Popt / Pi nt i s %. 1f pe r c e nt ,r);1819 printf(\nNOTE p r i n t i n g mi s t ake at f i n a l answer . \nThey have pr i nt e d 40 pe r c e nt i t s houl d be 1 . 4pe r c e nt );ScilabcodeExa6.22.3Findoperatinglifetime1 // Example 6 . 2 2 . 3 page 6. 7323 clc;4 clear;56 beta0 =1.85 d7;7 T=293; // t e mpe r at ur e8 k=1.38d-23; // Bol tzman c ons t ant9 Ea =0.9*1.6d-19;10 theta =0.65; // t he r s ho l d1112 betar=beta0*%e^(-Ea/(k*T));13 t=-log(theta)/betar;701415 printf(\ nDegr adat i on r a t e i s %. 2 e per hour . \nOper at i ng l i f e t i me i s %. 1 e hour . ,betar ,t);1617 // answer i n t he book f o r Degr adat i on r a t e i s 6 . 4 e 09per hour, de v i a t i o n o f 0. 08 e918 // answer i n t he book f o r Oper at i ng l i f e t i me i s 6 . 7 e+07 hour, de v i a i t o n o f 0 . 1 e171Chapter7SourcetoFiberPowerLaunchingandPhotodetectorsScilabcodeExa7.2.1FindFresnelreectionandpowerloss1 // Example 7 . 2 . 1 page 7. 1123 clc;4 clear;56 n1=3.4; // r e f r a c t i v e i ndex o f o p t i c a l s our c e7 n=1.46; // r e f r a c t i v e i ndex o f s i l i c a f i b e r89 r=((n1-n)/(n1+n))^2; // computi ng Fr e ns e lr e f l e c t i o n10 L=-10* log10(1-r); // computi ng l o s s1112 printf(\ nFr e ns e l r e f l e c t i o n i s %. 3f. \ nPower l o s s i s%. 2f dB. ,r,L);ScilabcodeExa7.2.2Computeopticalpowercoupled721 // Example 7 . 2 . 2 page 7. 1123 clc;4 clear;56 r=35d-6; // r a di us7 R=150; // Lamberti an e mi s s i o n pat t e r n8 NA=0.2; // Numer i cal a pe r t ur e9 Pled= %pi ^2*r^2*R*NA^2;10 Pled=Pled *10^7;11 printf(\ nOpt i c al power f o r l a r g e r c or e o f 35mi cr omet er i s %. 3f mW. ,Pled);12 r1=25d-6;13 Pled1=(r1/r)^2* Pled;14 printf(\ nOpt i c al power f o r s ma l l e r c or e o f 25mi cr omet er i s %. 2f mW. ,Pled1);ScilabcodeExa7.2.3Calculatecoupledpower1 // Example 7 . 2 . 3 page 7. 1223 clc;4 clear;56 r=25d-6; // r a di us7 R=39; // Lamberti an e mi s s i o n pat t e r n8 NA =0.25; // nume r i c al a pe r t ur e9 a=35d-6; // ar e a10 Pc1= %pi ^2*a^2*R*NA^2; // computi ng c oupl e d powerwhen ra13 Pc=Pc *10^7;147315 printf(\ nOpt i c al power when r>a i s %. 2f mW. \nOpt i c al power when r