Clear Filters
Clear Filters

About real time data processing in FMCW RADAR.

13 views (last 30 days)
AtoZ on 18 Feb 2020
Answered: Honglei Chen on 18 Feb 2020
clear all;
clear all;
%read the raw data .wav file here
c = 3E8; % (m/s) speed of light
%radar parameters
Tp = 20E-3; % (s) pulse time
N = Tp*FS; % # of samples per pulse
fstart = 2405E6; % (Hz) LFM start frequency
fstop = 2495E6; % (Hz) LFM stop frequency
BW = fstop-fstart; % (Hz) transmit bandwidth
f = linspace(fstart, fstop, N/2); %instantaneous transmit frequency
%range resolution
rr = c/(2*BW);
max_range = rr*N/2;
%the input appears to be inverted
trig = -1*Y(:,1);
s = -1*Y(:,2);
clear Y;
%parse the data here by triggering off rising edge of sync pulse
count = 0;
thresh = 0;
start = (trig > thresh);
for ii = 100:(size(start,1)-N)
if start(ii) == 1 & mean(start(ii-11:ii-1)) == 0
% start2(ii) =1;
count = count + 1;
sif(count,:) = s(ii:ii+N-1);
time(count) = ii*1/FS;
%subtract the average
ave = mean(sif,1);
for ii =1:size(sif,1);
sif(ii,:) = sif(ii,:)-ave;
zpad = 8*N/2;
%2 pulse cancelor RTI plot
figure (20);
sif2 = sif(2:size(sif,1),:)-sif(1:size(sif,1)-1:);
v = ifft(sif2,zpad,2);
R = linspace(0,max_range,zpad);
for ii = 1:size(S,1)
%S(ii,1) = S(ii,:).*R.^(3/2); %Optional: magnitude scale to range
S = dbv(S(:,1:size(v,2)/2));
m = max(max(S));
imagesc(R,time,S-m,[-80, 0]);
ylabel('time (s)');
xlabel('range (m)');
title('RTI with 2-pulse cancelor clutter rejection');
Hi everyone.
I used windows recorder to record .wav file for doing ranging radar experiment.
I used above code for processing .wav file to ranging radar.
however I wanna making real-time FMCW radar.
so how can I modify the above matlab code?
I think that I have to get an real-time wave data from antenna.
I'll wait anyone's greatful help.

Answers (1)

Honglei Chen
Honglei Chen on 18 Feb 2020
You may want to take a look at this example to get some idea on how to process real time data.

Community Treasure Hunt

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

Start Hunting!