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

📄 wireless_ul.m

📁 无线信道中上行链路,采用MATLAB进行仿真
💻 M
字号:
%
% filename: wireless_UL.m
%
% function: simulating the UpLink wireless channel (multi-path & rayleigh).
% 
% - UE_send_signal: (K_vc,7040)
% - BS_receive_signal: (N_multi,7040,K_vc)
%
% wangym, 19th,DEC.,2000
%
function BS_receive_signal = wireless_UL(UE_send_signal)

%define the global variable
global TS_clock
global vc_table

global condition_basic
global condition_BS
global condition_UE
global condition_multipath
global condition_rayleigh

%read vc_table
K_vc = vc_table(17,1);						% number of assigned VCs
%get the number of multipath for a user
N_multi=size(condition_multipath,1);
%get the number of antennas in BS 
Ka = condition_basic(1);
Sigma = condition_basic(4);

%get the length of signal 
s_length = size(UE_send_signal,2);

BS_receive_signal = zeros(N_multi,s_length,K_vc);
for k=1:K_vc
   % get the user_ID
   userID = vc_table(k,2);
   for n=1:N_multi
      %path delay							%(1 chip = 781.25ns) (1/8 chip = 97.65625ns)
      path_delay = round(condition_multipath(n,1,userID)/97.65625);				%1/8 chip
      signal1 = zeros(1,s_length);
      signal1(path_delay+1:s_length) = UE_send_signal(k,1:(s_length-path_delay));
      % path attenuation
      path_weight = 10^(condition_multipath(n,2,userID)/10);			%true value(not dB)
      signal2 = signal1 * sqrt(path_weight);
      
      %path phase shift
      path_phase = condition_multipath(n,3,userID);				    	%(radian)
      signal3 = signal2 * exp(j*path_phase);
      %path direction
      
      %rayleigh fading
      Speed = condition_basic(3) ;
      if Speed ~= 0
         multipath_ID = [userID,n];
         %envelope=rayleigh_fading(multipath_ID);
         envelope=rayleigh_fading(multipath_ID)*lognormal(multipath_ID, Sigma);
      else
         envelope=ones(1,s_length);
      end
      BS_receive_signal(n,:,k)=envelope.*signal3;
   end
   %normalized by the total multipath power
   PW(1:N_multi) = 10.^(condition_multipath(1:N_multi,2,userID)/10);	%true value(not dB)
   total_power=sum(PW);
   BS_receive_signal(:,:,k)=BS_receive_signal(:,:,k)/sqrt(total_power);
end

⌨️ 快捷键说明

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