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

📄 jakes_model_2.m

📁 using Jakes model to simulate rayleigh channel fading
💻 M
字号:
%%%%%%%%%%%%%    Main      %%%%%%%%%%%%%%% 
%%% CarrierFrq :  Carrier Frequence  2GHz 
%%% VehicSpd   :  Vehicular Speed  3 / 120(Km/h)  =  0.8333  / 33.3333(m/s) 
%%% C          :  Speed of the light  3e8 m/s 
%%% fm         :  Max Doppler shift 
%%% Tc         :  Correlation Time  1/fm 
%%% T          :  Sampling interval 
%%% No         :  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) 
%%% Model      :  Jakes Model outcome 
%%% Envelop    :  Jakes Model Envelop 
%%% Phase      :  Jakes Model Phase 
%%% PDF        :  Probability Density Functions of the model 
%%% Time       :  Simulation time 
 
clear; 
clc; 
%%%%%%%%%%%%%%%%%%%%   Define Parameters   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
CarrierFrq=2e9; 
VehicSpd=33.333333333333333; 
C=3e8; 
fm=VehicSpd*CarrierFrq/C; 
Tc=1/fm;              %Correlation Time 
P=10;            
T=Tc/P;               %     Sampling Interval Time << Correlation Time 
%T=4.5000e-006; 
discard=P*20;         %%First 10 Correlation Time can not be used; 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
[Model,Time]=JakesModel(P,fm,T); 
No=length(Model); 
Envelop=abs(Model); 
Phase=angle(Model)/pi; 
[PDF_E,x_axis_E]=hist(Envelop,20); 
PDF_E=PDF_E/No; 
[PDF_P,x_axis_P]=hist(Phase,100); 
PDF_P=PDF_P/No; 
 
%%%%%%%%%%%%%%%%%%%%%%%%%          PLOT             %%%%%%%%%%%%%% 
figure(1); 
PlotEnvelop(Envelop,Time); 
figure(2); 
PlotPdf(x_axis_E,PDF_E); 
figure(3); 
PlotPhase(Phase,Time); 
figure(4); 
PlotPdf(x_axis_P,PDF_P); 
 
%%%%%%%%%%%%%%   Autocorr   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
Auto_corr=Autocorr(Model); 
figure(5); 
PlotAutocorr(Auto_corr,Time); 
 
%%%%%%%%%%%   Plot U_Ship Spectrum   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
PlotSpectrum(real(Model),Time(length(Time))); 
 
%%%%%%%%%%%   Plot  Delay   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
PlotDelay; 

⌨️ 快捷键说明

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