How to get beam-doppler plot?
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Currently, I don't have access to the phased array toolbox, so I am manually trying to simulate an airborne radar that I want to use for DOA and velocity estimation. I am not sure how to compute the spatial freq vs doppler freq plot. I have attached my code below. Can someone suggest the next step, and also correct if I have implemented something incorrectly.
for ii=1:G
SOURCE_angles = doa(ii,:); %%% doa is arranged such that odd colms have azimuth angle and even colms have elevation angle
v = v_t(ii,:); %%%target velocity relative to the airborne radar platform
Ax = zeros(Mx, size(M_vec,2)*K);
Ay = zeros(My - 1, size(M_vec,2)*K);
idx = 1;
idy = 1;
for k = 1:2:SOURCE_K
Ax(:, idy:1:size(M_vec,2)*idx) = kron(exp(1i*2*pi*0.5*(0:Mx-1)'*cosd(SOURCE_angles(k))*sind(SOURCE_angles(k+1))),(exp(1i*2*pi*dist*(0:size(M_vec,2)-1)'*(2*v(idx)*fc)/(c*fpr)))');
Ay(:, idy:1:size(M_vec,2)*idx) = kron(exp(1i*2*pi*0.5*(1:My-1)'*sind(SOURCE_angles(k))*sind(SOURCE_angles(k+1))),(exp(1i*2*pi*dist*(0:size(M_vec,2)-1)'*(2*v(idx)*fc)/(c*fpr)))');
idx = idx + 1;
idy = idy + size(M_vec,2);
end
A = [Ax; Ay]; % Steering matrix of all sensors
% The Expected covariance matrix for a angle-pair
Ry_the = A*diag(ones(size(M_vec,2)*K,1))*A' + noise_power*eye(Mx+My-1); %dim: (Mx+My-1) x (Mx+My-1)
% % The Sampled covariance matrix for a angle-pair
S = (randn(size(M_vec,2)*K,p)+1j*randn(size(M_vec,2)*K,p))/sqrt(2); % Random source envelope signal (baseband signal)
% %S = tanh(nonlinear_factor * S);
% %S = sqrt(sVar)*randn(size(M_vec,2)*K, p).*exp(1i*(2*pi*fc*repmat((1:p)/fs, size(M_vec,2)*K, 1)));
X = A*S;
% %noiseCoeff = 1;
Eta = sqrt(noise_power)*(randn(Mx+My-1,p)+1j*randn(Mx+My-1,p))/sqrt(2); % the number of snapshots
% %Eta = sqrt(noiseCoeff)*randn(Mx + My - 1, p);
Y = X + Eta; %STO
Ry_sam = Y*Y'/p;
end
0 Commenti
Risposta accettata
Rahul
il 12 Mag 2025
Modificato: Rahul
il 12 Mag 2025
Hi Subhosri,
I understand that you want to generate a plot between spatial frequency and Doppler frequency for simulating an airborne radar system without using the Phased Array Toolbox.
To achieve the Spatial vs Doppler frequency plot, you can utilize a 2D FFT (Fast Fourier Transform) to extract and visualize the relationships between spatial frequencies and their corresponding Doppler shifts.
In the existing implementation, the ranges for 'Ax' and 'Ay' can lead to overlapping indices and incorrect dimensioning. To ensure proper allocation for each source without overlap and to maintain the intended matrix structure, you can modify the indexing as shown below:
Ax(:, idy:idy + size(M_vec,2) - 1) = kron(...);
Ay(:, idy:idy + size(M_vec,2) - 1) = kron(...);
Further, you can update the loop logic for calculating the azimuth and elevation coefficients to ensure that the columns are filled without unintended overwrites. This change also guarantees that 'Ax' and 'Ay' are dimensionally correct for the covariance matrix multiplication. Here is how you can implement the same in your existing MATLAB script:
for k = 1:2:SOURCE_K
% Azimuth and elevation components for X and Y
Ax(:, idy:idy + size(M_vec,2) - 1) = kron(exp(1i * 2 * pi * 0.5 * (0:Mx-1)' * cosd(SOURCE_angles(k)) * sind(SOURCE_angles(k+1))), ...
(exp(1i * 2 * pi * dist * (0:size(M_vec,2)-1)' * (2 * v(idx) * fc) / (c * fpr)))');
Ay(:, idy:idy + size(M_vec,2) - 1) = kron(exp(1i * 2 * pi * 0.5 * (1:My-1)' * sind(SOURCE_angles(k)) * sind(SOURCE_angles(k+1))), ...
(exp(1i * 2 * pi * dist * (0:size(M_vec,2)-1)' * (2 * v(idx) * fc) / (c * fpr)))');
% Update indices for the next segment
idx = idx + 1;
idy = idy + size(M_vec,2);
end
To visualize the Spatial vs Doppler Frequency, you can add a 2D FFT 'fft2' to the sampled covariance matrix 'Ry_sam' and apply the 'fftshift' function to center the zero-frequency components in the plot for better visualization.
% Compute the 2D FFT of the sampled covariance matrix
F_spatial_doppler = abs(fftshift(fft2(Ry_sam)));
% Generate frequency axes for visualization
spatial_freq = linspace(-0.5, 0.5, size(Ry_sam, 1));
doppler_freq = linspace(-0.5, 0.5, size(Ry_sam, 2));
% Plot the Spatial vs Doppler Frequency
figure;
imagesc(doppler_freq, spatial_freq, 20 * log10(F_spatial_doppler));
xlabel('Doppler Frequency');
ylabel('Spatial Frequency');
title('Spatial Frequency vs Doppler Frequency');
colorbar;
Hope this helps!
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Get Started with Phased Array System Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!