I have created a 2D matrix with L as the number of samples and K as the number of chirps. Now I am trying to plot the Range-Doppler response which doesn't correspond to the correct range and velocity values defined in the parameters.

The formula to calculate the 2D matrix is correct because it's taken from one of the research papers. SPATIAL-DOMAIN INTERFERENCE MITIGATION FOR SLOW-TIME MIMO-FMCW AUTOMOTIVE RADAR

I have used fft2 as the command to plot the response. What am I doing wrong here? Is it in the defined parameters or in the fft2 calculation?

fc = 77e9; c = 3e8; lambda = c/fc;
fs = 150e6; delta_t = 1/fs;

range_res = 1;
chirpBW = c/(2*range_res);
Tc = 30e-6 ;
chirpslope = chirpBW/Tc;

max_vel = 250;
max_rng = 200;

TPRI = 0:1/fs:50e-6;
y = find(TPRI == Tc);
x = find(~TPRI);
Tchirp = TPRI(x):1/fs:TPRI(y)-1/fs;

%% delay parameters
tgt_rng = 100;tgt_vel = 50;
delay = 2*tgt_rng/c;

%% alpha_tau_prime
alpha_tau_prime =  exp(-1i*2*pi*fc.*delay).*exp(1i*pi*chirpslope*(delay.^2));

%% Range freq / Fast time
f_range = (chirpslope*delay + 2*tgt_vel/lambda)*delta_t;

%% Doppler freq / Slow time
f_dopp = 2*fc*TPRI*tgt_vel/c;

K = 2;
L = length(Tchirp);
k_set = 0:K-1;
a_n_s = zeros(L,K);
for k_idx = 1:length(k_set)
   k = k_set(k_idx);
   l_set = 0:L-1;
     for l_idx = 1:length(l_set)
          l = l_set(l_idx);
          sum_M_antenna = exp(-1j*2*pi*f_dopp*k); % for one antenna and ignoring angles of departure and arrival

[My,Mz] = size(a_n_s);

% 2D FFT to perform range and Doppler compression (i.e. form the RDM)
nfft = 2^nextpow2(My);
nfft2 = 2^nextpow2(Mz);
rdm = fftshift(fft2(a_n_s,nfft,nfft2));

% RDM axes
rangeBinAxis = (0:L-1).*c/(2*chirpBW);
dopplerBinSize = (1/Tc)/K;
velocityBinAxis = (-K/2:K/2-1).*dopplerBinSize*lambda/2;
ylabel("Range (m)");
xlabel("Velocity (m/s)");

[![2D Range Doppler Response][1]][1]

[1]: https://i.sstatic.net/jCzzh.jpg
  • 1
    $\begingroup$ There may be other sources of error, but, if one builds a chirp sweeping frequency yet not enough samples allowed at each frequency value, the frequency sweep is too fast, and the resulting signal ends up hitting one or a few time samples at the same or almost same amplitude value THUS the signal looks flat in frequency, despite sweeping signal f, which is what I see in the resulting waterfall generated by your script but that it is not pasted/visible in your question. $\endgroup$ Commented Nov 27, 2022 at 10:08


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.