summaryrefslogtreecommitdiff
path: root/Electronic_Communication_Systems_by_Roy_Blake/Chapter16.ipynb
blob: e2bcce082669404cb9e0aff23177eedf44a11eb1 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 16 : Antennas"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1 : pg 564"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The length of half-wave dipole is 7.125 m\n"
     ]
    }
   ],
   "source": [
    "#calculate the length of half wave dipole\n",
    "#page no 564\n",
    "#given\n",
    "#prob no. 16.1\n",
    "#Determination of length of half-wave dipole\n",
    "#given\n",
    "f=20.;#Operating freq in MHz\n",
    "#calculations\n",
    "L=142.5/f;\n",
    "#results\n",
    "print 'The length of half-wave dipole is',L,'m'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2 : pg 566"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The efficiency of dipole antenna is 93.1 %\n"
     ]
    }
   ],
   "source": [
    "#calculate the efficiency of dipole antenna \n",
    "#page no 566\n",
    "#prob no. 16.2\n",
    "#given\n",
    "#A dipole antenna with radiatn resistance=67ohm & loss resistance 5ohm\n",
    "Rr=67.;Rl=5;\n",
    "#calculations\n",
    "#Determination of efficiency \n",
    "eta=Rr/(Rr+Rl);\n",
    "#results\n",
    "print 'The efficiency of dipole antenna is',round(eta*100,1),'%'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3 : pg 571"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Second antenna with gain=4.5dBd has higher gain\n"
     ]
    }
   ],
   "source": [
    "#calculate whether the first or second antenna has higher gain \n",
    "#page no 569\n",
    "#prob no. 16.3\n",
    "#given\n",
    "#Two antennas with gain 5.3dBi & 4.5dBd\n",
    "#Converting unit dBd in dBi for comparison\n",
    "G1_dBi=5.3;G2_dBd=4.5;\n",
    "G2_dBi=2.14+G2_dBd;\n",
    "#calculations and results\n",
    "if G2_dBi > G1_dBi:\n",
    "    print 'Second antenna with gain=4.5dBd has higher gain'\n",
    "else:\n",
    "    print 'First antenna with gain=5.3dBi has higher gain '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4 : pg 571"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The gain is 1.434 dBi\n"
     ]
    }
   ],
   "source": [
    "#calculate the gain\n",
    "#page no 571\n",
    "#prob no. 16.4\n",
    "#given\n",
    "from math import log10\n",
    "#A dipole antenna with efficency=85% given\n",
    "n=0.85;D_dBi=2.14;#Directivity in dBi\n",
    "#calculations\n",
    "#Determination of gain in dB\n",
    "D=10**(D_dBi/10);\n",
    "G=D*n;#Determination of gain\n",
    "G_dBi=10*log10(G);#Converting to dBi\n",
    "#results\n",
    "print 'The gain is',round(G_dBi,3),'dBi'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 6 : pg 573"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "EIRP in dBm is expressed as 44.444 dBm\n"
     ]
    }
   ],
   "source": [
    "#calculate the EIRP in dBm \n",
    "#page no 573\n",
    "#prob no. 16.6\n",
    "#given\n",
    "from math import log10\n",
    "#ERP of Tx statn=17W\n",
    "ERP=17.;\n",
    "#calculations\n",
    "#Determnation of EIRP\n",
    "ERP_dBm=10*log10(ERP/10**-3);#Converting ERP in dBm\n",
    "EIRP_dBm=ERP_dBm+2.14;#Converting ERP in EIRP\n",
    "#results\n",
    "print 'EIRP in dBm is expressed as',round(EIRP_dBm,3),'dBm'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7 : pg 582"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a)1.The optimum diameter for antenna is 0.0795774715459 m\n",
      "a)2.The spacing for the antenna 0.0625 m\n",
      "a)3.The total length of an antenna is 0.5 m\n",
      "b)The antenna gain is 14.7712125472 dBi\n",
      "The beamwidth is 36.7695526217 degree\n"
     ]
    }
   ],
   "source": [
    "#calculate the beam width, optimum diameter, spacing, total length \n",
    "#page no 582\n",
    "#prob no. 16.7\n",
    "#given\n",
    "from math import pi, log10, sqrt\n",
    "#a helial antenna with 8 turns with freq=1.2GHz given\n",
    "N=8.;f=1.2*10**9;c=3*10**8;#Speed of light in m/s\n",
    "#calculations and results\n",
    "#a)Determination of optimum diameter of antenna\n",
    "wav=c/f;\n",
    "D=wav/pi;\n",
    "print 'a)1.The optimum diameter for antenna is',D,'m'\n",
    "S=wav/4;#Determination of spacing for the antenna\n",
    "print 'a)2.The spacing for the antenna',S,'m'\n",
    "L=N*S;#Determination of total length of an antenna\\\n",
    "print 'a)3.The total length of an antenna is',L,'m'\n",
    "#b)Determination of antenna gain in dBi\n",
    "G=(15*N*S*(pi*D)**2)/(wav**3);\n",
    "G_dBi=10*log10(G);#Converting in dBi\n",
    "print 'b)The antenna gain is',G_dBi,'dBi'\n",
    "#c)determination of beamwidth\n",
    "theta=((52*wav)/(pi*D))*sqrt(wav/(N*S));\n",
    "print 'The beamwidth is',theta,'degree'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8 : pg 590"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The length of elements are\n",
      "L5= 1.85469596002 m  L4= 1.29828717201 m  L3= 0.908801020408 m  L2= 0.636160714286 m  L1= 0.4453125 m \n",
      "The spacing between elements are\n",
      "D5= 3.46090977769 m D4= 2.42263684438 m  D3= 1.69584579107 m  D2= 1.18709205375 m  D1= 0.830964437623 m \n"
     ]
    }
   ],
   "source": [
    "#calculate the length and spacing \n",
    "#page no 590\n",
    "#prob no. 16.8\n",
    "from math import pi,tan\n",
    "#Design of log periodic antenna to cover freq 100-300MHz & t=0.7,a=30 degree\n",
    "t=0.7;a=30;\n",
    "#For good performance converting range to 90MHz to 320MHz\n",
    "f2=90.;f1=320.;\n",
    "#Determination of lengths of elements\n",
    "L1=142.5/f1;#For freq of 320MHz\n",
    "L2=L1/t;L3=L2/t;L4=L3/t;L5=L4/t;\n",
    "print 'The length of elements are'\n",
    "print 'L5=',L5,'m ','L4=',L4,'m ','L3=',L3,'m ','L2=',L2,'m ','L1=',L1,'m '\n",
    "#Determination of spacing betn elements\n",
    "D1=L1/(2*tan(a*pi/180./2.));\n",
    "D2=D1/t;D3=D2/t;D4=D3/t;D5=D4/t;\n",
    "print 'The spacing between elements are'\n",
    "print 'D5=',D5,'m','D4=',D4,'m ','D3=',D3,'m ','D2=',D2,'m ','D1=',D1,'m '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 9 : pg 598"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The beamwidth is 1.75 degree\n",
      "The gain is 39.766 dBi\n"
     ]
    }
   ],
   "source": [
    "#calculate the gain and beamwidth\n",
    "#page no 598\n",
    "#prob no. 16.9\n",
    "from math import pi, log10\n",
    "#given\n",
    "#A parabolic antenna with diameter=3m & efficiency=60% operate at 4GHz\n",
    "D=3.;n=0.6;f=4.*10**9;c=3.*10**8;#Spped of light\n",
    "#Determination of gain & beamwidth\n",
    "#calculations and results\n",
    "wav=c/f;#Determination of free space wavelength\n",
    "theta=(70.*wav)/D;#Calculaing beamwidth\n",
    "print 'The beamwidth is',theta,'degree'\n",
    "G=(n*(pi**2)*(D**2))/wav**2;#Calculating gain\n",
    "#Converting gain in dBi\n",
    "G_dBi=10*log10(G);\n",
    "print 'The gain is',round(G_dBi,3),'dBi'"
   ]
  }
 ],
 "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
}