author | Sébastien Deronne <sebastien.deronne@gmail.com> |
Sun, 06 Sep 2015 10:54:48 +0200 | |
changeset 11646 | 56d62956a729 |
parent 11465 | 5a50e80cdf32 |
child 11682 | 085c4ff7a60f |
permissions | -rw-r--r-- |
11465
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
1 |
.. include:: replace.txt |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
2 |
.. highlight:: cpp |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
3 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
4 |
++++++++++++++++++++ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
5 |
Design Documentation |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
6 |
++++++++++++++++++++ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
7 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
8 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
9 |
|ns3| nodes can contain a collection of NetDevice objects, much like an actual |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
10 |
computer contains separate interface cards for Ethernet, Wifi, Bluetooth, etc. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
11 |
This chapter describes the |ns3| WifiNetDevice and related models. By adding |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
12 |
WifiNetDevice objects to |ns3| nodes, one can create models of 802.11-based |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
13 |
infrastructure and ad hoc networks. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
14 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
15 |
Overview of the model |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
16 |
********************* |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
17 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
18 |
The WifiNetDevice models a wireless network interface controller based |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
19 |
on the IEEE 802.11 standard [ieee80211]_. We will go into more detail below but in brief, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
20 |
|ns3| provides models for these aspects of 802.11: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
21 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
22 |
* basic 802.11 DCF with **infrastructure** and **adhoc** modes |
11646
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
23 |
* **802.11a**, **802.11b**, **802.11g**, **802.11n** (both 2.4 and 5 GHz bands) and **802.11ac** physical layers |
11465
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
24 |
* **MSDU aggregation** and **MPDU aggregation** extensions of 802.11n, and both can be combined together (two-level aggregation) |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
25 |
* QoS-based EDCA and queueing extensions of **802.11e** |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
26 |
* the ability to use different propagation loss models and propagation delay models, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
27 |
please see the chapter on :ref:`Propagation` for more detail |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
28 |
* various rate control algorithms including **Aarf, Arf, Cara, Onoe, Rraa, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
29 |
ConstantRate, and Minstrel** |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
30 |
* 802.11s (mesh), described in another chapter |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
31 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
32 |
The set of 802.11 models provided in |ns3| attempts to provide an accurate |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
33 |
MAC-level implementation of the 802.11 specification and to provide a |
11646
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
34 |
not-so-slow PHY-level model of the 802.11a/b/g/n/ac specifications. |
11465
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
35 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
36 |
In |ns3|, nodes can have multiple WifiNetDevices on separate channels, and the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
37 |
WifiNetDevice can coexist with other device types; this removes an architectural |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
38 |
limitation found in |ns2|. Presently, however, there is no model for |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
39 |
cross-channel interference or coupling. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
40 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
41 |
The source code for the WifiNetDevice lives in the directory |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
42 |
``src/wifi``. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
43 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
44 |
The implementation is modular and provides roughly four levels of models: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
45 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
46 |
* the **PHY layer models** |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
47 |
* the so-called **MAC low models**: they implement DCF and EDCAF |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
48 |
* the so-called **MAC high models**: they implement the MAC-level beacon |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
49 |
generation, probing, and association state machines, and |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
50 |
* a set of **Rate control algorithms** used by the MAC low models |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
51 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
52 |
Next, we provide some overview of each layer. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
53 |
More detailed information will be discussed later. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
54 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
55 |
MAC high models |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
56 |
=============== |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
57 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
58 |
There are presently three **MAC high models** that provide for the three |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
59 |
(non-mesh; the mesh equivalent, which is a sibling of these with common |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
60 |
parent ``ns3::RegularWifiMac``, is not discussed here) Wi-Fi topological |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
61 |
elements - Access Point (AP) (``ns3::ApWifiMac``), |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
62 |
non-AP Station (STA) (``ns3::StaWifiMac``), and STA in an Independent |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
63 |
Basic Service Set (IBSS - also commonly referred to as an ad hoc |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
64 |
network (``ns3::AdhocWifiMac``). |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
65 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
66 |
The simplest of these is ``ns3::AdhocWifiMac``, which implements a |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
67 |
Wi-Fi MAC that does not perform any kind of beacon generation, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
68 |
probing, or association. The ``ns3::StaWifiMac`` class implements |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
69 |
an active probing and association state machine that handles automatic |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
70 |
re-association whenever too many beacons are missed. Finally, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
71 |
``ns3::ApWifiMac`` implements an AP that generates periodic |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
72 |
beacons, and that accepts every attempt to associate. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
73 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
74 |
These three MAC high models share a common parent in |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
75 |
``ns3::RegularWifiMac``, which exposes, among other MAC |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
76 |
configuration, an attribute ``QosSupported`` that allows |
11646
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
77 |
configuration of 802.11e/WMM-style QoS support, an attribute |
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
78 |
``HtSupported`` that allows configuration of 802.11n High Throughput |
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
79 |
style support an attribute ``VhtSupported`` that allows configuration |
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
80 |
of 802.11ac Very High Throughput style support. |
11465
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
81 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
82 |
MAC low layer |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
83 |
============== |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
84 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
85 |
The **MAC low layer** is split into three components: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
86 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
87 |
#. ``ns3::MacLow`` which takes care of RTS/CTS/DATA/ACK transactions. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
88 |
#. ``ns3::DcfManager`` and ``ns3::DcfState`` which implements the DCF and EDCAF |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
89 |
functions. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
90 |
#. ``ns3::DcaTxop`` and ``ns3::EdcaTxopN`` which handle the packet queue, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
91 |
packet fragmentation, and packet retransmissions if they are needed. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
92 |
The ``ns3::DcaTxop`` object is used high MACs that are not QoS-enabled, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
93 |
and for transmission of frames (e.g., of type Management) |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
94 |
that the standard says should access the medium using the DCF. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
95 |
``ns3::EdcaTxopN`` is is used by QoS-enabled high MACs and also |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
96 |
performs 802.11n-style MSDU aggregation. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
97 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
98 |
Rate control algorithms |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
99 |
======================= |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
100 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
101 |
There are also several **rate control algorithms** that can be used by the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
102 |
MAC low layer. A complete list of available rate control algorithms is |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
103 |
provided in a separate section. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
104 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
105 |
PHY layer models |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
106 |
================ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
107 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
108 |
The PHY layer implements a single model in the ``ns3::WifiPhy`` class: the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
109 |
physical layer model implemented there is described fully in a paper entitled |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
110 |
`Yet Another Network Simulator <http://cutebugs.net/files/wns2-yans.pdf>`_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
111 |
Validation results for 802.11b are available in this |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
112 |
`technical report <http://www.nsnam.org/~pei/80211b.pdf>`_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
113 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
114 |
.. _wifi-architecture: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
115 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
116 |
.. figure:: figures/WifiArchitecture.* |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
117 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
118 |
WifiNetDevice architecture. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
119 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
120 |
The WifiChannel and WifiPhy models |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
121 |
********************************** |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
122 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
123 |
The WifiChannel subclass can be used to connect together a set of |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
124 |
``ns3::WifiNetDevice`` network interfaces. The class ``ns3::WifiPhy`` is the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
125 |
object within the WifiNetDevice that receives bits from the channel. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
126 |
For the channel propagation modeling, the propagation module is used; see section :ref:`Propagation` for details. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
127 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
128 |
This section summarizes the description of the BER calculations found in the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
129 |
yans paper taking into account the Forward Error Correction present in 802.11a |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
130 |
and describes the algorithm we implemented to decide whether or not a packet can |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
131 |
be successfully received. See `"Yet Another Network Simulator" |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
132 |
<http://cutebugs.net/files/wns2-yans.pdf>`_ for more details. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
133 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
134 |
The PHY layer can be in one of five states: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
135 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
136 |
#. TX: the PHY is currently transmitting a signal on behalf of its associated |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
137 |
MAC |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
138 |
#. RX: the PHY is synchronized on a signal and is waiting until it has received |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
139 |
its last bit to forward it to the MAC. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
140 |
#. IDLE: the PHY is not in the TX, RX, or CCA BUSY states. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
141 |
#. CCA Busy: the PHY is not in TX or RX state but the measured energy is higher than the energy detection threshold. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
142 |
#. SLEEP: the PHY is in a power save mode and cannot send nor receive frames. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
143 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
144 |
When the first bit of a new packet is received while the PHY is not IDLE (that |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
145 |
is, it is already synchronized on the reception of another earlier packet or it |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
146 |
is sending data itself), the received packet is dropped. Otherwise, if the PHY |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
147 |
is IDLE or CCA Busy, we calculate the received energy of the first bit of this new signal |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
148 |
and compare it against our Energy Detection threshold (as defined by the Clear |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
149 |
Channel Assessment function mode 1). If the energy of the packet k is higher, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
150 |
then the PHY moves to RX state and schedules an event when the last bit of the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
151 |
packet is expected to be received. Otherwise, the PHY stays in IDLE |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
152 |
or CCA Busy state and drops the packet. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
153 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
154 |
The energy of the received signal is assumed to be zero outside of the reception |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
155 |
interval of packet k and is calculated from the transmission power with a |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
156 |
path-loss propagation model in the reception interval. where the path loss |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
157 |
exponent, :math:`n`, is chosen equal to :math:`3`, the reference distance, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
158 |
:math:`d_0` is choosen equal to :math:`1.0m` and the reference energy is based |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
159 |
based on a Friis propagation model. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
160 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
161 |
When the last bit of the packet upon which the PHY is synchronized is received, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
162 |
we need to calculate the probability that the packet is received with any error |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
163 |
to decide whether or not the packet on which we were synchronized could be |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
164 |
successfully received or not: a random number is drawn from a uniform |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
165 |
distribution and is compared against the probability of error. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
166 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
167 |
To evaluate the probability of error, we start from the piecewise linear |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
168 |
functions shown in Figure :ref:`snir` and calculate the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
169 |
SNIR function. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
170 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
171 |
.. _snir: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
172 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
173 |
.. figure:: figures/snir.* |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
174 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
175 |
*SNIR function over time.* |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
176 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
177 |
From the SNIR function we can derive the Bit Error Rate (BER) and Packet Error Rate (PER) for |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
178 |
the modulation and coding scheme being used for the transmission. Please refer to [pei80211ofdm]_, [pei80211b]_, [lacage2006yans]_, [Haccoun]_ and [Frenger]_ for a detailed description of the available BER/PER models. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
179 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
180 |
WifiChannel configuration |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
181 |
========================= |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
182 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
183 |
The WifiChannel implementation uses the propagation loss and delay models provided within the |ns3| :ref:`Propagation` module. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
184 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
185 |
The MAC model |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
186 |
************* |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
187 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
188 |
The 802.11 Distributed Coordination Function is used to calculate when to grant |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
189 |
access to the transmission medium. While implementing the DCF would have been |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
190 |
particularly easy if we had used a recurring timer that expired every slot, we |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
191 |
chose to use the method described in [ji2004sslswn]_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
192 |
where the backoff timer duration is lazily calculated whenever needed since it |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
193 |
is claimed to have much better performance than the simpler recurring timer |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
194 |
solution. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
195 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
196 |
The backoff procedure of DCF is described in section 9.2.5.2 of [ieee80211]_. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
197 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
198 |
* “The backoff procedure shall be invoked for a STA to transfer a frame |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
199 |
when finding the medium busy as indicated by either the physical or |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
200 |
virtual CS mechanism.” |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
201 |
* “A backoff procedure shall be performed immediately after the end of |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
202 |
every transmission with the More Fragments bit set to 0 of an MPDU of |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
203 |
type Data, Management, or Control with subtype PS-Poll, even if no |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
204 |
additional transmissions are currently queued.” |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
205 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
206 |
Thus, if the queue is empty, a newly arrived packet should be transmitted |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
207 |
immediately after channel is sensed idle for DIFS. If queue is not empty |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
208 |
and after a successful MPDU that has no more fragments, a node should |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
209 |
also start the backoff timer. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
210 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
211 |
Some users have observed that the 802.11 MAC with an empty queue on an |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
212 |
idle channel will transmit the first frame arriving to the model |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
213 |
immediately without waiting for DIFS or backoff, and wonder whether this |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
214 |
is compliant. According to the standard, “The backoff procedure shall |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
215 |
be invoked for a STA to transfer a frame when finding the medium busy |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
216 |
as indicated by either the physical or virtual CS mechanism.” So in |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
217 |
this case, the medium is not found to be busy in recent past and the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
218 |
station can transmit immediately. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
219 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
220 |
The higher-level MAC functions are implemented in a set of other C++ classes and |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
221 |
deal with: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
222 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
223 |
* packet fragmentation and defragmentation, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
224 |
* use of the RTS/CTS protocol, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
225 |
* rate control algorithm, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
226 |
* connection and disconnection to and from an Access Point, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
227 |
* the MAC transmission queue, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
228 |
* beacon generation, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
229 |
* MSDU aggregation, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
230 |
* etc. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
231 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
232 |
Rate control algorithms |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
233 |
*********************** |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
234 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
235 |
Multiple rate control algorithms are available in |ns3|. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
236 |
Some rate control algorithms are modeled after real algorithms used in real devices; |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
237 |
others are found in literature. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
238 |
The following rate control algorithms can be used by the MAC low layer: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
239 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
240 |
Algorithms found in real devices: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
241 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
242 |
* ``ArfWifiManager`` (default for ``WifiHelper``) |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
243 |
* ``OnoeWifiManager`` |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
244 |
* ``ConstantRateWifiManager`` |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
245 |
* ``MinstrelWifiManager`` |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
246 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
247 |
Algorithms in literature: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
248 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
249 |
* ``IdealWifiManager`` |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
250 |
* ``AarfWifiManager`` [lacage2004aarfamrr]_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
251 |
* ``AmrrWifiManager`` [lacage2004aarfamrr]_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
252 |
* ``CaraWifiManager`` [kim2006cara]_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
253 |
* ``RraaWifiManager`` [wong2006rraa]_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
254 |
* ``AarfcdWifiManager`` [maguolo2008aarfcd]_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
255 |
* ``ParfWifiManager`` [akella2007parf]_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
256 |
* ``AparfWifiManager`` [chevillat2005aparf]_ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
257 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
258 |
ConstantRateWifiManager |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
259 |
======================= |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
260 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
261 |
The constant rate control algorithm always uses the same |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
262 |
transmission mode for every packet. Users can set a desired |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
263 |
'DataMode' for all 'unicast' packets and 'ControlMode' for all |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
264 |
'request' control packets (e.g. RTS). |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
265 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
266 |
To specify different data mode for non-unicast packets, users |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
267 |
must set the 'NonUnicastMode' attribute of the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
268 |
WifiRemoteStationManager. Otherwise, WifiRemoteStationManager |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
269 |
will use a mode with the lowest rate for non-unicast packets. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
270 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
271 |
The 802.11 standard is quite clear on the rules for selection |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
272 |
of transmission parameters for control response frames (e.g. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
273 |
CTS and ACK). |ns3| follows the standard and selects the rate |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
274 |
of control response frames from the set of basic rates or |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
275 |
mandatory rates. This means that control response frames may |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
276 |
be sent using different rate even though the ConstantRateWifiManager |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
277 |
is used. The ControlMode attribute of the ConstantRateWifiManager |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
278 |
is used for RTS frames only. The rate of CTS and ACK frames are |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
279 |
selected according to the 802.11 standard. However, users can still |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
280 |
manually add WifiMode to the basic rate set that will allow control |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
281 |
response frames to be sent at other rates. Please consult the |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
282 |
`project wiki <http://www.nsnam.org/wiki>`_ on how to do this. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
283 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
284 |
Available attributes: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
285 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
286 |
* DataMode (default WifiMode::OfdmRate6Mbps): specify a mode for |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
287 |
all non-unicast packets |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
288 |
* ControlMode (default WifiMode::OfdmRate6Mbps): specify a mode for |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
289 |
all 'request' control packets |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
290 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
291 |
IdealWifiManager |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
292 |
================ |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
293 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
294 |
The ideal rate control algorithm selects the best |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
295 |
mode according to the SNR of the previous packet sent. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
296 |
Consider node *A* sending a unicast packet to node *B*. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
297 |
When *B* successfully receives the packet sent from *A*, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
298 |
*B* records the SNR of the received packet into a ``ns3::SnrTag`` |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
299 |
and adds the tag to an ACK back to *A*. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
300 |
By doing this, *A* is able to learn the SNR of the packet sent to *B* |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
301 |
using an out-of-band mechanism (thus the name 'ideal'). |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
302 |
*A* then uses the SNR to select a transmission mode based |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
303 |
on a set of SNR thresholds, which was built from a target BER and |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
304 |
mode-specific SNR/BER curves. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
305 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
306 |
Available attribute: |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
307 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
308 |
* BerThreshold (default 10e-6): The maximum Bit Error Rate |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
309 |
that is used to calculate the SNR threshold for each mode. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
310 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
311 |
MinstrelWifiManager |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
312 |
=================== |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
313 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
314 |
The minstrel rate control algorithm is a rate control algorithm originated from |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
315 |
madwifi project. It is currently the default rate control algorithm of the Linux kernel. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
316 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
317 |
Minstrel keeps track of the probability of successfully sending a frame of each available rate. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
318 |
Minstrel then calculates the expected throughput by multiplying the probability with the rate. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
319 |
This approach is chosen to make sure that lower rates are not selected in favor of the higher |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
320 |
rates (since lower rates are more likely to have higher probability). |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
321 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
322 |
In minstrel, roughly 10 percent of transmissions are sent at the so-called lookaround rate. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
323 |
The goal of the lookaround rate is to force minstrel to try higher rate than the currently used rate. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
324 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
325 |
For a more detailed information about minstrel, see [linuxminstrel]_. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
326 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
327 |
Modifying Wifi model |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
328 |
******************** |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
329 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
330 |
Modifying the default wifi model is one of the common tasks when performing research. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
331 |
We provide an overview of how to make changes to the default wifi model in this section. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
332 |
Depending on your goal, the common tasks are (in no particular order): |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
333 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
334 |
* Creating or modifying the default Wi-Fi frames/headers by making changes to ``wifi-mac-header.*``. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
335 |
* MAC low modification. For example, handling new/modified control frames (think RTS/CTS/ACK/Block ACK), |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
336 |
making changes to two-way transaction/four-way transaction. Users usually make changes to |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
337 |
``mac-low.*`` to accomplish this. Handling of control frames is performed in |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
338 |
``MacLow::ReceiveOk``. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
339 |
* MAC high modification. For example, handling new management frames (think beacon/probe), |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
340 |
beacon/probe generation. Users usually make changes to ``regular-wifi-mac.*``, |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
341 |
``sta-wifi-mac.*``, ``ap-wifi-mac.*``, or ``adhoc-wifi-mac.*`` to accomplish this. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
342 |
* Wi-Fi queue management. The files ``dca-txop.*`` and ``edca-txop-n.*`` are of interested for this task. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
343 |
* Channel access management. Users should modify the files ``dcf-manager.*``, which grant access to |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
344 |
``DcaTxop`` and ``EdcaTxopN``. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
345 |
* Fragmentation and RTS threholds are handled by Wi-Fi remote station manager. Note that Wi-Fi remote |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
346 |
station manager simply indicates if fragmentation and RTS are needed. Fragmentation is handled by |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
347 |
``DcaTxop`` or ``EdcaTxopN`` while RTS/CTS transaction is hanled by ``MacLow``. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
348 |
* Modifying or creating new rate control algorithms can be done by creating a new child class of Wi-Fi remote |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
349 |
station manager or modifying the existing ones. |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
350 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
351 |
Note on the current implementation |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
352 |
********************************** |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
353 |
|
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
354 |
* 802.11g does not support 9 microseconds slot |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
355 |
* PHY_RXSTART is not supported |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
356 |
* 802.11e TXOP is not supported |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
357 |
* 802.11n MIMO is not supported |
11646
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
358 |
* 802.11n/ac MIMO is not supported |
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
359 |
* 802.11n/ac beamforming is not supported |
11465
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
360 |
* PLCP preamble reception is not modeled |
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
361 |
* BSSBasicRateSet for 802.11b has been assumed to be 1-2 Mbit/s |
11646
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
362 |
* BSSBasicRateSet for 802.11a/g has been assumed to be 6-12-24 Mbit/s |
11465
5a50e80cdf32
enable wifi module documentation to be built standalone
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
363 |
* cases where RTS/CTS and ACK are transmitted using HT formats are not supported |
11646
56d62956a729
Update wifi documentation
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11465
diff
changeset
|
364 |
* Only ``ConstantRateWifiManager`` is supported by **802.11n** or **802.11ac** |