wiki:802.11/wlan_exp/app_notes/dcf_with_multiple_flows

Version 51 (modified by murphpo, 10 years ago) (diff)

--

Investigating Physical Carrier Sensing in the DCF with Multiple Traffic Flows

The purpose of the 802.11 Distributed Coordination Function (DCF) is to allow multiple traffic flows to contend for a shared wireless medium. In this application note we investigate how the Mango 802.11 Reference Design behaves when subjected to multiple traffic flows. This note provides a case study on how the design's experiments framework can be used to control and analyze the performance of 802.11 Reference Design nodes.

Experimental Setup

The experiments described below used 3 Mango WARP v3 kits, each running the 802.11 Reference Design (version v0.91).

Each node's RF interface was connected to an antenna with a toroidal pattern with 5dBi gain in all horizontal directions (L-Com RE07U-SM).

The nodes were indoors in a small office environment with limited mobility.

Experimental Setup

Experiment Details

  • Packet Length: 1400 byte payloads (1428 bytes OTA with MAC header and FCS)
  • PHY Rate: 18 Mbps (QPSK, code rate 3/4)
  • Tx Power: -5 dBm
  • Trial Duration: 300 seconds
  • 2.4GHz channel 1
  • Physical Carrier Sensing Threshold: approximately -70 dBm when enabled

We use 4 traffic flows in our experiments:

  • Flow 1: Backlogged traffic from AP to STA_1
  • Flow 2: Backlogged traffic from AP to STA_2
  • Flow 3: Backlogged traffic from STA_1 to AP
  • Flow 4: Backlogged traffic from STA_2 to AP

The colors in the figure above are used throughout this app note to denote each flow.

Aggregate Results

The simplest analysis uses the aggregate Tx/Rx statistics at each node. These statistics include the total number of packets and bytes transmitted and received for each flow, and the number of successful packets and bytes for each flow.

These statistics are sufficient to calculate total throughput, packet delivery ratio (PDR) and average number of re-transmissions per packet.

Flow 1 Flow 2 Flow 3 Flow 4
Physical Carrier Sensing On Off On Off On Off On Off
# MPDU Tx 51808 46883 51792 46864 114116 113725 121787 118609
# PHY Tx 65535 65951 66211 66090 140036 151143 147488 156835
# PHY Re-Tx 13727 19068 14419 19226 25920 37418 25701 38226
# MPDU Rx 51806 46820 51792 46794 114115 113597 121788 118523
Throughput (Mbps) 1.97 1.78 1.97 1.78 4.33 4.31 4.62 4.50
# MPDU Tx # PHY Tx # PHY Re-Tx # MPDU Rx Throughput (Mbps)
Physical Carrier Sensing On Off On Off On Off On Off On Off
Flow 1 51808 46883 65535 65951 13727 19068 51806 46820 1.97 1.78
Flow 2 51792 46864 66211 66090 14419 19226 51792 46794 1.97 1.78
Flow 3 114116 113725 140036 151143 25920 37418 114115 113597 4.33 4.31
Flow 4 121787 118609 147488 156835 25701 38226 121788 118523 4.62 4.50

It is clear that without carrier sensing all flows suffer...

But the aggregate statistics do not provide enough information to understand why performance suffered. For this, we need to explore the Tx/Rx logs from each node.

Tx/Rx Log Results

The 802.11 Reference Design experiments framework includes a flexible logging system that runs in real-time at every node. This system keeps a record of every Tx and Rx event at the node. For Tx events the log includes both the high-level MPDU Tx (as implemented in CPU High) and the low-level PHY Tx events for each MPDU. Each low-level Tx record includes the timestamp of the actual PHY transmission plus MAC parameters for the transmission (number of backoff slots, current contention window, re-transmission count, etc.). By retrieving the logs from every node following the experiment and analyzing them together, we can gain significant understanding of the behaviors of the nodes and how various parameters impact performance on short and long timescales.

Rx Power vs. Time

The first log-based analysis simply plots the received power of every packet for each node, grouped by traffic flow.

Rx Power vs. Time
Carrier Sensing Enabled Carrier Sensing Disabled

These plots clearly demonstrate the low-mobility, mid-to-high SNR propagation environment for our experiments. And, as expected, the carrier sensing threshold does not impact Rx power.


Throughput vs. Time

The aggregate results above provide the total throughput over the full experiment duration. This throughput is computed as the ratio of successfully received bytes and time duration. But the aggregate throughput does not provide insight into any variations in throughput over the course of the experiment. Using the Rx events in the node logs we can gain a fine-grained view of throughput vs. time.

Throughput vs. Time Per Flow
Carrier Sensing Enabled Carrier Sensing Disabled

These plots show the throughput of each flow as a function of time. Each throughput curve is computed as a 1 second rolling window of bytes received by each node for each flow. This 1 second window is rolled over the full 300 second log in steps of 1 msec. This calculation is based on the log throughput analysis example script.

The impact of carrier sensing is apparent in the wide variation of instantaneous throughputs achieved by each flow. In a perfectly-coordinated TDMA system there would be zero variation in throughput with time — each flow would be allocated its fair share and would use the medium a specific intervals. Random access (i.e. distributed coordination) adds variation in the instantaneous throughputs. An effect coordination function should minimize these variations. Carrier sensing is designed to detect potential collisions and defer transmissions that would likely fail. These plots clearly demonstrate the improve consistency of throughput when carrier sensing is used to defer transmissions. The improvement is apparent in both total throughput and in lower variation of individual flow throughputs with time.

Throughput Histograms Per Flow
Carrier Sensing Enabled Carrier Sensing Disabled

These plots use the same data as the throughput vs. time curves above, aggregated as histograms to show the probability density function of short-term throughputs per flow. Ideally each histogram would be a delta function. Again, it's clear carrier sensing reduces variations in each flow's throughput.


Contention Windows vs. Time

The 802.11 DCF contention window determines the distribution of slot counts for selecting the random backoff period. The contention window grows (i.e. longer average backoffs) with each failed attempt to transmit a packet. The contention window growth is exponential, starting at 16 and doubling with each re-transmission, up to a maximum of 1024.

Ideally a node's contention window would never increase from 16 (the minimum). In reality packet collisions and losses require re-transmissions, leading to inevitable contention window increases.

The contention window resets to its minimum following a successful transmission. When a collision occurs we expect a node's contention window to increase briefly, then reset when the transmission failure is resolved by a future re-transmission. But if collisions are very common (i.e. transmission failures are frequent), we would expect to see higher contention window values that persist longer.

Contention Windows at Each Node vs. Time
Physical Carrier Sensing Enabled Physical Carrier Sensing Disabled

These plots show the actual contention window value of every node at the time of every PHY transmission. The contention window is only updated following PHY transmissions, so these plots capture the complete history of contention window values at every node. The impact of carrier sensing on contention window is dramatic. Disabling carrier sensing increases the probability of collisions. As explained above, more collisions leads to more transmission failures, leading to higher expected contention window values. This is exactly what the results show.

Characterizing Collisions

The 802.11 DCF attempts to avoid collisions by requiring every node wait (i.e. backoff) a random period and sense the medium before transmitting. The random wait is designed to stagger transmission attempts by nodes that are not otherwise coordinated. Collisions could be made less likely by using longer random backoff periods. But long backoff periods reduce overall medium utilization, negatively impacting performance. Shorter backoff periods increase medium utilization, but also increase the probability that nodes select the same random value and collide. The 802.11 DCF balances this tradeoff with its contention window definition, discussed above.

The DCF backoff procedure divides each waiting period into discrete slots. Nodes wait an integral number of slots before transmitting. The slot duration is 9 usec.

When carrier sensing is working correctly, we expect that collisions will occur when two nodes select the same backoff slot count and initiate their transmissions in the same slot. When carrier sensing is disabled, nodes will still collide when they choose the same slot count. But other nodes, with larger backoff slot values, will fail to sense the collision and will initiate their own transmission in a future slot.

We can test these expectations by analyzing the timestamps of PHY Tx events in the node logs. The absolute time difference between nodes is first resolved by identifying log entries of a common event, such as beacon transmissions and receptions. Once the time drift between nodes is corrected, the Tx timestamps can be extract and analyzed for overlapping Tx events. When overlapping Tx events are located, the timestamps of the Tx events are compared to compute the difference in Tx start times. We expect this difference to be small when carrier sensing allows nodes to defer to ongoing collisions.

The plots below show the results of this analysis for all 4 traffic flows with carrier sensing enabled (left) and disabled (right).

Time Offsets of Colliding Packets - Flow 1
Carrier Sensing Enabled Carrier Sensing Disabled
Time Offsets of Colliding Packets - Flow 2
Time Offsets of Colliding Packets - Flow 3
Time Offsets of Colliding Packets - Flow 4



Collisions (Zoomed) Collisions (1 second)
Collisions (Zoomed) Collisions (1 second)

Resources

Links to the data sets and experiment scripts used to perform this study will be posted shortly.

Attachments (1)

Download all attachments as: .zip