脉冲压缩及MATLAB仿真（二）

①、MATLAB 源码

stretch.m

function [y] = stretch(nscat,taup,f0,b,rrec,scat_range,scat_rcs,winid)
eps = 1.0e-16;              % 未用到
htau = taup / 2.;           % 未用到
c = 3.e8;
trec = 2. * rrec / c;       % 接收窗时间大小
n = fix(2. * trec * b);     % 所要求的最小样本数，足以完全描述时宽为接收窗大小，带宽为 b 的 LFM 波形
m = power_integer_2(n);     % 计算一个大于等于 n 的最小的 2 的整数幂。
nfft = 2.^m;                % 接收窗 FFT 的长度
x(nscat,1:n) = 0.;
y(1:n) = 0.;
if( winid == 0.)
win(1:n) = 1.;
win =win';
else
if(winid == 1.)
win = hamming(n);
else
if( winid == 2.)
win = kaiser(n,pi);
else
if(winid == 3.)
win = chebwin(n,60);
end
end
end
end
deltar = c / 2. / b;            % 每个带宽单位内的传播时间
max_rrec = deltar * nfft / 2.;  % 最大可接收的传播距离
maxr = max(scat_range);
if(rrec > max_rrec | maxr >= rrec ) % 判断接收窗口的大小是否合理
'Error. Receive window is too large; or scatterers fall outside window'
return
end
t = linspace(0,taup,n);
% 通过循环计算每个散射体对应的压缩回波信号。首先，根据散射体的距离 range 计算相位 psi1 和 psi2，然后使用指数函数计算每个散射体对应的回波信号，并将其累加到 y 中。
for j = 1:1:nscat
range = scat_range(j);% + rmin;     % 目标距离
psi1 = 4. * pi * range * f0 / c - ...
4. * pi * b * range * range / c / c/ taup;
psi2 = (2*4. * pi * b * range / c / taup) .* t;
x(j,:) = scat_rcs(j) .* exp(i * psi1 + i .* psi2);
y = y + x(j,:);
end
figure(1)
plot(t,real(y),'k')
xlabel ('Relative delay - seconds')
ylabel ('Uncompressed echo')
grid
ywin = y .* win';
yfft = fft(y,n) ./ n;
out= fftshift(abs(yfft));
figure(2)
delinc = rrec/ n;
%dist = linspace(-delinc-rrec/2,rrec/2,n);
dist = linspace((-rrec/2), rrec/2,n);
plot(dist,out,'k')
xlabel ('Relative range in meters')
ylabel ('Compressed echo')
axis auto
grid

test.m

clear all
close all
nscat = 3;      % three point scatterers
taup = 1e-2;    % 10 millisecond uncompressed pulse
f0 = 5.6e9;     % 5.6 GHz
b = 1e9;        % 1 GHz bandwdith
rrec = 30;      % 30 meter processing window
scat_range = [2 5 10] ; % scattterers are 2 and 5 and 10 meters into window
scat_rcs = [1 1 2]; % RCS 1 m^2 and 1m^2 and 2m^2
winid = 2; % kaiser window
[y] = stretch(nscat,taup,f0,b,rrec,scat_range,scat_rcs,winid);

3、目标速度引起的失真

①、MATLAB 源码

% use this program to reproduce Fig. 5.14 of text
clear all
eps = 1.5e-5;
t = 0:0.001:.5;
y = chirp(t,0,.25,20);
figure(1)
plot(t,y);
yfft = fft(y,512) ;
ycomp = fftshift(abs(ifft(yfft .* conj(yfft))));
maxval = max (ycomp);
ycomp = eps + ycomp ./ maxval;
figure(1)
del = .5 /512.;
tt = 0:del:.5-eps;
plot (tt,ycomp,'k')
axis tight
xlabel ('Relative delay - seconds');
ylabel('Normalized compressed pulse')
grid
%change center frequency
y1 = chirp (t,0,.25,21);
y1fft = fft(y1,512);
y1comp = fftshift(abs(ifft(y1fft .* conj(yfft))));
maxval = max (y1comp);
y1comp = eps + y1comp ./ maxval;
figure(2)
plot (tt,y1comp,'k')
axis tight
xlabel ('Relative delay - seconds');
ylabel('Normalized compressed pulse')
grid
%change pulse width
t = 0:0.001:.45;
y2 = chirp (t,0,.225,20);
y2fft = fft(y2,512);
y2comp = fftshift(abs(ifft(y2fft .* conj(yfft))));
maxval = max (y2comp);
y2comp = eps + y2comp ./ maxval;
figure(3)
plot (tt,y2comp,'k')
axis tight
xlabel ('Relative delay - seconds');
ylabel('Normalized compressed pulse')
grid

三、资源自取

|
7天前
|

58 29
|
7天前
|

51 16
|
2天前
|

3D-MIMO信道模型的MATLAB模拟与仿真

9 1
|
2天前
|

8 0
|
2天前
|

6 0
|
1月前
|

【2023高教社杯】D题 圈养湖羊的空间利用率 问题分析、数学模型及MATLAB代码

103 6
|
1月前
|

【2022年华为杯数学建模】B题 方形件组批优化问题 方案及MATLAB代码实现

74 3
|
1月前
|

【2023五一杯数学建模】 B题 快递需求分析问题 建模方案及MATLAB实现代码

59 0
|
4月前
|

271 1
|
4月前

119 1