main.m

来自「OFDM multipath fading channel model jake」· M 代码 · 共 73 行

M
73
字号
% main.m
% Use ITU-R M.1225 Ped A & Veh A as the delay profile to model multipath channel

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use Ped A with speed 3 km/h to show the diagrams of fading envelope and pdf,
% phase response and pdf, doppler psd and autocorrelation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% initialize variables
name = ' for Ped with 3 km/h';
indoor = 1;
singlePulse = 0;
[idata, qdata, nsamp, tstp, fs, fc, fm, NN, N1_arr, velocity, ...
    counter_arr, delay_time, attn, flat]=setPara(indoor, singlePulse)

% Generate single path fading
[r, iout, qout] = fade2(idata, qdata, nsamp, tstp, fm, N1_arr(1), counter_arr(1), flat);
FadingEnv(r, name);                 % draw fading envelope and pdf
phase(iout, qout, name);            % draw phase response and pdf
AC_PSD(iout, qout, fm, name);       % draw autocorrelation and Doppler PSD

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use Veh A with speed 120 km/h to show the diagrams of fading envelope and pdf,
% phase response and pdf, doppler psd and autocorrelation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% initialize variables
name = ' for Veh with 120 km/h';
indoor = 0;
singlePulse = 0;
[idata, qdata, nsamp, tstp, fs, fc, fm, NN, N1_arr, velocity, ...
    counter_arr, delay_time, attn, flat]=setPara(indoor, singlePulse)

% Generate single path fading
[r, iout, qout] = fade2(idata, qdata, nsamp, tstp, fm, N1_arr(1), counter_arr(2), flat);
FadingEnv(r, name);                 % draw fading envelope and pdf
phase(iout, qout, name);            % draw phase response and pdf
AC_PSD(iout, qout, fm, name);       % draw autocorrelation and Doppler PSD

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Ped A with speed 3 km/h, to claculate the impulse resonse and transfer
% function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% initialize variables
name = ' for Ped with 3 km/h';
indoor = 1;
singlePulse = 1;
[idata, qdata, nsamp, tstp, fs, fc, fm, NN, N1_arr, velocity, ...
    counter_arr, delay_time, attn, flat]=setPara(indoor, singlePulse)

% Generate multipath fading
[r, iout, qout] = Jake(idata, qdata, nsamp, fs, fc, NN, N1_arr, velocity, counter_arr, delay_time, attn, flat);

% impulse response and transfer function
IR_TF(r, name);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Veh A with speed 120 km/h, to claculate the impulse response and transfer
% function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% initialize variables
name = ' for Veh with 120 km/h';
indoor = 0;
singlePulse = 1;
[idata, qdata, nsamp, tstp, fs, fc, fm, NN, N1_arr, velocity, ...
    counter_arr, delay_time, attn, flat]=setPara(indoor, singlePulse)

% Generate multipath fading
[r, iout, qout] = Jake(idata, qdata, nsamp, fs, fc, NN, N1_arr, velocity, counter_arr, delay_time, attn, flat);

% impulse response and transfer function
IR_TF(r, name);

%***************************** end of file ******************************

⌨️ 快捷键说明

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