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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 25 : Fiber Optic Systems"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1 : pg 919"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The system margin is 7.011 dB\n"
]
}
],
"source": [
" \n",
"# page no 919\n",
"# prob no 25_1\n",
"#calculate the system margin\n",
"#given\n",
"from math import log10\n",
"span_length = 40#in km\n",
"Pin_mW = 1.5\n",
"signal_strength_dBm = -25\n",
"fiber_length = 2.5#in km\n",
"loss_per_slice_dB = 0.25\n",
"f_loss_dB_per_km = 0.3\n",
"loss_connector_dB = 4\n",
"#calculations\n",
"Pin_dBm = 10 * log10(Pin_mW)\n",
"splices = span_length / fiber_length - 1\n",
"fiber_loss = span_length * f_loss_dB_per_km\n",
"splice_loss = splices * loss_per_slice_dB\n",
"T_loss = fiber_loss + splice_loss + loss_connector_dB\n",
"P_out = Pin_dBm - T_loss\n",
"sys_margin = P_out - signal_strength_dBm\n",
"#results\n",
"print 'The system margin is',round(sys_margin,3),'dB'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2 : pg 921"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The maximum permissible value for the pulse-spreading constant is 2.22 ns/km\n"
]
}
],
"source": [
" \n",
"# page no 921\n",
"# prob no 25_2\n",
"#calculate the max permissible value\n",
"#given\n",
"L=45;#in km\n",
"dt=100.;#in ns\n",
"#calculations\n",
"#The maximum permissible value for the pulse-spreading constant is \n",
"D=dt/L;\n",
"#results\n",
"print 'The maximum permissible value for the pulse-spreading constant is',round(D,2),'ns/km'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3 : pg 922"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"a) The maximum bit rate for NRZ 0.00743 GHz\n",
"b) The maximum bit rate for NRZ 0.00371 GHz\n"
]
}
],
"source": [
" \n",
"# page no 922\n",
"# prob no 25_3\n",
"#calculate the max bitrate in both cases#given\n",
"#given\n",
"from math import sqrt\n",
"L=45.;\n",
"T_Rtx=50.; T_Rrx=75.; T_Rf=100.;\n",
"#calculations and results\n",
"T_RT=sqrt(T_Rtx**2 + T_Rrx**2 + T_Rf**2);\n",
"# a) for NRZ\n",
"fb=1/T_RT;\n",
"print 'a) The maximum bit rate for NRZ',round(fb,5),'GHz'\n",
"# b) for RZ\n",
"fb=1/(2*T_RT);\n",
"print 'b) The maximum bit rate for NRZ',round(fb,5),'GHz'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4 : pg 924"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Dispersion is 1.0 ns/km\n",
"Total rise time is 5.0 ns\n"
]
}
],
"source": [
" \n",
"# page no 924\n",
"# prob no 25_4\n",
"#calculate the total rise time and dispersion\n",
"#given\n",
"Bl=500.;#in MHz-km\n",
"L=5.;#in km\n",
"#calculations and results\n",
"# using the bandwidth-distance product formula dispersion is given as\n",
"D=500/Bl;\n",
"print 'Dispersion is',D,'ns/km'\n",
"# Total rise time is given as\n",
"T_rt= D*L;\n",
"print 'Total rise time is',T_rt,'ns'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 5 : pg 924"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The maximum acceptable dispersion is 0.139 ns/km\n",
"The bandwidth-distance product is 3608.439 MHz-km\n"
]
}
],
"source": [
" \n",
"# page no 924\n",
"# prob no 25_5\n",
"#calculate the max acceptable dispersion and bandwidth-distance product\n",
"#given\n",
"from math import sqrt\n",
"T_Rrx=3.*10**-9;\n",
"T_Rtx=2.*10**-9;\n",
"fb=100.*10**6;#in bps\n",
"L=25;#in km\n",
"#calculations and results\n",
"T_RT = 1/(2*fb)\n",
"# we have to compute rise time therefore\n",
"T_rf= sqrt(T_RT**2 - T_Rtx**2 - T_Rrx**2)\n",
"# dispersion per km is\n",
"D= T_rf/L;\n",
"print 'The maximum acceptable dispersion is',round(D/10**-9,3),'ns/km'\n",
"# using the bandwidth-distance product\n",
"Bl=500/D;\n",
"print 'The bandwidth-distance product is',round(Bl*10**-9,3),'MHz-km'"
]
}
],
"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
}
|