fmcw radar range doppler
14 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I am trying to plot range-doppler diagram for an fmcw radar. Here is how I generate transmitted,received and video signal;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all;
close all;
clc
c=3e8; %speed of light
fc=8e9; %carrier freq
deltaF=32e6; %sweep freq
T=1e-3; %one period
alph=deltaF/T; %sweep rate
R=500; %initial distance of the target
td=2*R/(c); %initial delay of returned signal
v=2; %speed of the target (give some value between 0 and 10)
D=64; % #of doppler cells OR #of sent periods
N=2^10; %for length of time
t=linspace(0,D*T,D*N); %total time
n=0;
nT=length(t)/D; %length of one period
a=zeros(1,length(t)); %transmitted signal
b=zeros(1,length(t)); %received signal
r_t=zeros(1,length(t));
ta=zeros(1,length(t));
r1=R;
f0=fc;
for i=1:length(t)
r_t(i)=r1+v*t(i); % range of the target in terms of its velocity and initial range
ta(i)=2*r_t(i)/c; % delay for received signal
if i>n*nT && i<=(n+1)*nT % doing this for D of periods (nt length of pulse)
a(i)=sin(2*pi*(f0*t(i)+.5*alph*t(i)^2-alph*t(i)*n*T)); %transmitted signal
b(i)=sin(2*pi*(f0*(t(i)-ta(i))+.5*alph*(t(i)-ta(i))^2-alph*(t(i)-ta(i))*n*T)); %received signal
else
n=n+1
a(i)=sin(2*pi*(f0*t(i)+.5*alph*t(i)^2-alph*t(i)*n*T)); %transmitted signal
b(i)=sin(2*pi*(f0*(t(i)-ta(i))+.5*alph*(t(i)-ta(i))^2-alph*(t(i)-ta(i))*n*T)); %received signal
end
end
mixed1=(a.*b); %video signal OR IF signal (output of mixer)
m1=reshape(mixed1,length(mixed1)/D,D); %generating matrix ---> each row showing range info for one period AND each column showing number of periods
[My,Ny]=size(m1');
win=hamming(Ny);
m2=conj(m1).*(win*ones(1,My)); %taking conjugate and applying window for sidelobe reduction (in time domain)
Win=fft(hamming(My),D);
M2=(fft(m2,2*N)); %First FFT for range information
M3=fftshift(fft(M2',2*D)); %Second FFT for doppler information
[My,Ny]=size(M3);
doppler=linspace(-D,D,My);
range=linspace(-N,N,Ny);
figure;contour(range,doppler,abs(M3));grid on
xlabel('Range')
ylabel('Doppler')
figure;mesh(range,doppler,abs(M3))
xlabel('Range')
ylabel('Doppler')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
There are a few thing I am not sure if I am doing right.
First, while defining the received signal (b) is that the correct way to do it for every period.
Second, I am applying window for the video signal for range sidelobe reduction.
Do I need to do it for doppler sidelobes also?
Third, I am not sure if I am using 'fftshift' function right.
Because when I increase the speed of the target, for example from 0 to 1, peak's position shifts to negative value (below zero).
Forth, how do I define range and doppler resolutions and use them for x and y axis while plotting.
Please give comments and give me some direction.
Thanks!
1 个评论
mk14
2019-2-7
Hi, I am working on the Range-Doppler Plot now. I wonder if you figured out the second question? Do we need to apply windowing in doppler processing?
From the code phased.RangeDopplerResponse, we can find property 'CustomDopplerWindow' default as hamming.
Looking forward to your reply.
Cheers!
回答(5 个)
Tony Azar
2022-5-26
编辑:Tony Azar
2022-5-26
Please refer to Example: "Increasing Angular Resolution with Virtual Arrays" at the link below: https://www.mathworks.com/help/phased/ug/increasing-angular-resolution-with-mimo-radars.html
Since you are not using a Virtual Array, set the weights of the Tx Antenna Elements to:
w0 = [1;1]; % instead of [0;1]
and for your data cube do not re-arrange the data, use the cube as is, that is, use xr and not xrv (see below)
nfft_r = 2^nextpow2(size(xr,1));
nfft_d = 2^nextpow2(size(xr,3));
rngdop = phased.RangeDopplerResponse('PropagationSpeed',c,...
'DopplerOutput','Speed','OperatingFrequency',fc,'SampleRate',fs,...
'RangeMethod','FFT','PRFSource','Property',...
'RangeWindow','Hann','PRF',1/(1*waveform.SweepTime),... % Note this in Bold
'SweepSlope',waveform.SweepBandwidth/waveform.SweepTime,...
'RangeFFTLengthSource','Property','RangeFFTLength',nfft_r,...
'DopplerFFTLengthSource','Property','DopplerFFTLength',nfft_d,...
'DopplerWindow','Hann');
[resp,r,sp] = rngdop(xr);
then implement the rest of code
0 个评论
mohamed al-asklany
2011-12-25
nice i make project in this area but i can not realize the system
0 个评论
Mayank Lakhani
2015-2-17
Hi abdullah,
Code is really nice. Can you send me some paper which you reffered to write the code. Thank you in advance. my email adress is mayankwait4u@gmail.com
0 个评论
Can
2017-7-16
There is not even one thing that works in this code. I wanted to fix it and share it back, but it would take less time to create it from scratch.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!