?? jakes_model_2.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 + -