?? costw207channelmodel.m
字號:
% Determine sample (1) echo delay times, (2) norm. Doppler frequencies% and (3) initial phases of the Rayleigh portions of a (time-variant)% physical transmission channel according to the European standard COST-% 207 (COoperation in the field of Science & Technology, Project #207).%% function [tau_MHz, fD_norm, psi, tau_pdf] = ...% COST207 (mPDS[, N_echo[, rseed]]])% ----------------------------------------------------------------------% INPUT:% ----------------------------------------------------------------------% mPDS : String designating the desired propagation environment,% i.e. the physical channel, according to COST-207:% - 'TU': "Typical Urban" (non-hilly urban environment),% - 'RA': "Rural Area" (non-hilly rural environment),% - 'BU': "Bad Urban" (hilly urban environment),% - 'HT': "Hilly Terrain" (hilly rural environment).% Note: These environments correspond to different mean power % delay spectra (PDS, "Verzoegerungsleistungsspektren").% N.B.: To obtain environments NOT standardized by COST-207, mPDS% can also be a matrix with entries as in tau_pdf (see o/p).% [N_echo]: Desired number of echo paths (Default: 100).% [rseed] : If this parameter is given, rseed is used to set the % seeds for the random numbers generator. In this way,% the function outputs can be reproduced.% ----------------------------------------------------------------------% OUTPUT:% ----------------------------------------------------------------------% tau_MHz: (Length N_out) col. vector of delay times of the echo paths.% The values of tau_MHz := tau*1MHz = tau/1us are in the range % 0..7 (TU), 0..0.7 (RA), 0..10 (BU), 0..2 and 15..20 (HT).% The histogramm of tau_MHz approaches the pdf of tau, which% is prop. to the mean power delay spectrum indicated by mPDS.% N.B.: N_out may slightly differ from N_echo to satisfy the relative% power ratio between echo clusters (for 'BU' and 'HT', only).% fD_norm: (Length N_out) column vector with norm. Doppler frequencies % fD/max{fD} resulting from echos impinging isotropically on% the mobile unit. The values are in the range -1.0...1.0 and% approximate the Jakes pdf. To unnormalize, multiply by the % maximum Doppler frequency max{fD}:= v*f0/c0, where% - v is the speed of the mobile unit [m/s]% - f0 is the carrier frequency [Hertz]% - c0=3e8 is the speed of light in empty space [m/s].% psi : (Length N_out) column vector containing the initial phases.% The values are uniformly distributed in the range 0..2pi.% tau_pdf: Complete set of parameters describing the pdf of echo delay% times, where row n refers to the n-th echo cluster:% tau_pdf(n,1): exp. decay factor for the echo delay times,% tau_pdf(n,2): minimum of this cluster's delay times [us],% tau_pdf(n,3): range of this cluster's delay times [us],% tau_pdf(n,4): total channel energy portion of this cluster.% If mPDS was a matrix, tau_pdf is identical to mPDS.% ----------------------------------------------------------------------% DERIVATION: M. Benthin, PhD thesis, TU Hamburg-Harburg, 1996, Kap. 3.1% ----------------------------------------------------------------------% AUTHOR : Marcus Benthin, 01.07.92 (name of m-file: "chan207w.m")% Dieter Boss, 01.07.96% ----------------------------------------------------------------------% <------------------------------- max. linewidth for atops ------------------------------------->|function [tau_MHz, fD_norm, psi, tau_pdf] = COST207 (mPDS, N_echo, rseed) % ##### 1. Verzoegerungszeiten tau_MHz ##### if nargin<2, N_echo = 100; end; % Das mittlere Verzoegerungs-Leistungsspektrum (mean power % delay spectrum (mPDS) ist proportional zur Verteilungs- if isstr(mPDS) % dichte der Echo-Laufzeiten tau_MHz, die durch uc be- mPDS = mPDS(find(isletter(mPDS))); % schrieben wird. Der Prototyp fuer ein einfaches Echo- mPDS = upper(mPDS(1:2)); % Cluster hat die Gestalt: p(tau) = alpha*exp(-beta*tau), % 0<=tau<=tauD. Kompliziertere Echo-Profile werden aus % mehreren solcher Cluster superponiert (vgl. BU oder HT). if strcmp(mPDS,'TU')==1 % COST-207 Mobilfunk-Kanalmodell TYPICAL URBAN uc = [ 1.0 0.0 7.0 1.0 ]; elseif strcmp(mPDS,'RA')==1 % COST-207 Mobilfunk-Kanalmodell RURAL AREA uc = [ 9.2 0.0 0.7 1.0 ]; elseif strcmp(mPDS,'BU')==1 % COST-207 Mobilfunk-Kanalmodell BAD URBAN uc = [ 1.0 0.0 5.0 2/3 1.0 5.0 5.0 1/3 ]; % rel. Amplitude: 0.5 elseif strcmp(mPDS,'HT')==1 % COST-207 Mobilfunk-Kanalmodell HILLY TERRAIN uc = [ 3.5 0.0 2.0 0.88 1.0 15.0 5.0 0.12]; % rel. Amplitude: 0.04 else error (sprintf('ERROR (COST207.m): Unknown COST-207 propagation environment "%s"!', mPDS)); end; % Beliebige Mobilfunk-Kanalmodelle else if size(mPDS,2)~=4, error('ERROR (COST207.m): First argument must be a string or a matrix with 4 columns.'); end; uc = mPDS; end; beta = uc(:,1); % Abklingkonstante(n) der Exponentialverteilung(en) tauS = uc(:,2); % Startzeit(en) der Exponentialverteilung(en) in us tauD = uc(:,3); % Dauer der/des Echocluster(s) in us % \int_0^tauD p(tau) dtau = % \int_0^tauD alpha*exp(-beta*tau) dtau = alpha = beta./(1-exp(-beta.*tauD)); % alpha(1-exp(-beta*tauD))/beta != 1 => alpha. % s. Marcus Benthin, Diss., Gl. (3.16) N = round(uc(:,4)*N_echo); % Prozentuale Verteilung von N_echo Exp.Schwingungen N_out = sum(N); % auf die Echogruppen. Damit ist nur die Leistung no_clusters = size(uc,1); % der Rayleigh-Streuung beruecksichtigt. if nargin > 2 rand('seed', rseed); % Generate reconstructable seeds for the uniform end; % random numbers generator (uniformly distributed useeds = round(1e8*rand(no_clusters+2,1)); % between 0 and 1e8). tau_MHz = []; % Auswuerfelung von Echozeiten tau in us (Rayleigh-Anteile) for cl_no = 1:no_clusters % cl_no = cluster number rand('seed', useeds(cl_no)); % s. Marcus Benthin, Diss., Gl. (3.17) tau_MHz = [tau_MHz; -1/beta(cl_no)*log(1-beta(cl_no)/alpha(cl_no)*rand(N(cl_no),1)) + tauS(cl_no)]; end; if nargout > 1 % ##### 2. Norm. Dopplerfrequenzen fD_norm ##### rand('seed', useeds(no_clusters+1)); alpha = pi*rand(N_out,1); % Gleichverteilte Einfallswinkel in (0..pi) fD_norm = cos(alpha); % Jakes-verteilte normierte Dopplerfrequenzen end; % im Intervall -1.0 < fD_norm < 1.0 if nargout > 2 rand('seed', useeds(no_clusters+2)); % ##### 3. Startphasen psi ##### psi = 2*pi*rand(N_out,1); % Gleichverteilte Startphasen in (0..2pi) end if nargout > 3 % ##### 4. Parameters describing the pdf of tau ##### tau_pdf = uc; end;end;% EOF
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -