LENA-109 Uplink CQI support: introduced estimation of unkwnown CQI (average)

This commit is contained in:
Marco Miozzo
2011-06-09 12:44:39 +02:00
parent 4dbb5f714d
commit 9596dd4d5c
2 changed files with 49 additions and 2 deletions

View File

@@ -674,6 +674,38 @@ PfFfMacScheduler::DoSchedDlCqiInfoReq (const struct FfMacSchedSapProvider::Sched
return;
}
double
PfFfMacScheduler::EstimateUlSinr(uint16_t rnti, uint16_t rb)
{
std::map <uint16_t, std::vector <double> >::iterator itCqi = m_ueCqi.find (rnti);
if (itCqi == m_ueCqi.end ())
{
// no cqi info about this UE
return (NO_SINR);
}
else
{
// take the average SINR value among the available
double sinrSum = 0;
int sinrNum = 0;
for (uint32_t i = 0; i < m_cschedCellConfig.m_ulBandwidth; i++)
{
double sinr = (*itCqi).second.at(i);
if (sinr != NO_SINR)
{
sinrSum += sinr;
sinrNum++;
}
}
double estimatedSinr = sinrSum / (double)sinrNum;
// store the value
(*itCqi).second.at(rb) = estimatedSinr;
return (estimatedSinr);
}
}
void
PfFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters& params)
{
@@ -757,9 +789,18 @@ PfFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::Sched
{
// take the lowest CQI value (worst RB)
double minSinr = (*itCqi).second.at(uldci.m_rbStart);
if (minSinr == NO_SINR)
{
minSinr = EstimateUlSinr ((*it).first, uldci.m_rbStart);
}
for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
{
//NS_LOG_DEBUG (this << " UE " << (*it).first << " has CQI " << (*itCqi).second.at(i));
double sinr = (*itCqi).second.at(i);
if (sinr == NO_SINR)
{
sinr = EstimateUlSinr ((*it).first, i);
}
if ((*itCqi).second.at(i) < minSinr)
{
minSinr = (*itCqi).second.at(i);
@@ -937,8 +978,8 @@ PfFfMacScheduler::DoSchedUlCqiInfoReq (const struct FfMacSchedSapProvider::Sched
}
else
{
// initialize with minumum values according to the fixed point notation
newCqi.push_back (LteFfConverter::getMinFpS11dot3Value ());
// initialize with NO_SINR value.
newCqi.push_back (NO_SINR);
}
}

View File

@@ -30,6 +30,10 @@
#include <ns3/nstime.h>
// value for SINR outside the range defined by FF-API, used to indicate that there
// is no CQI for this element
#define NO_SINR -5000
namespace ns3 {
@@ -129,6 +133,8 @@ private:
int GetRbgSize (int dlbandwidth);
int LcActivePerFlow(uint16_t rnti);
double EstimateUlSinr(uint16_t rnti, uint16_t rb);
/*
* Vectors of UE's LC info