MATLAB雷达数据处理:脉冲压缩,相干积累,MTI,CFAR详解 雷达信号处理雷达数据仿真 动目标检测 脉压 恒虚警率 字号 订阅
% Thanks to M. A. Richards for providing the code.
clear, hold off
format compact
J = sqrt(-1);
close all
% Get root file name for reading results
file=input('Enter root file name for data file: ','s');投入产出模型>邵晓萌
eval(['load ',file,'.mat'])
fprintf('\nPulse length = %g microseconds\n',T/1e-6)
顾漫论坛
fprintf('Chirp bandwidth = %g Mhz\n',W/1e6)
fprintf('Sampling rate = %g Msamples/sec\n',fs/1e6)
figure
plot((1e6/fs)*(0:length(s)-1),[real(s) imag(s)])
title('Real and Imaginary Parts of Chirp Pulse')
xlabel('time (usec)')
ylabel('amplitude')
grid
PRI = 1/PRF;
fprintf('\nWe are simulating %g pulses at an RF of %g GHz',Np,fc/1e9)
外文文献数据库
fprintf('\nand a PRF of %g kHz, giving a PRI of %g usec.',PRF/1e3,PRI/1e-6)
fprintf('\nThe range window limits are %g to %g usec.\n', ...
T_out(1)/1e-6,T_out(2)/1e-6)
% Compute unambiguous Doppler interval in m/sec
% Compute unambiguous range interval in meters
vua = 3e8*PRF/(2*fc);
rmin = 3e8*T_out(1)/2;
rmax = 3e8*T_out(2)/2;
rwin = rmax-rmin;
rua = 3e8/2/PRF;
fprintf('\nThe unambiguous velocity interval is %g m/s.',vua)
fprintf('\nThe range window starts at %g km.',rmin/1e3)
fprintf('\nThe range window ends at %g km.',rmax/1e3)
fprintf('\nThe sampled range window is %g km long.',rwin/1e3)
fprintf('\nThe unambiguous range interval is %g km.\n\n',rua/1e3)
% Convert range samples to absolute range units.
[My,Ny]=size(y);
range=(3e8/2)*((0:My-1)*(1/fs) + T_out(1))/1e3; % T_out(1) 是接收窗的起始时刻,即range从多远的距离开始观测 pulse = (1:Ny);
b7125% Force oversize FFT, and compute doppler scale factor
Lfft = 2^(nextpow2(Ny)+3); % Lfft是慢时间上FFT的点数
doppler = (((0:Lfft-1)/Lfft)-0.5)*vua; %此处的 doppler表征的是速度,不是fd = 2v / lambda
这个定义式
fprintf('\nThe Doppler increment is %g Hz.',PRF/Lfft)
fprintf('\nThe velocity increment is %g m/s.',3e8*PRF/Lfft/2/fc)
% Start with a few plots to examine the data
% plot power of raw data in dB
ydB=db(abs(y)/max(max(abs(y))),'voltage');
figure
mesh(pulse,range,ydB)
title('FAST-TIME/SLOW-TIME PLOT OF RAW DATA')
ylabel('range (km)')
xlabel('pulse number')
% Plot overlay of individual range traces
disp(' ')
disp(' ')
disp('...plotting overlay of range traces')
figure
plot(range,db(y,'voltage'))
title('OVERLAY OF RANGE TRACES')
xlabel('distance (km)')
ylabel('amplitude (dB)')
grid
% Noncoherently integrate the range traces and display
高潮艺术disp('...plotting integrated range trace')
figure
plot(range,db(sum((abs(y).^2)')','power')) %看看功率的非相干积累
title('NONCOHERENTLY INTEGRATED RANGE TRACE')
xlabel('range bin')
ylabel('power')
grid
% Doppler process and square-law detect the whole
% unprocessed array and display mesh.
% Use Hamming window throughout.
disp('..puting raw range-Doppler map')
% 下句效果和Y=fft(conj(y').*(hamming(Ny)*ones(1,My)),Lfft,1); 一样。dim = 1 表示沿着列做fft
Y=fft(conj(y').*(hamming(Ny)*ones(1,My)),Lfft); %y‘是20-by-337的,对y’的慢时间维(按列)做Lfft点FFT,进行相干积累
% Y= fftshift(Y.*conj(Y),1); 的效果与Y=git_rotate(Y.*conj(Y),Lfft/2); 完全相同,git_rotate是将矩阵的上下循环移位 Y=git_rotate(Y.*conj(Y),Lfft/2); % note we take mag-squared of Y here also 注意Y是做完相干积累后才取模平方的
YdB=db(abs(Y),'power');
figure
mesh(doppler,range,YdB')
Since I used the DFT(K points) to perform the Doppler analysis, bin #0 (#1 in MATL
AB indexing) corresponds to zero Doppler shift, while each successive bin represents an increment of PRF/K Hz.I used a modest DFT size of 256 to get adequate Doppler definition, the corresponding increment in velocity is (lambda*PRF/2/K) m/s per FFT bin.
The DFT causes the target energy to concentrate along the frequency axis; a target signal that was a sinusoid across all 20 slow time samples and was lost among the noise and clutter is now an asinc function peaking at the appropriate Doppler shift. The asinc is still fairly “fat” simply because I have only 20 slow-time samples, which limits the Doppler resolution. The noise remains spread out across all of the range and velocity bins. The clutter is now a clearly evident concentration of energy around zero velocity, extending through all of the range bins.
Note also that the four targets are now clearly visible. Each is in the form of a “hump” of energy extending across 1.5 km of range. This is because I have not yet done pulse compression. The signal from a target on a given pulse is just an echo of my transmitted pulse, which was 10 μs long. This is equivalent to (c/2)(10 μs) = 1.5 km.