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/CH8 | |
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/CH8')
-rwxr-xr-x | 848/CH8/EX8.1/Example8_1.sce | 15 | ||||
-rwxr-xr-x | 848/CH8/EX8.2/Example8_2.sce | 20 | ||||
-rwxr-xr-x | 848/CH8/EX8.3/Example8_3.sce | 15 | ||||
-rwxr-xr-x | 848/CH8/EX8.4/Example8_4.sce | 14 | ||||
-rwxr-xr-x | 848/CH8/EX8.5/Example8_5.sce | 13 | ||||
-rwxr-xr-x | 848/CH8/EX8.6/Example8_6.sce | 13 | ||||
-rwxr-xr-x | 848/CH8/EX8.7/Example8_7.sce | 26 | ||||
-rwxr-xr-x | 848/CH8/EX8.8/Example8_8.sce | 12 | ||||
-rwxr-xr-x | 848/CH8/EX8.9/Example8_9.sce | 16 |
9 files changed, 144 insertions, 0 deletions
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
|