📄 sim_nwssus_3.m
字号:
function [h , W]= sim_nwssus_3(a)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% GLOBAL PARAMETERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fc=2e9; % carrier frequency
c0=3e8; % speed of light
v = 2; % m/s mobile speed
nu_max = v*fc/c0; % maximum Doppler
fs = 80; % sampling frequency in Hz
Trep = 1/fs; % duration between snapshots
Td = 12; % overall duration in seconds
T = Td*fs; % overall duration in samples
alpha = [ -pi/2*ones(4*fs,1); ((1:4*fs)'-1-fs*2)/(2*fs)*pi/2; pi/2*ones(4*fs,1)];
%% angle between mobile and path #2
dalpha = 3/180*pi; %% angular spread of both paths
LL = 100; % no. of subpaths for each path
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LSF averaging (uses TF-Box)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
KK = 1; % number of channel realizations
L1=96; % window length #1
L2=16; % window length #2
W=zeros(256,T+L2-1); % LSF initialization
L=zeros(960,1,4,4);
for k=1:KK; %k,
h=zeros(T,1);
aa1 = 4*randn; % mean strength of path #1
aa2 = 6*randn; % mean strength of path #2
aa1=0; aa2=0;
a1 = filter([.1 .4 .4 .1],1,rand(LL,1)); % mean strength of subpaths for path #1
a2 = filter([.2 .3 .3 .2],1,rand(LL,1)); % mean strength of path #1
for i=1:LL,
h = h + (aa1+a1(i))*exp(j*2*pi*cumsum( nu_max*cos(-alpha + pi/2 + dalpha*(2*rand-1) ) )/fs +j*2*pi*rand); % path #1, subpath #i
h = h + (aa2+a2(i))*exp(j*2*pi*cumsum( nu_max*cos( alpha + dalpha*(2*rand-1) ) )/fs +j*2*pi*rand); % path #2, subpath #i
end; % i
% W = W + wd(h,symmpad(hamming(L1),256),hamming(L2)); %% update LSF estimate
W = wd(h(224:735),symmpad(hamming(L1),256),hamming(L2)); %% mit einem h von 512 l鋘ge
W=W(:,8:519); %abschneiden auf die dimension 256:512
% figure; tf_show(W); drawnow;
end; % k
W=W/KK;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -