How to get RSRP values

2,078 views
Skip to first unread message

Umair Masood

unread,
Aug 28, 2013, 11:47:05 AM8/28/13
to ns-3-...@googlegroups.com
Hi... I am a new Ns-3 user and i am finding it hard that how to get the rsrp values for one cell case. Kindly help me.

Marco Miozzo

unread,
Aug 29, 2013, 3:33:42 AM8/29/13
to ns-3-...@googlegroups.com
Hi,

you can have a look to the PHY KPIs of LENA documentation:
http://lena.cttc.es/manual/lte-user.html#simulation-output

Best regards,
marco.




On Wed, Aug 28, 2013 at 5:47 PM, Umair Masood <frie...@googlemail.com> wrote:
Hi... I am a new Ns-3 user and i am finding it hard that how to get the rsrp values for one cell case. Kindly help me.

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/groups/opt_out.

Umair Masood

unread,
Aug 29, 2013, 4:13:01 AM8/29/13
to ns-3-...@googlegroups.com
ok to do it by attributes for examples by running the command from the ns-3 tutorial and I have put my script in the scratch file : ./waf --run "scratch/example --ns3::PhyStatsCalculator::RsrpSinrFilename.
It gives me the following error : Command['home/mimoon/Desktop/ns-3/ns-3-allinone/ns-3-dev/build/scratch/example ', ' --ns3::PhyStatsCalculator::RsrpSinrFilename'] exited with code 1. I think the way of passing the attributes is correct according to the tutorial. One more thing the User-Documentation--Model Library is not updated. This document doesn't gives information about Rsrp and Sinr. 

Last question can you tell me exactly in which part of code Rsrp is calculated in the RRC? I want to know their calculation. thanks in advance :)

Marco Miozzo

unread,
Aug 29, 2013, 5:21:51 AM8/29/13
to ns-3-...@googlegroups.com
see in-line.

marco.



On Thu, Aug 29, 2013 at 10:13 AM, Umair Masood <frie...@googlemail.com> wrote:
ok to do it by attributes for examples by running the command from the ns-3 tutorial and I have put my script in the scratch file : ./waf --run "scratch/example --ns3::PhyStatsCalculator::RsrpSinrFilename.
It gives me the following error : Command['home/mimoon/Desktop/ns-3/ns-3-allinone/ns-3-dev/build/scratch/example ', ' --ns3::PhyStatsCalculator::RsrpSinrFilename'] exited with code 1. I think the way of passing the attributes is correct according to the tutorial.

You should put the name of the file you want to use, for instance:

./waf --run "scratch/example --ns3::PhyStatsCalculator::RsrpSinrFilename=my-rsrp-trace.txt


 
One more thing the User-Documentation--Model Library is not updated. This document doesn't gives information about Rsrp and Sinr. 

It has not yet updated in nsnam website, please refer to the documentation in the code (it can generated with doxigen) or refer to LENA website:
http://lena.cttc.es/manual/lte-design.html

 

Last question can you tell me exactly in which part of code Rsrp is calculated in the RRC? I want to know their calculation. thanks in advance :)

RSRP is calculated at the PHY layer of the UE, filtered and then reported to UE RRC which quantizes it and sends it to peer RRC at eNB side, refer to the documentation for a more detailed information. The actual formula of calculation is implemented in LteUePhy::GenerateCtrlCqiReport().
 



On Wednesday, August 28, 2013 5:47:05 PM UTC+2, Umair Masood wrote:
Hi... I am a new Ns-3 user and i am finding it hard that how to get the rsrp values for one cell case. Kindly help me.

--

Umair Masood

