Received Signal strength at UE during simulation

793 views
Skip to first unread message

Sohail Ahmad

unread,
Aug 10, 2016, 10:03:57 AM8/10/16
to ns-3-users
Dear All,
can i calculate signal strength from eNb Node and Wifi AP at UE during simulation and store in some function for the comparison ? please mention me some example code or examples if they are available in NS-3. 

Thanks

Konstantinos

unread,
Aug 10, 2016, 10:36:19 AM8/10/16
to ns-3-users
Hi

For both of them (LTE/WiFi singal strength) you can find corresponding trace sources that will fire at different events. 
eg. from LTE UE PHY you can get the RSRP and RSRQ or SINR
  • ReportUeMeasurements: Report UE measurements RSRP (dBm) and RSRQ (dB).
  • ReportCurrentCellRsrpSinr: RSRP and SINR statistics.
While from WifiPhy you can get the SINR through this trace source.
  • MonitorSnifferRx: Trace source simulating a wifi device in monitor mode sniffing all received frames
Using trace sources is widely discussed in the documentation and the list. There are also examples that extensively use trace sources.
For example the LTE trace sources are used to generate output files for those statistics.

Sohail Ahmad

unread,
Aug 11, 2016, 3:43:51 AM8/11/16
to ns-3-users
Hi
Dear Sir Konstantinos, thanks for the quick reply, i successfully trace signal strength of WiFi, and now start working on LTE. but in WiFi i got this output

Packet has been received with Signal: -49.6262 dBm

Packet has been received with Signal: -58.6571 dBm

Packet has been received with Signal: -63.9398 dBm

Packet has been received with Signal: -67.688 dBm

Packet has been received with Signal: -70.5953 dBm

Error while sending 903 bytes to 00-00-00

Error while sending 421 bytes to 00-00-00

Error while sending 587 bytes to 00-00-00

Error while sending 534 bytes to 00-00-00

Error while sending 1472 bytes to 00-00-00

Error while sending 70 bytes to 00-00-00

Error while sending 134 bytes to 00-00-00

Error while sending 390 bytes to 00-00-00


in this output, i was unable to understand the last part i got error while sending bytes.? Sir i need some suggestion from you to remove or understand why these error i got in output. 


Your suggestions are really helpful.

Konstantinos

unread,
Aug 11, 2016, 4:19:09 AM8/11/16
to ns-3-users
Hi Sohail,

Please follow the posting guidelines to ask your questions. 
Without a working code we can not help you further.

I assume that use are using the UdpClient or UdpTraceClient application since both of them can potentially generate the same output.

./src/applications/model/udp-client.cc:      NS_LOG_INFO ("Error while sending " << m_size << " bytes to "
./src/applications/model/udp-trace-client.cc:      NS_LOG_INFO ("Error while sending " << size << " bytes to "

You can debug your code to identify why you get that error.. I reckon that the address (00-00-00-00) has something to do with that ;)

Regards,
K

Sohail Ahmad

unread,
Aug 11, 2016, 4:24:50 AM8/11/16
to ns-3-users
Dear Sir,

thanks for the reply Sir.
I use UdpTraceClientHelpr and UdbEchoServerHelper. Sir i attached my script. 
simpleWifi.cc

Konstantinos

unread,
Aug 11, 2016, 4:37:24 AM8/11/16
to ns-3-users
As I said, debugging should be made by you and I pointed out where to look (zero address)... 
You code confirms my assumption that you are not using a correct address, the serverAddress is not initialized, hence the zeros and errors.

Sohail Ahmad

unread,
Aug 11, 2016, 5:48:09 AM8/11/16
to ns-3-users
Hi
Thanks for the help Sir, problem is solved by initialising serverAddress and wifi portion is clear. 

Sohail Ahmad

unread,
Aug 13, 2016, 3:31:49 AM8/13/16
to ns-3-users
Hi
Konstantinos
I successfully get signal strength of both Lte and Wifi. Sir, I have one more question about signal strength. Can we collect signal strength on interval basis during simulation i.e. UE calculate signal strength of both Wifi and Lte after every 10 seconds and make decision. Can we store signal strength in a variable or struct etc.
I want to make handover simulation on basis of signal strength and UE make the decision. Your suggestions make real difference in my learning process of NS-3. 

Regards 
Sohail

Konstantinos

unread,
Aug 13, 2016, 6:51:40 AM8/13/16
to ns-3-users
Hi,

Of course you can. Now, you are just printing them. You could create a variable to store them, eg. a std::vector. Plain old simple C++.
As for the periodic check, you can create an event with Simulator::Schedule to check those variables. 

Note: As far as I know, there is no vertical HO implemented in ns-3, ie from WiFi to LTE and vice versa.   

Regards,
K

Sohail Ahmad

unread,
Aug 13, 2016, 10:09:44 AM8/13/16
to ns-3-users
Hi
Thanks for the quick reply. Sir can we use DoubleProbe instead of Simulator::Schedule for collecting signal strength on intervals? If yes, than which one is better and easy to implement? 

Regards
Sohail

Muhammad Naveed Sheikh

unread,
Jun 13, 2018, 12:17:21 AM6/13/18
to ns-3-users

 I am also want to know the RSRP values at running time of simulation...you did it well ...can you please help me how you accomplished it...if possible kindly share your code with me...I shall be remain thankful to you....

Sohail Ahmad

unread,
Jun 23, 2018, 4:06:03 AM6/23/18
to ns-3-...@googlegroups.com
Dear Naveed,
Yes I did it. How many nodes you have in your scenario to connected with host?

--
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 a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/X__mkjUZzYw/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Muhammad Naveed Sheikh

unread,
Jun 23, 2018, 5:03:50 AM6/23/18
to ns-3-...@googlegroups.com
just. one node at present afterwards i will increase it to 10

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.

yad...@tcd.ie

unread,
Aug 13, 2018, 12:40:20 AM8/13/18
to ns-3-users
Dear Sohail ,

I am facing the similar problem .kindly help.

Right now , I am using dce-linux-1.7 . I want to do handover based on SINR and distance .

Please guide how you solved your problem.

Thanks,
Radhe

yad...@tcd.ie

unread,
Aug 17, 2018, 10:56:49 AM8/17/18
to ns-3-users

Dear Naveed,
I am doing similar project.
If you can share code to me.
Thanks,
Radhe
Reply all
Reply to author
Forward
0 new messages