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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 8: Optical Receiver Operation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7.q: Determine_maximum_response_time.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Question 7 page 8.55\n",
"\n",
"clc;\n",
"clear;\n",
"\n",
"w=25d-6; //width\n",
"v=3d4; //velocity\n",
"\n",
"t=w/v; //computing drift time\n",
"BW=(2*%pi*t)^-1; //computing bandwidth\n",
"rt=1/BW; //response time\n",
"rt=rt*10^9;\n",
"\n",
"printf('\nMaximum response time is %.2f ns.',rt);\n",
"\n",
"//Answer in the book is given as 5.24ns deviation of 0.01ns"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.10_1: Find_signal_to_noise_ratio.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Example 8.10.1 page 8.25\n",
"\n",
"clc;\n",
"clear;\n",
"\n",
"//erfc 4.24 is given to be 2d-9\n",
"\n",
"SN=(2*sqrt(2)*4.24)^2; //computing optical SNR\n",
"SN=round(SN);\n",
"SN1=sqrt(SN); //computing electrical SNR\n",
"printf('\nOptical SNR is %d.\nElectrical SNR is %d.',SN,SN1);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.11_1: Find_photon_energy.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Example 8.11.1 page 8.26\n",
"\n",
"clc;\n",
"clear;\n",
"\n",
"P=1d-9; //probability of error\n",
"eta=1;\n",
"N= -log(P);\n",
"N1=round(N);\n",
"printf('Thus %.1f or %d photons are required for maintaining 10^-9 BER.\nAssuming eta=1;\nE=%.1f*hv.',N,N1,N);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.17_1: Calculate_shot_noise_and_thermal_noise.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Example 8.17.1 page 8.46\n",
"\n",
"clc;\n",
"clear;\n",
"\n",
"lamda=0.85d-6;\n",
"h=6.626d-34; //plank's constant\n",
"c=3d8; //speed of light\n",
"q=1.6d-19; //charge of electron\n",
"eta=65/100; //quantum efficiency\n",
"P0=300d-9; //optical power\n",
"Id=3.5; //dark current\n",
"B=6.5d6; //bandwidth\n",
"K=1.39d-23; //Boltzman constant\n",
"T=293; //temperature\n",
"R=5d3; //load resister\n",
"Ip= 10^9*eta*P0*q*lamda/(h*c);\n",
"Its=10^9*(2*q*B*(Ip+Id));\n",
"Its=sqrt(Its);\n",
"printf('\nrms shot noise current is %.2f nA.',Its);\n",
"\n",
"It= 4*K*T*B/R;\n",
"It=sqrt(It);\n",
"It=It*10^9;\n",
"printf('\nThermal noise is %.2f nA.',It);\n",
"\n",
"//answer given in book for Thermal noise it is 4.58nA, deviation is 0.02nA."
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.17_2: Find_signal_to_noise_ratio.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Example 8.17.2 page 8.47\n",
"\n",
"clc;\n",
"clear;\n",
"\n",
"lamda=0.85d-6;\n",
"h=6.626d-34; //plank's constant\n",
"c=3d8; //speed of light\n",
"q=1.6d-19; //charge of electron\n",
"eta=65/100; //quantum efficiency\n",
"P0=300d-9; //optical power\n",
"Id=3.5; //dark current\n",
"B=6.5d6; //bandwidth\n",
"K=1.39d-23; //Boltzman constant\n",
"T=293; //temperature\n",
"R=5d3; //load resister\n",
"F_dB=3; //noise figure\n",
"F=10^(F_dB/10);\n",
"Ip=10^9*eta*P0*q*lamda/(h*c);\n",
"Its=10^9*(2*q*B*(Ip+Id));\n",
"It1= 4*K*T*B*F/R;\n",
"\n",
"SN= Ip^2/(Its+It1);\n",
"SN_dB=10*log10(SN);\n",
"SN=SN/10^4;\n",
"\n",
"printf('\nSNR is %.2f*10^4 or %.2f dB.',SN,SN_dB);\n",
"\n",
"//answer given in the book is 6.16*10^4 (deviation of 0.9) and 47.8dB (deviation of 0.16dB)\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.18_1: Calculate_maximum_load_resistance.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Example 8.18.1 page 8.48\n",
"\n",
"clc;\n",
"clear;\n",
"\n",
"Cd=7d-12;\n",
"B=9d6;\n",
"Ca=7d-12;\n",
"\n",
"R=(2*3.14*Cd*B)^-1;\n",
"B1=(2*3.14*R*(Cd+Ca))^-1;\n",
"R=R/1000;\n",
"B1=B1/10^6;\n",
"printf('\nThus for 9MHz bandwidth maximum load resistance is %.2f Kohm\nNow if we consider input capacitance of following amplifier Ca then Bandwidth is %.2fMHz\nMaximum post detection bandwidth is half.',R,B1);\n",
"\n",
"//answer for resistance in the book is 4.51Kohm, deviation of 0.01Kohm, while for bandwidth it is 4.51 MHz, deviation of 0.01MHz"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.3_1: Find_quantum_efficiency_and_minimum_incident_power.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Example 8.3.1 page 8.9\n",
"\n",
"clc;\n",
"clear;\n",
"\n",
"P=10^-9; //probability of error\n",
"eta=1; //ideal detector\n",
"h=6.626d-34 //plank's constant\n",
"c=3d8; //speed of light\n",
"lamda=1d-6; //wavelength\n",
"B=10^7; //bit rate\n",
"\n",
"Mn= - log(P);\n",
"printf('\n The quantum imit at the receiver to maintain bit error rate 10^-9 is (%.1f*h*f)/eta.',Mn);\n",
"f=c/lamda\n",
"Popt= 0.5*Mn*h*f*B/eta; //computing optical power\n",
"Popt_dB = 10 * log10(Popt) + 30; //optical power in dbm\n",
"Popt=Popt*10^12;\n",
"\n",
"printf('\nMinimum incident optical power is %.1f W or %.1f dBm.',Popt,Popt_dB);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.3_2: Calculate_incident_optical_power.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Example 8.3.2 page 8.11\n",
"\n",
"clc;\n",
"clear;\n",
"\n",
"SN_dB=60; //signal to noise ratio\n",
"h=6.626d-34 //plank's constant\n",
"c=3d8; //speed of light\n",
"lamda=1.3d-6; //wavelength\n",
"eta=1;\n",
"B=6.5d6; //Bandwidth\n",
"\n",
"SN=10^(SN_dB/10);\n",
"f=c/lamda\n",
"Popt= 2*SN*h*f*B/eta; //computing optical power\n",
"Popt_dB = 10 * log10(Popt) + 30; //optical power in dbm\n",
"Popt=Popt*10^6;\n",
"printf('\nIncident power required to get an SNR of 60 dB at the receiver is %.4f microWatt or %.3f dBm',Popt,Popt_dB);\n",
"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');\n",
"\n",
"//Calculation error in the book.They have take SN as 10^5 while calculating, which has lead to an error in final answer\n",
"//answer in the book 198.1nW and -37.71 dBm"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|