⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spotlight.m

📁 matlab的程序多种供您选择!希望大家能借鉴!对你会友帮助的。
💻 M
📖 第 1 页 / 共 2 页
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    SLOW-TIME DOPPLER SUBSAMPLING     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if Y0 < L, ny=2*ceil(1.2*Y0/du);      % Number of samples in y domain                            % 20 percent guard band ms=floor(m/ny);            % subsampling ratio tt=floor(m/(2*ms)); I=m/2+1-tt*ms:ms:m/2+1+(tt-1)*ms; % subsampled index in ku domain [tt,ny]=size(I);           % number of subsamples fs=fs(:,I);                % subsampled SAR signal spectrum ky=ku(I);                  % subsampled ky array dky=dku*ms;                % ky domain sample spacingelse, dky=dku; ny=m; ky=ku;end;dy=pi2/(ny*dky);            % y domain sample spacingy=dy*(-ny/2:ny/2-1);        % cross-range array%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%             RECONSTRUCTION           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ky=ones(n,1)*ky+kus(:)*ones(1,ny);       % ky arraykx=(4*k(:).^2)*ones(1,ny)-ky.^2;kx=sqrt(kx.*(kx > 0));                  % kx array%plot(kx(1:20:n*ny),ky(1:20:n*ny),'.')xlabel('Spatial Frequency k_x, rad/m')ylabel('Spatial Frequency k_y, rad/m')title('Spotlight SAR Spatial Frequency Data Coverage')axis image; axis xyprint P5.7.pspause(1)%kxmin=min(min(kx));kxmax=max(max(kx));dkx=pi/X0;        % Nyquist sample spacing in kx domainnx=2*ceil((.5*(kxmax-kxmin))/dkx); % Required number of                      % samples in kx domain;                      % This value will be increased slightly                      % to avoid negative array index%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                         %%%%%%   FIRST TWO OPTIONS FOR RECONSTRUCTION:                 %%%%%%                                                         %%%%%%     1. 2D Fourier Matched Filtering and Interpolation   %%%%%%     2. Range Stacking                                   %%%%%%                                                         %%%%%%     Note: For "Range Stacking," make sure that the      %%%%%%           arrays nx, x, and kx are defined.             %%%%%%                                                         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    2D FOURIER MATCHED FILTERING AND INTERPOLATION    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Matched Filtering%fs0=(kx > 0).*exp(cj*kx*Xc+cj*ky*Yc+cj*.25*pi ...           -cj*2*k(:)*ones(1,ny)*Rc); % reference signal complex conjugatefsm=fs.*fs0;     % 2D Matched filtering% Interpolation%is=8;       % number of neighbors (sidelobes) used for sinc interpolatorI=2*is+1;kxs=is*dkx; % plus/minus size of interpolation neighborhood in KX domain%nx=nx+2*is+4;  % increase number of samples to avoid negative               %  array index during interpolation in kx domainKX=kxmin+(-is-2:nx-is-3)*dkx;     % uniformly-spaced kx points where                                  % interpolation is donekxc=KX(nx/2+1);                   % carrier frequency in kx domainKX=KX(:)*ones(1,ny);%F=zeros(nx,ny);         % initialize F(kx,ky) array for interpolationfor i=1:n;                       % for each k loop  i                              % print i to show that it is running icKX=round((kx(i,:)-KX(1,1))/dkx)+1; % closest grid point in KX domain cKX=KX(1,1)+(icKX-1)*dkx;            % and its KX value ikx=ones(I,1)*icKX+[-is:is]'*ones(1,ny); ikx=ikx+nx*ones(I,1)*[0:ny-1]; nKX=KX(ikx); SINC=sinc((nKX-ones(I,1)*kx(i,:))/dkx);             % interpolating sinc HAM=.54+.46*cos((pi/kxs)*(nKX-ones(I,1)*kx(i,:)));  % Hamming window         %%%%%   Sinc Convolution (interpolation) follows  %%%%%%%% F(ikx)=F(ikx)+(ones(I,1)*fsm(i,:)).*(SINC.*HAM);end%%  DISPLAY interpolated spatial frequency domain image F(kx,ky)KX=KX(:,1).';KY=ky(1,:);G=abs(F)';xg=max(max(G)); ng=min(min(G)); cg=255/(xg-ng);image(KX,KY+kus(1),256-cg*(G-ng));axis image; axis xyxlabel('Spatial Frequency k_x, rad/m')ylabel('Spatial Frequency k_y, rad/m')title('Wavefront Spotlight SAR Reconstruction Spectrum')print P5.8.pspause(1)%f=iftx(ifty(F));     % Inverse 2D FFT for spatial domain image f(x,y)%dx=pi2/(nx*dkx);     % range sample spacing in reconstructed imagex=dx*(-nx/2:nx/2-1); % range array%% Display SAR reconstructed imageG=abs(f)';xg=max(max(G)); ng=min(min(G)); cg=255/(xg-ng);image(Xc+x,Yc+y,256-cg*(G-ng));axis([Xc-X0 Xc+X0 Yc-Y0 Yc+Y0]);axis image; axis xyxlabel('Range X, meters')ylabel('Cross-range Y, meters')title('Wavefront Spotlight SAR Reconstruction')print P5.9.pspause(1)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   SAR Image Compression (for Spotlight System)  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Fc=ftx(fty(f.* ...  exp(cj*kxc*x(:)*ones(1,ny)+cj*ones(nx,1)*2*kc*sin(theta_c)*y ... -cj*2*kc*sqrt(((Xc+x(:)).^2)*ones(1,ny)+ones(nx,1)*((Yc+y).^2)))));G=abs(Fc)';xg=max(max(G)); ng=min(min(G)); cg=255/(xg-ng);image(KX,KY+kus(1),256-cg*(G-ng));axis image; axis xyxlabel('Spatial Frequency k_x, rad/m')ylabel('Spatial Frequency k_y, rad/m')title('Compressed Spotlight SAR Reconstruction Spectrum')print P5.10.pspause(1)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      RANGE STACK WAVEFRONT RECONSTRUCTION       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%f_stack=zeros(nx,ny); % Initialize reconstruction array in (x,y) domainfor i=1:nx; i        % Stack's loop for reconstruction at each range f_stack(i,:)=ifty(sum(fs.*exp(cj*kx*(Xc+x(i))+cj*ky*Yc ...  +cj*.25*pi-cj*2*k(:)*ones(1,ny)*Rc)));end;% Remove carrier in range domainf_stack=f_stack.*exp(-cj*x(:)*kxc*ones(1,ny));%f_stack=f_stack/nx; % Scale it for comparison with Fourier interpolation                    % Use "f_stack-f" to display difference of two                    % reconstructions           G=abs(f_stack)';xg=max(max(G)); ng=min(min(G)); cg=255/(xg-ng);image(Xc+x,Yc+y,256-cg*(G-ng));axis([Xc-X0 Xc+X0 Yc-Y0 Yc+Y0]);axis image; axis xyxlabel('Range X, meters')ylabel('Cross-range Y, meters')title('Range Stack Spotlight SAR Reconstruction')print P5.11.pspause(1)                F_stack=ftx(fty(f_stack)); % Reconstruction array in spatial frequency                           % domain; Use "F_stack-F" to display                           %  difference of two reconstructions%G=abs(F_stack)';xg=max(max(G)); ng=min(min(G)); cg=255/(xg-ng);image(KX,KY+kus(1),256-cg*(G-ng));axis image; axis xyxlabel('Spatial Frequency k_x, rad/m')ylabel('Spatial Frequency k_y, rad/m')title('Range Stack Spotlight SAR Reconstruction Spectrum')print P5.12.pspause(1)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     TIME DOMAIN CORRELATION RECONSTRUCTION      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%f_tdc=zeros(nx,ny); % Initialize reconstruction array in (x,y) domainfor i=1:nx; i   for j=1:ny;      t_ij=(2*sqrt((x(i)+Xc)^2+(y(j)+Yc-u).^2))/c;      f_tdc(i,j)=sum(sum(s_ds.*exp(cj*w(:)*(t_ij-tm(n/2+1))).* ...         (ones(n,1)*(t_ij >= Ts & t_ij <= Tf))));   end;end;% Remove carrier in range domainf_tdc=f_tdc.*exp(-cj*x(:)*kxc*ones(1,ny));%% Remove carrier in cross-range domain (squint mode)f_tdc=f_tdc.*exp(-cj*ones(nx,1)*2*kc*sin(theta_c)*y);           G=abs(f_tdc)';xg=max(max(G)); ng=min(min(G)); cg=255/(xg-ng);image(Xc+x,Yc+y,256-cg*(G-ng));axis([Xc-X0 Xc+X0 Yc-Y0 Yc+Y0]);axis image; axis xyxlabel('Range X, meters')ylabel('Cross-range Y, meters')title('TDC Spotlight SAR Reconstruction')print P5.13.pspause(1)                F_tdc=ftx(fty(f_tdc));     % Reconstruction array in spatial frequency%G=abs(F_tdc)';xg=max(max(G)); ng=min(min(G)); cg=255/(xg-ng);image(KX,KY+kus(1),256-cg*(G-ng));axis image; axis xyxlabel('Spatial Frequency k_x, rad/m')ylabel('Spatial Frequency k_y, rad/m')title('TDC Spotlight SAR Reconstruction Spectrum')print P5.14.pspause(1)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%           BACKPROJECTION RECONSTRUCTION         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%f_back=zeros(nx,ny); % Initialize reconstruction array in (x,y) domainn_ratio=100;              % Upsampling ratio in fast-time domainnu=n_ratio*n;             % Size of upsampled s(t,u) array in t domainnz=nu-n;                  % Number of zerosdtu=(n/nu)*dt;            % Fast-time sample spacing of upsampled arraytu=dtu*(-nu/2:nu/2-1);    % Upsampled reference fast-time arrayX=x(:)*ones(1,ny);Y=ones(nx,1)*y;for j=1:m; j   t_ij=(2*sqrt((X+Xc).^2+(Y+Yc-u(j)).^2))/c;   t_ij=round((t_ij-tm(n/2+1))/dtu)+nu/2+1;   it_ij=(t_ij > 0 & t_ij <= nu);   t_ij=t_ij.*it_ij+nu*(1-it_ij);   S=ifty([zeros(1,nz/2),s_ds(:,j).',zeros(1,nz/2)])...      .*exp(cj*wc*tu);   S(nu)=0;   f_back=f_back+S(t_ij);end;clear X Y% Remove carrier in range domainf_back=f_back.*exp(-cj*x(:)*kxc*ones(1,ny));%% Remove carrier in cross-range domain (squint mode)f_back=f_back.*exp(-cj*ones(nx,1)*2*kc*sin(theta_c)*y);  G=abs(f_back)';xg=max(max(G)); ng=min(min(G)); cg=255/(xg-ng);image(Xc+x,Yc+y,256-cg*(G-ng));axis([Xc-X0 Xc+X0 Yc-Y0 Yc+Y0]);axis image; axis xyxlabel('Range X, meters')ylabel('Cross-range Y, meters')title('Backprojection Spotlight SAR Reconstruction')print P5.15.pspause(1)                F_back=ftx(fty(f_back));     % Reconstruction array in spatial frequency%G=abs(F_back)';xg=max(max(G)); ng=min(min(G)); cg=255/(xg-ng);image(KX,KY+kus(1),256-cg*(G-ng));axis image; axis xyxlabel('Spatial Frequency k_x, rad/m')ylabel('Spatial Frequency k_y, rad/m')title('Backprojection Spotlight SAR Reconstruction Spectrum')print P5.16.pspause(1)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -