Creating range velocity/doppler plots with DB scan

34 views (last 30 days)
Robert on 16 Dec 2023
Answered: Abhimenyu on 31 Jan 2024
I am trying to create a range doppler plot with a set of 6 CPIs that were provided. Anyway, I need this to design a disambiguation that will return the list of target(s) together with their ranges and velocities. The CPIs are maximum 1000 by 64 (various sizes). I figured out how to get a CFAR, but I am stuck on getting to the range doppler plot.
filterwindow = hamming(64)
filterwindow = 64×1
0.0800 0.0823 0.0891 0.1004 0.1161 0.1360 0.1599 0.1876 0.2188 0.2532
k = 0.0039
k=(-1/16)^2
cfar = [sqrt(k) sqrt(k) sqrt(k) sqrt(k) sqrt(k);
sqrt(k) 0 0 0 sqrt(k);
sqrt(k) 0 1/k 0 -1/16;
sqrt(k) 0 0 0 sqrt(k);
sqrt(k) sqrt(k) sqrt(k) sqrt(k) sqrt(k)];
A = conv2(CPI1,cfar,'valid');
Unrecognized function or variable 'CPI1'.
B = conv2(CPI2,cfar,'valid');
C = conv2(CPI3,cfar,'valid');
D = conv2(CPI4,cfar,'valid');
E = conv2(CPI5,cfar,'valid');
F = conv2(CPI6,cfar,'valid');
clusterer = clusterDBSCAN('MinNumPoints',3,'Epsilon',2, ...
'EnableDisambiguation',true,'AmbiguousDimension',[60 99]);
figure(1)
imagesc(A);
figure(2)
imagesc(B)
figure(3)
imagesc(C)
figure(4)
imagesc(D)
figure(5)
imagesc(E)
figure(6)
imagesc(F)

Abhimenyu on 31 Jan 2024
Hi Robert,
I understand that you want to create a range doppler plot using the "Coherent processing intervals (CPIs)". To create the plot, the CPI data should be processed using a 2D "Fast Fourier Transform (FFT)". This will transform the time-domain data into the frequency domain, which will allow to analyze the range and velocity (Doppler) information of targets.
Please follow the below mentioned steps to create the range-doppler plot using the CPI data:
• Pre-processing: Apply a window function to each CPI to reduce spectral leakage improve the resolution of the plot. This is typically done along both the range and Doppler dimensions.
% Given data
filterwindow = hamming(64);
k = (-1/16)^2;
cfar = [sqrt(k) sqrt(k) sqrt(k) sqrt(k) sqrt(k);
sqrt(k) 0 0 0 sqrt(k);
sqrt(k) 0 1/k 0 -1/16;
sqrt(k) 0 0 0 sqrt(k);
sqrt(k) sqrt(k) sqrt(k) sqrt(k) sqrt(k)];
% Assuming you have six CPIs (CPI1 to CPI6) with varying sizes
% Example data creation (replace this with your actual data)
CPI1 = rand(1000, 64);
CPI2 = rand(1000, 64);
CPI3 = rand(1000, 64);
CPI4 = rand(1000, 64);
CPI5 = rand(1000, 64);
CPI6 = rand(1000, 64);
% Applying the Hamming window along both dimensions
rangeWindow = hamming(size(CPI1, 1));
dopplerWindow = hamming(size(CPI1, 2));
windowedCPI = (CPI1 .* rangeWindow) .* dopplerWindow';
• 2D FFT: Perform a 2D FFT on the pre-processed CPI data to transform it into the frequency domain, obtaining the Range-Doppler matrix.
% 2D FFT and shifting the zero-frequency component
fft2dCPI = fft2(windowedCPI);
fft2dCPI_shifted = fftshift(fft2dCPI);
• Post-processing: Apply any additional signal processing techniques, such as “normalizing”. Normalizing the magnitude of the FFT by dividing it by the number of samples can make the plot more consistent and comparable across different data sets.
% Normalizing the magnitude of the FFT
nrows = size(fft2dCPI_shifted, 1); % Number of samples in the range dimension
ncols = size(fft2dCPI_shifted, 2); % Number of samples in the Doppler dimension
magnitudeCPI = abs(fft2dCPI_shifted) / (nrows * ncols); % Normalize by the number of samples
% Converting the magnitude to decibels This can enhance the contrast and visibility of the plot.
magnitudeCPI_db = mag2db(magnitudeCPI); % Convert to decibels
• Visualization: Create the Range-Doppler plot using the magnitude of the Range-Doppler matrix.
% Your code for displaying the Range-Doppler plot
figure;
imagesc(magnitudeCPI_db);
xlabel('Doppler Bin');
ylabel('Range Bin');
title('Range-Doppler Plot');
colorbar; % Optional: Add a colorbar to indicate the magnitude scale
colormap('jet'); % Optional: Use a colormap that enhances contrast
I hope this helps to resolve your query.
Regards,
Abhimenyu

Categories

Find more on Pulsed Waveforms in Help Center and File Exchange

R2023b

Community Treasure Hunt

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

Start Hunting!