summaryrefslogtreecommitdiff
path: root/1655/CH8/EX8.3.2/Example_8_3_2.sce
blob: 2450424e1520b3bd895b065185fb126e125e1e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Example 8.3.2  page 8.11

clc;
clear;

SN_dB=60;    //signal to noise ratio
h=6.626d-34 //plank's constant
c=3d8;     //speed of light
lamda=1.3d-6; //wavelength
eta=1;
B=6.5d6;     //Bandwidth

SN=10^(SN_dB/10);
f=c/lamda
Popt= 2*SN*h*f*B/eta;     //computing optical power
Popt_dB = 10 * log10(Popt) + 30;    //optical power in dbm
Popt=Popt*10^6;
printf("\nIncident power required to get an SNR of 60 dB at the receiver is %.4f microWatt or %.3f dBm",Popt,Popt_dB);
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");

//Calculation error in the book.They have take SN as 10^5 while calculating, which has lead to an error in final answer
//answer in the book 198.1nW and -37.71 dBm