A list,

Based on MATLAB NCP algorithm SAR echo generation and imaging

Part of the source code

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % corresponds to HOP replication imaging algorithm % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX clear all; clc; c=299792458;                        %light speed  
load sarecho.mat;
fc=Head(1);
B=Head(2);
Tp=Head(3);
fs=Head(4);
V=Head(5);
PRF=Head(6);
dx=Head(7);
dy=Head(8);
Res_r=Head(9);
Res_a=Head(10);
theta=Head(11);
Rg0=Head(12);
Rang_Wath=Head(13);
Range_Swath=Head(14);
Azimuth_Swath=Head(15);
h=Head(16);
Rmin=Head(17);
Src=Head(18);
Rmax=Head(19);
Azimuth_StartNum=Head(20);
Azimuth_EndNum=Head(21);
rawdatawidth=Head(22);
slicelen=Head(23); lamda = c/fc; K=B/Tp; % Modulation frequency dt=1/fs; % Sampling interval delaymin=2*Rmin/c-Tp/2; % distance from the start time of wave gate Na= rawDatawidth; Nr=slicelen; T=Tp; lammda=lamda; fx0=round(Na/2);
ft0=round(Nr/2);
cj=sqrt(- 1); Sfa =fftshift(FFT (sr,[],2),2); % distance FFt, cubic phase filter, distance inverse FFt fx=([1:Na]-fx0)/(Na- 1)*PRF; 
fy=([1:Nr]-ft0)/(Nr- 1)*fs; % distance frequency indexfx=find(abs(fx)<2*V/lammda&abs(fx)<4*V*sin(theta/2)/(c/(fc+B/2))); % Valid Doppler position indexLen = Length (IndexFX); fxm=2*V/lammda;
costheta=sqrt(1-(fx(indexfx)/fxm).^2);
sintheta=sqrt((fx(indexfx)/fxm).^2);
% Cs=1./sqrt(1-(lammda*fx(indexfx)/2). ^2)- 1; CS = % CS factors1./costheta- 1;
% ksrc=2*lammda/c.^2*(lammda*fx(indexfx)/2). ^2./ (1-(lammda*fx(indexfx)/2). ^2). ^1.5; % distance bending factor KSRC =(2*lammda/c^2)*sintheta.^2./costheta.^3;
% R=(delaymin+[0:Nr- 1]'*dt)*c/2;
R=(Src+[1:slicelen]*dy-Tp/2*c/2)'; Ref=Src; Kref=K./(1-K*Ref*ksrc); % Range modulation frequency Yfa=(2-costheta).*(1+costheta)*lammda./costheta.^2./Kref/c/2; % sfar1=fftshift(FFT (sfa,[],1),1); % Distance to FFT H_TP_Filter=exp(cj*2/3*pi*(Yfa'*ones(1,slicelen)).*(ones(indexlen,1)*fy.^3)); Phase_ref1 =(4*pi*Ref*sqrt((ones(indexlen,1)*(fc+fy)/c).^2-(fx(indexfx). '/2/V).^2*ones(1,slicelen)))';
phase_ref2=ones(slicelen,1)*(-2*pi*Ref/V*sqrt(fxm.^2-fx(indexfx).^2));
phase_ref3=(-4*pi*Ref/c*(ones(indexlen,1)*fy).*((1+Cs)'*ones(1,slicelen)))';
phase_ref4=pi*Ref*2*lammda/c^2*(fy.^2).'*(((fx(indexfx).*lammda/2/V).^2* ().1+Cs).^2);
H_PhaseC=exp(cj*(phase_ref1+phase_ref2+phase_ref3+phase_ref4));
sfar1(:,indexfx)=sfar1(:,indexfx).*H_PhaseC.*H_TP_Filter'; Sfa1 = iFFT (sFAR1); IFFT %NCS q2=Kref.*(1-costheta)./costheta; %NCS operation reference function coefficient Q3 =(lammda/2/c)*Kref.^2.* (1-costheta.^2)./costheta.^2.* (1-costheta)./costheta; %NCS calculate the reference function coefficient T_t=2/c*((R-Ref)*(1+Cs));
H_NCS=exp(cj*pi*(ones(slicelen,1)*q2.*T_t.^2) +... cj*2/3*pi*(ones(slicelen,1)*q3.*T_t.^3)); Sfa1 (:,indexfx)=sfa1(:,indexfx).*H_NCS; Sfar2 = FFT (sfa1,[],1);
%sfar=(fftshift(fft(sfa,[],1),1)); % sfar=fft(sfa); % range compression and secondary range compression, range migration correction phase1= PI * ^ ^2)'*(costheta./Kref); phase2=4*pi*Ref/c*fy.'* ((1-costheta)./costheta);
     phase3=pi*lammda/3/c*(fy.^3). '* ((((1-costheta).*(1-costheta.^2)) +... ((1+costheta).*(2-costheta).*costheta))./Kref);
     H_Rng_Cmp=exp(cj*(phase1+phase2+phase3)); Sfar2 (:,indexfx)=sfar2(:,indexfx).*H_Rng_Cmp; % sfar(:,indexfx)=sfar(:,indexfx).*exp(cj*pi*(ft.^2*ones(1,indexlen))...
%                                 ./(ones(Nr,1)*(Kref.*(1+Cs)))); %.*(hamming(Nr)*ones(1,indexlen)); % distance compression and secondary distance compression % sFAR (:,indexfx)=sfar(:, indexFX).*exp(cj*4*pi*Ref/c*ft*Cs); Sfr2 = iFFt (sfar2,[],1); sfr=sfr2; figure; imagesc(abs(sfr)); % indext=[% indext=[1:Nr]';
% indext=[1:ImgRng]';
R1=(indext*dt+delaymin)*c/2;
pres=4*pi/c.^2*(R1-Ref).^2*(Kref.*Cs.*(1+Cs)); % remaining phase SFR (indext,indexfx)= SFR (indext,indexfx).*exp(cj*pres); % residual phase compensation SFR (indext,indexfx)= SFR (indext,indexfx).*exp(cj*2*pi*R1*2/lammda... * (sqrt(1-(lammda*fx(indexfx)/2/V).^2)- 1)); %.*(hamming(Nr)*ones(1,indexlen)); Sfra1 =ifft(SFR,[],2);
% sfra=sfra1(:,Azm_lower:Azm_upper);
figure; imagesc(abs(sfra1));
 [pm,pn] = plotsection(sfra1. ');
% Nt =pn; 
kp_a = 2;
deltA = V/PRF*kp_a;
deltR = c/2/fs;
indexa =[1:Na]. ';
Mr = 64; Ma = round(Mr*kp_a); % % amplitude quantization dB figure my_plot (indexa (PM - Ma: kp_a: PM + Ma), indext (pn - Mr: pn + Mr), sfra1 (pn - Mr: pn + Mr, PM - Ma: kp_a: PM + Ma),50);
% xlabel('Azimuth (number of points)'); ylabel('Distance direction (points)'); title('NCS Imaging result amplitude quantization dB Diagram ');  
figure(8); Indext (Pn-MR: PN +Mr), Indexa (Pm-MA: kp_A: PM +Ma),abs(sfra1(pn-Mr:pn+Mr,pm-Ma:kp_a:pm+Ma). '),40); colorbar; function [m,n]= plotsection(y) [x,b] = max(abs(y));
[z,n] = max(x);
[A,B] = size(y);
m = b(n);
figure;
plot(20*log10(abs(y(m,:))/z)),grid,axis([1,B,- 40.0]);
title('Distance profile');
figure;
plot(20*log10(abs(y(:,n))/z)),grid,axis([1,A,- 40.0]);
title('Azimuth profile');

Copy the code

Third, the operation result

Fourth, note

Version: 2014 a