from __future__ import division
#variable declaration
D = 2 # Diameter of paraboloid reflector in m
c = 3*10**8 # speed of light in m/s
f = 5 # frequency in GHz
f = 5*10**9 # frequency in Hz
#calculations
lamda = c/f # wavelength in m
BWFN = 140*(lamda/D) # null-to-null beamwidth in degrees
HPBW = 70*(lamda/D) # half power beamwidth in degrees
#result
print "null-to-null beamwidth in degrees:",round(BWFN,3)
print "half power beamwidth in degrees:",round(HPBW,3)
from __future__ import division
from math import log10
#variable declaration
D = 2 # mouth diameter of paraboloid reflector in m
c = 3*10**8 # speed of light in m/s
f = 5 # frequency in GHz
f = 5*10**9 # frequency in Hz
#calculations
lamda = c/f # wavelength in m
G = 6.4*(D/lamda)**2 # power gain of paraboloid
G_p = 10*log10(G) #power gain in dB
#result
print "power gain in dB:",round(G_p,3)
from __future__ import division
from math import log10
#variable declaration
D_a = 0.15 # mouth Diameter of paraboloid in m
c = 3*10**8 # speed of light in m/s
f = 10 # frequency in GHz
f = 10*10**9 # frequency in Hz
#calculations
lamda = c/f # wavelength in m
BWFN = 140*(lamda/D_a) # null-to-null beamwidth in degrees
HPBW = 70*(lamda/D_a) # half power beamwidth in degrees
G_p = 6.4*(D_a/lamda)**2 # power gain of paraboloid
G_p = 10*log10(G_p) # power gain in dB
#result
print "null-to-null beamwidth in degrees:",round(BWFN,3)
print "half power beamwidth in degrees:",round(HPBW,3)
print "power gain in dB:",round(G_p,3)
from __future__ import division
from math import log10
#variable declaration
D_a = 1.8 #mouth diameter of paraboloid reflector in m
c = 3*10**8 # speed of light in m/s
f = 2 # frequency in GHz
f = 2*10**9 # frequency in Hz
#calculations
lamda = c/f # wavelength in m
G_p = 6.4*(D_a/lamda)**2 # power gain of paraboloid
G_p = 10*log10(G_p) # power gain in dB
#result
print "power gain in dB:",round(G_p,3)
from __future__ import division
from math import log10
#variable declaration
c = 3*10**8 # speed of light in m/s
f = 5 # frequency in GHz
f = 5*10**9 # frequency in Hz
lamda = c/f # wavelength in m
BWFN = 10 # null-to-null beamwidth in degrees
#calculations
# formula: BWFN = 140*(lamda/D_a)
D_a = 140*lamda/BWFN # mouth Diameter of paraboloid reflector in m
HPBW = 70*(lamda/D_a) # half power beamwidth in degrees
G_p = 6.4*(D_a/lamda)**2 # power gain of paraboloid
#result
print "half power beamwidth in degrees:",round(HPBW,3)
print "mouth Diameter of paraboloid reflector in m:",round(D_a,3)
print "power gain of paraboloid:",round(G_p,3)
from __future__ import division
from math import log10,pi
#variable declaration
b = 0.65 # illumination efficiency
D_a = 6 # mouth diameter of paraboloid reflector in m
c = 3*10**8 # speed of light in m/s
f = 10 # frequency in GHz
f = 10*10**9 # frequency in Hz
#calculations
lamda = c/f # wavelength in m
A = pi*(D_a)**2/4 # Actual area in m**2
A_c = 0.65*A # capture area in m**2
D = 6.4*(D_a/lamda)**2 # directivity
D = 10*log10(D) # directivity in dB
phi = 70*(lamda/D_a) # half power beam width in degrees
phi_not = 2*phi # null-to-null main beam width in degrees
#result
print "directivity in dB:",round(D,3)
print "half power beam width in degrees:",round(phi,3)
print "null-to-null main beam width in degrees:",round(phi_not,3)
print "capture area in m**2:",round(A_c,3)
from __future__ import division
#variable declaration
D_a = 6 # Diameter of paraboloid reflector in m
c = 3*10**8 # speed of light in m/s
f = 4 # frequency in GHz
f = 4*10**9 # frequency in Hz
#calculations
lamda = c/f # wavelength in m
r = (2*D_a**2)/lamda # required minimum distance between two antennae in m
#result
print "required minimum distance between two antennae in m:",round(r,3)
from __future__ import division
from math import sqrt
#variable declaration
G_p = 1000 # gain
c = 3*10**8 # speed of light in m/s
f = 3 # frequency in GHz
f = 3*10**9 # frequency in Hz
lamda = c/f # wavelength in m
#calculations
# formula : G_p = 6.4*(D_a/lambda)**2 # power gain
D_a = lamda*(sqrt(G_p/6.4)) # mouth Diameter of paraboloid in m
BWFN = 140*(lamda/D_a) # null-to-null beamwidth in degrees
HPBW = 70*(lamda/D_a) # half power beamwidth in degrees
#result
print "mouth Diameter of paraboloid in m",round(D_a,3)
print "null-to-null beamwidth in degrees:",round(BWFN,3)
print "half power beamwidth in degrees:",round(HPBW,3)
from __future__ import division
from math import sqrt,pi
#variable declaration
c = 3*10**8 # speed of light in m/s
f = 10 # frequency in GHz
f = 10*10**9 # frequency in Hz
lamda = c/f # wavelength in m
G_p = 75 # power gain in dB
#calculations
# formula : G_p = 10*log10(G_p) # power gain in dB
G = 10**(G_p/10) # simple power gain
# formula : G = 6.4*(D_a/lamda)**2 # power gain
D_a = lamda*(sqrt(G/6.4)) # mouth Diameter of paraboloid in m
A = pi*(D_a)**2/4 # Actual area in m**2
A_c = 0.65*A # capture area in m**2
BWFN = 140*(lamda/D_a) # null-to-null beamwidth in degrees
HPBW = 70*(lamda/D_a) # half power beamwidth in degrees
#result
print "null-to-null beamwidth in degrees:",round(BWFN,3)
print "half power beamwidth in degrees:",round(HPBW,3)
print "capture area in m**2:",round(A_c,3)
#answer of capture area is slightly more as compare to the book
from __future__ import division
from math import log10,pi
#variable declaration
D_a = 60 # mouth diameter of paraboloid reflector in m
c = 3*10**8 # speed of light in m/s
f = 2 # frequency in GHz
f = 2*10**9 # frequency in Hz
#calculations
lamda = c/f # wavelength in m
phi = 70*(lamda/D_a) # half power beam width in degrees
phi_not = 140*(lamda/D_a) # null-to-null main beam width in degrees
G_p = 6.4*(D_a/lamda)**2 # power gain of paraboloid
G_p = 10*log10(G_p) #power gain in dB
#result
print "half power beam width in degrees:",round(phi,3)
print "null-to-null main beam width in degrees:",round(phi_not,3)
print "power gain in dB:",round(G_p,3)
from __future__ import division
from math import log10
#variable declaration
D = 22 # mouth diameter of paraboloid reflector in m
c = 3*10**8 # speed of light in m/s
f = 5 # frequency in GHz
f = 5*10**9 # frequency in Hz
lamda = c/f # wavelength in m
b = 0.6 # illumination efficiency
#calculations
G_p = b*(D/lamda)**2 # power gain of paraboloid
G_p = 10*log10(G_p) #power gain in dB
#result
print "power gain in dB:",round(G_p,3)
from __future__ import division
from math import pi
#variable declaration
c = 3*10**8 # speed of light in m/s
f = 2 # frequency in GHz
f = 2*10**9 # frequency in Hz
lamda = c/f # wavelength in m
BWFN = 12 # null-to-null main beam width in degrees
#calculalations
# formula : BWFN = 140*(lamda/D_a)
D_a = 140*lamda/BWFN # mouth diameter of paraboloid reflector in m
A = pi*(D_a)**2/4 # Actual area in m**2
A_c = 0.65*A # capture area in m**2
#result
print "mouth diameter of paraboloid reflector in m:",round(D_a,3)
print "capture area in m**2:",round(A_c,4)
from __future__ import division
from math import log10
#variable declaration
c=3*10**8 # speed of light in m/s
f=2.5 # frequency in GHz
f=2.5*10**9 # frequency in Hz
lamda=c/f # wavelength in m
BWFN=3 # null-to-null main beam width in degrees
#calculations
# formula : BWFN=140*(lamda/D_a)
D_a=140*lamda/BWFN # mouth diameter of paraboloid reflector in m
G=6.4*(D_a/lamda)**2 # power gain of paraboloid
G_p=10*log10(G) #power gain in dB
#calculations
print "power gain in dB:",round(G_p,3)
print "mouth diameter of paraboloid reflector in m:",round(D_a,3)
from __future__ import division
from math import log10
from sympy import Symbol
#variable declaration
phi = 5 # HPBW,half power beam width in Degrees
phi_not = 2*phi # BWFN, null-to-null beam width in degrees
Lm = Symbol('Lm') # defining Lm as lambda
#calculations
# formula : phi = 70*(Lm/D_a) # where Lm is wavelength in m and D_a is mouth diameter in m
D_a = (70*Lm)/phi
G_p = 6.4*(D_a/Lm)**2
G_p = 10*log10(G_p) # power gain in dB
#result
print "BWFN, null-to-null beam width in degrees:",round(phi_not,3)
print "power gain in dB:",round(G_p,3)
from __future__ import division
from math import log10
from sympy import Symbol
#variable declaration
Lm = Symbol('Lm')# defining Lm as lambda
D_a = 8*Lm # where D_a is mouth diameter in m and Lm is wavelength in m
#calculations
# formula : G_p = 6.4*(D/lambda)**2
G_p = 6.4*(D_a/Lm)**2 #power gain
G_p = 10*log10(G_p) # power gain in dB
#result
print "power gain in dB:",round(G_p,3)
from __future__ import division
from sympy import Symbol
#variable declaration
Lm = Symbol('Lm') # defining Lm as lamda
D_a = 6*Lm # where D_a is mouth diameter in m and Lm is wavelength
#calculations
# formula : HPBW = phi = 70*(lamda/D_a)
phi = 70*(Lm/D_a) # half power beam width in degrees
phi_not = 2*phi # null-to-null beam width in degrees
# formula : D = 6.4*(D_a/lambda)**2
D = 6.4*(D_a/Lm)**2
#result
print "Directivity:",round(D,3)
print "half power beam width in degrees:",round(phi,3)
print "null-to-null beam width in degrees:",round(phi_not,3)
from __future__ import division
from math import log10
#variable declaration
f = 6 # frequency in GHz
f = 6*10**9 # frequency in Hz
c = 3*10**8 # speed of light in m/s
lamda = c/f # wavelength in m
d = 12 # aperture length in cm
d = 12*10**-2 # aperture length in m
w = 6 # aperture width in cm
w = 6*10**-2 # aperture width in m
#calculations
phi_E = 56*(lamda/d) # half power beam width for aperture length d in Degrees
phi_H = 67*(lamda/w) # half power beam width for aperture width w in Degrees
G_p = (4.5*w*d)/(lamda)**2 # power gain
G_p = 10*log10(G_p) # power gain in dB
D =(7.5*w*d)/(lamda)**2 # Directivity
#result
print "half power beam width for aperture length d in Degrees:",round(phi_E,3)
print "half power beam width for aperture width w in Degrees:",round(phi_H,3)
print "power gain in dB:",round(G_p,2)
print "Directivity:",round(D,3)
from __future__ import division
from math import log10
from sympy import Symbol
#variable declaration
Lm = Symbol('Lm') # defining Lm as lambda
d = 8*Lm # where d is aperture length and Lm is wavelength
w = 8*Lm # where w is aperture width
#calculations
#formula : G_p = (4.5*w*d)/lambda**2
G_p = (4.5*w*d)/Lm**2 # power gain
G_p = 10*log10(G_p) # power gain in dB
#result
print "power gain in dB:",round(G_p,3)
from __future__ import division
from math import log10
#variable declaration
f = 6 # frequency in GHz
f = 6*10**9 # frequency in Hz
c = 3*10**8 # speed of light in m/s
lamda = c/f # wavelength in m
d = 10 # aperture length in cm
d = 10*10**-2 # aperture length in m
w = 5 # aperture width in cm
w = 5*10**-2 # aperture width in m
#calculations
G_p = (4.5*w*d)/(lamda)**2 # power gain
G_p = 10*log10(G_p) # power gain in dB
D = (7.5*w*d)/(lamda)**2 # Directivity
D = 10*log10(D) # directivity in dB
#result
print "power gain in dB:",round(G_p,3)
print "Directivity in dB:",round(D,3)
from __future__ import division
import numpy as np
eta_0 = 377 #intrinsic impedance in ohm
print "when Zd = 73+42.5j"
Zd = 73+42.5j # dipole impedance
# formula : zs*zd = (eta_0)**2/4
Zs = eta_0**2/(4*Zd) # slot impedance in ohm
print "complementary slot impedance in ohm:",np.around(Zs,2)
print "when Zd = 67+0j"
Zd = 67+0j # dipole impedance
# formula : zs*zd = (eta_0)**2/4
Zs = eta_0**2/(4*Zd) # slot impedance in ohm
print "complementary slot impedance in ohm:",np.around(Zs,2)
print "when Zd = 710+0j"
Zd = 710+0j # dipole impedance
# formula : zs*zd = (eta_0)**2/4
Zs = eta_0**2/(4*Zd) # slot impedance in ohm
print "complementary slot impedance in ohm:",np.around(Zs,2)
print "when Zd = 500+0j"
Zd = 500+0j # dipole impedance
# formula : zs*zd = (eta_0)**2/4
Zs = eta_0**2/(4*Zd) # slot impedance in ohm
print "complementary slot impedance in ohm:",np.around(Zs,2)
print "when Zd = 50+20j"
Zd = 50+20j # dipole impedance
# formula : zs*zd = (eta_0)**2/4
Zs = eta_0**2/(4*Zd) # slot impedance in ohm
print "complementary slot impedance in ohm:",np.around(Zs,2)
print "when Zd = 50-25j"
Zd = 50-25j # dipole impedance
# formula : zs*zd = (eta_0)**2/4
Zs = eta_0**2/(4*Zd) # slot impedance in ohm
print "complementary slot impedance in ohm:",np.around(Zs,2)
print "when Zd = 300+0j"
Zd = 300+0j # dipole impedance
# formula : zs*zd = (eta_0)**2/4
Zs = eta_0**2/(4*Zd) # slot impedance in ohm
print "complementary slot impedance in ohm:",np.around(Zs,2)