jakesmodel.m

来自「Jakes Model + Rayleigh Channel + Time Se」· M 代码 · 共 65 行

M
65
字号
%%%%%%%%%%%%%    Jakes Model       %%%%%%%%%%%%%%%
function [model,time]=JakesModel(p,Fm,T)  %%%%  

%%% fm         :  Max Doppler shift
%%% T          :  Sampling interval
%%% num        :  Sampling Point
%%% P          :  Factor of Correlation Time/Sampling Interval(if want to observe the time selective fading, observe time must longer than Correlation Time, so, total number of sampling points must larger than P)
%%% M          :  Order of Jakes Model  16
%%% N          :  Number of the arrive phases that are uniformly distributed   4M+2 
%%% a          :  Max arrive phase of the multipaths   0 (2*pi)
%%% Begain     :  Simulation begaining time
%%% bn         :  Arrive phase of the nth. multipath
%%% fn         :  Doppler shift of the nth. multipath
%%% Ibrc       :  I branch of the model
%%% Qbrc       :  Q branch of the model
%%% Model      :  Jakes Model outcome
%%% time       :  Simulation time


%%%%%%%%%%%%%%%%%%%%   Define Parameters   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fm=Fm; P=p;
M=16; N=4*M+2;
a=0;
Begain=1000;
Tc=1/fm;              %Correlation Time
T=Tc/P;               %     Sampling Interval Time << Correlation Time
num=0;


%%%%%%%%%%%%%%%%%%%%   Model Design   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for t=Begain+T:T:(Begain+100*Tc)     % insure that the observe time is longer than a Correlation Time
    num=num+1;
    Ibrc=0;Qbrc=0;
  for n=1:M
    bn=pi*n/M; 
    fn=fm*cos(2*pi*n/N);
    Ibrc=Ibrc+sqrt(2/(M+1))*cos(bn)*cos(2*pi*fn*t); %%%% Energy normolized
    Qbrc=Qbrc+sqrt(2/(M))*sin(bn)*cos(2*pi*fn*t);   %%%% Energy normolized
  end;
  Ibrc=Ibrc+sqrt(1/(M+1))*cos(a)*cos(2*pi*fm*t);
  Qbrc=Qbrc+sqrt(1/(M))*sin(a)*cos(2*pi*fm*t);
  Model(num)=Ibrc+Qbrc*i;
 end;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Time=T*(1:length(Model));

%%%%%%%%%%%%%%%%%%   Return   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
model=Model;     %%%model
time=Time;













⌨️ 快捷键说明

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