import math
# Variable Declaration
Ldipole = 50; # Length of dipole in cm
c = 3*10**10; # velocity of EM wave in cm/s
BW = 10*10**6; # bandwidth in Hz
# Calculations
lamda = 2*Ldipole; # wavelength in cm
fo = c/lamda; # operating frequency in Hz
Q = fo/BW; # quality factor
# Result
print'Q = %d'%Q;
import math
# Variable Declaration
Rr = 72; # Radiation resistance in ohms
Rl = 8; # Loss resistance in ohms
Ap = 27; # power gain
# Calculations
n = Rr/float((Rr + Rl)); # radiation efficiency
D = Ap/float(n); # Directivity
D_dB = 10*math.log10(D); # directivity in dB
# Result
print'Directivity = %3.2f dB'%D_dB;
import math
# Variable Declaration
AZ_BW = 0.5; # beamwidth in degrees
E_BW = 0.5; # beamwidth in degrees
lamda = 3*10**-2; # radar emission wavelength
# Calculations
AZ_BW_r = AZ_BW*math.pi/float(180); # azimuth beamwidth in radians
E_BW_r = E_BW*math.pi/float(180); # elevation beamwidth in radians
G = (4*math.pi)/float((AZ_BW_r *E_BW_r )) # antenna gain
G_db = 10*math.log10(G); # gain in dB
A = (G*lamda*lamda)/float((4*math.pi)); # antenna aperture
# Output
print'Gain of Antenna = %3.2f dB\n'%G_db,'Antenna Aperture = %3.3f m'%A;
import math
# Variable Declaration
n_az = 0.5; #length efficiency in azimuth direction
n_el = 0.7; #length efficiency in elevation direction
A = 10; # area in square mts
# Calculations
n = n_az * n_el; # aperture efficiency
Ae = n*A; # Effective aperture
# Output
print'Effective aperture of the antenna = %3.1f sq.m'%Ae;
import math
# Variable Declaration
Ptot = 100; # certain antenna radiating power
Ptot_iso = 10*10**3; # isotropic antenna radiating power
# Calculations
D = 10*math.log10(Ptot_iso/Ptot); # Directivity of antenna
# Output
print'Directivity of antenna = %d dB'%D;
import math
# Variable Declaration
D = 3; # diameter of the antenna in m
nl = 0.7; # length efficiency
nr = 0.9; # radiation efficiency
f = 10*10**9; # antenna operating freq.
c = 3*10**8; # vel of EM waves in m/s
# calculations
de = D*(nl) # Effective diameter
lamda = c/float(f); # wavelength in m
Beam_w = lamda/de # beamwidth in radian
Beam_w_d= Beam_w*180/math.pi; # beam width in degree;
n_a = nl * nl; # Aperture efficiency
AA = (math.pi*D*D)/4; # actual area in sq m
Ae = AA*n_a; # Effective aperture
G = (4*math.pi*Ae)/float((lamda**2)); # Gain
G_db = 10*math.log10(G);
# Output
print'Beam Width = %3.2f degrees\n '%Beam_w_d;
print'Effective Aperture = %3.2fsq m\n'%Ae;
print'Gain = %3.1f dB'%G_db;
import math
# given data
# given (lamda/10) wire dipole
# Radiation resistance of short dipoles is Rr = 790*(1/lamda)**2;
# Rr = 790*(lamda/(10*lamda))**2;
# Rr = 7.9;
print'Radiation resistance = 7.9 ohms';
import math
# Variable Declaration
a_l = 6; # Azimuth length in m
n_a = 0.7; # Azimuth length efficiency
n_e = 0.5; # elevation length efficiency
e_l = 4; # elevation length in m
w = 6; # width of antenna
h = 4; # height of antenna
lamda = 3*10**-2; # wavelength
# Calculations
Eff_A_l = a_l*n_a; # effective azimuth length
Eff_E_l = e_l*n_e; # effective elevation length
A = w*h # actual area
n = n_a*n_e; # aperture efficiency
Ae = A*n; # effective aperture
Az_BW = lamda/float(Eff_A_l) # Azimuth beam width
E_BW = lamda/float(Eff_E_l) # elevation beam width
Az_BW_d = Az_BW*180/float(math.pi) # rad to deg conv
E_BW_d = E_BW*180/float(math.pi); # rad to deg conv
G = (4*math.pi*Ae)/float((lamda**2)); #Gain
G_dB = 10*math.log10(G); # gain in dB
# Result
print'Azimuth Beamwidth = %3.2f degrees'%Az_BW_d;
print'Elevation Beamwidth = %3.2f degrees'%E_BW_d;
print'Gain = %3.1f dB'%G_dB;
import math
# given data
Beam_w_3db = 0.4;
# Calculations
N2N_Beam_w = 2*Beam_w_3db; # Null to Null beamwidth
# output
print'Null to Null Beam width = degrees',N2N_Beam_w;
import math
# given data
RSSR = 20; # Rx signal strength in horizontal polarised antenna when rx RHCP
# Calculations
# When incident polarisation is circularly polarised and the antenna is linearly polarised,there is a ploarisation loss of 3dB
ISS = RSSR + 3;
# a
# when the Rx polarisation is same as the antenna polarisation , the polarisation loss is zero
RSS_HP = ISS; # rx signal strength for incident wave horizontally polarised
# b
# when the incident wave is vertically polarised ,the angle between the incident polarisation and the antenna polarisation is 90
# polarisation loss = 20log(1/cos( φ))
# = 20log(1/cos90) = ∞
RSS_VP = 0; # rx signal strength for incident wave vertically polarised
# c
# When the incident wave is LHCP and the antenna polarisation is linear ,there will be a 3dB polarisation loss and the
# Rx signal strength therefore will be 20 dB only
RSS_LHCP = RSSR; # rx signal strength for incident wave Left hand circularly polarised
# d
# The angle between the incident wave polarisation and the antenna polarisation is 60 degrees
phi = 60; # rx wave polarisation angle with horizontal
PL = 20*math.log10(1/float(math.cos(60*math.pi/float(180)))); # polarisation loss in dB
RSS_Pangle = ISS - PL;
# Result
print'Received signal strength if incident wave horizontally polarised = %d dB'%RSS_HP;
print'Received signal strength if incident wave vertically polarised = %d dB'%RSS_VP;
print'Received signal strength if incident wave Left hand circularly polarised is %d dB'%RSS_LHCP;
print'Received signal strength if Received wave polarisation making 60deg angle with horizontal is %3.0f dB'%RSS_Pangle;
import math
# Variable Declaration
f = 300*10**6; # operating frequency in Hz
c = 3*10**10; # velocity of EM wave in cm/s
# Calculations
lamda = c/float(f); # wavelength in cm
# Physical length of antenna is made 5% shorter than desired length as per rule of thumb
l = lamda/float(2); # length of halfwave dipole
lphy = l-(5/float(100))*l; # as per rule of thumb
# Output
print'Length of a half wave dipole to be cut = %3.1f cm'%lphy;
import math
# Variable Declaration
Zi = 72; # input impedance in ohms
# A = 1.5a # area of cross section in sq.cm
# Zif = Zi*[(sum of areas of cross section of various components)/(Area of cross section of the driven element )]**2;
# Zif = 72*((a + 1.5a)/a)**2;
# Zif = 72*(2.5*a/a)**2;
Zif = 72*(2.5)**2;
print'Input impedance for a folded dipole = %d Ω'%Zif;
import math
# given data
f = 60*10**6; # frequency in Hz
c = 3*10**8; # velocity of EM wave in m/s
# Calculations
lamda = c/float(f); # wavelength in m
l_dipole= lamda/float(2); # length of diplole
# Physical length of antenna is made 5% shorter than desired length as per rule of thumb
L = l_dipole - (5/float(100))*l_dipole; # actual physical length
L_D = L - (4/float(100))*L; # length of director
L_R = L + (4/float(100))*L; # length of reflector
DDS = 0.12*lamda; # director dipole spacing
RDS = 0.2*lamda; # Reflector dipole spacing
# Output
print'Length of dipole = %3.3f m'%L;
print'length of Director = %3.2f m'%L_D;
print'length of Reflector = %3.2f m'%L_R;
print'director dipole spacing = %3.1f m'%DDS;
print'Reflector dipole spacing = %3.1f m'%RDS;
import math
# given data
D = 2; # Mouth diameter in m
f = 2; # focal length in m
bw3db = 90/float(100); # beamwidth of antenna chosen to be 90% of angle subtended by feed
# Calculations
theta = 4*math.atan(1/float((4*f/float(D)))); # angle subtended by the focal point feed at edges of reflector
theta_d = theta*180/float(math.pi);
Beam_w_3dB = bw3db*theta_d; # 3 dB beam width
NNBW = 2*(Beam_w_3dB );
# Output
print '3 dB Beamwidth = %3.1f°'%Beam_w_3dB,' Null-to-Null beam width = %3.2f°'%(NNBW);
import math
# Variable DECLARATION
f = 3; # focal length in m
fpos = 1.5; # feed is placed 1.5m from pt of intersection os sec.reflector and antenna axis
# Calculation
f_hyp = f-fpos; # focal length of hyperboloid from figure;
# Result
print'focal length of hyperboloid = %3.1f m'%f_hyp;
import math
# Variable Declaration
D = 3; # Mouth diameter in m
#f = 2; # focal length in m
bw3db = 63; # 3dB beam width
k = 0.9; # beam width is k times subtended angle
# Calculations
theta = bw3db/k; # subtended angle
theta_r = theta
#theta = 4*atan(1/(4*f/D));
f = D/(4*math.tan((theta_r/4)*(math.pi/180)));
# Result
print'Distance of feed from the point of intersection of antenna axis and the reflector surface = %3.2f m'%f;
import math
# Variable Declaration
c = 3*10**8; # velocity of EM waves in m/s
f = 2.5*10**9; # operating frequency in Ghz
S = 10*10**-2; # inter element spacing
theta = 10; # steering angle
# Calculations
lamda = c/f # Wavelength in m
phi = (360*(S/lamda))*math.sin(theta*(math.pi/180))
phi1 = 0*phi # phase angle for element 1
phi2 = 1*phi # phase angle for element 2
phi3 = 2*phi # phase angle for element 3
phi4 = 3*phi # phase angle for element 4
phi5 = 4*phi # phase angle for element 5
# Result
print'Phase angles for elements 1,2,3,4,5 are %d°'%phi1, '%d°'%phi2,'%d°' %phi3,'%d°' %phi4,'%d°' %phi5
import math
# Data is taken from Example 17. The beam steers towards left of the axis with all parameters remaining in Ex 17 are same
c = 3*10**8; # velocity of EM waves in m/s
f = 2.5*10**9; # operating frequency in Ghz
S = 10*10**-2; # inter element spacing
theta = -10; # steering angle
# Calculations
lamda = c/f # Wavelength in m
phi = (360*S/lamda)*math.sin(theta*math.pi/180)
phi1 = 0*phi # phase angle for element 1
phi2 = 1*phi # phase angle for element 2
phi3 = 2*phi # phase angle for element 3
phi4 = 3*phi # phase angle for element 4
phi5 = 4*phi # phase angle for element 5
# Output
print'Phase angles for elements 1,2,3,4,5 are %d°'%phi1, '%d°'%phi2,'%d°' %phi3,'%d°' %phi4,'%d°' %phi5
import math
# given data
S = 5*10**-2; # inter spacing distance
lamda = 6*10**-2; # operating wavelength in cms
phi_Az = 25 # angle in azimuth direction
phi_E = 35 # angle in Elevation direction
# Calculations
theta_Az = math.asin((lamda*phi_Az)/(360*S))
theta_E = math.asin((lamda*phi_E)/(360*S))
Theta_Az = theta_Az*(180/math.pi)
Theta_E = theta_E*(180/math.pi)
# Output
print'Steering angle in Azimuth = %3.1f°'%Theta_Az
print 'Steering angle in Elevation = %3.1f°'%Theta_E;