资源简介
这个例子还可以,对做分组调度算法有帮助,编写语言是c++
代码片段和文件信息
% The codes investigate the performance of a greedy algorithm [1] in OFDM which
% allocates the power to subchannel in optimum way to reach the required
% Data rate
% By Hamid Ramezani 23-Mar-2008
% setting the parameters
numOfSubChannels = 16; % number of subchannels
modBitRate = [0;1;2;4;6];% the provided bit rate bits/Hz/Sec for
% example based on BPSK QPSK 16QAM and
% 64QAM modulation
% zero is required to states that
% subchannels can convey no data
reqSNR =10.^(.1*[-Inf;9;12;18;24]);
% Reqired SNR for the receiving the
% the bits through modulation on 10^-4 BER
% condition ref[2]
% zero is required to states that
% subchannels can convey no power
%Attention
% The single-side noise power spectral density (N0) is assumed to be 1
% otherwise the parameter setting must be modified
% SNR = Pt*CSI^2/(N0*B/N) which is assumed to SNR = Pt*CSI^2 (it is
% a kind of normalization)
requiredRate = 23; % bits/Sec/Hz
% channel coefficient generation
% rayleigh fading channel (with Rician absulute)
CSI = 1/sqrt(2) * abs ( randn(numOfSubChannels1) + ...
sqrt(-1)*randn(numOfSubChannels1));
% calling the mex function
[subChannelrequiredPowersubChannelRate] = ...
greedyAlgSingleUser(requiredRateCSImodBitRate reqSNR);
% Graphical observation
f1 = figure(1);
set(f1‘color‘[1 1 1]);
subplot(221)
bar(subChannelRate)
xlabel(‘Subchannel Indice‘);
ylabel(‘number of bits conveied by subchannels‘);
subplot(222)
bar(10*log10(subChannelrequiredPower))
xlabel(‘Subchannel Indice‘);
ylabel(‘amount of power required by subchannels in dB‘);
subplot(223)
bar(20*log10(CSI))
xlabel(‘Subchannel Indice‘);
ylabel(‘channel response in different subchannels‘);
subplot(224)
bar(10*log10(subChannelrequiredPower./(CSI.^2)))
xlabel(‘Subchannel Indice‘);
ylabel(‘SNR in different subchannels‘);
% References
% Ref[1] C. Y. Wong R. S. Cheng K. B. Letaief and R. Murch “Multiuser
% OFDM with Adaptive Subcarrier Bit and Power Allocation“ IEEE
% Journal on Selected Areas In Communications Vol. 17 No. 10
% OCTOBER 1999
% Ref[2] Y. Zhang and K. B. Letaief 揗ultiuser Adaptive Subcarrier-and-Bit
% Allocation With Adaptive Cell Selection for OFDM Systems? IEEE Transaction
% on wireless communications Vol. 3 No. 5 Sep 2004
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2913 2008-03-23 20:01 GreedyAlgOfdmExample.m
文件 5803 2008-03-23 19:13 greedyAlgSingleUser.c
文件 7168 2008-03-23 19:13 greedyAlgSingleUser.mexw32
- 上一篇:图形学实验 二维图形的几何变换
- 下一篇:围棋C语言代码要满十字
评论
共有 条评论