from math import pi,sin
# Variable Declaration
f = 30 # frequency in MHz
f = 30*10**6 # frequency in Hz
c = 3*10**8 # speed of light in m/s
lamda = c/f # wavelength in meter
Delta = 30 # angle of elevation in Degrees
#calculation
H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m
l = lamda/(2 * sin(Delta*pi/180) **2) # wire length in m
phi = 90-Delta # tilt angle in Degrees
#Results
print "Rhombic height is:",round(H,2),"meter"
print "Tilt angle is:",round(phi,2),"degrees"
print "length of wire is:",round(l,2),"meter"
from math import pi,sin
# Variable Declaration
f = 20 # frequency in MHz
f = 20*10**6 # frequency in Hz
c = 3*10**8 # speed of light in m/s
lamda = c/f # wavelength in meter
#calculation
Delta = 10 # angle of elevation in Degrees
H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m
l = lamda/(2 * sin(Delta*pi/180) **2) # wire length in m
phi = 90-Delta # tilt angle in Degrees
#Results
print "Rhombic height is:",round(H,3),"meter"
print "Tilt angle is:",round(phi,2),"degrees"
print "length of wire is:",round(l,3),"meter"
from math import pi,sin,cos
# Variable Declaration
f = 30 # frequency in MHz
f = 30*10**6 # frequency in Hz
c = 3*10**8 # speed of light in m/s
lamda = c/f # wavelength in meter
#calculation and results:
print "for Delta = 10 degrees"
Delta1 = 10 # angle of elevation in Degrees
H1 = lamda/(4 * sin(Delta1*pi/180)) # Rhombic height in m
l1 = lamda/(2 * sin(Delta1*pi/180) **2) # wire length in m
phi1 = 90-Delta1 # tilt angle in Degrees
print "Rhombic height is:",round(H1,3),"meter"
print "Tilt angle is:",round(phi1,2),"degrees"
print "length of wire is:",round(l1,2),"meter"
print "for Delta = 15 degrees"
Delta2 = 15 # angle of elevation in Degrees
H2 = lamda/(4 * sin(Delta2*pi/180)) # Rhombic height in m
l2 = lamda/(2 * sin(Delta2*pi/180) **2) # wire length in m
phi2 = 90-Delta2 # tilt angle in Degrees
print "Rhombic height is:",round(H2,3),"meter"
print "Tilt angle is:",round(phi2,2),"degrees"
print "length of wire is:",round(l2,2),"meter"
print "for Delta = 20 degrees"
Delta3 = 20 # angle of elevation in Degrees
H3 = lamda/(4 * sin(Delta3*pi/180)) # Rhombic height in m
l3 = lamda/(2 * sin(Delta3*pi/180) **2) # wire length in m
phi3 = 90-Delta3 # tilt angle in Degrees
print "Rhombic height is:",round(H3,3),"meter"
print "Tilt angle is:",round(phi3,2),"degrees"
print "length of wire is:",round(l3,2),"meter"
print "for Delta = 25 degrees"
Delta4 = 25 # angle of elevation in Degrees
H4 = lamda/(4 * sin(Delta4*pi/180)) # Rhombic height in m
l4 = lamda/(2 * sin(Delta4*pi/180) **2) # wire length in m
phi4 = 90-Delta4 # tilt angle in Degrees
print "Rhombic height is:",round(H4,3),"meter"
print "Tilt angle is:",round(phi4,2),"degrees"
print "length of wire is:",round(l4,2),"meter"
print "for Delta = 30 degrees"
Delta5 = 30 # angle of elevation in Degrees
H5 = lamda/(4 * sin(Delta5*pi/180)) # Rhombic height in m
l5 = lamda/(2 * sin(Delta5*pi/180) **2) # wire length in m
phi5 = 90-Delta5 # tilt angle in Degrees
print "Rhombic height is:",round(H5,3),"meter"
print "Tilt angle is:",round(phi5,2),"degrees"
print "length of wire is:",round(l5,2),"meter"
print "for Delta = 35 degrees"
Delta6 = 35 # angle of elevation in Degrees
H6 = lamda/(4 * sin(Delta6*pi/180)) # Rhombic height in m
l6 = lamda/(2 * sin(Delta6*pi/180) **2) # wire length in m
phi6 = 90-Delta6 # tilt angle in Degrees
print "Rhombic height is:",round(H6,3),"meter"
print "Tilt angle is:",round(phi6,2),"degrees"
print "length of wire is:",round(l6,2),"meter"
print "for Delta = 40 degrees"
Delta7 = 40 # angle of elevation in Degrees
H7 = lamda/(4 * sin(Delta7*pi/180)) # Rhombic height in m
l7 = lamda/(2 * sin(Delta7*pi/180) **2) # wire length in m
phi7 = 90-Delta7 # tilt angle in Degrees
print "Rhombic height is:",round(H7,3),"meter"
print "Tilt angle is:",round(phi7,2),"degrees"
print "length of wire is:",round(l7,2),"meter"
from math import pi,sin,cos
# Variable Declaration
f = 30 # frequency in MHz
f = 30*10**6 # frequency in Hz
c = 3*10**8 # speed of light in m/s
lamda = c/f # wavelength in meter
Delta = 30 # angle of elevation in Degrees
#calculation
k = 0.74 # constant
H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m
l = lamda/(2 * sin(Delta*pi/180) **2)*k # wire length in m
phi = 90-Delta # tilt angle in Degrees
#Results
print "Rhombic height is:",round(H,2),"meter"
print "Tilt angle is:",round(phi,2),"degrees"
print "length of wire is:",round(l,2),"meter"
from math import pi,sin
# Variable Declaration
f = 20 # frequency in MHz
f = 20*10**6 # frequency in Hz
c = 3*10**8 # speed of light in m/s
lamda = c/f # wavelength in meter
Delta = 20 # angle of elevation in Degrees
k = 0.74 # constant
#calculation
H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m
l = lamda/(2 * sin(Delta*pi/180) **2)*k # wire length in m
phi = 90-Delta # tilt angle in Degrees
#Results
print "Rhombic height is:",round(H,2),"meter"
print "Tilt angle is:",round(phi,2),"degrees"
print "length of wire is:",round(l,2),"meter"
from __future__ import division
# Variable Declaration
f_MHz = 172 # frequency in MHz
c = 3*10**8 # speed of light in m/s
#calculation
lamda = c/f_MHz # wavelength in m
La = 478/f_MHz # length of driven element in feet
Lr = 492/f_MHz # length of reflector in feet
Ld = 461.5/f_MHz # length of director in feet
S = 142/f_MHz # element spacing in feet
#Results
print "length of driven element is:", round(La,2),"feet"
print "length of reflector is:", round(Lr,2),"feet"
print "length of director is:", round(Ld,3),"feet"
print "element spacing is:",round(S,3),"feet"
from __future__ import division
# Variable Declaration
G = 12 # required gain in dB
f = 200 # frequency in MHz
f = 200*10**6 # frequency in Hz
c = 3*10**8 # speed of light in m/s
#calculations
lamda = c/f # wavelength in m
La = 0.46*lamda # length of driven element in m (note: in book La is given 0.416*lamda misprint)
Lr = 0.475*lamda # length of reflector in m
Ld1 = 0.44*lamda # length of director1 in m
Ld2 = 0.44*lamda # length of director2 in m
Ld3 = 0.43*lamda # length of director3 in m
Ld4 = 0.40*lamda # length of director4 in m
SL = 0.25*lamda # spacing between reflector and driver in m
Sd = 0.31*lamda # spacing director and driving element in m
d = 0.01*lamda # diameter of elements in m
l = 1.5*lamda # length of array in m
#Results
print "length of driven element is:" ,round(La,2),"m"
print "length of reflector is:",round(Lr,4),"m"
print "length of director1 is:",round(Ld1,2),"m"
print "length of director2 is:",round(Ld2,2),"m"
print "length of director3 is:",round(Ld3,3),"m"
print "length of director4 is:",round(Ld4,2),"m"
print "spacing between reflector and driver is:",round(SL,3),"m"
print "spacing director and driving element is:",round(Sd,3),"m"
print "diameter of elements is:",round(d,3),"m"
print "length of array is:",round(l,2),"m"
from __future__ import division
from math import atan
# Variable Declaration
G = 9 # required gain in dB
f_l = 125 # lowest frequency in MHz
f_l = 125*10**6 # lowest frequency in Hz
f_h = 500 # highest frequency in MHz
f_h = 500*10**6 # lowest frequency in Hz
c = 3*10**8 # speed of light in m/s
tau = 0.861 # scaling factor
sigma = 0.162 # spacing factor
#calculation
lamda_l = c/f_l # longest wavelength in m
lamda_s = c/f_h # shortest wavelength in m
alpha = 2*atan((1-tau)/(4*sigma)) # wedge angle in Degrees
L1 = lamda_l/2 # in m
L2 = tau*L1 # in m
L3 = tau*L2 # in m
L4 = tau*L3 # in m
L5 = tau*L4 # in m
L6 = tau*L5 # in m
L7 = tau*L6 # in m
L8 = tau*L7 # in m
L9 = tau*L8 # in m
L10 = tau*L9 # in m
L11 = tau*L10 # in m
# element spacing relation
#formula : sn = 2*sigma*Ln
S1 = 2*sigma*L1 # in m
S2 = 2*sigma*L2 # in m
S3 = 2*sigma*L3 # in m
S4 = 2*sigma*L4 # in m
S5 = 2*sigma*L5 # in m
S6 = 2*sigma*L6 # in m
S7 = 2*sigma*L7 # in m
S8 = 2*sigma*L8 # in m
S9 = 2*sigma*L9 # in m
S10 = 2*sigma*L10 # in m
S11 = 2*sigma*L11 # in m
#results
print("designing of log-periodic antenna:")
print "L1 is:",round(L1,4),"m"
print "L2 is:",round(L2,4),"m"
print "L3 is:",round(L3,4),"m"
print "L4 is:",round(L4,4),"m"
print "L5 is:",round(L5,4),"m"
print "L6 is:",round(L6,4),"m"
print "L7 is:",round(L7,4),"m"
print "L8 is:",round(L8,4),"m"
print "L9 is:",round(L9,4),"m"
print "L10 is:",round(L10,4),"m"
print "L11 is:",round(L11,4),"m"
print "elements spacing relation:"
print "S1 is:",round(S1,4),"m"
print "S2 is:",round(S2,4),"m"
print "S3 is:",round(S3,4),"m"
print "S4 is:",round(S4,4),"m"
print "S5 is:",round(S5,4),"m"
print "S6 is:",round(S6,4),"m"
print "S7 is:",round(S7,4),"m"
print "S8 is:",round(S8,4),"m"
print "S9 is:",round(S9,4),"m"
print "S10 is:",round(S10,4),"m"
print "S11 is:",round(S11,4),"m"
from math import pi,cos,sqrt
# Variable Declaration
E_rms = 10 # electric field in mV/m
E_rms = 10*10 **-3 # electric field in V/m
f = 2 # frequency in MHz
f = 2*10 **6 # frequency in Hz
N = 10 # number of turns
phi = 0 # angle between the plane of loop and direction of incident wave in Degrees
S = 1.4 # area of loop antenna in m **2
c = 3*10 **8 # speed of light in m/s
#calculation
lamda = c/f # wavelength in m
E_max = sqrt(2)*E_rms # electric field in V/m
V_rms = (2*pi*E_max*S*N/lamda)*cos(phi) # induced voltage
#Result
print "induced voltage is:",round(V_rms*1000,2),"mV"
# Variable Declaration
D = 0.5 # diameter of loop antenna in m
a = D/2 # radius of loop antenna in m
f = 1 # frequency in MHz
f = 1*10**6 # frequency in Hz
c = 3*10**8 # speed of light in m/s
#calculation
lamda = c/f # wavelength in m
Rr = 3720*(a/lamda) # radiation resistance of loop antenna in ohm
#Results
print "radiation resistance of loop antenna is:",Rr,"ohm"
from __future__ import division
from math import pi
# Variable Declaration
a = 0.5 # radius of loop antenna in m
f = 0.9 # frequency in MHz
f = 0.9*10**6 # frequency in Hz
c = 3*10**8 # speed of light in m/s
#calculation
lamda = c/f # wavelength in m
k = (2*pi*a)/lamda # constant
#Results
print "the value of k is:",round(k,2)
print "since,k<1/3"
print "So Directivity of loop antenna is D = 1.5"
from sympy import Symbol
#variable declaration and calculation
Lm = Symbol('Lm') # defining Lm as lambda
d = 1.5*Lm # diameter of antenna in m
a = d/2 # radius of antenna in m
Rr = 3720*(a/Lm) # radiation resistance of loop antenna in ohm
D = 4.25*(a/Lm) # Directivity of the loop antenna
#results
print "radiation resistance of the loop antenna is:",round(Rr,0),"ohm"
print "Directivity of the loop antenna is:",round(D,4)
from math import sqrt,pi
from sympy import Symbol
#Variable declaration
Gp = 28 # power gain
#calculations
Lm = Symbol('Lm') # defining Lm as lamda
d = Lm/2 # length of dipole
#formula : Gp = 4*(L/lamda)
L = Gp*Lm/4 # array length
N = 7*2 # Number of elements in the array when spaced at lamda/2
# formula : B.W = 2*sqrt((2*/N)*(lamda/d))
BW = 2*sqrt(2*Lm/(N*d)) # null-to-null beam width in radians
BW_d = BW*180/pi # null-to-null beam width in degrees
#Results
print "Number of elements in the array when spaced at lamda/2 are:",N
print "array length(where Lm is wavelength in m) is:",L,"m"
print "null-to-null beam width is:",round(BW_d,1),"degrees"
from __future__ import division
from math import pi,sqrt
# Variable Declaration
S = 0.05 # spacing in m
Dh = 0.1 # diameter of helical antenna in m
N = 20 # number of turns
f = 1000 # frequency in MHz
f = 1000*10**6 # frequency in MHz
c = 3*10**8 # speed of light in m/s
#calculation
lamda = c/f # wavelength in m
C = pi*Dh # circumfrence of helix in m
La = N*S # axial legth in m
phi_not = (115*(lamda**(3/2))/(C*sqrt(La))) # B.W.F.N., null-to-null beamwidth of main beam in Degreess
phi = (52*lamda**(3/2)/(C*sqrt(La))) # H.P.B.W, half power beamwidth in Degreess
D = (15*N*C**2*S/(lamda)**3) # Directivity
#Results
print "B.W.F.N., null-to-null beamwidth of main beam is:",round(phi_not,1),"degrees"
print "H.P.B.W, half power beamwidth is:",round(phi,1),"degrees"
print "Directivity is:",round(D,2)