diff options
author | prashantsinalkar | 2020-04-14 10:19:27 +0530 |
---|---|---|
committer | prashantsinalkar | 2020-04-14 10:23:54 +0530 |
commit | 476705d693c7122d34f9b049fa79b935405c9b49 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Fiber_Optics_Communication_by_H_Kolimbiris | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
download | all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.gz all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.bz2 all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.zip |
Initial commit
Diffstat (limited to 'Fiber_Optics_Communication_by_H_Kolimbiris')
12 files changed, 5419 insertions, 0 deletions
diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/1-Elements_of_Optics_And_Quantum_Physics_.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/1-Elements_of_Optics_And_Quantum_Physics_.ipynb new file mode 100644 index 0000000..a17b541 --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/1-Elements_of_Optics_And_Quantum_Physics_.ipynb @@ -0,0 +1,643 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Elements of Optics And Quantum Physics " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: Degree_of_polarisatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example no 1-10\n", +"//page no. 26\n", +"clc;\n", +"clear;\n", +"//p=m/{m+[2*n/(1-n)^2]^2};\n", +"\n", +"m=5; //no. of reflective plates\n", +"n=1.33; //refractive indices\n", +"p=m/{m+[2*n/(1-(n)^2)]^2}; //degree of polarisation\n", +"printf('\n The degree of polarisation is %0.1f \n',p);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: Number_of_refractive_Plates.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example no 1-11\n", +"//page no. 26\n", +"clc;\n", +"clear;\n", +"//m= p*{m+[2*n/(1-n)^2]^2};\n", +"\n", +"n=1.5; //refractive indices\n", +"p=0.45; //degree of polarisation\n", +"m={p*[2*n/(1-n^2)]^2}/(1-p);\n", +"printf('\n Thus it will require %0.0f reflective plate to achive a degree of polarization equal to 0.45',m); //Result mis rounded of to nearest integer" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: Ratio_of_Optical_Ray.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//Example no 1-12\n", +"//page no. 27\n", +"clc;\n", +"clear;\n", +"//I1/I0=cos(w)^2\n", +"//k=I1/I0;\n", +"\n", +"w=30; //angle bw polarizer and analyser in degee\n", +"k=cosd(w)^2;\n", +"disp(k,'The ratio of optical ray intensity ,I1/I0='); //Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: Angle_between_polariser_and_analyzer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example no 1-13\n", +"//page no. 27\n", +"clc;\n", +"clear;\n", +"//I1/I0=cos(w)^2\n", +"//Given I1/I0=0.55\n", +"\n", +"k=sqrt(0.55); //from above formulae\n", +"printf('\n cos w is %0.2f ',k);\n", +"printf('\n The angle bw polarizer and analyser , w is %0.0f degree',acos(k)*180/%pi);//Result\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: find_time_difference_and_phase_difference.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example no 1-14\n", +"//page no. 29\n", +"clc;\n", +"clear;\n", +"disp('Solution (i) is ');\n", +"ne=1.4;//refractive index\n", +"no=1.25; //refractive index\n", +"c=3*10^8; //in m/s\n", +"T=2*10^-5; //in m\n", +"l=740; //in nm\n", +"t=[ne-no]*T/c; //time difference\n", +"printf('\n Time difference, t is %0.2f ps',t*10^12);// result\n", +"disp('Solution (ii) is ');\n", +"le=l/ne; \n", +"lo=l/no;\n", +"fi=2*%pi*T*(1/le-1/lo)*10^9;\n", +"printf('\n Phase difference is %0.1f rad',fi);// result\n", +"// Answer misprinted in book\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15: Find_wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"//page no. 31\n", +"//Example no 1-15\n", +"//E=h*v=h*c/l;\n", +"clc;\n", +"clear;\n", +"E=3; //In KeV\n", +"//1eV=1.6*10^-19\n", +"h=6.63*10^-34; //plank constant in J/s\n", +"c=3*10^8; // speed of light in m/s\n", +"l=h*c/(E*10^3*1.6*10^-19);// wavelength in nm\n", +"printf('wavelength of a electromagnetic radiation is %0.3f nm',l*10^9);//result\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16: Compute_the_constant_phi.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//page no. 31\n", +"//Example no 1-16\n", +"clc;\n", +"clear;\n", +"disp('Solution (i) is ');\n", +"l=670//in nm\n", +"h=6.63*10^-34; // plank constant in J/s\n", +"c=3*10^17//speed of light in nm/sec\n", +"Ek=0.75//In eV\n", +"phi=(h*c/l)/(1.6*10^-19) -Ek;\n", +"phi=round(phi*10)/10; //round to 1 decimal point\n", +"printf('\n Characteristic of material = %0.1f eV\n',phi);//result\n", +"disp('Solution (ii) is ');\n", +"fc=phi*1.6*10^-19/h*10^-12;// frequency in THz//result\n", +"fc=round(fc);\n", +"printf('\n Cuttoff frequency is = %0.0f THz\n',fc);//result\n", +"lc=c/(fc*10^12); //in nm\n", +"printf('\n Cuttoff wavelength is = %0.0f nm\n',lc);//result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.17: Voltage_required_to_accelerate_an_electron.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"//page no. 31\n", +"//Example no 1-17\n", +"clc;\n", +"clear all;\n", +"disp('Solution (i) is ');\n", +"l=0.045;//wavelength in nm\n", +"h=6.63*10^-34; //planks constant in J/s\n", +"c=3*10^8; //speed of light in m/s\n", +"E=h*c/l/10^-9; //energy of photon in eV\n", +"mprintf('\n E = %e J',E);\n", +"E1=E/(1.6*10^-19); // energy in joule\n", +"mprintf('\n E = %e eV',E1);\n", +"e=1.6*10^-19; // charge of electron\n", +"disp('Solution (ii) is ');\n", +"V=E/e;\n", +"printf('\n Required voltage is = %0.2f KV',V/1000);// result\n", +"\n", +"// Value of wavelenght in problem is .45 but in the solution is .045 \n", +"//the value considered above is .045\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.18: Compute_uncertainity_in_electron_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//page no. 36\n", +"//Example no 1-18\n", +"clc;\n", +"clear;\n", +"\n", +"disp('Solution (i) is ');\n", +"x=620// difference in particle momentum In nm\n", +"h=6.63*10^-34// planks constant In J/s\n", +"//p=h/(4*%pi*x);\n", +"//m*v=h/(4*%pi*x);\n", +"m=9.11*10^-31 //In kg // mass of electron\n", +"v=h /(4*%pi* x *10^-9*m);// electron velocity\n", +"printf('\n The uncertanity in electron velocity is %0.0f m/s \n',v);// result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: Arrival_time_difference_between_two_monochromatic_optical_beams.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Example1-1\n", +"//Given\n", +"clc;\n", +"clear all;\n", +"printf('(i) t1=d/c \n');\n", +"printf(' (ii) t2=[(d-5)/c]+[5/v2] \n');\n", +"printf(' v2=c/n2 \n');\n", +"printf(' t2=(d+2.5)/c\n');\n", +"printf(' (iii) delta_t=t2-t1=(d+2.5-d)/c\n');\n", +"c=3*10^8; //Speed of light in m/s\n", +"delta_t=2.5*10^-2/c; //converted 2.5 cm into meters\n", +"printf('The time difference %e s',delta_t );\n", +"printf('\n Arrival time difference of two monochromatic beams is %0.0f ps',delta_t*10^12)\n", +"// Answer misprinted in the book" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Calculate_angle_of_refraction_velocity_wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//given \n", +"//page no 5\n", +"clc;\n", +"clear;\n", +"//Applying Snell's law\n", +"a=1*sin(428)/1.333;//a=sin(w2)\n", +"printf('Angle of refraction is %0.1f\n ',a)\n", +"printf('\n Angle of refraction is %0.0f degree \n ',asin(a)*57.27)\n", +"c=3*10^8; //speed of light in m/s\n", +"n2=1.333; //refractive index of 2nd medium\n", +"v2=c/n2; //velocity in second medium in m/s\n", +"n1=1; //refractive index of 1st medium\n", +"l1=620; //in nm wavelength\n", +"printf('\n Velocity of optical ray through medium second %0.02f*10^8 m/s\n',v2/10^8);\n", +"l2= (n1*l1)/n2; //wavelength in 2nd medium in nm\n", +"printf('\n Wavelenght of optical ray through medium second %0.1f nm',l2); //Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Angle_of_refration_and_Deviation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//given \n", +"//page no 5 \n", +"clc;\n", +"clear;\n", +"n1=1; //refractive index of air\n", +"n2=1.56; //refractive index of medium\n", +"w1=60; //in deg C\n", +"//using snell's law\n", +"a= n1*sind(w1)/n2; //a=sin(w1)\n", +"w2=asind(a); //in degree\n", +"printf('Angle of refraction is %0.2f degree\n ',w2);\n", +"B=w1-w2; //in degree\n", +"printf('Angle of deviation is %0.1f degree\n ',B)\n", +"// The answer doesn't match because of priting errorsin calculation as sin(608)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Find_optical_Path_and_angle_phi.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//given \n", +"//page no 6\n", +"clc;\n", +"disp('Solution (i)');\n", +" w=5/12.5; // tan(w)=5/12.5;\n", +"printf('\n The value of tan(w2) is %0.1f \n',w);\n", +"w2=atan(w)*180/%pi;\n", +"//w2=atan(w)*180/%pi\n", +"printf('\n The value of w2 is %0.1f degree\n',w2);\n", +"printf('\n The value of sin(w2) is %0.2f \n',sin(w2*%pi/180));\n", +"disp('Solution (ii)');\n", +"//Applying snell's law\n", +"n1=1.05;\n", +"n2=1.5;\n", +"w1=(n2*sin(w2*%pi/180))/n1;//a=sin(w1)\n", +"printf('\n The value of sin(w1) is %0.2f \n',w1);\n", +"printf('\n The value of w1 is %0.0f degree \n',asin(w1)*180/%pi);\n", +"//value of w1\n", +"//tan(w1)=(p-x)12.5;\n", +"k=0.62*12.5;\n", +"d=1.05*[(12.5)^2+(k)^2]^0.5 +1.5*(12.5^2+5^2)^0.5;//d=1.05[(h1)^2+(k)^2]^0.5 +n2(h2^2+x^2)^0.5;\n", +"printf('\n the optical distance is %0.2f cm\n',d);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: Find_Phase_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex1_5\n", +"//given \n", +"//page no 11\n", +"clc;\n", +"clear;\n", +"c=3*10^8;\n", +"disp('Solution (i) is ');\n", +"ri=1.5;//refractive index\n", +"u=830// in nm\n", +"l=u/ri; //in nm\n", +"printf('\n Wavelength is %0.0f nm \n',l);\n", +"disp('Solution (ii) is ');\n", +"l=round(l); // rounding to nearest integer\n", +"f=c/(l*10^-9)*10^-12; //in THz\n", +"printf('\n frequency is %0.0f THz\n',f);\n", +"disp('Solution (iii) is ');\n", +"f=round(f); // rounding to nearest integer\n", +"v=l*10^-9*f*10^12; //in m/s\n", +"mprintf('\n phase velocity is %.3e m/s\n',v);//answer is getting rounding off due to larger calculation\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: find_wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex1_6\n", +"//given \n", +"//page no 12\n", +"clc;\n", +"clear;\n", +"disp('Solution (i) is ');\n", +"l=720; //wavelength in nm\n", +"n=1.5; //refractive index\n", +"lm=l/n;\n", +"disp('nm',lm,'Wavelenth is'); //result\n", +"disp('Solution (ii) is ');\n", +"c=3*10^8; //in m/s speed of light\n", +"u=c/n;\n", +"disp('m/s',u,'Velocity is'); //result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: Find_wavelength_of_Light.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex1_7\n", +"//given \n", +"//page no 12\n", +"clc;\n", +"clear;\n", +"disp('Solution (i)');\n", +"c=3*10^8; //in m/s speed of light\n", +"l=640; //in nm\n", +"u=2.2*10^8; //in m/s\n", +"lm=u*l/c; //wavelenth in medium\n", +"printf('\n The wavelength is %0.1f nm\n',lm);// The answer in the book is misprinted \n", +"disp('Solution (ii)');\n", +"n=l/lm; //refractive index\n", +"printf('\n Refractive Index is %0.3f \n',n);//The answer in the book is misprinted" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: Ratio_of_input_output_intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Ex1_8\n", +"//given \n", +"//page no 12\n", +"clc;\n", +"clear;\n", +"//k=aa+as=6.3;\n", +"//Given values from research\n", +"k=6.3; //combined attenuation due to absorption and scattering\n", +"d=25; //in cm\n", +"disp('Solution (ii)');\n", +"//Io/Ii=exp(-(ao+ai)*d); d in m\n", +"j=exp(-(k)*d/100); //Io/Ii ratio\n", +"printf('\n Io is %0.3f of Ii \n',j); //result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: Compute_length_of_Tube.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex1_9\n", +"//given \n", +"//page no 13\n", +"clc;\n", +"clear;\n", +"// Given formula Io/Ii=exp(-(ao+ai)*d);\n", +"// k=aa+as=63.1;\n", +"// Io/Ii=1.5\n", +"d=log(.15)/-63.1; //length of tube\n", +"printf('\nLength of tube, d = %0.0f cm \n',d*100); //Result" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/10-Optical_Modulation.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/10-Optical_Modulation.ipynb new file mode 100644 index 0000000..f82791e --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/10-Optical_Modulation.ipynb @@ -0,0 +1,103 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Optical Modulation" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: Required_Biasing_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 10\n", +"//page no 354\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Vpi=1; //Assumed 1 because we can not use a variable on RHS \n", +"//Vpi is Violtage swing\n", +"A=0.25; //chirping\n", +"//V1=(AV1p+Vp)/2\n", +"V1=(A*Vpi+Vpi)/2;\n", +"printf('\n V1= %0.3f Vpi',V1) \n", +"V2=V1-Vpi;\n", +"printf('\n V2= %0.3f Vpi',V2) " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: Biasing_range.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 10\n", +"//page no 354\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Vpi=1; //Assumed 1 because we can not use a variable on RHS\n", +"//Vpi is Violtage swing\n", +"disp('for alpha=0.3');\n", +"A=0.3; //chirping\n", +"//V1=(AV1p+Vp)/2\n", +"V1=(A*Vpi+Vpi)/2;\n", +"printf('\n V1= %0.2f Vpi',V1) \n", +"V2=V1-Vpie;\n", +"printf('\n V2= %0.2f Vpi\n',V2) \n", +"disp('for alpha=0.8');\n", +"A=0.8; //chirping\n", +"//V1=(AV1p+Vp)/2\n", +"V1x=(A*Vpi+Vpi)/2;\n", +"printf('\n V1= %0.1f Vpi',V1x) \n", +"V2x=V1x-Vpi;\n", +"printf('\n V2= %0.1f Vpi',V2x) \n", +"printf('\n Biasing range is %0.2f Vpi <= V1 <= %0.2f Vpi',V1,V1x) \n", +"printf('\n Biasing range is %0.1f Vpi <= V2 <= %0.2f Vpi',V2x,V2) " + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/11-Multiplexing.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/11-Multiplexing.ipynb new file mode 100644 index 0000000..5ae93f4 --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/11-Multiplexing.ipynb @@ -0,0 +1,128 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Multiplexing" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1: Cross_talk_in_refrence_to_the_number_of_channel.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 11\n", +"//page no 386\n", +"//given\n", +"clc;\n", +"clear all;\n", +"q=4.9*10^-18; //in m/W.GHz raman gain slope\n", +"f=100; //in GHz\n", +"A=50*10^-6; //cross sectional area in micro meter square\n", +"P0=3.5; //in mW\n", +"Le=10*10^3;\n", +"G=q*f*10^6/2/A;\n", +"N=20;\n", +"mprintf('\n G = %e ',G);\n", +"CT=N*(N-1)*(P0*10^-3*G*Le)/2;\n", +"printf('\n CT(L) = %0.2f ',CT);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2: Capacitor_value_of_PLL_section.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 11\n", +"//page no 410\n", +"//given\n", +"clc;\n", +"clear all;\n", +"K0=2*%pi*625; //in MHz/V\n", +"Ip=0.6; //in mA\n", +"N=64; \n", +"w=2.44; //in Mhz\n", +"Z=5;\n", +"Vout=5; //in V\n", +"C=(4*K0*10^6*Ip*10^-3*Z)/(2*%pi*N*w*w*10^12);\n", +"printf('\n The value of capacitance is %0.0f nF',C*10^9)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3: Value_of_damping_coefficient.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 11\n", +"//page no 410\n", +"//given\n", +"clc;\n", +"clear all;\n", +"K0=2*%pi*625; //in MHz/V\n", +"Ip=0.35; //in mA\n", +"N=64; \n", +"w=2.44; //in MHz\n", +"Z=5;\n", +"Vout=4; //in V\n", +"C=22; //in nF\n", +"Z=sqrt((2*%pi*N*w^2*C)/(4*Ip*K0*0.25))\n", +"printf('\n Zeta is = %0.0f' ,Z)\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/12-Optical_Systems_.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/12-Optical_Systems_.ipynb new file mode 100644 index 0000000..9efbcbb --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/12-Optical_Systems_.ipynb @@ -0,0 +1,1754 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Optical Systems " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.10: Calculate_chromatic_dispersio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 444\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=200; //in km\n", +"dL=1550; //in nm\n", +"R=10; //in Gb/s\n", +"Cd=17; //in ps/nm-km\n", +"w=0.1; //Assused bandwidth\n", +"Cd200=Cd*L;\n", +"printf('\n Dispersion by 200km ofc = %0.1f*10^3 ps/nm',Cd200/10^3);\n", +"TCd=w*Cd200;\n", +"printf('\n total chromatic dispersion = %0.2f*10^3 ps',TCd/10^3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.11: Calculate_dispersion_penalty.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 480\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=1.5; //in km\n", +"Ls=L/3; //in km\n", +"BwF=600; //in MHz\n", +"fb=1; //in Gbps\n", +"Bdlaser=0.71*BwF*L^-0.7*Ls^-0.25;\n", +"printf('Laser bandwidth is %0.0f MHz',Bdlaser); //Answer in book is approx\n", +"mD=0.85*(fb*10^3/Bdlaser)^2;\n", +"printf('\n Mean dispersion penalty is %0.1f dB',mD); //Answer in book is approx" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.12: Calculate_maximum_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 481\n", +"//given\n", +"clc;\n", +"clear all;\n", +"E=0.182; //from table 12-11 for 2dB dispersion penalty\n", +"fb=622; //in Mb/s\n", +"dl=4; //in nm\n", +"ofdisp=3; //in ps/km-nm\n", +"Dmax=E/(10^-6*fb*dl);\n", +"printf('\n Dmax is %0.1f ps/nm',Dmax); \n", +"Lmax=Dmax/ofdisp;\n", +"printf('\n Maximum link distance is %0.1f km',Lmax); \n", +"//Answer in the book is rounded" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.13: Calculate_the_maximum_length_of_optical_link.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 481\n", +"//given\n", +"clc;\n", +"clear all;\n", +"E=0.115; //from table 12-11 for 2dB dispersion penalty\n", +"fb=622; //in Mb/s\n", +"dl=4; //in nm\n", +"ofdisp=3; //in ps/km-nm\n", +"Dmax=E/(10^-6*fb*dl);\n", +"printf('\n Dmax is %0.1f ps/nm',Dmax); \n", +"Lmax=Dmax/ofdisp;\n", +"printf('\n Maximum link distance is %0.1f km',Lmax); \n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.14: Calculate_maximum_dispersion_mean_link_margin_sigma_link_margin.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 481\n", +"//given\n", +"clc;\n", +"clear all;\n", +"mc=0.4; //in dB\n", +"sc=0.0; //in dB\n", +"dmax=2.8; //in dB\n", +"mt=-4.9; //in dBm\n", +"st=0.5; //in dBm\n", +"mr=-38.1; //in dBm\n", +"sr=0.48; //in dBm\n", +"mco=0.35; //in dB\n", +"sco=0.20; //in dB\n", +"ms=0.2; //in dB\n", +"ss=0.1; //in dB\n", +"E=0.182; //from table 12-11 for 2dB dispersion penalty\n", +"fb=156; //in Mb/s\n", +"dl=4; //in nm\n", +"ofdisp=2.8; //in ps/nm-km\n", +"Nco=7;\n", +"mD=2;\n", +"sD=0.1;\n", +"sH=2;\n", +"sCR=0.25;\n", +"Ns=4;\n", +"mH=0;\n", +"mCR=0.5;\n", +"L=50;\n", +"Ls=10;\n", +"Dmax=E/(10^-6*fb*dl);\n", +"printf('\n Dmax is %0.0f ps/nm\n',Dmax); \n", +"Lmax=Dmax/ofdisp;\n", +"printf('\n Maximum link distance is %0.0f km\n',Lmax); \n", +"mM=mt-mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);\n", +"printf('\n Mean link margin is %0.2f dB\n',mM); \n", +"sM=sqrt(st^2+sr^2+sc^2*L*Ls+sco^2*Nco+sD^2*sH^2+sCR^2);\n", +"printf('\n Sigma link margin is %0.3f dB\n',sM); \n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.15: Compute_maximum_dispersion_and_nominal_distribution.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 483\n", +"//given\n", +"clc;\n", +"clear all;\n", +"E=0.115; \n", +"fb=622; //in Mb/s\n", +"dl=4; //in nm\n", +"mt=0.1; //in dBm\n", +"mr=-31.5; //in dBm\n", +"mc=0.41; //in dB\n", +"L=25;\n", +"mco=0.12; //in dB\n", +"Nco=2;\n", +"ms=0.15; //in dB\n", +"Ns=4;\n", +"mD=1;\n", +"mH=0;\n", +"mCR=0;\n", +"\n", +"sc=0.0; //in dB\n", +"st=-0.15; //in dBm\n", +"sr=0.3; //in dBm\n", +"sco=0.08; //in dB\n", +"ss=0.1; //in dB\n", +"ofdisp=2.8; //in ps/nm-km\n", +"sD=2;\n", +"sH=0;\n", +"sCR=0.0;\n", +"Ls=12;\n", +"\n", +"Dmax=E/(10^-6*fb*dl);\n", +"printf('\n Dmax is %0.2f ps/nm\n',Dmax); \n", +"Lmax=Dmax/ofdisp;\n", +"printf('\n Maximum link distance is %0.1f km\n',Lmax); //in book 4 is misprint for solving \n", +"mM=mt-mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);\n", +"printf('\n Mean link margin is %0.1f dB\n',mM); //wrong in book\n", +"L=60;\n", +"Ls=12; \n", +"sM=sqrt(st^2+sr^2+sc^2*L*Ls+sco^2*Nco+ss^2*Ns+sD^2*sH^2+sCR^2);\n", +"printf('\n Sigma link margin is %0.2f dB\n',sM); \n", +"spm=mM-2*sM-1;\n", +"printf('\n System power margin is %0.2f dB\n',spm); //answer is slighty difeerent due to mM=19.5\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.16: Calculate_maximum_dispersion_and_maximum_distance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 484\n", +"//given\n", +"clc;\n", +"clear all;\n", +"E=0.115; \n", +"fb=1062; //in Mb/s\n", +"dl=6; //in nm\n", +"mt=-8; //in dBm\n", +"mr=28.7; //in dBm\n", +"mc=0.4; //in dB\n", +"L=5;\n", +"mco=0.12; //in dB\n", +"Nco=8;\n", +"ms=0.2; //in dB\n", +"Ns=4;\n", +"mD=1;\n", +"mH=0;\n", +"mCR=1;\n", +"\n", +"sc=0.0; //in dB\n", +"st=0.6; //in dBm\n", +"sr=0.75; //in dBm\n", +"sco=0.08; //in dB\n", +"ss=0.1; //in dB\n", +"ofdisp=2.8; //in ps/nm-km\n", +"sD=2;\n", +"sH=0;\n", +"sCR=0.25;\n", +"Ls=12;\n", +"\n", +"Dmax=round(E/(10^-6*fb*dl)); //taking to nearest integer in ps/nm\n", +"printf('\n Dmax is %0.0f ps/nm\n',Dmax); \n", +"Lmax=Dmax/ofdisp;\n", +"printf('\n Maximum link distance is %0.2f km\n',Lmax); \n", +"mM=mt+mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);\n", +"printf('\n Mean link margin is %0.1f dB\n',mM);\n", +"L=60;\n", +"Ls=12; \n", +"sM=sqrt(st^2+sr^2+sc^2*L*Ls+sco^2*Nco+ss^2*Ns+sD^2*sH^2+sCR^2);\n", +"printf('\n Sigma link margin is %0.2f dB\n',sM); \n", +"mM=round(mM*10)/10; //talking only to 1 decimal place and rounding of other values\n", +"spm=mM-2*sM-1;\n", +"printf('\n mM-2*sM = %0.2f\n',mM-2*sM);\n", +"printf('\n System power margin is %0.2f dB\n',spm); //answer is slighty diferent due to m\sM=1.03\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.17: Calculate_the_CSO_distortio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 486\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Ncso=50;\n", +"a=3.6*10^-3;\n", +"m=0.05;\n", +"CSO=10*log10(Ncso*(a*m)^2);\n", +"printf('\n CSO distortion for 50 channel optical system = %0.1f dB\n',CSO); " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.18: Calculate_the_required_AM_modulatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 486\n", +"//given\n", +"clc;\n", +"clear all;\n", +"CSO=-59.8; //in dB\n", +"y=10^(CSO/10);\n", +"mprintf('AM modulation depth (m) = %e\n',y);\n", +"asq=3.6*10^-3;\n", +"Ncso=50;\n", +"msq=(y/Ncso/asq/asq);\n", +"mprintf('\n m^2 = %e\n',msq);\n", +"printf('\n Decrease of AM modulation depth decrease the CSO distortion by = %0.0f percent',sqrt(msq)*100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.19: Compute_the_CTO_distortio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 486\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Ncto=50;\n", +"b=1.07*10^-2;\n", +"m=0.05;\n", +"CTO=10*log10(Ncto*(1.5*b*m)^2);\n", +"printf('\n CTO distortion for 50 channel optical system = %0.1f dB\n',CTO); \n", +"//Answer in the book is misprinted\n", +"//The solution in the book is calculated without multipication of Ncto" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1: Compute_power_margi.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 431\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Pt=10; //in microW\n", +"Pr=1; //in microW\n", +"PtdBm=10*log10(Pt*10^-6/10^-3) //in dBm\n", +"printf('\n Transmitter Power = %0.0f dBm',PtdBm);\n", +"PrdBm=10*log10(Pr*10^-6/10^-3) //in dBm\n", +"printf('\n Receiver Power = %0.0f dBm',PrdBm);\n", +"Pm=PtdBm-PrdBm;\n", +"printf('\n Power margin= %0.0f dBm',Pm); //misprint in book" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.20: Calculate_the_CSO_and_CTO.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 487\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Ncso=80;\n", +"a=2.43*10^-3;\n", +"b=4.65*10^-3;\n", +"m=0.05;\n", +"//Part (i)\n", +"CSO=10*log10(Ncso*(a*m)^2);\n", +"printf('\n CSO distortion for 50 channel optical system for m = 5 percent \n CSOdB = %0.1f dB\n',CSO); \n", +"//Part (ii)\n", +"CTO=10*log10(Ncso*(1.5*b*m)^2);\n", +"printf('\n CTO distortion for 50 channel optical system for m = 5 percent \n CTOdB = %0.1f dB\n',CTO);\n", +"//Part (iii)\n", +"m=0.03;\n", +"\n", +"CSO=10*log10(Ncso*(a*m)^2); \n", +"// Value of a in the book is considered 2.4 instead of 2.43\n", +"printf('\n CSO distortion for 50 channel optical system for m = 3 percent \n CSOdB = %0.1f dB\n',CSO); \n", +"\n", +"//Part (iv)\n", +"CTO=10*log10(Ncso*(1.5*b*m)^2);\n", +"printf('\n CTO distortion for 50 channel optical system for m = 3 percent \n CTOdB = %0.1f dB\n',CTO);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.21: Calculate_the_CNR.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 487\n", +"//given\n", +"clc;\n", +"clear all;\n", +"RIN=-150; //in dB\n", +"B=4*10^6;\n", +"m=0.04;\n", +"CNR=10*log10(m^2/(2*10^-15*B));\n", +"printf('\n CNR = %0.0f dB',CNR);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.22: Calculate_the_RIN.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 12\n", +"//page no 488\n", +"//given\n", +"clc;\n", +"clear all;\n", +"CNR=50; //in dB\n", +"Bch=4*10^6;\n", +"m=0.03;\n", +"RIN=m^2/2/Bch/10^(CNR/10)\n", +"mprintf('\n RIN = %e ',RIN);\n", +"//Miscalculated answer in the book\n", +"RINdB=10*log10(RIN);\n", +"printf('\nRIN in Db is %.2f',RINdB)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.23: Calculate_the_required_optical_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 490\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Ipd=0.15; //in mA\n", +"n=0.75;\n", +"e=1.6*10^-19; //electron charge\n", +"hv=1.55*10^-19;\n", +"Pin=hv*Ipd/n/e;\n", +"printf('\n Pin = %0.6f mW',Pin); //Result\n", +"//answer in book is misprint" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.24: Calculate_the_percentage_of_optical_power_reflected_back.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 492\n", +"//given\n", +"clc;\n", +"clear all;\n", +"OBR=-40; //in dB\n", +"//y=Pref/Pin\n", +"y=10^(OBR/10);\n", +"printf('\n Prefl = %0.2f percent Pin',y*100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.25: Calculate_the_output_voltage_of_an_optical_receiver.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 493\n", +"//given\n", +"clc;\n", +"clear all;\n", +"R=800; //in V/W\n", +"Pin=1.5; //in mW\n", +"m=0.04;\n", +"Voutp=R*Pin*m;\n", +"printf('\n Vout(peak) = %0.0f mV',Voutp);\n", +"Vavg=Voutp/sqrt(2);\n", +"printf('\n Vavg = %0.1f mV',Vavg);\n", +"//in dB\n", +"Vavgd=20*log10(Vavg*10^-3);\n", +"printf('\n Vavg(in dBmV) = %0.1f ',Vavgd);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.26: Determine_the_optical_receiver_responsivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 494\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Voutp=20; //in dB\n", +"Pin=1.2; //in mW\n", +"m=0.035;\n", +"Vavg=10^(Voutp/20); //in \n", +"R=Vavg*sqrt(2)/Pin/m;\n", +"printf('\n R = %0.1f V/W',R);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.27: Calculate_the_modulation_depth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 494\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Voutp=28; //in dB\n", +"Pin=1; //in mW\n", +"R=800; //in V/W\n", +"Vavg=10^(Voutp/20); //in \n", +"m=Vavg*sqrt(2)/Pin/R;\n", +"printf('\n The modulation depth ,m = %0.1f percent',m*100);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.28: Calculate_the_CNR.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 495\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Ipd=1.2; //in mA\n", +"m=0.04; \n", +"RINd=-160; //in dB/Hz\n", +"e=1.6*10^-19; \n", +"nth=8; //in pA/Hz\n", +"BW=4; //in MHz\n", +"Rin=10^(RINd/10); //in \n", +"\n", +"CNR=[0.5*(m*Ipd*10^-3)^2]/[(2*e*Ipd*10^-3)+(Rin*Ipd*10^-3)^2+((nth*10^-12)^2)*BW/10^6];\n", +"printf('Value of CNR=%e',CNR)\n", +"CNRdB=10*log10(CNR)\n", +"printf('\nValue of CNR in dB=%.2f dB',CNRdB)\n", +"//Answer in the book is misprinted or wrong calculation performed in the book" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.29: Total_fiber_span_attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 509\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L1=40; //in km\n", +"L2=100; //in km\n", +"A=0.2; //in dB/Km\n", +"TFA1=A*L1;\n", +"\n", +"printf('\n Total fibre span attenuation %0.0f dB\n',TFA1);\n", +"TFA2=A*L2;\n", +"printf('\n Total fibre span attenuation %0.0f dB\n',TFA2);\n", +"nsd=TFA2-TFA1;\n", +"printf('\n Noise spectral density = %0.0f dB ',nsd);\n", +"nsd_abs=10^(nsd/10)\n", +"printf('\n\n Absolute value of noise spectral density = %0.0f dB ',nsd_abs);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2: Compute_power_margi.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 431\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Pt=25; //in microW\n", +"Prd=15; //in dBm\n", +"Ptd=10*log10(Pt*10^-6/10^-3) //in dBm\n", +"printf('\n Transmitter Power = %0.0f dBm',Ptd);\n", +"Pm=Ptd-Prd;\n", +"printf('\n Power margin= %0.0f dBm',Pm);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.30: Calculate_the_SNR.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 12\n", +"//page no 510\n", +"//given\n", +"clc;\n", +"clear ;\n", +"P1=2.75; //in mW\n", +"NFd=5; //in dB\n", +"bw=5; //in GHz\n", +"G=10; //in dB\n", +"hv=1.6*10^-19; //photon energy in J\n", +"N=1; //no of amplifiers\n", +"NF=10^(NFd/10); //amplifier noise figure\n", +"SNR=10*log10(P1*10^-3/[G*hv*bw*10^9*N*NF]); //signal to nois eratio\n", +"printf('\n Spectral Noise density = %0.0f dB ',SNR);//result\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.31: Calculate_the_optical_power_in_fiber.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 510\n", +"//given\n", +"clc;\n", +"clear all;\n", +"SNRdB=40; //in dB\n", +"NFd=6; //in dB\n", +"bw=4; //in GHz\n", +"Gd=8; //in dB\n", +"hv=1.6*10^-19; //photon energy in J\n", +"N=8; //no of amplifiers\n", +"SNR=10^(SNRdB/10);\n", +"NF=10^(NFd/10); //amplifier noise figure\n", +"G=10^(Gd/10); //amplifer gain\n", +"P1=10*(SNR/10)*[G*hv*bw*10^9*N*NF]/10^-3; //optical power launched into fibre\n", +"printf('\n Optical power required , Pl = %0.1f mW ',P1); //Result\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.32: Compute_the_transmission_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 12\n", +"//page no 518\n", +"//given\n", +"clc;\n", +"clear all ;\n", +"l=1550; //wavelength in nm\n", +"fb=10; //system bit rate Gb/s\n", +"Df=17; //fiber dispersion in ps/nm-km\n", +"L=10^5/Df/fb^2; //fiber length in km \n", +"printf('\n Transmission length is %0.1f km',L);\n", +"fb2=2.5; //system bit rate Gb/s\n", +"disp('for fb=2.5 Gb/s')\n", +"L2=10^5/Df/fb2^2; //fiber length in km \n", +"printf(' Transmission length is %0.0f km',L2);//result misprint in book" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.33: Compute_the_maximum_bit_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 518\n", +"//given\n", +"clc;\n", +"clear all;\n", +"lembda=1550; //wavelength in nm\n", +"Df=17; //fiber dispersion in ps/nm-km\n", +"L=80 //fiber length in km \n", +"fb=sqrt(10^5/Df/L)\n", +"printf('\n Maximum bit rate fb = %.1f Mb/s',fb);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.34: Compute_the_solition_characteristic_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 530\n", +"//given\n", +"clc;\n", +"clear all;\n", +"D=0.2; //dispersion constant in ps/nm/km\n", +"Tfwhm=18; //ps\n", +"Zs=0.25*Tfwhm^2/D; // Characteristic length\n", +"printf('\n Zs = %0.0f km',Zs); //answer in book is miscalculated\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.35: Determine_maximum_dispersion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 530\n", +"//given\n", +"clc;\n", +"clear all;\n", +"lembda=1550; //wavelength in nm\n", +"c=3*10^5; //speed of light in km/s\n", +"Zs=600; //in km\n", +"Tfwhm=20; //in ps\n", +"D=1/1.763^2*[2*%pi*c*Tfwhm^2/(lembda^2*Zs)]; //dispersion constant\n", +"printf('\n dispersion constant, D = %0.2f ps/nm/km',D); //result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.36: Calculate_the_solition_pulse_width.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 12\n", +"//page no 530\n", +"//given\n", +"clc;\n", +"clear all;\n", +"l=1557; //wavelength in nm\n", +"c=3*10^5; //speed of light in km/s\n", +"Zs=550; //in km\n", +"D=0.25; //in ps/nm/km\n", +"Tfwhm=sqrt(1.763^2*l^2*D*Zs/(2*%pi*c));//Soliton pulse width \n", +"printf('\n Tfwhm = %0.0f ps',Tfwhm); //Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.37: Calculate_the_solition_peak_pulse.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 531\n", +"//given\n", +"clc;\n", +"clear ;\n", +"Aeff=55; //in sq micrometer\n", +"l=1557; //wavelength in nm\n", +"c=3*10^5; //speed of light in km/s\n", +"n2=2.6*10^-16; //in cm^2/W\n", +"D=0.20; //Dispersion constant in ps/nm/km\n", +"Tfwhm=30; //in ps\n", +"Zs=[2*%pi*c*Tfwhm^2/l^2/D]/(1.763)^2 ;//charecteristic length \n", +"printf('\n Zs = %0.0f km',Zs); //result \n", +"Ps=(Aeff*10^-12*l*10^-9)/(2*%pi*n2*10^-4*Zs*10^3);//Peak pulse power\n", +"//Miscalculation in the book\n", +"printf('\n Ps = %0.2f mW',Ps*1000); //Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.38: Compute_the_standard_deviation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//Chapter 12\n", +"//page no 533\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Z=10; //in mm\n", +"Tfwhm=22; //in ps\n", +"D=0.5; //ps/nm/km\n", +"Aeff=55; //in microm^2\n", +"A=0.05; //in km^-1\n", +"nsp=1.5; //spontaneous emission \n", +"F=2; //amplifier noise\n", +"s=3.6*10^3*nsp*F*A*D*Z^3/(Aeff*Tfwhm);\n", +"printf('\n sigma = %0.0f ps',s); //Result\n", +"\n", +"//answer in book is misprint" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.39: Calculate_the_system_BER.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 533\n", +"//given\n", +"clc;\n", +"clear ;\n", +"Q1=4; //quality factor\n", +"Q2=6; //quality factor\n", +"BER1=[2*%pi*(Q1^2+2)]^-0.5*exp(-Q1*Q1/2); \n", +"BER2=[2*%pi*(Q2^2+2)]^-0.5*exp(-Q2*Q2/2);\n", +"printf('\n For Q=4 ,BER = %0.0f*10^-5 ',BER1*10^5); //Result\n", +"printf('\n For Q=6 ,BER = %0.1f*10^-10 ',BER2*10^10); //Result\n", +"//Answer second is misprinted in the book\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3: Calculate_level_of_additional_power_launched.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 432\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Pt1=-18; //in dBm for 50/125 micron fiber\n", +"Pt2=-10; //in dBm for 100/125 micron fiber\n", +"Pd=Pt1-Pt2;\n", +"printf('\n Additional Power = %0.0f dBm',Pd);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.40: Compute_the_standard_deviation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 534\n", +"//given\n", +"clc;\n", +"clear all;\n", +"D=0.5; //Dispersion constant ps/nm/km\n", +"Ts=22; //Pulse width in ps\n", +"fb=10; //system transmission rate in Gb/s\n", +"Z1=1; //System total length Mm\n", +"Z2=10; //System total length Mm\n", +"sa1=8.6*D*D*Z1*Z1*sqrt(fb-0.99)/22/2; //standard deviation based on accoustic effect\n", +"sa2=8.6*D*D*Z2*Z2*sqrt(fb-0.99)/22/2; //standard deviation based on accoustic effect\n", +"printf('\n For Z=1000km ,sigma acoustic = %0.2f ps ',sa1); //Result\n", +"printf('\n For Z=10000km ,sigma acoustic = %0.0f ps ',sa2); //Result\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.41: Calculate_the_collision_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 535\n", +"//given\n", +"clc;\n", +"clear all;\n", +"D=0.45; //dispersion coefficient in ps/nm/km\n", +"Ts=22; //Pulse width in ps\n", +"l=0.5; //length in nm\n", +"Lcollision=2*Ts/l/D; //collision length in km\n", +"printf('\n Lcollision = %0.1f km ',Lcollision); //Result\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.42: Calculate_the_half_channel_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 537\n", +"//given\n", +"clc;\n", +"clear all;\n", +"f=70; //Maximum frequencyshift in Ghz\n", +"Ts=22; //Pulse width in ps\n", +"CS=1.783*f*10^9*Ts*10^-12; //half channel seperation \n", +"printf('\n The half channel seperation %0.2f ',CS);\n", +"df=0.105/f/10^9/Ts/Ts/10^-24; //maximum frequency shift\n", +"printf('\n The maximum frequency shift %0.0f GHz',df/10^9);\n", +"dt=0.1786/f/10^9/f/10^9/Ts/10^-12; //time displacement\n", +"printf('\n The time displacement %0.2f ps',dt*10^12);\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.43: Calculate_the_minimum_number_of_soliton.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 538\n", +"//given\n", +"clc;\n", +"clear ;\n", +"M=1; \n", +"N=1; //no of collision \n", +"S1=4; //soliton colllision \n", +"S2=5; //soliton colllision \n", +"Nc=S1*S1/4*[M*S1/2-M+N]; //minimum no of collision\n", +"printf('\n Ncollision for S=4,is %0.0f',Nc);\n", +"Nc2=(S2*S2-1)/4*[M*S2/2-M+N]; //minimum no of collision\n", +"printf('\n Ncollision for S=5,is %0.0f',Nc2);\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.44: Compute_the_maximum_number_of_soliton.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 539\n", +"//given\n", +"clc;\n", +"clear;\n", +"S=4;\n", +"n=5;\n", +"printf('\n Maximum number of solition Collisions\n');\n", +"for M = 1:n\n", +"N=M;\n", +"Nc=S*[M*S*S/3+S*(N/2-M)-N/2+2*M/3]; //minimum no of collision\n", +"printf('\n M=%0.0f N=%0.0f S=%0.0f ,is %0.0f',M,N,S,Nc);//result\n", +"\n", +" \n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.45: Compute_the_number_of_collision.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 539\n", +"//given\n", +"clc;\n", +"clear all;\n", +"M=1; //number of solition Collisions\n", +"N=1; // number of solition Collisions\n", +"x=2; \n", +"y=1/2;\n", +"p=3;\n", +"p2=4;\n", +"Tb=100; //ps\n", +"l=1; //difference in wavelength in nm \n", +"D=7*10^-2; //ps/nm^2*km\n", +"Zr=y*y*(Tb/l/l/D); //regeration spacing in km\n", +"printf('\n Zr = %0.0f km\n',Zr);\n", +"P=(p-1)*N+(p-2)*(p-1)*M/2;\n", +"printf('\n P(%0.0f) =%0.0f',p,P); //result number of Collisions\n", +"P2=(p2-1)*N+(p2-2)*(p2-1)*M/2; \n", +"printf('\n P(%0.0f) =%0.0f',p2,P2); //result number of Collisions" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.46: Calculate_the_channel_spacing.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 12\n", +"//page no 540\n", +"//exa 12_46\n", +"//given\n", +"clear;\n", +"clc;\n", +"Tb=100; //bit period in ps\n", +"dZ=0.4; //in ps/nm/km\n", +"Zr=150; //Modulator spacing in km\n", +"Ta=Tb/(dZ*Zr); //channel spacing in nm\n", +"printf('\n Channel spacing %0.1f nm',Ta); //result\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.47: Compute_the_bit_period.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 12\n", +"//page no 540\n", +"//exa 12_47\n", +"//given\n", +"clear;\n", +"clc;\n", +"Zr=200; //Modulator spacing in km\n", +"D=0.6; //in ps/nm/km\n", +"l=2; //in nm\n", +"Tb=l*(Zr*D); //bit period in ps\n", +"printf('\n Bit period Tb = %0.0f ps',Tb);//result\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.48: Calculate_the_maximum_modulator_spacing.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 12\n", +"//page no 540\n", +"//exa 12_48\n", +"//given\n", +"clear;\n", +"clc;\n", +"D=0.5; //ps/nm-km\n", +"Tb=80; //bit period in ps\n", +"l=1.5; //in nm\n", +"Zr=Tb/(D*l); //Modulator spacing in km\n", +"printf('\n Maximum modulator spacing Zr = %0.2f km',Zr);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.49: Calculate_the_length_of_dispersion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 12\n", +"//page no 541\n", +"//exa 12_49\n", +"//given\n", +"clear;\n", +"clc;\n", +"Zd=100; //in km\n", +"Do=0.07; //in ps/nm^2\n", +"D1=-0.3; //in ps/nm^2\n", +"Ldsf=(Zd*Do)/(Do-D1); //length of dispersion compensation fiber in km\n", +"printf('\n Length of Dispersion compensation fiber, Ldsf = %0.0f km',Ldsf);//Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4: Compute_link_power_budget.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 432\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Plb=10; //in dBm for 50/125 micron fiber\n", +"Ps=3; //in dBm for safety margin\n", +"Prs=-30; //in dBm for receiver sensivity\n", +"Pt=Plb+Ps+Prs;\n", +"printf('\n Link power budget = %0.0f dBm',Pt);\n", +"Ptw=10^(Pt/10)*1000;\n", +"printf('\n Transmitter Power = %0.0f microW',Ptw);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.50: Calculate_the_collision_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 12\n", +"//page no 542\n", +"//ex 12_50\n", +"//given\n", +"clear;\n", +"clc;\n", +"m=3;\n", +"n=1;\n", +"Tb=100; //ps\n", +"l=1; //nm\n", +"D=0.07; //ps/nm^2*km\n", +"lmn=1; //nm\n", +"lmo=2; //nm\n", +"Do=0.1; //ps/nm-km\n", +"Lc=4*Tb/[5*D*lmn*(lmn+2*lmo)];//Collision length in km\n", +"printf('\n Collision length without dispersion slope compensation = %0.1f km\n',Lc);//result\n", +"Lc2=2*Tb/[5*Do*lmn];//Collision length in km\n", +"printf('\n Collision length with dispersion slope compensation = %0.0f km',Lc2);//result\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.51: Compute_the_soliton_collision_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 12\n", +"//page no 542\n", +"//ex 12_51\n", +"//given\n", +"clear;\n", +"clc;\n", +"Zr=200; //in km\n", +"S=4;\n", +"Ltot1=2*Zr*(S-1); //total solition collion length in km\n", +"printf('\n Total solition Collisions length With DSC ,Ltotal = %0.0f km\n',Ltot1);//Result\n", +"Ltot2=(2/5)*Zr*(S-1); //total solition collion length in km\n", +"printf('\n Total solition Collisions length With non-DSC ,Ltotal = %0.0f km\n',Ltot2);//result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5: Calculate_PIN_diode_required_operating_power_and_total_power_budget.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"//Chapter 12\n", +"//page no 433\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Is=0.5; //in A/W\n", +"Ir=1.5; //in microA\n", +"Xw=Ir/Is;\n", +"printf('\n Electrical power required by PIN diode is = %0.0f microW',Xw);\n", +"Pxw=10*log10(Xw/10^3);\n", +"printf('\n Therefore, Electrical power required by PIN diode is = %0.1f dBm',Pxw);\n", +"\n", +"Ps=3; //in dB for safety margin\n", +"Tp=5; //in dB\n", +"Pt=Tp+Ps+Pxw;\n", +"printf('\n Total Power Required = %0.1f dBm',Pt);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6: Calculate_maximum_link_distance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 442\n", +"//given\n", +"clc;\n", +"clear all;\n", +"fb=1.25; //in Gb/s\n", +"D=17; //in ps/nm.km\n", +"dL=0.5; //in nm\n", +"Lmax=1/fb/10^9/dL/10^-9/D/10^-12*10^-9;\n", +"printf('\n Maximum Link span,Lmax = %0.0f km',Lmax);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7: Compute_chromatic_dispersio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 442\n", +"//given\n", +"clc;\n", +"clear all;\n", +"fb=2.5; //in Gb/s\n", +"Lmax=50; //in km\n", +"dL=0.4; //in nm\n", +"D=1/fb/10^9/dL/10^-9/Lmax/10^-12*10^-9;\n", +"printf('\n Maximum allowable dispersion,D = %0.0f ps/nm-km',D);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.8: Compute_maximum_bit_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 443\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Lmax=60; //in km\n", +"D=17; //in ps/nm.km\n", +"dL=0.5; //in nm\n", +"fb=1/Lmax/10^9/dL/10^-9/D/10^-12*10^-9;\n", +"printf('\n Maximum system bit rate,fb = %0.2f Gb/s',fb);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9: Compute_Maximum_link_span.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 12\n", +"//page no 443\n", +"//given\n", +"clc;\n", +"clear all;\n", +"c1=4; //channel1\n", +"c2=8; //channel2\n", +"c3=16; //channel3\n", +"fb=2.5; //in Gb/s\n", +"Lmax1=6.1*10^3/(c1*fb)^2;\n", +"printf('\n Maximum Link span for %0.0f channel, Lmax = %0.0f km \n',c1,Lmax1);\n", +"Lmax2=6.1*10^3/(c2*fb)^2;\n", +"printf('\n Maximum Link span for %0.0f channel, Lmax = %0.2f km \n',c2,Lmax2);\n", +"Lmax3=6.1*10^3/(c3*fb)^2;\n", +"printf('\n Maximum Link span for %0.0f channel, Lmax = %0.1f km \n',c3,Lmax3);" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/13-Networks.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/13-Networks.ipynb new file mode 100644 index 0000000..037186b --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/13-Networks.ipynb @@ -0,0 +1,154 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Networks" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.1: Calculate_R9_R7_R8_C4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 13\n", +"//page no 568\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Vcc=5; //in V\n", +"Vf=1.5; //in V\n", +"If=60; //in mA\n", +"B=3.97;\n", +"N=3;\n", +"R9=(Vcc-Vf)*(B+1)/If/10^-3;\n", +"printf('\n R9 = %0.0f ohm\n',R9);\n", +"R7=R9/2/B-3/N;\n", +"printf('\n R7 = %0.1f ohm\n',R7);\n", +"R8=R9/2/B;\n", +"printf('\n R8 = %0.1f ohm\n',R8);\n", +"C4=2*10^-9/R8;\n", +"printf('\n C4 = %0.0f pF',C4*10^12);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.2: Calculate_Led_If_R3_C4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 13\n", +"//page no 569\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Vu3=1.24; //in V\n", +"Vbeq3=0.7; //in V\n", +"Vbeq4=0.7; //in V\n", +"R5=17.5; //in Ohm\n", +"R6=17.5; //in Ohm\n", +"Voh=5; //in V\n", +"Vol=0; //in V\n", +"If=(Vu3-Vbeq3)/R5+(Vu3-Vbeq4)/R6;\n", +"printf('\n If= %0.1f mA\n',If*1000);\n", +"R3=(Voh-Vol)/If;\n", +"printf('\n R3= %0.0f ohm\n',R3);\n", +"C4=2*10^-9/R3;\n", +"printf('\n C4= %0.0f pF\n',C4*10^12);\n", +"//Chapter 13\n", +"//page no 581\n", +"//given\n", +"disp('Page number 581 again Example 13-2 (numbering mistake)')\n", +"Er=4.9;\n", +"h=5; //in mils\n", +"w=10; //in mils\n", +"t=0.5; //in mils\n", +"Z=60/sqrt(0.475*Er+0.67)*log(4*h/0.67/(0.8*w+t));\n", +"printf('\n Z = %0.1f ohm\n',Z);\n", +"tpd=1.017*sqrt(0.475*Er+0.67);\n", +"printf('\n tpd = %0.2f ns/ft\n',tpd);\n", +"Tpd=tpd*1000/12; //converted into ps/in\n", +"printf('\n tpd = %0.2f ps/in\n',Tpd);\n", +"Co=Tpd/Z;\n", +"printf('\n Co = %0.1f pF/in\n',Co);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.3: Characteristic_impedance_and_propagation_delay.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 13\n", +"//page no 583\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Er=4.7;\n", +"b=10; //in mils\n", +"w=4; //in mils\n", +"t=0.5; //in mils\n", +"Z=60/sqrt(Er)*log(4*b/0.67/%pi/(0.8*w+t));\n", +"printf('\n Z = %0.2f ohm\n',Z);\n", +"tpd=1.017*sqrt(Er);\n", +"printf('\n tpd = %0.1f ns/ft\n',tpd);\n", +"Tpd=tpd*1000/12; //converted into ps/in\n", +"printf('\n Also,tpd = %0.0f ps/in\n',Tpd);//answer is slightly different due to rounding off " + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/2-Fundamental_of_Semi_Conductor_Theory_.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/2-Fundamental_of_Semi_Conductor_Theory_.ipynb new file mode 100644 index 0000000..4a4aa12 --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/2-Fundamental_of_Semi_Conductor_Theory_.ipynb @@ -0,0 +1,337 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Fundamental of Semi Conductor Theory " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: maximum_number_of_electron.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2\n", +"//page no 43\n", +"//given\n", +"clc;\n", +"clear ;\n", +"n=1;\n", +"Ne=2*n^2;\n", +"printf('\n Maximum number of electron in 1st shell is %.0f\n ',Ne);//Result\n", +"n2=2;// shell no\n", +"Ne2=2*n2^2;// shell no\n", +"printf('\n Maximum number of electron in 2nd shell is %.0f ',Ne2);//Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Find_band_gap_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2\n", +"//page no 45\n", +"//given\n", +"clc;\n", +"clear ;\n", +"//Given for silicon for temp 0-400K\n", +"Eg0_Si=1.17; //in eV\n", +"A=4.73*10^-4; //in eV/K\n", +"B=636;\n", +"for i=1:8\n", +"T=50*i; //degree/Kelvin\n", +"Eg_Si=Eg0_Si-(A*T^2)/(B+T);\n", +"printf('\n Band gap energy of silicon at %.0f K is %.3f eV ',T,Eg_Si);//result\n", +"end\n", +"//Given for Germanium for temp 0-400K\n", +"disp('');\n", +"Eg0_Ge=0.7437; //in eV\n", +"A_Ge=4.774*10^-4; //in eV/K\n", +"B_Ge=235;\n", +"for i=1:8\n", +"T=50*i; //degree/Kelvin\n", +"Eg_Ge=Eg0_Ge-(A_Ge*T^2)/(B_Ge+T);\n", +"printf('\n Band gap energy of germanium at %.0f K is %.3f eV ',T,Eg_Ge);//result\n", +"end\n", +"\n", +"//Given for GaAs for temp 0-400K\n", +"disp('');\n", +"Eg0_Ga=1.519; //in eV\n", +"A_Ga=5.405*10^-4; //in eV/K\n", +"B_Ga=204;\n", +"for i=1:8\n", +"T=50*i; //degree/Kelvin\n", +"Eg_Ga=Eg0_Ga-(A_Ga*T^2)/(B_Ga+T);\n", +"printf('\n Band gap energy of GaAs at %.0f K is %.3f eV ',T,Eg_Ga);//result\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Find_carrier_velocity_and_current_density.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2\n", +"//page no 52\n", +"//given\n", +"clc;\n", +"clear ;\n", +"l=10*10^-3; //in m\n", +"w=2*10^-3; //in m\n", +"h=2*10^-3; //in m\n", +"V=12; //in V\n", +"u_n=0.14; //in m*m/V*s\n", +"u_p=0.05; //in m*m/V*s\n", +"q_n=1.6*10^-19; //in Columbs\n", +"q_p=1.6*10^-19; //in Columbs\n", +"p_i=2.4*10^19; //in columbs\n", +"n_i=2.4*10^19; //in columbs\n", +"E=V/l;\n", +"v_n=E*u_n;\n", +"v_p=E*u_p;\n", +"J_n=n_i*q_n*v_n;\n", +"J_p=p_i*q_p*v_p;\n", +"J=J_n+J_p;\n", +"printf('\n Electron velocity :vn is %.0f m/s ',v_n);//result\n", +"printf('\n Hole velocity :vp is %.3f km/s ',v_p/1000); // result\n", +"printf('\n Current density : Jn %0.2f A/m^2',J); //Result\n", +"A=88*10^-6;\n", +"I_T=J*A;\n", +"printf('\n Total current :I_T is %.0f mA ',I_T*1000); //Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Find_electron_density_and_type_of_semi_conductor_and_extrensic_semiconductivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2\n", +"//page no 53\n", +"//given\n", +"clc;\n", +"clear ;\n", +"n_i=2*10^17; //electron/m*m*m\n", +"p=5.7*10^20; //holes/m*m*m\n", +"u_n=0.14; //in m*m/V*s\n", +"u_p=0.05; //in m*m/V*s\n", +"q_n=1.6*10^-19; //in Columbs\n", +"q_p=1.6*10^-19; //in Columbs\n", +"n=(n_i)^2/p;\n", +"mprintf('\n Electron :n is %e electrons ',n);//result\n", +"n=7*10^13\n", +"P=(n*u_n*q_n)+(p*u_p*q_p);\n", +"printf('\n Conductivity :P is %.2f S/m ',P);// result\n", +"// answer misprinted" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Find_barrier_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2\n", +"//page no 55\n", +"//given\n", +"clc;\n", +"clear ;\n", +"NA=10^22; //acceptors/m*m*m\n", +"ND=1.2*10^21; //donors/m*m*m\n", +"T=298; //in Kelvin\n", +"k=1.38*10^-23; //Boltzman Constant in J/K\n", +"q=1.6*10^-19; // charge of electron in C\n", +"Vt=k*T/q; //thermal voltage in V\n", +"printf('\n VT is %0.1f mV \n',Vt*1000); // result\n", +"n_i=2.4*10^17; //carrier/m^3 for silicon \n", +"VB=Vt*log(NA*ND/n_i^2);// barrier voltage in V\n", +"printf('\n Barrier Voltage of Silicon VB is %0.0f mV ',VB*1000); //result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: Calculate_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 2\n", +"//page no 56\n", +"//given\n", +"clc;\n", +"clear ;\n", +"Is=0.12; //in pAmp\n", +"V=0.6; //in V\n", +"T=293; //in Kelvin\n", +"k=1.38*10^-23; //Boltzmann's Constant in J/K\n", +"q=1.6*10^-19; // charge of electron in C\n", +"Vt=k*T/q; //thermal voltage\n", +"printf('\n VT(20 deg Cel) is %0.5f V \n',Vt);//result in book is misprint\n", +"T1=373; //in Kelvin\n", +"n=1.25;\n", +"Vt1=k*T1/q; //thermal voltage\n", +"printf('\n VT(100 deg Cel) is %0.5f V \n',Vt1);\n", +"I=Is*(exp(V/(n*Vt1))-1); //forward biasing current in mircoA\n", +"printf('\n I(100 deg Cel) is %0.2f microA \n',I/10^6);//result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: compute_saturation_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2\n", +"//page no 56\n", +"//given\n", +"clc;\n", +"clear ;\n", +"Is=100; //in nAmp \n", +"Ts=100; //in Kelvin\n", +"I_s=Is*10^-9*2^(Ts/10); //I_s will be in nm \n", +"printf('\n I(100 deg Cel) is %0.2f microA \n',I_s*10^6); //converted to microA from nm\n", +"// wrong calculation in the book" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8: calculate_radiative_minority.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 2\n", +"//page no 59\n", +"//given\n", +"clc;\n", +"clear ;\n", +"Br_Si=1.79*10^-15; //Recombination coefficient for Si\n", +"Br_Ge=5.25*10^-14; //Recombination coefficient for Ge\n", +"Br_GeAs=7.21*10^-10; //Recombination coefficient for GeAs\n", +"Br_InAs=8.5*10^-11; //Recombination coefficient for InAs\n", +"P_N=2*10^20; //per cubic cm\n", +"T_Ge=1/Br_Ge/P_N;//radiative minority carrier lifetime\n", +"printf('\n T_Ge is %0.3f micro-s \n',T_Ge/10^-6);//result\n", +"T_Si=1/Br_Si/P_N;//radiative minority carrier lifetime\n", +"printf('\n T_Si is %0.2f micro-s \n',T_Si/10^-6);//result\n", +"T_InAs=1/Br_InAs/P_N;//radiative minority carrier lifetime\n", +"printf('\n T_InAs is %0.0f ps \n',T_InAs/10^-12);//result\n", +"T_GeAs=1/Br_GeAs/P_N;//radiative minority carrier lifetime\n", +"printf('\n T_GeAs is %0.0f ps \n',T_GeAs/10^-12);//result\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/3-Optical_Sources_.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/3-Optical_Sources_.ipynb new file mode 100644 index 0000000..aa895e7 --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/3-Optical_Sources_.ipynb @@ -0,0 +1,286 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Optical Sources " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: Determine_the_power_coupled_into_fiber.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 3\n", +"//page no 67\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Pin=1; //microW\n", +"W=15; //in degree\n", +"NA=sin(W*%pi/180);\n", +"NAA=0.26; //NA=0.2588190 which is rounded off\n", +"C_c=(NAA)^2;\n", +"printf('\n Coupling coefficient is %0.4f \n',C_c);\n", +"Pf=C_c*Pin;\n", +"printf('\n Power coupled into fiber %0.1f nW\n',Pf*1000);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: Power_Coupled_into_fiber.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 3\n", +"//page no 67\n", +"//given\n", +"clc;\n", +"clear all;\n", +"n=0.02; //in percentage\n", +"W=20; //in degree\n", +"Vf=1.5; //in Volts\n", +"If=20; //in mAmps\n", +"Pin=If*Vf;\n", +"printf('\n Power coupled into fiber ,Pin = %0.0f mW\n',Pin);\n", +"Po=n*Pin;\n", +"printf('\n Output Power of the optical source is %0.1f mW\n',Po);\n", +"///from nc=20 degree\n", +"C_c=(sin(W*%pi/180))^2;\n", +"Pf=C_c*Po\n", +"printf('\n Optical power coupled into fibre is ,Pf = %0.0f microW\n',Pf*1000);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Bandwidth_of_Led_Source.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 3\n", +"//page no 68\n", +"//given\n", +"clc;\n", +"clear all;\n", +"tr=10; //in nsec\n", +"BW=0.35/tr/10^-9;\n", +"printf('\n Maximum operating bandwidth is %0.0f MHZ\n',BW/10^6); //divided by 10^6 to convert answer in MHZ" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Coupling_efficiency_of_an_optical_source.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 3\n", +"//page no 70\n", +"//given\n", +"clc;\n", +"clear all;\n", +"T=1; //Air\n", +"NA=0.3;\n", +"n0=1;\n", +"//x=y;\n", +"disp('for step index :A=infinite');\n", +"//for infinite alpha\n", +"//nc=T*(NA/n0)^2*(x/y)^2*(A/(A+2))\n", +"nc=T*(NA/n0)^2*(1)^2*1; // A/(A+2)=1 for A=infinite\n", +"printf('\n Coupling Coefficient,nc = %0.0f percent \n\n',nc*100);\n", +"\n", +"disp('for graded index :A=2');\n", +"A=2;\n", +"//n_c=(T*(NA/n0)^2*[A+[1-(y/x)^2]]/(A+2))\n", +"n_c=(T*(NA/n0)^2*[A+[1-(1)^2]]/(A+2)) //x/y=1\n", +"printf('\n Coupling Coefficient,nc = %0.1f percent \n',n_c*100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: Coupling_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 3\n", +"//page no 71\n", +"//given\n", +"clc;\n", +"clear all;\n", +"T=1; //Air\n", +"NA=0.3;\n", +"n0=1;\n", +"A=2;\n", +"//y=0.75x;\n", +"disp('for step index :');\n", +"//for infinite alpha\n", +"//nc=T*(NA/n0)^2*(x/y)^2*(A/(A+2))\n", +"nc=T*(NA/n0)^2*(1/0.75)^2*A/(A+2); // y/x=0.75\n", +"printf('\n Coupling Coefficient,nc = %0.0f percent \n\n',nc*100);\n", +"\n", +"disp('for graded index :A=2');\n", +"A=2;\n", +"//n_c=(T*(NA/n0)^2*[A+[1-(y/x)^2]]/(A+2))\n", +"n_c=(T*(NA/n0)^2*[A+[1-(0.75)^2]]/(A+2)) //y/x=0.75\n", +"printf('\n Coupling Coefficient,nc = %0.1f percent \n',n_c*100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: MTBF_of_LED_source.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 3\n", +"//page no 72\n", +"//given\n", +"clc;\n", +"clear all;\n", +"//calculate Tf\n", +"If=85; //in mAmps\n", +"Vf=2.5; //in Volts\n", +"Ta=25; //in deg C\n", +"//calculate Tj\n", +"W=150; //in C/W for hermetric led\n", +"Pd=If*Vf;\n", +"Tj=Ta+W*Pd/1000;\n", +"printf('\n Value of Tj is %0.1f deg C\n',Tj);\n", +"TF=8.01*10^12 *%e^-(8111/(Tj+273));\n", +"printf('\n Value of TF is %0.0f deg C\n',TF);\n", +"//calculate RF\n", +"BF=6.5*10^-4; //from table\n", +"QF=0.5; //from table\n", +"EF=1; //from table\n", +"RF=BF*TF*EF*QF*1/10^6;\n", +"disp(RF,'Value of RF')\n", +"printf('\n Value of MTBF is %0.0f*10^6 hours \n',1/RF/10^6);//Answer in book is misprint in last line\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7: Calculate_MTBF.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 3\n", +"//page no 74\n", +"//given\n", +"clc;\n", +"clear all;\n", +"//calculate Tf\n", +"If=120; //in mAmps\n", +"Vf=1.8; //in Volts\n", +"Ta=80; //in deg C\n", +"//calculate Tj\n", +"W=150; //in C/W for hermetric led\n", +"Pd=0.5*If*Vf;\n", +"Tj=75+W*Pd/1000;\n", +"printf('\n Value of Tj is %0.1f degree cel \n',Tj);\n", +"TF=8.01*10^12 *%e^-(8111/(Tj+273));\n", +"printf('\n Value of TF is %0.0f \n',TF);\n", +"//calculate RF\n", +"BF=6.5*10^-4; //from table\n", +"QF=0.2; //from table\n", +"EF=0.75; //from table\n", +"RF=BF*TF*EF*QF*1/10^6;\n", +"printf('\n Value of RF is %0.3f*10^6 \n',RF*10^6);\n", +"printf('\n Value of MTBF is %0.0f*10^6 hours \n',1/RF/10^6);" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/4-Optical_Detectors.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/4-Optical_Detectors.ipynb new file mode 100644 index 0000000..1d97346 --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/4-Optical_Detectors.ipynb @@ -0,0 +1,129 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Optical Detectors" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: Response_time_of_PIN_photodetector.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 4\n", +"//page no 99\n", +"//given\n", +"clc;\n", +"Tn=5; //in micrometer\n", +"Vs=10^7; //in m/s\n", +"tr=Tn*10^-6/Vs;\n", +"disp('ps',tr/10^-12,'Response time');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: MTBF_of_photodetector.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 4\n", +"//page no 106\n", +"//given\n", +"clc;\n", +"//calculate Tf\n", +"Pd=1.15; //in mW\n", +"//calculate Tj\n", +"TA=25; //in deg C\n", +"theta_JA=200; //in C/W for hermetric led\n", +"TJ=TA+theta_JA*Pd/10^3;\n", +"TF=8.01*10^12 *%e^-(8111/(TJ+273));\n", +"printf('\n Value of TJ is %0.2f deg C\n',TJ);\n", +"printf('\n Value of TF is %0.2f deg C\n',TF);\n", +"//calculate RF\n", +"BF=1.1*10^-3; //from table\n", +"QF=0.5; //from table\n", +"EF=1; //from table\n", +"RF=BF*TF*EF*QF*1/10^6;\n", +"disp(RF,'Value of RF');\n", +"printf('\n Value of MTBF is %0.0f*10^6 hours \n',1/RF/10^6);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Photon_Lifetime.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 4\n", +"//page no 114\n", +"//given\n", +"clc;\n", +"R1=0.7;\n", +"R2=0.99;\n", +"ad=0.1;\n", +"//compute Ld\n", +"Ld=1-R1*R2*%e^-(2*ad);\n", +"printf('\n Decay Loss %0.4f \n',Ld);\n", +"trt=40;//fs\n", +"tph=trt/Ld;\n", +"printf('\n Photon lifetime %0.2f fs\n',tph);\n", +"BW=1/tph;\n", +"printf('\n Bandwidth %0.1f Thz\n',BW*1000);//Answer in Thz \n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/5-Optical_Amplifiers.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/5-Optical_Amplifiers.ipynb new file mode 100644 index 0000000..0ddb79f --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/5-Optical_Amplifiers.ipynb @@ -0,0 +1,84 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Optical Amplifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Input_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5\n", +"//page no 128\n", +"//given\n", +"clc;\n", +"Vrms=0.3; //in V\n", +"CF=0.75; //in V/mW\n", +"Pi=Vrms/CF; \n", +"printf('\n input power %0.1f mW\n',Pi);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: Compute_pseudo_random_binary_sequence.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5\n", +"//page no 131\n", +"//given\n", +"clc;\n", +"Di=155; //in Mb/s\n", +"sl=10^-3*Di*10^6; //in bitstream\n", +"//PRBS=2^x-1=sl;\n", +"x=log(sl+1)/log(2);//equation is made to pick value of x\n", +"printf('\n PRBS =2^%0.0f -1 \n',x);" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/6-Optical_Transmittor.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/6-Optical_Transmittor.ipynb new file mode 100644 index 0000000..2d8aa9c --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/6-Optical_Transmittor.ipynb @@ -0,0 +1,699 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Optical Transmittor" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10: find_maximum_power_dissipation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//chapter 6\n", +"//page no161\n", +"//exa 6_10\n", +"//given\n", +"clear;\n", +"clc;\n", +"vcc=-5; //in v\n", +"imod=35; //in mA\n", +"ibias=18; //in mA\n", +"vbias=-2; //in v\n", +"vout=2; //in v\n", +"tj=30; //degree cel\n", +"icc=140; //in mA\n", +"Pt=(-vcc*icc*10^-3)+(-vcc-vout)*imod*10^-3+(-vcc+vbias)*ibias*10^-3;\n", +"printf('Pt= %0.0f mW',Pt*1000);\n", +"Tj=30;//in degree\n", +"Tj_a=Tj*Pt;\n", +"Tcase=125-Tj_a;//in degree\n", +"printf('\n Tcase(max)= %0.0f degree Cel',Tcase);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11: Calculate_differential_and_common_mode_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no-174\n", +"//Ex6_11\n", +"//given\n", +"clear;clc;\n", +"z11=49.95; //in ohm\n", +"z12=0.15; //in ohm\n", +"z21=0.15; //in ohm\n", +"z22=49.95; //in ohm\n", +"zdiff=2*(z11-z12);\n", +"printf('\n Zdiff= %0.1f ohm',zdiff); //answer misprinted\n", +"zcm=z11+z12;\n", +"printf('\n Zcm= %0.1f ohm',zcm);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12: Compute_differential_mode_and_common_mode_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no174\n", +"//Ex6_11\n", +"//given\n", +"clear;clc;\n", +"z11=65.4;//in ohm\n", +"z12=8.2;//in ohm\n", +"z21=8.2;//in ohm\n", +"z22=65.4;//in ohm\n", +"zdiff=2*(z11-z12);\n", +"printf('\n Zdiff= %0.1f ohm',zdiff); \n", +"zcm=z11+z12;\n", +"printf('\n Zcm= %0.1f ohm',zcm);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13: Compute_intermediate_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no181\n", +"//Ex6_13\n", +"//given\n", +"clear;clc;\n", +"dV=50; //in mV\n", +"di=3; //in Amp\n", +"Lcable=15; //in nH\n", +"fL=dV*10^-3/di/2/%pi/Lcable/10^-9;\n", +"printf('fLcable = %0.0f kHz',fL/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14: Allowed_parasitic_cable_inductance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no181\n", +"//Ex6_14\n", +"//given\n", +"clear;clc;\n", +"dV=50; //in mV\n", +"di=4; //in Amp\n", +"fL=120; //in kHz\n", +"Lcable=dV*10^-3/di/2/%pi/fL/10^3;\n", +"printf('\n The maximum allowed parasitic cable inductance (Lcable) must not exceed %0.1f nH',Lcable*10^9);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15: Calculate_high_frequency_component.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no182\n", +"//Ex6_15\n", +"//given\n", +"clear;\n", +"clc;\n", +"dV=40; //in mV\n", +"di=2.5; //in Amp\n", +"Lbypas=0.5; //in nH\n", +"fL=dV*10^-3/di/2/%pi/Lbypas/10^-9;\n", +"printf('fHnoise = %0.1f MHz',fL/10^6);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16: compute_low_frequency_component.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no182\n", +"//Ex6_16\n", +"//given\n", +"clear;\n", +"clc;\n", +"dV=50; //in mV\n", +"di=2.5; //in Amp\n", +"Cbypas=220; //in microF\n", +"fL=di/(dV*10^-3*2*%pi*Cbypas*10^-6);\n", +"printf('fLnoise = %0.0f kHz',fL/1000); //Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.17: Calculate_noise_bandwidth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no182\n", +"//Ex6_17\n", +"//given\n", +"clear;\n", +"clc;\n", +"dV=50; //in mV\n", +"di=4; //in Amp\n", +"Cbypas=200; //in microF\n", +"Lbypas=0.2; //in nH\n", +"fL=di/(dV*10^-3*2*%pi*Cbypas*10^-6);\n", +"printf('\n fLnoise = %0.0f kHz\n ',fL/1000); //Result misprinted\n", +"fH=dV*10^-3/di/2/%pi/Lbypas/10^-9;\n", +"printf('\n fHnoise = %0.0f MHz\n ',fH/10^6); \n", +"Bw=fH-fL;\n", +"printf('\n Bwnoise = %0.2f MHZ',Bw/10^6); //Result miscalculated" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18: Calculate_effective_hight_frequency_component.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no184\n", +"//Ex6_18\n", +"//given\n", +"clear;\n", +"clc;\n", +"dV=40; //in mV\n", +"di=3; //in Amp\n", +"LT=0.05; //in nH\n", +"fH=dV*10^-3/di/2/%pi/LT/10^-9;\n", +"printf('\n fCdecoupling(high) = %0.1f MHz\n ',fH/10^6); //Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.19: Calculate_the_effective_low_frequency_component.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no184\n", +"//Ex6_19\n", +"//given\n", +"clear;\n", +"clc;\n", +"dV=45; //in mV\n", +"di=2.5; //in Amp\n", +"CT=2.2; //in microF\n", +"LT=0.05; //in nH\n", +"fCL=di/(dV*10^-3*2*%pi*CT*10^-6);\n", +"printf('\n fLnoise = %0.0f MHz\n ',fCL/10^6); //Result \n", +"fCH=42.3; //in MHz taken from last question i.e. 6.18\n", +"printf('\n fHnoise (from last question i.e. 6.18)= %0.1f MHz\n ',fCH); \n", +"printf('\n %0.0fMHz <= B.W.noise <= %0.2fMHZ',fCL/10^6,fCH); //Result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Determine_whether_heat_sink_or_not.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 6\n", +"//page no 139\n", +"//Given\n", +"clear;\n", +"clc;\n", +"Tj=125; //in degree celsius\n", +"Tamp=60; //n degree celsius\n", +"Pt=1.8; //in W\n", +"RthJ_a =34; //in k/w(Assumption)\n", +"Rth=(Tj-Tamp)/Pt;\n", +"printf('\n Rth = %0.0f K/W',Rth);\n", +"if Rth>RthJ_a then\n", +" printf('\n No Heat sink is required');\n", +"else\n", +" printf('\n Yes,Heat sink is required');\n", +"end ; \n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: determine_whether_or_not_heat_sink.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 6\n", +"//page no 140\n", +"//Given\n", +"\n", +"clear;\n", +"clc;\n", +"Tj=120;//in degree celsius\n", +"Tamp=80;//n degree celsius\n", +"Pt=2.1;//in W \n", +"RthJ_a =34; //in k/w(Assumption)\n", +"Rth=(Tj-Tamp)/Pt;\n", +"printf('Rth = %0.0f K/W',Rth);\n", +"if Rth>RthJ_a then\n", +" printf('\n No Heat sink is required');\n", +"else\n", +" printf('\n Yes,Heat sink is required');\n", +"end ; \n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Determine_wheather_heat_sink.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter6\n", +"//page no 140\n", +"//example 6-3\n", +"//given\n", +"clear;\n", +"clc;\n", +"//data insufficient\n", +"Rth=17.70; // Rth assumed minimum\n", +"Rthc_H=0.65; //k/w\n", +"Rthj_a=33; //k/w\n", +"Rthj_c=3; //k/w\n", +"RthH_a=1/(1/Rth-1/Rthj_a)-Rthj_c-Rthc_H;\n", +"printf('RthH-a <= %0.1f K/W',RthH_a);\n", +"//disp(RthH_a,'heat sink thermal resistance');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Find_Junction_Temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter6\n", +"//page no 148\n", +"//example 6-4\n", +"//given\n", +"clear;clc;\n", +"Vcc=5;//in volt\n", +"Icc=24;//in mA\n", +"Vset=0.65;//in volt\n", +"Vf=1.5;//in volt\n", +"IMOD=15;//in mA\n", +"TA=25;//in degree celsius\n", +"Pdynamic=(Vcc-Vf-Vset)*Icc;\n", +"disp('mW',Pdynamic,'Power dissipation under dynamic condition')\n", +"Pstatic=(Vcc*Icc);\n", +"disp('mW',Pstatic,'power dissipation under static condition')\n", +"PD=Pdynamic+Pstatic;\n", +"disp('mW',PD,'total power dissipation')\n", +"//Tj=TA+PD*wj_a;\n", +"TA=25;//in degree cel\n", +"wj_a=84;//degree cel/w\n", +"PD=188.4; //mW\n", +"Tj=TA+PD*10^-3*wj_a;\n", +"printf('\n Temp. of junction temp %0.0f degree C',Tj)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: calculate_value_of_r1_r2_r3_and_c1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no150\n", +"//exa 6_5Ex6_5\n", +"//given\n", +"clc;\n", +"clear;\n", +"Ifon=120; //in mA\n", +"Vcc=5; //in V\n", +"Vfon=2; //in V\n", +"R3=(Vcc-Vfon)/Ifon/10^-3 +3.2*(Vcc-Vfon-1.4)/Ifon/10^-3;\n", +"printf('\n R3= %0.0f ohm',R3);\n", +"R0=(R3-32)/3.2;\n", +"printf('\n R0= %0.0f ohm',R0);\n", +"R1=(R0+10)/2;\n", +"printf('\n R1= %0.0f ohm',R1);\n", +"R2=R1-10;\n", +"printf('\n R2= %0.0f ohm',R2);\n", +"C1=2*10^-9/R1;\n", +"printf('\n C1= %0.0f pF',C1*10^12); //answer in book is approximately written" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: Compute_required_reference_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//chapter 6\n", +"//page no155\n", +"//Ex6_6\n", +"//given\n", +"clear;\n", +"clc;\n", +"Impd1=250; //in microA\n", +"Impd0=25; //in microA\n", +"Iref=(1/16)*Impd1*10^-6;\n", +"printf('\n Reference current is %0.3f microA',Iref*10^6)\n", +"Rref=1.5/Iref;\n", +"printf('\n External bias resistor value Rref1is %0.0f kohm',Rref/1000)\n", +"//or\n", +"Rref1=24/Impd1/10^-6;\n", +"printf('\n Also,Rref1=24/Impd \n External bias resistor value is %0.0f kohm',Rref1/1000)\n", +"Irefz=(1/4)*Impd0;\n", +"printf('\n Ref0 current is %0.2f microA',Irefz)\n", +"Rrefz=1.5/Irefz/10^-6;\n", +"printf('\n External bias resistor value Rrefz is %0.0f kohm',Rrefz/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7: Find_bandwidth_for_optical_one_and_zero.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no157\n", +"//Ex 6_7\n", +"//given\n", +"clear;\n", +"clc;\n", +"R=400; //in mA\n", +"nEO=25; //in mW\n", +"nlaser=nEO*10^-3*R*10^-3;\n", +"printf('\n nlaser = %0.2f ',nlaser);\n", +" Tone=(40*10^-12)*(80*10^3)/nlaser;\n", +"printf('\n Tone = %0.0f micros ',Tone*10^6);\n", +" BWone=1/(2*%pi*Tone);\n", +"printf('\n BWone = %0.0f Hz ',BWone);\n", +"Tzero=(40*10^-12)*80*10^3/nlaser;\n", +"BWzero=1/2/%pi/Tzero; //Hz\n", +"printf('\n BWzero = %0.0f Hz ',BWzero);\n", +"//answer misprinted" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8: compute_external_resistance_and_alarm_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no159\n", +"//exa 6_8\n", +"//given\n", +"clear;clc;\n", +"iol =5; //in mA\n", +"ioh=80; //bias current in mA\n", +"ralarmH=(1.5*1500)/ioh/10^-3;\n", +"printf('\n Alarm resistor RalarmH is %0.0f kOhm',ralarmH/1000);\n", +"ralarmL=(1.5*300)/iol/10^-3;\n", +"printf('\n Alarm resistor RalarmL is %0.0f kOhm',ralarmL/1000);\n", +"ialarmh=80*10^-3;\n", +"ialarmH=ioh*10^-3/1500;\n", +"printf('\n Alarm current IalarmH is %0.0f microA',ialarmH*10^6); //unit of anwer misprinted in book\n", +"ialarml=5*10^-3;\n", +"ialarmL=iol*10^-3/300;\n", +"printf('\n Alarm current IalarmL is %0.0f microA',ialarmL*10^6);\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.9: Total_power_dissipatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//chapter 6\n", +"//page no160\n", +"//exa 6_9\n", +"//given\n", +"clear;clc;\n", +"Ibias=15; //in mA assumption\n", +"Ild=35; //in mA\n", +"Rld=50; //in ohm\n", +"Ildi=100; //in mA\n", +"Ilde=50; //in mA\n", +"Imod=(Ildi+Ilde)/Ildi*35; //mA\n", +"printf('Total modulation current is \nImod=%.2f mA\n',Imod);\n", +"Ildq=1.2/100*10^3; //in mA \n", +"printf('The current complementary output is \nIldq=%.1f mA\n',Ildq);\n", +"Vld=-1.2-Rld*(Ibias+Ild)*10^-3; //optical high\n", +"printf('The laser voltage for optical high is \nVld=%.2f V\n',Vld);\n", +"Vld=-1.2-Rld*(Ibias)*10^-3; //optical dark\n", +"printf('The laser voltage for optical dark is \nVld=%.2f V\n',Vld);\n", +"Vldq=-Ild*10^-3*Rld;\n", +"printf('The laser voltage at complimentary o/p is \nVldq=%.2f V\n',Vldq);\n", +"Rchock=5; //in Ohm\n", +"Vchock=-Rchock*Ibias*10^-3;\n", +"printf('\nVchock=%.3f V\n',Vchock);\n", +"Vbias=0.5*(-3.7+Vld)+Vchock;\n", +"printf('\nVbias=%.1f V\n',Vbias);\n", +"\n", +"//(i) Pdvee1\n", +"Pdvcc=5*2.5; //in mW\n", +"printf('\nPdvcc=%.1f mW\n',Pdvcc);\n", +"Pdvee1=4.5*80; //in mW\n", +"printf('\nPdvee1=%.0f mW\n',Pdvee1);\n", +"//(ii) Pdvee2\n", +"Pdvee2=6*160; //in mW\n", +"printf('\nPdvee2=%.0f mW\n',Pdvee2);\n", +"//(iii) PdLD\n", +"PdLD=0.5*(3.75*50); //in mW\n", +"printf('\nPdLD=%.2f mW\n',PdLD);\n", +"//(iv) PdLQ\n", +"PdLDQ=0.5*abs(Vld)*50; //in mW\n", +"printf('\nPdLDQ=%.2f mW\n',PdLDQ);\n", +"//(v) PdLDQ\n", +"Pdbias=abs(Vbias)*Ibias; //in mW\n", +"printf('\nPdbias=%.1f mW\n',Pdbias);\n", +"//PT\n", +"PT=Pdvcc+Pdvee1+Pdvee2-[PdLD+PdLDQ+Pdbias];\n", +"printf('\nTotal power dissipation (PT)=%.1f mW\n',PT);" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/7-Optical_Receivers_.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/7-Optical_Receivers_.ipynb new file mode 100644 index 0000000..b16f9c8 --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/7-Optical_Receivers_.ipynb @@ -0,0 +1,126 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Optical Receivers " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: PWD_of_optical_receiver.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7\n", +"//page no 203\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Trec=54; //in ns\n", +"Ttrans=40; //in ns\n", +"Pwd=(Trec-Ttrans)/Ttrans*100;\n", +"printf('\n PWD= %0.0f percent',Pwd) " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: Value_of_Radj.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7\n", +"//page no 214\n", +"//given\n", +"clc;\n", +"clear all;\n", +"//Vc=Vdin-Vdinq\n", +"Vc=5; //in mV Vdin-Vdinq=Vc\n", +"Irset =1.8*10^-3*(Vc*10^-3); //in A\n", +"printf('\n Irset %0.0f microA',Irset*10^6) ;\n", +"Vs=1.5; //Voltage at signal level below Vcc in V\n", +"Radj=Vs/Irset; //in Ohm\n", +"printf('\n Radj %0.0f kohm',Radj*10^-3) ;\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: Reference_voltage_and_reference_resistor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7\n", +"//page no 223\n", +"//given\n", +"clc;\n", +"clear all;\n", +"\n", +"Rl=50; //in Ohm\n", +"Ro=100; //in Ohm\n", +"Vos=450; //in mV\n", +"Vref=(Rl+Ro)/Rl*Vos/2;\n", +"printf('\n Vref= %0.0f mV',Vref) ;\n", +"Vee=3.3; //in V\n", +"R1=500; //in Ohm\n", +"R2=16000; //in Ohm\n", +"//Rref=(Vee/Vref/10^3-1)*R1/[1-{R1/R2*(Vee/Vref/10^3-1)}]\n", +"Rref={(Vee/Vref/10^-3-1)*R1}/[1-R1/R2*(Vee/Vref/10^-3-1)]\n", +"printf('\n Rref= %0.0f kohm',Rref) ;\n", +"printf('\n Approx. Rref= %0.1f kohm',Rref*10^-3) ;\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fiber_Optics_Communication_by_H_Kolimbiris/9-Optical_Fibers.ipynb b/Fiber_Optics_Communication_by_H_Kolimbiris/9-Optical_Fibers.ipynb new file mode 100644 index 0000000..ced7cdf --- /dev/null +++ b/Fiber_Optics_Communication_by_H_Kolimbiris/9-Optical_Fibers.ipynb @@ -0,0 +1,976 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Optical Fibers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.10: Raman_scattering_threshold_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 305\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=850; //in nm\n", +"L1=L/1000; //converted L in micrometer for using in given formula\n", +"A=0.4; //in dB/km\n", +"d=5; //in micrometer\n", +"Po=5.9*10^-2*A*L1*d^2;\n", +"printf(' \n Po(Th) = %0.0f mW',Po*1000); //rounding off error" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.11: Raman_scattering_threshold_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 305\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=1330; //in nm\n", +"L1=L/1000; //converted L in micrometer for using in given formula\n", +"A=0.4; //in dB/km\n", +"d=5; //in micrometer\n", +"Po=5.9*10^-2*A*L1*d^2;\n", +"printf(' \n Po(Th) = %0.0f mW',Po*1000); //unit in book is wrong" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.12: Raman_sscattering_threshold_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 9\n", +"//page no 305\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=1550; //in nm\n", +"L1=L/1000; //converted L in micrometer for using in given formula\n", +"A=0.4; //in dB/km\n", +"d=5; //in micrometer\n", +"Po=5.9*10^-2*A*L1*d^2;\n", +"printf(' \n Po(Th) = %0.0f mW',Po*1000); //unit in book is wrong" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.13: Maximum_modal_number.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 310\n", +"//given\n", +"clc;\n", +"clear all;\n", +"R=25; //in nm\n", +"R1=25*10^-6; //in m\n", +"L=1000; //in nm\n", +"L1=10^-6; //in m\n", +"NA=0.2; \n", +"V=2*%pi/L1*R1*NA;\n", +"printf(' \n Normalised frequency(V) = %0.1f ',V);\n", +"y=2; //for parabolic\n", +"Mmax=y/(y+2)*(V^2)/2;\n", +"printf(' \n Maximum number of modes is equal to = %0.0f ',Mmax);//answer in book is wrong\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.14: Maximum_operating_bandwidth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 313\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Tp=0.25; //in microsec\n", +"fB=0.529/Tp/10^-6; //channel bitrate\n", +"fBw=fB; //channel bandwidth = channel bitrate when zero ISI and RZ input data is modulated\n", +"printf(' \n Maximum operating bandwidth = %0.3f MHz',fBw*10^-6);\n", +"L=50; //in km\n", +"D=Tp*10^-6/L; //Dispersion\n", +"printf(' \n Dispersion = %0.0f ns/km',D*10^9);\n", +"fBwL=fBw*10^-6*L; //bandwidth length product\n", +"printf(' \n Bandwidth length product(fBw*L) = %0.1f MHz/km',fBwL);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.15: Maximum_operating_bandwidth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 314\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Tp=2; //in microsec\n", +"fB=0.529/Tp/10^-6; //channel bit rate\n", +"fBw=fB; //channel bandwidth = channel bitrate when zero ISI and RZ input data is modulated\n", +"printf(' \n Maximum operating bandwidth = %0.2f MHz',fBw*10^-6);\n", +"L=50; //in km\n", +"D=Tp*10^-6/L; //Dispersion\n", +"printf(' \n Dispersion = %0.0f ns/km',D*10^9); //unit in book is wrong\n", +"fBwL=fBw*10^-6*L; //bandwidth length product\n", +"printf(' \n Bandwidth length product(fBw*L) = %0.0f MHz/km',fBwL);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.16: Maximum_operating_bandwidth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 314\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Tp=5; //in microsec\n", +"fB=0.529/Tp/10^-6; //channel bit rate\n", +"fBw=fB; //channel bandwidth = channel bitrate when zero ISI and RZ input data is modulated\n", +"printf(' \n Maximum operating bandwidth = %0.3f MHz',fB*10^-6);\n", +"L=50; //in km\n", +"D=Tp*10^-6/L; //Dispersion\n", +"printf(' \n Dispersion = %0.1f micro sec/km',D*10^6);\n", +"fBwL=fBw*10^-6*L; //bandwidth length product\n", +"printf(' \n Bandwidth length product(fBw*L) = %0.1f MHz/km',fBwL);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.17: RMS_pulse_chirping.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 315\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Slw=25; //in nm\n", +"L=850; //in nm given\n", +"c=3*10^5; //in km/s\n", +"ofmd=0.02; //optical fiber material dispersion\n", +"Mdp=1/L/c*ofmd; //answer mismatch due to differnt value chosen for calculation\n", +"printf(' \n Material Dispersion parameter Mdp = %0.0f ps/nm.km',Mdp*10^12);\n", +"l=1; //in km\n", +"dmd=Slw*l*Mdp; //pulse chirping\n", +"printf(' \n pulse chirping dmd = %0.2f ns/km',dmd*10^9);\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.18: RMS_pulse_broadening.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 315\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Slw=2; //in nm\n", +"L=850; //in nm given\n", +"c=3*10^5; //in km/s\n", +"ofmd=0.02; //optical fiber material dispersion\n", +"Mdp=1/L/c*ofmd; //answer mismatch due to differnt value chosen for calculation\n", +"printf(' \n Material Dispersion parameter Mdp = %0.0f ps/nm.km',Mdp*10^12);\n", +"l=1; //in km\n", +"dmd=Slw*l*Mdp;\n", +"printf(' \n pulse chirping dmd = %0.3f ns/km',dmd*10^9);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.19: Channel_capacity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 325\n", +"//given\n", +"clc;\n", +"clear all;\n", +"fb1=2.5; //in Gb/s\n", +"D1=20; //in ps/nm.km\n", +"D2=5; //in ps/nm.km\n", +"fb2=D1/D2*fb1; \n", +"printf('\n fb2 = %0.0f Gb/s(OC-192)',fb2)\n", +"//Values of D1 and D2 are conflicted in question ,however solution is correct " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: Compute_angle_of_acceptance_critical_angle_and_NA.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 296\n", +"//given\n", +"clc;\n", +"clear all;\n", +"n2=1.35; //refractive index\n", +"n1=1.4; //refractive index\n", +"Wo=asind(n2/n1); //in radians\n", +"printf('\n Critical Angle,Wo = %0.2f degree\n',Wo);\n", +"NA=sqrt(n1^2-n2^2);\n", +"printf('\n Numerical Aperture,NA = %0.2f \n',NA);\n", +"Wa=asind(NA); //in radians\n", +"printf('\n Angle of acceptance,Wa = %0.2f degree\n',Wa);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.20: Channel_capacity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 325\n", +"//given\n", +"clc;\n", +"clear all;\n", +"fb1=2.5; //in Gb/s\n", +"DV1=100; //in GHz\n", +"DV2=50; //in GHz\n", +"fb2=DV1/DV2*fb1;\n", +"printf('\n fb2 = %0.0f Gb/s',fb2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.21: Total_chromatic_dispersio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 332\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=400; //in km\n", +"dAV=4; //in ps/km\n", +"dTL=L*dAV; //total chromatic dispersion\n", +"printf('dTL =%0.0f ps/nm.km',dTL);\n", +"printf('\n or,dTL =%0.1f ns/nm.km',dTL/10^3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.22: Compute_optical_attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 335\n", +"//given\n", +"clc;\n", +"clear all;\n", +"no=1; //refractive index\n", +"n1=1.35; //refractive index\n", +"Po=[(n1-no)/(n1+no)]^2; //fresnal reflection\n", +"printf('\n Po(refl)= %0.3f',Po);\n", +"Lrefl=-10*log10(1-Po); //attenuation loss\n", +"printf('\n L(refl)= %0.1f dB',Lrefl);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.23: Compute_total_attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 335\n", +"//given\n", +"clc;\n", +"clear all;\n", +"no=1; //refractive index\n", +"n1=1.55; //refractive index\n", +"Po=[(n1-no)/(n1+no)]^2; //fresnal reflection\n", +"printf('\n Fresnel reflective coefficient,Po(refl)= %0.5f\n',Po);\n", +"Lrefl=-10*log10(1-Po); //attenuation loss\n", +"printf('\n Attenuation based on Fresnel reflective coefficient,L(refl)= %0.1f dB\n',Lrefl);\n", +"Ltot=5*Lrefl;\n", +"printf('\n Total link attenuation on Fresnel reflections,Ltotal = %0.1f dB',Ltot);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.24: Compute_the_insertion_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 336\n", +"//given\n", +"clc;\n", +"clear all;\n", +"n1=1;\n", +"n2=1.5;\n", +"a=25; //in micrometer\n", +"y=3; //in micrometer\n", +"Csim=16*(n1/n2)^2/%pi/[1+(n1/n2)]^4*[2*acos(y/2/a)-(y/a)*[1-(y/2/a)^2]^0.5]; \n", +"//lateral coupling coefficient\n", +"a=2*acos(y/2/a)-(y/a)*sqrt(1-(y/2/a)^2);\n", +"b=16*(n1/n2)^2/%pi/[1+(n1/n2)]^4;\n", +"printf('\n Lateral coupling coefficient,Csim= %0.2f\n',Csim);\n", +"Lsim=-10*log10(1-Csim);\n", +"printf('\n Insertion Loss,Lsim= %0.1f dB\n',Lsim);\n", +"//Answer wrong in book" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.25: Compute_insertion_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 337\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Alpha=2;\n", +"a=25; //in micrometer\n", +"y=2; //in micrometer\n", +"Cgim=2/%pi*(y/a)*(Alpha+2)/(Alpha+1); //lateral coupling coefficient\n", +"printf('\n Csim= %0.3f\n',Cgim);\n", +"Lgim=-10*log10(1-Cgim); //insertion loss\n", +"printf('\n Insertion Loss,Lgim= %0.1f dB\n',Lgim);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.26: Compute_insertion_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 339\n", +"//given\n", +"clc;\n", +"clear all;\n", +"n1=1.5; //refractive index\n", +"n2=1.5; //refractive index\n", +"W=2.5; //in degree\n", +"NA1=0.3;\n", +"NA2=0.4;\n", +"Csim1=16*(n1/n2)^2/[1+(n1/n2)^4]*[1-n2*W/(180*NA1)]; //angular coupling coefficient\n", +"//Answer wrong in book\n", +"printf('\n Csim= %0.3f\n',Csim1);\n", +"Lsim1=-10*log10(Csim1);\n", +"printf('\n Insertion Loss,Lsim= %0.3f dB\n',Lsim1);\n", +"Csim2=16*(n1/n2)^2/[1+(n1/n2)^4]*[1-n2*W/(180*NA2)]; //angular coupling coefficient\n", +"//Answer wrong in book\n", +"printf('\n Csim= %0.3f\n',Csim2);\n", +"Lsim2=-10*log10(Csim2);\n", +"printf('\n Insertion Loss,Lsim= %0.2f dB\n',Lsim2);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.27: Compute_total_insertion_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 340\n", +"//given\n", +"clc;\n", +"clear all;\n", +"a=4; //in micrometer\n", +"V=2.4;\n", +"aw=1; //in degree\n", +"NA1=0.2;\n", +"n1=1.45; //refractive index\n", +"y=1; //in micrometer\n", +"omega=a*[0.65+1.62*V^-1.5+2.88*V^-6]/sqrt(2);\n", +"printf('\n Normalised spot view (w)= %0.2f micrometer',omega);\n", +"Lsml=2.17*(y/omega)^2;\n", +"printf('\n Insertion loss due to lateral,Lsm= %0.2f dB',Lsml); //answer is wrong in book \n", +"Lsmg=2.17*(aw*%pi/180*omega*n1*V/a/NA1)^2;\n", +"printf('\n Insertion loss due to angular,Lsm= %0.2f dB',Lsmg);\n", +"\n", +"printf('\n Total Insertion loss,Lsmtotal= %0.2f dB',Lsml+Lsmg);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.28: Compute_insertion_loss_at_the_joint.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 340\n", +"//given\n", +"clc;\n", +"clear all;\n", +"a1=4.5; //in micrometer\n", +"a2=4; //in micrometer\n", +"V=2.1;\n", +"aw=1; //in degree\n", +"NA=0.2;\n", +"n1=1.45;\n", +"y=1; //in micrometer\n", +"w1=a1*[0.65+1.62*V^-0.5+2.88*V^-6]/sqrt(2); //insertion loss\n", +"printf('\n Wo1= %0.1f ',w1);\n", +"w2=a2*[0.65+1.62*V^-0.5+2.88*V^-6]/sqrt(2); //insertion loss\n", +"printf('\n Wo2= %0.1f ',w2);\n", +"Lintr=-10*log10(4*[(w1/w2+w2/w1)^-2]); //toatl insertion loss at joint\n", +"printf('\n Lintr= %0.2f dB',Lintr); //Answer wrong in book" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: Fiber_Attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 300\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Po=8; //in mW\n", +"Pi=50; //in mW\n", +"l=15; //in km\n", +"TA=-10*log10(Po/Pi);\n", +"printf('\n Total fibre Attenuation,L = %0.2fdB/%0.0fkm \n',TA,l);\n", +"Alpha=TA/l; \n", +"printf('\n Alpha is = %0.2f dB/km\n',Alpha);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3: Maximum_length_of_optical_fibre.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 300\n", +"//given\n", +"clc;\n", +"clear all;\n", +"Po=10; //in mW\n", +"Pi=150; //in mW\n", +"Alpha=0.8; //in dB/km\n", +"TA=-10*log10(Po/Pi);\n", +"printf('\n Total fibre Attenuation,L = %0.2f dB \n',TA);\n", +"l=TA/Alpha;\n", +"printf('\n maximum length is,l = %0.2f km\n',l);\n", +"//Round off Variations appear" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: Rayleigh_attenuation_of_an_optical_fibre.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 9\n", +"//page no 302\n", +"//given\n", +"clc;\n", +"clear all;\n", +"B=92*10^-12; //in m^2/N\n", +"Tf=1550; //in K\n", +"n=1.46; //refractive index\n", +"p=0.29;\n", +"K=1.38*10^-23; //in J/K\n", +"l=1; //in km\n", +"L1=630; //in nm\n", +"L2=1330; //in nm\n", +"L3=1550; //in nm\n", +"disp('Rayleight scattering coefficient');\n", +"Y1=8*%pi^3*n^8*p^2*B*K*Tf/3/(L1*10^-9)^4;\n", +"Y2=8*%pi^3*n^8*p^2*B*K*Tf/3/(L2*10^-9)^4;\n", +"Y3=8*%pi^3*n^8*p^2*B*K*Tf/3/(L3*10^-9)^4; \n", +"mprintf(' for L1= 630nm, is %e',Y1);\n", +"mprintf('\n for L2= 1330nm, is %e',Y2);\n", +"mprintf('\n for L3= 1550nm, is %e',Y3);\n", +"//Misprinted answer\n", +"\n", +"disp('Rayleight scattering attenuation factor');\n", +"Fr1=%e^-(Y1*l*10^3);\n", +"Fr2=%e^-(Y2*l*10^3);\n", +"Fr3=%e^-(Y3*l*10^3);\n", +"printf(' \n for Y1= 0.00179 is %0.2f',Fr1);\n", +"printf(' \n for Y2= 0.00009 is %0.2f',Fr2);\n", +"printf(' \n for Y3= 0.0000182 is %0.2f\n',Fr3);\n", +"//\n", +"\n", +"disp('Rayleight scattering attenuation ');\n", +"Ar1=10*log10(Fr1^-1);\n", +"Ar2=10*log10(Fr2^-1);\n", +"Ar3=10*log10(Fr3^-1);\n", +"printf(' \n for Ar1= 0.17 is %0.2f dB/km',Ar1);\n", +"printf(' \n for Ar2= 0.91 is %0.2f dB/km',Ar2);\n", +"printf(' \n for Ar3= 0.98 is %0.3f dB/km',Ar3);\n", +"//For L3 answers in book are misprinted\n", +"//Rounding off errors in answer" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5: SBS_threshold_optical_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 9\n", +"//page no 304\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=850; //in nm\n", +"L1=0.850; //converted L in micrometer for using in given formula\n", +"A=0.5; //in dB/km\n", +"d=5; //in micrometer\n", +"Bw=1; //in Gz\n", +"Po=4.4*10^-3*A*Bw*L1^2*d^2;\n", +"printf(' \n Po(Th) = %0.3f W',Po);\n", +"printf(' \n Therefore,Po(Th) = %0.0f mW',Po*1000);\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6: SBS_threshold_optical_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 9\n", +"//page no 304\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=1330; //in nm\n", +"L1=1.330; //converted L in micrometer for using in given formula\n", +"A=0.5; //in dB/km\n", +"d=5; //in micrometer\n", +"Bw=1; //in Gz\n", +"Po=4.4*10^-3*A*Bw*L1^2*d^2;\n", +"printf(' \n Po(Th) = %0.3f W',Po);\n", +"printf(' \n Therefore,Po(Th) = %0.0f mW',Po*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.7: SBS_threshold_optical_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 9\n", +"//page no 304\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=1550; //in nm\n", +"L1=1.550; //converted L in micrometer for using in given formula\n", +"A=0.5; //in dB/km\n", +"d=5; //in micrometer\n", +"Bw=1; //in Gz\n", +"Po=4.4*10^-3*A*Bw*L1^2*d^2;\n", +"printf(' \n Po(Th) = %0.3f W',Po);\n", +"printf(' \n Therefore,Po(Th) = %0.0f mW',Po*1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.8: SBS_threshold_optical_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 9\n", +"//page no 304\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=850; //in nm\n", +"L1=0.850; //converted L in micrometer for using in given formula\n", +"A=0.5; //in dB/km\n", +"d=8; //in micrometer\n", +"Bw=1; //in Gz\n", +"Po=4.4*10^-3*A*Bw*L1^2*d^2;\n", +"printf(' \n Po(Th) = %0.3f W',Po);\n", +"printf(' \n Therefore,Po(Th) = %0.0f mW',Po*1000);//answer is slightly different due to rounding off" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.9: SBS_threshold_optical_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"\n", +"\n", +"\n", +"//Chapter 9\n", +"//page no 304\n", +"//given\n", +"clc;\n", +"clear all;\n", +"L=850; //in nm\n", +"L1=0.850; //converted L in micrometer for using in given formula\n", +"A=0.5; //in dB/km\n", +"d=10; //in micrometer\n", +"Bw=1; //in Gz\n", +"Po=4.4*10^-3*A*Bw*L1^2*d^2;\n", +"printf(' \n Po(Th) = %0.3f W',Po);\n", +"printf(' \n Therefore,Po(Th) = %0.0f mW',Po*1000);" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |