LTE: Reg. SINR and RSRP values in simulation

462 views
Skip to first unread message

Vishnu Raj

unread,
Feb 25, 2018, 1:13:02 PM2/25/18
to ns-3-users



Hi,

I'm doing a simulation with a 1-cell scenario. I have 4 static UEs and 4 Mobile UEs. Static UEs are randomly allocated a fixed point. Mobile UEs are moving from the cell center to cell edge (moving outward in random direction).
After running the simulation, when I plot the RSRP and SINR values I'm getting vary high magnitude (Please see the figures below). I'm comparing the values with the ones given in http://usatcorp.com/faqs/understanding-lte-signal-strength-values/




The code is given below:

// Single Cell Test bed for LTE Cellular communications

/*
Run Commands:
1.  ./waf --run scratch/Lte1CellTestbed/Lte1CellTestbed --cwd scratch/Lte1CellTestbed/logs

2. ./waf --command-template="%s --ns3::ConfigStore::Filename=run.cfg --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" --run "scratch/Lte1CellTestbed/Lte1CellTestbed" --cwd "scratch/Lte1CellTestbed/logs"
*/

#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>

#include "progress-bar.h"

using namespace ns3;

NS_LOG_COMPONENT_DEFINE( "Lte1CellTestbed" );

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

    // Load experiment configuration
   CommandLine cmd;
   cmd.Parse( argc, argv );
   ConfigStore inputConfig;
   inputConfig.ConfigureDefaults();
   cmd.Parse( argc, argv );    

    // Position for Cell Tower -- aa points in 'm'
   double enbX = 0.00, enbY = 0.00, enbZ = 30.00;
   double cellRadius   = 1000.00;

    uint32_t nMobileUes = 4;
   uint32_t nStaticUes = 4;

    double simDuration    = 75.00;
   Time::SetResolution( Time::NS );

    // Create Nodes
   NodeContainer nodesEnb; nodesEnb.Create( 1 );
   NodeContainer nodesUesMobile;   nodesUesMobile.Create( nMobileUes );
   NodeContainer nodesUesStatic;   nodesUesStatic.Create( nStaticUes );
   NodeContainer nodesUes; nodesUes.Add( nodesUesMobile ); nodesUes.Add( nodesUesStatic );

    // Setup mobility models for eNodeBs and UEs
   // Setup mobility for eNodeB -- ConstantPositionMobilityModel
   Ptr<ListPositionAllocator> posAllocEnb = CreateObject<ListPositionAllocator>();
   posAllocEnb->Add( Vector(enbX,enbY,enbZ) );
   MobilityHelper mobilityHelperEnb;
   mobilityHelperEnb.SetMobilityModel( "ns3::ConstantPositionMobilityModel" );
   mobilityHelperEnb.SetPositionAllocator( posAllocEnb );
   mobilityHelperEnb.Install( nodesEnb );
   // Setup mobility for mobile UE nodes
   Ptr<UniformRandomVariable> wpRadSampler = CreateObject<UniformRandomVariable>();
   wpRadSampler->SetAttribute( "Max", DoubleValue(1.00*cellRadius) );
   wpRadSampler->SetAttribute( "Min", DoubleValue(0.98*cellRadius) );
   Ptr<ListPositionAllocator> posAllocUeMobile = CreateObject<ListPositionAllocator>();
   for( unsigned ueIdx = 0; ueIdx < nMobileUes; ueIdx++ ) {
       posAllocUeMobile->Add( Vector(enbX,enbY,1.5) );
   }
   Ptr<RandomDiscPositionAllocator> wpAllocUeMobile = CreateObject<RandomDiscPositionAllocator>();
   wpAllocUeMobile->SetX(enbX);    wpAllocUeMobile->SetX(enbY);    wpAllocUeMobile->SetRho(wpRadSampler);
   MobilityHelper mobilityHelperUeMobile;
   mobilityHelperUeMobile.SetMobilityModel( "ns3::RandomWaypointMobilityModel",
       "Speed", StringValue("ns3::ConstantRandomVariable[Constant=16.67]"),    // in 'm/s'
       "Pause", StringValue("ns3::ConstantRandomVariable[Constant=0.00]"),
       "PositionAllocator", PointerValue(wpAllocUeMobile) );
   mobilityHelperUeMobile.SetPositionAllocator( posAllocUeMobile );
   mobilityHelperUeMobile.Install( nodesUesMobile );
   // Setup mobility for static UEs
   Ptr<UniformDiscPositionAllocator> posAllocUeStatic  = CreateObject<UniformDiscPositionAllocator>();
   posAllocUeStatic->SetX(enbX);   posAllocUeStatic->SetY(enbY);   posAllocUeStatic->SetRho(cellRadius);
   MobilityHelper mobilityHelperUeStatic;
   mobilityHelperUeStatic.SetMobilityModel( "ns3::ConstantPositionMobilityModel" );
   mobilityHelperUeStatic.SetPositionAllocator( posAllocUeStatic );
   mobilityHelperUeStatic.Install( nodesUesStatic );

    // Setup LTE network
   Ptr<LteHelper> lteHelper    = CreateObject<LteHelper>();
   NetDeviceContainer devsEnb; devsEnb = lteHelper->InstallEnbDevice( nodesEnb );
   NetDeviceContainer devsUes; devsUes = lteHelper->InstallUeDevice( nodesUes );
   lteHelper->Attach( devsUes, devsEnb.Get(0) );

    // Activate saturation traffic
   enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
   EpsBearer bearer( q );
   lteHelper->ActivateDataRadioBearer( devsUes, bearer );

    // Enable Logging
   lteHelper->EnableTraces();

    // Setup simulation durtation
   Simulator::Stop( Seconds(simDuration) );

    // Setup Progress bar
   sim::ProgressBar progressBar( simDuration );
   progressBar.Enable();

    Simulator::Run();

    Simulator::Destroy();

    return 0;
}

