www.pudn.com > tfarma10.rar > GM_generate.m, change:2004-10-20,size:1947b


function  h= GM_generate

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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/3.75*2; % 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

alpha= [alpha(1); alpha; alpha(end)];

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(T,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šnge
%     W=W(:,8:519);          %abschneiden auf die dimension 256:512
%     figure; tf_show(W); drawnow;    

end; % k

%W=W/KK;