unread,
Aug 29, 2013, 5:51:15 AM8/29/13
to ns-3-...@googlegroups.com
I am sorry but the same error is occurring :(.. Here is the code I am using :
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/lte-module.h"
#include "ns3/config-store.h"

using namespace ns3;

int main (int argc, char * argv[])
{

CommandLine cmd;
cmd.Parse (argc, argv);
ConfigStore inputConfig;
inputConfig.ConfigureDefaults ();
//parse again so you can override default values from the command line
cmd.Parse (argc, argv);


// Create a LteHelper Object
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();

// Create Node Objects for eNB(s) and UEs
NodeContainer enbNodes;
enbNodes.Create (1);
NodeContainer ueNodes;
ueNodes.Create (2);

// Configure the Mobility model for all the nodes
MobilityHelper mobility;
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (enbNodes);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (ueNodes);

// Install an LTE protocol stack on the eNB(s)
NetDeviceContainer enbDevs;
enbDevs = lteHelper->InstallEnbDevice (enbNodes);

// Install an LTE protocol stack on the UEs
NetDeviceContainer ueDevs;
ueDevs = lteHelper->InstallUeDevice (ueNodes);

// Attach the Ues to an eNB.This will congfigure each UE according to the eNB configuration, and create an RRC connection between them
lteHelper->Attach (ueDevs, enbDevs.Get(0));

//Activate an EPS Bearer including te setup of the Radio Bearer between an eNB and its attached UE

enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
EpsBearer bearer (q);
lteHelper->ActivateDataRadioBearer (ueDevs, bearer);

// Set the stop time

Simulator::Stop (Seconds (0.05));
lteHelper->EnablePhyTraces();
lteHelper->EnableMacTraces();
lteHelper->EnableRlcTraces();
lteHelper->EnablePdcpTraces();

// Run the simulation
Simulator::Run();

// Cleanup and exit
Simulator::Destroy ();
return 0;
}

then I build it using ./waf and then later pass in the attributes as you have mentioned in the previous reply. Same error occurs:Command ['/home/mimoon/Desktop/ns-3/ns-3-allinone/ns-3-dev/build/scratch/example', '--ns3::PhyStatsCalculator::RsrpSinrFilename=my-rsrp-trace.txt'] exited with code 1




On Wednesday, August 28, 2013 5:47:05 PM UTC+2, Umair Masood wrote:

Marco Miozzo

unread,
Aug 29, 2013, 6:42:29 AM8/29/13
to ns-3-...@googlegroups.com
Sorry, I did not check the actual name of the parameter, which is DlRsrpSinrFilename and not RsrpSinrFilename, this is the reason of the error. Try with:

./waf --run scratch/example --command-template="%s --ns3::PhyStatsCalculator::DlRsrpSinrFilename=my-rsrp-trace.txt"

marco.



--

Umair Masood

unread,
Aug 29, 2013, 8:25:55 AM8/29/13
to ns-3-...@googlegroups.com
ok thanks its working now :) Kindly update it on the website as well because over thr it is RsrpSinrFilename .
Regards,
Umair


On Wednesday, August 28, 2013 5:47:05 PM UTC+2, Umair Masood wrote:
Message has been deleted

Umair Masood

unread,
Sep 2, 2013, 5:20:13 AM9/2/13
to ns-3-...@googlegroups.com


On Monday, September 2, 2013 11:19:26 AM UTC+2, Umair Masood wrote:
@Marco, there is one problem I am facing and that is I can't see the RSRP values for the neighboring Enbs. Like suppose I have a following Scanerio:

2Ues and 2Enbs and each Ue is connected to one Enb. The Ue connected to its Enb is calculating the RSRP value for that specific Enb, but not for its neighboring Enb. This is the output:

