In: Electrical Engineering
By using MATLAB software:
Exercise 2: Generate radiation pattern for a dipole as its length varies.
% M-File: ML0803
%
% Dipole antenna movie shows radiation
% pattern as dipole length grows from 0.1
% lambda to 2.1 lambda.
%
% Variables
% L dipole length (in wavelengths)
% bL2 phase constant * length/2
% N number of theta points
% th,thr angle theta in degrees,radians
% num,den temporary variables
% F un-normalized power function
clc %clears the command window
clear %clears variables
% Initialize variables
N=360;
th=1:1:N;
thr=th*pi./180;
% Generate Reference Frame
L=0.1;
polar(0,6); %sets scale for polar plot
T=num2str(L);
S=strvcat('Length',T,'wavelengths');
text(6,6,S)
axis manual
title('Linear Antenna Radiation Pattern')
hold on
pause
% Make the Movie
L=0.1:0.02:2.1;
for n=1:100
polar(0,6)
axis manual
title('Linear Antenna Radiation Pattern')
T=num2str(L(n));
S=strvcat('Length',T,'wavelengths');
text(6,6,S)
hold on
num=cos(pi*L(n)*cos(thr))-cos(pi*L(n));
den=sin(thr);
F=(num./den).^2;
polar(thr,F)
hold off
M(:,1)=getframe;
end
Question 2: Run this program for different choices of dipole length.
The code for this problem is already given above.
MATLAB Code ==>
% Dipole antenna movie shows radiation
% pattern as dipole length grows from 0.1
% lambda to 2.1 lambda.
%
% Variables
% L dipole length (in wavelengths)
% bL2 phase constant * length/2
% N number of theta points
% th,thr angle theta in degrees,radians
% num,den temporary variables
% F un-normalized power function
clc %clears the command window
clear %clears variables
% Initialize variables
N=360;
th=1:1:N;
thr=th*pi./180;
% Generate Reference Frame
L=0.1;
polar(0,6); %sets scale for polar plot
T=num2str(L);
S=strvcat('Length',T,'wavelengths');
text(6,6,S)
axis manual
title('Linear Antenna Radiation Pattern')
hold on
pause
% Make the Movie
L=0.1:0.02:2.1;
for n=1:1
polar(0,6)
axis manual
title('Linear Antenna Radiation Pattern')
T=num2str(L(n));
S=strvcat('Length',T,'wavelengths');
text(6,6,S)
hold on
num=cos(pi*L(n)*cos(thr))-cos(pi*L(n));
den=sin(thr);
F=(num./den).^2;
polar(thr,F)
hold off
M(:,1)=getframe;
end
RESULTS ==>
Its result is an animation. I am sending you the snapshots below ==>
NOTE - If you have any issue with the solution, then please ask me in the comments.