Chapter 6. Arrays: Linear, Planar and Circular

Example 6.1, Page No. 286

In [6]:
import math
#We know that E=cos(theta)*cos(pi*cos(theta)/4)
#To find the nulls we equate the above equation with 0 at null angle
theta_b0=math.acos(0)
print "Nulls for beta equal to 0: %d deg" %(math.degrees(theta_b0))

theta_b_pi_2_p=math.acos(0)
print "Nulls for beta equal to +pi/2: %d deg" %(math.degrees(theta_b_pi_2_p))

theta_b_pi_2_n=math.acos(0)
theta_b_pi_2_n2=math.acos(1+(4/pi)*(-pi/2))
print "Nulls for beta equal to -pi/2: %d deg %d deg" %(math.degrees(theta_b_pi_2_n),math.degrees(theta_b_pi_2_n2))
Nulls for beta equal to 0: 90 deg
Nulls for beta equal to +pi/2: 90 deg
Nulls for beta equal to -pi/2: 90 deg 180 deg

Example 6.2, Page No. 290

In [17]:
import math
import numpy as np
#To find the nulls we have to equate E=cos(theta)*cos(0.5*(k*d*cos(theta)+beta))
theta_n=math.acos(0)
print "Nulls occur at : %d deg" %math.degrees(theta_n)

#lamda=50.0
#d=lamda/2
#beta=pi/2
#theta_n1=np.zeros(11)
#n=np.linspace(0,10,11,'int')
#for i in range(0,11):
 #   theta_n1[i]=math.acos((lamda/(2*pi*d))*(-beta+(2*int(n[i])+1)*pi))"""
Nulls occur at : 90 deg

Example 6.3, Page No. 315

In [5]:
#Let us assume lambda = 50
lamda=50
N=10
d=lamda/4

D0=(2*N)*(float(d)/lamda)
D0_dB=10*log10(D0)
print "Directivity of the array antenna:",D0_dB,"dB"
Directivity of the array antenna: 6.81241237376 dB

Example 6.4, Page No. 317

In [6]:
#assume lamda = 50

lamda=50
d=float(lamda)/4
N=10

D0=(4*N)*(d/lamda)
D0_dB=10*log10(D0)

print "Directivity of antenna:",D0_dB,"dB"
Directivity of antenna: 10.0 dB

Example 6.5, Page No. 318

In [7]:
#assume lamda = 50

lamda=50
d=float(lamda)/4

D0=1.805*(4*N)*(d/lamda)
D0_dB=10*log10(D0)

print "Directivity of Hansen-Woodyard antenna:",D0_dB,"dB"
Directivity of Hansen-Woodyard antenna: 12.5647720624 dB

Example 6.6, Page No. 319

In [17]:
import scipy
#assume lamda=50
lamda=50.0

#Given data
theta=30
theta0=theta*pi/180
d=lamda/4
k=(2*pi)/lamda

beta=-k*d*cos(theta0)

print "Progressive phase:",beta,"radians"
1.36034952318
Progressive phase: -1.36034952318 radians

Example 6.8, Page No. 331

In [6]:
#Given N=10
N=10
#function to calculate HPBW
def hp(N):
    return 1.06/(sqrt(N-1))

HPBW=hp(N)

print "Half-power Beamwidth:",HPBW,"radians, ",HPBW*180/pi,"degrees"

#directivity given by formula d0=((2N-2)(2N-4)...2)/((2N-3)(2N-5)...1) here N=10

#Function to calculate the directivity
def d0(N):
    nume=numer(N)
    deno=denom(N)
    return float(nume)/deno

#Function to calculate the numerator of the above formula
def numer(N):
    temp=1
    i=2
    while(2*N-i)>1:
        temp=temp*(2*N-i)
        i=i+2
    return temp

#Function to calculate denominator of the above formula
def denom(N):
    temp=1
    i=3
    while(2*N-i)>0:
        temp=temp*(2*N-i)
        i=i+2
    return temp


D01=d0(N)
D0_dB=10*log10(D01)
print "Directivity:",D0_dB,"dB"

D02=1.77*sqrt(N)
print "Directivity using other formula:",10*log10(D02),"dB"
Half-power Beamwidth: 0.353333333333 radians,  20.2445087613 degrees
Directivity: 7.31724967444 dB
Directivity using other formula: 7.47973266362 dB

Example 6.10, Page No. 343

In [46]:
import scipy
import math
#Given R0=26db
R0_dB=26.0

R0=pow(10,(R0_dB/20))
R0=int(math.ceil(R0))
#broadening factor f
f=1+(0.636)*((2.0/R0)*cosh(sqrt(math.acosh(R0)**2-pi**2)))**2
print "Broadening factor:",f

#theta_h from the graph
theta_h=10.17

beamwidth=theta_h*f
print "Beamwidth:",beamwidth,"deg."

#Assume lamda = 50
lamda=50
L_plus_d=5*lamda

D0=(2*R0**2)/(1+(R0**2-1)*f*(float(lamda)/L_plus_d))
print "Directivity:",D0,",",10*log10(D0),"dB"
Broadening factor: 1.079024504
Beamwidth: 10.9736792057 deg.
Directivity: 9.18419595205 , 9.63041141167 dB

Example 6.11, Page No. 361

In [54]:
import math

#Function to calculate sec(x)
def sec(t):
    return sqrt(1+tan(t)**2)

x=pi/180 #Factor to convert degrees to radians, in-built function is also present

#this example relies on data of Example 6.10
lamda=50
L_plus_d=5*lamda
theta_x0=theta_y0=10.97 #from example 6.10

theta_0=30 #Given
theta_h=theta_x0*sec(theta_0*x)

psi_h=theta_x0

omega_a=theta_h*psi_h
print "Solid angle:",omega_a,"deg_square"

D0x=D0y=9.18  #from ex 6.10

#Directivity of the array 
D0=pi*cos(theta_0*x)*D0x*D0x

print "Directivity:",D0,", in dB:",10*log10(D0),"dB"

D01=32400.0/(omega_a)

print "Directivity using 6-101:",D01,", in dB:",10*log10(D01),"dB"
Solid angle: 138.957702019 deg_square
Directivity: 229.279838314 , in dB: 23.6036586679 dB
Directivity using 6-101: 233.164477602 , in dB: 23.6766238675 dB