rogotad
Newbie level 1
Hi everyone
I'm trying to calculate the array factor of a very simple uniform equispaced lienar broadside array both via the classical formula, and via FFT, following what is stated in Antenna arrays: a computational approach, page 67
However, I cannot achieve a correct match, the two functions are similar but different. I think the classical function is correct, because there is a clear enlargement of the lobes as the endfire direction is approached, as expected, while the FFt function has uniform lobes.
I attach my matlab code
Please let me know what I'm doing wrong
Thank you
I'm trying to calculate the array factor of a very simple uniform equispaced lienar broadside array both via the classical formula, and via FFT, following what is stated in Antenna arrays: a computational approach, page 67
However, I cannot achieve a correct match, the two functions are similar but different. I think the classical function is correct, because there is a clear enlargement of the lobes as the endfire direction is approached, as expected, while the FFt function has uniform lobes.
I attach my matlab code
Code:
Nelements =17;
Npoints = 1024;
Ntheta = Npoints;
thetalimit = 90;
theta_deg = linspace(-thetalimit,thetalimit,Ntheta);
theta= pi*theta_deg/180;
% Uniform linear broadside equispaced array
d = 0.5; % in wavelengths
Start = ones(1,Nelements); %uniform excitation, 0 phase
AF = zeros(size(theta));
a = abs(Start);
phi = angle(Start);
%Classical Array Factor
for n = 1:Nelements
AF = AF + a(n) * exp(1j * phi(n)) * exp(1j * n * 2 * pi * d * sin(theta));
end
%AF = AF / max(abs(AF));
%--------------------------------------------------------------------------
% FFT Array Factor
AF_FFT = fftshift(fft(Start,Npoints));
figure
hold on;
plot(theta,20*log10(abs(AF)),'Color','r','LineWidth',2);
plot(theta,20*log10(abs(AF_FFT)),'Color','b','LineWidth',1);
Please let me know what I'm doing wrong
Thank you
Last edited: