资源简介
ofdma 系统中的各种资源分配算法仿真
代码片段和文件信息
function [envIQ]= chtry(userNumsampleNumfm)
%WLAN channel modeling
%Zukang Shen
%04/15/02
%Ts=50e-9*10000*2/20; %time sample interval
Ts=1e-3;
N=200; %number of input waves
n=[0:N-1];
cita=2*pi*n/N; %input angles
for user=1:userNum
alfa1=randn(1N); %magnitudes of input waves tap 1
alfanormed(1:)=alfa1/sqrt(sum(alfa1.^2)); %normalized magnitude tap 1
alfa2=randn(1N); %magnitudes of input waves tap 2
alfanormed(2:)=alfa2/sqrt(sum(alfa2.^2)); %normalized magnitude tap 2
alfa3=randn(1N); %magnitudes of input waves tap 3
alfanormed(3:)=alfa3/sqrt(sum(alfa3.^2)); %normalized magnitude tap 3
alfa4=randn(1N); %magnitudes of input waves tap 4
alfanormed(4:)=alfa4/sqrt(sum(alfa4.^2)); %normalized magnitude tap 4
alfa5=randn(1N); %magnitudes of input waves tap 5
alfanormed(5:)=alfa5/sqrt(sum(alfa5.^2)); %normalized magnitude tap 5
alfa6=randn(1N); %magnitudes of input waves tap 6
alfanormed(6:)=alfa6/sqrt(sum(alfa6.^2)); %normalized magnitude tap 6
phaseinit1=randn(1N);
phaseinit(1:)=phaseinit1*2*pi/max(phaseinit1); %initial phases tap 1
phaseinit2=randn(1N);
phaseinit(2:)=phaseinit2*2*pi/max(phaseinit2); %initial phases tap 2
phaseinit3=randn(1N);
phaseinit(3:)=phaseinit3*2*pi/max(phaseinit3); %initial phases tap 3
phaseinit4=randn(1N);
phaseinit(4:)=phaseinit4*2*pi/max(phaseinit4); %initial phases tap 4
phaseinit5=randn(1N);
phaseinit(5:)=phaseinit5*2*pi/max(phaseinit5); %initial phases tap 5
phaseinit6=randn(1N);
phaseinit(6:)=phaseinit6*2*pi/max(phaseinit6); %initial phases tap 6
%using one-sided exponential profile
to=1*Ts;
tt=[0:5]*Ts;
g=exp(-tt/to);%relative engery for the 6 taps
for j=1:6
for i=0:sampleNum-1
t=i*Ts;
is=g(j)*sum(alfanormed(j:).*cos(2*pi*fm*t*cos(cita)+phaseinit(j:)));
qs=g(j)*sum(alfanormed(j:).*sin(2*pi*fm*t*cos(cita)+phaseinit(j:)));
I(userji+1)=is;
Q(userji+1)=qs;
envs=sqrt(qs^2+is^2);
env(userji+1)=envs;
end
end
end
for i=1:sampleNum
envtmp(i)=env(11i);
end
% figure
% stem([0:sampleNum-1]*Ts 20*log10(envtmp))
% title(‘Rayleigh Fading‘)
% xlabel(‘t‘)
% ylabel(‘r(t)‘)
%
% figure
% stem([0:sampleNum-1]*Ts envtmp)
% title(‘Rayleigh Fading‘)
% xlabel(‘t‘)
% ylabel(‘r(t)‘)
clear alfa1 alfa2 alfa3 alfa4 alfa5 alfa6 alfanormed phaseinit1 phaseinit2 phaseinit3 phaseinit4 phaseinit5 phaseinit6
clear phaseinit is qs envs
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2524 2003-10-11 14:08 SIPS04Matlab\chtry.m
文件 18349 2004-11-15 11:12 SIPS04Matlab\COPYING.txt
文件 422 2004-11-12 15:55 SIPS04Matlab\ReadmeMatlab.txt
文件 2088 2004-11-15 10:37 SIPS04Matlab\rheesub.m
文件 959 2004-11-15 10:38 SIPS04Matlab\rootfinding.m
文件 2472 2004-11-15 10:37 SIPS04Matlab\shenpowerallo.m
文件 5284 2004-11-15 10:36 SIPS04Matlab\SIPS04main.m
文件 1579 2004-11-15 10:38 SIPS04Matlab\waterfilling.m
文件 2167 2004-11-15 10:38 SIPS04Matlab\wongpowerallo.m
文件 2827 2004-11-15 10:38 SIPS04Matlab\wongsuballo.m
- 上一篇:南海诸岛shp
- 下一篇:基于labview图像采集与处理论文(本科设计论文
评论
共有 条评论