You are on page 1of 6

Principles of antennas theory

and design
MATLAB Assignment
Part 1: Radiation resistance calculation
%% Radiation resistance calculation
f0 = 1.5e9; % Frequency in Hz (1 GHz to 3 GHz)
c = 3e8;
L = c / f0 / 2; % Length of dipole in meters (L/2)
% Calculate radiation resistance for each frequency
Rr = (80 * pi^2 / 3) * (L^2);
fprintf('Radiation Resistance (Rr): %.2f ohms\n', Rr);

Answer:-
Radiation Resistance (Rr): 2.63 ohms.
Here we obtained Rr = 2.63 ohm calculated from matlab and code is
attached above.
Part-2
Radiation resistance vs kL plot is plotted using the MATLAB below, the
code and corresponding plot is attached in below slide.
Part 2: Rrad vs kL
• %% Radiation Resistance vs kL
• f_min=0.5*f0;
• f_max=2*f0;
• frequencies = linspace(f_min, f_max,
1000);
• wavelengths = c ./ frequencies;
• kL = pi * L ./ wavelengths;
• Rr = (80 * pi^2 / 3) * (kL.^2);
• figure(1);
• plot(kL, Rr);
• xlabel('kL');
• ylabel('Radiation Resistance');
• title('Radiation Resistance vs. kL ');
Part 3
Dipole gain pattern versus azimuth azimuth angle plot is plotted using
matlab and corresponding code and matlab graph attached below.
Part 3: Dipole gain pattern vs azimuth angle
%%Diple gain pattern vs azimuth angle
c = 3e8;
f0 = 1.5e9;
theta = linspace(0, 2*pi, 360);
frequencies = [0.5*f0, f0, 2*f0];
wavelengths = c ./ frequencies;
gain_patterns = zeros(length(frequencies), length(theta));
for i = 1:length(frequencies)
k = 2 * pi / wavelengths(i); % Wave number
gain_patterns(i, :) = (cos(k * L * cos(theta)) - cos(k *
L)) ./ (sin(theta));
end
gain_patterns = 20 * log10(abs(gain_patterns) /
max(abs(gain_patterns(:))));
figure;
polarplot(theta, gain_patterns(1, :), 'r', 'DisplayName',
'0.5f0');
hold on;
polarplot(theta, gain_patterns(2, :), 'g', 'DisplayName', 'f0');
polarplot(theta, gain_patterns(3, :), 'b', 'DisplayName', '2f0');
title('Dipole Gain Pattern vs Azimuth angle');
legend;

You might also like