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:
- Lower signal to baseband
- For the receiving part of the n'th PRI, store the data in the n'th row of a matrix.
- For each row, Cross-correlate it with the transmitted signal
- DFT each column
- 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