From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1871/CH12/EX12.1/Ch12Ex1.sce | 22 ++++++++++++++++++++++ 1871/CH12/EX12.2/Ch12Ex2.sce | 15 +++++++++++++++ 1871/CH12/EX12.3/Ch12Ex3.sce | 11 +++++++++++ 1871/CH12/EX12.4/Ch12Ex4.sce | 16 ++++++++++++++++ 1871/CH12/EX12.5/Ch12Ex5.sce | 26 ++++++++++++++++++++++++++ 1871/CH12/EX12.6/Ch12Ex6.sce | 11 +++++++++++ 1871/CH12/EX12.7/Ch12Ex7.sce | 10 ++++++++++ 1871/CH12/EX12.8/Ch12Ex8.sce | 19 +++++++++++++++++++ 1871/CH12/EX12.9/Ch12Ex9.sce | 12 ++++++++++++ 9 files changed, 142 insertions(+) create mode 100755 1871/CH12/EX12.1/Ch12Ex1.sce create mode 100755 1871/CH12/EX12.2/Ch12Ex2.sce create mode 100755 1871/CH12/EX12.3/Ch12Ex3.sce create mode 100755 1871/CH12/EX12.4/Ch12Ex4.sce create mode 100755 1871/CH12/EX12.5/Ch12Ex5.sce create mode 100755 1871/CH12/EX12.6/Ch12Ex6.sce create mode 100755 1871/CH12/EX12.7/Ch12Ex7.sce create mode 100755 1871/CH12/EX12.8/Ch12Ex8.sce create mode 100755 1871/CH12/EX12.9/Ch12Ex9.sce (limited to '1871/CH12') diff --git a/1871/CH12/EX12.1/Ch12Ex1.sce b/1871/CH12/EX12.1/Ch12Ex1.sce new file mode 100755 index 000000000..d865ccc67 --- /dev/null +++ b/1871/CH12/EX12.1/Ch12Ex1.sce @@ -0,0 +1,22 @@ +// Scilab code Ex12.1: Pg:463 (2008) +clc;clear; +n1 = 1.5; // Core index of an optical fibre +n0 = 1; // Refractive index of air +delta = 0.0005; // Intermodal dispersion factor for the fibre +// Since delta = (n1-n2)/n1, solving for n2 +n2 = n1 - n1*delta; // Refractive index of cladding +//As sind(phi_c) = n2/n1, solving for phi_c, we have +phi_c = asind(n2/n1); // Critical internal reflection angle, degree +// As sind(theta_0) = sqrt(n1^2-n2^2)/n0, solving for theta_0 +theta_0 = asind(sqrt(n1^2-n2^2)/n0); // External critical acceptance angle, degree +NA = n1*sqrt(2*delta); // Numerical aperture +printf("\nThe refractive index of cladding = %7.5f ", n2); +printf("\nThe critical internal reflection angle = %4.1f degree", phi_c); +printf("\nThe external critical acceptance angle = %4.2f degree", theta_0); +printf("\nThe numerical aperture = %6.4f ", NA); + +// Result +// The refractive index of cladding = 1.49925 +// The critical internal reflection angle = 88.2 degree +// The external critical acceptance angle = 2.72 degree +// The numerical aperture = 0.0474 \ No newline at end of file diff --git a/1871/CH12/EX12.2/Ch12Ex2.sce b/1871/CH12/EX12.2/Ch12Ex2.sce new file mode 100755 index 000000000..6773b6f57 --- /dev/null +++ b/1871/CH12/EX12.2/Ch12Ex2.sce @@ -0,0 +1,15 @@ +// Scilab code Ex12.2: Pg:464 (2008) +clc;clear; +n2 = 1.59; // Cladding refractive index of an optical fibre +n0 = 1; // Refractive index when the fiber is in air +NA = 0.20; // Numerical aperture of fiber +// Since NA = sqrt(n_1^2-n_2^2)/n0, solving for n1 +n1 = sqrt(NA^2 + n2^2)/n0; // Core refractive index of fiber +// In water, n0 = 1.33 +n0 = 1.33; // Refractive index of water +NA = sqrt(n1^2-n2^2)/n0; // Numerical aperture when the fiber is in water +theta_max = asind(NA); // Acceptance angle for the fiber in water, degree +printf("\nThe acceptance angle for the fibre = %3.1f degree", theta_max); + +// Result +// The acceptance angle for the fibre = 8.6 degree \ No newline at end of file diff --git a/1871/CH12/EX12.3/Ch12Ex3.sce b/1871/CH12/EX12.3/Ch12Ex3.sce new file mode 100755 index 000000000..433a8395e --- /dev/null +++ b/1871/CH12/EX12.3/Ch12Ex3.sce @@ -0,0 +1,11 @@ +// Scilab code Ex12.3: Pg:467 (2008) +clc;clear; +n1 = 1.45; // Core refractive index of an fibre +d = 0.6; // Core diameter of fiber, m +NA = 0.16; // Numerical aperture of fiber +lambda_0 = 9e-007; // Wavelength of light, m +V = %pi*d*NA/lambda_0; // Normalized frequency (V-number)for the fiber +printf("\nThe normalized frequency for fiber = %4.2e ", V); + +// Result +// The normalized frequency for fiber = 3.35e+005 \ No newline at end of file diff --git a/1871/CH12/EX12.4/Ch12Ex4.sce b/1871/CH12/EX12.4/Ch12Ex4.sce new file mode 100755 index 000000000..1a16ee5ff --- /dev/null +++ b/1871/CH12/EX12.4/Ch12Ex4.sce @@ -0,0 +1,16 @@ +// Scilab code Ex12.4: Pg:468 (2008) +clc;clear; +n1 = 1.52; // Core refractive index of an fibre +d = 29e-06; // Core diameter of fiber, m +delta = 0.0007; // Fractional difference index +lambda_0 = 1.3e-06; // Wavelength of light, m +// Since delta = (n1-n2)/n1, solving for n2 +n2 = n1-n1*delta; // Cladding refractive index of fiber +V = %pi*d*sqrt(n1^2 - n2^2)/lambda_0; // Normalized frequency for the fiber +N = 1/2*V^2; // Number of modes the fiber will support +printf("\nThe normalized frequency for fiber = %5.3f ", V); +printf("\nThe number of modes supported by the fiber = %1.0f ", N); + +// Result +// The normalized frequency for fiber = 3.985 +// The number of modes supported by the fiber = 8 \ No newline at end of file diff --git a/1871/CH12/EX12.5/Ch12Ex5.sce b/1871/CH12/EX12.5/Ch12Ex5.sce new file mode 100755 index 000000000..8245a974a --- /dev/null +++ b/1871/CH12/EX12.5/Ch12Ex5.sce @@ -0,0 +1,26 @@ +// Scilab code Ex12.5: Pg:468 (2008) +clc;clear; +// Define function to convert degrees to degree, minute and second +function [deg, minute, second] = deg2dms(theta) + deg = floor(theta); + minute = floor((theta-deg)*60); + second = floor(((theta-deg)*60-minute)*60); +endfunction +n1 = 1.480; // Core refractive index of an optical fibre +n2 = 1.47; // Cladding refractive index of an optical fibre +lambda_0 = 850e-09; // wavelength of light, m +V = 2.405; // Normalized frequency for single mode propagation of the fibre +// As V = %pi*d*sqrt(n1^2-n2^2)/lambda_0, solving for d +d = V*lambda_0/(%pi*sqrt(n1^2-n2^2)*1e-006); // Core radius, micro-metre +NA = sqrt(n1^2-n2^2); // Numerical aperture of the fiber +// Since sind(theta_0) = NA, solving for theta_0 +theta_0 = asind(NA); // The maximum acceptance angle of fiber, degree +[deg, m, s] = deg2dms(theta_0); // Call conversion function +printf("\nThe core radius of the fiber = %4.2f micro-meter", d); +printf("\nThe numerical aperture of fiber = %6.4f ", NA); +printf("\nThe maximum acceptance angle = %d deg %d min %d sec", deg, m, s); + +// Result +// The core radius of the fiber = 3.79 micro-meter +// The numerical aperture of fiber = 0.1718 +// The maximum acceptance angle = 9 deg 53 min 23 sec \ No newline at end of file diff --git a/1871/CH12/EX12.6/Ch12Ex6.sce b/1871/CH12/EX12.6/Ch12Ex6.sce new file mode 100755 index 000000000..cd146a53f --- /dev/null +++ b/1871/CH12/EX12.6/Ch12Ex6.sce @@ -0,0 +1,11 @@ +// Scilab code Ex12.6: Pg:473 (2008) +clc;clear; +alpha = 3.5; // Attenuation of optical signal, dB/km +Pi = 0.5e-003; // Initial Power level of optical fibre, mW +L = 4; // Lenght of optical fibre, km +// As alpha = (10/L)*log(Pi/Po), solving for Po +Po = Pi/10^(alpha*L/10); // Output power level of optical fibre, micro-W +printf("\nThe output power level in optical fiber = %4.1f micro-W", Po/1e-006); + +// Result +// The output power level in optical fiber = 19.9 micro-W \ No newline at end of file diff --git a/1871/CH12/EX12.7/Ch12Ex7.sce b/1871/CH12/EX12.7/Ch12Ex7.sce new file mode 100755 index 000000000..82e17513b --- /dev/null +++ b/1871/CH12/EX12.7/Ch12Ex7.sce @@ -0,0 +1,10 @@ +// Scilab code Ex12.7: Pg:473 (2008) +clc;clear; +Pi = 1; // Initial Power level of optical fibre, mW +Po = 0.85; // Output Power level of optical fibre, mW +L = 0.5; // Lenght of optical fibre, km +alpha = (10/L)*log10(Pi/Po); // Attenuation of optical signal, dB/km +printf("\nThe attenuation of optical signal = %4.2f dB/km", alpha); + +// Result +// The attenuation of optical signal = 1.41 dB/km \ No newline at end of file diff --git a/1871/CH12/EX12.8/Ch12Ex8.sce b/1871/CH12/EX12.8/Ch12Ex8.sce new file mode 100755 index 000000000..905923ab3 --- /dev/null +++ b/1871/CH12/EX12.8/Ch12Ex8.sce @@ -0,0 +1,19 @@ +// Scilab code Ex12.8: Pg:477 (2008) +clc;clear; +c = 3e+008; // Speed of light, m/s +n1 = 1.5; // Core index of an optical fibre +n2 = 1.498; // Cladding index of an optical fibre +l = 18; // Length of an optical fibre, km +D = (n1-n2)/n1; // Intermodal dispersion factor for the fibre +// For a 1 km length fibre +delta = n1*1000/c*D/(1-D)*1e+009; // intermodal dispersion factor for 1 km length fibre, ns/km +delta_t_total = delta*l; // Total dispersion in 18 km length, ns +B_max = 1/(5*delta_t_total*1e-009); // Maximum bit rate, bits/sec +printf("\nThe intermodal dispersion factor for 1 km length fibre = %4.2f ns/km", delta ); +printf("\nThe total dispersion in 18 km length fibre = %5.1f ns", delta_t_total); +printf("\nThe maximum bit rate allowed asuuming dispersion limiting = %4.2f M bits/s",B_max/1e+006); + +// Result +// The intermodal dispersion factor for 1 km length fibre = 6.68 ns/km +// The total dispersion in 18 km length fibre = 120.2 ns +// The maximum bit rate allowed asuuming dispersion limiting = 1.66 M bits/s \ No newline at end of file diff --git a/1871/CH12/EX12.9/Ch12Ex9.sce b/1871/CH12/EX12.9/Ch12Ex9.sce new file mode 100755 index 000000000..21dc38963 --- /dev/null +++ b/1871/CH12/EX12.9/Ch12Ex9.sce @@ -0,0 +1,12 @@ +// Scilab code Ex12.9:Pg:478 (2008) +clc;clear; +P2 = 0.3e-006; // Optical power level at the detector, W +dB_1 = 0.8*15; // Connector loss, dB +dB_2 = 1.5*15; // Fibre loss, dB +dB = dB_1 + dB_2; // Total Loss, dB +// As dB = 10*log10(P1/P2), solving for P1 +P1 = P2*10^(dB/10)/1e-003; // Initial power level of an optical fibre, mw +printf("\nThe initial power level of an optical fibre = %4.2f mW",P1 ); + +// Result +// The initial power level of an optical fibre = 0.85 mW \ No newline at end of file -- cgit