Possibility of setting Data Rate between nodes in wireless network topology?

157 views
Skip to first unread message

aanand

unread,
Feb 21, 2020, 9:58:50 PM2/21/20
to ns-3-users

Hi,

I was trying to setup a wireless network topology. As in the case of Point-to-point network topology, there is a possibility to set Data Rate and Delay for connections using PointToPointHelper.SetDeviceAttribute() & PointToPointHelper.SetChannelAttribute() function respectively, is there a similar possibility to set the Data Rate in the case of wireless network topology? (I am using YansWifiChannelHelper.SetPropagationDelay() function to set the delay.)

If yes, could anyone please suggest how set the data rate for wireless topology?

Thanks in advance!!

Adil Alsuhaim

unread,
Feb 27, 2020, 11:46:39 PM2/27/20
to ns-3-users
PointToPoint is for a wired connection between two nodes, and you can specify the value for the propagation delay, and data rate.

With wireless communication, the propagation delay depends on nodes positions (which is why you need to have MobilityModel installed for nodes, and YansWifiChannel uses node mobility to calculate the value for the received signal & delay). So for a wireless channel you don't set the propagation delay as a value, but rather set the propagation delay & loss model that will be used to calculate the delay and received signal strength. I believe this will also depend on the transmission power used for the transmission. 

For data rates, you have to adhere to supported by the wireless standard.  I don't have much experience with wifi module but you can take a look at the examples under src/wifi/examples to find some examples with different data rates & standards. 

I personally have more experience with wave module, which allows me to set the data rate per-packet to one of the rate values supported by the standard (3, 4.5, 6, 12, 18, 24 & 27 Mbps).

thang nguyen minh

unread,
Mar 11, 2020, 7:37:50 AM3/11/20
to ns-3-users
Hello,
I think you don't need to add a delay to a wireless link because the RF speed is approximately close to light speed. 
And with a short distance, propagation delay ~ 0. 
Actually, the delay is due to scheduling as well as packet/data processing issues. 
You can add a delay for the packet before it is scheduled to send.

Aniket Anand

unread,
May 29, 2020, 4:22:57 PM5/29/20
to ns-3-users
Hi Adil,
Apologies for late response and thanks for your help. I am able to the propagation delay by setting the propagation loss model and propagation delay model. 
Regarding the data rate, as you had advised, I looked for some examples and links as well. I found this answer https://groups.google.com/d/msg/ns-3-users/rpe1h04XGRg/s3l3TBQaqNAJ  which suggests the way of setting standard data rates. Also I have looked at the example src/wifi/examples/wifi-trans-example.cc where standard data rates were used - "OfdmRate6Mbps", etc. Another example to which I referred was - wifi-adhoc.cc where OnOffHelper class' SetConstantRate function is used to set custom DataRate.
Is it possible to set such a custom data rate (such as 100Mbps) without using OnOffHelper in wireless topology?

Adil Alsuhaim

unread,
Jun 5, 2020, 8:30:52 PM6/5/20
to ns-3-users
Applications have data to send. They send them down to a device's MAC outgoing queue, which is typically abstracted with sockets. The MAC protocol will determine how the channel will be accessed: if there's an AP, there will be Clear-To-Send (CTS), Ready-To-Send (RTS) for collision avoidance; if it's adhoc, there will be a carrier-sense, and random backoff timers... but once the MAC protocol determines that it is now the time to actually push the packet out, you will use the modulation that the device supports (which you set by the standard) and data will come out of the device at the rate supported by the standard.

The OnOff example is an application-level data rate. The application generates data at that rate. But once the packet is converted to wireless signal, the rate will be whatever rate supported by the standard. 

aniket anand

unread,
Jun 11, 2020, 4:17:39 AM6/11/20
to ns-3-users
Hi Adil,
Thanks for clearing my doubt and explaining how the OnOff example works. However, I think I have gone off-track from my purpose by looking at OnOff example.

I can conclude that in wireless communication, we can set the propagation delay only by specifying the position of nodes by using a MobilityModel (after setting one of the available PropagationLossModel to determine received signal strength and PropagationDelayModel) and in case of data rate, we can set data rate only to some standard supported values in wireless communication unlike the point to point communication where data rates could be set to any value. Could you please confirm this or correct me if I am wrong somewhere.

Thanks
Reply all
Reply to author
Forward
0 new messages