How to use WifiPhyStateHelper::m_stateLogger to find the channel congestion

255 views
Skip to first unread message

Rukna

unread,
Feb 20, 2015, 10:39:38 PM2/20/15
to ns-3-...@googlegroups.com
Hi NS-3 Users,

How can I use m_stateLogger (TracedCallback<Time,Time,enum WifiPhy::State> ns3::WifiPhyStateHelper::m_stateLogger) to generate channel congestion rate? I am very beginner NS-3 user. Thus, it would be helpful if you can tell me enough details to understand.

Thanks

Tommaso Pecorella

unread,
Feb 21, 2015, 3:31:23 AM2/21/15
to ns-3-...@googlegroups.com
Hi,

it depends on what you're trying to measure.
That trace can be used to check what the wifi device is doing on the channel (local information), but it will not tell you how OTHER nodes are using the channel.
In other terms, it only changes according to the node's wifi device status (Tx, Rx, Sleep, CCA, etc.).

As a general note, the problem of inferring the "channel" congestion is (and will) always a problem, because the node can only see the channel from its own point of view, which is limited. The node would like to see the channel congestion state between it and the destination, but it simply can't: there would be too much overhead.
As a consequence, the channel congestion state is only measured locally. it turns out that the average backoff time is a good estimate... there was a paper about it, but I can't find it anymore.

Hope it helps,

T.

Alejandro Jimenez

unread,
Nov 21, 2015, 10:40:24 AM11/21/15
to ns-3-users
Dear Tommaso,

 I am reusing this (a bit old) post because my question is related and might be helpful for others.

I wish to sense the state of the channel (Tx, Rx, Sleep, CCA, etc.) for channel congestion measure from any node perspective. From your reply I understand that it is not possible to make a node senses or "feels" how other nodes sense the channel. Still I have some doubts of how the WifiPhyStateHelper works.

I built an application that exemplifies the use of WifiPhyStateHelper. I included a counter of how many times certain node senses the channel as TX. Basically, I set the node to "listen" the channel states by using the following line with the wildcard (*):

Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/State/State", MakeCallback (&CAMbroadcast::StateCallback, this));

After doing that I am getting the counter to almost 1000 TX states after 1 sec, which is logical as every node has a rate 10 messages per second and there are in total 100 nodes. However, I ran the code for different TX powers which I calculated for the Log distance propagation model. My idea was to make the center node to reach less nodes on every run. I was expecting to see my TX counter decreasing, in other words, the node should be seeing less TX events. However I am still seeing the same 1000 TX states no matter the TX power I use.

I am not trying to access the channel state from OTHERS perspective. I am trying that my node senses all the TX events within its range. Is this possible or am I having the same limitation as you explained?

If it is not possible, could you please point me out to where to look about estimation with the average backoff time.

Thank you in advance for your comments.

Tommaso Pecorella

unread,
Nov 21, 2015, 1:25:07 PM11/21/15
to ns-3-users
Hi Alejandro,

Well, about the Tx states, they'll not change with the Tx power simply because they're... Tx. Perhaps you should look after Rx states... isn't it ?

Let's be a bit more clear. The original question was if it was possible to inspect the other nodes states. This is possible, but not realistic.
With that trace you are, indeed, able to trace all the nodes state changes, which is (again) unrealistic, unless you filter out the results and give to each node only its own data. basically it's a complex way to tell a node something it already knows, much like all the consulting companies do.
If you track the Rx state changes, you'll have this result.
100 nodes, all sending 10 packets. Let's assume there are no collisions (very strong assumption) and that all the nodes are in mutual coverage (another strong assumption). The Tx count will be 1000, the Rx count will be 1000 for each node = 100,000.
If you have a shorter radio range, each node will have less and less packet received, and that number will start being smaller. However, it's the Rx count. The Tx will be always 1000.

Cheers,

T.

Alejandro Jimenez

unread,
Nov 22, 2015, 2:56:23 PM11/22/15
to ns-3-...@googlegroups.com
Thank you Tomasso. Sometimes seeing things from a different angle helps you to understand what you already know.

Best regards,

Alejandro.

--
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/zwAhRCeHB0E/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 http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages