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

📄 maimpathchannel.m

📁 用matlab程序实现WCDMA系统的仿真
💻 M
字号:
function y=MaiMpathChannel(MAIUplinkSignal,MPathDelay,MPathAmpl,fDoppler,SamplesPerChip,cnt)
%******************************************************************************
%function y=MaiMpathChannel(MAIUplinkSignal,MPathDelay,MPathAmpl,fDoppler)
%
% Copyright 2002 The Mobile and Portable Radio Research Group
%
%Generates the approximate multipath response for a particular Mutual Access 
%Interference (MAI) signal.  The number of multipath components is equal to the
%length of "MPathDelay", which contains the relative delay of each component in
%terms of signal samples.  For each multipath component the input signal,
%"MAIUplinkSignal", is shifted IN A CIRCULAR FASHION by the number of samples
%specified in "MPathDelay".  Then, the shifted signal is then multiplied by 
%a fading signal whose average power equals the corresponding value in 
%"MPathAmpl".  The bandwidth of the fading signal is determined by the Doppler
%spread, "fDoppler".  
%
%The multipath components are then summed together to form the overal multipath 
%response
%
%Parameters
%   Input
%      MAIUplinkSignal   vector   Uplink signal from one interferer
%      MPathDelay        vector   Relative delay of each multipath component
%                                 expressed in terms of signal samples
%      MPathAmpl         vector   Average power in each multipath component
%      fDoppler          scalar   Doppler spread in Hz
%      SamplesPerChip    scalar   SamplesPerChip
%   Output
%      y                 vector   Response of signal due to the multipath channel
%******************************************************************************
MPathComponents=length(MPathDelay);
ChipsPerFrame=38400;
FrameDuration=10e-3;
SampleRate=SamplesPerChip*ChipsPerFrame/FrameDuration;
SigLength=length(MAIUplinkSignal);
SigDuration=SigLength/SampleRate;
FadeSampleRate=20/SigDuration;
if length(MPathAmpl) ~= MPathComponents
   error('MPathDelay and MPathAmpl must have the same length');
end
increment=(SigLength-1)/20;
%Abcissa for data points
x=1:increment:(SigLength);
%Abcissa for interpolation
xi=1:SigLength;
y=zeros(1,SigLength);
for k=1:MPathComponents
   %Get Fading sample values
   FadeSamples=MPathAmpl(k)*rayleigh(fDoppler,FadeSampleRate,21);
%   Fade=interp1(x,FadeSamples,xi,'*cubic');
   Fade=WCDMACubicInterp(x,FadeSamples,xi).';
   y=y+Fade.*[MAIUplinkSignal((SigLength-MPathDelay(k)+1):SigLength) MAIUplinkSignal(1:(SigLength-MPathDelay(k)))];
end

   
   
   

⌨️ 快捷键说明

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