from __future__ import division
import math
# Etheta = 60∗ pi ∗ I ( dl / lambda ) ∗ ( sin(theta) / r) where thetha = 90
r =200;
print ( " Distance between point's is m" ,r ,'m')
lam =10;
print ( " the wavelength is " , lam ,'m') ;
idl =3*10**-4;
print ( " the current element is " , idl ,"A/m") ;
Etheta =60*3.14*3*10** -3/2
print(" Etheta value is V/m",Etheta)
from __future__ import division
import math
#etta=Prad/Prad+Ploss=Rrad/Rrad+Rloss
Rrad=72;
print("radiation resistance is ",Rrad,"ohm");
Rloss=8;
ettar=72/(72+8);
print("the Loss resistance is ",Rloss,"ohm");
Gpmax=30;
print("the power gain of antenna is ",Gpmax);
Gdmax=Gpmax/ettar;
Gdmax1=10 *math.log10(Gdmax);#in db
print("the Directivity gain is ",Gdmax);
print("the Directivity gain in db is given by ",Gdmax1);
from __future__ import division
import math
#Rrad=80*pi^2*(dl/lambda)^2
dl=0.1;
print("the elemental length is given by ",dl);
Rrad=80*(math.pi)**2*(0.1)**2;
print("the radiation resistance is ",Rrad,"ohm");
from __future__ import division
import math
#Prad=80*(pi)**2*(dl/lambda)*(Irms)**2;
frequency=100*10**6;
lamda=(3*10**8)/(100*10**6); #lamda=c/f;
print("the wavelength is ",lamda,"m");
Prad=100;
print("the Radiated power is ",Prad,"W");
dl=0.01;
print("the elemental length is ",dl,"m");
Irms2=(3/0.01)**2*100/(80*(math.pi)**2);
Irms=math.sqrt(Irms2);
print("the Irms current is ",Irms,"A")
from __future__ import division
import math
#Pavg=0.5*|E|^2/etta0,Prmax=2*10^-6W,Aem=Prmax/Pavg
E=50*10**-3;
Etta0=120*(math.pi);
print("the electric field is ",E,"V/m");
Pavg=0.5*(50*10**-3)**2/(120*(math.pi));
print("the average power is ",Pavg,"W");
Aem=(2*10**-6)/(3.315*10**-6);
print("the maximum effective aperture area is ",Aem,"m^2");
from __future__ import division
import math
#Pavg=0.5*|E|^2/etta0,Prmax=2*10^-6W,Aem=Prmax/Pavg
E=50*10**-3;
Etta0=120*(math.pi);
print("The electric field is %e V/m"%E);
Pavg=0.5*(50*10**-3)**2/(120*(math.pi));
print("The average power is %g W"%Pavg);
Aem=(2*10**-6)/(3.315*10**-6);
print("The maximum effective aperture area is %g m^2"%Aem);
from __future__ import division
import math
#GT=GR=Antilog[GT or Gr(in db)/10]=31.622*10^3
#1 mile=1609.35 m
freq=3*10**9;
d=48280.5;#30miles*1609.35
lamda=(3*10**8)/(3*10**9);
print("The wavelength is %g m"%lamda);
Pt=(10**-3)*((4*(math.pi)*48280.5)/0.1)**2*(1/(31.622*10**3)**2);#Pr=Pt(GR*GT*(lamda/4*pi*d)^2),Pr=1mW
print("The transmitter power is %g W"%Pt);
from __future__ import division
import math
#T0=290k,room temperature
F=1.2882;
print("F is given by %g"%F);
Te=(1.2882-1)*290;#Te=(F-1)T0
print("Effective noise temperature is %g K"%Te);
from __future__ import division
import math
#Etheta=60Im/r*(cos(pi/2cos(theta))/sin(theta));
#theta=90
#Pavg=Rrad*Irms^2;
#Irms=Im/sqrt(2)
Im=100*10**-3;
r=100
Etheta=(60*10**-3);
H=(60*10**-3)/(120*(math.pi));
Pavg=73*(10**-1/math.sqrt(2))**2;#Rrad=73ohm for half wave dipole
print("The average power is %g W"%Pavg);
from __future__ import division
import math
#Rrad=36.5ohm
#Irms=Im/sqrt(2)
Im=1.22;#on applying Kvl
Pavg=36.5*(1.122/math.sqrt(2))**2;
print("The average power is %g W"%Pavg);
from __future__ import division
import math
#Hphi=Im*dl*sin(theta)/(2*lamda*r);
#for Hertzian Dipole
Hphi=5*10**-6;
lamda=1;#assume
dl=0.04;
Im=(5*10**-6)*2*(2*10**3)/(0.04);
Irms=Im/(math.sqrt(2));
Prad=80*(math.pi)**2*(0.04)**2*(Irms)**2;
print("The radiated Power is %g W"%Prad);
from __future__ import division
import math
#For Half wave Dipole
#Hphi=Im/(2*pi*r)*cos(pi/2*cos(theta)/sin(theta))
#Rrad=73 ohm
Hphi=5*10**-6;
r=2*10**3;
Im=(5*10**-6)*(4*(math.pi)*10**3);
Prad=73*(Im/math.sqrt(2))**2;
print("The radiated power is %g W"%Prad);
from __future__ import division
import math
#For quarter wave monopole
#Rrad=36.5 ohm
Im=20*(math.pi)*10**-3;#from previous problem
Prad=36.5*((20*(math.pi)*10**-3)/math.sqrt(2))**2;
print("The radiated power is %g W"%Prad);
from __future__ import division
import math
#lamda=velocity/frequency
frequency=50*10**6;
lamda=3*10**8/frequency;
leng=lamda/2;
print("The length of the dipole antenna is %d m"%leng);
from __future__ import division
import math
#Etheta=60*Im*cos(pi/2*cos(theta)/sin(theta))/r
r=500*10**3;
Etheta=10*10**-6;
Im=Etheta*r/60;
print("The current through the dipole is %g A"%Im);
from __future__ import division
import math
#for half wave dipole
Pavg=0.5*73*0.0833;#Rrad*Irms^2;Rrad=73 ohm
print("The radiated power is %g W"%Pavg);
from __future__ import division
import math
#efficiency=Prad/Pinput
#efficiency=0.95,Umax=0.5W/sr,D=Umax/[Prad/4*pi];
#part (i)
Pinput=0.4;
n=0.95;
Umax=0.5;
Prad=n*Pinput;
print("The radiated power is %g W"%Prad);
D=0.5/(0.38/(4*(math.pi)));
print("The directivity is %g"%D);
#part(ii)
Prad=0.3;
D=0.5/(0.3/(4*(math.pi)));
print("The directivity is %g"%D);
from __future__ import division
import math
#for half wave dipole
#on applying kvl
Im=0.0768;
Rrad=73;
r=10**4;
Prad=0.5*Rrad*Im**2;#Rrad=73 for half wave dipole
print("The radiated power is %g W"%Prad);
Gd=1.6405#on taking antilog of Gd(in db)
E4=Prad/(4*(math.pi)*r**2);
E3=1.6405*E4;
E2=E3*240*(math.pi);
print("E2 = %g"%E2);
E=math.sqrt(E2);
print("The field value is %g V/m"%E);
from __future__ import division
import math
#frequency=100 MHz
frequency=100*10**6;
lamda=3*10**8/frequency;
leng=lamda/2;
print("The length of antenna is %g m"%leng);
Rrad=73;
Im=25;
Prad=Rrad*0.5*Im**2;
print("The power radiated is %g W"%Prad);
from __future__ import division
import math
Im=15;
Prad=6*10**3;
Rrad=Prad/(Im/math.sqrt(2))**2;
print("The radiation resistance is %g ohm"%Rrad);
from __future__ import division
import math
#Gpmax=n*Gdmax
#N=Rrad/Rrad+Rloss
Rrad=72;
Rloss=8;
n=Rrad/(Rrad+Rloss);
print("The radiation efficiency is given by %g"%n);
Gpmax=15.8489;#antilog(Gpmax/10);Gpmax=12db
Gdmax=Gpmax/n;
Gdmaxdb=10*math.log10(Gdmax);
print("The directive gain is %g"%Gdmax);
print("The directive gain in db is %g"%Gdmaxdb);
from __future__ import division
import math
dl=1/40;
Im=125;
Rloss=1;
Rrad=80*(math.pi)**2*(dl)**2;
print("The Radiation resistance is %g ohm"%Rrad);
Irms=Im/math.sqrt(2);
Prad=Rrad*(Irms)**2;
print("The Power radiated is %g W"%Prad);
n=Rrad/(Rrad+Rloss);
print("The radiation efficiency is %g"%n);
from __future__ import division
import math
#|E|^2=sqrt(60*Gd*Prad)/r;
r=10**4;
Gd=3.1622#antilog(5db/10)
Prad=20*10**3;
E=math.sqrt(60*Gd*Prad)/r;
print("The Electric field value is %g V/m"%E);
from __future__ import division
import math
#Gd=antilog(12db/10)
Gd=15.85;
Prad=5*10**3;
r=3*10**3;
E=math.sqrt(60*Gd*Prad)/r;
print("The electric field is %g V/m"%E);
from __future__ import division
import math
#R=l*sqrt(pi*F*Uo*Sigma)/Sigma*2*pi*r
L=2;
r=1*10**-3;
f=2*10**6;
u=4*(math.pi)*10**-7;
sig=5.7*10**6;
R=math.sqrt((math.pi)*2*10**6*4*(math.pi)*10**-7/(5.7*10**6))*L/(2*(math.pi)*10**-3);
print("The resistance of hertzian dipole is %g ohm"%R);
dl=2
frequency=2*10**6;
lamda=3*10**8/(frequency);
Rrad=80*(math.pi)**2*(dl/lamda)**2;
n=Rrad/(Rrad+R);
print("The radiation efficiency is %g ohm"%n);
from __future__ import division
import math
#half wave dipole
dl=1/15;#assume lamda=1;
Rloss=1.5;
Rrad=80*(math.pi)**2*(1/15)**2;
n=Rrad/(Rrad+Rloss);
print("The radiation efficiency is %g"%n);
from __future__ import division
import math
#Leff=Voc/E
Leff=8;
E=0.01;
Voc=Leff*E;
print("The voltage induced is %g V"%Voc);
from __future__ import division
import math
#Antenna Bandwidth=Operating Frequency/Q;
Q=30;
f=10*10**6;
f0=f*Q;
c=3*10**8;
lamda=c/f0;
leng=lamda/2;
print("The length of the half wave dipole is %g m"%leng);
from __future__ import division
import math
#part a
c=3*10**8;
f=10**9;
lamda=c/f;
print("The wavelength is %g m"%lamda);
#part b
dl=3*10**-2;
Rrad=80*(math.pi)**2*(dl/lamda)**2;
print("The radiation resistance is %g ohm"%Rrad);
#part c
Gdmax=1.5#Gd=1.5sin^2(theta),where theta=90 for short dipole
n=0.6;
Gp=n*Gdmax;
print("The antenna gain is given by %g"%Gp);
#part d
Ae=1.5*(lamda)**2/(4*(math.pi));
print("The effective aperture is %g m^2"%Ae);
from __future__ import division
import math
#P=k(Ta+Tr)B
Ta=15;
Tr=20;
b=4*10**6;
#part a
k=1.38*10**-23;
Pb=k*(Ta+Tr);
print("The power per unit bandwidth is %g W/hz"%Pb);
#part b
P=Pb*b;
print("The available noise power is %g W"%P);
from __future__ import division
import math
#Q=Fo/delf;
f0=30*10**6;
f=600*10**3;
Q=f0/f;
print("The tuning factor Q is %d"%Q);
from __future__ import division
import math
#part a
c=3*10**8;
frequency=20*10**9;
lamda=c/frequency;
print("The wavelength is %g m"%lamda);
#part b
#Ae=G*(lamda)^2/4*pi
r=0.61;
Aep=(math.pi)*r**2;
print("The effective physical aperture is %g m^2"%Aep);
Ae=0.55*Aep;
Ga=(Ae*4*(math.pi))/(lamda)**2;
Gdb=10*math.log10(Ga);
print("The antenna gain is %g"%Ga);
print("The antenna gain in db is %g db"%Gdb);
from __future__ import division
import math
f=30*10**6;
c=3*10**8;
lamda=c/f;
leng=lamda/2;
print("The length of half wave dipole is %d m"%leng);
from __future__ import division
import math
Rrad=72;
Rloss=8;
Gp=16;
n=Rrad/(Rrad+Rloss);
print("The radiation efficiency is %g"%n);
Gp=16;
Gd=Gp/n;
Gddb=10*math.log10(Gd);
print("The directive gain is %g"%Gd);
print("The directive gain in db is %g db"%Gddb);
from __future__ import division
import math
Gt=1.5;
Gr=1.5;
d=10;
Pt=15;
f=10**9;
c=3*10**8;
lamda=c/f;
Pr=Pt*Gt*Gr*(lamda/(4*(math.pi)*d))**2;
print("The radiated power is %g W"%Pr);
from __future__ import division
import math
f=2*10**9;
c=3*10**8;
lamda=c/f;
print("The wavelngth is %g m"%lamda);
#part b
Pr=10**-12;
Gt=200;
Gr=200;
d=3*10**6;
Pt=((4*(math.pi)*d)/lamda)**2*(Pr/(Gt*Gr));
print("The transmitted power is %g W"%Pt);
from __future__ import division
import math
#part a
c=3*10**8;
f=100*10**6;
lamda=c/f;
print("The wavelength is %d m"%lamda);
#part b
Gt=15.8489#antilog(12/10)
Pt=10**-1;
Pr=10**-9;
d=384.4*10**6;#238857*1609.35
Gr=(((4*(math.pi)*d)/lamda)**2*Pr)/(Pt*Gt);
print("The gain of receiver is %g"%Gr);
Grdb=10*math.log10(Gr);
print("The gain of receiver in db is %g db"%Grdb);
from __future__ import division
import math
Q=15;
lamda=1;
c=3*10**8;
f0=c/lamda;
Bw=f0/Q;
print("The bandwidth of antenna is %e Hz"%Bw);
from __future__ import division
import math
#Aemax=Gdmax*lamda^2/4*pi;
Aemax=0.13;#assume lamda=1 for half wave dipole
Gdmax=4*(math.pi)*Aemax;
print("The maximum directive gain is %g"%Gdmax);
Gdmaxdb=10*math.log10(Gdmax);
print("The maximum directive gian in db is %g db"%Gdmaxdb);
from __future__ import division
import math
Rloss=1;
Ra=73;
Im=14.166*10**-3;#on applying kvl
Prad=(Im/math.sqrt(2))**2*(Rloss+Ra);
print("The radiated power is %g W"%Prad);
from __future__ import division
import math
#Etheta=n0Im/2pir*cos(pi/2 cos(theta)/sin(theta))
Pin=100;
n=0.5;
r=500;
Prad=n*Pin;
print("The radiated power is %g W"%Prad);
Rrad=73;#for half wave dipole
Im=math.sqrt((2*Prad)/Rrad);
n0=120*(math.pi);
Etheta=(math.cos((math.pi/2)*math.cos(math.pi/3))/math.sin(math.pi/3))*n0*(Im/(2*(math.pi)*r));
print("The electric field is given by %g V/m"%Etheta);
Pavg=(0.5*(Etheta)**2)/(n0);
print("The average power is %g W"%Pavg);
from __future__ import division
import math
Pt=15
Aet=2.5;
Aer=0.5;
d=15*10**3;
f=5*10**9;
c=3*10**8;
lamda=c/f;
Pr=(Pt*Aet*Aer)/((d)**2*(lamda)**2);
print("The radiated power is %g W"%Pr);
from __future__ import division
import math
n=10;
d=0.25;
lamda=1;#assume
Gdmax=4*((n*d)/lamda);
print("The maximum directive gain is %g"%Gdmax);
Gdmaxdb=10*math.log10(Gdmax);
print("The maximum directive gain in db is %g db"%Gdmaxdb);
from __future__ import division
import math
Rrad=65;
Rloss=10;
n=Rrad/(Rrad+Rloss);
print("The radiation efficiency is %g"%n);
from __future__ import division
import math
#Aem=Gdmax*lamda^2/4*pi;
Gdmax=1.5;#for half wave dipole
f=10**9;
c=3*10**8;
lamda=c/f;
Aem=(Gdmax*(lamda)**2)/(4*(math.pi));
print("The effective aperture is %g m^2"%Aem);
from __future__ import division
import math
Pdes=3*10**3;
Popp=500;
FBR=Pdes/Popp;
print("The front to back ratio is %d"%FBR);
from __future__ import division
import math
dl=1/50;
Rr=80*(math.pi)**2*(dl)**2;
print("The radiation resistance is %g ohm"%Rr);