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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 24 : Fiber Optics"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3 : pg 888"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The core diameter is 4.18746666667e-06 m\n"
]
}
],
"source": [
" \n",
"# page no 888\n",
"# prob no 24.3\n",
"#calculate the core diameter\n",
"#given\n",
"NA=0.15;\n",
"wl=820*10**-9;#in m\n",
"#calculations\n",
"d_core=2*(0.383*wl/NA);\n",
"#results\n",
"print 'The core diameter is',d_core,'m'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4 : pg 890"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The maximun distance that can be use between repeaters is 5.88 km\n"
]
}
],
"source": [
" \n",
"# page no 890\n",
"# prob no 24.4\n",
"#calculate the max distance\n",
"#given\n",
"Bl=500;#in MHz-km\n",
"B=85.;#in MHz\n",
"#calculations\n",
"# By using Bandwidth-distance product formula\n",
"l=Bl/B;\n",
"#results\n",
"print 'The maximun distance that can be use between repeaters is',round(l,2),'km'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 5 : pg 891"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The total dispersion is 948.95 ps\n"
]
}
],
"source": [
" \n",
"# page no 891\n",
"# prob no 24.5\n",
"#calculate the total dispersion\n",
"#given\n",
"wl0=1310.;#in ns\n",
"So=0.05;#in ps/(nm**2*km)\n",
"l=50.;#in km\n",
"wl=1550.;#in ns\n",
"d=2.;#in nm\n",
"#calculations\n",
"# Chromatic dispersion is given as\n",
"Dc=(So/4)*(wl-(wl0**4/wl**3));\n",
"# Dispersion is\n",
"D=Dc*d;\n",
"# Therefore total dispersion is \n",
"dt=D*l;\n",
"#results\n",
"print 'The total dispersion is',round(dt,2),'ps'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6 : pg 893"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The bandwidth distance product is 26343519494.2 Hz-km\n"
]
}
],
"source": [
" \n",
"# page no 893\n",
"# prob no 24.6\n",
"#given\n",
"#calculate the bandwidth distance product\n",
"#Refer problem 24.5\n",
"dt=949*10**-12;#in sed\n",
"l=50.;#in km\n",
"#calculations\n",
"B=1/(2*dt);\n",
"#By using Bandwidth-distance product formula\n",
"Bl= B*l;\n",
"#results\n",
"print 'The bandwidth distance product is',Bl,'Hz-km'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7 : pg 899"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"a) The proportion of input power emerging at port 2 is 10.0 %\n",
"b) The proportion of input power emerging at port 3 is 10.0 %\n",
"Directivity is 40 dB\n",
"the excess loss is 6.99 dB\n"
]
}
],
"source": [
" \n",
"# page no 899\n",
"# prob no 24.7\n",
"#calculate the directivity, power, excess loss\n",
"#given\n",
"from math import log10\n",
"# refer table from the problem page no 899\n",
"P_coupling1 =-3; P_coupling2 = -6; P_coupling3 =-40;# in dB\n",
"#calculations and results\n",
"#Part a) The proportion of input power emerging at port 2\n",
"P2_Pin=10**(P_coupling1/10);\n",
"print 'a) The proportion of input power emerging at port 2 is',P2_Pin*100,'%'\n",
"P3_Pin=10**(P_coupling2/10);\n",
"print 'b) The proportion of input power emerging at port 3 is',P3_Pin*100,'%'\n",
"# Part b) In the reverse direction,the signal is 40dB down for all combinations, so\n",
"directivity = 40;\n",
"print 'Directivity is',directivity,'dB'\n",
"Pin_total = P2_Pin + P3_Pin;\n",
"# excess loss in dB\n",
"loss=-10*log10(Pin_total);\n",
"print 'the excess loss is',round(loss,2),'dB'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8 : pg 901"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The energy of photon in eV is 1.242375 eV\n"
]
}
],
"source": [
" \n",
"# page no 901\n",
"# prob no 24.8\n",
"#calculate the energy of photon\n",
"#given\n",
"wl=1*10**-6;\n",
"c= 3*10**8;\n",
"h=6.626*10**-34\n",
"#calculations\n",
"f=c/wl;\n",
"E=h*f;# in Joule\n",
"#this energy can be converted into electron-volt. we know 1eV=1.6*10**-19 J\n",
"eV=1.6*10**-19 ;\n",
"E_ev=E/eV;\n",
"#results\n",
"print 'The energy of photon in eV is',E_ev,'eV'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9 : pg 909"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The diode current is 165.0 nA\n"
]
}
],
"source": [
" \n",
"# page no 909\n",
"# prob no 24_9\n",
"#calculate the diode current\n",
"#given\n",
"# refer fig 24.25\n",
"P_in=500;Responsivity=0.33;\n",
"#calculations\n",
"I_d = P_in * Responsivity;\n",
"#results\n",
"print 'The diode current is',I_d,'nA'"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|