I'm also attaching the full code folder with logs and plot script.

Where am I doing wrong??

With regards,
vish







Lte1CellTestbed.zip

Tommaso Pecorella

unread,
Mar 3, 2018, 12:25:40 AM3/3/18
to ns-3-users
Hi,

how did you plot the values ?
I mean, practically all the reports use linear values. What are you using to plot them ?

T.


On Sunday, February 25, 2018 at 12:13:02 PM UTC-6, Vishnu Raj wrote:



Hi,

I'm doing a simulation with a 1-cell scenario. I have 4 static UEs and 4 Mobile UEs. Static UEs are randomly allocated a fixed point. Mobile UEs are moving from the cell center to cell edge (moving outward in random direction).
After running the simulation, when I plot the RSRP and SINR values I'm getting vary high magnitude (Please see the figures below). I'm comparing the values with the ones given in http://usatcorp.com/faqs/understanding-lte-signal-strength-values/



The code is given below:

Vishnu Raj

unread,
Mar 3, 2018, 1:30:00 AM3/3/18
to ns-3-users
Hi,
I'm using 10 log(reported_snr) and 10 log( 1000 reported_rsrp)  plot.
The code for plotting is https://github.com/v-i-s-h/ns3-sketchbook/blob/master/Lte1CellTestbed/plot_DlStats.jl

Regards,
vish

alyb...@gmail.com

unread,
Jan 6, 2019, 6:41:10 PM1/6/19
to ns-3-users
Hi Vishnu,

I am implementing a simular scenario but i have issue executing a .jl file in ubuntu to plot the SINR. Could you please help me ?
here is my email address alyb...@gmail.com.

Kind regards,

Vishnu Raj

unread,
Jan 6, 2019, 11:20:29 PM1/6/19
to ns-3-users
Can you tell me what exactly is the problem?
Any error log/specific failure case will be useful.

Aly Ba

unread,
Jan 7, 2019, 2:46:13 AM1/7/19
to ns-3-...@googlegroups.com
i cannot run the .jl file in ubuntu. i attached the error in terminal when i try to run your file.

Thank you so much for your response.

Regards,

Le lun. 7 janv. 2019 à 05:20, Vishnu Raj <ee14...@ee.iitm.ac.in> a écrit :
Can you tell me what exactly is the problem?
Any error log/specific failure case will be useful.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
1.PNG

Vishnu Raj

unread,
Jan 7, 2019, 3:25:39 AM1/7/19
to ns-3-users
I wrote the code with Julia 0.6 and I think you may be using Julia 1.0
If you are in Julia 1.0, you can add 'using DelimitedFiles' at the top of the jl file and it should work (not tested).

Aly Ba

unread,
Jan 7, 2019, 3:32:55 AM1/7/19
to ns-3-...@googlegroups.com
Thank you, 

I will try 'using DelimitedFiles' if it doesn't work i will install julia 0.6

Is it correct to run the script like this:  $ julia <path of the jl file>    

Aly Ba

unread,
Jan 7, 2019, 4:21:59 AM1/7/19
to ns-3-...@googlegroups.com
Hi Vishnu,

Now another error  with julia 0.6 , please check in the attached picture.

Thank you for the help

Vishnu Raj

unread,
Jan 7, 2019, 5:24:20 AM1/7/19
to ns-3-users
I can't see any picture. Seem like you forgot to attach.

And to run, you should first go to 'Lte1CellTestbsd' folder (where the julia file is) and then run. This is because in line#11 of the jl file, I have given relative path from that specific folder (which will also have a logs folder where the outputs must be written to)

Aly Ba

unread,
Jan 7, 2019, 5:35:07 AM1/7/19
to ns-3-...@googlegroups.com
Thank you for the response.

I executed the script without error nut a not seing any output in the log file, please see the attached figure.

regards,

Le lun. 7 janv. 2019 à 11:24, Vishnu Raj <ee14...@ee.iitm.ac.in> a écrit :
I can't see any picture. Seem like you forgot to attach.

And to run, you should first go to 'Lte1CellTestbsd' folder (where the julia file is) and then run. This is because in line#11 of the jl file, I have given relative path from that specific folder (which will also have a logs folder where the outputs must be written to)

--
2.PNG

Vishnu Raj

unread,
Jan 7, 2019, 5:41:12 AM1/7/19
to ns-3-users
Oops..You can first start julia (just enter 'julia' in terminal, it should give 'julia>' prompt)
and then from Julia REPL, do 'include("plot_DlStats.jl")'

Aly Ba

unread,
Jan 7, 2019, 5:53:39 AM1/7/19
to ns-3-...@googlegroups.com
Great !!

It works, thank you so much !

regards,

abdul manan

unread,
Jan 5, 2022, 1:03:12 AM1/5/22
to ns-3-users
Hi Vishnu,

I am facing the same problem with very SINR values reported in dBm.

If you solved that issue, can you please guide me what is the cause for it?

Thanks

Reply all
Reply to author
Forward
0 new messages