Search This Blog

3-D radiation Pattern of a Dipole Antenna with code




%This program plots 3-D radiation Pattern of a Dipole Antenna

%All the parameters are entered in the M-File

clear all

%Defining variables in spherical coordinates

theta=[0:0.12:2*pi];%theta vector

phi=[0:0.12:2*pi];%phi vector

l_lamda1=1/100;% length of antenna in terms of wavelengths

I0=1;% max current in antenna structure

n=120*pi;%eta

 

% evaluating radiation intensity(U)

U1=( n*( I0^2 )*( ( cos(l_lamda1*cos(theta-(pi/2))/2) - cos(l_lamda1/2) )./ sin(theta-(pi/2)) ).^2 )/(8*(pi)^2);

%converting to dB scale

U1_1=10*log10(U1);

%normalizing in order to make U vector positive

min1=min(U1_1);

U=U1_1-min1;

 

% expanding theta to span entire space

U(1,1)=0;

for n=1:length(phi)

    theta(n,:)=theta(1,:);

end

% expanding phi to span entire space

phi=phi';

for m=1:length(phi)

    phi(:,m)=phi(:,1);

end

 

% expanding U to span entire space

for k=1:length(U)

    U(k,:)=U(1,:);

end

 

% converting to spherical coordinates

[x,y,z]=sph2cart(phi,theta,U);

%plotting routine

surf(x,y,z)

colormap(copper)

title('Radition Pattern for Dipole Antenna (length=1.5lamda)')

xlabel('x-axis--->')

ylabel('y-axis--->')

zlabel('z-axis--->')

 


Join us on Telegram: https://t.me/matlabcastor

No comments

MATLAB