import scipy
#Variable Declaration
H=5*10**-6 #magnetic field strentgh in A/m
theta=scipy.pi/2
r=2*10**3 #distance in m
Bdl=2*scipy.pi/25
N=10 #number of turns
#Calculations
Ia=4*scipy.pi*r*H/(Bdl*scipy.sin(theta)) #current for part (a) in A
Pa=40*scipy.pi**2*(1/25.0)**2*Ia**2 #power for part (a) in W
def pow(Io,Rrad):
P=0.5*Io**2*Rrad
print round(P*10**3,0),'mW'
denom=scipy.cos(scipy.pi*scipy.cos(theta)/2)
Ib=H*2*scipy.pi*r*scipy.sin(theta)/denom #current for part (b) in A
Rradb=73 #wave impedance in ohms for (b)
Ic=Ib #current for part (c) in A
Rradc=36.56 #wave impedance in ohms for (c)
Id=H*r*400/(10*scipy.pi**2) #current for part (d) in A
Rradd=320*scipy.pi**6*N**2/20**4 #wave impedance in ohms for (d)
#Results
print 'The power transmitted in mW if antenna is ;'
print '(a) A Hertzian dipole of length lambda/25 =','\n',round(Pa*10**3,0),'mW'
print '(b) A half-wave dipole ='
pow(Ib,Rradb)
print '(c) A quarter-wave monopole ='
pow(Ic,Rradc)
print '(d) A 10-turn loop antenna of radius Po = lambda/20 ='
pow(Id,Rradd)
import scipy
import cmath
from numpy import *
#Variable Declaration
c=3*10**8 #speed of wave in m/s
f=50*10**6 #frequency in Hz
E=10*10**-6 #field strength in V/m
theta=scipy.pi/2
r=500*10**3 #distance in m
eta=120*scipy.pi #wave impedance in ohms
Rrad=73 #in ohms
Zo=75 #in ohms
Zl=73+42.5j
#Calculations
l=c/(2*f)
I=E*2*r*scipy.pi*sin(theta)/(eta*(cos((scipy.pi/2)*cos(theta))))
P=0.5*I**2*Rrad
T=(Zl-Zo)/(Zl+Zo)
s=(1+abs(T))/(1-abs(T))
#Results
print 'The length of the dipole =',l,'m'
print 'The current that must be fed to the antenna =',round(I*10**3,2),'mA'
print 'The average power radiated by the antenna =',round(P*10**3,1),'mW'
print 'The standing wave ratio =',round(s,4)
import scipy
#Variable Declaration
G=5
r=10*10**3 #in m
P=20*10**3 #power in W
n=120*scipy.pi #wave impedance in ohms
#Calculations
Gd=10**(G/10.0)
E=scipy.sqrt(n*Gd*P/(2*scipy.pi*r*r)) #field intensity in V/m
#Result
print 'electric field intensity =',round(E,4),'V/m'
import scipy
import scipy.integrate
#Variable Declaration
Umax=2.0
def U(phi,theta):
s=2*scipy.sin(theta)*(scipy.sin(phi))**3/(4.0*scipy.pi)
return s
#Calculations
if __name__ == '__main__':
Uav,er=scipy.integrate.dblquad(lambda theta,phi:U(phi,theta)*scipy.sin(theta),
0, scipy.pi, lambda theta: 0, lambda theta: scipy.pi)
D=Umax/Uav #Directivity
#Result
print 'directivity of the antenna =',D
import scipy
#Variable Declaration
c=3*10**8 #speed of wave in m/s
f=30*10**6 #frequency in Hz
E=2*10**-3 #field strength in V/m
n=120*scipy.pi
R=73
#Calculations
l=c/f #wavelength in m
Gdmax=round(n/(scipy.pi*R),2)
Amax=(l**2/(4*scipy.pi))*Gdmax #maximum effective area in m^2
Pr=(E*E*Amax)/(2*n) #power received in W
#Results
print 'maximum effective area =',round(Amax,2),'m^2'
print 'power received =',round(Pr*10**9,2),'nW'
import scipy
#Variable Declaration
Gt=25 #in dB
Gr=18 #in dB
r=200 #in units of lambda
Pr=5*10**-3 #power received in W
#Calculations
Gdt=10**(Gt/10.0)
Gdr=10**(Gr/10.0)
Pt=Pr*(4*scipy.pi*r)**2/(Gdr*Gdt)
#Result
print 'minimum transmitted power =',round(Pt,3),'W'
import scipy
#Variable Declaration
c=3*(10)**8 #speed of wave in m/s
f=3.0*(10)**9 #frequency in Hz
Aet=9 #effective area in m^2
r1=1.852*(10)**5 #distance in m
r2=4*r1 #distance in m
r3=5.556*10**5 #distance in m
Pr=200*(10)**3 #in W
a=20 #target area in m^2
#Calculations
l=c/f #wavelength in m
Gdt=4*scipy.pi*Aet/(l*l)
P1=Gdt*Pr/(4*scipy.pi*r1*r1) #power at 100 nmiles in W/m^2
P2=Gdt*Pr/(4*scipy.pi*r2*r2) #power at 400 nmiles in W/m^2
Pr=Aet*a*Gdt*Pr/(4*scipy.pi*r3*r3)**2 #power of reflected signal in W
#Results
print 'Signal power density at 100 nautical miles =',round(P1*1000,3),'mW/m^2'
print 'Signal power density at 400 nautical miles =',round(P2*1000,3),'mW/m^2'
print 'Power of reflected signal =',round(Pr*10**12,5),'pico W'