⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gen_jake2.m

📁 R. Lin and A.P. Petropulu, 揂 New Wireless Medium Access Protocol Based On Cooperation,擨EEE Trans. on
💻 M
字号:
%Gen_Jake
% sum of sinusoids simulation model (improved jakes model)
function Zt=Gen_Jake2(Fd,Ts,Block_Num, seed)
%for one simulation, only generate 1 thetha, M phi1 and M phi2
%Fd: Doppler frequency

rand('state',seed);
M=32; %# of sinusoids
thetha=(rand-0.5)*2*pi; %uniform distributed in [-pi,pi)

phi1=(rand(1,M)-0.5)*2*pi;
phi2=(rand(1,M)-0.5)*2*pi;

%ic=[1:Block_Num]';
%t=ic.*Ts; % time

Tstart=ceil(M/Fd/Ts+0.9*rand(1)*M/Fd/Ts);  %Avoid unstable period and set a random start point
%Tstart=ceil(0.9*rand(1)*M/Fd/Ts);
t = Tstart:Tstart+Block_Num-1;
t = t.*Ts;
Zc=zeros(1, Block_Num);
Zs=zeros(1, Block_Num);

for nn=1:M
    alpha=(2*pi*nn-pi+thetha)/(4*M);
    Zc=Zc+cos(2*pi*Fd.*t*cos(alpha)+phi1(nn));
    Zs=Zs+cos(2*pi*Fd.*t*sin(alpha)+phi2(nn));
end

Zt=sqrt(2/M).*complex(Zc,Zs);

%May be omitted
norm=sqrt(mean(abs(Zt).^2));
Zt=Zt/norm;
%Zt=Zt/sqrt(2);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -