Borrar filtros
Borrar filtros

Radiation pattern plot of a linear array using array factor.

21 visualizaciones (últimos 30 días)
fareeha khan
fareeha khan el 29 de Abr. de 2021
Respondida: Jaswanth el 24 de Jul. de 2024 a las 10:24
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)

Respuestas (1)

Jaswanth
Jaswanth el 24 de Jul. de 2024 a las 10: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.

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by