% time  cellId  IMSI    RNTI    rsrp    sinr
0.0212143       1       1       1       3.87557e-10     16.1487
0.0212143       2       2       1       3.50361e-10     14.6328
0.0222143       1       1       1       3.87557e-10     16.1487
0.0222143       2       2       1       3.50361e-10     14.6328
0.0232143       1       1       1       3.87557e-10     16.1487
0.0232143       2       2       1       3.50361e-10     14.6328
0.0242143       1       1       1       3.87557e-10     16.1487
0.0242143       2       2       1       3.50361e-10     14.6328
0.0252143       1       1       1       3.87557e-10     16.1487
0.0252143       2       2       1       3.50361e-10     14.6328
0.0262143       1       1       1       3.87557e-10     16.1487
0.0262143       2       2       1       3.50361e-10     14.6328
0.0272143       1       1       1       3.87557e-10     16.1487
0.0272143       2       2       1       3.50361e-10     14.6328
0.0282143       1       1       1       3.87557e-10     16.1487
0.0282143       2       2       1       3.50361e-10     14.6328
0.0292143       1       1       1       3.87557e-10     16.1487
0.0292143       2       2       1       3.50361e-10     14.6328
0.0302143       1       1       1       3.87557e-10     16.1487
0.0302143       2       2       1       3.50361e-10     14.6328
0.0312143       1       1       1       3.87557e-10     16.1487
0.0312143       2       2       1       3.50361e-10     14.6328
0.0322143       1       1       1       3.87557e-10     16.1487
0.0322143       2       2       1       3.50361e-10     14.6328
0.0332143       1       1       1       3.87557e-10     16.1487
0.0332143       2       2       1       3.50361e-10     14.6328
0.0342143       1       1       1       3.87557e-10     16.1487
0.0342143       2       2       1       3.50361e-10     14.6328
0.0352143       1       1       1       3.87557e-10     16.1487
0.0352143       2       2       1       3.50361e-10     14.6328
0.0362143       1       1       1       3.87557e-10     16.1487
0.0362143       2       2       1       3.50361e-10     14.6328
0.0372143       1       1       1       3.87557e-10     16.1487
0.0372143       2       2       1       3.50361e-10     14.6328
0.0382143       1       1       1       3.87557e-10     16.1487
0.0382143       2       2       1       3.50361e-10     14.6328
0.0392143       1       1       1       3.87557e-10     16.1487
0.0392143       2       2       1       3.50361e-10     14.6328
0.0402143       1       1       1       3.87557e-10     16.1487
0.0402143       2       2       1       3.50361e-10     14.6328
0.0412143       1       1       1       3.87557e-10     16.1487
0.0412143       2       2       1       3.50361e-10     14.6328
0.0422143       1       1       1       3.87557e-10     16.1487
0.0422143       2       2       1       3.50361e-10     14.6328
0.0432143       1       1       1       3.87557e-10     16.1487
0.0432143       2       2       1       3.50361e-10     14.6328
0.0442143       1       1       1       3.87557e-10     16.1487
0.0442143       2       2       1       3.50361e-10     14.6328
0.0452143       1       1       1       3.87557e-10     16.1487
0.0452143       2       2       1       3.50361e-10     14.6328
0.0462143       1       1       1       3.87557e-10     16.1487
0.0462143       2       2       1       3.50361e-10     14.6328
0.0472143       1       1       1       3.87557e-10     16.1487
0.0472143       2       2       1       3.50361e-10     14.6328
0.0482143       1       1       1       3.87557e-10     16.1487
0.0482143       2       2       1       3.50361e-10     14.6328
0.0492143       1       1       1       3.87557e-10     16.1487
0.0492143       2       2       1       3.50361e-10     14.6328

On Wednesday, August 28, 2013 5:47:05 PM UTC+2, Umair Masood wrote:

Marco Miozzo

unread,
Sep 2, 2013, 5:34:43 AM9/2/13
to ns-3-...@googlegroups.com
Hi,

right now there is only the trace you provided for what concern RSRP, therefore only for the serving cell.
However, there is already in-place a TracedCallback in LteUePhy ready for providing the information you are looking for, please check:

  /**
   * Trace information regarding RSRP and RSRQ (see TS 36.214)
   * uint16_t rnti, uint16_t cellId, double rsrp, double sinr, bool servingCell
   */
  TracedCallback<uint16_t, uint16_t, double, double, bool> m_reportUeMeasurements;

This TraceCallback is not generating any output traces but you can use it either for having these values in the code or for generating a new simulation output (contributions are welcome on this matter!), you may refer to test/lte-test-ue-measurements.cc as an example.

Regards,
marco.





--

Umair Masood

unread,
Sep 2, 2013, 8:10:02 AM9/2/13
to ns-3-...@googlegroups.com
@Marco thanks for your reply. Can you give more information on the traces which you have mentioned because I am not understanding it properly how to calculate for the neighboring cell.


On Wednesday, August 28, 2013 5:47:05 PM UTC+2, Umair Masood wrote:

Marco Miozzo

unread,
Sep 2, 2013, 9:07:39 AM9/2/13
to ns-3-...@googlegroups.com
Hi,

you may find information about the interference calculation in the documentation:
http://lena.cttc.es/manual/lte-design.html#phy

Best regards,
marco.



--

Umair Masood

