summaryrefslogtreecommitdiff
path: root/Optical_Fiber_Communication_by_A_Kalavar
diff options
context:
space:
mode:
Diffstat (limited to 'Optical_Fiber_Communication_by_A_Kalavar')
-rw-r--r--Optical_Fiber_Communication_by_A_Kalavar/1-Introduction_to_Optical_Fiber_Communication.ipynb95
-rw-r--r--Optical_Fiber_Communication_by_A_Kalavar/10-Fiber_Measurements.ipynb97
-rw-r--r--Optical_Fiber_Communication_by_A_Kalavar/2-Optical_Fibers.ipynb1277
-rw-r--r--Optical_Fiber_Communication_by_A_Kalavar/4-Signal_Degradation_in_Fibers.ipynb773
-rw-r--r--Optical_Fiber_Communication_by_A_Kalavar/5-Fiber_Optic_Splices_Connectors_and_Couplers.ipynb381
-rw-r--r--Optical_Fiber_Communication_by_A_Kalavar/6-Optical_Sources.ipynb363
-rw-r--r--Optical_Fiber_Communication_by_A_Kalavar/7-Source_to_Fiber_Power_Launching_and_Photodetectors.ipynb829
-rw-r--r--Optical_Fiber_Communication_by_A_Kalavar/8-Optical_Receiver_Operation.ipynb327
-rw-r--r--Optical_Fiber_Communication_by_A_Kalavar/9-Link_Designs_and_Optical_Amplifiers.ipynb403
9 files changed, 4545 insertions, 0 deletions
diff --git a/Optical_Fiber_Communication_by_A_Kalavar/1-Introduction_to_Optical_Fiber_Communication.ipynb b/Optical_Fiber_Communication_by_A_Kalavar/1-Introduction_to_Optical_Fiber_Communication.ipynb
new file mode 100644
index 0000000..2a68b46
--- /dev/null
+++ b/Optical_Fiber_Communication_by_A_Kalavar/1-Introduction_to_Optical_Fiber_Communication.ipynb
@@ -0,0 +1,95 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Introduction to Optical Fiber Communication"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.10_1: Computing_maximum_capacity_of_channel.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 1.10.1 page 1.19\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"Bandwidth = 2d6; //Bandwidth of channel\n",
+"Signal_to_Noise_ratio = 1; //Signal to Noise ratio of channel\n",
+"\n",
+"Capacity = Bandwidth * log2(1 + Signal_to_Noise_ratio); //computing capacity\n",
+"Capacity=Capacity/10^6;\n",
+"\n",
+"printf('Maximum capacity of channel is %d Mb/sec.',Capacity);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.13_1: Determine_duration_of_shortest_and_widest_optical_pulse.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 1.13.1 page 1.30\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"Bit_rate = 2d9; // bit rate of channel\n",
+"// Given sequence is 010111101110\n",
+"\n",
+"Shortest_duration = 1 * (1/Bit_rate); // shortest duration is '1'\n",
+"Widest_duration = 4 * (1/Bit_rate); //widest duration is '1111'\n",
+"\n",
+"Shortest_duration=Shortest_duration*10^9; //Converting into nano seconds\n",
+"Widest_duration=Widest_duration*10^9; //Converting into nano seconds\n",
+"\n",
+"printf('\nShortest duration is %.1f nano second.',Shortest_duration);\n",
+"printf('\nWidest duration is %d nano second.',Widest_duration);"
+ ]
+ }
+],
+"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/Optical_Fiber_Communication_by_A_Kalavar/10-Fiber_Measurements.ipynb b/Optical_Fiber_Communication_by_A_Kalavar/10-Fiber_Measurements.ipynb
new file mode 100644
index 0000000..a31c475
--- /dev/null
+++ b/Optical_Fiber_Communication_by_A_Kalavar/10-Fiber_Measurements.ipynb
@@ -0,0 +1,97 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Fiber Measurements"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5_1: Calculate_3_dB_pulse_broadening_and_bandwidth_length_product.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 10.5.1 page 10.24\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"To=12.6; //width of output pulse\n",
+"Ti=0.3; //width of input pulse\n",
+"l=1.2; //length of measurement\n",
+"\n",
+"Pulse_dispersion = sqrt(To^2 - Ti^2); //computing pulse dispersion\n",
+"PDKM=Pulse_dispersion/l; //computing pulse dispersion per Kilometer\n",
+"BW=0.44/PDKM; //computing optical bandwidth\n",
+"BW=BW*1000;\n",
+"printf('\nPulse broadning is %.1f ns/km.\nOptical bandwidth is %.1f MHz.Km.',PDKM,BW);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6_1: Determine_attenuation_and_estimate_accuracy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 10.6.1 page 10.28\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"V2=12;\n",
+"V1=2.5;\n",
+"L2=3;\n",
+"L1=0.004;\n",
+"\n",
+"alpha_dB = 10* log10(V2/V1)/(L2-L1);\n",
+"un = 0.2/(L2-L1);\n",
+"\n",
+"printf('\nAttenuation is %.2f dB/km\nUncertainity +/- %.3f dB.',alpha_dB,un);\n",
+"\n",
+"//answer for attenuation in the book is 2.26 deviation of 0.01 and for uncertaininty is 0.066 deviation of 0.001"
+ ]
+ }
+],
+"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/Optical_Fiber_Communication_by_A_Kalavar/2-Optical_Fibers.ipynb b/Optical_Fiber_Communication_by_A_Kalavar/2-Optical_Fibers.ipynb
new file mode 100644
index 0000000..179c9c5
--- /dev/null
+++ b/Optical_Fiber_Communication_by_A_Kalavar/2-Optical_Fibers.ipynb
@@ -0,0 +1,1277 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Optical Fibers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10_1: Determine_cutoff_wavelength.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.10.1 page 2.39\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"a=4.5d-6; //core diameter\n",
+"delta=0.25/100; //relative index difference\n",
+"lamda=0.85d-6; //operating wavelength\n",
+"n1=1.46; //core refractive index\n",
+"\n",
+"v= 2*%pi*a*n1*sqrt(2*delta)/lamda; //computing normalized frequency\n",
+"lamda_cut_off=v*lamda/2.405; //computing cut off wavelength\n",
+"lamda_cut_off=lamda_cut_off*10^9;\n",
+"printf('\nCut off wavelength is %.d nanometer.',lamda_cut_off);\n",
+"\n",
+"printf('\n\nWhen delta is 1.25 percent-');\n",
+"delta=1.25/100;\n",
+"v= 2*%pi*a*n1*sqrt(2*delta)/lamda; //computing normalized frequency\n",
+"lamda_cut_off=v*lamda/2.405; //computing cut off wavelength\n",
+"lamda_cut_off=lamda_cut_off*10^7;\n",
+"lamda_cut_off=round(lamda_cut_off);\n",
+"lamda_cut_off=lamda_cut_off*100;\n",
+"printf('\nCut off wavelength is %.d nanometer.',lamda_cut_off);\n",
+"\n",
+"//answer in the book for cut off wavelength in the book is given as 1214nm, deviation of 1nm."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10_2: Calculate_cutoff_number_and_number_of_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.10.2 page 2.40\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"a=50d-6; //core radius\n",
+"lamda=1500d-9; //operating wavelength\n",
+"n1=2.53; //core refractive index\n",
+"n2=1.5; //cladding refractive index\n",
+"\n",
+"delta=(n1-n2)/n1; //computing delta\n",
+"v= 2*3.14*a*n1*sqrt(2*delta)/lamda; //computing normalized frequency\n",
+"M=(v)^2/2; //computing guided modes\n",
+"printf('\nNormalized Frequency is %.1f\nTotal number of guided modes are %.d',v,M);\n",
+"printf('\nNOTE - Calculation error in book. \n Normalized frequency is 477, it is calculated as 47.66');\n",
+"\n",
+"//Calculation error in book. Normalized frequency is 477, it is calculated as 47.66, hence answers after that are erroneous.\n",
+"//answers in the book\n",
+"//normalized frequency = 48.(incorrect)\n",
+"//guided modes = 1152.(incorrect)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10_3: Compute_number_of_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.10.3 page 2.41\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"core_diameter=8d-6; //core diameter\n",
+"delta=0.92/100; //relative index difference\n",
+"lamda=1550d-9; //operating wavelength\n",
+"n1=1.45; //core refractive index\n",
+"\n",
+"a=core_diameter/2; //computing core radius\n",
+"v= 2*%pi*a*n1*sqrt(2*delta)/lamda; //computing normalized frequency\n",
+"M=(v)^2/2; //computing guided modes\n",
+"printf('\nNormalized Frequency is %.1f.\nTotal number of guided modes are %.d.',v,M);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10_4: Calculate_delay_difference.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.10.4 page 2.41\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"delta=1/100; //relative index difference\n",
+"n1=1.5; //core refractive index\n",
+"c=3d8;\n",
+"L=6;\n",
+"\n",
+"n2=sqrt(n1^2-2*delta*n1^2); //computing refractive index of cladding\n",
+"delta_T=L*n1^2*delta/(c*n2); //computing pulse broadning\n",
+"delta_T=delta_T*10^11;\n",
+"delta_T=round(delta_T);\n",
+"printf('\nDelay difference between slowest and fastest mode is %d ns/km.',delta_T);\n",
+"printf('\nThis means that a pulse broadnes by %d ns after travel time a distance of %d km.',delta_T,L);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.13_1: Find_modal_briefringence.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.13.1 page 2.54\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L_BL=8d-2; //beat length\n",
+"\n",
+"Br=2*3.14/L_BL; //computing modal briefringence\n",
+"printf('\nModal briefringence is %.1f per meter.',Br);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.13_2: Find_output_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.13.2 page 2.57\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"Pin=500d-6; //input power\n",
+"L=200; //length of fiber\n",
+"loss=2; //loss associated with fiber\n",
+"\n",
+"Pin_dbm=10 * log10 (Pin/(10^-3)); //computing input power in dBm\n",
+"Pin_dbm=round(Pin_dbm);\n",
+"Pout_dbm=Pin_dbm-L*loss; //computing output power level\n",
+"Pout= 10^(Pout_dbm/10);\n",
+"printf('Output power is %.2e mW.',Pout);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.16_1: Calculate_NA_and_maximum_acceptance_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.16.1 page 2.67\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.48; //core refractive index\n",
+"n2=1.46; //cladding refractive index\n",
+"\n",
+"phi = asind(n2/n1); //computing critical angle\n",
+"NA = sqrt(n1^2 - n2^2); //computing numericla aperture\n",
+"theta= asind(NA); //computing acceptance angle\n",
+"printf('\nCritical angle is %.2f degrees.\nNumerical aperture is %.3f.\nAcceptance angle is %.2f degree.',phi,NA,theta);\n",
+"\n",
+"//answers in the book\n",
+"//Critical angle is 80.56 degrees, deviation of 0.01.\n",
+"//Numerical aperture is 0.244, deviation of 0.002.\n",
+"//Acceptance angle is 14.17 degree, deviation of 0.14."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3_1: Estimate_numerical_aperture_and_critical_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.3.1 page 2.10\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"delta = 1/100; // Relative refractive difference index\n",
+"n1=1.46; // Core refractive index (assumption)\n",
+"\n",
+"NA= n1*sqrt(2*delta); //computing numerical aperture\n",
+"theta = 1 - delta;\n",
+"Critical_angle = asind(theta); //computing critical angle\n",
+"\n",
+"printf('\nNumerical aperture is %.2f.\nCritical angle is %.1f degree.',NA,Critical_angle);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3_2: Estimate_numerical_aperture.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.3.2 page 2.10\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"delta = 1/100; // Relative refractive difference index\n",
+"n1=1.47; // Core refractive index \n",
+"\n",
+"NA= n1*sqrt(2*delta); //computing numerical aperture\n",
+"\n",
+"printf('\nNumerical aperture is %.1f.',NA)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4_1: Determine_critical_angle_numerical_aperture_and_acceptance_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.4.1 page 2.11\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.49; //core refractive index\n",
+"n2=1.45; //cladding refractive index\n",
+"\n",
+"phi = asind(n2/n1); //computing critical angle\n",
+"NA = sqrt(n1^2 - n2^2); //computing numericla aperture\n",
+"theta= asind(NA); //computing acceptance angle\n",
+"\n",
+"printf('\nCritical angle is %.2f degrees.\nNumerical aperture is %.3f.\nAcceptance angle is %.2f degree.',phi,NA,theta);\n",
+"\n",
+"//answer in the book for Numerical aperture is 0.343, deviation of 0.003\n",
+"//answer in the book for Acceptance angle is 20.24, deviation of 0.18"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4_2: Determine_numerical_aperture.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.4.2 page 2.12\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"delta = 1/100; // Relative refractive difference index\n",
+"n1=1.47; // Core refractive index \n",
+"\n",
+"NA= n1*sqrt(2*delta); //computing numerical aperture\n",
+"printf('\nNumerical aperture is %.1f.',NA)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4_3: Find_numerical_aperture_and_acceptance_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.4.3 page 2.12\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"delta = 1.2/100; // Relative refractive difference index\n",
+"n1=1.45; // Core refractive index \n",
+"\n",
+"NA= n1*sqrt(2*delta); //computing numerical aperture\n",
+"Acceptance_angle = asind(NA); //computing acceptance angle\n",
+"si = %pi * NA^2; //computing solid acceptance angle\n",
+"\n",
+"printf('\nNumerical aperture is %.3f.\nAcceptance angle is %.2f degree.\nSolid acceptance angle is %.3f radians.',NA,Acceptance_angle,si);\n",
+"\n",
+"//answer in the book for Numerical aperture is 0.224, deviation of 0.001\n",
+"//answer in the book for solid acceptance angle is 0.157, deviation of 0.002"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4_4: Find_acceptance_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.4.4 page 2.13\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"NA = 0.45; // Numerical Aperture\n",
+"\n",
+"Acceptance_angle = asind(NA); //computing acceptance angle.\n",
+"printf('\nAcceptance angle is %.1f degree.',Acceptance_angle);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4_5: Compute_numerical_aperture_and_full_cone_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.4.5 page 2.13\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"diameter = 1; //Diameter in centimeter\n",
+"Focal_length = 10; //Focal length in centimeter\n",
+"\n",
+"radius=diameter/2; //computing radius\n",
+"Acceptance_angle = atand(radius/Focal_length); //computing acceptance angle\n",
+"Conical_full_angle = 2*Acceptance_angle; //computing conical angle\n",
+"Solid_acceptance_angle = %pi*Acceptance_angle^2; //computing solid acceptance angle\n",
+"NA = sqrt(Solid_acceptance_angle/%pi); //computing Numerical aperture\n",
+"\n",
+"printf('\nNumerical aperture is %.2f.\nConical full angle is %.2f degree.',NA,Conical_full_angle);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5_1: Find_acceptance_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.5.1 page 2.17\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"NA = 0.45 //Numerical aperture\n",
+"betaB = 45 // Skew ray change direction by 90 degree at each reflection\n",
+"\n",
+"Meridional_theta = asind(NA); //computing acceptacne angle for meridoinal ray\n",
+"Skew_theta = asind(NA/cosd(betaB)); //computing acceptacne angle for skew ray\n",
+"\n",
+"printf('\nAcceptacne angle for Meridoinal ray is %.2f degree.\nAcceptance angle for Skew ray %.1f degree.',Meridional_theta,Skew_theta);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_10: Determine_normalized_frequency_and_number_of_guided_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.10 page 2.29\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.48; //refractive index of core\n",
+"n2=1.46; //refractive index of cladding\n",
+"lamda1=1320d-9; //Wavelength\n",
+"lamda2=1550d-9; //Wavelength\n",
+"a=25d-6; //radius of core\n",
+"\n",
+"NA=sqrt(n1^2 - n2^2); //computing Numerical aperture\n",
+"v1=2*%pi*a*NA/lamda1; //computing normalized frequency\n",
+"v1=round(v1);\n",
+"M1=v1^2/2; //computing number of guided modes\n",
+"M1=round(M1);\n",
+"v2=2*%pi*a*NA/lamda2;\n",
+"M2=v2^2/2;\n",
+"M2=round(M2);\n",
+"lamda1=lamda1*10^9;\n",
+"lamda2=lamda2*10^9;\n",
+"\n",
+"printf('\nfor %d nm, normalized frequency = %d, Guided modes = %d.',lamda1,v1,M1);\n",
+"printf('\nfor %d nm, normalized frequency = %.2f, Guided modes = %d.',lamda2,v2,M2);\n",
+"\n",
+"//answer in the book,\n",
+"//for 1550 nm, normalized frequency = 24.69(deviation of 0.08), Guided modes = 305(deviation of 3)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_11: Compute_NA_and_number_of_guided_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.11 page 2.29\n",
+"\n",
+"clc;\n",
+"clear all;\n",
+"\n",
+"n1=1.5; //refractive index of core\n",
+"n2=1.38; //refractive index of cladding\n",
+"lamda=1300d-9; //Wavelength\n",
+"a=25d-6; //core radius\n",
+"\n",
+"NA=sqrt(n1^2 - n2^2); //computing Numerical aperture\n",
+"theta= asind(NA); //computing acceptance angle\n",
+"solid_angle=%pi*(NA)^2; //computing solid angle\n",
+"v= 2*%pi*a*NA/lamda; //computing normalized frequency\n",
+"M=(v)^2/2; //computing guided modes\n",
+"M=round(M);\n",
+"printf('\nNumerical aperture is %.2f.\nNormalized frequency is %.2f.\nAcceptance angle is %.2f degrees.\nSolid angle is %.3f radians.\nTotal number of modes are %d.',NA,v,theta,solid_angle,M);\n",
+"printf('\n\n NOTE - Calculation error in the book.\n(2.25-1.9)^0.5=0.59; they have taken 0.35');\n",
+"\n",
+"\n",
+"//Calculation error in the book.(2.25-1.9)^0.5=0.59; they have taken 0.35\n",
+"//answers in the book,\n",
+"//Numerical aperture is 0.35.(incorrect)\n",
+"//Normalized frequency is 42.26.(incorrect)\n",
+"//Acceptance angle is 20.48 degrees.(incorrect)\n",
+"//Solid angle is 0.384 radians.(incorrect)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_12: Compute_core_radius_and_acceptance_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.12 page 2.30\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.48; //refractive index of core\n",
+"n2=1.478; //refractive index of cladding\n",
+"lamda=820d-9; //Wavelength\n",
+"\n",
+"NA=sqrt(n1^2 - n2^2); //computing Numerical aperture\n",
+"theta= asind(NA); //computing acceptance angle\n",
+"solid_angle=%pi*(NA)^2; //computing solid angle\n",
+"\n",
+"printf('\nNumerical aperture is %.3f.\nAcceptance angle is %.2f degrees.\nSolid angle is %.4f radians.',NA,theta,solid_angle);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_13: Estimate_range_of_wavelength_for_single_mode_transmission.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"// Example 2.7.13 page 2.31\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.447; //refractive index of core\n",
+"n2=1.442; //refractive index of cladding\n",
+"lamda=1.3d-6; //Wavelength\n",
+"a=3.6d-6; //core radius\n",
+"\n",
+"NA=sqrt(n1^2 - n2^2); //computing Numerical aperture\n",
+"v= 2*%pi*a*NA/lamda; //computing normalized frequency\n",
+"\n",
+"printf('As normalized frequency is %.2f which is less than 2.405, this fiber will permit single mode transmission',v);\n",
+"\n",
+"lamda_cut_off=v*lamda/2.405\n",
+"lamda_cut_off=lamda_cut_off*10^9\n",
+"printf('\n\nSingle mode operation will occur above this cut off wavelength of %.2f nm',lamda_cut_off);\n",
+"printf('\n\n NOTE - Calculation error in the book.\n(1.447^2 - 1.442^2)^0.5=0.121; they have taken 0.141\nHence calculations after that are incorrect in the book');\n",
+"\n",
+"//Calculation error in the book.(1.447^2 - 1.442^2)^0.5=0.121; they have taken 0.141.Hence calculations after that are incorrect in the book.\n",
+"//They have taken radius as 2.6d-6, whereas in question it is given 3.6d-6.\n",
+"//answers in the book\n",
+"//Normalized frequency is 1.77.(incorrect)\n",
+"//cut off wavelength 956nm.(incorrect)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_14: Estimate_number_of_guided_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.14 page 2.34\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"NA=0.2; //Numericla aperture\n",
+"d=50d-6; //Diameter of core\n",
+"lamda=1d-6; //Wavelength\n",
+"\n",
+"a=d/2; //computing radius\n",
+"v=2*3.14*a*NA/lamda; //computing normalized frequency\n",
+"Mg=v^2/4; //computing mode volume for parabollic profile\n",
+"Mg=round(Mg);\n",
+"printf('\nNormalized Frequency is %.1f.\nTotal number of guided modes are %.d.',v,Mg);\n",
+"\n",
+"//answer in the book for guided modes is 247, deviation of 1."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_15: Determine_core_diameter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.15 page 2.34\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"delta=0.015; //relative refractive index\n",
+"n1=1.48; //core refractive index\n",
+"lamda=0.85d-6; //wavelength\n",
+"\n",
+"a=(2.4*lamda)/(2*3.14*n1*sqrt(2*delta)); //computing radius of core\n",
+"d=2*a; //computing diameter of core\n",
+"a=a*10^7;\n",
+"a=round(a);\n",
+"a=a/10\n",
+"d=d*10^6;\n",
+"printf('\nCore radius is %.1f micrometer.\nCore diameter is %.1f micrometer.',a,2*a);\n",
+"\n",
+"printf('\n\nWhen delta is reduced by 10 percent-');\n",
+"delta=0.0015;\n",
+"a=(2.4*lamda)/(2*3.14*n1*sqrt(2*delta)); //computing radius of core\n",
+"d=2*a; //computing diameter of core\n",
+"a=a*10^7;\n",
+"a=round(a);\n",
+"a=a/10\n",
+"d=d*10^6;\n",
+"printf('\nCore radius is %.1f micrometer.\nCore diameter is %.1f micrometer.',a,2*a);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_16: Find_number_of_guided_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.16 page 2.35\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"NA=0.25; //Numericla aperture\n",
+"d=45d-6; //Diameter of core\n",
+"lamda=1.5d-6; //Wavelength\n",
+"\n",
+"a=d/2; //computing radius\n",
+"v=2*3.14*a*NA/lamda; //computing normalized frequency\n",
+"Mg=v^2/4; //computing mode volume for parabollic profile\n",
+"Mg=round(Mg);\n",
+"printf('\nNormalized Frequency is %.1f.\nTotal number of guided modes are %.d.',v,Mg);\n",
+"\n",
+"//answer in the book for normalized frequency is 23.55, deviation 0.05"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_17: Estimate_number_of_guided_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.17 page 2.35\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"NA=0.25; //Numericla aperture\n",
+"d=45d-6; //Diameter of core\n",
+"lamda=1.2d-6; //Wavelength\n",
+"\n",
+"a=d/2; //computing radius\n",
+"v=2*3.14*a*NA/lamda; //computing normalized frequency\n",
+"Mg=v^2/4; //computing mode volume for parabollic profile\n",
+"Mg=round(Mg);\n",
+"printf('\nNormalized Frequency is %.1f.\nTotal number of guided modes are %.d.',v,Mg);\n",
+"printf('\n\nNOTE - In the question NA is given 0.22. However while solving it is taken as 0.25');\n",
+"\n",
+"// answer in the book for number of guided modes is given as 216, deviation of 1.\n",
+"\n",
+"printf('\nHence solving for NA = 0.22 also,');\n",
+"printf('\n\nWhen NA=0.22');\n",
+"\n",
+"NA=0.22; //Numericla aperture\n",
+"d=45d-6; //Diameter of core\n",
+"lamda=1.2d-6; //Wavelength\n",
+"\n",
+"a=d/2; //computing radius\n",
+"v=2*3.14*a*NA/lamda; //computing normalized frequency\n",
+"Mg=v^2/4; //computing mode volume for parabollic profile\n",
+"Mg=round(Mg);\n",
+"printf('\nNormalized Frequency is %.1f.\nTotal number of guided modes are %.d.',v,Mg);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_18: Compute_cutoff_parameter_and_number_of_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.18 page 2.36\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.54; //refractive index of core\n",
+"n2=1.5; //refractive index of cladding\n",
+"a=25d-6; //Radius of core\n",
+"lamda=1.3d-6; //Wavelength\n",
+"\n",
+"NA=sqrt(n1^2-n2^2);\n",
+"v=2*3.14*a*NA/lamda; //computing normalized frequency\n",
+"v=round(v);\n",
+"Mg=v^2/4; //computing mode volume for parabollic profile\n",
+"Mg=round(Mg);\n",
+"lamda_cut_off=v*lamda/2.405; //computing cut off wavelength\n",
+"lamda_cut_off=lamda_cut_off*10^6;\n",
+"printf('\nNormalized Frequency is %.d.\nTotal number of guided modes are %.d.\nCut off wavelength is %.1f micrometer.',v,Mg,lamda_cut_off);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_1: Find_normalized_frequency_and_number_of_guided_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.1 page 2.23\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"core_diameter=78d-6; //core diameter\n",
+"delta=1.4/100; //relative index difference\n",
+"lamda=0.8d-6; //operating wavelength\n",
+"n1=1.47; //core refractive index\n",
+"\n",
+"a=core_diameter/2; //computing core radius\n",
+"v= 2*3.14*a*n1*sqrt(2*delta)/lamda; //computing normalized frequency\n",
+"M=(v)^2/2; //computing guided modes\n",
+"\n",
+"printf('\nNormalized Frequency is %.3f.\nTotal number of guided modes are %.1f',v,M);\n",
+"printf('\nNOTE - Calculation error, answer in the book for normalized frequency is given as 75.156 which should be 75.306.');\n",
+"\n",
+"//answer in the book for normalized frequency is given as 75.156(incorrect) and for Guided modes is 5648.5(incorrect)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_2: Find_wavelength.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.2 page 2.24\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.47 //refractive index of core\n",
+"a=4.3d-6; //radius of core\n",
+"delta=0.2/100 //relative index difference\n",
+"\n",
+"lamda= 2*3.14*a*n1*sqrt(2*delta)/2.405; //computing wavelength\n",
+"lamda=lamda*10^9;\n",
+"printf('Wavelength of fiber is %d nm.',lamda);\n",
+"printf('\n\nNote:Calculation error, answer given in the book (1230nm) is incorrect.');\n",
+"\n",
+"//answer in the book is given as 1230nm which is incorrect."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_3: Find_core_radius_NA_and_acceptance_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.3 page 2.24\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.482; //refractive index of core\n",
+"n2=1.474; //refractive index of cladding\n",
+"lamda=820d-9; //Wavelength\n",
+"\n",
+"NA=sqrt(n1^2 - n2^2); //computing Numerical aperture\n",
+"theta= asind(NA); //computing acceptance angle\n",
+"solid_angle=%pi*(NA)^2; //computing solid angle\n",
+"a=2.405*lamda/(2*3.14*NA); //computing core radius\n",
+"a=a*10^6;\n",
+"\n",
+"printf('\nNumerical aperture is %.3f.\nAcceptance angle is %.1f degrees.\nSolid angle is %.3f radians.\nCore radius is %.2f micrometer.',NA,theta,solid_angle,a);\n",
+"\n",
+"//answer in the book for Numerical aperture is 0.155, deviation of 0.001.\n",
+"//answer in the book for acceptance angle is 8.9, deviation of 0.1.\n",
+"//answer in the book for solid acceptance angle is 0.075, deviation of 0.001.\n",
+"//answer in the book for core radius is 2.02 micrometer, deviation of 0.02 micrometer."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_4: Estimate_number_of_guided_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.4 page 2.25\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"NA=0.16 //Numerical aperture\n",
+"n1=1.45 //core refractive index\n",
+"d=60d-6 //core diameter\n",
+"lamda=0.82d-6 //wavelength\n",
+"\n",
+"a=d/2; //core radius\n",
+"v=2*3.14*a*NA/lamda; //computing normalized frequency\n",
+"v=round(v);\n",
+"M=v^2/2; //computing guided modes\n",
+"M=floor(M);\n",
+"\n",
+"printf('if normalized frequency is taken as %d, then %d guided modes.',v,M);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_5: Determine_normalized_frequency_and_number_of_guided_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.5 page 2.26\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.48; //core refractive index\n",
+"n2=1.46; //cladding refractive index\n",
+"a=25d-6; //core radius\n",
+"lamda0=850d-9;\n",
+"lamda1=1320d-9;\n",
+"lamda2=1550d-9;\n",
+"\n",
+"NA=sqrt(n1^2-n2^2); //computing numerical aperture\n",
+"v0=2*%pi*a*NA/lamda0; //computing normalized frequency\n",
+"M0=v0^2/2; //computing guided modes\n",
+"M0=floor(M0);\n",
+"v1=2*%pi*a*NA/lamda1;\n",
+"M1=v1^2/2;\n",
+"M1=floor(M1);\n",
+"v2=2*%pi*a*NA/lamda2;\n",
+"M2=v2^2/2;\n",
+"M2=floor(M2);\n",
+"lamda0=lamda0*10^9;\n",
+"lamda1=lamda1*10^9;\n",
+"lamda2=lamda2*10^9;\n",
+"printf('\nfor %d nm, normalized frequency = %.2f, Guided modes = %d.',lamda0,v0,M0);\n",
+"printf('\nfor %d nm, normalized frequency = %.2f, Guided modes = %d.',lamda1,v1,M1);\n",
+"printf('\nfor %d nm, normalized frequency = %.2f, Guided modes = %d.',lamda2,v2,M2);\n",
+"\n",
+"//answers in the book (sligt deviations in each)\n",
+"//for 850 nm, normalized frequency = 45, Guided modes = 1012\n",
+"//for 1320 nm, normalized frequency = 28.91, Guided modes = 419\n",
+"//for 1550 nm, normalized frequency = 24.67, Guided modes = 304 "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_6: Estimate_diameter_of_core.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.6 page 2.27\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"delta=1/100; //relative refractive index\n",
+"n1=1.3; //core refractive index\n",
+"lamda=1100d-9; //wavelength\n",
+"\n",
+"a=(2.4*lamda)/(2*3.14*n1*sqrt(2*delta)); //computing radius of core\n",
+"d=2*a; //computing diameter of core\n",
+"a=a*10^6;\n",
+"d=d*10^6;\n",
+"printf('\nCore radius is %.1f micrometer\nCore diameter is %.1f micrometer',a,d);\n",
+"printf('\nNOTE - In the book they have asked diameter of core. However, they have calculated only radius.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_7: Calculate_NA_and_maximum_angle_of_entrance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.7 page 2.27\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.48; //refractive index of core\n",
+"n2=1.46; //refractive index of cladding\n",
+"\n",
+"NA=sqrt(n1^2-n2^2); //computing Numerical aperture\n",
+"theta=asind(NA); //computing acceptance angle\n",
+"\n",
+"printf('\nNumerical aperture is %.3f.\nAcceptance angle is %.2f degrees.',NA,theta);\n",
+"\n",
+"//answer in the book for Numerical aperture is 0.244, deviation of 0.002.\n",
+"//answer in the book for Acceptance angle is 14.12, deviation of 0.09."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_8: Calculate_normalized_frequency_and_number_of_guided_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.8 page 2.28\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"core_diameter=80d-6; //core diameter\n",
+"delta=1.5/100; //relative index difference\n",
+"lamda=0.85d-6; //operating wavelength\n",
+"n1=1.48; //core refractive index\n",
+"\n",
+"a=core_diameter/2; //computing core radius\n",
+"v= 2*%pi*a*n1*sqrt(2*delta)/lamda; //computing normalized frequency\n",
+"M=(v)^2/2; //computing guided modes\n",
+"printf('\nNormalized Frequency is %.1f.\nTotal number of guided modes are %.d.',v,M);\n",
+"\n",
+"//answer in the book for Guided modes is 2873, deviation of 1."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7_9: Estimate_diameter_of_the_core.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 2.7.9 page 2.28\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"delta=1/100; //relative refractive index\n",
+"n1=1.5; //refractive index of core\n",
+"M=1100; //Guided modes\n",
+"lamda=1.3d-6; //wavelength\n",
+"\n",
+"v=sqrt(2*M); //computing normalized frequecy\n",
+"a=(v*lamda)/(2*3.14*n1*sqrt(2*delta)); //computing radius of core\n",
+"d=a*2;\n",
+"a=a*10^6;\n",
+"d=d*10^6;\n",
+"\n",
+"printf('\nNormalize frequency is %.1f.\nCore radius is %.2f micrometer.\nCore diameter is %.1f micrometer.',v,a,d);\n",
+"printf('\nCalculation error in the book while calculating radius and diameter.');\n",
+"\n",
+"//calculation error in the book.\n",
+"//answers in the book - \n",
+"//Core radius is 46.18 micrometer.(incorrect)\n",
+"//Core diameter is 92.3 micrometer.(incorrect)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.q: Find_briefrengence.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Question 4 page 2.75\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L_BL=8d-2; //beat length\n",
+"\n",
+"Br=2*3.14/L_BL; //computing modal briefringence\n",
+"printf('\nModal briefringence is %.1f per meter.',Br);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.q: Determine_modal_briefringence.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Question 5 page 2.76\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L_BL=0.6d-3; //beat length\n",
+"lamda=1.4d-6; //wavelength\n",
+"L_BL1=70;\n",
+"Bh=lamda/L_BL; //computing high briefringence\n",
+"Bl=lamda/L_BL1; //computing low briefringence\n",
+"\n",
+"printf('\nHigh briefringence is %.2e.\nLow briefringence is %.1e.',Bh,Bl);"
+ ]
+ }
+],
+"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/Optical_Fiber_Communication_by_A_Kalavar/4-Signal_Degradation_in_Fibers.ipynb b/Optical_Fiber_Communication_by_A_Kalavar/4-Signal_Degradation_in_Fibers.ipynb
new file mode 100644
index 0000000..255f68b
--- /dev/null
+++ b/Optical_Fiber_Communication_by_A_Kalavar/4-Signal_Degradation_in_Fibers.ipynb
@@ -0,0 +1,773 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Signal Degradation in Fibers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14_1: Compute_material_dispersio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.14.1 page 4.31\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=1550d-9;\n",
+"lamda0=1.3d-6;\n",
+"s0=0.095;\n",
+"\n",
+"Dt=lamda*s0/4*(1-(lamda0/lamda)^4); //computing material dispersion\n",
+"Dt=Dt*10^9;\n",
+"printf('\nMaterial dispersion at 1550 nm is %.1f ps/nm/km',Dt);\n",
+"printf('\n\nNOTE - Slight deviation in the answer because of printig mistake\nIn problem they have given lamda0 as 1300 nanometer \nbut while solving they have taken it as 1330 nanometer');\n",
+"\n",
+"//answer in the book 15.6 ps/nm/km, deviaton due to printing mistake."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_10: Estimate_bandwidth_pulse_broadening_and_bandwidth_length_product.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.10 page 4.42\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"tau=0.1d-6; //pulse broadning\n",
+"dist=18d3; //distance\n",
+"\n",
+"Bopt=1/(2*tau); //computing optical bandwidth\n",
+"Bopt=Bopt*10^-6;\n",
+"dispertion=tau/dist; //computing dispersion\n",
+"dispertion=dispertion*10^12;\n",
+"BLP=Bopt*dist; //computing Bandwidth length product\n",
+"BLP=BLP*10^-3;\n",
+"printf('\noptical bandwidth is %d MHz.\nDispersion per unit length is %.1f ns/km.\nBandwidth length product is %d MHz.km',Bopt,dispertion,BLP);\n",
+"printf('\nNOTE - printing mistake in the book at dispersion per unit length.\nThey have printed ps/km; it should be ns/km');\n",
+"\n",
+"//printing mistake in the book at dispersion per unit length.They have printed ps/km; it should be ns/km.\n",
+"//answer in the book 5.55 ps/km (incorrect)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_1: Find_maximum_possible_bandwidth_pulse_dispersion_and_bandwidth_length_product.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.1 page 4.35\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"tau=0.1d-6; //pulse broadning\n",
+"dist=20d3; //distance\n",
+"\n",
+"Bopt=1/(2*tau); //computing optical bandwidth\n",
+"Bopt=Bopt*10^-6;\n",
+"dispertion=tau/dist; //computing dispersion\n",
+"dispertion=dispertion*10^12;\n",
+"BLP=Bopt*dist; //computing Bandwidth length product\n",
+"BLP=BLP*10^-3;\n",
+"printf('\noptical bandwidth is %d MHz.\nDispersion per unit length is %d ns/km.\nBandwidth length product is %d MHz.km.',Bopt,dispertion,BLP);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_2: Calculate_overall_signal_attenuation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.2 page 4.36\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L=10; //fiber length in km\n",
+"Pin=100d-6; //input power\n",
+"Pout=5d-6; //output power\n",
+"len=12; //length of optical link\n",
+"interval=1; //splices after interval of 1 km\n",
+"l=0.5; //loss due to 1 splice\n",
+"\n",
+"attenuation=-10*log10(Pin/Pout); //computing attenuation\n",
+"alpha=attenuation/L;\n",
+"signal_attenuation=-alpha*L; //computing signal attenuation\n",
+"splices_loss=(len-interval)*l; //computing splices loss\n",
+"attenuation_loss=-len*alpha //computing attenuation loss\n",
+"total_attenuation=attenuation_loss+splices_loss; //computing total attenuation\n",
+"\n",
+"printf('\nSignal attenuation is %.1f dB/Km.\nOverall attenuation is %d dB for 10 km.\nTotal attenuation is %.1f dBs for 12km.',alpha,signal_attenuation,total_attenuation);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_3: Calculate_bandwidth_dispersion_and_bandwidth_length_product.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.3 page 4.37\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"tau=0.1d-6; //pulse broadning\n",
+"dist=12d3; //distance\n",
+"\n",
+"Bopt=1/(2*tau); //computing optical bandwidth\n",
+"Bopt=Bopt*10^-6;\n",
+"dispertion=tau/dist; //computing dispersion\n",
+"dispertion=dispertion*10^12;\n",
+"BLP=Bopt*dist; //computing Bandwidth length product\n",
+"BLP=BLP*10^-3;\n",
+"printf('\noptical bandwidth is %d MHz.\nDispersion per unit length is %.1f ns/km.\nBandwidth length product is %d MHz.km',Bopt,dispertion,BLP);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_4: Determine_maximum_bit_rate.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.4 page 4.38\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"tau01=10; //pulse broadning ns/mm\n",
+"L1=0.1; //length in kilometer\n",
+"tau02=20; //pulse broadning ns/m\n",
+"L2=1; //length in kilometer\n",
+"tau03=2000; //pulse broadning ns/m\n",
+"L3=2; //length in kilometer\n",
+"\n",
+"tau1=10d-9/1d-6;\n",
+"tau1=tau1*L1;\n",
+"Bopt1=1/(2*tau1); //computing optical bandwidth\n",
+"tau2=20d-9/1d-3;\n",
+"tau2=tau2*L2;\n",
+"Bopt2=1/(2*tau2); //computing optical bandwidth\n",
+"Bopt2=Bopt2*10^-3;\n",
+"tau3=2000d-9/1d-3;\n",
+"tau3=tau3*L3;\n",
+"Bopt3=1/(2*tau3); //computing optical bandwidth\n",
+"\n",
+"\n",
+"printf('\nWhen tau is %d ns/mm, over length %.1f km, optical bandwidth for RZ is %d MHz and for NRZ is %d MHz.',tau01,L1,Bopt1,Bopt1/2 );\n",
+"printf('\nWhen tau is %d ns/m, over length %d km, optical bandwidth for RZ is %.1f KHz and for NRZ is %.1f KHz.',tau02,L2,Bopt2,Bopt2/2 );\n",
+"printf('\nWhen tau is %d ns/m, over length %d km, optical bandwidth for RZ is %d Mz and for NRZ is %.1f Hz.',tau03,L3,Bopt3,Bopt3/2 );\n",
+"\n",
+"printf('\n NOTE - printing errors in the book.\nIn first two cases tau is not multiplied by 2');\n",
+"\n",
+"//Calculation error because, In first two cases tau is not multiplied by 2\n",
+"//answers-\n",
+"//When tau is 10 ns/mm, over length 0.1 km, optical bandwidth for RZ is 1000 MHz and for NRZ is 500 MHz.\n",
+"//When tau is 20 ns/m, over length 1 km, optical bandwidth for RZ is 50 KHz and for NRZ is 25 KHz."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_5: Calculate_maximum_possible_bandwidth_and_dispersion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.5 page 4.39\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"tau=0.1d-6; //pulse broadning\n",
+"dist=15d3; //distance\n",
+"\n",
+"Bopt=1/(2*tau); //computing optical bandwidth\n",
+"Bopt=Bopt*10^-6;\n",
+"dispertion=tau/dist; //computing dispersion\n",
+"dispertion=dispertion*10^12;\n",
+"printf('\noptical bandwidth is %d MHz.\nDispersion per unit length is %.2f ns/km.',Bopt,dispertion);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_6: Compute_delay_difference_rms_pulse_broadening_and_maximum_bit_rate.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.6 page 4.39\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L=5; //length of optical link\n",
+"n1=1.5 //refractive index\n",
+"c=3d8; //speed of light\n",
+"delta=1/100; //relative refractive index\n",
+"\n",
+"delTS=L*n1*delta/c; //computing delay difference\n",
+"delTS=delTS*10^12;\n",
+"sigmaS=L*n1*delta/(2*sqrt(3)*c); //computing rms pulse broadning\n",
+"sigmaS=sigmaS*10^12;\n",
+"B=1/(2*delTS); //computing maximum bit rate\n",
+"B=B*10^3;\n",
+"B_acc=0.2/(sigmaS); //computing accurate bit rate\n",
+"B_acc=B_acc*10^3;\n",
+"BLP=B_acc*L; //computing Bandwidth length product\n",
+"\n",
+"printf('\nDelay difference is %d ns.\nRMS pulse broadning is %.2f ns.\nBit rate is %.1f Mbit/s.\nAccurate bit rate is %.2f Mbits/s.\nBandwidth length product is %.2f MHz.km.',delTS,sigmaS,B,B_acc,BLP);\n",
+"\n",
+"//answer in the book for RMS pulse broadning is 72.25 ns, deviation of 0.08ns.\n",
+"//answer in the book for Bandwidth length product is 13.85 MHz.km, deviation of 0.01MHz.km."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_7: Estimate_rms_pulse_broadening_and_bandwidth_length_product.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.7 page 4.40\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"NA=0.3; //numerical aperture\n",
+"n1=1.45; //refractive index\n",
+"M=250; //material dispertion parameter in ps/nm/km\n",
+"L=1; //length\n",
+"BW=50; //Bandwidth in nm\n",
+"c=3d8; //speed of light\n",
+"\n",
+"sigmaLamda=BW*L;\n",
+"sigmaM=sigmaLamda*L*M*10^-12;\n",
+"sigmaS=10^3*L*(NA)^2/(4*sqrt(3)*n1*c);\n",
+"sigmaT=sqrt(sigmaM^2+sigmaS^2); //computing total RMS pulse broadning\n",
+"BLP=0.2/sigmaT; //computing bandwidth length product\n",
+"sigmaT=sigmaT*10^9;\n",
+"sigmaM=sigmaM*10^9;\n",
+"sigmaS=sigmaS*10^9;\n",
+"BLP=BLP/10^6;\n",
+"printf('\nTotal RMS pulse broadning is %.1f ns/km.\nBandwidth length product is %.1f MHz.km',sigmaT,BLP);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_8: Estimate_Bandwidth_dispersion_and_bandwidth_length_product.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.8 page 4.41\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"tau=0.1d-6; //pulse broadning\n",
+"dist=10d3; //distance\n",
+"\n",
+"Bopt=1/(2*tau); //computing optical bandwidth\n",
+"Bopt=Bopt*10^-6;\n",
+"dispertion=tau/dist; //computing dispersion\n",
+"dispertion=dispertion*10^12;\n",
+"BLP=Bopt*dist; //computing Bandwidth length product\n",
+"BLP=BLP*10^-3;\n",
+"printf('\noptical bandwidth is %d MHz.\nDispersion per unit length is %.1f ns/km.\nBandwidth length product is %d MHz.km.',Bopt,dispertion,BLP);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15_9: Estimate_rms_pulse_broadening.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.15.9 page 4.41\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"RSW=0.0012; //relative spectral width\n",
+"lamda=0.85d-6; //wavelength\n",
+"L=1; //distance in km (assumed)\n",
+"M=100; //material dispersion parameter in ps/nm/km (assumed)\n",
+"\n",
+"sigma_lamda=RSW*lamda;\n",
+"sigmaM=sigma_lamda*L*M*10^6; //computing rms pulse broadning.\n",
+"printf('\nRMS pulse broadning is %.3f ns/km.',sigmaM);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16_1: Estimate_rms_pulse_broadening.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.16.1 page 4.43\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"RSW=0.0012; //relative spectral width\n",
+"lamda=0.90d-6; //wavelength\n",
+"L=1; //distance in km (assumed)\n",
+"P=0.025; //material dispersion parameter\n",
+"c=3d5; //speed of light in km/s\n",
+"\n",
+"M=10^3*P/(c*lamda); //computing material dispersion\n",
+"sigma_lamda=RSW*lamda;\n",
+"sigmaM=sigma_lamda*L*M*10^7; //computing RMS pulse broadning\n",
+"sigmaB=25*L*M*10^-3;\n",
+"\n",
+"printf('\nMaterial dispersion parameter is %.2f ps/nm/km.\nRMS pulsr broadning when sigma_lamda is 25 is %.1f ns/km.\nRMS pulse broadning is %.1f ns/km.',M,sigmaB,sigmaM);\n",
+"\n",
+"//answer in the book for RMS pulse broadning is 0.99 ns/km, deviation of 0.01ns/km."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.18_1: Find_delay_difference_and_rms_pulse_broadening.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.18.1 page 4.45\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L=10; //length of optical link\n",
+"n1=1.49 //refractive index\n",
+"c=3d8; //speed of light\n",
+"delta=1/100; //relative refractive index\n",
+"\n",
+"delTS=L*n1*delta/c; //computing delay difference\n",
+"delTS=delTS*10^12;\n",
+"sigmaS=L*n1*delta/(2*sqrt(3)*c); //computing rms pulse broadning\n",
+"sigmaS=sigmaS*10^12;\n",
+"B=1/(2*delTS); //computing maximum bit rate\n",
+"B=B*10^3;\n",
+"B_acc=0.2/(sigmaS); //computing accurate bit rate\n",
+"B_acc=B_acc*10^3;\n",
+"BLP=B_acc*L; //computing Bandwidth length product\n",
+"\n",
+"printf('\nDelay difference is %d ns.\nRMS pulse broadning is %.1f ns.\nBit rate is %.1f Mbit/s.\nAccurate bit rate is %.3f Mbits/s.\nBandwidth length product is %.1f MHz.km',delTS,sigmaS,B,B_acc,BLP);\n",
+"\n",
+"//answer for maximum bit rate is given as 1.008 Mb/s, deviation of 0.008 Mb/s."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3_1: Find_signal_attenuation_and_InputOutput_ratio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"// Example 4.3.1 page 4.4\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L=10; //fiber length in km\n",
+"Pin=150d-6; //input power\n",
+"Pout=5d-6; //output power\n",
+"len=20; //length of optical link\n",
+"interval=1; //splices after interval of 1 km\n",
+"l=1.2; //loss due to 1 splice\n",
+"\n",
+"attenuation=10*log10(Pin/Pout);\n",
+"alpha=attenuation/L;\n",
+"attenuation_loss=alpha*20;\n",
+"splices_loss=(len-interval)*l;\n",
+"total_loss=attenuation_loss+splices_loss;\n",
+"power_ratio=10^(total_loss/10);\n",
+"\n",
+"printf('\nSignal attenuation is %.2f dBs.\nSignal attenuation is %.3f dB/Km.\nTotal loss in 20 Km fiber is %.2f dbs.\nTotal attenuation is %.2f dBs.\ninput/output ratio is %e.',attenuation,alpha,attenuation_loss,total_loss,power_ratio);\n",
+"printf('\nAs signal attenuation is approximately equal to 10^5, we can say that line is very lossy.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4_1: Find_output_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.4.1 page 4.8\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L=30; //fiber length\n",
+"Pin=200d-6; //input power\n",
+"alpha=0.8; //signal attenuation per km\n",
+"\n",
+"Pout=Pin/(10^(alpha*L/10)); //computing output power\n",
+"Pout=Pout*10^6;\n",
+"printf('\nOutput power is %.3f microwatt.',Pout);\n",
+"printf('\nNOTE - calculation error in the book.\nThey have taken 0.8*30=2.4 which actually is 24.');\n",
+"\n",
+"//calculation error in the book.They have taken 0.8*30=2.4 which actually is 24.\n",
+"//answer in the book is 115.14 microwatt.(incorrect)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6_1: Find_attenuation_due_to_Rayleigh_scattering.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.6.1 page 4.12\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"beta_c=8d-11; //isothermal compressibility\n",
+"n=1.46; //refractive index\n",
+"P=0.286; //photoelastic constat\n",
+"k=1.38d-23; //Boltzmnn constant\n",
+"T=1500; //temperature\n",
+"L=1000; //length\n",
+"lamda=1000d-9; //wavelength\n",
+"\n",
+"gamma_r = 8*(3.14^3)*(P^2)*(n^8)*beta_c*k*T/(3*(lamda^4)); //computing coefficient\n",
+"attenuation=%e^(-gamma_r*L); //computing attenuation\n",
+"printf('\nAttenuation due to Rayleigh scattering is %.3f.',attenuation);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6_2: Determine_attenuation_due_to_Rayleigh_scattering.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.6.2 page 4.13\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"beta_c=7d-11; //isothermal compressibility\n",
+"n=1.46; //refractive index\n",
+"P=0.29; //photoelastic constat\n",
+"k=1.38d-23; //Boltzmnn constant\n",
+"T=1400; //temperature\n",
+"L=1000; //length\n",
+"lamda=0.7d-6; //wavelength\n",
+"\n",
+"gamma_r = 8*(3.14^3)*(P^2)*(n^8)*beta_c*k*T/(3*(lamda^4)); //computing coefficient\n",
+"attenuation=%e^(-gamma_r*L); //computing attenuation\n",
+"gamma_r=gamma_r*1000;\n",
+"printf('\nRaleigh Scattering corfficient is %.3f * 10^-3 per meter\n',gamma_r);\n",
+"printf('\nNOTE - in quetion they have asked for attenuation but in solution they have not calcualted\n');\n",
+"printf('\nAttenuation due to Rayleigh scattering is %.3f',attenuation);\n",
+"\n",
+"//answer for Raleigh Scattering corfficient in the book is given as 0.804d-3, deviation of 0.003d-3"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8_1: Compare_SRS_and_SBS_threshold_powers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.8.1 page 4.17\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"d=5; //core diameter\n",
+"alpha=0.4; //attenuation\n",
+"B=0.5; //Bandwidth\n",
+"lamda=1.4; //wavelength\n",
+"PB=4.4d-3*d^2*lamda^2*alpha*B; //computing threshold power for SBS\n",
+"PR=5.9d-2*d^2*lamda*alpha; //computing threshold power for SRS\n",
+"PB=PB*10^3;\n",
+"PR=PR*10^3;\n",
+"printf('\nThreshold power for SBS is %.1f mW.\nThreshold power for SRS is %.3f mW.',PB,PR);\n",
+"printf('\nNOTE - Calculation error in the book while calculating threshold for SBS.\nAlso, while calculating SRS, formula is taken incorrectly, Bandwidth is multiplied in second step, which is not in the formula.');\n",
+"\n",
+"//Calculation error in the book while calculating threshold for SBS. Also, while calculating SRS, formula is taken incorrectly,Bandwidth is multiplied in second step, which is not in the formula\n",
+"//answers in the book\n",
+"//PB=30.8mW\n",
+"//PR=0.413mW"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9_1: Find_critical_radius_of_curvature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.9.1 page 4.19\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.5; //refractive index of core\n",
+"delta=0.03/100; //relative refractive index\n",
+"lamda=0.82d-6; //wavelength\n",
+"\n",
+"n2=sqrt(n1^2-2*delta*n1^2); //computing cladding refractive index\n",
+"Rc=(3*n1^2*lamda)/(4*3.14*(n1^2-n2^2)^1.5); //computing critical radius\n",
+"Rc=Rc*10^3;\n",
+"printf('\nCritical radius is %.1f micrometer.',Rc);\n",
+"\n",
+"//answer in the book is 9 micrometer, deviation of 0.1 micrometer."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9_2: Find_critical_radius_for_both_single_mode_and_multi_mode_fiber.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 4.9.2 page 4.20\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.45; //refractive index of core\n",
+"delta=3/100; //relative refractive index\n",
+"lamda=1.5d-6; //wavelength\n",
+"a=5d-6; //core radius\n",
+"\n",
+"n2=sqrt(n1^2-2*delta*n1^2); //computing cladding refractive index\n",
+"Rc=(3*n1^2*lamda)/(4*3.14*(n1^2-n2^2)^0.5); //computing critical radius for single mode\n",
+"Rc=Rc*10^6;\n",
+"printf('\nCritical radius is %.2f micrometer',Rc);\n",
+"\n",
+"lamda_cut_off= 2*3.14*a*n1*sqrt(2*delta)/2.405;\n",
+"\n",
+"RcSM= (20*lamda/(n1-n2)^1.5)*(2.748-0.996*lamda/lamda_cut_off)^-3; //computing critical radius for single mode\n",
+"RcSM=RcSM*10^6;\n",
+"printf('\nCritical radius for single mode fiber is %.2f micrometer.',RcSM);\n",
+"printf('\nNOTE - Calculation error in the book.\n(2.748-0.996*lamda/lamda_cut_off)^-3; in this term raised to -3 is not taken in the book.');\n",
+"\n",
+"//Calculation error in the book.(2.748-0.996*lamda/lamda_cut_off)^-3; in this term raised to -3 is not taken in the book.\n",
+"//answer in the book is 7.23mm.(incorrect)"
+ ]
+ }
+],
+"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/Optical_Fiber_Communication_by_A_Kalavar/5-Fiber_Optic_Splices_Connectors_and_Couplers.ipynb b/Optical_Fiber_Communication_by_A_Kalavar/5-Fiber_Optic_Splices_Connectors_and_Couplers.ipynb
new file mode 100644
index 0000000..0819fc5
--- /dev/null
+++ b/Optical_Fiber_Communication_by_A_Kalavar/5-Fiber_Optic_Splices_Connectors_and_Couplers.ipynb
@@ -0,0 +1,381 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Fiber Optic Splices Connectors and Couplers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2_1: Calculate_loss_due_to_Fresnel_reflection.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.2.1 page 5.2\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.47; //refractive index of fiber\n",
+"n=1; //refractive index of air\n",
+"\n",
+"r=((n1-n)/(n1+n))^2; //computing fraction of light reflected\n",
+"loss=-10*log10(1-r); //loss\n",
+"total_loss=2*loss;\n",
+"printf('r = %.3f, which means %.1f percent of the transimitted light is reflected at one interface',r,r*100);\n",
+"printf('\nTotal loss is %.3f dB',total_loss);\n",
+"\n",
+"//answer in the book for total loss of fiber is 0.318 dB, deviation of 0.002"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2_2: Estimate_insertion_loss_due_to_lateral_misalingment.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.2.2 page 5.4\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.47; //refractive index of fiber\n",
+"n=1; //refractive index of air\n",
+"d=40d-6; //core diameter\n",
+"y=4d-6; //lateral dispalcement\n",
+"\n",
+"a=d/2; //computing core radius\n",
+"eta_lateral = (16*(n1/n)^2)/(%pi*(1+(n1/n))^4)*(2*acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2)^0.5); //computing eta_lateral with air gap\n",
+"loss=-10*log10(eta_lateral); //computing loss when air gap is present\n",
+"eta_lateral1=(2*acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2)^0.5)/%pi; //computing eta_lateral without air gap\n",
+"loss1=-10*log10(eta_lateral1); //computing loss when air gap is not present\n",
+"\n",
+"printf('\nloss with air gap is %.2f dB.\nloss with no air gap is %.2f dB.\n Thus we can say that loss reduces considerably if there is no air gap.',loss,loss1);\n",
+"\n",
+"//answer in the book for loss with air gap is 0.91dB, deviation of 0.01dB."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2_3: Estimate_angular_misalignment_insertion_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.2.3 page 5.5\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.48; //refractive index of fiber\n",
+"n=1; //refractive index of air\n",
+"theta=10; //angle in degree\n",
+"NA1=0.3;\n",
+"NA2=0.6\n",
+"eta_angular1= (16*(n1/n)^2)/((1+(n1/n))^4)*(1-((n*theta*%pi/180)/(%pi*NA1))); //computing eta angular\n",
+"eta_angular2= (16*(n1/n)^2)/((1+(n1/n))^4)*(1-((n*theta*%pi/180)/(%pi*NA2))); //computing eta angular\n",
+"loss1=-10*log10(eta_angular1); //computing loss\n",
+"loss2=-10*log10(eta_angular2); //computing loss\n",
+"printf('\nLoss when NA is %.1f is %.2f dB.\nLoss when NA is %.1f is %.2f dB.',NA1,loss1,NA2,loss2);\n",
+"printf('\nThus we can say that insertion loss is considerably reduced with higher NA.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2_4: Loss_due_to_Fresnel_reflection.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.2.4 page 5.7\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.5; //refractive index of fiber\n",
+"n=1; //refractive index of air\n",
+"\n",
+"r=((n1-n)/(n1+n))^2; //computing fraction of light reflected\n",
+"loss=-10*log10(1-r); //loss\n",
+"total_loss=2*loss;\n",
+"printf('r = %.2f, which means %.1f percent of the transimitted light is reflected at one interface',r,r*100);\n",
+"printf('\nTotal loss is %.2f dB',total_loss);\n",
+"\n",
+"//answer in the book for total loss of fiber is 0.36 dB, deviation of 0.01"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2_5: Estimate_insertion_loss_due_to_lateral_misalignment.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.2.5 page 5.7\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.5; //refractive index of fiber\n",
+"n=1; //refractive index of air\n",
+"d=50d-6; //core diameter\n",
+"y=5d-6; //lateral dispalcement\n",
+"\n",
+"a=d/2; //computing core radius\n",
+"eta_lateral = (16*(n1/n)^2)/(%pi*(1+(n1/n))^4)*(2*acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2)^0.5); //computing eta_lateral with air gap\n",
+"loss=-10*log10(eta_lateral); //computing loss when air gap is present\n",
+"eta_lateral1=(2*acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2)^0.5)/%pi; //computing eta_lateral without air gap\n",
+"loss1=-10*log10(eta_lateral1); //computing loss when air gap is not present\n",
+"\n",
+"printf('\nloss with air gap is %.2f dB.\nloss with no air gap is %.2f dB.',loss,loss1);\n",
+"\n",
+"//answer in the book for loss with air gap is 0.95dB, deviation of 0.01dB."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2_6: Total_insertion_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.2.6 page 5.8\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=1.47; //refractive index of fiber\n",
+"n=1; //refractive index of air\n",
+"theta=3; //angle in degree\n",
+"d=80d-6; //core diameter\n",
+"y=2d-6; //lateral dispalcement\n",
+"delta=2/100; //relative refractive index\n",
+"\n",
+"a=d/2; //computing core radius\n",
+"eta_lateral = (16*(n1/n)^2)/(%pi*(1+(n1/n))^4)*(2*acos(y/(2*a))-(y/a)*(1-(y/(2*a))^2)^0.5); //computing eta lateral\n",
+"loss_lateral=-10*log10(eta_lateral); //computing loss due to lateral misalignment\n",
+"eta_angular= (16*(n1/n)^2)/((1+(n1/n))^4)*(1-((n*theta*%pi/180)/(%pi*n1*(sqrt(2*delta))))); //computing eta angular\n",
+"loss_angular=-10*log10(eta_angular); //computing loss due to angular misalignment\n",
+"total_loss=loss_lateral+loss_angular; //computing total loss due to misalignment\n",
+"printf('\nloss due to lateral misalignment is %.2f dB.\nloss due to angular misalignment is %.2f dB.\nTotal loss is %.2f dB',loss_lateral,loss_angular,total_loss);\n",
+"\n",
+"//answer in the book for loss due to lateral misalignment is 0.48 dB, deviation of 0.02.\n",
+"//answer in the book for total loss due is 1.05 dB, deviation of 0.02."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4_1: Find_insertion_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.4.1 page 5.17\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"d=1d-6; //lateral displacement\n",
+"W=4.95d-6; //MFD\n",
+"\n",
+"Lsm_lat= -10*log10(%e^(-(d/W)^2)); //computing loss\n",
+"printf('\nInsertion loss is %.2f dB.',Lsm_lat);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4_2: Find_angular_misalignment_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.4.2 page 5.18\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=1.3d-6; //wavelength\n",
+"theta=1; //angle in degree\n",
+"n2=1.465; //cladding refractive index\n",
+"W=4.95d-6; //MFD\n",
+"\n",
+"Lsm_ang= -10*log10(%e^(-(%pi*n2*W*(theta*%pi/180)/lamda)^2)); //computing loss\n",
+"printf('\nInsertion loss is %.2f dB.',Lsm_ang);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6_1: Determine_excess_loss_insertion_loss_cross_talk_and_split_ratio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.6.1 page 5.30\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"p1=50d-6;\n",
+"p2=0.003d-6;\n",
+"p3=25d-6;\n",
+"p4=26.5d-6\n",
+"\n",
+"EL=10*log10(p1/(p3+p4)); //computing excess loss\n",
+"IL13=10*log10(p1/p3); //computing insertion loss\n",
+"IL14=10*log10(p1/p4); //computing insertion loss\n",
+"ct=10*log10(p2/p1); //computing cross talk\n",
+"sr=(p3/(p3+p4))*100; //computing split ratio\n",
+"\n",
+"printf('\nExcess loss is %.2f dB.\nInsertion loss from port 1 to port 3 is %.2f dB.\nInsertion loss from port 1 to port 4 is %.2f dB.\ncross talk is %.2f dB.\nSplit ratio is %.2f percent',EL,IL13,IL14,ct,sr );\n",
+"printf('\nNOTE - calculation error in the book.\n Minus sign is not printed in the answer of excess loss.\nP1 is taken 25 instead of 50 while calculating cross talk.');\n",
+"\n",
+"//calculation error in the book.Minus sign is not printed in the answer of excess loss.P1 is taken 25 instead of 50 while calculating cross talk. \n",
+"//answers in the book with slight deviations\n",
+"//Excess loss is 0.12 dB.(printing error)\n",
+"//Insertion loss from port 1 to port 4 is 2.75 dB.\n",
+"//cross talk is -39.2 dB. (calculation error)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6_2: Find_total_loss_and_average_insertion_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 5.6.2 page 5.32\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"N=16; //Number of ports\n",
+"Pin=1d-3; //input power\n",
+"Pout=12d-6; //output power\n",
+"\n",
+"split_loss=10*log10(N); //computing split loss\n",
+"excess_loss=10*log10(Pin/(Pout*N)); //computing excess loss\n",
+"total_loss=split_loss+excess_loss; //computing total loss\n",
+"insertion_loss= 10*log10(Pin/Pout); //computing insertion loss\n",
+"\n",
+"printf('\nTotal loss is %.2f dB.\nInsertion loss is %.2f dB.',total_loss,insertion_loss);\n",
+"\n",
+"//answer in the book for Total loss is 19.14, deviation of 0.06dB.\n",
+"//answer in the book for insertion loss is 19.20, deviation of 0.01dB."
+ ]
+ }
+],
+"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/Optical_Fiber_Communication_by_A_Kalavar/6-Optical_Sources.ipynb b/Optical_Fiber_Communication_by_A_Kalavar/6-Optical_Sources.ipynb
new file mode 100644
index 0000000..9f1e830
--- /dev/null
+++ b/Optical_Fiber_Communication_by_A_Kalavar/6-Optical_Sources.ipynb
@@ -0,0 +1,363 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Optical Sources"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.14_1: Single_longitudinal_mode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 6.14.1 page 6.42\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"// This is example does not consist of any numerical computation\n",
+"\n",
+"printf('\nQuestion - What do you understand by single longitudinal mode laser or SLM? ')\n",
+"printf('\nAnswer - \nIn laser operation optical gain alone is not sufficient for laser operation but a minimum amount of gain is also necessary.\nThis gain can be achieved when laser is pumped above threshold level.\nIn simplest laser structure we have p-n junction.Active layer is sandwitched between p and n type layers of higher bandgap material. Such broad area semiconductor laser need high threshold current and light confinement becomes difficult.\nGain guided semiconductor laser limit the current injection over a narrow stripe thus overcome the problem of light confinement.They are also called stripe geometry lasers.\nIn index guided laser an in index step is introduced to form waveguide.\nIn buried heterostructure laser the active region in buried by layers of lower refractive indices.\nWhen width and thickness of the active layer is controlled, light can be made to emerge in a single spatial mode, but the problem arises when such lasers oscillate in many longitudinal modes in Fabry Perot cavity.\nThe spectral width obtained is about 2-4 nm which can be tolerated for 1.3 micrometer operation, but for systems operating near 1.55 micrometer at higher bit rates such multimode lasers can not be used. At such times laser which emit light in a single longitudnal mode are required to give higher bit rates than 1 Gb/s. They are called Single Longitudinal Mode (SLM) lasers.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.21_1: Determine_total_recombination_lifetime_and_internally_generated_power_emission.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 6.21.1 page 6.59\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"tr=50; //radiative recombination lifetime\n",
+"tnr=85; //non-radiative recombination lifetime\n",
+"h=6.624d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"i=35d-3; //current\n",
+"lamda=0.85d-6; //wavelength\n",
+"\n",
+"t=tr*tnr/(tr+tnr); //computing total recombination time\n",
+"eta=t/tr; //computing internal quantum efficiency\n",
+"Pint=eta*h*c*i/(q*lamda); //computing internally generated power\n",
+"Pint=Pint*10^3\n",
+"\n",
+"printf('\nTotal recombinaiton time is %.2f ns.\nInternal quantum efficiency is %.3f.\nInternally generated power is %.1f mW.',t,eta,Pint);\n",
+"\n",
+"//answer in the book for Internal quantum efficiency is 0.629, deviation of 0.001.\n",
+"//answer in the book for Internally generated power is 32.16 mW, deviation of 0.04 mW."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.21_2: EX6_21_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 6.21.2 page 6.59\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"tr=30; //radiative recombination lifetime\n",
+"tnr=100; //non-radiative recombination lifetime\n",
+"h=6.624d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"i=40d-3; //current\n",
+"lamda=1310d-9; //wavelength\n",
+"\n",
+"t=tr*tnr/(tr+tnr); //computing total recombination time\n",
+"eta=t/tr; //computing internal quantum efficiency\n",
+"Pint=eta*h*c*i/(q*lamda); //computing internally generated power\n",
+"Pint=Pint*10^3\n",
+"\n",
+"printf('\nTotal recombinaiton time is %.2f ns.\nInternal quantum efficiency is %.3f.\nInternally generated power is %.2f mW.',t,eta,Pint);\n",
+"\n",
+"//answer in the book for Total recombinaiton time is 23.07 ns, deviation of 0.01ns."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.21_3: Determine_total_recombination_lifetime_and_internally_generated_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 6.21.3 page 6.60\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"tr=50; //radiative recombination lifetime\n",
+"tnr=110; //non-radiative recombination lifetime\n",
+"h=6.624d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"i=40d-3; //current\n",
+"lamda=0.87d-6; //wavelength\n",
+"\n",
+"t=tr*tnr/(tr+tnr); //computing total recombination time\n",
+"eta=t/tr; //computing internal quantum efficiency\n",
+"Pint=eta*h*c*i/(q*lamda); //computing internally generated power\n",
+"Pint=Pint*10^3\n",
+"\n",
+"printf('\nTotal recombinaiton time is %.2f ns.\nInternal quantum efficiency is %.4f.\nInternally generated power is %.2f mW.',t,eta,Pint);\n",
+"\n",
+"//answers in the book with slight deviaitons\n",
+"//Total recombinaiton time is 34.37 ns, deviation of 0.01ns.\n",
+"//Internal quantum efficiency is 0.6874, deviaiton of 0.0001.\n",
+"//Internally generated power is 39.24 mW, deviation of 0.02mW."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.22_1: Determine_optical_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 6.22.1 page 6.68\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"f1=10d6; //frequency\n",
+"f2=100d6\n",
+"t=4d-9;\n",
+"Pdc=280d-6; //optincal output power\n",
+"\n",
+"w1=2*%pi*f1; //computing omega\n",
+"Pout1=Pdc*10^6/(sqrt(1+(w1*t)^2)); //computing output power\n",
+"\n",
+"w2=2*%pi*f2; //computing omega\n",
+"Pout2=Pdc*10^6/(sqrt(1+(w2*t)^2)); //computing output power\n",
+"\n",
+"printf('Ouput power at 10 MHz is %.2f microwatt.\nOuput power at 100 MHz is %.2f microwatt.\nConclusion when device is drive at higher frequency the optical power reduces.\nNOTE - calculation error. In the book square term in the denominater is not taken.',Pout1,Pout2);\n",
+"\n",
+"BWopt = sqrt(3)/(2*%pi*t);\n",
+"BWelec = BWopt/sqrt(2);\n",
+"BWopt=BWopt*10^-6;\n",
+"BWelec=BWelec*10^-6;\n",
+"\n",
+"printf('\n3 dB optical power is %.2f MHz.\n3 dB electrical power is %.2f MHz.',BWopt,BWelec);\n",
+"\n",
+"\n",
+"//calculation error. In the book square term in the denominater is not taken.\n",
+"//answers in the book - \n",
+"//Ouput power at 10 MHz is 228.7 microwatt.(incorrect)\n",
+"//Ouput power at 100 MHz is 175 microwatt.(incorrect)\n",
+"//3 dB optical power is 68.8 MHz, deviation of 0.12\n",
+"//3 dB electrical power is 48.79 MHz, deviation of 0.06 "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.22_2: To_calculate_emitted_optical_power_as_percent_of_internal_optical_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 6.22.2 page 6.69\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=3.5; //refractive index\n",
+"n=1; //refractive index of air\n",
+"F=0.69; //transmission factor\n",
+"\n",
+"eta = 100*(n1*(n1+1)^2)^-1; //computing eta\n",
+"\n",
+"printf('\neta external is %.1f percent i.e. small fraction of intrnally generated opticalpower is emitted from the device.',eta);\n",
+"printf('\n\n OR we can also arrive at solution,\n');\n",
+"\n",
+"r= 100*F*n^2/(4*n1^2); //computing ratio of Popt/Pint\n",
+"\n",
+"printf('\n Popt/Pint is %.1f percent',r);\n",
+"\n",
+"printf('\nNOTE - printing mistake at final answer.\nThey have printed 40 percent it should be 1.4 percent');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.22_3: Find_operating_lifetime.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 6.22.3 page 6.73\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"beta0=1.85d7;\n",
+"T=293; //temperature\n",
+"k=1.38d-23; //Boltzman constant\n",
+"Ea=0.9*1.6d-19;\n",
+"theta=0.65; //thershold\n",
+"\n",
+"betar=beta0*%e^(-Ea/(k*T));\n",
+"t=-log(theta)/betar;\n",
+"\n",
+"printf('\nDegradation rate is %.2e per hour.\nOperating lifetime is %.1e hour.',betar,t);\n",
+"\n",
+"//answer in the book for Degradation rate is 6.4e-09 per hour, deviation of 0.08e-9\n",
+"//answer in the book for Operating lifetime is 6.7e+07 hour, deviaiton of 0.1e1"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3_1: Find_operating_wavelength.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 6.3.1 page 6.7\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"x=0.07;\n",
+"Eg=1.424+1.266*x+0.266*x^2;\n",
+"lamda=1.24/Eg; //computing wavelength\n",
+"printf('\nWavlength is %.3f micrometer.',lamda);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3_2: Find_out_number_of_longitudinal_modes_and_frequency_separation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 6.3.2 page 6.12\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n=1.7; //refractive index\n",
+"L=5d-2; //distance between mirror\n",
+"c=3d8; //speed of light\n",
+"lamda=0.45d-6; //wavelength\n",
+"\n",
+"k=2*n*L/lamda; //computing number of modes\n",
+"delf=c/(2*n*L); //computing mode separation\n",
+"delf=delf*10^-9;\n",
+"\n",
+"printf('\nNumber of modes are %.2e.\nFrequency separation is %.2f GHz.',k,delf);\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/Optical_Fiber_Communication_by_A_Kalavar/7-Source_to_Fiber_Power_Launching_and_Photodetectors.ipynb b/Optical_Fiber_Communication_by_A_Kalavar/7-Source_to_Fiber_Power_Launching_and_Photodetectors.ipynb
new file mode 100644
index 0000000..8335019
--- /dev/null
+++ b/Optical_Fiber_Communication_by_A_Kalavar/7-Source_to_Fiber_Power_Launching_and_Photodetectors.ipynb
@@ -0,0 +1,829 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Source to Fiber Power Launching and Photodetectors"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10_1: Find_multiplication_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.10.1 page 7.53\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=0.85d-6;\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"eta=75/100; //quantum efficiency\n",
+"P0=0.6d-6; //incident optical power\n",
+"Im=15d2; //avalanche gain\n",
+"\n",
+"R= eta*q*lamda/(h*c); //computing responsivity\n",
+"Ip=10^8*P0*R; //computing photocurrent\n",
+"Ip=floor(Ip);\n",
+"M=Im/Ip; //computing multiplication factor\n",
+"printf('\nMultiplication factor is %d.',M);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10_2: Find_avalanche_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.10.3 page 7.54\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=900d-9;\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"eta=65/100; //quantum efficiency\n",
+"P0=0.5d-6; //incident optical power\n",
+"Im=10d2; //avalanche gain\n",
+"\n",
+"R= eta*q*lamda/(h*c); //computing responsivity\n",
+"Ip=10^8*P0*R; //computing photocurrent\n",
+"M=Im/Ip; //computing multiplication factor\n",
+"printf('\nMultiplication factor is %d.',M);\n",
+"\n",
+"//answer in the book is 41.7 deviation 0.3."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10_3: Find_multiplication_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.10.3 page 7.54\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=900d-9;\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"eta=65/100; //quantum efficiency\n",
+"P0=0.5d-6; //incident optical power\n",
+"Im=10d2; //avalanche gain\n",
+"\n",
+"R= eta*q*lamda/(h*c); //computong responsivity\n",
+"Ip=10^8*P0*R; //computing photocurrent\n",
+"Ip=floor(Ip);\n",
+"M=Im/Ip; //computing multiplication factor\n",
+"printf('\nMultiplication factor is %d.',M);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10_4: Find_wavelength_incident_optical_power_and_responsivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.10.4 page 7.54\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.602d-19; //charge of electron\n",
+"eta=70/100; //quantum efficiency\n",
+"P0=0.5d-6; //incident optical power\n",
+"Ip=4d-6; //avalanche gain\n",
+"E=1.5d-19;\n",
+"\n",
+"lamda=h*c/(E); //computing wavelength\n",
+"R= eta*q*lamda/(h*c); //computing responsivity\n",
+"P0=Ip/R; //computing optical power\n",
+"\n",
+"lamda=lamda*10^6;\n",
+"P0=P0*10^6;\n",
+"printf('\nWavelength is %.3f micrometer.\nResponsivity is %.4f A/W.\nOptical power is %.2f microWatt.',lamda,R,P0);\n",
+"\n",
+"//answer of optical power in the book is 5.53 microWatt, deviation of 0.17 microWatt.\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10_5: Find_multiplication_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.10.5 page 7.55\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=900d-9;\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"eta=65/100; //quantum efficiency\n",
+"P0=0.5d-6; //incident optical power\n",
+"Im=10d2; //avalanche gain\n",
+"\n",
+"R= eta*q*lamda/(h*c); //computing responsivity\n",
+"Ip=10^8*P0*R; //computing photocurrent\n",
+"Ip=floor(Ip);\n",
+"M=Im/Ip; //computing multiplication factor\n",
+"printf('\nMultiplication factor is %d.',M);\n",
+"\n",
+"//answer in the book is 42.55 deviation 0.45"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10_6: Calculate_quantum_efficiency_and_output_photocurrent.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.10.6 page 7.55\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.602d-19; //charge of electron\n",
+"P0=0.5d-6; //incident optical power(assumption)\n",
+"lamda=1.5d-6; //wavelength\n",
+"M=20; //Multiplication factor\n",
+"R=0.6; //Responsivity\n",
+"\n",
+"eta=(R*h*c)/(q*lamda); //computing quantum efficiency\n",
+"Ip=P0*R; //computing photocurrent\n",
+"I=M*Ip*10^6; //computing output current\n",
+"\n",
+"printf('\nQuantum efficiency is %.3f micrometer.\nOutput current %d microAmpere.',eta,I);\n",
+"\n",
+"//answer of quantum efficiency in the book is given as 0.495, deviation of 0.001.\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2_1: Find_Fresnel_reflection_and_power_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.2.1 page 7.11\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=3.4; //refractive index of optical source\n",
+"n=1.46; //refractive index of silica fiber\n",
+"\n",
+"r=((n1-n)/(n1+n))^2; //computing Frensel reflection\n",
+"L=-10*log10(1-r); //computing loss\n",
+"\n",
+"printf('\nFrensel reflection is %.3f.\nPower loss is %.2f dB.',r,L);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2_2: Compute_optical_power_coupled.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.2.2 page 7.11\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"r=35d-6; //radius\n",
+"R=150; //Lambertian emission pattern\n",
+"NA=0.2; //Numerical aperture\n",
+"Pled= %pi^2*r^2*R*NA^2;\n",
+"Pled=Pled*10^7;\n",
+"printf('\nOptical power for larger core of 35 micrometer is %.3f mW.',Pled);\n",
+"r1=25d-6;\n",
+"Pled1=(r1/r)^2*Pled;\n",
+"printf('\nOptical power for smaller core of 25 micrometer is %.2f mW.',Pled1);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2_3: Calculate_coupled_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.2.3 page 7.12\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"r=25d-6; //radius\n",
+"R=39; //Lambertian emission pattern\n",
+"NA=0.25; //numerical aperture\n",
+"a=35d-6; //area\n",
+"Pc1= %pi^2*a^2*R*NA^2; //computing coupled power when r<a\n",
+"Pc1=Pc1*10^7;\n",
+"Pc= %pi^2*r^2*R*NA^2; //computing coupled power when r>a\n",
+"Pc=Pc*10^7;\n",
+"\n",
+"printf('\nOptical power when r>a is %.2f mW.\nOptical power when r<a is %.3f mW.',Pc,Pc1);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2_4: Estimate_external_power_efficiency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.2.4 page 7.12\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"n1=3.6; //refractive index\n",
+"n=1; //refractive index of air\n",
+"F=0.68; //transmission factor\n",
+"Pin=30/100; //percent power supplied\n",
+"\n",
+"eta =(n1*(n1+1)^2)^-1; //computing eta\n",
+"P=Pin*eta; //computing optical power emitted\n",
+"eta=eta*100;\n",
+"P=P*1000;\n",
+"Pt=P*Pin; //computing internal power\n",
+"\n",
+"printf('\neta external is %.1f percent.\nOptical power emitted is %.1f mW.\nInternal power is %.2f mW.',eta,P,Pt);\n",
+"printf('\nNote - Printing error in the book they have printed 1.5 instead of 1.3 as the answer of eta.');\n",
+"\n",
+"//Printing error in the book they have printed 1.5 instead of 1.3 as the answer of eta\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5_1: Estimate_upper_wavelength_cutoff.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.5.1 page 7.24\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"e=1.6d-19; //charge of electron\n",
+"q=1.43; //Bandgap energy\n",
+"\n",
+"lamda=h*c/(q*e)*10^9; //computing wavelength\n",
+"printf('\nWavelength is %d nm',lamda);\n",
+"printf('\nThis proves that photodiode will not operate for photon of wavelength greater than %d nm.',lamda);\n",
+"\n",
+"//answer in the book 868nm; deviation of 1nm"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5_2: Find_photocurrent.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.5.2 page 7.24\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"R=0.6; //responsivity\n",
+"Pin=15; //optical power in microwatt\n",
+"\n",
+"Ip=R*Pin; //computing photocurrent\n",
+"printf('\nPhotocurrent generated is %d microAmpere.',Ip);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5_3: Find_cut_off_wavelength.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.5.3 page 7.24\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda1=1300d-9;\n",
+"lamda2=1600d-9;\n",
+"h=6.625d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"eta=90/100; //quantum efficiency\n",
+"E=0.73; //energy gap in eV\n",
+"R1=eta*q*lamda1/(h*c);\n",
+"R2=eta*q*lamda2/(h*c);\n",
+"lamdac=1.24/E;\n",
+"\n",
+"printf('\nResponsivity at 1300nm is %.2f A/W.\nResponsivity at 1600nm is %.2f A/W.\nCut-off wavelength is %.1f micrometer.',R1,R2,lamdac);\n",
+"\n",
+"//R1 is calculated as 0.92 in the book, deviation of 0.02."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5_4: Determine_quantum_efficiency_and_responsivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.5.4 page 7.25\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=0.8d-6;\n",
+"h=6.625d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"ne=1.8d11; //electrons collected\n",
+"np=4d11; //photons incident\n",
+"\n",
+"eta=ne/np; //computing quantum efficiency\n",
+"R=eta*q*lamda/(h*c); //computing responsivity\n",
+"\n",
+"printf('\nResponsivity of photodiode at 0.8 micrometer is %.3f A/W.',R);\n",
+"\n",
+"//answer in the book is 0.289. deviation of 0.001 A/W"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5_5: Find_wavelength_and_incident_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"// Example 7.5.5 page 7.25\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"eta=70/100; //quantum efficiency\n",
+"I=3d-6; //photocurrent \n",
+"E=1.8d-19; //energy of photns\n",
+"q=1.6d-19; //charge of electron\n",
+"\n",
+"lamda=h*c/E; //computing wavelength\n",
+"R=eta*q*lamda/(h*c); //computing responsivity\n",
+"Popt=I/R; //computing optical power\n",
+"lamda=lamda*10^6;\n",
+"Popt=Popt*10^6;\n",
+"\n",
+"printf('\nWavelength is %.2f micrometer.\nResponsivity is %.3f A/W.\nIncident optical power required is %.3f microWatt.',lamda,R,Popt);\n",
+"\n",
+"//answer of Popt in the book is calculated as 4.823, deviation of 0.002"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5_6: Determine_wavelength.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.5.6 page 7.26\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"E=1.35; //energy gap in eV\n",
+"\n",
+"lamda=h*c/(q*E); //computing wavelength\n",
+"lamda=lamda*10^6;\n",
+"\n",
+"printf('\nThe InP photodetector will stop operation above %.2f micrometer.',lamda);\n",
+"printf('\nNOTE - calculation error in the book');\n",
+"\n",
+"//calculation error in the book\n",
+"//answer in the book 1.47 micrometer.(incorrect)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5_7: Calculate_wavelength_and_incident_optical_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"// Example 7.5.7 page 7.27\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"eta=65/100; //quantum efficiency\n",
+"I=2.5d-6; //photocurrent \n",
+"E=1.5d-19; //energy of photns\n",
+"q=1.6d-19; //charge of electron\n",
+"\n",
+"lamda=h*c/E; //computing wavelength\n",
+"R=eta*q*lamda/(h*c); //computing responsivity\n",
+"Popt=I/R; //computing optical power\n",
+"lamda=lamda*10^6;\n",
+"Popt=Popt*10^6;\n",
+"\n",
+"printf('\nWavelength is %.3f micrometer.\nResponsivity is %.3f A/W.\nIncident optical power required is %.1f microWatt.',lamda,R,Popt);\n",
+"\n",
+"//answer of R(responsivity) in the book is calculated as 0.694 A/W, deviation of 0.001."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5_8: Find_quantum_efficiency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.5.8 page 7.27\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"ne=3.9d6; //electrons collected\n",
+"np=6d6; //photons incident\n",
+"\n",
+"eta=100*ne/np; //computing efficiency\n",
+"printf('\nQuantum efficiency is %d percent.',eta);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8_1: Determine_drift_time_and_junction_temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.8.1 page 7.39\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"w=25d-6; //width\n",
+"v=1d5; //velocity\n",
+"r=40d-6; //radius\n",
+"eps=12.5d-13;\n",
+"\n",
+"t=w/v; //computing drift time\n",
+"c=eps*3.14*(r)^2/w; //computing junction capacitance\n",
+"c=c*10^16;\n",
+"printf('\nDrift time %.1e sec.\nJunction capacitance %.1f pf.',t,c);\n",
+"printf('\nCalculation error in the book at the answer of drift time.');\n",
+"\n",
+"//calculation error in drift time answer in the book is 25*10^-10. it should be 2.5*10^-10.\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8_2: Find_maximum_response_time.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.8.2 page 7.39\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"w=20d-6; //width\n",
+"v=4d4; //velocity\n",
+"\n",
+"t=w/v; //computing drift time\n",
+"BW=(2*%pi*t)^-1; //computing bandwidth\n",
+"rt=1/BW; //computing response time\n",
+"rt=rt*10^9;\n",
+"\n",
+"printf('\nMaximum response time is %.1f ns.',rt);\n",
+"printf('\nNOTE - Calculation error in the book.');\n",
+"\n",
+"//Calculation error in the book, answer given is 6.2ns"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9_1: Calculate_noise_equivalent_power_and_specific_directivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.9.1 page 7.45\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=1.4d-6;\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"eta=65/100; //quantum efficiency\n",
+"I=10d-9; //current\n",
+"\n",
+"NEP= h*c*sqrt(2*q*I)/(eta*q*lamda);\n",
+"D=NEP^-1;\n",
+"\n",
+"printf('\nNoise equivalent power is %.3e W.\nSpecific directivity is %.2e.',NEP,D);\n",
+"\n",
+"//answers in the book for NEP is 7.683*10^-14, deviation of 0.04*10^-14.\n",
+"//answers in the book for D is 13.01 *10^12, deviation of 0.11*10^12."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9_2: Find_mean_square_quantum_noise_current_and_mean_square_dark_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 7.9.2 page 7.46\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=1300d-9;\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"eta=90/100; //quantum efficiency\n",
+"P0=300d-9; //optical power\n",
+"Id=4; //dark current\n",
+"B=20d6; //bandwidth\n",
+"K=1.39d-23; //Boltzman constant\n",
+"T=298; //temperature\n",
+"R=1000; //load resister\n",
+"Ip= 10^9*eta*P0*q*lamda/(h*c);\n",
+"Its=10^9*(2*q*B*(Ip+Id));\n",
+"Its=sqrt(Its);\n",
+"printf('\nrms shot noise current is %.2f nA.',Its);\n",
+"\n",
+"It= 4*K*T*B/R;\n",
+"It=sqrt(It);\n",
+"printf('\nThermal noise is %.2e A.',It);\n",
+"\n",
+"//answer given in book for shot noise is 1.34nA, deviation of 0.01nA.\n",
+"//answer given in book for Thermal noise it is 1.81*10^-8 A, deviation of 0.01*10^-8."
+ ]
+ }
+],
+"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/Optical_Fiber_Communication_by_A_Kalavar/8-Optical_Receiver_Operation.ipynb b/Optical_Fiber_Communication_by_A_Kalavar/8-Optical_Receiver_Operation.ipynb
new file mode 100644
index 0000000..e103d91
--- /dev/null
+++ b/Optical_Fiber_Communication_by_A_Kalavar/8-Optical_Receiver_Operation.ipynb
@@ -0,0 +1,327 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Optical Receiver Operation"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.q: Determine_maximum_response_time.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Question 7 page 8.55\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"w=25d-6; //width\n",
+"v=3d4; //velocity\n",
+"\n",
+"t=w/v; //computing drift time\n",
+"BW=(2*%pi*t)^-1; //computing bandwidth\n",
+"rt=1/BW; //response time\n",
+"rt=rt*10^9;\n",
+"\n",
+"printf('\nMaximum response time is %.2f ns.',rt);\n",
+"\n",
+"//Answer in the book is given as 5.24ns deviation of 0.01ns"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.10_1: Find_signal_to_noise_ratio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 8.10.1 page 8.25\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"//erfc 4.24 is given to be 2d-9\n",
+"\n",
+"SN=(2*sqrt(2)*4.24)^2; //computing optical SNR\n",
+"SN=round(SN);\n",
+"SN1=sqrt(SN); //computing electrical SNR\n",
+"printf('\nOptical SNR is %d.\nElectrical SNR is %d.',SN,SN1);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.11_1: Find_photon_energy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 8.11.1 page 8.26\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"P=1d-9; //probability of error\n",
+"eta=1;\n",
+"N= -log(P);\n",
+"N1=round(N);\n",
+"printf('Thus %.1f or %d photons are required for maintaining 10^-9 BER.\nAssuming eta=1;\nE=%.1f*hv.',N,N1,N);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.17_1: Calculate_shot_noise_and_thermal_noise.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 8.17.1 page 8.46\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=0.85d-6;\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"eta=65/100; //quantum efficiency\n",
+"P0=300d-9; //optical power\n",
+"Id=3.5; //dark current\n",
+"B=6.5d6; //bandwidth\n",
+"K=1.39d-23; //Boltzman constant\n",
+"T=293; //temperature\n",
+"R=5d3; //load resister\n",
+"Ip= 10^9*eta*P0*q*lamda/(h*c);\n",
+"Its=10^9*(2*q*B*(Ip+Id));\n",
+"Its=sqrt(Its);\n",
+"printf('\nrms shot noise current is %.2f nA.',Its);\n",
+"\n",
+"It= 4*K*T*B/R;\n",
+"It=sqrt(It);\n",
+"It=It*10^9;\n",
+"printf('\nThermal noise is %.2f nA.',It);\n",
+"\n",
+"//answer given in book for Thermal noise it is 4.58nA, deviation is 0.02nA."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.17_2: Find_signal_to_noise_ratio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 8.17.2 page 8.47\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"lamda=0.85d-6;\n",
+"h=6.626d-34; //plank's constant\n",
+"c=3d8; //speed of light\n",
+"q=1.6d-19; //charge of electron\n",
+"eta=65/100; //quantum efficiency\n",
+"P0=300d-9; //optical power\n",
+"Id=3.5; //dark current\n",
+"B=6.5d6; //bandwidth\n",
+"K=1.39d-23; //Boltzman constant\n",
+"T=293; //temperature\n",
+"R=5d3; //load resister\n",
+"F_dB=3; //noise figure\n",
+"F=10^(F_dB/10);\n",
+"Ip=10^9*eta*P0*q*lamda/(h*c);\n",
+"Its=10^9*(2*q*B*(Ip+Id));\n",
+"It1= 4*K*T*B*F/R;\n",
+"\n",
+"SN= Ip^2/(Its+It1);\n",
+"SN_dB=10*log10(SN);\n",
+"SN=SN/10^4;\n",
+"\n",
+"printf('\nSNR is %.2f*10^4 or %.2f dB.',SN,SN_dB);\n",
+"\n",
+"//answer given in the book is 6.16*10^4 (deviation of 0.9) and 47.8dB (deviation of 0.16dB)\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.18_1: Calculate_maximum_load_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 8.18.1 page 8.48\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"Cd=7d-12;\n",
+"B=9d6;\n",
+"Ca=7d-12;\n",
+"\n",
+"R=(2*3.14*Cd*B)^-1;\n",
+"B1=(2*3.14*R*(Cd+Ca))^-1;\n",
+"R=R/1000;\n",
+"B1=B1/10^6;\n",
+"printf('\nThus for 9MHz bandwidth maximum load resistance is %.2f Kohm\nNow if we consider input capacitance of following amplifier Ca then Bandwidth is %.2fMHz\nMaximum post detection bandwidth is half.',R,B1);\n",
+"\n",
+"//answer for resistance in the book is 4.51Kohm, deviation of 0.01Kohm, while for bandwidth it is 4.51 MHz, deviation of 0.01MHz"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3_1: Find_quantum_efficiency_and_minimum_incident_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 8.3.1 page 8.9\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"P=10^-9; //probability of error\n",
+"eta=1; //ideal detector\n",
+"h=6.626d-34 //plank's constant\n",
+"c=3d8; //speed of light\n",
+"lamda=1d-6; //wavelength\n",
+"B=10^7; //bit rate\n",
+"\n",
+"Mn= - log(P);\n",
+"printf('\n The quantum imit at the receiver to maintain bit error rate 10^-9 is (%.1f*h*f)/eta.',Mn);\n",
+"f=c/lamda\n",
+"Popt= 0.5*Mn*h*f*B/eta; //computing optical power\n",
+"Popt_dB = 10 * log10(Popt) + 30; //optical power in dbm\n",
+"Popt=Popt*10^12;\n",
+"\n",
+"printf('\nMinimum incident optical power is %.1f W or %.1f dBm.',Popt,Popt_dB);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3_2: Calculate_incident_optical_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 8.3.2 page 8.11\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"SN_dB=60; //signal to noise ratio\n",
+"h=6.626d-34 //plank's constant\n",
+"c=3d8; //speed of light\n",
+"lamda=1.3d-6; //wavelength\n",
+"eta=1;\n",
+"B=6.5d6; //Bandwidth\n",
+"\n",
+"SN=10^(SN_dB/10);\n",
+"f=c/lamda\n",
+"Popt= 2*SN*h*f*B/eta; //computing optical power\n",
+"Popt_dB = 10 * log10(Popt) + 30; //optical power in dbm\n",
+"Popt=Popt*10^6;\n",
+"printf('\nIncident power required to get an SNR of 60 dB at the receiver is %.4f microWatt or %.3f dBm',Popt,Popt_dB);\n",
+"printf('\nNOTE - Calculation error in the book.\nThey have take SN as 10^5 while calculating, which has lead to an error in final answer');\n",
+"\n",
+"//Calculation error in the book.They have take SN as 10^5 while calculating, which has lead to an error in final answer\n",
+"//answer in the book 198.1nW and -37.71 dBm"
+ ]
+ }
+],
+"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/Optical_Fiber_Communication_by_A_Kalavar/9-Link_Designs_and_Optical_Amplifiers.ipynb b/Optical_Fiber_Communication_by_A_Kalavar/9-Link_Designs_and_Optical_Amplifiers.ipynb
new file mode 100644
index 0000000..c2a53f1
--- /dev/null
+++ b/Optical_Fiber_Communication_by_A_Kalavar/9-Link_Designs_and_Optical_Amplifiers.ipynb
@@ -0,0 +1,403 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Link Designs and Optical Amplifiers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.16_1: Find_amplifier_gain_and_minimum_pump_power_required.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.16.1 page 9.53\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"Pin=2;\n",
+"Pout=27;\n",
+"\n",
+"gain_db= Pout-Pin;\n",
+"gain= 10^(Pout/10)/10^(Pin/10);\n",
+"min_pow = 10^(Pout/10) - 10^(Pin/10);\n",
+"\n",
+"printf('\nGain in dB is %d dB.\nGain is %.2f.\nMinimum pump power is %.1f mW.',gain_db,gain,min_pow);\n",
+"\n",
+"//answer in the book for gain is 317, deviation of 0.77 and for minimum pump power it is 499.4, deviation of 0.2"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.20_1: Maximum_input_and_output_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.20.1 page 9.65\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"gain_db=25;\n",
+"lamdaP=980d-9;\n",
+"lamdaS=1550d-9;\n",
+"Pp=40d-3;\n",
+"\n",
+"gain=10^(gain_db/10); //computing gain\n",
+"Pin=(lamdaP/lamdaS)*Pp/(gain-1); //computing maximum input power\n",
+"Pout=Pin+(lamdaP/lamdaS)*Pp; //computing maximum output power\n",
+"Pout_db=10*log10(Pout/10^-3); //computing maximum output power in dB\n",
+"Pin=Pin*10^6;\n",
+"printf('\nGain is %.2f.\nMaximum input power is %.2f microWatt.\nMaximum output power is %.2f dbm.',gain,Pin,Pout_db);\n",
+"printf('\n\nNOTE - calculation error in max input power instead of G-1, G-100 is taken.');\n",
+"\n",
+"//answer in the book for Max output power is 14.03 dBm, deviation of 0.01\n",
+"//calculation error in max input power instead of G-1, G-100 is taken, answer given is 116 microWatt"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4_1: Find_safty_margin.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.4.1 page 9.11\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"output=13; //laser output\n",
+"sensitivity=-31; //APD sensitivity\n",
+"coupling_loss=0.5;\n",
+"L=80; //length in km\n",
+"sl=0.1; //loss correspond to one splice in dB\n",
+"fl=0.35; //fiber loss in dB/km\n",
+"noise=1.5;\n",
+"\n",
+"allowed_loss=output-sensitivity;\n",
+"splices_loss=(L-1)*sl;\n",
+"fiber_loss=L*fl;\n",
+"margin=allowed_loss-(splices_loss+fiber_loss+coupling_loss+noise);\n",
+"\n",
+"printf('\nFinal margin is %.1f dB.',margin);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4_2: Determine_safety_margin.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.4.2 page 9.12\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"output=3; //laser output\n",
+"sensitivity=-54; //APD sensitivity\n",
+"coupling_loss=17.5;\n",
+"L=6; //length in km\n",
+"sl=1.1; //loss correspond to one splice in dB\n",
+"n=3; //number of splices\n",
+"fl=5; //fiber loss in dB/km\n",
+"connector_loss=0.8;\n",
+"\n",
+"allowed_loss=output-sensitivity;\n",
+"splices_loss=n*sl;\n",
+"fiber_loss=L*fl;\n",
+"margin=allowed_loss-(splices_loss+fiber_loss+coupling_loss+connector_loss);\n",
+"\n",
+"printf('\nFinal margin is %.1f dB.',margin);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4_3: Determine_safety_margin.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.4.3 page 9.13\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"output=-10; //laser output\n",
+"sensitivity=-41; //APD sensitivity\n",
+"L=7; //length in km\n",
+"sl=0.5; //loss correspond to one splice in dB\n",
+"fl=2.6; //fiber loss in dB/km\n",
+"connector_loss=1.5;\n",
+"saftey_margin=6;\n",
+"\n",
+"allowed_loss=output-sensitivity;\n",
+"splices_loss=(L-1)*sl;\n",
+"fiber_loss=L*fl;\n",
+"margin=allowed_loss-(splices_loss+fiber_loss+connector_loss+saftey_margin);\n",
+"\n",
+"printf('\nFinal margin is %.1f dB.',margin);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4_4: Determine_safety_margin_and_link_length.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.4.4 page 9.14\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"output=-10; //laser output\n",
+"sensitivity=-25; //APD sensitivity\n",
+"L=2; //length in km\n",
+"sl=0.7; //loss correspond to one splice in dB\n",
+"fl=3.5; //fiber loss in dB/km\n",
+"connector_loss=1.6;\n",
+"saftey_margin=4;\n",
+"\n",
+"allowed_loss=output-sensitivity;\n",
+"splices_loss=L*sl;\n",
+"fiber_loss=L*fl;\n",
+"margin=allowed_loss-(splices_loss+fiber_loss+connector_loss+saftey_margin);\n",
+"\n",
+"printf('\nFinal margin is %.1f dB.',margin);\n",
+"\n",
+"printf('\n\nIf laser launches a optical power of 0 dBm then,\n');\n",
+"\n",
+"output=0; //laser output\n",
+"sensitivity=-25; //APD sensitivity\n",
+"saftey_margin=7;\n",
+"allowed_loss=output-sensitivity;\n",
+"length_fiber= (allowed_loss-(splices_loss+connector_loss+saftey_margin))/fl;\n",
+"increase=length_fiber-L;\n",
+"printf('\nIncrease in the fiber length is %.2f km.',increase);\n",
+"\n",
+"//answer in the book is 2.28, deviation of 0.01"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4_5: Determine_link_length.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.4.5 page 9.16\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"output=22; //laser output\n",
+"sensitivity=-35; //APD sensitivity\n",
+"sl=0.05; //loss correspond to one splice in dB\n",
+"fl=0.4; //fiber loss in dB/km\n",
+"connector_loss=2;\n",
+"saftey_margin=6;\n",
+"penalties=1.5\n",
+"allowed_loss=output-sensitivity;\n",
+"Length = (allowed_loss-(connector_loss+penalties+saftey_margin))/(sl+fl);\n",
+"Length=floor(Length);\n",
+"printf('\nLink length is %d km.',Length);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6_1: Find_maximum_bit_rate.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.6.1 page 9.19\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L=10;\n",
+"ts=10;\n",
+"tD=8;\n",
+"tmod=L*6;\n",
+"tt=L*2;\n",
+"\n",
+"Tsys=1.1*sqrt(ts^2+tmod^2+tt^2+tD^2);\n",
+"Bt=0.7/Tsys;\n",
+"Bt=Bt*10^3;\n",
+"printf('Maximum bit rate for link using NRZ data format is %.2f Mbits/sec.',Bt);\n",
+"printf('\nNOTE - calculation error in the book');\n",
+"\n",
+"//calculation error in the book\n",
+"//answer given in the book is 10.3mbits/sec.(incorrect)\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6_2: Estimate_maximum_bit_rate.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.6.2 page 9.20\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L=8;\n",
+"ts=8;\n",
+"tD=6;\n",
+"tmod=L*1;\n",
+"tt=L*5;\n",
+"\n",
+"Tsys=sqrt(ts^2+tmod^2+tt^2+tD^2);\n",
+"Bt=0.7/Tsys;\n",
+"Bt=Bt*10^3;\n",
+"printf('\nMaximum bit rate for link using NRZ data format is %.2f Mbits/sec.\nMaximum bit rate for link using RZ data format is %.2f Mbits/sec.',Bt,Bt/2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6_3: Determine_whether_or_not_combination_of_component_gives_an_adequate_response.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Example 9.6.3 page 9.21\n",
+"\n",
+"clc;\n",
+"clear;\n",
+"\n",
+"L=5;\n",
+"ts=10;\n",
+"tD=3;\n",
+"tmod=L*2;\n",
+"tt=L*9;\n",
+"\n",
+"Tsys=sqrt(ts^2+tmod^2+tt^2+tD^2);\n",
+"Bt=0.7/Tsys;\n",
+"Bt=Bt*10^3;\n",
+"printf('\nMaximum bit rate for link using NRZ data format is %.1f Mbits/sec.',Bt);\n",
+"printf('\nThis is equivalent to a 3 dB optical bandwidth of %.1f MHz, hence the desired required bandwidth 6 MHz which will be supported',Bt/2);\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
+}