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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter12 - Fiber-optic communiation systems"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.1 : Page 299"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"maximum possible link length = 8.00 km\n",
"total rise time of the system in ns is 30.0\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import sqrt, pi\n",
"#link length and reise time\n",
"af=2.5##dB/km\n",
"ac=0.5##dB/splice\n",
"nc=1##\n",
"lc=1##dB\n",
"ncc=2##\n",
"plx=-10##dBm\n",
"prx=-42##dBm\n",
"Ms=6##dB\n",
"L=((plx-prx-Ms-(lc*ncc))/(af+ac))##\n",
"TTX=12##NS\n",
"TRX=11##NS\n",
"NS1=3##NS/KM\n",
"NS2=1##NS/KM\n",
"tmat=(NS1*L)##ns\n",
"tint=(NS2*L)##ns\n",
"tsys=sqrt((TTX**2+tmat**2+tint**2+TRX**2))##ns\n",
"print\"maximum possible link length = %0.2f km\"% L\n",
"print \"total rise time of the system in ns is\",round(tsys)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.2: Page 305"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"part (a)\n",
"maximum possible link length = 4.71 km\n",
"part (b)\n",
"system bandwidth = 8.00 MHz\n"
]
}
],
"source": [
"## link length and bandwidth\n",
"print \"part (a)\"\n",
"af=3##dB/km\n",
"ac=0.5##dB/splice\n",
"nc=1##\n",
"lc=1##dB\n",
"ncc=1.5##\n",
"plx=0##dBm\n",
"prx=-25##dBm\n",
"Ms=7##dB\n",
"L=((plx-prx-Ms-(lc*ncc))/(af+ac))##\n",
"TTX=12##NS\n",
"TRX=11##NS\n",
"NS1=3##NS/KM\n",
"NS2=1##NS/KM\n",
"tmat=(NS1*L)##ns\n",
"tint=(NS2*L)##ns\n",
"tsys=sqrt((TTX**2+tmat**2+tint**2+TRX**2))##ns\n",
"print \"maximum possible link length = %0.2f km\"%L\n",
"print \"part (b)\"\n",
"af=3##dB/km\n",
"ac=0.5##dB/splice\n",
"nc=1##\n",
"lc=1##dB\n",
"ncc=1.5##\n",
"plx=-0##dBm\n",
"prx=-25##dBm\n",
"Ms=7##dB\n",
"L=((plx-prx-Ms-(lc*ncc))/(af+ac))##\n",
"TTX=1##NS\n",
"TRX=5##NS\n",
"NS1=9##NS/KM\n",
"NS2=2##NS/KM\n",
"tf=((NS1*L)**2+(NS2*L)**2)##\n",
"tsys=sqrt((TTX**2+tf+TRX**2))##ns\n",
"df=0.35/(tsys*10**-3)##\n",
"print \"system bandwidth = %0.2f MHz\"%round(df)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.3 : Page 310"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"no. of subscribers are 38.0\n"
]
}
],
"source": [
"from math import log10\n",
"#no. of subscribers\n",
"pt=1##mW\n",
"pn=-40##dBm\n",
"pn1=10**(pn/10)##\n",
"c=0.05##\n",
"d=0.11##\n",
"x=((pn1)/(pt*c))##\n",
"y=((log10(x))/(log10((1-d)*(1-c))))##\n",
"n=y+1##\n",
"print \"no. of subscribers are\",round(n)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.4: Page 311"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Total power, P_tot = 92.4 mW\n"
]
}
],
"source": [
"# Total power\n",
"#given data :\n",
"L_eff=20## in km\n",
"del_lamdaC=125## in nm\n",
"gR=6*10**-14## m/W\n",
"A_eff=55*10**-12## in m**2#\n",
"del_lamdaS=0.8## in nm\n",
"N=32## number of channels\n",
"F=0.1## constant\n",
"P_tot=(4*F*del_lamdaC*A_eff)/(gR*del_lamdaS*L_eff*(N-1))#\n",
"print \"Total power, P_tot = %0.1f mW\"%P_tot"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.5 : Page 312"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"SBS threshold power for the worst case = 8.66 mW\n",
"SBS threshold power for the best possible case = 17.33 mW\n"
]
}
],
"source": [
"#SBS threshold power\n",
"#given data :\n",
"gb=4*10**-11## in m/W\n",
"A_eff=55*10**-12## in m**2\n",
"L_eff=20## in km\n",
"lamda_p=1.55## micro-m\n",
"n=1.46## constant\n",
"Va=5960## for the silica fiber in m-s**-1\n",
"Vb=(2*n*Va)/lamda_p#\n",
"del_v=100*10**6## in Hz\n",
"del_Vb=20*10**6## in Hz\n",
"b1=1#\n",
"b2=2#\n",
"P_th=((21*b1*A_eff)/(gb*L_eff))*(1+(del_v/del_Vb))\n",
"P_th1=((21*b2*A_eff)/(gb*L_eff))*(1+(del_v/del_Vb))\n",
"print \"SBS threshold power for the worst case = %0.2f mW\"%P_th\n",
"print \"SBS threshold power for the best possible case = %0.2f mW\"%P_th1"
]
}
],
"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.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|