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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 19 : Television"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1 : pg 703"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Level of video signals in IRE units 53.75 IRE units\n"
]
}
],
"source": [
" \n",
"# page no 703\n",
"# prob no 19.1\n",
"#calculate the level of video signals\n",
"#given\n",
"# In the given problem,a video signal has 50% of the maximum luminance level\n",
"#A black setup level of 7.5 IRE represents zero luminance,and 100 IRE is max brightness.\n",
"#Therefore the range from min to max luminnance has 100-7.5=92.5 units.\n",
"#Therefore the level is\n",
"#calculations\n",
"IRE = 7.5 + (0.5 * 92.5)\n",
"#results\n",
"print 'Level of video signals in IRE units',IRE,'IRE units'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2 : pg 704"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Horizontal blanking occupies 15.75 % of the signal\n",
"vertical blanking occupies 8.0 % of the signal\n",
"The active video is 77.51 %\n"
]
}
],
"source": [
" \n",
"# page no 704\n",
"# prob no 19.2\n",
"#calculate the horizontal, vertical blanking occupies\n",
"# part a) horizontal blanking\n",
"# Horizontal blanking occupies approximately 10 us of the 63.5 us duration of each line,\n",
"#given\n",
"Hztl_blnk = 10 / 63.5 * 100\n",
"#calculations and results\n",
"print 'Horizontal blanking occupies',round(Hztl_blnk,2),'%','of the signal'\n",
"# part b) vertical blanking\n",
"# Vertical blanking occupies approximately 21 lines per field or 42 lines per\n",
"# frame. A frame has 525 lines altogether,so\n",
"Vert_blnk = 42. / 525 * 100\n",
"print 'vertical blanking occupies',Vert_blnk,'%','of the signal'\n",
"# part c) active signal\n",
"# since 8% of the time is lost in vertical blanking, 92% of the time is\n",
"# involved in the tansmission of the active lines.\n",
"act_vid = (100 - Hztl_blnk) * (100 - Vert_blnk) / 100\n",
"print 'The active video is',round(act_vid,2),'%'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3 : pg 707"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The horizontal resolution in lines is 240.0 lines\n"
]
}
],
"source": [
" \n",
"# page no 707\n",
"# prob no 19.3\n",
"#calculate the horizontal resolution\n",
"# A typical low-cost monochrome receiver has a video bandwidth of 3MHz\n",
"#given\n",
"B = 3.# bandwidth in MHz\n",
"#calculations\n",
"# The horizontal resolution in lines is given as\n",
"L_h = B * 80\n",
"#results\n",
"print 'The horizontal resolution in lines is',L_h,'lines'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4 : pg 709"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The luminance signal is 0.384\n",
"The in-phase component of the color signal is -0.248\n",
"The quadrature component of the color signal is 0.082\n"
]
}
],
"source": [
" \n",
"# page no 709\n",
"# prob no 19.4\n",
"#given\n",
"#calculate the components of signal\n",
"# A RGB video signal has normalized values as\n",
"R=0.2;G=0.4;B=0.8;\n",
"#calculations and results\n",
"#The luminance signal is given as\n",
"Y=0.30*R+0.59*G+0.11*B;\n",
"print 'The luminance signal is',Y\n",
"#The in-phase component of the color signal is given as\n",
"I=0.60*R-0.28*G-0.32*B;\n",
"print 'The in-phase component of the color signal is',I\n",
"#The quadrature component of the color signal is given as\n",
"Q=0.21*R-0.52*G+0.31*B;\n",
"print 'The quadrature component of the color signal is',Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 5 : pg 712"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"45.5625 % of the maximum transmitter power is used to transmit a black setup\n"
]
}
],
"source": [
" \n",
"# page no 712\n",
"# prob no 19.5\n",
"#refer table 19.1\n",
"#calculate the max transmitter power\n",
"#given\n",
"# The proportion in the table are voltage levels and have to be squared to get power.\n",
"# for black setup the voltage level is given as\n",
"#calculations\n",
"v = 0.675\n",
"#Therefore the power level as a fraction of the maximum transmitter power is\n",
"P_black_setup = v ** 2 * 100\n",
"#results\n",
"print P_black_setup,'%','of the maximum transmitter power is used to transmit a black setup'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6 : pg 728"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The input of Amp 1 is -20.0 dBmV\n",
"The output of Amp 1 is 20.0 dBmV\n",
"The input of Amp 2 is 5.0 dBmV\n",
"The output of Amp 2 is 30.0 dBmV\n",
"The input of Amp 3 is 8.0 dBmV\n",
"The output of Amp 3 is 28.0 dBmV\n",
"Signal strength at subscriber tap is 1.778 mV\n",
"The power at the end is -43.751 dBm\n"
]
}
],
"source": [
" \n",
"# page no 728\n",
"# prob no 19.6\n",
"# refer fig 19.27 of the page no 729\n",
"#calculate the output and input in all cases\n",
"#given\n",
"from math import log10\n",
"# from fig, we can write down the values directly as given\n",
"In1 = 100 * 10 ** -3#expressed in mV\n",
" #calculations and results\n",
"In1_dBmV = 20 * log10(In1 / 1)\n",
"print 'The input of Amp 1 is',In1_dBmV,'dBmV'\n",
"# this above calculated signal is applied to the input of the first\n",
"# amplifier,i.e. head-end signal processing\n",
"G1 = 40# gain of Amp 1 expressed in dB\n",
" # o/p level of Amp 1 is\n",
"Out1 = In1_dBmV + G1\n",
"print 'The output of Amp 1 is',Out1,'dBmV'\n",
"L = 15#expressed in dB\n",
"# The input level of Amp 2 is\n",
"In2_dBmV = Out1 - L\n",
"print 'The input of Amp 2 is',In2_dBmV,'dBmV'\n",
"G2 = 25#gain of Amp2 expressed in dB\n",
"# o/p level of Amp 2 is\n",
"Out2 = In2_dBmV + G2\n",
"print 'The output of Amp 2 is',Out2,'dBmV'\n",
"L1 = 10# loss in cable\n",
"L2 = 12#loss in directional coupler\n",
"# The input level of Amp 3 is\n",
"In3_dBmV = Out2 - L1 - L2\n",
"print 'The input of Amp 3 is',In3_dBmV,'dBmV'\n",
"G3 = 20#gain of Amp3 expressed in dB\n",
"Out3 = In3_dBmV + G3\n",
"print 'The output of Amp 3 is',Out3,'dBmV'\n",
"# There is further 3dB cable loss and 20dB loss in the tap\n",
"L3 = 3.#loss in cable\n",
"L4 = 20.# loss in tap\n",
"#signal strength at the tap is\n",
"Vdrop_dBmV = Out3 - L3 - L4\n",
"V_drop = 10 ** (Vdrop_dBmV / 20)# expressed in mV\n",
"print 'Signal strength at subscriber tap is',round(V_drop,3),'mV'\n",
"# Calculation of power into 75 ohm\n",
"R = 75.#expressed in ohm\n",
"Pdrop = (V_drop * 10 ** -3) ** 2 / R\n",
"Pdrop_dBm = 10 * log10(Pdrop / 10 ** -3)\n",
"print 'The power at the end is',round(Pdrop_dBm,3),'dBm'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7 : pg 731"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The interference would in 132.0 MHz to 126.0 MHz band\n",
"The bit rate for the signal is 110592000.0 bps\n"
]
}
],
"source": [
" \n",
"# page no 731\n",
"# prob no 19.7\n",
"#calculate bit rate and interference\n",
"#given\n",
"# In given problem a TV receiver is tuned to channel 6.\n",
"#All modern Rx uses a picture IF of 45.75 MHz with high-side injection of the signal into the cable.\n",
"# The picture carrier of channel 6 is at a frequency of 83.25MHz,so\n",
"ch = 6\n",
"Fc = 83.25# expressed in MHz\n",
"IF = 45.75#expressed in MHz\n",
"Nh = 640.\n",
"Nv = 480# resolution of digital video signal as 640*480 pixels\n",
"Rf = 30.#frame rate expressed in Hz\n",
"m = 8.# bits per sample\n",
"#calculations\n",
"f_lo = Fc + IF\n",
"a = f_lo + ch / 2\n",
"b = f_lo - ch / 2\n",
"# By using the product of Horizontal & vertical resolution, no of luminance\n",
"# pixels per frame are\n",
"Npl = Nh * Nv\n",
"# since each of the color signals has one-fourth the total no of luma pixels\n",
"Npt = 1.5 * Npl\n",
"#therefore bit rate is given as\n",
"fb = Npt * m * Rf\n",
"#results\n",
"print 'The interference would in',a,'MHz','to',b,'MHz','band'\n",
"print 'The bit rate for the signal is',fb,'bps'"
]
}
],
"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
}
|