How do i get RSRP value from UE to measure signal of eNB(s)

1,042 views
Skip to first unread message

陳文聰

unread,
Dec 4, 2013, 4:14:00 AM12/4/13
to ns-3-...@googlegroups.com
Hello everybody,
i have a set of UE(s) and a set of eNB(s)
i want to measure each UE received signal or RSRP from eNB for choosing to attach the strongest cell of eNB manually!
can anyone help me in this problems!
thanks!!!

Mehdi

unread,
Dec 4, 2013, 9:06:58 AM12/4/13
to ns-3-...@googlegroups.com
Hello,
I have some indications that are probably not the best way to do it, but it is better than nothing.
I assume you are not a beginner.

To retrieve the RSRP:
Config::Connect ("/NodeList/*/DeviceList/0/LteUePhy/ReportUeMeasurements", MakeBoundCallback (&ReportUeMeasurementsCallback, this));
void ReportUeMeasurementsCallback (LteUeMeasurementsTestCase *testcase, std::string path,
                             uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell)
{
   // called each time an UE receives a measurement
}

You can use this function to store the RSRP regarding each UE over time.
Then you can write a function GetStrongestCell(...) that returns the ID of the cell that has the strongest signal
Then you add a periodic function HandoverToStrongest(...) that forces the handover:

void DoHandoverRequest (Ptr<NetDevice> ueDev, Ptr<NetDevice> sourceEnbDev, Ptr<NetDevice> targetEnbDev)
{
  uint16_t targetCellId = targetEnbDev->GetObject<LteEnbNetDevice> ()->GetCellId ();
  Ptr<LteEnbRrc> sourceRrc = sourceEnbDev->GetObject<LteEnbNetDevice> ()->GetRrc ();
  uint16_t rnti = ueDev->GetObject<LteUeNetDevice> ()->GetRrc ()->GetRnti ();
  sourceRrc->SendHandoverRequest (rnti, targetCellId); 
}

void HandoverToStrongest(NetDeviceContainer enbLteDevs, NetDeviceContainer ueLteDevs) {
   
    for(uint32_t u = 0 ; u < ueLteDevs.GetN() ; u++) { //for each UE
        uint16_t attachedCellId = ueLteDevs.Get(u)->GetObject<LteUeNetDevice>()->GetRrc()->GetCellId();
        uint16_t strongestCellId = GetStrongestCell(...);
       
        if (attachedCellId != strongestCellId) {
            DoHandoverRequest( ueLteDevs.Get(u), enbLteDevs.Get (attachedCellId-1), enbLteDevs.Get (strongestCellId-1) );
        }
    }

    Simulator::Schedule(Seconds(HANDOVER_FORCING_PERIOD), &HandoverToStrongest, enbLteDevs, ueLteDevs);
}


This is really a dirty solution but it should work.

Mehdi

unread,
Dec 5, 2013, 3:22:11 AM12/5/13
to ns-3-...@googlegroups.com
Well it is pretty simple, the RSRP is contained in the rsrp variable !
If you have trouble with ns3 and c++, you will have difficulties to implement this solution...

Umair Masood

unread,
Dec 7, 2013, 5:41:46 PM12/7/13
to ns-3-...@googlegroups.com
You can use traces to get the trace file. Please study this documentation http://www.nsnam.org/docs/models/html/lte-user.html... While you can measure only the rsrp values for the serving cells . If you want to get for the neighboring cells you have to check Lte-enb-rrc file. and using traces to get back the value.

陳文聰

unread,
Dec 5, 2013, 3:12:44 AM12/5/13
to ns-3-...@googlegroups.com
can u please tell how should i do in here for getting rsrp
i am poor in ns3 and c++
thanks~!!

void ReportUeMeasurementsCallback (LteUeMeasurementsTestCase *testcase, std::string path,

                             uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell)
{
   // called each time an UE receives a measurement
}

陳文聰於 2013年12月4日星期三UTC+8下午5時14分00秒寫道:

el jari ouarda

unread,
Jul 10, 2018, 3:06:33 AM7/10/18
to ns-3-users

Hello everybody,

pleasee,i have in my simulation 3 users and 8 small cells and 2 enodeB , i want to measure the received sinr from eNB at each position of user( the users are mobiles),to get the id of the cells in a liste then chose manually the attachement of the users!!!!!!!!!
can anyone help me :!!!
thanks
Reply all
Reply to author
Forward
0 new messages