#Variable declaration
freq = 100e3 #Frequency (Hz)
height = 150 #Height of antenna(m)
RL = 2 #Loss resistance (ohm)
c = 3e8 #Speed of light (m/s)
#Calculations
wave_lt = c/freq #Wavelength (m)
hp = height/wave_lt #Antenna (physical) height (lambda)
he = hp/2 #Effective height (lambda)
Rr = 400*(hp**2) #Radiation resistance (ohm)
R_E = Rr/(Rr+RL) #Radiation efficiency (unitless)
#Results
print "The Effective height of the antenna is ", he, "lambda"
print "The Radiation resistance for 150m vertical radiator is", Rr, "ohm"
print "The radiation efficiency is", round(R_E,2), "or", round(R_E*100,2), "%"
%matplotlib inline
import numpy as np
from math import pi, sin, sqrt, radians
from pylab import *
from cmath import sqrt
import matplotlib.pyplot as plt
#Variable declaration
eps_r1 = 16 #Real part of relative permittivity of ground (unitless)
sigma = 1e-2 #conductivity of ground (mho per meter)
eps_0 = 8.85e-12 #Air permittivity (F/m)
f1 = 1e6 #Frequency (Hz)
f2 = 100e6 #Frequency (Hz)
#Calculation
eps_r11 = sigma/(2*pi*f1*eps_0) #Loss part of relative permittivity for f1 (unitless)
eps_r11_2 = sigma/(2*pi*f2*eps_0) #Loss part of relative permittivity for f2 (unitless)
eps_ra = eps_r1 -(1j)*eps_r11 #Relative permittivity for f1 (unitless)
eps_rb = eps_r1 -(1j)*eps_r11_2 #Relative permittivity for f2 (unitless)
n1 = sqrt(eps_ra) #Refractive index for f1 (unitless)
n2 = sqrt(eps_rb) #Refractive index for f2 (unitless)
E_perp1 = [1 + (abs((sin(alpha) - n1)/(sin(alpha)+n1))*exp(1j*(2*pi*sin(alpha) + angle((sin(alpha) - n1)/(sin(alpha)+n1))))) \
for alpha in arange(0,pi/2,pi/180)]
E_perp2 = [1 + (abs((sin(alpha) - n2)/(sin(alpha)+n2))*exp(1j*(2*pi*sin(alpha) + angle((sin(alpha) - n2)/(sin(alpha)+n2))))) \
for alpha in arange(0,pi/2,pi/180)]
E_perp1_rel = E_perp1/max(E_perp1) #Relative electric field for f1 (unitless)
E_perp2_rel = E_perp2/max(E_perp2) #Relative electric field for f2 (unitless)
theta = arange(0,pi/2,pi/180)
polar(theta,E_perp1_rel,'g',label="1MHz")
polar(theta,E_perp2_rel,'b--',label="100MHz")
legend(loc="upper left")
#Result
print "The loss parameter for 1MHz is ", round(eps_r11)
print "The loss parameter for 100MHz is ", round(eps_r11_2,2)
print "The relative permittivity for 1MHz is ", np.around(eps_ra)
print "The relative permittivity for 100MHz is ", np.around(eps_rb,2)
%matplotlib inline
from math import pi,acos,sqrt,log10,atan
import cmath
import numpy as np
from pylab import *
#Variable declaration
f = 60e6 #Frequency(Hz)
dep = 20 #Depth of antenna location (m)
sigma = 1.33e-2 #Conductivity (mho per m)
eps0 = 8.85e-12 #Air Permittivity (F/m)
epr1 = 80 #Real part of relative permittivity (unitless)
alphat = 10 #Elevation angle (degrees)
cl = 1 #Circumference (lambda)
pitch = 12.5 #Pitch angle (degrees)
c = 3e8 #Speed of light (m/s)
dir_gb = 3 #Directivity of George Brown turnstile (unitless)
Aer_gb = 6 #Effective aperture of George Brown turnstile (unitless)
r = 1e3 #Distance between transmitter and receiver (m)
Pt = 100 #Transmitted power (W)
#Calculations
epr11 = sigma/(eps0*2*pi*f) #Loss term of relative permittivity (unitless)
epr = epr1 + 1j*epr11 #Relative permittivity (unitless)
alphac = acos(sqrt(1/epr1)) #Critical angle (degrees)
alpha = acos(cos(radians(alphat))/sqrt(epr1)) #Angle of incidence (degrees)
n1=12 #Number of turns
rad = cl/(2*pi) #Radius of loop (lambda)
sl = tan(radians(12.5))
hpbw1 = 52/(cl*sqrt(n1*sl)) #Half power beamwidth for 12 turns(degrees)
dir1 = 12*(cl**2)*n1*sl #Directivity for 12 turns (unitless)
n2 = n1*2 #Number of turns
hpbw2 = 52/(cl*sqrt(n2*sl)) #Half power beamwidth for 24 turns(degrees)
dir2 = 12*(cl**2)*n2*sl #Directivity for 24 turns (unitless)
num = 20 #Number of turns chosen
p_perp = [(sin(theta)-cmath.sqrt(epr - cos(theta)**2))/(sin(theta)+cmath.sqrt(epr - cos(theta)**2)) \
for theta in arange(0,pi,pi/180)]
#Reflection coefficient (unitless)
p_pall = [(epr*sin(theta)-cmath.sqrt(epr - cos(theta)**2))/(epr*sin(theta)+cmath.sqrt(epr - cos(theta)**2)) \
for theta in arange(0,pi,pi/180)]
#Reflection coefficient (unitless)
Sr = 0.5*(np.absolute(p_perp)**2 + np.absolute(p_pall)**2) #Relative power density reflected (unitless)
St = 1 - Sr #Relative power density transmitted (unitless)
theta = arange(0,pi,pi/180)
subplot(1,2,1)
plot(theta,St)
xlim([0,pi/2])
title("Relative power vs Elevation angle")
subplot(1,2,2, polar=True)
plot(theta,St)
title("Pattern of transmission")
wave_lt = c/f #Wavelength (m)
diam = wave_lt/(sqrt(epr1)*pi) #Submerged helix diameter (m)
att_cons = (pi*epr11)/(wave_lt*sqrt(epr1)) #Attenuation constant for water (Np/m)
att_d = 20*log10(exp(-att_cons*dep)) #Attenuation in the water path (dB)
Dir = 12*(cl**2)*num*sl #Directivity for 20 turn helix (unitless)
Ae = Dir*(wave_lt**2)/(4*pi) #Effective aperture (m^2)
Pr = Pt*Ae*dir_gb/((r**2)*(wave_lt**2)) #Received power(W)
St = np.around(St,2)
loss_inter = 10*log10(St[10]) #Loss at the interface for alpha = 83.68 (dB)
tot_loss = round(abs(att_d + loss_inter)) #Total loss (dB)
Pr_act = Pr/(10**(tot_loss/10)) #Net Actual received power (W)
#Results
print "Half power beamwidth for 12 turns is ", round(hpbw1), "degrees"
print "Directivity for 12 turns is ", round(dir1,1)
print "Half power beamwidth for 24 turns is ", round(hpbw2), "degrees"
print "Directivity for 24 turns is ", round(dir2,1)
print "A helix of ", num, "turns is chosen for reasonable compromise"
print "The signal level at the distance of 1km is", round(Pr_act,10), "W"
from math import atan,pi
#Variable declaration
freq = 3e9 #Frequency (Hz)
Re_Zc = 14.4e-3 #Real part of intrinsic impedence of copper (ohm)
Zd = 377 #Intrinsic impedence of air (ohm)
#Calculation
tau = atan(Re_Zc/Zd)*180/pi #Tilt angle (degrees)
#Result
print "The tilt angle is", round(tau,4), "degrees"
from math import atan,pi,sqrt
#Variable declaration
freq = 3e9 #Frequency (Hz)
eps_r = 80 #Relative permittivity of water (unitless)
#Calculation
tau = atan(1/sqrt(eps_r))*180/pi #Forward Tilt angle (degrees)
#Result
print "The forward tilt angle is", round(tau,1), "degrees"
from math import acos,pi
#Variable declaration
lambda_g = 1.5 #Wavelength in guide (lambda)
m = -1 #Mode number
#Calculation
phi = acos((1/lambda_g)+m)*180/pi #Forward Tilt angle (degrees)
#Result
print "The beam angle is", round(phi,1), "degrees"
from math import pi, log10, sqrt
#Variable declaration
freq = 4e9 #Frequency (Hz)
T_sys = 100 #System Temperature (K)
S_N = 20 #Signal to Noise ratio (dB)
bandwidth = 30e6 #Bandwidth (Hz)
P_trans = 5 #Satellite transponder power (W)
dia = 2 #Satellite parabolic dish diameter (m)
sat_spacing = 2 #Spacing between satellites (degrees)
r = 36000e3 #Downlink distance (m)
k = 1.38e-23 #Boltzmann's constant (J/K)
c = 3e8 #Speed of light (m/s)
#Calculation
wave_lt = c/freq
s_n = (wave_lt**2)/(16*(pi**2)*(r**2)*k*T_sys*bandwidth)
s_n = 10*log10(s_n) #Signal to noise ratio for isotropic antennas (dB)
Ae = 0.5*pi*(dia**2)/4 #Effective Aperture (m^2)
Gs = 4*pi*Ae/(wave_lt**2)
Gs = 10*log10(Gs) #Antenna Gain (dB)
Ge = 20 - s_n - Gs - 10*log10(P_trans) #Required earth station antenna gain(dB)
Ae_e = (10**(Ge/10))*(wave_lt**2)/(4*pi)
#Required earth station effective aperture (m^2)
Ap = Ae_e*2 #Required Physical aperture (m^2)
De = 2*sqrt(Ap/pi) #Required diameter of earth-station antenna(m)
hpbw = 65/(De/wave_lt) #Half power beam width (degree)
bwfn = 145/(De/wave_lt) #Beamwidth between first null (degree)
#Results
print "The required parabolic dish diameter of earth station antenna is"\
, round(De,1), "m"
print "The Half power beamwidth is", round(hpbw,1), "degrees"
print "The beamwidth between first null is", round(bwfn,1), "degrees"
from math import *
#Variable declaration
Tr = 45 #Satellite receiver temperature (K)
rcp_gain = 6 #Right circularly polarized antenna gain (dBi)
rcp_quad_gain = 3 #RCP gain of quadrifilar helix antenna (dBi)
bandwidth = 9.6e3 #Bandwidth (Hz)
snr = 10 #Required Signal-to-Noise ratio (dB)
c = 3e8 #Speed of light (m/s)
f = 1.65e9 #Frequency (Hz)
r = 780e3 #Distance to the satellite (m)
Ta = 300 #Antenna temperature (K)
k = 1.4e-23 #Boltzmann's constant (J/K)
theta = 10 #Zenith angle (degree)
Tr_handheld = 75 #Hand held receiver temperature (K)
Tsky = 6 #Sky Temperature (K)
theta_horz = 80 #Zenith angle for horizontal dipole (degree)
#Calculations
wave_lt = c/f #Wavelength (m)
Ld = (wave_lt/(4*pi*r))**2 #Spatial loss factor(unitless)
Ld_db = 10*log10(Ld) #Spatial loss factor(dB)
Tsys_up = Ta + Tr #Satellite system temperature (K)
N = k*Tsys_up*bandwidth #Noise power(W)
N_db = 10*log10(N) #Noise power (dB)
E_vert = cos(pi*cos(theta*pi/180)/2)/sin(theta*pi/180)
#Pattern factor for vertical lambda/2 dipole (unitless)
E_vert_db = 20*log10(E_vert)
Pt_vert_up = snr - (2.15 + round(E_vert_db,1) - 3) - \
rcp_gain + round(N_db) - round(Ld_db)
#Uplink power for vertical lambda/2 antenna (dB)
Pt_vert_up = 10**(Pt_vert_up/10)
#Uplink power for vertical lambda/2 antenna (W)
Ta_down = 0.5*(Ta)+0.5*(Tsky)+3 #Downlink antenna temperature (K)
Tsys_down = Ta_down + Tr_handheld #System temperature(K)
N_down = k*Tsys_down*bandwidth #Noise power (W)
N_down_db = 10*log10(N_down) #Noise power (dB)
Pt_vert_down = snr -(2.15+ round(E_vert_db,1) - 3) - \
rcp_gain + round(N_down_db) - round(Ld_db)
#Downlink power for vertical lambda/2 antenna (dB)
Pt_vert_down = 10**(Pt_vert_down/10)
#Downlink power for vertical lambda/2 antenna (W)
E_horz = cos(pi*cos(theta_horz*pi/180)/2)/sin(theta_horz*pi/180)
#Pattern factor for horizontal lambda/2 dipole (unitless)
E_horz_db = round(20*log10(E_horz),1)
Pt_horz_up = snr -(2.15 + E_horz_db - 3) - \
rcp_gain + round(N_db) - round(Ld_db)
#Uplink power for horizonal lambda/2 dipole (dB)
Pt_horz_up = 10**(Pt_horz_up/10)
#Uplink power for horizonal lambda/2 dipole (W)
Pt_horz_down = snr -(2.15 + E_horz_db - 3) - \
rcp_gain + round(N_down_db) - round(Ld_db)
#Downlink power for horizonal lambda/2 dipole (dB)
Pt_horz_down = 10**(Pt_horz_down/10)
#Downlink power for horizonal lambda/2 dipole (W)
Pt_quad_up = snr -(rcp_quad_gain + E_horz_db) - \
rcp_gain + round(N_db) - round(Ld_db)
#Uplink power for RCP quadrifilar helix antenna (dB)
Pt_quad_up = 10**(Pt_quad_up/10)
#Uplink power for RCP quadrifilar helix antenna (W)
Ta_quad = 0.85*(Tsky) + 0.15*(Ta) #Downlink antenna temperature (K)
Tsys_quad = Ta_quad + Tr_handheld #System temperature(K)
N_quad = k*Tsys_quad*bandwidth #Noise power (W)
N_quad_db = 10*log10(N_quad) #Noise power (dB)
Pt_quad_down = snr -(rcp_quad_gain + E_horz_db) - \
rcp_gain + round(N_quad_db) - round(Ld_db)
#Downlink power for RCP quadrifilar helix antenna (dB)
Pt_quad_down = 10**(Pt_quad_down/10)
#Downlink power for RCP quadrifilar helix antenna (W)
#Results
print "The Uplink power for vertical lambda/2 dipole is", round(Pt_vert_up,1),"W"
print "The Uplink power for horizontal lambda/2 dipole is", round(Pt_horz_up,3),"W"
print "The Uplink power for RCP quadrifilar helix antenna is", round(Pt_quad_up,3),"W"
print "The downlink power for vertical lambda/2 dipole is", round(Pt_vert_down,1),"W"
print "The downlink power for horizontal lambda/2 dipole is", round(Pt_horz_down,3),"W"
print "The downlink power for RCP quadrifilar helix antenna is",\
round(Pt_quad_down,3),"W"
from math import *
#Variable declaration
f = 1.6e9 #Frequency (Hz)
r = 1400e3 #Height (m)
r_sep = 3500e3 #Height for 10 degree seperation (m)
c = 3e8 #Speed of light(m/s)
Ta = 300 #Satellite antenna temperature (K)
Tr = 45 #Satellite receiver temperature (K)
k = 1.3e-23 #Boltzmann's constant (J/K)
bandwidth = 9.6e3 #Bandwidth (Hz)
snr = 6 #Signal to noise ratio (dB)
rcp_gain = 3 #Helix gain(dB)
beam_angle = 25 #RCP spot beam (degree)
Tsky = 6 #Sky Temperature (K)
Tr_handheld = 75 #Hand held receiver temperature (K)
#Calculations
wave_lt = c/f #Wavelength (m)
Ld = (wave_lt/(4*pi*r))**2
Ld = 10*log10(Ld) #Propagation loss factor (dB)
sat_gain = 40000/(beam_angle**2)
sat_gain = 10*log10(sat_gain) #Satellite gain (dB)
Tsys = Ta+Tr #System temperature (K)
N = k*Tsys*bandwidth #Noise power (W)
N_db = 10*log10(N) #Noise power (dB)
Pt_up = snr - (rcp_gain) - (sat_gain) + N_db - Ld #Uplink power (dB)
Pt_up = 10**(Pt_up/10) #Uplink power (W)
Ta_quad = 0.85*(Tsky) + 0.15*(Ta) #Downlink antenna temperature (K)
Tsys_quad = Ta_quad + Tr_handheld #System temperature(K)
N_quad = k*Tsys_quad*bandwidth #Noise power (W)
N_quad_db = 10*log10(N_quad) #Noise power (dB)
Pt_down = snr - (rcp_gain) - (sat_gain) + round(N_quad_db) - round(Ld)
#Downlink power (dB)
Pt_down = 10**(Pt_down/10) #Downlink power (W)
Ld_sep = (wave_lt/(4*pi*r_sep))**2
Ld_sep = 10*log10(Ld_sep) #Propagation loss factor(dB)
Pt_sep = snr - (rcp_gain) - sat_gain + ceil(N_db) - round(Ld_sep)
#Uplink power (dB)
Pt_sep = 10**(Pt_sep/10) #Uplink power (W)
#Results
print "The Satellite gain is", round(sat_gain,1),"dB"
print "The Uplink power required is", round(Pt_up,3),"W"
print "The Downlink power required is",round(Pt_down,4),"W"
print "The uplink power required for 10 deg. from horizon is",round(Pt_sep,3),"W"
from math import *
#Variable declaration
f = 30e9 #Frequency (Hz)
Tr = 300 #Receiver temperature (K)
Ta = 275 #Satellite antenna temperature (K)
h = 1400e3 #Height (m)
bw = 9.6e3 #Bandwidth per channel (Hz)
rcp_gain = 10 #RCP satellite gain (dBi)
rain_att = 10 #Rain attenuation (dB)
k = 1.4e-23 #Boltzmann's constant (J/K)
snr = 10 #Required SNR (dB)
ap_eff = 0.7 #Aperture efficiency (unitless)
Ta_2 = 10 #Dish antenna temperature (K)
#Calculations
wave_lt = c/f #Wavelength (m)
Ld = (wave_lt/(4*pi*r))**2 #Spatial loss factor(unitless)
Ld_db = 10*log10(Ld) #Spatial loss factor(dB)
Tsys = Ta+Tr #System temperature (K)
N = k*Tsys*bw #Propagation loss due to rain (W)
N = 10*log10(N) #Propagation loss due to rain (dB)
Dr = -rcp_gain + snr - Ld_db + N + rain_att #Antenna gain (dB)
Dr = 10**(Dr/10) #Antenna gain (unitless)
Dr_req = Dr/ap_eff #Required antenna gain (unitless)
Dr_req_db = 10*log10(Dr_req) #Required antenna gain (dB)
dish_dia = 2*wave_lt*sqrt(Dr_req/28) #Required diameter of dish (m)
hpbw = sqrt(40000/Dr_req) #Half power beam width (degrees)
Tsys2 = Ta_2 + Tr #System temperature(K)
N2 = k*Tsys2*bw #Propagation loss due to rain(W)
N2 = 10*log10(N2) #Propagation loss due to rain(dB)
Pt_db = snr - Dr_req_db - rcp_gain + N2 - Ld_db + rain_att
#Transmitted power (dB)
Pt = 10**(Pt_db/10)
#Results
print "The uplink antenna gain required is", round(Dr_req_db,0), "dB"
print "The required dish size", round(dish_dia,3), "m"
print "The HPBW is", round(hpbw,1), "degrees"
print "The downlink satellite power required is", round(Pt,3), "W"
from math import pi
dia = 1000 #diameter of asteroid (m)
prc = 0.4 #Power reflection coefficient of asteroid (unitless)
f = 4e9 #Frequency (Hz)
P = 1e9 #Power (W)
s = 20e3 #Asteroid speed (m/s)
ast_dis = 0.4 #Distance of asteroid (AU)
au = 1.5e11 #Astronomical Unit (m)
c = 3e8 #Speed of light (m/s)
k = 1.38e-23 #Boltzmann's constant (m^2 kg s^-2 K^-1)
Tsys = 10 #System temperature (K)
B = 1e6 #Bandwidth (Hz)
snr = 10 #Signal to noise ratio (dB)
eap = 0.75 #Aperture efficiency (unitless)
sigma = prc*pi*s**2 #Radar cross section (m^2)
ast_dm = au*ast_dis #Astroid distance (m)
lmda = c/f #Wavelength(m)
d4 = (64*(lmda**2)*(ast_dm**4)*k*Tsys*B*snr)/((eap**2)*pi*(sigma)*P)
d = d4**(0.25) #Diameter of dish (m)
delf = 2*s/lmda #Doppler shift (Hz)
delt = 2*(ast_dm)/c #Time delay (s)
timp = ast_dm/s #Time before impact (s)
#Result
print "The diameter of the dish is", round(d), "m"
print "The doppler shift is %.1f Hz" % delf
print "The time delay for the radar signal is", delt, "s"
print "The time before impact is", timp, "s"
from math import sqrt
#Variable declaration
t1 = 0.3e-9 #Echo time off the top of pavement (s)
t2 = 2.4e-9 #Echo time off bottom of pavement (s)
t3 = 14.4e-9 #Echo time off bottom of water pocket (s)
er_1 = 4 #Relative permittivity of pavement (unitless)
er_2 = 81 #Relative permittivity of water pocket (unitless)
c = 3e8 #Speed of light (m/s)
#Calculations
d1 = (t2-t1)*c/(2*sqrt(er_1))
d2 = (t3-t2)*c/(2*sqrt(er_2))
#Result
print "The thickness of pavement is", round(d1,2),"m"
print "The thickness of water pocket is", round(d2,2), "m"