一、简介
基于matlab Omiga-K算法SAR回波生成和成像
二、部分源代码
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Omiga-K算法版本2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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; %调频率
%%%%%%%%%%%%%%%%%OmigaK算法%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cj = sqrt(-1);
% dt=1/fs;
delaymin=2*Rmin/c-Tp/2; %距离波门起始时刻
% %%%%%%%%%%%%%%%%%%%%%%%%%%Omiga K算法%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Na=rawdatawidth;
Nr=slicelen;
T=Tp;
fx0=round(Na/2);
ft0=round(Nr/2);
fx=([1:Na]-fx0)/(Na-1)*PRF; %Doppler frequency
fr=(([1:Nr]-ft0)/(Nr-1)*fs); %距离向频率
%距离压缩
N = round(fs*Tp);
figure;imagesc(abs(sr));title('回波仿真结果');
% sfa=fftshift(fft(sr),1);
% sfa2 = fftshift(fft(sfa,[],2),2);
sfa2 =fftshift(fft2(fftshift(sr)));
H_Range_Com=exp(cj*pi*fr.^2/K).'*ones(1,Na); %距离向压缩因子
H_PHASE = exp(cj*4*pi*Src/c*sqrt((fr.'+fc).^2*ones(1,Na)-ones(Nr,1)*(c*fx/2/V).^2));%参考距离中心处的方位向聚焦因子
Hshift = exp(-cj*Src*4*pi*(fr+fc)/c).'*ones(1,Na); %将图像时域移动到距离中心
sfa2 = sfa2.*H_Range_Com.*Hshift.*H_PHASE;
figure;
imagesc(abs(sfa2));
%%Stolt插值,根据非均匀值插出均匀值
% Nr2=Nr-N;
ft0=round(Nr/2);
% fr=fftshift(fr); %距离向频率
P=1;%8点sinc插值
Stolt_krkx=zeros(Nr,Na);%初始化
dfr=fs/(Nr-1);%频域间隔
Stolt_krkx = sqrt((fr.'+fc).^2*ones(1,Na)+ones(Nr,1)*(c*fx/2/V).^2)-fc;
delta_fr = Stolt_krkx-fr.'*ones(1,Na);
Kr=fix(delta_fr/dfr);
%linear interpolator
%8 point SINC interpolator
Nd = Kr(1,end)
F = [sfa2;zeros(Nd+P,Na)]; %回波数据
stolt_sfa2 = zeros(Nr,Na);
for i=P+1:Nr
for j=1:Na
T=Kr(i,j)+(-P:P);
f=F(T+i,j).';
% stolt_sfa2(i,j)=sum(f.*sinc(delta_fr(i,j)/dfr-T));
stolt_sfa2(i,j)=sinc(delta_fr(i,j)/dfr-T)*F(T+i,j);
end
end
figure;
imagesc(abs(stolt_sfa2));
%H_phase1 = exp(cj*Src*sqrt((kr+krc).^2*ones(1,Na)-ones(Nr2,1)*kx.^2));
%%聚焦因子
stolt_sfa2 = stolt_sfa2;%.*H_phase1;
sfa3 =fftshift(ifft2(stolt_sfa2));
figure;
imagesc(abs(sfa3));
[pm,pn] = plotsection(sfa3.');
% Nt =pn;
kp_a = 2;
deltA = V/PRF*kp_a;
deltR = c/2/fs;
indexa =[1:Na].';
indext = [1:Nr].';
Mr = 16;
Ma = round(Mr*kp_a);
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('距离向剖面图');
figure;
plot(20*log10(abs(y(:,n))/z)),grid,axis([1,A,-40,0]);
title('方位向剖面图');
三、运行结果
四、备注
版本:2014a