合成孔径雷达回波数据处理MATLAB程序
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了合成孔径雷达回波数据处理MATLAB程序相关的知识,希望对你有一定的参考价值。
各位朋友,谁能帮忙提供以下合成孔径雷达回波信号处理的MATLAB程序。本人非常需要,最好是CS算法(Chirp-Scaling)。没有的话RD算法也可以。我会追加一倍的分数,非常感谢。
参考技术A CS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%产生Stripmap SAR的回波
clear all
clc
thetaT=0;%T平台波束斜视角
thetaT=thetaT*pi/180;%rad
thetaR=0;%R平台波束斜视角
thetaR=thetaR*pi/180;
c=3e8;%光速
fc=1.5e9;%载频
lambda=c/fc;%波长
%%测绘带区域
X0=200;%方位向[-X0,X0]
Rtc=3000;
Rrc=3000;
Rc=(Rtc+Rrc)/2;
R0=150;%距离向[Rc-R0,Rc+R0]
%%距离向(Range),r/t domain
Tr=1.33e-6;%LFM信号脉宽1.33us (200m)
Br=150e6; %LFM信号带宽 150MHz
Kr=Br/Tr; %调频斜率
Nr=1024;
r=Rc+linspace(-R0,R0,Nr);
t=2*r/c;%t域序列
dt=R0*4/c/Nr;%采样周期
f=linspace(-1/2/dt,1/2/dt,Nr);%f域序列
%%方位向(Azimuth,Cross-Range),x/u domain
v=100;%SAR 平台速度
Lsar=300;%合成孔径长度
Na=512;
x=linspace(-X0,X0,Na);%u域序列
u=x/v;
du=2*X0/v/Na;
fu=linspace(-1/2/du,1/2/du,Na);%fu域序列
ftdc=v*sin(thetaT);
ftdr=-(v*cos(thetaT))^2/lambda/Rtc;
frdc=v*sin(thetaR);
frdr=-(v*cos(thetaR))^2/lambda/Rrc;
fdc=ftdc+frdc;%Doppler调频中心频率
fdr=ftdr+frdr;%Doppler调频斜率
%%目标位置
Ntar=3;%目标个数
Ptar=[Rrc,0,1 %距离向坐标,方位向坐标,sigma
Rrc+50,-50,1
Rrc+50,50,1];
%%产生回波
s_ut=zeros(Nr,Na);
U=ones(Nr,1)*u;%扩充为矩阵
T=t'*ones(1,Na);
for i=1:1:Ntar
rn=Ptar(i,1);xn=Ptar(i,2);sigma=Ptar(i,3);
rtn=rn+Rtc-Rrc;
RT=sqrt(rtn^2+(rtn*tan(thetaT)+xn-v*U).^2);
RR=sqrt(rn^2+(rn*tan(thetaT)+xn-v*U).^2);
R=RT+RR;
DT=T-R/c;
phase=-pi*Kr*DT.^2-2*pi/lambda*R;
s_ut=s_ut+sigma*exp(j*phase).*(abs(DT)<Tr/2).*(abs(v*U-xn)<Lsar/2);
end;
%方位向fft
s_kt=fftshift(fft(fftshift(s_ut).')).';
%CS变换
kc=4*pi/lambda;
kc=kc*ones(1,Na);
kx=fu/v;
p_kx0=-sqrt(kc.^2-kx.^2);%相位项泰勒展开的系数函数
p_kx1=2*kc/c/p_kx0;
p_kx2=-2.*kx.^2/c^2./p_kx0.^3;
C_kx=-(c*p_kx1/2+1);
Ks_r=1-2*Kr*Rc.*p_kx2;
Ks_kx_r=Kr/pi./Ks_r;
r0=Rc;
s2_ut=exp(j*pi*C_kx.*ones(Nr,1)*Ks_kx_r.*(t'*ones(1,Na)-2*r0*(1+C_kx)/c).^2);%设计的线性调频信号
S_cs=s_kt.*s2_ut;
%距离向fft
S_kw=fftshift(fft(fftshift(S_cs)));
%距离向匹配滤波
w=2*pi*f;
rmc_r=exp(j.*w*2*C_kx*r0/c).*exp(j.*w.^2/4/pi/Kr/(1+C_kx));
rmc_r=rmc_r'*ones(1,Na);
S_rmc=S_kw.*rmc_r;
%距离向ifft
S_kt=fftshift(ifft(fftshift(S_rmc)));
d_kxr=4*pi/c^2*Kr*C_kx*(1+C_kx).*(Rc-r0).^2;%CS变换带来的相位误差
S_kt=S_kt.*exp(-j*d_kxr);%消除相位误差
%方位向匹配滤波
FU=ones(Nr,1)*fu;
H_kx=exp(j*pi/fdr*(FU-fdc).^2);%方位向压缩因子
I_ut=S_kt.*H_kx;
I_ut=fftshift(ifft(fftshift(I_ut.'))).';
subplot(221)
G=20*log10(abs(s_ut)+1e-6);
gm=max(max(G));
gn=gm-40;%显示动态范围40dB
G=255/(gm-gn)*(G-gn).*(G>gn);
imagesc(x,r-Rc,-G),colormap(gray)
grid on,axis tight,
xlabel('Azimuth')
ylabel('Range')
title('(a)原始信号')
subplot(222)
G=20*log10(abs(S_rmc)+1e-6);
gm=max(max(G));
gn=gm-40;%显示动态范围40dB
G=255/(gm-gn)*(G-gn).*(G>gn);
imagesc(x,r-Rc,-G),colormap(gray)
grid on,axis tight,
xlabel('Azimuth')
ylabel('Range')
title('(b)距离向匹配滤波后频谱')
subplot(223)
G=20*log10(abs(S_kt)+1e-6);
gm=max(max(G));
gn=gm-40;%显示动态范围40dB
G=255/(gm-gn)*(G-gn).*(G>gn);
imagesc(x,r-Rc,G),colormap(gray)
grid on,axis tight,
xlabel('Azimuth')
ylabel('Range')
title('(c)消除相位误差后频谱')
subplot(224)
G=20*log10(abs(I_ut)+1e-6);
gm=max(max(G));
gn=gm-60;%显示动态范围40dB
G=255/(gm-gn)*(G-gn).*(G>gn);
imagesc(x,r-Rc,G),colormap(gray)
grid on,axis tight,
xlabel('Azimuth')
ylabel('Range')
title('(d)目标图象')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
RD
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%产生Stripmap SAR的回波
clear all
thetaT=0;%T平台波束斜视角
thetaT=thetaT*pi/180;%rad
thetaR=0;%R平台波束斜视角
thetaR=thetaR*pi/180;
c=3e8;%光速
fc=1.5e9;%载频
lambda=c/fc;%波长
%%测绘带区域
X0=200;%方位向[-X0,X0]
Rtc=3000;
Rrc=3000;
Rc=(Rtc+Rrc)/2;
R0=150;%距离向[Rc-R0,Rc+R0]
%%距离向(Range),r/t domain
Tr=1.5e-6;%LFM信号脉宽 1.5us (200m)
Br=150e6; %LFM信号带宽 150MHz
Kr=Br/Tr; %调频斜率
Nr=512;
r=Rc+linspace(-R0,R0,Nr);
t=2*r/c;%t域序列
dt=R0*4/c/Nr;%采样周期
f=linspace(-1/2/dt,1/2/dt,Nr);%f域序列
%%方位向(Azimuth,Cross-Range),x/u domain
v=100;%SAR 平台速度
Lsar=300;%合成孔径长度
Na=1024;
x=linspace(-X0,X0,Na);%u域序列
u=x/v;
du=2*X0/v/Na;
fu=linspace(-1/2/du,1/2/du,Na);%fu域序列
ftdc=v*sin(thetaT);
ftdr=-(v*cos(thetaT))^2/lambda/Rtc;
frdc=v*sin(thetaR);
frdr=-(v*cos(thetaR))^2/lambda/Rrc;
fdc=ftdc+frdc;%Doppler调频中心频率
fdr=ftdr+frdr;%Doppler调频斜率
%%目标位置
Ntar=3;%目标个数
Ptar=[Rrc,0,1 %距离向坐标,方位向坐标,sigma
Rrc+50,-50,1
Rrc+50,50,1];
%%产生回波
s_ut=zeros(Nr,Na);
U=ones(Nr,1)*u;%扩充为矩阵
T=t'*ones(1,Na);
for i=1:1:Ntar
rn=Ptar(i,1);xn=Ptar(i,2);sigma=Ptar(i,3);
rtn=rn+Rtc-Rrc;
RT=sqrt(rtn^2+(rtn*tan(thetaT)+xn-v*U).^2);
RR=sqrt(rn^2+(rn*tan(thetaT)+xn-v*U).^2);
R=RT+RR;
DT=T-R/c;
phase=pi*Kr*DT.^2-2*pi/lambda*R;
s_ut=s_ut+sigma*exp(j*phase).*(abs(DT)<Tr/2).*(abs(v*U-xn)<Lsar/2);
end;
%%距离压缩
p0_t=exp(j*pi*Kr*(t-2*Rc/c).^2).*(abs(t-2*Rc/c)<Tr/2);%距离向LFM信号
p0_f=fftshift(fft(fftshift(p0_t)));
s_uf=fftshift(fft(fftshift(s_ut)));%距离向FFT
src_uf=s_uf.*(conj(p0_f).'*ones(1,Na));%距离压缩
src_ut=fftshift(ifft(fftshift(src_uf)));%距离压缩后的信号
src_fut=fftshift(fft(fftshift(src_ut).')).';%距离多普勒域
%%二次距离压缩,距离迁移校正原理仿真
src_fuf=fftshift(fft(fftshift(src_uf).')).';%距离压缩后的二维频谱
F=f'*ones(1,Na);%扩充为矩阵
FU=ones(Nr,1)*fu;
p0_2f=exp(j*pi/fc^2/fdr*(FU.*F).^2+j*pi*fdc^2/fc/fdr*F-j*pi/fc/fdr*FU.^2.*F);
s2rc_fuf=src_fuf.*p0_2f;
s2rc_fut=fftshift(ifft(fftshift(s2rc_fuf)));%距离多普勒域
%%方位压缩
p0_2fu=exp(j*pi/fdr*(FU-fdc).^2);%方位向压缩因子
s2rcac_fut=s2rc_fut.*p0_2fu;%方位压缩
s2rcac_fuf=fftshift(fft(fftshift(s2rcac_fut)));%距离方位压缩后的二维频谱
s2rcac_ut=fftshift(ifft(fftshift(s2rcac_fut).')).';%方位向IFFT
subplot(221)
G=20*log10(abs(s_ut)+1e-6);
gm=max(max(G));
gn=gm-40;%显示动态范围40dB
G=255/(gm-gn)*(G-gn).*(G>gn);
imagesc(x,r-Rc,-G),colormap(gray)
grid on,axis tight,
xlabel('Azimuth')
ylabel('Range')
title('(a)原始信号')
subplot(222)
G=20*log10(abs(src_fut)+1e-6);
gm=max(max(G));
gn=gm-40;%显示动态范围40dB
G=255/(gm-gn)*(G-gn).*(G>gn);
imagesc(fu,r-Rc,-G),colormap(gray)
grid on,axis tight,
xlabel('Azimuth')
ylabel('Range')
title('(b)距离多普勒域频谱')
subplot(223)
G=20*log10(abs(s2rc_fut)+1e-6);
gm=max(max(G));
gn=gm-40;%显示动态范围40dB
G=255/(gm-gn)*(G-gn).*(G>gn);
imagesc(fu,r-Rc,-G),colormap(gray)
grid on,axis tight,
xlabel('Azimuth')
ylabel('Range')
title('(c)RMC后的RD域频谱')
subplot(224)
G=20*log10(abs(s2rcac_ut)+1e-6);
gm=max(max(G));
gn=gm-60;%显示动态范围40dB
G=255/(gm-gn)*(G-gn).*(G>gn);
imagesc(x,r-Rc,G),colormap(gray)
grid on,axis tight,
xlabel('Azimuth')
ylabel('Range')
title('(d)目标图象')追问
怎么直接复制了一个点目标回波程序阿。还是辛苦你了。
追答我做点目标,你参考下!
追问我想要数据处理的那程序,你会吗?点目标的我已经有了。
本回答被提问者采纳智能驾驶基于合成雷达的传感器融合的智能驾驶MATLAB仿真
% Define an empty scenario.
scenario = drivingScenario;
scenario.SampleTime = 0.01;
%%
% Add a stretch of 500 meters of typical highway road with two lanes. The
% road is defined using a set of points, where each point defines the center of
% the road in 3-D space.
roadCenters = [0 0; 50 0; 100 0; 250 20; 500 40];
road(scenario, roadCenters, 'lanes',lanespec(2));
%%
% Create the ego vehicle and three cars around it: one that overtakes the
% ego vehicle and passes it on the left, one that drives right in front of
% the ego vehicle and one that drives right behind the ego vehicle. All the
% cars follow the trajectory defined by the road waypoints by using the
% |trajectory| driving policy. The passing car will start on the right
% lane, move to the left lane to pass, and return to the right lane.
% Create the ego vehicle that travels at 25 m/s along the road. Place the
% vehicle on the right lane by subtracting off half a lane width (1.8 m)
% from the centerline of the road.
egoCar = vehicle(scenario, 'ClassID', 1);
trajectory(egoCar, roadCenters(2:end,:) - [0 1.8], 25); % On right lane
% Add a car in front of the ego vehicle
leadCar = vehicle(scenario, 'ClassID', 1);
trajectory(leadCar, [70 0; roadCenters(3:end,:)] - [0 1.8], 25); % On right lane
% Add a car that travels at 35 m/s along the road and passes the ego vehicle
passingCar = vehicle(scenario, 'ClassID', 1);
waypoints = [0 -1.8; 50 1.8; 100 1.8; 250 21.8; 400 32.2; 500 38.2];
trajectory(passingCar, waypoints, 35);
% Add a car behind the ego vehicle
chaseCar = vehicle(scenario, 'ClassID', 1);
trajectory(chaseCar, [25 0; roadCenters(2:end,:)] - [0 1.8], 25); % On right lane
%% Define Radar Sensors
% Simulate an ego vehicle that has 6 radar sensors and
% The ego vehicle is equipped with a
% long-range radar sensor. Each side of the vehicle has two short-range radar
% sensors, each covering 90 degrees. One sensor on each side covers from
% the middle of the vehicle to the back. The other sensor on each side
% covers from the middle of the vehicle forward. The figure in the next
% section shows the coverage.
sensors = cell(6,1);
% Front-facing long-range radar sensor at the center of the front bumper of the car.
sensors1 = radarDetectionGenerator('SensorIndex', 1, 'Height', 0.2, 'MaxRange', 174, ...
'SensorLocation', [egoCar.Wheelbase + egoCar.FrontOverhang, 0], 'FieldOfView', [20, 5]);
% Rear-facing long-range radar sensor at the center of the rear bumper of the car.
sensors2 = radarDetectionGenerator('SensorIndex', 2, 'Height', 0.2, 'Yaw', 180, ...
'SensorLocation', [-egoCar.RearOverhang, 0], 'MaxRange', 174, 'FieldOfView', [20, 5]);
% Rear-left-facing short-range radar sensor at the left rear wheel well of the car.
sensors3 = radarDetectionGenerator('SensorIndex', 3, 'Height', 0.2, 'Yaw', 120, ...
'SensorLocation', [0, egoCar.Width/2], 'MaxRange', 30, 'ReferenceRange', 50, ...
'FieldOfView', [90, 5], 'AzimuthResolution', 10, 'RangeResolution', 1.25);
% Rear-right-facing short-range radar sensor at the right rear wheel well of the car.
sensors4 = radarDetectionGenerator('SensorIndex', 4, 'Height', 0.2, 'Yaw', -120, ...
'SensorLocation', [0, -egoCar.Width/2], 'MaxRange', 30, 'ReferenceRange', 50, ...
'FieldOfView', [90, 5], 'AzimuthResolution', 10, 'RangeResolution', 1.25);
% Front-left-facing short-range radar sensor at the left front wheel well of the car.
sensors5 = radarDetectionGenerator('SensorIndex', 5, 'Height', 0.2, 'Yaw', 60, ...
'SensorLocation', [egoCar.Wheelbase, egoCar.Width/2], 'MaxRange', 30, ...
'ReferenceRange', 50, 'FieldOfView', [90, 5], 'AzimuthResolution', 10, ...
'RangeResolution', 1.25);
% Front-right-facing short-range radar sensor at the right front wheel well of the car.
sensors6 = radarDetectionGenerator('SensorIndex', 6, 'Height', 0.2, 'Yaw', -60, ...
'SensorLocation', [egoCar.Wheelbase, -egoCar.Width/2], 'MaxRange', 30, ...
'ReferenceRange', 50, 'FieldOfView', [90, 5], 'AzimuthResolution', 10, ...
'RangeResolution', 1.25);
%% Create a Tracker
% Create a |<matlab:doc('multiObjectTracker') multiObjectTracker>| to track
% the vehicles that are close to the ego vehicle. The tracker uses the
% |initSimDemoFilter| supporting function to initialize a constant velocity
% linear Kalman filter that works with position and velocity.
%
% Tracking is done in 2-D. Although the sensors return measurements in 3-D,
% the motion itself is confined to the horizontal plane, so there is no
% need to track the height.
%% TODO*
%Change the Tracker Parameters and explain the reasoning behind selecting
%the final values. You can find more about parameters here: https://www.mathworks.com/help/driving/ref/multiobjecttracker-system-object.html
tracker = multiObjectTracker('FilterInitializationFcn', @initSimDemoFilter, ...
'AssignmentThreshold', 30, 'ConfirmationParameters', [4 5], 'NumCoastingUpdates', 5);
positionSelector = [1 0 0 0; 0 0 1 0]; % Position selector
velocitySelector = [0 1 0 0; 0 0 0 1]; % Velocity selector
% Create the display and return a handle to the bird's-eye plot
BEP = createDemoDisplay(egoCar, sensors);
%% Simulate the Scenario
% The following loop moves the vehicles, calls the sensor simulation, and
% performs the tracking.
%
% Note that the scenario generation and sensor simulation can have
% different time steps. Specifying different time steps for the scenario
% and the sensors enables you to decouple the scenario simulation from the
% sensor simulation. This is useful for modeling actor motion with high
% accuracy independently from the sensor's measurement rate.
%
% Another example is when the sensors have different update rates. Suppose
% one sensor provides updates every 20 milliseconds and another sensor
% provides updates every 50 milliseconds. You can specify the scenario with
% an update rate of 10 milliseconds and the sensors will provide their
% updates at the correct time.
%
% In this example, the scenario generation has a time step of 0.01 second,
% while the sensors detect every 0.1 second. The sensors return a logical
% flag, |isValidTime|, that is true if the sensors generated detections.
% This flag is used to call the tracker only when there are detections.
%
% Another important note is that the sensors can simulate multiple
% detections per target, in particular when the targets are very close to
% the radar sensors. Because the tracker assumes a single detection per
% target from each sensor, you must cluster the detections before the
% tracker processes them. This is done by the function |clusterDetections|.
% See the 'Supporting Functions' section.
toSnap = true;
while advance(scenario) && ishghandle(BEP.Parent)
% Get the scenario time
time = scenario.SimulationTime;
% Get the position of the other vehicle in ego vehicle coordinates
ta = targetPoses(egoCar);
% Simulate the sensors
detections = ;
isValidTime = false(1,6);
for i = 1:6
[sensorDets,numValidDets,isValidTime(i)] = sensorsi(ta, time);
if numValidDets
detections = [detections; sensorDets]; %#ok<AGROW>
end
end
% Update the tracker if there are new detections
if any(isValidTime)
vehicleLength = sensors1.ActorProfiles.Length;
detectionClusters = clusterDetections(detections, vehicleLength);
confirmedTracks = updateTracks(tracker, detectionClusters, time);
% Update bird's-eye plot
updateBEP(BEP, egoCar, detections, confirmedTracks, positionSelector, velocitySelector);
end
% Snap a figure for the document when the car passes the ego vehicle
if ta(1).Position(1) > 0 && toSnap
toSnap = false;
snapnow
end
end
D203
以上是关于合成孔径雷达回波数据处理MATLAB程序的主要内容,如果未能解决你的问题,请参考以下文章
雷达回波基于matlab天气观测极化雷达回波仿真含Matlab源码 2252期
雷达通信基于matlab NCP算法SAR回波生成和成像含Matlab源码 1185期