Files
openairinterface5g/openair1/EMOS/MATLAB/capacity_SU_TDMA_ML.m
T
2013-06-25 09:05:02 +00:00

36 lines
1.1 KiB
Matlab
Executable File

function [CAP] = capacity_SU_TDMA_ML(H,SNR,normalize)
%
% [CAP] = capacity_SU_TDMA_ML(H,SNR,normalize)
%
% This function calculates the multiuser (MU) capacity of the channel
% assuming a time-shared single user (SU) MIMO tranmission and a ML receiver.
% The channel gains are normalized, such that E(|h_{i,j}|^2) = 1 hold for
% each user. The avaraging is done over all snapshots and all frequencies.
%
% PARAMETERS
% - H is the input channel (NRx,NTx,Nfreq,NFrames,NUser)
% - SNR is the considered SNR (Linear)
% - normalize is a flag that indicates if the channel should be normalized
%
% RETURNS
% - CAP is the capacity values
% Authors: florian.kaltenberger@eurecom.fr
% Copyright: Eurecom Sophia Antipolis
% Created: 17/10/2007
% Modified last: 12/12/2007 by florian.kaltenberger@eurecom.fr
[NRx,NTx,NFreq,Nframes,NUser] = size(H);
if nargin<3
normalize = 1;
end
CAP_SU = zeros(NUser,Nframes*NFreq);
for k=1:NUser
CAP_SU(k,:) = capacity_SU_ML(H(:,:,:,:,k),SNR,normalize);
end
%CAP = mean(CAP_SU,2);
CAP = CAP_SU(:);