%% 试验不同的静止目标滤除方法
clear all; close all; clc
load Data_ADC.mat Data_ADC;
%---------------方法1:直接2D-FFT后零多普勒维度置0------------------%
%先1D-FFT
Data1DFFTOut = fft(Data_ADC,[],1);
%再2D-FFT
Data2DFFTOut = fftshift(fft(Data1DFFTOut,[],2),2);
%零多普勒维度置0
Datatmp = Data2DFFTOut;
Datatmp(:,size(Data2DFFTOut,2)/2+1) = 0;
DataStaticRemoved = Datatmp;
RDmat = abs(Data2DFFTOut);
DataStaticRemoved = abs(DataStaticRemoved);
figure(1);
subplot(221);imagesc(RDmat);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-静止目标滤除前-by imagesc');
subplot(222);meshz(RDmat);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-静止目标滤除前-by meshz');
subplot(223);imagesc(DataStaticRemoved);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-零多普勒维度置0后-by imagesc');
subplot(224);meshz(DataStaticRemoved);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-零多普勒维度置0后-by meshz');
%------------------------------------------------------------------------------------%
%--------------方法2 距离维度压缩后减均值再进行速度维压缩---------------------------------%
%先1D-FFT
Data1DFFTOut = fft(Data_ADC,[],1);
%再静态杂波滤除
[rangglen,~] = size(Data_ADC);
datatmp1 = Data1DFFTOut;
for ii = 1:rangglen
meandata = mean(datatmp1(ii,:));
datatmp1(ii,:) = datatmp1(ii,:) - meandata;
end
DataStaticRemoved2 = datatmp1;
%再2D-FFT
Data2DFFTOut = fftshift(fft(Data1DFFTOut,[],2),2);
Data2DFFTOut_StaticRemoved2 = fftshift(fft(DataStaticRemoved2,[],2),2);
RDmat = abs(Data2DFFTOut);
RDmat_StaticRemoved2 = abs(Data2DFFTOut_StaticRemoved2);
figure(2);
subplot(221);imagesc(RDmat);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-静止目标滤除前-by imagesc');
subplot(222);meshz(RDmat);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-静止目标滤除前-by meshz');
subplot(223);imagesc(RDmat_StaticRemoved2);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-距离压缩后减均值-by imagesc');
subplot(224);meshz(RDmat_StaticRemoved2);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-距离压缩后减均值-by meshz');
%-----------------------------------------------------------------------------------%
%-------------------方法3 对消(距离压缩后,相邻多普勒维度的数据相减)---------------------%
%先1D-FFT
Data1DFFTOut = fft(Data_ADC,[],1);
%再对消 (得到得结果要少一列)
[rangglen,dopplerlen] = size(Data_ADC);
datatmp2 = zeros(rangglen,dopplerlen-1);
for jj = 1:dopplerlen-1
datatmp2(:,jj) = Data1DFFTOut(:,jj+1) - Data1DFFTOut(:,jj);
end
%最后一列用最后一列的数据减去第一列的数据?(或者直接不用)
DataStaticRemoved3 = datatmp2;
%再2D-FFT
Data2DFFTOut = fftshift(fft(Data1DFFTOut,[],2),2);
Data2DFFTOut_StaticRemoved3 = fftshift(fft(DataStaticRemoved3,[],2),2);
RDmat = abs(Data2DFFTOut);
RDmat_StaticRemoved3 = abs(Data2DFFTOut_StaticRemoved3);
figure(3);
subplot(221);imagesc(RDmat);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-静止目标滤除前-by imagesc');
subplot(222);meshz(RDmat);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-静止目标滤除前-by meshz');
subplot(223);imagesc(RDmat_StaticRemoved3);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-距离压缩后对消-by imagesc');
subplot(224);meshz(RDmat_StaticRemoved3);xlabel('DopplerIdx');ylabel('RangeIdx');title('2DFFT结果-距离压缩后对消-by meshz');
%------------------------------------------------------------------------------------------------%