You are on page 1of 2

%interference of line antennas

%3d radiation pattern

clear all

lambda=10; %m
k=2*pi/lambda; %wavenumber
RP=1000;%(m) distance to observation point
C=j*60*pi*exp(-j*k*RP)/RP; %constant

%ANTENNAS POSITIONS
rp=[lambda/8 lambda/8];
phip=[-pi/2 pi/2];
z=[0 0];

%ANTENNAS LENGTHS
L=[lambda/2 lambda/2];

%CURRENT
I0=[1 exp(j*pi/2)];

%RESOLUTION
Rez=100;
theta=linspace(0,pi, Rez);
phi=linspace(0,2*pi, 2*Rez)+eps;
l=L/2; %half-length of antennas

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

AE=zeros(length(theta),length(phi));
XE=zeros(length(theta),length(phi));
YE=zeros(length(theta),length(phi));
ZE=zeros(length(theta),length(phi));

for th=1:length(theta),
for ph=1:length(phi),
E1=C*I0.*exp(j*k*((rp*sin(theta(th)).*cos(phi(ph)-phip)
+z*cos(theta(th))))).*...
(cos(k*l*cos(theta(th))-cos(k*l))/sin(theta(th)));
E=sum(E1); %total field
AE1=abs(E); %amplitude
AE(th,ph)=AE1;
XE1=AE1*sin(theta(th))*cos(phi(ph)); %x amplitude
YE1=AE1*sin(theta(th))*sin(phi(ph)); %y amplitude
ZE1=AE1*cos(theta(th)); %z amplitude
XE(th,ph)=XE1;
YE(th,ph)=YE1;
ZE(th,ph)=ZE1;
end
end

%radiation pattern
X=XE/max(max(AE));
Y=YE/max(max(AE));
Z=ZE/max(max(AE));

figure(1)
surf(X,Y,Z)
axis square
xlabel('E_X')
ylabel('E_Y')
zlabel('E_Z')

You might also like