summaryrefslogtreecommitdiff
path: root/3822/CH8/EX8.3/Ex8_3.sce
blob: 918305d76bbdc82beb80d0e73e60b480913e1f85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

//OptoElectronics and Fibre Optics Communication, by C.K Sarkar and B.C Sarkar
//Example 8.3
//OS=Windows 10
////Scilab version Scilab 6.0.0-beta-2(64 bit)
clc;
clear;

//given
Cd=6e-12;//capacitance in farad
Id=0;//dark current in photodiode
B=40e6;//bandwidth in Hz
I=2e-7;//photo current before gain in Ampere
T=300;//temperature in kelvin
Fn=1;
KB=1.38*1e-23//boltzman constant in SI units
e=1.6*10^-19//charge of an electron in columb
//case 1:
u=2*3.14*Cd*B;
RL=1/u;//load resistance in ohms
mprintf("\n Load resistance is=%.2f ohms",RL);

//case 2:
i2sh=2*(e)*B*I;// shot noise in A^2
v=4*(KB)*T*B;
i2th=v/RL;//thermal noise in A^2
//if i2>i1 then
S=I^2;
N=i2th;
z=S/N;
mprintf("\n Signal to noise ratio is=%.2f",z);
//when M=Mopt and x=0.3
x=0.3;//lies between 0.3 to 0.5 for silicon and 0.7 to 1 for Ge
a=4*(KB)*T;
b=(e)*x*RL*I;
M1=a/b;
Mopt=M1^(1/2.3)
S1=[(Mopt)*I]^2;//signal strength in W
N1=[2*(e)*B*I*((Mopt)^2.3)]+[(4*(KB)*T*B)/(RL)];//noise power in W
SbyN=S1/N1;//signal to noise ratio
mprintf("\n Signal to noise ratio is=%.2f",SbyN);
//the answer in book is wrong