www.pudn.com > tryGUI.rar > UWB_SV_channel.m


function h=UWB_SV_channel(num_channels,cm_num,ts) 
% S-V channel model evaluation 
% Input Parameters: 1. ts is sampling time (nsec) 
%                   2. num_channels is the number of channel impulse responses to generate 
%                   3. cm_num is the channel model number from 1 to 4 
% Output Parameters: h is the discrete-timeimpulse response at time resolution ts. 
 
no_output_files = 0;  % non-zero: avoids writing output files of continuous-time responses 
randn('state',12);    % initialize state of function for repeatability 
rand('state',12);     % initialize state of function for repeatability 
% get channel model params based on this channel model number 
[Lam,lambda,Gam,gamma,std_ln_1,std_ln_2,nlos,std_shdw] = uwb_sv_params( cm_num ); 
%fprintf(1,['Model Parameters\n' ... 
  %'  Lam = %.4f, lambda = %.4f, Gam = %.4f, gamma = %.4f\n' ... 
  %'  std_ln_1 = %.4f, std_ln_2 = %.4f, NLOS flag = %d, std_shdw = %.4f\n'], ... 
  %Lam, lambda, Gam, gamma, std_ln_1, std_ln_2, nlos, std_shdw); 
 
% get a bunch of realizations (impulse responses) 
[h_ct,t_ct,t0,np] = uwb_sv_model_ct( Lam, lambda, Gam, gamma, std_ln_1, std_ln_2, nlos, ... 
                  std_shdw, num_channels ); 
% now reduce continuous-time result to a discrete-time result 
[hN,N] = uwb_sv_cnvrt_ct( h_ct, t_ct, np, num_channels, ts ); 
% if we wanted complex baseband model or to impose some filtering function, 
% this would be a good place to do it 
if N > 1, 
  h = resample(hN, 1, N);  % decimate the columns of hN by factor N 
else 
  h = hN; 
end 
% correct for 1/N scaling imposed by decimation 
h = h * N; 
h=h./(ones(size(h,1),1)*sum(h.*h));%对信道进行能量归一化