⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multipath_channel_init_typev.m

📁 这个是关于OFDM固定比特仿真平台的源程序代码
💻 M
字号:
function [Path_Delay,Path_Average_Amp] = Multipath_Channel_Init_TypeV(RMS_Delay,Max_Delay,NumOfTaps,NumOfAntennas)
%%-------------------------------------------------------------------------
%% Function discription:
%%-------------------------------------------------------------------------
%% This module is used to generate the Rayleigh multiplied coeffecients for each channel
%% The main channel characteristics are included such as multipath,amplitude , phase and
%% delay. Due to ignoring the doppler frequency offset, the amplitude of data in a frame
%% is not changed. The coeffecients are updataed each frame.
%%-------------------------------------------------------------------------
%% Created by Kan Zheng                           Version: 1.0  2002-11-23
%% Modified by Kan Zheng                          Version: 1.1  2002-11-26
%%             Use the parameter "Path_Average_Amp" instead of "Path_Average_Power"
%%%% Modified by Kan Zheng                        Version: 1.2  2002-12-10
%%             Avoid two paths have same delay value
%%-------------------------------------------------------------------------
%%-------------------------------------------------------------------------

%%-------------------------------------------------------------------------
%% Reference:
%%-------------------------------------------------------------------------
%% Ove Edfors,Magnus Sandell,Jan-Jaap van de Beek, Sarah Kate Wilson and Per Ola B¨ orjesson,
%% "OFDM channel estimation by singular Value Decomposition", 
%% IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 46, NO. 7, pp. 931-939, JULY 1998
%%-------------------------------------------------------------------------

%%-------------------------------------------------------------------------
%% Input:
%%-------------------------------------------------------------------------
%% RMS_Delay: RMS path delay
%% Max_Delay: Maximum path delay
%% NumOfTaps: Number of taps per multipath channel
%% NumOfAntennas: Number of transmission antennas
%%-------------------------------------------------------------------------


%%-------------------------------------------------------------------------
%% Output:
%%-------------------------------------------------------------------------
%% Path_Delay: The delay values of different paths
%% Path_Average_Ampli: The amplitude values of different paths 
%%-------------------------------------------------------------------------


%%-----------------------------------------------------------------------
%% Initialization of parameters for fading generating
%%-----------------------------------------------------------------------


Init_Delay_Flag=1;
while Init_Delay_Flag>0
  Absolute_Path_Delay=floor(rand(1,NumOfTaps)*Max_Delay);            % Path Delay 
  Path_Delay=sort(Absolute_Path_Delay)-min(Absolute_Path_Delay);
  Init_Delay_Flag=0;
  %% Check whether two path delay values are same
  Path_Delay_Diff=diff(Path_Delay);
  for i=1:NumOfTaps-1,
    if(Path_Delay_Diff(i)==0)
       %error('Two path delay values are same!'); 
       Init_Delay_Flag=1;
    end;
  end;
end;

% compute the power of each tap according to a exponetial distribution
Path_Average_Power = exp((-1) * Path_Delay/ RMS_Delay);  

%%-----------------------------------------------------------------------
%% Scale tap powers to total power 1.0 and convert to amplitudes 
%%-----------------------------------------------------------------------
SumOfPower = sum(Path_Average_Power);                             % unify the power
Scaled_Path_Average_Power = Path_Average_Power/ SumOfPower;
Path_Average_Amp = sqrt(Scaled_Path_Average_Power);              % the amplitude of each tap

⌨️ 快捷键说明

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