planar array FFT DOA

7 visualizzazioni (ultimi 30 giorni)
종영
종영 il 3 Dic 2024
Commentato: Sameer il 6 Dic 2024
clc; clear all; close all;
f = 3e8;
c = 3e8;
lambda = c/f;
dx = 0.5*lambda;
N = 40;
theta = [0];
d = lambda / 2;
Ri = ones(1,length(theta));
beta = 2*pi/lambda;
%%
pos_ULA = (-(N-1)/2:(N-1)/2)*d;
phase_delay_ULA = beta*pos_ULA'*sind(theta);
v_ULA = exp(1j*beta*pos_ULA'*sind(theta));
v_ULA1 = sum(v_ULA,2);
v_ULA2 = abs(v_ULA1/max(v_ULA1));
%%
F_first = [v_ULA2];
v_zero= [F_first ;zeros(2^15-length(F_first),1)].';
v_fft = fft(v_zero);
v_fft = v_fft/max(v_fft);
v_fftshift = abs(fftshift(v_fft));
figure(2)
t = linspace(-pi,pi,length(v_fftshift));
plot(t,20*log10((v_fftshift)),'LineWidth',1.4);
hold on
ylim([-40 0])
xlim([-1*beta*dx,1*beta*dx])
grid on
In the linear array situation, when one theta was given as in the above code, the signal source could be FFTed to the device for this situation to indicate a beam pattern.
Similarly, I want to proceed with the same method in the planar array, but I want to show theta value on the x-axis and phi value on the y-axis. There is no way to do this planar array through FFT anywhere.
Non - Using Scan!!!!!!!!!!!!!!!!!!!!
I think I'm using FFT2 but I don't know what to do...

Risposta accettata

Sameer
Sameer il 3 Dic 2024
Modificato: Sameer il 3 Dic 2024
To extend your linear array code to a planar array and visualize the beam pattern using FFT2, you need to consider both "azimuth (theta)" and "elevation (phi)" angles. Here's how you can do it:
  • Use a grid for the array elements in both x and y directions.
  • Compute the phase delay for each element in the grid based on both 'theta' and 'phi'.
  • Apply 2D FFT to the array factor to get the beam pattern.
Here's a sample code:
clc; clear all; close all;
f = 3e8;
c = 3e8;
lambda = c/f;
dx = 0.5*lambda;
dy = 0.5*lambda;
Nx = 20; % Number of elements in x-direction
Ny = 20; % Number of elements in y-direction
theta = linspace(-90, 90, 180); % Azimuth angles
phi = linspace(-90, 90, 180); % Elevation angles
beta = 2*pi/lambda;
% Define positions of elements in the planar array
pos_x = (-(Nx-1)/2:(Nx-1)/2)*dx;
pos_y = (-(Ny-1)/2:(Ny-1)/2)*dy;
[pos_X, pos_Y] = meshgrid(pos_x, pos_y);
% Calculate the array factor
AF = zeros(length(phi), length(theta));
for p = 1:length(phi)
for t = 1:length(theta)
phase_delay = beta * (pos_X * sind(theta(t)) + pos_Y * sind(phi(p)));
AF(p, t) = sum(sum(exp(1j * phase_delay)));
end
end
% Normalize and compute FFT2
AF_normalized = abs(AF) / max(max(abs(AF)));
AF_fft = fft2(AF_normalized, 2^10, 2^10);
AF_fftshift = fftshift(AF_fft);
AF_dB = 20*log10(abs(AF_fftshift) / max(max(abs(AF_fftshift))));
% Plot the beam pattern
figure;
imagesc(theta, phi, AF_dB);
xlabel('Theta (degrees)');
ylabel('Phi (degrees)');
title('Beam Pattern of Planar Array');
colorbar;
caxis([-40 0]);
axis xy;
  2 Commenti
종영
종영 il 3 Dic 2024
Thank you for your reply.
1.Can we also represent the z-axis as an amplitude of the FFT result?
2.Is this method similar to the existing scan method?
3. I want AF to come out like 20X20 or 20X1,20X1 in terms of the device value, not theta value like 1D, but is there no way in 2D?
Sameer
Sameer il 6 Dic 2024
1. Yes, the z-axis can represent the amplitude of the FFT result. In a 3D plot, the x and y axes typically represent frequency components, while the z-axis shows the amplitude or magnitude of those components.
2. It is similar to scanning methods like beamforming, where you analyze the frequency components to understand the signal's characteristics. Both methods can be used to extract spatial or frequency information from data.
3. To achieve a 2D array factor representation like 20x20, you can perform a 2D FFT. This involves taking the FFT across two dimensions of your data, which can be useful for analyzing spatial frequency components in two directions. If you want a 20x1 or 1x20 representation, you can perform a 1D FFT along one dimension and repeat or reshape the data as needed.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Sparse Matrices in Help Center e File Exchange

Prodotti


Release

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by