summaryrefslogtreecommitdiff
path: root/401/CH12/EX12.4/Example12_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '401/CH12/EX12.4/Example12_4.sce')
-rwxr-xr-x401/CH12/EX12.4/Example12_4.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/401/CH12/EX12.4/Example12_4.sce b/401/CH12/EX12.4/Example12_4.sce
new file mode 100755
index 000000000..1a2a15901
--- /dev/null
+++ b/401/CH12/EX12.4/Example12_4.sce
@@ -0,0 +1,27 @@
+//Example 12.4
+//Program to estimate incident optical power to register binary 1
+//at bit rates of 10 Mbit/s and 140 Mbit/s
+
+clear;
+clc ;
+close ;
+
+//Given data
+BER=10^(-9); //BIT ERROR RATE
+e=1.602*10^(-19); //Coulumbs - CHARGE OF AN ELECTRON
+Lambda=1*10^(-6); //metre - WAVELENGTH
+h= 6.626*10^(-34); //J/K - PLANK's CONSTANT
+c=2.998*10^8; //m/s - VELOCITY OF LIGHT IN VACCUM
+zm=864; //photons - FROM EXAMPLE 12.3
+
+//For 10 Mbit/s
+Bt=10*10^6; //bps - BIT RATES
+Po=zm*h*c*Bt/(2*Lambda);
+//Displaying the Result in Command Window
+printf("\n\n\t Incident optical power for %1.0f Mbit/s is %0.1f pW or %0.1f dBm.",Bt/10^6,Po/10^(-12),10*log10(Po/10^(-3)));
+
+//For 140 Mbit/s
+Bt=140*10^6; //bps - BIT RATES
+Po=zm*h*c*Bt/(2*Lambda);
+//Displaying the Result in Command Window
+printf("\n\n\t Incident optical power for %1.0f Mbit/s is %0.3f nW or %0.1f dBm.",Bt/10^6,Po/10^(-9),10*log10(Po/10^(-3))); \ No newline at end of file