unread,
Sep 2, 2013, 11:47:02 AM9/2/13
to ns-3-...@googlegroups.com
Hi thanks for your answer. Can you tell me in which part of code I should look for the RSRP reported to UE RRC which quantizes it and sends it to peer RRC at eNB side? Sorry for asking too much because it is quite difficult to know exactly what I am looking for by going through the code by myself.


On Wednesday, August 28, 2013 5:47:05 PM UTC+2, Umair Masood wrote:

Marco Miozzo

unread,
Sep 3, 2013, 3:25:52 AM9/3/13
to ns-3-...@googlegroups.com
Hi,

you may start from LteUeRrc::DoReportUeMeasurements.

BR,
marco.




--

Umair Masood

unread,
Sep 5, 2013, 11:04:14 AM9/5/13
to ns-3-...@googlegroups.com
@Marco the implementation for the neighbour cells RSRP is already done in the ns-3. But I am not able to display them or save them on a txt file. Here is the code :
void
UeManager::RecvMeasurementReport (LteRrcSap::MeasurementReport msg)
{
  NS_LOG_FUNCTION (this);
  NS_LOG_LOGIC ("measId " << (uint16_t) msg.measResults.measId
                << " haveMeasResultNeighCells " << msg.measResults.haveMeasResultNeighCells
                << " measResultListEutra " << msg.measResults.measResultListEutra.size ());
  NS_LOG_LOGIC ("serving cellId " << m_rrc->m_cellId
                << " RSRP " << (uint16_t) msg.measResults.rsrpResult
                << " RSRQ " << (uint16_t) msg.measResults.rsrqResult);

  for (std::list <LteRrcSap::MeasResultEutra>::iterator it = msg.measResults.measResultListEutra.begin ();
       it != msg.measResults.measResultListEutra.end ();
       ++it)
    {
      NS_LOG_LOGIC ("neighbour cellId " << it->physCellId
                    << " RSRP " << (it->haveRsrpResult ? (uint16_t) it->rsrpResult : 255)
                    << " RSRQ " << (it->haveRsrqResult ? (uint16_t) it->rsrqResult : 255));
    }

  m_rrc->m_recvMeasurementReportTrace (m_imsi, m_rrc->m_cellId, m_rnti, msg);

.. How can I display the neighbours RSRP and the serving RSRP in a text file? I am trying to figure this out for 2 days. Need your help.


On Wednesday, August 28, 2013 5:47:05 PM UTC+2, Umair Masood wrote:

Pham Quoc Viet

unread,
Feb 17, 2014, 11:24:42 PM2/17/14
to ns-3-...@googlegroups.com
Dear Umair Masood,

I am interested in  developing a new handover algorithm based on throughput or sinr of the serving cells and neighbor cells. You posted this thread about 5 months ago and have you had any contribution in this?
I have started this work for 2 days and I am still stuck on how to get this information.

Can you and anyone share this with me?

Thanks in advance.

Pham Quoc Viet

unread,
Feb 19, 2014, 9:47:32 AM2/19/14
to ns-3-...@googlegroups.com
Dear ns-3 experts,

I found a thread "https://groups.google.com/forum/#!msg/ns-3-users/3FTvZbh6uTw/NfSkGic0JYIJ", and I have followed its instruction and RSRP and RSRQ information have been obtained. However, I still have some unsolved questions.

At first, How can I know signal information (RSRP, RSRQ, SINR, throughput, e.t. ) of a specific UE. A have tried to use "/Nodelist/x/..." instead of using "Nodelist/*/...", but nothing can be reached. And I could not figure that how to use this obtained information in my script?

Secondly, based on the first result, I want to develop a handover algorithm based on throughput criteria as follows: Handover will be performed If assumed throughput (I guess that UE is connecting to a neighbor cell, although it is connecting to the serving cell) of neighbor cells is greater than that of the serving cell. Do you all think it can be simulated? If yes, can give me some useful guidance?

Thanks in advance.

sahar abdi

unread,
Jul 11, 2017, 3:54:15 AM7/11/17
to ns-3-users
Hello Pham Quoc Viet

Is your problem resolved?

if yes, please share this. I need RSRP neighbour cells in the txt file.
thank you

Reply all
Reply to author
Forward
0 new messages