# Doppler Map for a beginner pulsed radar

I have been assigned to simulate a Pulsed radar with Chirps hitting a moving target and then analyzing the data to create a Doppler-Range map.

Im having trouble completing some of the "algorithm's" steps(listed below):

• When correlating the signals using xcor(code below) the output signal is greater then the Matrix column size. What portion of that information is needed?

• For some reason the DFT of a column results in mainly 0 frequency.. (Picture below)

• Also, after correlating, How do I construct the map?

Algorithm:

1. Lower signal to baseband
2. For the receiving part of the n'th PRI, store the data in the n'th row of a matrix.
3. For each row, Cross-correlate it with the transmitted signal
4. DFT each column
5. Plot the doppler map

code:

%parameters
PRI=5*10^-6;
Pw=2*10^-6; %chirp time-width
CPI=0.5*10^-3 ;
B=100*10^6;
fc=40*10^9;
PRF=1/PRI; %pulses repetition freq

N=100;  %number of PRI total
Fs=10*B; %sampling freq
dt=1/Fs;
t=0:dt:(N*PRI-dt); %complete time axis

c=3*10^8;
R_t=400+100*(t);  % moving object
tau=2*R_t/c;  %delay of signal

M_RX=zeros([N samples]);  %Matrix Of signal receiving (R_X)
chirp=@(t)    ((0<(t)) & (t<(Pw))).*exp(1i*pi*(t-0.5*Pw).^2*B/Pw).*exp(1i*2*pi*fc*t);

for n = 0:1:(N-1)

recv_sig = h_t(t-n*PRI-tau) .* exp(-1i*2*pi*fc*(t-n*PRI-tau)); %downsample+delay

lower_b=(Pw+n*PRI)/dt;
upper_b=ceil((n+1)*PRI/dt-1);
%since recv_sig spans the whole time line, take only the receiving time
%window for the current PRI:
M_RX(n+1,:)= recv_sig( lower_b : upper_b );

tmp2=chirp(t-n*PRI); % the original transmitted signal
[x2, lags2]=xcorr( recv_sig, tmp2);
end


Edit: DFT of column and Doppler map

• I haven't had a chance to run your code, but what in that list of items do you need help with? All of them? Jan 7, 2023 at 23:39
• @Envidia I've edited the post a bit to bullet the issues, right now I'm having 2 problems: 1) the cross-correlation step produces a vector bigger than the row size of the receiving signal matrix, what should I do? 2) Even after completing the steps, how do I plot the map? Do I just use imagesc with abs value of the matrix? Jan 8, 2023 at 7:54

When correlating the signals using xcor(code below) the output signal is greater then the Matrix column size. What portion of that information is needed?

This is because the default parameters of xcorr give you the full cross-correlation, which includes both negative and positive lags. This is the same thing you see when doing a convolution. In a real system, we can only observe positive lags. Thus, half of the result is not usable to you and can be discarded.

In your case, simply take the positive lag values that accommodate your desired range interval (which is established by your PRI, sample rate, etc.).

Also, after correlating, How do I construct the map?

When you say "construct", I think of the processing needed to calculate the map. This involves performing the matched-filtering and taking the Doppler DFT. What you're asking is how to display the map, and the way you proposed is one way.

I personally use surf with the shading flat option and set it to a view using view(0, -90). I like this because I want to see the raw data values, without having to contend with the RGB and index related information produced by imagesc's figure. Typically for display you want to show the power values of your data using a logarithmic scale, so you would plot the 20*log10 values.

• Thank you this really helps a lot! since I correlate with a complex signal, the correlation result of interest would be the abs value ? also, do I need to normalize the result from the xcorr? or just leave it as is? and last question: to DFT the columns should I just fft(M)? or there need to be a fftshift(fft(M))? Thanks in advance!!!! Jan 9, 2023 at 7:21
• Also for some reason, when I DFT the columns, the main frequency I get is 0... am I missing something? Added a picture below the code Jan 9, 2023 at 8:07
• @ItayKatsnelson You don't necessarily have to normalize, but that is up to you. In radar applications you're usually concerned with signal-to-noise ratios, and the absolute values don't really matter. When viewing the map, fftshift is optional and based on your preference. I personally like having DC in the middle. Jan 10, 2023 at 19:12
• ive managed to create the map, but im stuggeling to understand how using FFT on the slow-time will yield the doppler frequency. because the frequency shift that the signal receives exists in the fast time - so how does slow time FFT can even detect that? Jan 14, 2023 at 16:41
• @ItayKatsnelson Doppler exists in slow-time as well. Each pulse is a sample of the target's velocity, and that is at the PRF. This is why we say that the PRF must be able to sample Doppler. This sampling is less than ideal given that the samples themselves are pulses, phase discontinuities, etc. However, a good measurement can still be made with the added bonus of achieving the integration gain via the Doppler DFT. Jan 31, 2023 at 4:52