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
|
{
"metadata": {
"name": "",
"signature": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"chapter 04 : Antenna Arrays"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.3 : page 4.67"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import acos, pi, cos, sqrt, degrees\n",
"#given data :\n",
"from sympy import symbols\n",
"lamda, Ep = symbols('lamda Ep')\n",
"d = 3.0/2*lamda\n",
"beta = 2*pi/lamda\n",
"delta = 0 # for broad side array\n",
"theta = pi/2 # for maxima\n",
"si = 3*pi/2*cos(theta)\n",
"E0 = Ep/sqrt(2) # at half power beam width\n",
"#Ep = 2*E0*cos(si/2)\n",
"#it leads to cos(3*pi/2*cos(theta))=1/sqrt(2)\n",
"theta=acos(acos(1/sqrt(2))/(3*pi/2)) # radian\n",
"theta = degrees(theta) # degree\n",
"HPBW=2*(90-theta) #in degree\n",
"print \"(i) HPBW = %0.f degree \" %HPBW \n",
"# 2nd part is wrong. Some mistake in question as cos(theta) = 13/12 which >1 not possible"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(i) HPBW = 19 degree \n"
]
}
],
"prompt_number": 18
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.4 : page 4.68"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import log10\n",
"from sympy import symbols\n",
"lamda = symbols('lamda')\n",
"#given data :\n",
"n=10 #no. of elements\n",
"d=lamda/4 #separation in meter\n",
"D=2*n/(lamda/d)\n",
"Ddb=10*log10(D) #in db\n",
"print \"For broad side array D = %0.2f db \" %Ddb \n",
"D=4*n/(lamda/d)\n",
"Ddb=10*log10(D) #in db\n",
"print \"For end fire array D = %0.2f db \" %Ddb "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"For broad side array D = 6.99 db \n",
"For end fire array D = 10.00 db \n"
]
}
],
"prompt_number": 22
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.5 : page 4.68"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import sqrt, pi\n",
"#given data :\n",
"from sympy import symbols, N\n",
"lamda = symbols('lamda')\n",
"delta=-90 #in degree\n",
"#Formula : HPBW=57.3/(sqrt(L/(2*lambda))) in Degree\n",
"n=20 #no. of point sources\n",
"d=lamda/4 #in meter\n",
"L=(n-1)*d\n",
"HPBW=57.3/(sqrt(L/lamda/2)) # in Degree\n",
"print \"HPBW = %0.2f Degree \" %HPBW \n",
"D=4*L/lamda #Directivity\n",
"print \"Directivity = %0.2f \" %D \n",
"Ae = D*lamda**2/4/pi\n",
"print \"Effective aperture : Ae =\",N(Ae,3)\n",
"Omega=4*pi/D #in steradian\n",
"print \"Beam Solid Angle : Omega =\",round(Omega,2),\"Steradian\" \n",
"#Note : Answer in the book is not accurate."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"HPBW = 37.18 Degree \n",
"Directivity = 19.00 \n",
"Effective aperture : Ae = 1.51*lamda**2\n",
"Beam Solid Angle : Omega = 0.66 Steradian\n"
]
}
],
"prompt_number": 32
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.6 : page 4.69"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import degrees\n",
"#given data :\n",
"n=8 #no. of half wave dipoles\n",
"lamda=100 #in cm\n",
"lamda=lamda*10**-2 #in m\n",
"d=50 #in cm\n",
"d=d*10**-2 #in m\n",
"I=0.5 #in A\n",
"Rr=73 #in Ohm\n",
"Pr=n*I**2*Rr #in Watts\n",
"print \"Pr = %0.2f Watts \" %Pr \n",
"BWFN=2*lamda/(n*d) #in radian\n",
"HPBW=BWFN/2 #in radian\n",
"print \"HPBW = %0.2f degree\" % degrees(HPBW)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Pr = 146.00 Watts \n",
"HPBW = 14.32 degree\n"
]
}
],
"prompt_number": 34
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.7 : page 4.69"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import log10\n",
"from sympy import symbols, N\n",
"lamda = symbols('lamda')\n",
"#given data :\n",
"n=10 #no. of elements\n",
"d=lamda/4 #separation in meter\n",
"Do=1.789*4*n*d/lamda\n",
"Dodb=10*log10(Do) #in db\n",
"print \"Do = %0.2f db\" %(Dodb) "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Do = 12.53 db\n"
]
}
],
"prompt_number": 36
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.13 : page 4.74"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import sin, pi\n",
"#given data :\n",
"n=8 #no. of elements\n",
"BWFN=45 #in degree\n",
"theta=45 #in degree\n",
"f=40 #in MHz\n",
"f=f*10**6 #in Hz\n",
"#Formula : theta=2*asin(2*pi/(n*dr))\n",
"dr=(2*pi/n)/sin((theta/2)*(pi/180)) #\n",
"c=3*10**8 #speed of light in m/s\n",
"lamda=c/f #in m\n",
"d=dr*lamda/(2*pi) #in m\n",
"print \"Distance = %0.2f m \" %d "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Distance = 2.34 m \n"
]
}
],
"prompt_number": 37
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.14 : page 4.74"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#given data :\n",
"n=10 #no. of elements\n",
"from sympy import symbols, N\n",
"lamda = symbols('lamda')\n",
"#given : \n",
"d=lamda/4 #in m\n",
"Llambda=n*d/lamda\n",
"D=2*Llambda #in unitless \n",
"print \"Directivity of broadside uniform array = %0.2f \" %D"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Directivity of broadside uniform array = 5.00 \n"
]
}
],
"prompt_number": 40
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.16 : page 4.75"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import pi\n",
"n=4 \n",
"from sympy import symbols, N, cos, solve\n",
"lamda, theta = symbols('lamda theta')\n",
"d=lamda/2\n",
"delta = pi/3\n",
"dr = 2*pi*d/lamda\n",
"# Peaks\n",
"si = pi*cos(theta)+pi/3\n",
"theta = solve(si, theta) # radian\n",
"theta = degrees(theta[0]) # degree\n",
"print \"Peaks : theta =\",round(theta,2),\"degree\"\n",
"# Nulls\n",
"print \"Nulls : \"\n",
"for k in range(0,3):\n",
" theta = degrees(acos(-1.0/3+k/2.0))\n",
" print \"k =\",k,\", theta =\",round(theta,2),\"degree\"\n",
"print \"Side lobes :\"\n",
"for k in range(0,3):\n",
" theta = degrees(acos(-1.0/3+(2*k+1)/4.0))\n",
" print \"k =\",k,\", theta =\",round(theta,2),\"degree\"\n",
"# Ans in the textbook is not accurate."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Peaks : theta = 109.47 degree\n",
"Nulls : \n",
"k = 0 , theta = 109.47 degree\n",
"k = 1 , theta = 80.41 degree\n",
"k = 2 , theta = 48.19 degree\n",
"Side lobes :\n",
"k = 0 , theta = 94.78 degree\n",
"k = 1 , theta = 65.38 degree\n",
"k = 2 , theta = 23.56 degree\n"
]
}
],
"prompt_number": 74
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.17 : page 4.76"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import cos, sin, pi\n",
"#given data :\n",
"MainBeamwidth=45 #in degree\n",
"thetaN=MainBeamwidth/2 #in degree\n",
"thetaN=thetaN*pi/180 #in radian\n",
"m=5 #no. of elements\n",
"#given : d=lambda/2 in meter\n",
"x=cos(pi/(2*(m-1))) \n",
"xo=x/cos((pi/2)*sin(thetaN)) #unitless\n",
"print \"E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\" \n",
"print \"We Know that : z=x/xo, E5=T4*xo\" \n",
"print \"ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\" \n",
"print \"By comparing the term we have : \" \n",
"print \"a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \"\n",
"a2=xo**4 \n",
"a1=4*a2-4*xo**2 \n",
"ao=1+a1-a2 \n",
"print \"And therefore the 5 elements array is given by : \" \n",
"print (a2),\" \",(a1),\" \",(2*ao),\" \",(a1),\" \",a2"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\n",
"We Know that : z=x/xo, E5=T4*xo\n",
"ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\n",
"By comparing the term we have : \n",
"a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \n",
"And therefore the 5 elements array is given by : \n",
"1.5218051188 1.15276185234 1.26191346708 1.15276185234 1.5218051188\n"
]
}
],
"prompt_number": 82
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Exa 4.18 : page 4.77"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from __future__ import division\n",
"#given data :\n",
"#Side lobe level below main lobe\n",
"print \"Side lobe level below main lobe : \"\n",
"SideLobe=20 #in dB\n",
"r=10**(SideLobe/20) #\n",
"print \"r=\",r \n",
"#No. of elements are 5, n=5\n",
"print \"No. of elements are 5, n=5 :\" \n",
"print \"Tchebyscheff polynomials of degree (n-1) is\" \n",
"print \"5-1=4\" \n",
"print \"T4(xo)=r\" \n",
"print \"8*xo**4-8*xo**2+1=10\" \n",
"print \"By using alternate formula, we get\" \n",
"m=4 \n",
"r=10 \n",
"xo=(1/2)*((r+sqrt(r**2-1))**(1/m)+(r-sqrt(r**2-1))**(1/m))\n",
"print \"xo=\" ,xo\n",
"print \"E5=T4(xo)\"\n",
"print \"E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\" \n",
"print \"We Know that : z=x/xo, E5=T4*xo\" \n",
"print \"ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\" \n",
"print \"By comparing the term we have : \" \n",
"print \"a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \"\n",
"a2=xo**4 \n",
"a1=4*a2-4*xo**2 \n",
"ao=1+a1-a2 \n",
"print \"And therefore the 5 elements array is given by : \" \n",
"print round(a2,3),\" \",round(a1,3),\" \",round(2*ao,3),\" \",round(a1,3),\" \",round(a2,3)\n",
"# Ans in the textbook are not accurate."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Side lobe level below main lobe : \n",
"r= 10.0\n",
"No. of elements are 5, n=5 :\n",
"Tchebyscheff polynomials of degree (n-1) is\n",
"5-1=4\n",
"T4(xo)=r\n",
"8*xo**4-8*xo**2+1=10\n",
"By using alternate formula, we get\n",
"xo= 1.29329190052\n",
"E5=T4(xo)\n",
"E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\n",
"We Know that : z=x/xo, E5=T4*xo\n",
"ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\n",
"By comparing the term we have : \n",
"a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \n",
"And therefore the 5 elements array is given by : \n",
"2.798 4.5 5.405 4.5 2.798\n"
]
}
],
"prompt_number": 86
}
],
"metadata": {}
}
]
}
|