function [h,t,t0,np]=SV_model_ct(Lam,lam,Gam,gam,num_ch,b002,sdi,nlos)
% S-V channel model
% Input
% Lam : Cluster arrival rate in GHz (avg # of clusters per nsec)
% lam : Ray arrival rate in GHz (avg # of rays per nsec)
% Gam : Cluster decay factor (time constant, nsec)
% gam : Ray decay factor (time constant, nsec)
% num_ch : number of random realizations to generate
% b002 : power of first ray of first cluster
% sdi : Standard deviation of log-normal shadowing
% of entire impulse response [dB]
% nlos : Flag to specify generation of Non Line Of Sight channels
% Output
% h: a matrix with num_ch columns, each column
% having a random realization of channel model (impulse response)
% t: organized as h, but holds the time instances (in nsec) of the
% paths whose signed amplitudes are stored in h
% t0: the arrival time of the first cluster for each realization
% np: the number of paths for each realization.
% Thus, the k'th realization of the channel impulse response is the
% sequence of (time,value) pairs given by(t(1:np(k),k),h(1:np(k),k))
if nargin<8
nlos=0;
end % LOS environment
if nargin<7
sdi=0;
end % 0dB
if nargin<6
b002=1;
end % power of first ray of first cluster
h_len=1000; %There must be a better estimate of # of paths than???
for k=1:num_ch % loop over number of channels
tmp_h = zeros(h_len,1);
tmp_t = zeros(h_len,1);
if nlos
Tc = exprnd(1/Lam); % First cluster random arrival
else
Tc = 0; % First cluster arrival occurs at time 0
end
t0(k) = Tc;
path_ix = 0;
while (Tc<10*Gam) % cluster loop
% Determine Ray arrivals for each cluster
Tr=0; %1st ray arrival defined to be time 0 relative to cluster
while (Tr<10*gam) % ray loop
brm2 = b002*exp(-Tc/Gam)*exp(-Tr/gam); % ray power (2.20)
r = sqrt(randn^2+randn^2)*sqrt(brm2/2);
% rayleigh distributed mean power pow_bkl
h_val=exp(j*2*pi*rand)*r; % uniform phase
path_ix = path_ix+1; % row index of this ray
tmp_h(path_ix) = h_val;
tmp_t(path_ix) = Tc+Tr; % time of arrival of this ray
Tr = Tr + exprnd(1/Lam); % (2.16) ???
end
Tc = Tc + exprnd(1/lam); % (2.17) ???
end
np(k)=path_ix; % number of rays (or paths) for this realization
[sort_tmp_t,sort_ix] = sort(tmp_t(1:np(k))); %in ascending order
t(1:np(k),k) = sort_tmp_t;
h(1:np(k),k) = tmp_h(sort_ix(1:np(k)));
% now impose a log-normal shadowing on this realization
fac = 10^(sdi*randn/20)/sqrt(h(1:np(k),k)'*h(1:np(k),k));
h(1:np(k),k) = h(1:np(k),k)*fac; % (2.21)
end
Saleh-Valenzuela信道模型_通信
版权申诉
5星 · 超过95%的资源 157 浏览量
2022-09-21
02:54:05
上传
评论 2
收藏 33KB ZIP 举报
我虽横行却不霸道
- 粉丝: 75
- 资源: 1万+
最新资源
- Panoply软件是大名鼎鼎的NASA下属的GISS研究所开发的可视化软件,该软件可以实现对地学常用数据的读取,其中包括netC
- 一些高质量的学习Ruby的资源清单.zip
- 基于STM32智能家居(智能云)
- 适合江苏地带的别墅小院子图纸D038-两层-11.04&11.94米-施工图.dwg
- 农村小别墅图纸四合院图纸D037-两层-13.20&12.90米-施工图.dwg
- 农村别墅系列图纸cad图纸D035-两层-10.20&14.70米- 施工图.dwg
- Verilog硬件仿真过程中出现的X态总结
- 中国各省份2012-2020年政府财政支出占GDP的比重
- 旅游管理系统毕业设计+计算机专业本科毕业设计+Vue+JS框架
- 农村小别墅二层小楼图纸D034-两层-11.40&14.70米- 施工图.dwg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论12