diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /848 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '848')
88 files changed, 1646 insertions, 0 deletions
diff --git a/848/CH1/EX1.1/Example1_1.sce b/848/CH1/EX1.1/Example1_1.sce new file mode 100755 index 000000000..c89c27183 --- /dev/null +++ b/848/CH1/EX1.1/Example1_1.sce @@ -0,0 +1,26 @@ +//clear//
+//Caption:Program to calculate time period and phase shift
+//Example1.1
+//Page 8
+clear;
+clc;
+close;
+f1 = 10^5; //f1 = 100KHz
+f2 = 10^9; //f2 = 1GHz
+T1 = 1/f1;
+T2 = 1/f2;
+phi = (1/4)*360;
+phi_rad = phi/57.3;
+disp(T1,'Time period of sine wave with frequency = 100 KHZ')
+disp(T2,'Time period of sine wave with frequency = 1GHZ')
+disp(phi,'phase shift in degrees');
+disp(phi_rad,'phase shift in radians');
+//Result
+//Time period of sine wave with frequency = 100 KHZ
+// 0.00001
+//Time period of sine wave with frequency = 1GHZ
+// 1.000D-09
+//phase shift in degrees
+// 90.
+//phase shift in radians
+// 1.5706806
diff --git a/848/CH1/EX1.2/Example1_2.sce b/848/CH1/EX1.2/Example1_2.sce new file mode 100755 index 000000000..3bc4f0725 --- /dev/null +++ b/848/CH1/EX1.2/Example1_2.sce @@ -0,0 +1,13 @@ +//clear//
+//Caption:program to calculate bandwidth from its spectrum
+//Example1.2
+//page10
+clear;
+clc;
+close;
+fLow = 10^4; //fLOW = 10KHZ lowest frequency
+fHigh = 10^5; //FHigh = Highest frequency
+B = fHigh - fLow;
+disp(B,'Bandwidth in Hz = ')
+//Result
+//Bandwidth in Hz = 90000.
diff --git a/848/CH1/EX1.4/Example1_4.sce b/848/CH1/EX1.4/Example1_4.sce new file mode 100755 index 000000000..7583efede --- /dev/null +++ b/848/CH1/EX1.4/Example1_4.sce @@ -0,0 +1,13 @@ +//clear//
+//Caption:Shannon Channel Capacity formula
+//Example1.4
+//page 12
+clear;
+clc;
+close;
+B = 10^6; //Bandwidth of noisy channel 10MHZ
+S_N = 1; //signal-to-noise ration is 1
+C = B*log2(1+S_N);
+disp(C,'The maximum capacity for this channel in bits/sec C =')
+//Result
+//The maximum capacity for this channel in bits/sec C = 1000000.
diff --git a/848/CH1/EX1.5/Example1_5.sce b/848/CH1/EX1.5/Example1_5.sce new file mode 100755 index 000000000..d79345b24 --- /dev/null +++ b/848/CH1/EX1.5/Example1_5.sce @@ -0,0 +1,20 @@ +//clear//
+//Caption:Capacity of a channel using shannon's formula
+//Example1.5
+//page 12
+clear;
+clc;
+close;
+fLow = 3*(10^6); //low frequency = 3MHz
+fHigh = 4*(10^6); //hihg frequency = 4MHz
+S_N_dB = 20; //signal-to-noise ratio 20 dB
+S_N = 10^(S_N_dB/10);
+B = fHigh - fLow;
+C = B*log2(1+S_N);
+disp(B,'Bandwidth in Hz B = ')
+disp(C,'Capacity of a channel in bits/secs C =')
+disp(S_N,'signal to noise ratio S/N = ')
+//Result
+// Bandwidth in Hz B = 1000000.
+// Capacity of a channel in bits/secs C = 6658211.5
+// signal to noise ratio S/N = 100.
diff --git a/848/CH1/EX1.6/Example1_6.sce b/848/CH1/EX1.6/Example1_6.sce new file mode 100755 index 000000000..f0bc2c4b0 --- /dev/null +++ b/848/CH1/EX1.6/Example1_6.sce @@ -0,0 +1,16 @@ +//clear//
+//Caption:Program to calculate attenuation (or) loss os power
+//Example 1.6
+//page 14
+clear;
+clc;
+close;
+P1 =1; //one watt
+P2 = P1/2; //reduced by half value
+Atten_dB = 10*log10(P2/P1);
+disp(Atten_dB,'Attenuation in dB = ');
+power_lost = 10^(Atten_dB/10)
+disp(power_lost,'The amount of power lost = ');
+//Result
+//Attenuation in dB = - 3.0103
+//The amount of power lost = 0.5
diff --git a/848/CH1/EX1.7/Example1_7.sce b/848/CH1/EX1.7/Example1_7.sce new file mode 100755 index 000000000..0433a7b01 --- /dev/null +++ b/848/CH1/EX1.7/Example1_7.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption: Power gain calculation for a signal travelling from
+//one point to another point
+//Example 1.7
+//page 14
+clear;
+clc;
+close;
+Loss_line1 = -9; //-9 dB
+Amp_gain2 = 14; //14 dB
+Loss_line3 = -3; //-3 dB
+dB_at_line4 = Loss_line1+Amp_gain2+Loss_line3;
+disp(dB_at_line4,'The amount of power gained by a signal travelling from point1 to point4 in dB = ')
+//Result
+//The amount of power gained by a signal travelling from point1 to point4 in dB = 2.
diff --git a/848/CH10/EX10.1/Example10_1.sce b/848/CH10/EX10.1/Example10_1.sce new file mode 100755 index 000000000..71edd61f1 --- /dev/null +++ b/848/CH10/EX10.1/Example10_1.sce @@ -0,0 +1,14 @@ +//clear//
+//Caption: Finding the center wavelength
+//Example10.1
+//page 343
+clear;
+clc;
+close;
+delta_v = 14e12; //optical bandwidth
+Lambda = 1520; //spectral band
+C = 3e08; //free space velocity
+delta_Lambda = (Lambda^2)*delta_v/C;
+disp(delta_Lambda*1e-09,'spectral band in nano meter')
+//Result
+//spectral band in nano meter = 107.81867
diff --git a/848/CH10/EX10.10/Example10_10.sce b/848/CH10/EX10.10/Example10_10.sce new file mode 100755 index 000000000..8f4fb0c22 --- /dev/null +++ b/848/CH10/EX10.10/Example10_10.sce @@ -0,0 +1,22 @@ +//clear//
+//Caption:Phased-Array-Based-Devices:Channel spacing interms of wavelength and path-length difference
+//Example10.10
+//page 372
+clear;
+clc;
+close;
+Lambda_c = 1550e-09; //central design wavelength
+nc = 1.45; //refractive index of grating array waveguide
+ns = 1.45; //refractive index of teh star coupler
+ng = 1.47; //group index of grating array waveguide
+x = 5e-06 ; //center-to-center spacing between the input waveguides
+d = 5e-06 ; //center-to-center spacing between the output waveguides
+m =1;
+Lf = 10e-03;//distance between transmitter and object
+delta_L = m*Lambda_c/nc;
+delta_Lambda = (x/Lf)*(ns*d/m)*(nc/ng);
+disp(delta_L*1e06,'Waveguide length difference in um =')
+disp(delta_Lambda*1e09,'Channel spacing interms of wavelength in nm=')
+//Result
+//Waveguide length difference in um = 1.0689655
+// Channel spacing interms of wavelength in nm = 3.5756803
diff --git a/848/CH10/EX10.11/Example10_11.sce b/848/CH10/EX10.11/Example10_11.sce new file mode 100755 index 000000000..c938e5a8c --- /dev/null +++ b/848/CH10/EX10.11/Example10_11.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption:Phased-Array-Based Devices:Length difference between adjacent array waveguides
+//Example10.11
+//page 373
+clear;
+close;
+clc;
+nc = 1.45; //effective refractive index
+Lambda_C = 1550.5e-09; //center wavelength
+delta_Lambda = 32.2e-09; //free spectral range
+C = 3e08; //free space velocity in m/s
+delta_L = Lambda_C^2/(nc*delta_Lambda);
+disp(delta_L*1e06,'length difference between adjacent array waveguides in um =')
+//Result
+//length difference between adjacent array waveguides in um =51.489618
diff --git a/848/CH10/EX10.12/Example10_12.sce b/848/CH10/EX10.12/Example10_12.sce new file mode 100755 index 000000000..29f6b4a4e --- /dev/null +++ b/848/CH10/EX10.12/Example10_12.sce @@ -0,0 +1,16 @@ +//clear//
+//Caption:Maximum number of channels that can be placed in the tuning range
+//Example10.12
+//page 383
+clear;
+clc;
+close;
+Lambda = 1550e-09; //DBR laser operating wavelength
+delta_neff = 0.0065; //maximum index change
+delta_Lambda_tune = Lambda*delta_neff; //tuning range in meters
+delta_Lambda_signal = 0.02e-09; //source spectral width in meters
+delta_Lambda_channel = 10*delta_Lambda_signal;
+N = delta_Lambda_tune/delta_Lambda_channel;
+disp(N,'The number channels that can operate in this tuning range is N=')
+//Result
+//The number channels that can operate in this tuning range is N = 50.375
diff --git a/848/CH10/EX10.2/Example10_2.sce b/848/CH10/EX10.2/Example10_2.sce new file mode 100755 index 000000000..dee1df43e --- /dev/null +++ b/848/CH10/EX10.2/Example10_2.sce @@ -0,0 +1,14 @@ +//clear//
+//Caption: Finding mean frequency spacing
+//Example10.2
+//page 343
+clear;
+clc;
+close;
+C = 3e08; //free space velocity
+delta_Lambda = 0.8e-09; //spectral band in meter
+Lambda = 1550e-09;//wavelength in meter
+delta_v = C*delta_Lambda/Lambda^2;
+disp(ceil(delta_v*1e-09),'Mean Frequency spacing in GHz =')
+//Result
+// Mean Frequency spacing in GHz = 100.
diff --git a/848/CH10/EX10.3/Example10_3.sce b/848/CH10/EX10.3/Example10_3.sce new file mode 100755 index 000000000..c79c25ba7 --- /dev/null +++ b/848/CH10/EX10.3/Example10_3.sce @@ -0,0 +1,32 @@ +//clear//
+//Caption:Program to find coupling ratio, Excess loss, Insertion loss, Return loss of 2x2 Fiber coupler
+//Example10.3
+//page 348
+clear;
+clc;
+close;
+P0 = 200e-06; //input optical power level in watts
+P1 = 90e-06; //output power at port 1
+P2 = 85e-06; //output power at port 2
+P3 = 6.3e-09; //output power at port 3
+Coupling_ratio = (P2/(P1+P2))*100;
+Excess_loss = 10*log10(P0/(P1+P2));
+Insertion_loss_0_1 = 10*log10(P0/P1);
+Insertion_loss_0_2 = 10*log10(P0/P2);
+Return_loss = 10*log10(P3/P0);
+disp(Coupling_ratio,'Coupling ratio')
+disp(Excess_loss,'Excess loss in dB')
+disp(Insertion_loss_0_1,'Insertion loss(port 0 to port 1) in dB')
+disp(Insertion_loss_0_2,'Insertion loss(port 0 to port 2) in dB')
+disp(Return_loss,'Retunr loss in dB')
+//Result
+// Coupling ratio
+// 48.571429
+// Excess loss in dB
+// 0.5799195
+// Insertion loss(port 0 to port 1) in dB
+// 3.4678749
+// Insertion loss(port 0 to port 2) in dB
+// 3.7161107
+// Retunr loss in dB
+// - 45.016894
diff --git a/848/CH10/EX10.5/Example10_5.sce b/848/CH10/EX10.5/Example10_5.sce new file mode 100755 index 000000000..fb85ead24 --- /dev/null +++ b/848/CH10/EX10.5/Example10_5.sce @@ -0,0 +1,17 @@ +//clear//
+//Caption:Finding output powers at output port of 2x2 coupler
+//Example10.5
+//page 350
+clear;
+clc;
+close;
+S = sqrt(1/2)*[1,%i;%i,1];//scattering matrix
+Ein = [1;0];
+Eout = S*Ein;
+Pout1 = Eout(1)*conj(Eout(1));
+Pout2 = Eout(2)*conj(Eout(2));
+disp(Pout1,'Output power at port 1 Pout1 =')
+disp(Pout2,'Output power at port 2 Pout2 =')
+//Result
+//Output power at port 1 Pout1 = 0.5
+//Output power at port 2 Pout2 = 0.5
diff --git a/848/CH10/EX10.6/Example10_6.sce b/848/CH10/EX10.6/Example10_6.sce new file mode 100755 index 000000000..1ae7b156f --- /dev/null +++ b/848/CH10/EX10.6/Example10_6.sce @@ -0,0 +1,13 @@ +//clear//
+//Caption:Program to find waveguide length
+//Example10.6
+//page 353
+clear;
+clc;
+close;
+k = 0.6/1e-03; //coupling coefficient per milli meter
+m =1; //mode=1
+L = %pi*(m+1)/(2*k);
+disp(L*1e03,'Coupling Length in mm L =')
+//Result
+//Coupling Length in mm L = 5.2359878
diff --git a/848/CH10/EX10.7/Example10_7.sce b/848/CH10/EX10.7/Example10_7.sce new file mode 100755 index 000000000..cfade345c --- /dev/null +++ b/848/CH10/EX10.7/Example10_7.sce @@ -0,0 +1,23 @@ +//clear//
+//Caption: Program to find Excess loss, Splitting loss and total loss
+//Example10.7
+//page 355
+clear;
+clc;
+close;
+Power_Lost = 5/100;
+FT = 1-Power_Lost; //power coupled
+N = 32;
+Excess_Loss = -10*log10(FT^log2(N));
+Splitting_Loss = -10*log10(1/N);
+Total_Loss = Excess_Loss+Splitting_Loss;
+disp(Excess_Loss,'Excess Loss in dB')
+disp(Splitting_Loss,'Splitting Loss in dB')
+disp(Total_Loss,'Total Loss experienced in Star Couplers in dB')
+//Result
+// Excess Loss
+// 1.1138197
+// Splitting Loss
+// 15.0515
+// Total Loss experienced in Star Couplers
+// 16.16532
diff --git a/848/CH10/EX10.8/Example10_8.sce b/848/CH10/EX10.8/Example10_8.sce new file mode 100755 index 000000000..cfb6629fb --- /dev/null +++ b/848/CH10/EX10.8/Example10_8.sce @@ -0,0 +1,22 @@ +//clear//
+//Caption:Program to Waveguide Length difference
+//Example10.8
+//Page 357
+clear;
+close;
+clc;
+delta_Lambda = 0.08e-09; //wavelength spacing in nano meters
+Lambda = 1550e-09; //wavelength in meters
+neff = 1.5; //effective refractive index in the waveguide
+C =3e08; //free space velocity
+delta_v1 = 10e09; //frequency spacing 1
+delta_v2 = 130e09; //frequency spacing 2
+delta_L1 = C/(2*neff*delta_v1);
+delta_L2 = C/(2*neff*delta_v2);
+disp(delta_L1*1e03,'waveguide length difference in milli meters')
+disp(delta_L2*1e03,'waveguide length difference in milli meters')
+//Result
+//waveguide length difference in milli meters
+// 10.
+//waveguide length difference in milli meters
+// 0.7692308
diff --git a/848/CH10/EX10.9/Example10_9.sce b/848/CH10/EX10.9/Example10_9.sce new file mode 100755 index 000000000..1af8a7876 --- /dev/null +++ b/848/CH10/EX10.9/Example10_9.sce @@ -0,0 +1,36 @@ +//clear//
+//Caption:Fiber Bragg Grating: Peak Reflectivity, Coupling coefficient, full-bandwidth
+//Example10.9.a
+clear;
+close;
+clc;
+kL = [1,2,3];
+Rmax = tanh(kL)^2;
+//Example10.9.b
+L =0.5e-02;
+Lambda_Bragg = 1530e-09;
+neff = 1.48;
+delta_n = 2.5e-04;
+etta = 82/100;
+k = %pi*delta_n*etta/Lambda_Bragg;
+delta_Lambda = (Lambda_Bragg^2)*(((k*L)^2+%pi^2)^0.5)/(%pi*neff*L);
+disp(k/100,'Coupling coefficient per cm k =')
+disp(delta_Lambda*1e09,'full bandwidth in nm =')
+disp('____________________________________________')
+disp('kL Rmax(%)')
+disp('____________________________________________')
+disp(kL,'kL')
+disp(Rmax*100,'Rmax')
+disp('____________________________________________')
+//Result
+// Coupling coefficient per cm k = 4.2093235
+// full bandwidth in nm = 0.3807652
+// ____________________________________________
+// kL Rmax(%)
+// ____________________________________________
+// kL
+//
+// 1. 2. 3.
+// Rmax
+// 58.002566 92.934918 99.013396
+// ____________________________________________
diff --git a/848/CH11/EX11.1/Example11_1.sce b/848/CH11/EX11.1/Example11_1.sce new file mode 100755 index 000000000..3dcc5d303 --- /dev/null +++ b/848/CH11/EX11.1/Example11_1.sce @@ -0,0 +1,19 @@ +//clear//
+//Caption:Program to calculate Photon density
+//Example11.1
+//page 397
+clear;
+clc;
+close;
+Vg = 2e08; //group velocity in m/s
+h = 6.625e-34; //planks constant
+C = 3e08; //free space velocity in m/s
+Lamda = 1550e-09;//operating wavelength
+V = C/Lamda; //frequency in Hz
+w = 5e-06; //width of optical amplifier in meters
+d = 0.5e-06; //thickness of optical amplifier in meters
+Ps = 1e-06; //optical signal of power
+Nph = Ps/(Vg*h*V*w*d);
+disp(Nph,'The photon density in photons/cubic meter is Nph = ')
+//Result
+//The photon density in photons/cubic meter is Nph = 1.560D+16
diff --git a/848/CH11/EX11.10/Example11_10.sce b/848/CH11/EX11.10/Example11_10.sce new file mode 100755 index 000000000..9d047bd02 --- /dev/null +++ b/848/CH11/EX11.10/Example11_10.sce @@ -0,0 +1,21 @@ +//clear//
+//Caption: Upper bound on input optical signal power
+//Example11.10
+//page 415
+clear;
+clc;
+close;
+etta = 0.65; //Quantum efficiency
+nsp = 2; // population inversion between two levels
+R =50; //load resistance inohms
+Lambda = 1550e-09; //operating wavelength in meters
+T = 300; //room temperature in kelvins
+kB = 1.38054e-23; //boltzmann's constant
+h = 6.6256e-34; //plank's constant
+C = 3e08; //free space velocity in m/s
+V = C/Lambda; //frequency in Hz
+q = 1.602e-19; //charge in columbs
+Ps_in = kB*T*h*V/(R*nsp*(etta^2)*(q^2));
+disp(Ps_in*1e06,'Upper bound on input optical signal power in micro watts Ps_in=')
+//Result
+//Upper bound on input optical signal power in micro watts Ps_in = 489.81635
diff --git a/848/CH11/EX11.2/Example11_2.sce b/848/CH11/EX11.2/Example11_2.sce new file mode 100755 index 000000000..2c9be1153 --- /dev/null +++ b/848/CH11/EX11.2/Example11_2.sce @@ -0,0 +1,24 @@ +//clear//
+//Caption:Pumping rate and zero-signal gain
+//Example11.2(a) and (b)
+//page 397
+clear;
+clc;
+close;
+I = 100e-03; //bias current in Amps
+w = 3e-06; //active area width in meters
+L = 500e-06; //amplifier lenght in meters
+d = 0.3e-06; //active area thickness in meters
+q = 1.602e-19; //charge in coulombs
+Rp = I/(q*d*w*L);
+disp(Rp,'The pumping rate in electrons/s.cubicmeter is Rp =')
+Tuo = 0.3; //the confinement factor
+a = 2e-20; //gain coefficient in square meter
+J = I/(w*L); //bias current density in Amp/squre meter
+nth = 1e24; //threshold density per cubic meter
+Tuor = 1e-09; //Time constant in seconds
+g0 = Tuo*a*Tuor*((J/(q*d))-(nth/Tuor))
+disp(g0/100,'The zero-signal gain per cm is g0 = ')
+//Result
+// The pumping rate in electrons/s.cubicmeter is Rp = 1.387D+33
+// The zero-signal gain per cm is g0 = 23.229297
diff --git a/848/CH11/EX11.3/Example11_3.sce b/848/CH11/EX11.3/Example11_3.sce new file mode 100755 index 000000000..65992215b --- /dev/null +++ b/848/CH11/EX11.3/Example11_3.sce @@ -0,0 +1,20 @@ +//clear//
+//Caption: Maximum input power and maxmimum output power
+//Example 11.3
+//page 404
+clear;
+clc;
+close;
+Lambda_p = 980e-09; //pump wavelength
+Lambda_s = 1550e-09; //signal wavelength
+Pp_in = 30e-03; //input pump power in watts
+G = 10^(20/10); //gain
+Ps_in = (Lambda_p/Lambda_s)*Pp_in/(G-1)
+disp(Ps_in*1e06,'The maximum input power in uW is Ps_in =')
+Ps_out = Ps_in+(Lambda_p/Lambda_s)*Pp_in;
+disp(Ps_out*1e03,'The maximum output power in mW is Ps_out =')
+disp(10*log10(Ps_out*1e03),'The maximum output power in dBm is Ps_out =')
+//Result
+//The maximum input power in uW is Ps_in = 191.59335
+//The maximum output power in mW is Ps_out = 19.159335
+//The maximum output power in dBm is Ps_out = 12.823804
diff --git a/848/CH11/EX11.6/Example11_6.sce b/848/CH11/EX11.6/Example11_6.sce new file mode 100755 index 000000000..a3fbe484f --- /dev/null +++ b/848/CH11/EX11.6/Example11_6.sce @@ -0,0 +1,12 @@ +//clear//
+//Caption: Optical Signal-to-noise ratio (OSNR)
+//Example11.6
+//page 412
+clear;
+close;
+clc;
+Q = 6; //Q factor of 6
+OSNR = (1/2)*Q*(Q+sqrt(2));
+disp(10*log10(OSNR),'Optical Signal-to-noise ratio in dB OSNR =')
+//Result
+//Optical Signal-to-noise ratio in dB OSNR = 13.471863
diff --git a/848/CH11/EX11.7/Example8_7.sce b/848/CH11/EX11.7/Example8_7.sce new file mode 100755 index 000000000..c54b4199a --- /dev/null +++ b/848/CH11/EX11.7/Example8_7.sce @@ -0,0 +1,26 @@ +//clear//
+//Caption: Program to find CRC(Cyclic Redundancy Check)
+//Example8.7
+//page 308
+clear;
+clc;
+close;
+x = poly(0,'x');
+m = [1,1,1,1,0];
+G = x^7+x^6+x^5+x^4+0+0+0+0;
+D = x^3+0+x+1;
+[R,Q] = pdiv(G,D)
+R = coeff(R);
+Q = coeff(Q);
+R = abs(modulo(R,2));
+Q = abs(modulo(Q,2));
+disp(R,'Remainder R =')
+disp(Q,'Quotient Q =')
+disp([m R],'CRC for the given information CRC =')
+//Result
+//Remainder R =
+// 1. 0. 1.
+//Quotient Q =
+// 1. 1. 0. 1. 1.
+//CRC for the given information CRC =
+// 1. 1. 1. 1. 0. 1. 0. 1.
diff --git a/848/CH11/EX11.8/Example11_8.sce b/848/CH11/EX11.8/Example11_8.sce new file mode 100755 index 000000000..d873d3cc2 --- /dev/null +++ b/848/CH11/EX11.8/Example11_8.sce @@ -0,0 +1,17 @@ +//clear//
+//Caption: OSNR for different ASE noise level
+//Example11.8
+//page 413
+clear;
+clc;
+close;
+P_ASE1 = -22; //ASE level in dBm
+P_ASE2 = -16; //ASE level in dBm
+Pout = 6; //amplified signal level in dBm
+OSNR1 = Pout - P_ASE1; //Optical SNR in dBm
+OSNR2 = Pout - P_ASE2; //Optical SNR in dBm
+disp(OSNR1,'Optical SNR in dBm OSNR =')
+disp(OSNR2,'Optical SNR in dBm OSNR =')
+//Result
+//Optical SNR in dBm OSNR = 28.
+//Optical SNR in dBm OSNR = 22.
diff --git a/848/CH11/EX11.9/Example11_9.sce b/848/CH11/EX11.9/Example11_9.sce new file mode 100755 index 000000000..cee8c80a4 --- /dev/null +++ b/848/CH11/EX11.9/Example11_9.sce @@ -0,0 +1,18 @@ +//clear//
+//Caption: Noise penalty factor
+//Example11.9
+//page 414
+clear;
+clc;
+close;
+G =[10^(30/10),10^(20/10)]; //Amplifier Gain
+for i = 1:length(G)
+ Fpath(i) = (1/G(i))*((G(i)-1)/log(G(i)))^2;
+ disp(10*log10(Fpath(i)),'Noise penalty factor in dB Fpath =');
+ disp(G(i),'for a gain of G =');
+end
+//Result
+// Noise penalty factor in dB Fpath = 13.204571
+// for a gain of G = 1000.
+// Noise penalty factor in dB Fpath = 6.6477902
+// for a gain of G = 100.
diff --git a/848/CH12/EX12.1/Example12_1.sce b/848/CH12/EX12.1/Example12_1.sce new file mode 100755 index 000000000..67bdbf857 --- /dev/null +++ b/848/CH12/EX12.1/Example12_1.sce @@ -0,0 +1,13 @@ +//clear//
+//Caption:Effective length of fiber
+//Example12.1
+//page 432
+clear;
+clc;
+close;
+L = 75;//amplifier spcaing in kilometer
+alpha = 4.61e-02; //fiber attenuation per Km
+Leff = (1-exp(-alpha*L))/alpha;
+disp(Leff,'Effective length of fiber in kilo meters Leff =')
+//Result
+//Effective length of fiber in kilo meters Leff = 21.008494
diff --git a/848/CH12/EX12.2/Example12_2.sce b/848/CH12/EX12.2/Example12_2.sce new file mode 100755 index 000000000..f91ffe826 --- /dev/null +++ b/848/CH12/EX12.2/Example12_2.sce @@ -0,0 +1,17 @@ +//clear//
+//Caption: Calculation of Stimulated Brillouin Scattering(SBS) threshold power
+//Example12.2
+//page 433
+clear;
+clc;
+close;
+delta_VB = 20e06; //Brillouin linewidth in Hz
+Aeff = 55e-12; //effective cross-sectional area of the propagating wave in square meter
+Leff = 20e03; //effective length
+b = 2;//polarization factor
+gB = 4e-11;//Brillous gain coefficient m/W
+delta_Vsource = 40e06; //optical source linewidth in Hz
+Pth = 21*(Aeff*b/(gB*Leff))*(1+(delta_Vsource/delta_VB));
+disp(Pth*1e03,'SBS threshold power in milli watts Pth=')
+//Result
+//SBS threshold power in milli watts Pth= 8.6625
diff --git a/848/CH12/EX12.3/Example12_3.sce b/848/CH12/EX12.3/Example12_3.sce new file mode 100755 index 000000000..6b40d9ddd --- /dev/null +++ b/848/CH12/EX12.3/Example12_3.sce @@ -0,0 +1,24 @@ +//clear//
+//Caption: Four-wave mixing-calculation of power generated due to the
+//interaction of signals at different frequencies
+//Example12.3
+//page 438
+clear;
+clc;
+close;
+chi1111 = 6e-15;//Third order nonlinear suceptibility cubicmeter/W.s
+D =3; //degenerating factor
+Leff = 22e03;//effective length in meters
+Aeff = 6.4e-11;//effective cross-sectional area of the fiber in square meter
+etta = 0.05;//quantum efficiency
+Lambda = 1540e-09; //Wavelength in single mode fibers in meter
+C = 3e08; //free space velocity in m/sec
+alpha =0.0461; //atttenuation per Km
+L =75; //fiber link length in Km
+P = 1e-03; //each channel input power of 1 milli watts
+n = 1.48; //refractive index
+k = ((32*(%pi^3)*chi1111)/((n^2)*Lambda*C))*(Leff/Aeff); //nonlinear interaction constant
+P112 = etta*(D^2)*(k^2)*(P^3)*exp(-alpha*L);
+disp(P112*1e03,'Power generated due to interaction of signals at different freq. in milli watts P112=')
+//Result
+// Power generated due to interaction of signals at different freq. in milli watts P112= // 5.798D-08
diff --git a/848/CH12/EX12.4/Example12_4.sce b/848/CH12/EX12.4/Example12_4.sce new file mode 100755 index 000000000..e71d977a7 --- /dev/null +++ b/848/CH12/EX12.4/Example12_4.sce @@ -0,0 +1,12 @@ +//clear//
+//Caption:Full-width Half-Maximum(FWHM) soliton pulse normalized time
+//Example12.4
+//page 446
+clear;
+clc;
+close;
+Ts = [15e-12,50e-12]; //FWHM soliton pulse width
+To = Ts/1.7627;
+disp(To*1e12,'Normalized time for FWHM soliton pulse in pico seconds To =')
+//Result
+//Normalized time for FWHM soliton pulse in pico seconds To = [8.5096727 28.365576]
diff --git a/848/CH12/EX12.5/Example12_5.sce b/848/CH12/EX12.5/Example12_5.sce new file mode 100755 index 000000000..ea64235cd --- /dev/null +++ b/848/CH12/EX12.5/Example12_5.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption:Calculation of normalized distance parameter for dispersion shifted fiber
+//Example12.5
+//page 446
+clear;
+clc;
+close;
+Ts = 20e-12; //FWHM soliton pulse width in seconds
+D = 0.5e-06; //dispersion of the fiber ps/(nm.km)
+Lambda = 1550e-9;//wavelength in meter
+C = 3e08;//free space velocity in m/s
+Ldisp = 0.322*2*%pi*C*(Ts^2)/((Lambda^2)*D);
+disp(Ldisp/1000,'dispersion length in Km Ldisp =')
+//Result
+//dispersion length in Km Ldisp = 202.10804
diff --git a/848/CH12/EX12.6/Example12_6.sce b/848/CH12/EX12.6/Example12_6.sce new file mode 100755 index 000000000..479f247bf --- /dev/null +++ b/848/CH12/EX12.6/Example12_6.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption: Program to calculate soliton peak power
+//Example12.6
+//page 447
+clear;
+clc;
+close;
+Lambda = 1550e-9; //wavelength in meters
+n2 = 2.6e-20; //power in square meter/w
+Aeff = 50e-12; //effective area in square meter
+Ldisp = 202e03; //dispersion length in meters
+Ppeak = (Aeff/(2*%pi*n2))*(Lambda/Ldisp);
+disp(Ppeak*1e03,'Soliton peak power in milli watts Ppeak =')
+//Result
+//Soliton peak power in milli watts Ppeak = 2.3485354
diff --git a/848/CH12/EX12.7/Example12_7.sce b/848/CH12/EX12.7/Example12_7.sce new file mode 100755 index 000000000..d1d87938e --- /dev/null +++ b/848/CH12/EX12.7/Example12_7.sce @@ -0,0 +1,32 @@ +//clear//
+//Caption:FWHM soliton pulse width and fraction of bit slot occupied by a soliton
+//Example12.7
+//page 448
+clear;
+clc;
+close;
+//Example12.7.a
+Ldisp = 100e03; //disperison length in meter
+omega = 4682; //oscillation period
+LI = omega*Ldisp;
+disp(LI,'interaction distance in meter LI=')
+//Example12.7.b
+D = 0.5e-06; //disperison of fiber in ps/nm.km
+C = 3e08;//free space velocity
+S0 = 8;//normalized separation of neighnoring solitons
+B = 10e09; //data rate 10 Gb/sec
+Lambda = 1550e-9; //wavelength in meters
+Beta2 = (Lambda/(2*%pi));
+LT = (C*exp(S0))/(16*D*B^2*(Beta2^2)*(S0^2));
+disp(LT*1e03,'Total transmission distance in Km LT =')
+//Example12.7.c
+Ts = 0.881/(S0*B);
+disp(Ts*1e12,'FWHM soliton pulse width in pico seconds Ts =')
+//Example12.7.d
+Ts_TB = 0.881/S0;
+disp(Ts_TB*100,'Fraction of the bit slot occupied by a soliton in percentage Ts_TB=')
+//Result
+//interaction distance in meter LI = 4.682D+08
+//Total transmission distance in Km LT = 2.870D+11
+//FWHM soliton pulse width in pico seconds Ts = 11.0125
+//Fraction of the bit slot occupied by a soliton in percentage Ts_TB = 11.0125
diff --git a/848/CH13/EX13.1/Example13_1.sce b/848/CH13/EX13.1/Example13_1.sce new file mode 100755 index 000000000..d932eb5b7 --- /dev/null +++ b/848/CH13/EX13.1/Example13_1.sce @@ -0,0 +1,23 @@ +//clear//
+//Caption: Calculation of power budget for optical link
+//Example13.1
+//page 464
+clear;
+clc;
+close;
+N = [5,10,50]; //number stations
+alpha = 0.4;//attenuation in dB/Km
+L_tap = 10;// coupling loss in dB
+L_thru = 0.9;// coupler throughput in dB
+Li = 0.5;//Intrinsic coupler loss in dB
+Lc = 1.0; // coupler-to-fiber loss in dB
+L = 0.5; //link length in Km
+fiber_Loss = alpha*L; //fiber loss in dB
+Pbudget = N*(alpha*L+2*Lc+Li+L_thru)-alpha*L-2*L_thru+2*L_tap;
+disp(fiber_Loss,'fiber loss in dB for L =500 m')
+disp(Pbudget,'power budget in dB for optical link when N = 5,10 and 50 stations respectively =')
+//Result
+//fiber loss in dB for L =500 m
+// 0.2
+//power budget in dB for optical link when N = 5,10 and 50 stations respectively =
+// 36. 54. 198.
diff --git a/848/CH13/EX13.2/Example13_2.sce b/848/CH13/EX13.2/Example13_2.sce new file mode 100755 index 000000000..7d2fb1bc8 --- /dev/null +++ b/848/CH13/EX13.2/Example13_2.sce @@ -0,0 +1,24 @@ +//clear//
+//Caption: Calculation of Number stations for given loss
+//Example13.2
+//page 465
+clear;
+clc;
+close;
+alpha = 0.4; //attenuation in dB/Km
+L_tap = 10; // coupling loss in dB
+L_thru = 0.9; // coupler throughput in dB
+Li = 0.5; //Intrinsic coupler loss in dB
+Lc = 1.0; // coupler-to-fiber loss in dB
+L = 0.5; //link length in Km
+Pbudget_LED = 38; // power loss between source and receiver in dB for LED source
+Pbudget_LASER = 51;//power loss between source and receiver in dB for LASER source
+N_LED = (Pbudget_LED+alpha*L-2*L_thru-2*L_tap)/(alpha*L+2*Lc+Li+L_thru)
+N_LASER = (Pbudget_LASER+alpha*L-2*L_thru-2*L_tap)/(alpha*L+2*Lc+Li+L_thru)
+disp(ceil(N_LED),'Number of stations allowed for given loss of 38 dB with LED source')
+disp(floor(N_LASER),'Number of stations allowed for given loss of 51 dB with LASER source')
+//Result
+//Number of stations allowed for given loss of 38 dB with LED source
+// 5.
+//Number of stations allowed for given loss of 51 dB with LASER source
+// 8.
diff --git a/848/CH13/EX13.3/Example13_3.sce b/848/CH13/EX13.3/Example13_3.sce new file mode 100755 index 000000000..84c221213 --- /dev/null +++ b/848/CH13/EX13.3/Example13_3.sce @@ -0,0 +1,19 @@ +//clear//
+//Caption: Calculation of worst case Dynamic Range
+//Example13.3
+//page 465
+clear;
+clc;
+close;
+N = [5,10] ;//number of stations
+alpha = 0.4;//attenuation in dB/Km
+L = 0.5; //link length in Km
+Lc = 1.0; // coupler-to-fiber loss in dB
+L_thru = 0.9;// coupler throughput in dB
+Li = 0.5;//Intrinsic coupler loss in dB
+DR = (N-2)*(alpha*L+2*Lc+Li+L_thru);
+disp(DR,'worst-case dyanmic range in dB for N =5 and 10 respectively DR =')
+//Result
+//worst-case dyanmic range in dB for N =5 and 10 respectively DR =
+// 10.8 28.8
+
diff --git a/848/CH13/EX13.4/Example13_4.sce b/848/CH13/EX13.4/Example13_4.sce new file mode 100755 index 000000000..6d513abd6 --- /dev/null +++ b/848/CH13/EX13.4/Example13_4.sce @@ -0,0 +1,19 @@ +//clear//
+//Caption: Calculation of power margin between transmitter and receiver for Star architectures
+//Example13.4
+//page 466
+clear;
+close;
+clc;
+N = [10,50]; //number of stations
+alpha = 0.4; //attenuation in dB/Km
+L = 0.5 ;//distance in Km
+Lexcess = [0.75,1.25]; //excess loss in dB for N =10 and 50
+Lc = 1.0; //connector loss in dB
+Ps_Pr(1) = Lexcess(1)+alpha*2*L+2*Lc+10*log10(N(1));
+Ps_Pr(2) = Lexcess(2)+alpha*2*L+2*Lc+10*log10(N(2));
+disp(Ps_Pr(1),'The power margin in dB between the transmitter and receiver for N=10 is Ps-Pr =')
+disp(Ps_Pr(2),'The power margin in dB between the transmitter and receiver for N=50 is Ps-Pr =')
+//Result
+//The power margin in dB between the transmitter and receiver for N=10 is Ps-Pr = 13.15
+//The power margin in dB between the transmitter and receiver for N=50 is Ps-Pr = 20.6397
diff --git a/848/CH13/EX13.5/Example13_5.sce b/848/CH13/EX13.5/Example13_5.sce new file mode 100755 index 000000000..177268f79 --- /dev/null +++ b/848/CH13/EX13.5/Example13_5.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption:Determination of maximum length of multimode fiber link
+//Example13.5
+//page 477
+clear;
+clc;
+close;
+L_OM2 = 40; //length of OM2 fiber
+L_OM3 = 100; //length of OM3 fiber
+BW_OM2 = 500e06;//bandwidth of OM2 fiber
+BW_OM3 = 2000e06; //bandwidth of OM3 fiber
+Lmax = L_OM2*(BW_OM3/BW_OM2)+L_OM3;
+disp(Lmax,'The maximum link length in meter is Lmax =')
+//Result
+//The maximum link length in meter is Lmax = 260.
diff --git a/848/CH14/EX14.10/Figure14__10.sce b/848/CH14/EX14.10/Figure14__10.sce new file mode 100755 index 000000000..872487a34 --- /dev/null +++ b/848/CH14/EX14.10/Figure14__10.sce @@ -0,0 +1,22 @@ +//clear//
+//Caption:Performance Measurement and Monitoring
+//Figure:14.10 Plotting pulse shape of gaussian distribution
+//and determining 3-dB optical and electrical bandwidth
+clear;
+close;
+clc;
+sigma = 1;
+t = -3*sigma:0.01:3*sigma;
+p = (1/(sigma*sqrt(2*%pi)))*exp(-t^2./(2*sigma^2));
+fdB_optical = 0.187/sigma;
+fdB_electrical = 0.133/sigma;
+disp(fdB_optical,'fdB_optical')
+disp(fdB_electrical,'fdB_electrical')
+plot(t,p,'r')
+xlabel('Time t')
+ylabel('Relative pulse amplitude P(t)')
+title('Figure:14.10 Definitions of pulse-shape parameters')
+xgrid(1)
+//Result
+//fdB_optical = 0.187
+//fdB_electrical = 0.133
diff --git a/848/CH2/EX2.1/Example2_1.sce b/848/CH2/EX2.1/Example2_1.sce new file mode 100755 index 000000000..5085ded6c --- /dev/null +++ b/848/CH2/EX2.1/Example2_1.sce @@ -0,0 +1,13 @@ +//clear//
+//Caption:Critical Angle of incidence
+//Example 2.1
+//page 37
+clear;
+close;
+clc;
+n1 = 1.48;
+n2 = 1.00;
+phic = asin(n2/n1);
+disp(phic*57.3,'Total Interflection reflection angle:critical angle of incidence in degrees')
+//Result
+//Total Interflection reflection angle:critical angle of incidence 42.509773
diff --git a/848/CH2/EX2.2/Example2_2.sce b/848/CH2/EX2.2/Example2_2.sce new file mode 100755 index 000000000..7aec8eb47 --- /dev/null +++ b/848/CH2/EX2.2/Example2_2.sce @@ -0,0 +1,22 @@ +//clear//
+//Caption: Finding Critical angle, numerical aperture, acceptance angle
+//Example 2.2
+//page 45
+clear;
+close;
+clc;
+n1 = 1.48; //core refractive index
+n2 = 1.46; //cladding index
+phic = asin(n2/n1)*57.3;
+NA = sqrt(n1^2 - n2^2);
+phi0 = asin(NA)*57.3;
+disp(phic,'Critical anlge')
+disp(NA,'numerical aperture')
+disp(phi0,'acceptance angel in air')
+//Result
+//Critical anlge
+// 80.575927
+//numerical aperture
+// 0.2424871
+//acceptance angel in air
+// 14.034412
diff --git a/848/CH2/EX2.3/Example2_3.sce b/848/CH2/EX2.3/Example2_3.sce new file mode 100755 index 000000000..0cc79598c --- /dev/null +++ b/848/CH2/EX2.3/Example2_3.sce @@ -0,0 +1,16 @@ +//clear//
+//Caption:Program to Calculate NORMALIZED FREQUENCY 'V' and Numerical Aperture
+//Example2.3
+//Page 58
+clear;
+close;
+clc;
+a = 25e-06;
+Lambda =1300e-09;
+V = 26.6;
+Numerical_Aperture = V*Lambda/(2*%pi*a)
+disp(Numerical_Aperture,"Numerical Aperture is");
+disp(M = (V^2)/2,'Total number of modes M entering the fiber is:')
+//Result
+// Numerical Aperture is: 0.2201431
+// Total number of modes M entering the fiber is: 353.78
diff --git a/848/CH2/EX2.4/Example2_4.sce b/848/CH2/EX2.4/Example2_4.sce new file mode 100755 index 000000000..82f0cff04 --- /dev/null +++ b/848/CH2/EX2.4/Example2_4.sce @@ -0,0 +1,18 @@ +//clear//
+//Caption:Power flow in the core and cladding of step-index fiber
+//Example 2.4
+//page 62
+clear;
+close;
+clc;
+V = [22,39];
+M =V^2/2;
+Pcladd_P = (4/3)*(M.^(-0.5));
+Pcore_P = 1- Pcladd_P;
+disp(M,'Total number of modes')
+disp(Pcladd_P*100,'Percentage of power propagates in the cladding')
+//Result
+// Total number of modes
+// 242. 760.5
+// Percentage of power propagates in the cladding
+// 8.5709913 4.8349182
diff --git a/848/CH2/EX2.5/Example2_5.sce b/848/CH2/EX2.5/Example2_5.sce new file mode 100755 index 000000000..5405379f8 --- /dev/null +++ b/848/CH2/EX2.5/Example2_5.sce @@ -0,0 +1,18 @@ +//clear//
+//Caption: Program to calculate Fiber Birefringence BETA_f
+//Example2.5
+//page 65
+clear;
+close;
+clc;
+Lambda = input('Enter the wavelength of Optical Signal');
+Lp = input('Beat Length');
+BETA_f_FORMULA1 = 2*%pi/Lp;
+disp(BETA_f_FORMULA1,"The fiber birefriengence using formula 1");
+BETA_f_FORMULA2 = Lambda/Lp;
+disp(BETA_f_FORMULA2,"The fiber birefriengence using formula 2");
+//Result
+//Enter the wavelength of Optical Signal 1300e-09
+//Beat Length 8e-02
+//The fiber birefriengence using formula 1 78.539816
+//The fiber birefriengence using formula 2 0.0000162
diff --git a/848/CH3/EX3.1/Example3_1.sce b/848/CH3/EX3.1/Example3_1.sce new file mode 100755 index 000000000..1325273a5 --- /dev/null +++ b/848/CH3/EX3.1/Example3_1.sce @@ -0,0 +1,18 @@ +//clear//
+//Caption:Program to Find Attenuation in dB/km
+//Example3.1
+//page 91
+clear;
+clc;
+z = [1 2]; //diatances are in kilometer
+alpha_in_dB_per_km = 3;
+r = (alpha_in_dB_per_km*z)/10;
+P0_Pz = (10^r);
+for i = 1:length(P0_Pz)
+ Pz_P0(i) = 1-(1/P0_Pz(i)) ;
+end
+disp(Pz_P0*100,'Optical signal power decreased by in percentage')
+//RESULT
+//Optical signal power decreased by in percentage
+// 49.881277
+// 74.881136
diff --git a/848/CH3/EX3.2/Example3_2.sce b/848/CH3/EX3.2/Example3_2.sce new file mode 100755 index 000000000..bfb8a1d2c --- /dev/null +++ b/848/CH3/EX3.2/Example3_2.sce @@ -0,0 +1,20 @@ +//clear//
+//Caption: To Calculate input and output power in dBm
+//Example3.2
+//page 91
+clear;
+close;
+clc;
+Pin = 200e-06; //power launched into the fiber
+alpha = 0.4; //attenuation in dB per KM
+z = 30; //optical fiber length 30 KM
+Pin_dBm = 10*log10(Pin/1e-03);
+Pout_dBm = 10*log10(Pin/1e-03)-alpha*z;
+Pout = 10^(Pout_dBm/10)
+disp(Pin_dBm,'Pin_dBm')
+disp(Pout_dBm,'Pout_dBm')
+disp(Pout*1e-03,'Output power in watts')
+//Result
+//Pin_dBm = - 6.9897
+//Pout_dBm = - 18.9897
+//Output power in watts = 0.0000126
diff --git a/848/CH3/EX3.3/Example3_3.sce b/848/CH3/EX3.3/Example3_3.sce new file mode 100755 index 000000000..b0804f7fc --- /dev/null +++ b/848/CH3/EX3.3/Example3_3.sce @@ -0,0 +1,14 @@ +//clear//
+//Caption:Rayleigh scattering loss
+//Example3.3
+//page97
+clear;
+close;
+clc;
+alpha_0 = 1.64; //attenuation at Lambda_0 in dB/KM
+Lambda_0 = 850e-09;// wavelength 850 nanometer
+Lambda = 1310e-09; //wavelength 1350 nanometer
+alpha_Lambda = alpha_0*((Lambda_0/Lambda)^4);
+disp(alpha_Lambda,'Rayleigh scattering loss alpha(Lambda) = ')
+//Result
+//Rayleigh scattering loss alpha(Lambda) = 0.2906929
diff --git a/848/CH3/EX3.4/Example3_4.sce b/848/CH3/EX3.4/Example3_4.sce new file mode 100755 index 000000000..0813895d0 --- /dev/null +++ b/848/CH3/EX3.4/Example3_4.sce @@ -0,0 +1,21 @@ +//clear//
+//Caption:Program to calculate percent in decrease of number of modes
+//Example 3.4
+//page 99
+clear;
+clc;
+alpha = 2; //graded index profile
+n2 = 1.5; //cladding
+Lamda = 1.3e-06; //wavelength
+R = 0.01; //bend radius of curvature
+a = 25e-06;// core radius
+delta = 0.01; //core-cladding index profile
+k = 4.83e06; //propagation constant
+disp(k,'k = ')
+part1 = (2*a/R)+floor((3/(2*n2*k*R))^(2/3));
+part2 = (alpha+2)/(2*alpha*delta);
+Neff_Ninf = 1-part1*part2;
+disp('number of modes decreased by')
+disp('Percent in graded-index fiber',Neff_Ninf*100)
+//RESULTS
+//number of modes decreased by 50 Percent in graded-index fiber
diff --git a/848/CH3/EX3.5/Example3_5.sce b/848/CH3/EX3.5/Example3_5.sce new file mode 100755 index 000000000..8944c2812 --- /dev/null +++ b/848/CH3/EX3.5/Example3_5.sce @@ -0,0 +1,16 @@ +//clear//
+//Caption: Calculation of pulse broadening
+//Example3.5
+//page 103
+clear;
+clc;
+close;
+C = 3e08; //free space velocity in metre/sec
+n1 = 1.48;//core refractive index
+n2 = 1.465;//cladding refractive index
+delta = 0.01; //index difference
+L = 10^3;//fiber length 10KM
+deltaT = (L*(n1^2)/(C*n2))*delta;
+disp((deltaT/L)*10^12,'pulse broadening in ns/KM')
+//Result
+//pulse broadening in ns/KM = 49.838453
diff --git a/848/CH3/EX3.6/Example3_6.sce b/848/CH3/EX3.6/Example3_6.sce new file mode 100755 index 000000000..63f1b9b2b --- /dev/null +++ b/848/CH3/EX3.6/Example3_6.sce @@ -0,0 +1,19 @@ +//clear//
+//Caption:Calculation of bandwidth distance
+//Example3.6
+//page 104
+clear;
+clc;
+close;
+n1 = 1.48;//core refractive index
+n2 = 1.465;//claddinig refractive index
+delta = 0.01;//index difference
+C =3*(10^8); //free space velcotiy
+BL = (n2/(n1^2))*(C/delta);
+disp(BL,'Bandwidth distance in bPS-M')
+disp(BL/10^9,'Bandwidth distance in MbPS-KM')
+//Result
+//Bandwidth distance in bPS-M
+// 2.006D+10
+//Bandwidth distance in MbPS-KM
+// 20.064828
diff --git a/848/CH3/EX3.7/Example3_7.sce b/848/CH3/EX3.7/Example3_7.sce new file mode 100755 index 000000000..1a34c568f --- /dev/null +++ b/848/CH3/EX3.7/Example3_7.sce @@ -0,0 +1,13 @@ +//clear//
+//Caption:Program to Find out the Material Dispersion
+//Example3.7
+//page107
+clear;
+clc;
+Lamda = 800e-09;//Wavelength in meter
+sigma_Lamda_LED = 40e-09;//spectral width in meters
+pulse_spread = 4.4e-12;//pulse spread in sec/meter
+mat_dispersion = pulse_spread/sigma_Lamda_LED
+disp(mat_dispersion,'material dispersion in seconds/square meter')
+//Result
+//material dispersion in seconds/square meter 0.00011
diff --git a/848/CH3/EX3.8/Example3_8.sce b/848/CH3/EX3.8/Example3_8.sce new file mode 100755 index 000000000..f54f7c0d7 --- /dev/null +++ b/848/CH3/EX3.8/Example3_8.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption:Program to Find out Waveguide Dispersion
+//Example3.8
+//page110
+clear;
+clc;
+n2 = 1.48; //index of cladding
+delta = 0.002; //index difference
+Lamda = 1320e-09; //Wavelength in meters
+V_dVb_dV = 0.26; //The value in square brackets for v = 2.4
+C =3e08;//Enter the velocity of light in free space
+Dwg_Lamda = -(((n2*delta)/C)*(1/Lamda))*V_dVb_dV
+disp(Dwg_Lamda*1e06,'The waveguide dispersion in ps/nm.km');
+//RESULTS
+//The waveguide dispersion in ps/nm.km = - 1.9434343
diff --git a/848/CH4/EX4.1/Example4_1.sce b/848/CH4/EX4.1/Example4_1.sce new file mode 100755 index 000000000..8f5b871a7 --- /dev/null +++ b/848/CH4/EX4.1/Example4_1.sce @@ -0,0 +1,19 @@ +//clear//
+//Caption: Program to find intrinsic carrier concentration
+//Example4.1
+//page136
+clear;
+close;
+clc;
+m = 9.11e-31; //Electron rest mass in kg
+me = 0.068*m; //Effective electron mass kg
+mh = 0.56*m; //Effective hole mass in kg
+Eg = 1.42*1.60218e-19;//band-gap energy in volts
+kB = 1.38054e-23;//Boltzma's constant
+T = 300; //room temperature in kelvin
+h = 6.6256e-34;//Planck's constant
+K = 2*((2*%pi*kB*T/(h^2))^1.5)*((me*mh)^0.75);//characteristic constant of material
+ni = K*%e^(-Eg/(2*kB*T));
+disp(ni,'intrinsic carrier concentration in cubic meter')
+//Result
+//intrinsic carrier concentration in cube meter 2.551D+12
diff --git a/848/CH4/EX4.3/Example4_3.sce b/848/CH4/EX4.3/Example4_3.sce new file mode 100755 index 000000000..f1ddc04d7 --- /dev/null +++ b/848/CH4/EX4.3/Example4_3.sce @@ -0,0 +1,16 @@ +//clear//
+//Caption: Finding Enegy gap and Wavelength
+//Example4.3
+//page146
+clear;
+close;
+clc;
+x =0.07;// compositional parameter of GaAlAs
+Eg = 1.424+1.266*x+0.266*x^2;
+Lamda = 1.240/Eg;
+disp(Eg,'Band Energy gap in ev')
+disp(Lamda,'Wavelength in micro meters')
+//Result
+// Band Energy gap in ev 1.5139234
+// Wavelength in micro meters 0.8190639
+
diff --git a/848/CH4/EX4.4/Example4_4.sce b/848/CH4/EX4.4/Example4_4.sce new file mode 100755 index 000000000..457e8a4e6 --- /dev/null +++ b/848/CH4/EX4.4/Example4_4.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption: Finding Enegy gap and Wavelength
+//Example4.4
+//page146
+clear;
+close;
+clc;
+y =0.57;// compositional parameter of InGaAsP
+Eg = 1.35-0.72*y+0.12*(y^2);
+Lamda = 1.240/Eg;
+disp(Eg,'Band Energy gap in ev')
+disp(Lamda,'Wavelength in micro meters')
+//Result
+// Band Energy gap in ev 0.978588
+// Wavelength in micro meters 1.2671318
diff --git a/848/CH4/EX4.5/Example4_5.sce b/848/CH4/EX4.5/Example4_5.sce new file mode 100755 index 000000000..4bfee7ad2 --- /dev/null +++ b/848/CH4/EX4.5/Example4_5.sce @@ -0,0 +1,24 @@ +//clear//
+//Caption :To find out the Internal Quantum Efficiency and Internal Power level of LED source
+//Example4.5
+//page149
+clear;
+clc;
+tuo_r = 30e-09;//radiative recombination in seconds
+tuo_nr =100e-09;//non-radiative recombination in seconds
+Etta_internal = 1/(1+(tuo_r/tuo_nr));//internal quantum efficiency
+h = 6.6256e-34; //Plank's constant
+C = 3e08; //velocity in m/sec
+q = 1.602e-19; //electron charge in coulombs
+I = 40e-03;//drive current in Amps
+Lamda = 1310e-09;// peak wavelength of InGaAsP LED
+Pinternal = (Etta_internal*((h*C)/q))*(I/Lamda);//internal power level
+disp(Pinternal,'THE INTERNAL POWER GENRATED WITH IN LED SOURCE IN WATTS IS');
+disp(Etta_internal,'The internal Quantum efficiency for the given radiative and non-radiative recombination time is');
+disp(Etta_internal*100,'Internal Quantum Efficiency in Percentage');
+//RESULT
+//THE INTERNAL POWER GENRATED WITH IN LED SOURCE IN WATTS IS
+//0.0291427
+//The internal Quantum efficiency for the given radiative and non-radiative recombination time is 0.7692308
+//Internal Quantum Efficiency in Percentage
+// 76.923077
diff --git a/848/CH4/EX4.6/Example4_6.sce b/848/CH4/EX4.6/Example4_6.sce new file mode 100755 index 000000000..2a1a27a4a --- /dev/null +++ b/848/CH4/EX4.6/Example4_6.sce @@ -0,0 +1,12 @@ +//clear//
+//Caption: External Quantum Efficiency in percentage
+//Example 4.6
+//page151
+clear;
+close;
+clc;
+n = 3.5; //refractive index of an LED
+Etta_External = 1/(n*(n+1)^2);
+disp(Etta_External*100,'External Efficiency in percentage')
+//Result
+//External Efficiency in percentage 1.4109347
diff --git a/848/CH4/EX4.7/Example4_7.sce b/848/CH4/EX4.7/Example4_7.sce new file mode 100755 index 000000000..c18c4de7c --- /dev/null +++ b/848/CH4/EX4.7/Example4_7.sce @@ -0,0 +1,18 @@ +//clear//
+//Caption:Program to find Lasing Threshold gain
+//Example4.7
+//page156
+clear;
+clc;
+L = 500e-06; //Laser diode length in meters
+R1 = 0.32//reflection coefficient value of one end;
+R2 = 0.32//reflection coefficient value of another end;
+alpha_bar =10/1e-02; //absorption coefficient;
+alpha_end = (1/(2*L))*log(1/(R1*R2));//mirror loss in the lasing cavity
+alpha_threshold = alpha_bar+alpha_end;//total loss
+disp(alpha_threshold,"The Threshold Gain per metre")
+alpha_threshold_cm = alpha_threshold/100
+disp(alpha_threshold_cm ,"The Threshold Gain per centimetre");
+//Result
+//The Threshold Gain per metre 3278.8686
+//The Threshold Gain per centimetre 32.788686
diff --git a/848/CH4/EX4.8/Example4_8.sce b/848/CH4/EX4.8/Example4_8.sce new file mode 100755 index 000000000..d3921171a --- /dev/null +++ b/848/CH4/EX4.8/Example4_8.sce @@ -0,0 +1,24 @@ +//clear//
+//Caption:Program TO Calculate Frequency Spacing & Wavelength Spacing
+//Example4.8
+//page160
+clear;
+clc;
+Lamda = 850e-9 //Emission wavelength of LASER diode
+n = 3.7 //refractive index of LASER diode
+L = 500e-6//length of LASER diode
+C = 3e08 //velocity of Light in free space
+delta_frequency = C/((2*L)*n);
+delta_Lamda = (Lamda^2)/((2*L)*n);
+Half_power = 2e-09; //half power point 3 nanometer
+sigma = sqrt(-(Half_power^2)/(2*log(0.5)));
+disp(delta_frequency,'Enter the frequency spacing in Hertz');
+disp(delta_Lamda,'Enter the waelength spacing in metres');
+disp(sigma,'spectral width of the gain');
+//RESULT
+//Enter the frequency spacing in Hertz
+// 8.108D+10
+//Enter the waelength spacing in metres
+// 1.953D-10
+//spectral width of the gain
+// 1.699D-09
diff --git a/848/CH4/EX4.9/Example4_9.sce b/848/CH4/EX4.9/Example4_9.sce new file mode 100755 index 000000000..191609531 --- /dev/null +++ b/848/CH4/EX4.9/Example4_9.sce @@ -0,0 +1,17 @@ +//clear//
+//Caption:Calcualtion of number of half-wavelengths and wavelength spacing between lasing modes
+//Example4.9
+//page161
+clear;
+clc;
+close;
+Lambda = 900e-09;// wavelength of ligth emitted by laser dioda
+L = 300e-06;// length of laser chip
+n = 4.3; //refractive index of the laser material
+m = 2*L*n/Lambda;//number of half-wavelengths
+delta_Lambda = (Lambda^2)/(2*L*n);//wavelength spacing
+disp(m,'number of half-wavelengths spanning the region between mirror surfaces')
+disp(delta_Lambda,'spacing between lasing modes is')
+//Result
+//number of half-wavelengths spanning the region between mirror surfaces 2866.6667
+//spacing between lasing modes is 3.140D-10
diff --git a/848/CH5/EX5.1/Example5_1.sce b/848/CH5/EX5.1/Example5_1.sce new file mode 100755 index 000000000..43210900e --- /dev/null +++ b/848/CH5/EX5.1/Example5_1.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption: Calculation of Lateral power distribution coefficient
+//Example5.1
+//page192
+clear;
+clc;
+close;
+phi = 0; //lateral coordinate
+Half_power = 10; //half power beam width
+teta = Half_power/2;
+teta_rad = teta/57.3;
+L = log(0.5)/log(cos(teta_rad));
+disp(L,'Lateral power distribution coefficient L=')
+//Result
+//Lateral power distribution coefficient L = 181.83303
diff --git a/848/CH5/EX5.2/Example5_2.sce b/848/CH5/EX5.2/Example5_2.sce new file mode 100755 index 000000000..a9f5a17c6 --- /dev/null +++ b/848/CH5/EX5.2/Example5_2.sce @@ -0,0 +1,22 @@ +//clear//
+//Caption:Program to Calcualte Optical Power Emitted from the Light source and Optical power coupled to step-index fiber
+//Example5.2
+//page194
+clear;
+close;
+clc;
+rs = 35e-06;//the source radius in meter
+a = 25e-06; //the core radii of step-index fiber meter
+NA = 0.20; //the numerical aperture value
+Bo = 150e04;// radiance in W/square meter.sr
+Ps = ((%pi^2)*(rs^2))*Bo;//power emitted by the source
+if (rs <=a) then
+ PLED_step = Ps*(NA^2);
+elseif (rs>a) then
+ PLED_step = (((a/rs)^2)*Ps)*(NA^2);
+end
+disp(Ps,'Optical power emitted by LED light source Ps =')
+disp(PLED_step,'Optical Power coupled into step index fiber in Watts PLED_step =');
+//RESULT
+//Optical power emitted by LED light source Ps = 0.0181354
+//Optical Power coupled into step index fiber in Watts PLED_step = 0.0003701
diff --git a/848/CH5/EX5.3/Example5_3.sce b/848/CH5/EX5.3/Example5_3.sce new file mode 100755 index 000000000..c2f69c939 --- /dev/null +++ b/848/CH5/EX5.3/Example5_3.sce @@ -0,0 +1,14 @@ +//clear//
+//Caption:Fresnel reflection, power coupled and power loss
+//Example5.3
+//page194
+clear;
+clc;
+close;
+n1 =3.6;//refractive index of optical source
+n = 1.48; //refractive index of silica fiber
+R = ((n1-n)/(n1+n))^2;
+L = -10*log10(1-R);
+disp(L,'Power loss in dB L =')
+//Result
+//Power loss in dB L = 0.8310322
diff --git a/848/CH5/EX5.4/Example5_4.sce b/848/CH5/EX5.4/Example5_4.sce new file mode 100755 index 000000000..86bc1d00c --- /dev/null +++ b/848/CH5/EX5.4/Example5_4.sce @@ -0,0 +1,14 @@ +//clear//
+//Caption:Power coupled between two graded index fibers
+//Example5.4
+//page205
+clear;
+clc;
+close;
+a =1e-06; //core radii in meters
+d = 0.3*a;//axial offset
+PT_P = (2/%pi)*(acos(d/(2*a))-(1-(d/(2*a))^2)^0.5*(d/(6*a))*(5-0.5*(d/a)^2));
+PT_P_dB = 10*log10(PT_P)
+disp(PT_P_dB,'Optical power coupled from first fiber into second fiber in dB is=')
+//Result
+//Optical power coupled from first fiber into second fiber in dB is = - 1.2597813
diff --git a/848/CH5/EX5.5/Example5_5.sce b/848/CH5/EX5.5/Example5_5.sce new file mode 100755 index 000000000..437ee136b --- /dev/null +++ b/848/CH5/EX5.5/Example5_5.sce @@ -0,0 +1,19 @@ +//clear//
+//Caption:Loss between single mode fibers due to Lateral misalignment
+//Example5.5
+//page 211
+clear;
+clc;
+close;
+V = 2.405; //normalized frequency
+n1 =1.47; //core refractive index
+n2 = 1.465; //cladding refractive index
+a = (9/2)*10^-06; //core radii in meters
+d = 1e-06; //lateral offset in meters
+W = a*(0.65+1.619*V^(-1.5)+2.879*V^-6);
+Lsm = -10*log10(exp(-(d/W)^2));
+disp(W,'mode-field diameter in meters W =');
+disp(Lsm,'Loss between single mode optical fibers due to lateral offset Lsm =')
+//Result
+//mode-field diameterin meters W = 0.0000049
+//Loss between single mode optical fibers due to lateral offset Lsm = 0.1775797
diff --git a/848/CH5/EX5.6/Example5_6.sce b/848/CH5/EX5.6/Example5_6.sce new file mode 100755 index 000000000..04c637cf9 --- /dev/null +++ b/848/CH5/EX5.6/Example5_6.sce @@ -0,0 +1,23 @@ +//clear//
+//Caption:Loss between single mode fibers due to angular misalignment
+//Example5.6
+//page212
+clear;
+clc;
+close;
+clear;
+clc;
+close;
+V = 2.405; //normalized frequency
+n1 =1.47; //core refractive index
+n2 = 1.465; //cladding refractive index
+a = (9/2)*10^-06; //core radii in meters
+d = 1e-06; //lateral offset in meters
+W = a*(0.65+1.619*V^(-1.5)+2.879*V^-6);//mode-field diameter
+teta = 1; //in degrees
+teta = 1/57.3; //in radaians
+Lambda = 1300e-09;//wavelength in meters
+Lsm_ang = -10*log10(exp(-(%pi*n2*W*teta/Lambda)^2));
+disp(Lsm_ang,'Loss between single mode fibers due to angular misalignment Lsm_ang =')
+//Result
+//Loss between single mode fibers due to angular misalignment Lsm_ang = 0.4054658
diff --git a/848/CH6/EX6.1/Example6_1.sce b/848/CH6/EX6.1/Example6_1.sce new file mode 100755 index 000000000..cee8c895d --- /dev/null +++ b/848/CH6/EX6.1/Example6_1.sce @@ -0,0 +1,14 @@ +//clear//
+//Caption:Cut-off wavelength of photodiode
+//Example6.1
+//page224
+clear;
+clc;
+close;
+h = 6.625*(10^-34); //planks constant
+C = 3*(10^8); //free space velocity
+Eg = 1.43*1.6*(10^-19);//joules
+LambdaC = h*C/Eg;
+disp(LambdaC,'Cut-off Wavelength of photodiode in meters =')
+//Result
+//Cut-off Wavelength of photodiode in meters= 0.0000009
diff --git a/848/CH6/EX6.2/Example6_2.sce b/848/CH6/EX6.2/Example6_2.sce new file mode 100755 index 000000000..830baf156 --- /dev/null +++ b/848/CH6/EX6.2/Example6_2.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption: Calculation of Quantum efficiency
+//Example6.2
+//page 226
+clear;
+clc;
+close;
+Ip_q = 5.4*(10^6);//electron-hole pairs generated
+Pin_hv = 6*(10^6);//number of incident photons
+etta = Ip_q/Pin_hv;
+disp(etta,'Quantum efficiency =')
+disp(etta*100,'Quantum efficiency in percentage =')
+//Result
+//Quantum efficiency = 0.9
+//Quantum efficiency in percentage = 90.
diff --git a/848/CH6/EX6.3/Example6_3.sce b/848/CH6/EX6.3/Example6_3.sce new file mode 100755 index 000000000..83c5bd89f --- /dev/null +++ b/848/CH6/EX6.3/Example6_3.sce @@ -0,0 +1,13 @@ +//clear//
+//Caption:Calculation of photocurrent
+//Example6.3
+//page226
+clear;
+clc;
+close;
+R = 0.65; //Responsivity of photodiode
+Pin = 10*(10^-6); //Optical power level in watts
+Ip = R*Pin;
+disp(Ip*10^6,'The amount of photocurrent generated in uA =')
+//Result
+//The amount of photocurrent generated in uA = 6.5
diff --git a/848/CH6/EX6.4/Example6_4.sce b/848/CH6/EX6.4/Example6_4.sce new file mode 100755 index 000000000..6256495cc --- /dev/null +++ b/848/CH6/EX6.4/Example6_4.sce @@ -0,0 +1,21 @@ +//clear//
+//Caption:Calculation of Responsivity of photodiode
+//Example6.4
+//page227
+clear;
+clc;
+close;
+Lambda = 1300e-09; //wavelength in meters
+C = 3*(10^8); //free space velocity
+v =C/Lambda; //frequency in Hz
+q = 1.6*(10^-19);//Change in coulombs
+etta = 0.9; //quantum efficiency 90%
+h = 6.625*10^-34; //planks constant
+R = (etta*q)/(h*v); //Responsivity
+disp(R,'Responsivity of photodiode at 1330nm in A/W R = ')
+Eg = 0.73; //energy gap in electron volts
+LambdaC = 1.24/Eg; //cut-off wavelength in meters
+disp(LambdaC,'cut-off wavelength in meters = ')
+//Result
+//Responsivity of photodiode at 1330nm in A/W R = 0.9418868
+//cut-off wavelength in meters = 1.6986301
diff --git a/848/CH6/EX6.5/Example6_5.sce b/848/CH6/EX6.5/Example6_5.sce new file mode 100755 index 000000000..09e0d5d2b --- /dev/null +++ b/848/CH6/EX6.5/Example6_5.sce @@ -0,0 +1,22 @@ +//clear//
+//Caption:To find primary photocurrent and multiplication factor
+//Example6.5
+//page230
+clear;
+clc;
+close;
+etta = 0.65; //quantum efficiency of silicon qavalanche photodiode
+C = 3*(10^8); //free space velocity in m/s
+Lambda = 900e-09;//wavelength in meters
+q = 1.6*(10^-19);//charge in coulombs
+h = 6.625*(10^-34);//planks constant
+v = C/Lambda; //frequnecy in Hz
+Pin = 0.5*10^-06;//optical power
+Ip = ((etta*q)/(h*v))*Pin;
+Im = 10*(10^-06); //multiplied photocurrent
+M = Im/Ip; //multiplication factor
+disp(Ip*10^6,'Primary photocurrent in uAmps Ip=')
+disp(ceil(M),'Primary photocurrent is multiplied by a factor of M =')
+//Result
+//Primary photocurrent in uAmps Ip = 0.2354717
+//Primary photocurrent is multiplied by a factor of M = 43.
diff --git a/848/CH6/EX6.6/Example6_6.sce b/848/CH6/EX6.6/Example6_6.sce new file mode 100755 index 000000000..839aaef07 --- /dev/null +++ b/848/CH6/EX6.6/Example6_6.sce @@ -0,0 +1,35 @@ +//clear//
+//Caption:Mean-square shot noise current, Mean-square dark current and Mean-Square thermal noise current
+//Example6.6
+//page 234
+clear;
+clc;
+close;
+Lambda = 1330e-09; //wavelength in meters
+ID = 4e-09;//photodiode current
+etta = 0.90;//quantum eficiency
+RL = 1000; //Load resistance 1000 ohms
+Pin = 300e-09; //incident optical power is 300 nano watts
+Be = 20*(10^6); //receiver bandwidth
+q = 1.6*(10^-19); //charge in coulombs
+h = 6.625*10^-34;//planks constant
+v= (3*10^8)/Lambda; //frequency in Hz
+Ip = (etta*q*Pin)/(h*v);//primary photocurrent
+Ishot = 2*q*Ip*Be; //shot-noise current
+Ishot = sqrt(Ishot);
+IDB = 2*q*ID*Be; //dark current
+IDB = sqrt(IDB);
+T = 283; //room temperature in kelvin
+KB = 1.38*10^-23; //boltzmann's constant
+RL = 1000; //load resistance
+IT = (4*KB*T)*Be/RL;//Thermal noise current
+IT = sqrt(IT);
+disp(Ip*10^6,'primary photocurrent in uA IP =')
+disp(Ishot*10^9,'mean-square shot noise current for a pin photodiode in nA Ishot =')
+disp(IDB*10^9,'mean-square dark current in nA IDB=')
+disp(IT*10^9,'mean-square thermal noise current for the receiver in nA IT =')
+//Result
+//primary photocurrent in uA IP = 0.2890868
+//mean-square shot noise current for a pin photodiode in nA Ishot = 1.3602042
+//mean-square dark current in nA IDB = 0.16
+//mean-square thermal noise current for the receiver in nA IT = 17.675746
diff --git a/848/CH6/EX6.7/Example6_7.sce b/848/CH6/EX6.7/Example6_7.sce new file mode 100755 index 000000000..9606ecb9c --- /dev/null +++ b/848/CH6/EX6.7/Example6_7.sce @@ -0,0 +1,19 @@ +//clear//
+//Caption:circuit bandwidth of a photodiode
+//Example6.7
+//page 239
+clear;
+clc;
+close;
+CP = 3*10^-12;//photodiode capacitance is 3 pico farad
+CA = 4*10^-12;//amplifier capcitance is 4 pico farad
+CT = CP+CA; //total capacitance
+RT1 = 1000; //photodiode load resistance
+BC1 = 1/(2*%pi*RT1*CT); //circuit bandwidth
+RT2 = 50; //photodiode load resistance
+BC2 = 1/(2*%pi*RT2*CT);//circuit bandwidth
+disp(BC1,'Circuit bandwidth for 1kilo Ohm photodiode resistance BC1 =')
+disp(BC2,'Circuit bandwidth for 50 ohm photodiode resistance BC2 =')
+//Result
+//Circuit bandwidth for 1kilo Ohm photodiode resistance BC1 = 22736420.
+//Circuit bandwidth for 50 ohm photodiode resistance BC2 = 4.547D+08
diff --git a/848/CH7/EX7.1/Example7_1.sce b/848/CH7/EX7.1/Example7_1.sce new file mode 100755 index 000000000..d0e81351b --- /dev/null +++ b/848/CH7/EX7.1/Example7_1.sce @@ -0,0 +1,18 @@ +//clear//
+//Caption: To find optimum decision threshold
+//Example7.1
+//Page 258
+clear;
+clc;
+close;
+bon = 1;
+boff =0;
+sigma_on = 1;
+sigma_off = 1;
+Q = (bon-boff)/(sigma_on+sigma_off)
+Vth = bon-Q*sigma_on
+disp(Q,'Q parameter value =')
+disp(Vth,'optimum decision threshold Vth =')
+//Result
+//Q parameter value = 0.5
+//optimum decision threshold Vth = 0.5
diff --git a/848/CH7/EX7.2/Example7_2.sce b/848/CH7/EX7.2/Example7_2.sce new file mode 100755 index 000000000..56ebef637 --- /dev/null +++ b/848/CH7/EX7.2/Example7_2.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption: To find out signal-to-noise ratio and probability of error for given 'Q'
+//Example7.2
+//Page 258
+clear;
+clc;
+close;
+Q = 6;
+Pe = (1/2)*(1-erf(Q/sqrt(2)));
+S_N_dB = 10*log10(2*Q);
+disp(Pe,'Probability of error Pe(Q) =')
+disp(S_N_dB,'Signal-to-noise ratio in dB S/N =')
+//Result
+//Probability of error Pe(Q) = 9.866D-10
+//Signal-to-noise ratio in dB S/N = 10.791812
diff --git a/848/CH7/EX7.3/Example7_3.jpg b/848/CH7/EX7.3/Example7_3.jpg Binary files differnew file mode 100755 index 000000000..85b547f9f --- /dev/null +++ b/848/CH7/EX7.3/Example7_3.jpg diff --git a/848/CH7/EX7.3/Example7_3.sce b/848/CH7/EX7.3/Example7_3.sce new file mode 100755 index 000000000..72a65704f --- /dev/null +++ b/848/CH7/EX7.3/Example7_3.sce @@ -0,0 +1,43 @@ +//clear//
+//Caption:Plotting Bit-Error-Rate versus Q factor
+//Example7.3
+//page 259
+clear;
+clc;
+close;
+Q = 0:0.01:8;
+Pe = (1/2)*(1-erf(Q./sqrt(2)));
+a =gca();
+a.data_bounds =[0,1e-16;8,0.5];
+plot(Q,Pe,'r')
+xlabel('Q')
+ylabel('Pe')
+title('BER(Pe) versus the factor Q')
+disp(Pe(1),'Probability of error at Q =0')
+disp(Pe(101),'Probability of error at Q =1')
+disp(Pe(201),'Probability of error at Q =2')
+disp(Pe(301),'Probability of error at Q =3')
+disp(Pe(401),'Probability of error at Q =4')
+disp(Pe(501),'Probability of error at Q =5')
+disp(Pe(601),'Probability of error at Q =6')
+disp(Pe(701),'Probability of error at Q =7')
+disp(Pe(801),'Probability of error at Q =8')
+//Result
+//Probability of error at Q =0
+// 0.5
+//Probability of error at Q =1
+// 0.1586553
+//Probability of error at Q =2
+// 0.0227501
+//Probability of error at Q =3
+// 0.0013499
+//Probability of error at Q =4
+// 0.0000317
+//Probability of error at Q =5
+// 0.0000003
+//Probability of error at Q =6
+// 9.866D-10
+//Probability of error at Q =7
+// 1.280D-12
+//Probability of error at Q =8
+// 6.106D-16
diff --git a/848/CH7/EX7.4/Example7_4.sce b/848/CH7/EX7.4/Example7_4.sce new file mode 100755 index 000000000..6c9b783b7 --- /dev/null +++ b/848/CH7/EX7.4/Example7_4.sce @@ -0,0 +1,22 @@ +//clear//
+//Caption: To find the energy of the photon incident on photodiode
+//and Minimum incident optical power
+//Example7.4
+//page 262
+clear;
+clc;
+close;
+h = 6.626e-34; //planks constant J/s
+C = 3e08; //free space velocity in m/s
+B = 10e06; //data rate 10 Mb/sec
+tuo = 2/B; //1/tuo = half the data rate B
+Lambda = 850e-09; //operating wavelength in nm
+E = 20.7*h*C/Lambda;
+Pi = E/tuo;
+disp(E,'Energy of the incident photon E =')
+disp(Pi,'minimum incident optical power Pi =')
+disp(10*log10(Pi*1000),'minimum incident optical power in dBm =')
+//Result
+// Energy of the incident photon E = 4.841D-18
+// minimum incident optical power Pi = 2.420D-11
+// minimum incident optical power in dBm = - 76.161059
diff --git a/848/CH8/EX8.1/Example8_1.sce b/848/CH8/EX8.1/Example8_1.sce new file mode 100755 index 000000000..8f27ab20c --- /dev/null +++ b/848/CH8/EX8.1/Example8_1.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption:Program to calculate the Total Optical Power loss
+//Example8.1
+//page 287
+clear;
+clc;
+close;
+system_margin = 6; //in dB
+alpha = 3.5; //attenuation in dB/Km
+L =6; // Length of transmission path in Km
+lc = 1; //connector loss in dB
+PT = 2*lc+alpha*L+system_margin;
+disp(PT,'The total optical power loss in dB PT =')
+//Result
+//The total optical power loss in dB PT = 29.
diff --git a/848/CH8/EX8.2/Example8_2.sce b/848/CH8/EX8.2/Example8_2.sce new file mode 100755 index 000000000..c134992e6 --- /dev/null +++ b/848/CH8/EX8.2/Example8_2.sce @@ -0,0 +1,20 @@ +//clear//
+//Caption:Program to calculate the system margin
+//Example8.2
+//page 288
+clear;
+clc;
+close;
+Ps = 3; //laser output in dBm
+APD_sen = -32; //APD sensitivity in dBm
+Allowed_Loss = Ps-APD_sen;//in dB
+lsc = 1; //source connector loss in dB
+ljc = 2*4; //two (jumper+connector loss) in dB
+alpha = 0.3;//attenuation in dB/Km
+L = 60; //cable length in Km
+cable_att = alpha*60;//cable attenuation in dB
+lrc = 1; //receiver connector loss in dB
+system_margin = Allowed_Loss-lsc-ljc-cable_att-lrc;
+disp(system_margin,'The Final Margin in dB =')
+//Result
+//'The Final Margin in dB = 7.
diff --git a/848/CH8/EX8.3/Example8_3.sce b/848/CH8/EX8.3/Example8_3.sce new file mode 100755 index 000000000..ee80a653c --- /dev/null +++ b/848/CH8/EX8.3/Example8_3.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption: Program to calculate link rise time
+//Example8.3
+//page 291
+clear;
+clc;
+close;
+t_tx = 15e-09; //transmitter rise time
+t_mat = 21e-09; //material dispersion related rise time
+t_mod = 3.9e-09; //rise time resulting from modal dispersion
+t_rx =14e-09; //receiver rise time
+tsys = sqrt(t_tx^2+t_mat^2+t_mod^2+t_rx^2)
+disp(tsys*1e09,'link rise time in nano seconds tsys =')
+//Result
+//link rise time in nano seconds tsys = 29.617731
diff --git a/848/CH8/EX8.4/Example8_4.sce b/848/CH8/EX8.4/Example8_4.sce new file mode 100755 index 000000000..19eac33ef --- /dev/null +++ b/848/CH8/EX8.4/Example8_4.sce @@ -0,0 +1,14 @@ +//clear//
+//Caption:Program to calculate link rise time
+//Example8.4
+//page292
+clear;
+clc;
+close;
+t_tx = 25e-12; //transmission rise time in sec
+t_GVD = 12e-12; //GVD rise time in sec
+t_rx = 0.14e-09; //receiver rise time in sec
+tsys = sqrt(t_tx^2+t_GVD^2+t_rx^2)
+disp(tsys*1e09,'link rise time in nano seconds tsys =')
+//Result
+//link rise time in nano seconds tsys = 0.1427200
diff --git a/848/CH8/EX8.5/Example8_5.sce b/848/CH8/EX8.5/Example8_5.sce new file mode 100755 index 000000000..ee6080df1 --- /dev/null +++ b/848/CH8/EX8.5/Example8_5.sce @@ -0,0 +1,13 @@ +//clear//
+//Caption:Calculation of Number of bits affected by a burst error
+//Example8.5
+//page 306
+clear;
+clc;
+close;
+bit_error_dur = 1e-03; //bit-corrupting burst noise duration in msec
+B = 10e03; //data rate 10kb/sec
+N = B*bit_error_dur;
+disp(N,'Number of bits affected by a burst error N=')
+//Result
+// Number of bits affected by a burst error N = 10.
diff --git a/848/CH8/EX8.6/Example8_6.sce b/848/CH8/EX8.6/Example8_6.sce new file mode 100755 index 000000000..a4bc16790 --- /dev/null +++ b/848/CH8/EX8.6/Example8_6.sce @@ -0,0 +1,13 @@ +//clear//
+//Caption: Program to find coefficients of generator polynomial
+//Example8.6
+//page 308
+clear;
+clc;
+close;
+x = poly(0,'x');
+G = x^7+0+x^5+0+0+x^2+x+1;
+C = coeff(G);
+disp(C($:-1:1),'Coefficients of generator polynomial C =')
+//Result
+// Coefficients of generator polynomial C = 1. 0. 1. 0. 0. 1. 1. 1.
diff --git a/848/CH8/EX8.7/Example8_7.sce b/848/CH8/EX8.7/Example8_7.sce new file mode 100755 index 000000000..c54b4199a --- /dev/null +++ b/848/CH8/EX8.7/Example8_7.sce @@ -0,0 +1,26 @@ +//clear//
+//Caption: Program to find CRC(Cyclic Redundancy Check)
+//Example8.7
+//page 308
+clear;
+clc;
+close;
+x = poly(0,'x');
+m = [1,1,1,1,0];
+G = x^7+x^6+x^5+x^4+0+0+0+0;
+D = x^3+0+x+1;
+[R,Q] = pdiv(G,D)
+R = coeff(R);
+Q = coeff(Q);
+R = abs(modulo(R,2));
+Q = abs(modulo(Q,2));
+disp(R,'Remainder R =')
+disp(Q,'Quotient Q =')
+disp([m R],'CRC for the given information CRC =')
+//Result
+//Remainder R =
+// 1. 0. 1.
+//Quotient Q =
+// 1. 1. 0. 1. 1.
+//CRC for the given information CRC =
+// 1. 1. 1. 1. 0. 1. 0. 1.
diff --git a/848/CH8/EX8.8/Example8_8.sce b/848/CH8/EX8.8/Example8_8.sce new file mode 100755 index 000000000..cc7f37806 --- /dev/null +++ b/848/CH8/EX8.8/Example8_8.sce @@ -0,0 +1,12 @@ +//clear//
+//Caption: Program to percentage of burst error detected by CRC
+//Example8.8
+//page 309
+clear;
+clc;
+close;
+N =32;
+Ped = 1-(1/(2^N));
+disp(Ped*100,'Percent of burst error detected by CRC for a length of 32 Ped=')
+//Result
+//Percent of burst error detected by CRC for a length of 32 Ped=100.
diff --git a/848/CH8/EX8.9/Example8_9.sce b/848/CH8/EX8.9/Example8_9.sce new file mode 100755 index 000000000..92565c3de --- /dev/null +++ b/848/CH8/EX8.9/Example8_9.sce @@ -0,0 +1,16 @@ +//clear//
+//Caption: Percent overhead to the inforamtion stream Using Reed-Solomon code for error correction
+//Example8.9
+//page 309
+clear;
+clc;
+close;
+S =8; //Reed-Solomon code with 1 byte
+n = (2^S-1); // length of coded sequence
+k = 239; //length of message sequence
+r = n-k;
+disp(r,'number of redundant bytes r =')
+disp((r/k)*100,'Percent overhead =')
+//Result
+//number of redundant bytes r = 16.
+// Percent overhead = 6.6945607
diff --git a/848/CH9/EX9.1/Example9_1.sce b/848/CH9/EX9.1/Example9_1.sce new file mode 100755 index 000000000..78a17c813 --- /dev/null +++ b/848/CH9/EX9.1/Example9_1.sce @@ -0,0 +1,15 @@ +//clear//
+//Caption:Program to find Relative Intensity Noise (RIN)
+//Example9.1
+//page 320
+clear;
+clc;
+close;
+IB_Ith = [1.3,1.4,1.5,1.6];//ratio between bias current and threshold current
+f = 100e06; //frequency = 100MHz
+RIN = ((IB_Ith-1)^-3)/f;
+RIN_dB = 20*log10(RIN);
+disp(RIN_dB,'Relative Intensity Noise(RIN) in dB/Hz RIN_dB =')
+//Result
+//Relative Intensity Noise(RIN) in dB/Hz RIN_dB =
+// - 128.62728 - 136.1236 - 141.9382 - 146.68908
diff --git a/848/CH9/EX9.2/Example9_2.sce b/848/CH9/EX9.2/Example9_2.sce new file mode 100755 index 000000000..d6657f7ea --- /dev/null +++ b/848/CH9/EX9.2/Example9_2.sce @@ -0,0 +1,41 @@ +//clear//
+//Caption: Program to Find limiting conditions for pin-photodiode
+//Example9.3
+//page 323
+clear;
+clc;
+close;
+T =300;//room temperature in kelvin
+kB = 1.38054e-23; //Boltzmann's constant in Joules/k
+m =0.25; //modualtion index
+RIN_dB = -143; //Relative intensity in dB/Hz
+RIN = 10^(RIN_dB/10);
+Pc = (10^(0/10))*1e-3; //power coupled to optical fiber in dBm
+R = 0.6; //Responsivity A/w
+Be = 10e06; //bandwidth 10MHz
+ID = 10e-09; //dark current 10nA
+Req = 750; //equivalent resistance 750 ohm
+Ft = 10^(3/10); //in 3 dB
+M = 1; //Multiplication factor for pin photodiode
+R = 0.6; //responsivity in A/m
+q = 1.602e-19; //charge in coulombs
+p = 0:-1:-20;
+P = (10^(p/10))*1e-3;
+C_N_1 = 0.5*((m*R*P)^2)/(4*kB*T*Be*Ft/Req);
+C_N_3 = 0.5*m^2/(RIN*Be);
+C_N_2 = 0.5*m^2*R*P/(2*q*Be);
+figure
+plot(p,10*log10(C_N_1),'r')
+xlabel('Received Optical Power(dBm)')
+ylabel('Carrier-to-noise ratio(dB)')
+title('Carrier-to-noise ratio 1 (Preamplifier receiver noise)')
+figure
+plot(p,10*log10(C_N_2),'m')
+xlabel('Received Optical Power(dBm)')
+ylabel('Carrier-to-noise ratio(dB)')
+title('Carrier-to-noise ratio 2 (Quantum noise)')
+figure
+plot(p,10*log10(C_N_3)*ones(1,length(p)))
+xlabel('Received Optical Power(dBm)')
+ylabel('Carrier-to-noise ratio(dB)')
+title('Carrier-to-noise ratio 3 (Reflection noise)')
|