-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgetPastAvgTput.m
More file actions
22 lines (19 loc) · 797 Bytes
/
Copy pathgetPastAvgTput.m
File metadata and controls
22 lines (19 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function [Rbar] = getPastAvgTput(PF_allocation, MS, Rbar, TTI)
% Referred from the Capozzi's Research Paper
% Weighted Average to estimate average user experienced Data Rate(Rbar)
bta = 0.8;
UserCount = length(MS);
if(TTI == 1)
Rbar = 0;
end
for i = 1 : UserCount
allocated_rbs = (PF_allocation == i); % Check the Allocation Matrix for current User,
UserTput(i) = sum(MS(i).datarate_array(allocated_rbs) );
% Sum of all the Alloted PRB's data rate is the UE's Data Rate
end
Rbar = bta * Rbar + (1-bta)*UserTput;
Rbar = Rbar + (Rbar ==0)*10^(-6);
% This is done becuase we were having Rbar sometimes as 0
% => Metric for PF would be NaN which is not handled properly.
% So doing this will give the Metric a Large value, which is intended actually.
endfunction