Radiation pattern plot of a linear array using array factor.
조회 수: 36 (최근 30일)
이전 댓글 표시
I want to plot a rectangular cartesion coordinates plot of radiation pattern of a uniform linear array using its array factor formula but it does not give me the exact plot kindly help
below is my code
clc;clear all;
lambda=0.03;
An = 1;
d=0.5*lambda;
k=(2*pi)/lambda;
N=30;
j = sqrt(-1);
AF = zeros(1,360);
for theta=1:360
deg2rad(theta) = (theta*pi)/180;
for n=0:N-1
for beta=1:2*pi
AF(theta)= AF(theta)+An*exp(j*k*N*d*cos(theta)+beta);%%% ARRAY FACTOR
end
end
AF(theta)=abs(AF(theta));
y=10*log(AF(theta))%% FOR DB SCALE
end
plot(theta,AF)
댓글 수: 0
답변 (2개)
Jaswanth
2024년 7월 24일
Hi,
It seems there are a few issues in your code that need to be addressed to correctly plot the radiation pattern of a uniform linear array. The main problems include the use of ‘theta’ as both an index and an angle in degrees, which might lead to errors.
Please refer to the following revised code to plot the radiation pattern of a uniform linear array:
clc;
clear all;
lambda = 0.03;
An = 1;
d = 0.5 * lambda;
k = (2 * pi) / lambda;
N = 30;
j = sqrt(-1);
AF = zeros(1, 360);
theta_deg = 1:360;
for theta = theta_deg
theta_rad = (theta * pi) / 180;
for n = 0:N-1
AF(theta) = AF(theta) + An * exp(j * k * n * d * cos(theta_rad));
end
AF(theta) = abs(AF(theta));
end
AF_dB = 10 * log10(AF);
figure;
plot(theta_deg, AF_dB);
xlabel('Angle (degrees)');
ylabel('Array Factor (dB)');
title('Radiation Pattern of Uniform Linear Array');
grid on;
The revised code ensures that the angle conversion from degrees to radians is handled properly with ‘theta_rad’. The loop over n correctly sums the exponential terms for the array factor, and the decibel conversion is accurately done using ‘10 * log10(AF)’ instead of ‘10 * log(AF(theta))’. The plot is created after the loop, using ‘theta_deg’ for the x-axis and ‘AF_dB’ for the y-axis, which gives you the correct rectangular Cartesian coordinates plot of the radiation pattern.
I hope the information provided above is helpful.
댓글 수: 0
ashika asara
2024년 8월 22일
N element of uniform linear arry code plz
% Parameters
n = 8; % Number of elements in the array
d = 0.5; % Element spacing in terms of wavelength (lambda)
beta = 0; % Phase difference between elements (in radians)
theta = linspace(-pi, pi, 1000); % Angle variable from -pi to pi
% Array factor calculation
AF = abs(sin(n * pi * d * sin(theta)) ./ sin(pi * d * sin(theta)));
% Normalizing the array factor
AF = AF / max(AF);
% Plotting the radiation pattern in linear scale
figure;
polarplot(theta, AF);
title(['Radiation Pattern of ', num2str(n), '-Element Uniform Linear Array']);
set(gca, 'ThetaZeroLocation', 'top');
set(gca, 'ThetaDir', 'clockwise');
% Plotting the radiation pattern in dB scale
figure;
plot(rad2deg(theta), 20*log10(AF));
title(['Radiation Pattern of ', num2str(n), '-Element Uniform Linear Array (dB)']);
xlabel('Angle (degrees)');
ylabel('Array Factor (dB)');
grid on;
axis([-90 90 -60 0]);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!