%改进Jacks动态模型,带有动态增益控制
%参考文献 Simulation models with correct satistical properties for rayleigh
%fading channels.pdf
%by fanrong
function rayleigh_Jascks = Rayleigh_Jacks(Nfading,v,fc,fadinggain_db,Tsample)
%Nfading 衰减信号长度
%v 移动速度km/h
%fc 载频 M
%fadinggain_db 衰减增益_db形式
%------------------------
% clc
% clear all
% Nfading = 1e3;
% v = 3;
% fc = 800;
% fadinggain_db = 0;
% Tsample =50e-4;
%-----------------------
M = 8;
N = 4*M;
fd = (1e9*fc*v)/(3600*3e8);
wd = 2*pi*fd;
%产生3个随机变量
seed = round(100*rand(1,1));
rand('state',seed+11);%产生种子
thita = rand(1,1)*pi - rand(1,1)*pi;%初始到达角
% thita = 0;
rand('state',seed+12);
phi = rand(1,1)*pi - rand(1,1)*pi;
for n_ph = 1:1:M
rand('state',seed+n_ph);
ph(n_ph) = rand(1,1)*pi - rand(1,1)*pi;%产生M个
end
for t = 1:1:Nfading
for n = 1:1:M
alpha(n) = (2*pi*n-pi+thita)/N;
ci_temp(n) = cos(ph(n)) * cos(wd*t*Tsample * cos(alpha(n))+phi);
cq_temp(n) = sin(ph(n)) * cos(wd*t*Tsample * cos(alpha(n))+phi);
end %n = 1:1:M
c1(t) = 2/sqrt(M) * sum(ci_temp);
c2(t) = 2/sqrt(M) * sum(cq_temp);
end %t = 1:1:Nfading
fadinggain = 10^(fadinggain_db /10);
c1 = c1*fadinggain;
c2 = c2*fadinggain;
rayleigh_Jascks = c1+1i*c2;
% figure(1),plot(10*log10(abs(rayleigh_Jascks))),title('Jakes模型Rayleigh衰落包络');
% % 同相自相关
% I_corr = xcorr(c1,'unbiased');
% figure(2),
% % subplot(121),
% plot(I_corr),title('Jakes模型,同相自相关曲线'),hold on;
%
% Q_corr = xcorr(c2,'unbiased');
% figure(2),
% % subplot(121),
% plot(Q_corr,'r--'),title('Jakes模型,正交自相关曲线');
%
% IQ_corr = xcorr(c1,c2,'unbiased');
% figure(4),
% % subplot(122),
% plot(IQ_corr),title('Jakes模型,同相/正交互相关曲线'),hold on;
%
%
%
% % 理想
% M = 8000;
% for n_ph = 1:1:M
% rand('state',seed+n_ph);
% ph(n_ph) = rand(1,1)*pi - rand(1,1)*pi;%产生M个
% end
%
% for t = 1:1:Nfading
% for n = 1:1:M
% alpha(n) = (2*pi*n-pi+thita)/N;
% ci_temp(n) = cos(ph(n)) * cos(wd*t*Tsample * cos(alpha(n))+phi);
% cq_temp(n) = sin(ph(n)) * cos(wd*t*Tsample * cos(alpha(n))+phi);
% end %n = 1:1:M
% c1(t) = 2/sqrt(M) * sum(ci_temp);
% c2(t) = 2/sqrt(M) * sum(cq_temp);
% end %t = 1:1:Nfading
%
% fadinggain = 10^(fadinggain_db /10);
% c1 = c1*fadinggain;
% c2 = c2*fadinggain;
% rayleigh_Jascks = c1+1i*c2;
% IQ_corr1 = xcorr(c1,c2,'unbiased');
% figure(4),
% plot(IQ_corr1,'r--'),title('Jakes模型,同相/正交互相关曲线'),hold on;
Matlab实现reyleigh信道jacks模型仿真程序源码.zip
版权申诉
5星 · 超过95%的资源 9 浏览量
2022-03-27
20:06:42
上传
评论 1
收藏 13KB ZIP 举报
阿里matlab建模师
- 粉丝: 3308
- 资源: 2784
最新资源
- 驱动代码驱动代码驱动代码驱动代码
- SVID_20240523_141155_1.mp4
- Code for the complete guide to tkinter tutorial
- 关于百货中心供应链管理系统.zip
- SimpleFolderIcon-master 修改Unity的Project下的文件夹图标
- A python Tkinter widget to display tile based maps
- A pure Python library for adding tables to a Tkinter application
- Vector资源文件.zip
- MobaXterm-Installer
- 88-520告白(520气球).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