summaryrefslogtreecommitdiff
path: root/Electronic_Communication_Systems_by_Roy_Blake/Chapter17.ipynb
blob: a9d0084e06185f6dbbee0afa436c410decfb9bdf (plain)
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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 17 : MicroWave Devices"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1 : pg 621"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The max usable freq is 7500000000.0 Hz\n"
     ]
    }
   ],
   "source": [
    "#calculate the max usable freq\n",
    "#page no 621\n",
    "#prob no. 17.1\n",
    "#given\n",
    "#TE10 mode in air dielectric mode with inside cross sectn=2cm*4cm\n",
    "#Determination of cut-off freq \n",
    "a=4.*10**-2;#largest dimn is used for calculation \n",
    "c=3.*10**8;#Speed of light in m/s\n",
    "#calculations\n",
    "fc=c/(2*a);\n",
    "#Determination of dominant mode of propagation over 2:1\n",
    "MUF=2*fc;\n",
    "#results\n",
    "print 'The max usable freq is',MUF,'Hz'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2 : pg 624"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The group velocity is 198431348.33 m/s\n"
     ]
    }
   ],
   "source": [
    "#calculate the group velocity \n",
    "#page no 624\n",
    "#prob no. 17.2\n",
    "#Determination of group velocity for waveguide in example 7.1\n",
    "from math import sqrt\n",
    "#given\n",
    "f=5*10**9;#freq.in Hz\n",
    "fc=3.75*10**9;#cut-off freq from eg.7.1\n",
    "c=3.*10**8;#speed of light in m/s\n",
    "#calculations\n",
    "vg=c*sqrt(1-(fc/f)**2);\n",
    "#results\n",
    "print 'The group velocity is',vg,'m/s'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3 : pg 624"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The group velocity for 12GHz signal is 165831239.518 m/s\n",
      "The group velocity for 17GHz signal is 242606948.556 m/s\n",
      "The diffn in the travel times for 2 signals is 9.5416670466e-08 sec\n"
     ]
    }
   ],
   "source": [
    "#calculate the froup velocity \n",
    "#page no 624\n",
    "#prob no. 17.3\n",
    "#A waveguide with fc=10GHz.2 signal with frequency 12 & 17GHz propogate down=50m\n",
    "from math import sqrt\n",
    "#given\n",
    "fc=10*10**9;c=3.*10**8;f1=12.*10**9;f2=17.*10**9;d=50.;\n",
    "#calculations and results\n",
    "#Determination of group velocity for 12GHz\n",
    "vg1=c*sqrt(1-(fc/f1)**2);\n",
    "print 'The group velocity for 12GHz signal is',vg1,'m/s'\n",
    "#Determination of group velo for 17GHz\n",
    "vg2=c*sqrt(1-(fc/f2)**2);\n",
    "print 'The group velocity for 17GHz signal is',vg2,'m/s'\n",
    "#Determination of time taken for 50m dist by f1\n",
    "t1=d/vg1;\n",
    "#Determination of time taken for 50m dist by f2\n",
    "t2=d/vg2;\n",
    "#Determination of diffn in the travel times for 2 signals \n",
    "dela=t1-t2;\n",
    "print 'The diffn in the travel times for 2 signals is',dela,'sec'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4 : pg 627"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The phase velocity is 453557367.611 m/s\n"
     ]
    }
   ],
   "source": [
    "#calculate the phase velocity \n",
    "#page no 627\n",
    "#prob no. 17.4\n",
    "#Determination of phase velo.with given 5GHz freq\n",
    "from math import sqrt\n",
    "#given\n",
    "f=5.*10**9;c=3.*10**8;fc=3.75*10**9;#Cut-off freq refering eg.17.1\n",
    "#calculations\n",
    "vp=c/sqrt(1-(fc/f)**2);#Calculation of phase velo.\n",
    "#results\n",
    "print 'The phase velocity is',vp,'m/s'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5 : pg 628"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The characteristic impedance of waveguide is 569.97 ohm\n"
     ]
    }
   ],
   "source": [
    "#calculate the characteristic impedanccec of waveguide\n",
    "#page no 628\n",
    "#prob no. 17.5\n",
    "from math import sqrt\n",
    "#given\n",
    "#determination of characteristic impedance of waveguide with given 5GHz freq\n",
    "f=5*10**9;fc=3.75*10**9;#Refering in eg. 17.4\n",
    "#calculations\n",
    "Zo=377/sqrt(1-(fc/f)**2);\n",
    "#results\n",
    "print 'The characteristic impedance of waveguide is',round(Zo,3),'ohm'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7 : pg 631"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The signal level in main guide is  19.0 dBm\n",
      "The signal level in secondary guide is 0.0 dBm\n",
      "The signal level from sec guide when reversed guide is -40.0 dBm\n"
     ]
    }
   ],
   "source": [
    "#page no 631\n",
    "#prob no. 17.7\n",
    "#calculate the signal level in all cases\n",
    "#A signal with level of 20dBm & insertion loss=1dB & coupling =20dB,directivity=40dB\n",
    "#given\n",
    "sig_in=20.;loss=1.;couple=20.;direct=40.;\n",
    "#calculations and results\n",
    "#Determination of signal level in main guide\n",
    "sig_level_main=sig_in-loss;\n",
    "print 'The signal level in main guide is ',sig_level_main,'dBm'\n",
    "#Determination of signal level in secondary guide\n",
    "sig_level_sec=sig_in-couple;\n",
    "print 'The signal level in secondary guide is',sig_level_sec,'dBm'\n",
    "#If signal dirn in main guide were reveresed,the signal level in sec gide would reduced by 40dB to\n",
    "sig_sec_rev=(sig_level_sec)-(direct);\n",
    "print 'The signal level from sec guide when reversed guide is',sig_sec_rev,'dBm'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8 : pg 642"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The frequency of oscillation is 14285714285.7 Hz\n"
     ]
    }
   ],
   "source": [
    " \n",
    "#page no 642\n",
    "#prob no. 17.8\n",
    "#calculate the frequency of oscillation\n",
    "#given\n",
    "#A Gunn device with thickness=7um\n",
    "d=7*10**-6;v=10**5;#Basic velocity of e\n",
    "#calculations\n",
    "t=d/v;#Basic velocity relation\n",
    "#Determination of freq of oscillation\n",
    "f=1/t;#Inverse of period is freq\n",
    "#results\n",
    "print 'The frequency of oscillation is',f,'Hz'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 9 : pg 648"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The duty cycle is 0.065\n",
      "The length of pulse is 0.00065 sec\n"
     ]
    }
   ],
   "source": [
    " \n",
    "#page no 648\n",
    "#prob no. 17.9\n",
    "#calculate the duty cycle and length of pulse\n",
    "#given\n",
    "#A pulse magnetron with avg power=1.2kW & peak power=18.5kW & 1 pulse is generated every 10ms\n",
    "Pavg=1.2*10**3;Pp=18.5*10**3;Tt=10.*10**-3;\n",
    "#calculations\n",
    "#Determination of duty cycle\n",
    "D=Pavg/Pp;\n",
    "#Determination of length of pulse\n",
    "Ton=D*Tt;\n",
    "#results\n",
    "print 'The duty cycle is',round(D,3)\n",
    "print 'The length of pulse is',round(Ton,5),'sec'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10 : pg 652"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a)The gain is 15.763 dBi\n",
      "b)The beamwidth in H-plane is 26.923 degree\n",
      "c)The beamwidth in H-plane is 28.966 degree\n"
     ]
    }
   ],
   "source": [
    " \n",
    "#page no 652\n",
    "#prob no. 17.10\n",
    "#calculate the gain and beam width in all cases\n",
    "import math\n",
    "#A pyramidal horn has aperture=58mm in E-plane & 78mm in H-plane & operates at 10GHz\n",
    "#given\n",
    "f=10*10**9;c=3.*10**8;dH=78.*10**-3;dE=58.*10**-3;\n",
    "#calculations and results\n",
    "#a)Determination of gain in dB\n",
    "wl=c/f;#calculation of wavelength\n",
    "G=(7.5*dE*dH)/(wl**2);\n",
    "G_dBi=10*math.log10(G);#Converting to dBi\n",
    "print 'a)The gain is',round(G_dBi,3),'dBi'\n",
    "#b)Determination of beamwidth in H-palne\n",
    "theta_H=(70*wl)/dH;\n",
    "print 'b)The beamwidth in H-plane is',round(theta_H,3),'degree'\n",
    "#c)Determination of beamwidth in E-plane\n",
    "theta_E=(56*wl)/dE;\n",
    "print 'c)The beamwidth in H-plane is',round(theta_E,3),'degree'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 11 : pg 654"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The antenna width =  53.03 m  and  The antenna length =  53.03 m\n"
     ]
    }
   ],
   "source": [
    " \n",
    "#page no 654\n",
    "# problem no 17.11\n",
    "#calculate the width and length of the antenna\n",
    "#given\n",
    "from math import sqrt\n",
    "#for a square patch antenna\n",
    "f=2*10**6;# freq of operation in Hz\n",
    "Er=2;# relative permittivity\n",
    "c=3*10**8;# velo of light\n",
    "#calculations\n",
    "#wavelength is given as\n",
    "wl=c/(f*sqrt(Er));\n",
    "#The antenna width and length are each approximately half of this.\n",
    "w=wl/2;\n",
    "l=wl/2;\n",
    "#results\n",
    "print 'The antenna width = ',round(w,2),'m ','and ','The antenna length = ',round(l,2),'m'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12 : pg 657"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The received power is 1.01251354638e-14 W\n"
     ]
    }
   ],
   "source": [
    " \n",
    "#page no 657\n",
    "#prob no. 17.12\n",
    "#calculate the received power\n",
    "import math\n",
    "#A radar Tx has power=10kW at freq=9.5GHz & target at 15km with cross sectn=10.2 m2 with gain of antenna is 20dBi\n",
    "f=9.5*10**9;Pt=10.*10**3;c=3.*10**8;G_dBi=20.;a=10.2;r=15.*10**3;\n",
    "#calculations\n",
    "#Determination of received power\n",
    "wl=c/f;#calculating wavelength\n",
    "G=10**(G_dBi/10.);#Converting to power ratio\n",
    "Pr=((wl**2)*Pt*(G**2)*a)/(((4*math.pi)**3)*(r**4));\n",
    "#results\n",
    "print 'The received power is',Pr,'W'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 13 : pg 659"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The distance of target is 2250.0 m\n",
      "The maximum range is  150000.0 m\n",
      "The minimum range is  150.0 m\n"
     ]
    }
   ],
   "source": [
    " \n",
    "#page no 659\n",
    "#prob no. 17.13a\n",
    "#calculate the distance of target\n",
    "#a pulse sent,returns after 15us\n",
    "#given\n",
    "t=15*10**-6;c=3.*10**8;\n",
    "tp=10**-6;#pulse duration of pulse radar\n",
    "f=10**3;#operating freq in Hz\n",
    "#calculations\n",
    "#Determination of distance of target\n",
    "R=(c*t)/2;\n",
    "#The maximum unambiguous range is \n",
    "Rmax=c/(2*f);\n",
    "#The minimum unambiguous range is \n",
    "Rmin=c*tp/2;\n",
    "#results\n",
    "print 'The distance of target is',R,'m'\n",
    "print 'The maximum range is ',Rmax,'m'\n",
    "print 'The minimum range is ',Rmin,'m'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14 : pg 662"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Doppler shift is  1777.78 Hz\n"
     ]
    }
   ],
   "source": [
    " \n",
    "#page no 662\n",
    "#prob no. 17.14\n",
    "#calculate the doppler shift\n",
    "#given\n",
    "v=60.;#speed of vehicle moving towards radar in mph\n",
    "c=3*10**8;#velo of light in m/s\n",
    "f=10.**10;# operating frequency in Hz\n",
    "#calculations\n",
    "# conversion of speed from mph to km/hr\n",
    "v1=60*1.6;\n",
    "# conversion of speed from km/hr to m/s\n",
    "v2=v1*10**3/3600.;\n",
    "# Now the Doppler shift is found as\n",
    "fd=2*v2*f/c;\n",
    "#results\n",
    "print 'The Doppler shift is ',round(fd,2),'Hz'"
   ]
  }
 ],
 "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
}