脉冲压缩及MATLAB仿真(一)https://developer.aliyun.com/article/1473945
①、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);
②、仿真结果
1) 未压缩回波信号,3个目标不能分辨
2) 压缩回波信号,3个日标可以分辨
3、目标速度引起的失真
当目标径向速度非零时,接受脉冲宽度会被时间膨胀因子扩展(或压缩)。另外,接收脉冲的中心频率会以多普勒频率的大小偏移。
由目标径向速度引起的失真校正可以使用下面方法实现:在几个脉冲的时间内,雷达处理器估计跟踪目标的径向速度,然后改变下一个发射脉冲的chirp斜率和脉冲宽度,以补偿估计出的多普勒频率和时间膨胀。
目标速度引起的失真仿真如下:
①、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
②、仿真结果
1) LFM 信号
2) 脉冲压缩处理器的压缩脉冲输出
3) 失配的压缩脉冲,5%多普勒频移
4) 失配的压缩脉冲,10%时间膨胀
三、资源自取