function y = radar( x, fs, T_0, g, T_out, T_ref, fc, r, a, v )
%RADAR simulate radar returns from a single pulse
%-----
% Usage:
% R = radar( X, Fs, T_0, G, T_out, T_ref, Fc, R, A, V )
%
% X: input pulse (vector containing one pulse for burst)
% Fs: sampling frequency of input pulse(s) [in MHz]
% T_0: start time(s) of input pulse(s) [microsec]
% G: complex gains; # pulses = length(g)
% T_out: 2-vector [T_min,T_max] defines output
% window delay times w.r.t. start of pulse
% T_ref: system "reference" time, needed to simulate
% burst returns. THIS IS THE "t=0" TIME !!!
% Fc: center freq. of the radar. [in MHz]
% R: vector of ranges to target(s) [kilometers]
% A: (complex) vector of target amplitudes
% V: vector of target velocities (optional) [in m/sec]
%
% note(1): VELOCITY in meters/sec !!!
% distances in km, times in microsec, BW in MegaHz.
% note(2): assumes each pulse is constant (complex) amplitude
% note(3): will accommodate up to quadratic phase pulses
% note(4): vector of ranges, R, allows DISTRIBUTED targets
%
%---------------------------------------------------------------
% copyright 1994, by C.S. Burrus, J.H. McClellan, A.V. Oppenheim,
% T.W. Parks, R.W. Schafer, & H.W. Schussler. For use with the book
% "Computer-Based Exercises for Signal Processing Using MATLAB"
% (Prentice-Hall, 1994).
%---------------------------------------------------------------
J = sqrt(-1);
c = 0.3; % velocity of light in km/microsec
r = r(:); a = a(:);
if nargin < 7
v = zeros(length(r),1); end %--- default = 0 m/sec
[Mx, Nx] = size(x);
if Mx == 1
old_Nx = Nx; Mx = Nx; Nx = 1; x = x.';
end
if Nx ~= 1, error('MATRIX x NOT ALLOWED !!!'), end
g = g(:).'; %-- gains of each pulse in burst
delta_t = 1/fs;
T_p = Mx*delta_t; % length of input pulse
t_x = (delta_t)*[0:(Mx-1)]';
x_ph = unwrap(angle(x)); %-- find phase modulation
q = polyfit( t_x, x_ph, 2 ); %-- assume LFM signal
xfit = polyval( q, t_x );
if (x_ph'*xfit)/norm(x_ph)/norm(xfit) < 0.99 %-- correlation coeff
error(' No quadratic phase match!')
end
%
%--- output matrix ---
%
t_y = [ T_out(1):delta_t:T_out(2) ]'; % output sampling times
Mr = length(t_y); Nr = length(g); % output samples in a matrix
y = zeros(Mr,Nr);
for i = 1:length(r)
ri = r(i); vi = v(i)/(10^9); % convert m/sec to km/usec
f_doppler = 2*(vi/c)*fc;
for j = 1:length(g)
r_at_T_0 = ri - vi*T_0(j); %-- toward rcvr: f_doppler > 0
tau = r_at_T_0./(c/2+vi); tmax = tau + T_p;
if tau >= T_out(2) | tmax <= T_out(1)
disp('COMPLETELY OUT OF range window'), ri=ri, i
else
t_in_pulse = t_y - tau;
n_out = find( t_in_pulse >= 0 & t_in_pulse < T_p );
if tau < T_out(1)
disp('BEFORE range window'), ri, end
if tmax > T_out(2)
disp('AFTER range window'), ri, end
if length(n_out) < 1
error('NO OVERLAP ???')
else
%------------------------------
y(n_out,j) = y(n_out,j) + a(i) * g(j) * ...
[ exp( J*2*pi*2*fc*(-r_at_T_0 + vi*t_y(n_out))/c ) ] ...
.* [ exp( J*polyval(q,t_in_pulse(n_out)) ) ];
%-------------------------------
end
end
end
end
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Focusing on MATLAB 5, this book includes a collection of computer exercises and projects that helps students understand the principles of signal processing and experience the excitement of applying abstract mathematical concepts to the processing of real signals.
资源推荐
资源详情
资源评论
收起资源包目录
Computer-Based Exercises for Signal Processing Using MATLAB 5 (127个子文件)
radar.m 3KB
striplot.m 2KB
striplot.m 2KB
fxquant.m 2KB
striplot.m 2KB
zzplane.m 2KB
zzplane.m 2KB
gluedata.m 2KB
tonegen.m 2KB
zplane.m 2KB
tonegen.m 2KB
ccf.m 2KB
welch.m 2KB
waterf.m 2KB
waterf.m 2KB
waterf.m 2KB
tonegen.m 2KB
welch.m 2KB
pkpicker.m 2KB
acf.m 1KB
acf.m 1KB
speccomp.m 1KB
convolm.m 1KB
chopfile.m 1KB
flipdtft.m 1KB
wp.m 1KB
wp.m 1KB
wp.m 1KB
qplot.m 1KB
genint.m 1KB
genint.m 1KB
genint.m 1KB
db.m 1KB
zerofill.m 1KB
lchirp.m 1KB
dtft.m 1KB
atov.m 1KB
atok.m 1024B
autolpc.m 1022B
pseudinv.m 991B
comb.m 979B
chirp.m 978B
test_rad.m 936B
test_rad.m 935B
stem.m 922B
gdel.m 919B
pcross.m 904B
pcross.m 904B
pcross.m 904B
ktoa.m 870B
acimp.m 804B
fmagplot.m 802B
fplot.m 792B
asinc.m 766B
factorit.m 742B
comb.m 738B
mulaw.m 721B
pronysyn.m 699B
srexpand.m 690B
mod.m 622B
comb.m 604B
randn.m 317B
vowels.mat 63KB
s1.mat 48KB
s5.mat 48KB
DJIAdata.mat 38KB
r100.mat 35KB
bat.mat 31KB
BLIdata.mat 15KB
gdeldata.mat 13KB
intfere.mat 9KB
tonemyst.mat 8KB
s1_13.mat 8KB
s1_15.mat 8KB
s1_11.mat 8KB
s1_19.mat 8KB
s5_16.mat 8KB
s5_20.mat 8KB
s5_19.mat 8KB
s1_22.mat 8KB
s1_20.mat 8KB
s1_17.mat 8KB
s5_23.mat 8KB
s1_18.mat 8KB
s5_22.mat 8KB
s5_10.mat 8KB
s5_12.mat 8KB
s5_11.mat 8KB
s1_23.mat 8KB
s1_12.mat 8KB
s5_14.mat 8KB
s1_14.mat 8KB
s5_15.mat 8KB
s1_10.mat 8KB
s5_21.mat 8KB
s5_17.mat 8KB
s1_16.mat 8KB
s5_18.mat 8KB
s5_13.mat 8KB
s1_21.mat 8KB
共 127 条
- 1
- 2
juejuede
- 粉丝: 1
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页