|
|
| 28 |
* various rate control algorithms including **Aarf, Arf, Cara, Onoe, Rraa, |
28 |
* various rate control algorithms including **Aarf, Arf, Cara, Onoe, Rraa, |
| 29 |
ConstantRate, and Minstrel** |
29 |
ConstantRate, and Minstrel** |
| 30 |
* 802.11s (mesh), described in another chapter |
30 |
* 802.11s (mesh), described in another chapter |
|
|
31 |
* 802.11p and WAVE (vehicular), described in another chapter |
| 31 |
|
32 |
|
| 32 |
The set of 802.11 models provided in |ns3| attempts to provide an accurate |
33 |
The set of 802.11 models provided in |ns3| attempts to provide an accurate |
| 33 |
MAC-level implementation of the 802.11 specification and to provide a |
34 |
MAC-level implementation of the 802.11 specification and to provide a |
| 34 |
not-so-slow PHY-level model of the 802.11a/b/g/n/ac specifications. |
35 |
packet-level abstraction of the PHY-level for different PHYs, corresponding to |
|
|
36 |
802.11a/b/e/g/n/ac specifications. |
| 35 |
|
37 |
|
| 36 |
In |ns3|, nodes can have multiple WifiNetDevices on separate channels, and the |
38 |
In |ns3|, nodes can have multiple WifiNetDevices on separate channels, and the |
| 37 |
WifiNetDevice can coexist with other device types; this removes an architectural |
39 |
WifiNetDevice can coexist with other device types; this removes an architectural |
| 38 |
limitation found in |ns2|. Presently, however, there is no model for |
40 |
limitation found in |ns2|. Presently, however, there is no model for |
| 39 |
cross-channel interference or coupling. |
41 |
cross-channel interference or coupling between channels. |
| 40 |
|
42 |
|
| 41 |
The source code for the WifiNetDevice lives in the directory |
43 |
The source code for the WifiNetDevice and its models lives in the directory |
| 42 |
``src/wifi``. |
44 |
``src/wifi``. |
| 43 |
|
45 |
|
| 44 |
The implementation is modular and provides roughly four levels of models: |
46 |
The implementation is modular and provides roughly three sublayers of models: |
| 45 |
|
47 |
|
| 46 |
* the **PHY layer models** |
48 |
* the **PHY layer models** |
| 47 |
* the so-called **MAC low models**: they implement DCF and EDCAF |
49 |
* the so-called **MAC low models**: they model functions such as medium |
| 48 |
* the so-called **MAC high models**: they implement the MAC-level beacon |
50 |
access (DCF and EDCA), RTS/CTS and ACK. In |ns3|, the lower-level MAC |
| 49 |
generation, probing, and association state machines, and |
51 |
is further subdivided into a **MAC low** and **MAC middle** sublayering, |
| 50 |
* a set of **Rate control algorithms** used by the MAC low models |
52 |
with channel access grouped into the **MAC middle**. |
|
|
53 |
* the so-called **MAC high models**: they implement non-time-critical processes |
| 54 |
in Wifi such as the MAC-level beacon generation, probing, and association |
| 55 |
state machines, and a set of **Rate control algorithms**. In the literature, |
| 56 |
this sublayer is sometimes called the **upper MAC** and consists of more |
| 57 |
software-oriented implementations vs. time-critical hardware implementations. |
| 58 |
Next, we provide an design overview of each layer, shown in |
| 59 |
Figure :ref:`wifi-architecture`. |
| 51 |
|
60 |
|
| 52 |
Next, we provide some overview of each layer. |
61 |
.. _wifi-architecture: |
| 53 |
More detailed information will be discussed later. |
62 |
|
|
|
63 |
.. figure:: figures/WifiArchitecture.* |
| 64 |
|
| 65 |
WifiNetDevice architecture. |
| 54 |
|
66 |
|
| 55 |
MAC high models |
67 |
MAC high models |
| 56 |
=============== |
68 |
=============== |
|
|
| 79 |
style support an attribute ``VhtSupported`` that allows configuration |
91 |
style support an attribute ``VhtSupported`` that allows configuration |
| 80 |
of 802.11ac Very High Throughput style support. |
92 |
of 802.11ac Very High Throughput style support. |
| 81 |
|
93 |
|
|
|
94 |
There are also several **rate control algorithms** that can be used by the |
| 95 |
MAC low layer. A complete list of available rate control algorithms is |
| 96 |
provided in a separate section. |
| 97 |
|
| 82 |
MAC low layer |
98 |
MAC low layer |
| 83 |
============== |
99 |
============== |
| 84 |
|
100 |
|
| 85 |
The **MAC low layer** is split into three components: |
101 |
The **MAC low layer** is split into three main components: |
| 86 |
|
102 |
|
| 87 |
#. ``ns3::MacLow`` which takes care of RTS/CTS/DATA/ACK transactions. |
103 |
#. ``ns3::MacLow`` which takes care of RTS/CTS/DATA/ACK transactions. |
| 88 |
#. ``ns3::DcfManager`` and ``ns3::DcfState`` which implements the DCF and EDCAF |
104 |
#. ``ns3::DcfManager`` and ``ns3::DcfState`` which implements the DCF and EDCAF |
|
|
| 95 |
``ns3::EdcaTxopN`` is is used by QoS-enabled high MACs and also |
111 |
``ns3::EdcaTxopN`` is is used by QoS-enabled high MACs and also |
| 96 |
performs 802.11n-style MSDU aggregation. |
112 |
performs 802.11n-style MSDU aggregation. |
| 97 |
|
113 |
|
| 98 |
Rate control algorithms |
|
|
| 99 |
======================= |
| 100 |
|
| 101 |
There are also several **rate control algorithms** that can be used by the |
| 102 |
MAC low layer. A complete list of available rate control algorithms is |
| 103 |
provided in a separate section. |
| 104 |
|
| 105 |
PHY layer models |
114 |
PHY layer models |
| 106 |
================ |
115 |
================ |
| 107 |
|
116 |
|
| 108 |
The PHY layer implements a single model in the ``ns3::WifiPhy`` class: the |
117 |
The PHY layer implements a single model in the ``ns3::WifiPhy`` class: the |
| 109 |
physical layer model implemented there is described fully in a paper entitled |
118 |
physical layer model implemented there is described in a paper entitled |
| 110 |
`Yet Another Network Simulator <http://cutebugs.net/files/wns2-yans.pdf>`_ |
119 |
`Yet Another Network Simulator <http://cutebugs.net/files/wns2-yans.pdf>`_ |
| 111 |
Validation results for 802.11b are available in this |
120 |
The acronym *Yans* derives from this paper title. |
| 112 |
`technical report <http://www.nsnam.org/~pei/80211b.pdf>`_ |
|
|
| 113 |
|
121 |
|
| 114 |
.. _wifi-architecture: |
122 |
In short, the physical layer models are mainly responsible for modeling |
|
|
123 |
the reception of packets and for tracking energy consumption. There |
| 124 |
are typically three main components to this: |
| 115 |
|
125 |
|
| 116 |
.. figure:: figures/WifiArchitecture.* |
126 |
* each packet received is probabilistically evaluated for successful or |
| 117 |
|
127 |
failed reception. The probability depends on the modulation, on |
| 118 |
WifiNetDevice architecture. |
128 |
the signal to noise (and interference) ratio for the packet, and on |
|
|
129 |
the state of the physical layer (e.g. reception is not possible while |
| 130 |
transmission or sleeping is taking place); |
| 131 |
* an object exists to track (bookkeeping) all received signals so that |
| 132 |
the correct interference power for each packet can be computed when |
| 133 |
a reception decision has to be made; and |
| 134 |
* one or more error models corresponding to the modulation and standard |
| 135 |
are used to look up probability of successful reception. |
| 119 |
|
136 |
|
| 120 |
The WifiChannel and WifiPhy models |
137 |
Scope and Limitations |
| 121 |
********************************** |
138 |
********************* |
| 122 |
|
139 |
|
| 123 |
The WifiChannel subclass can be used to connect together a set of |
140 |
The IEEE 802.11 standard [ieee80211]_ is a large specification, |
| 124 |
``ns3::WifiNetDevice`` network interfaces. The class ``ns3::WifiPhy`` is the |
141 |
and not all aspects are covered by |ns3|; the documentation of |ns3|'s |
| 125 |
object within the WifiNetDevice that receives bits from the channel. |
142 |
conformance by itself would lead to a very long document. This section |
| 126 |
For the channel propagation modeling, the propagation module is used; see section :ref:`Propagation` for details. |
143 |
attempts to summarize compliance with the standard and with behavior |
|
|
144 |
found in practice. |
| 127 |
|
145 |
|
| 128 |
This section summarizes the description of the BER calculations found in the |
146 |
The physical layer and channel models operate on a per-packet basis, with |
| 129 |
yans paper taking into account the Forward Error Correction present in 802.11a |
147 |
no frequency-selective propagation or interference effects. Detailed |
| 130 |
and describes the algorithm we implemented to decide whether or not a packet can |
148 |
link simulations are not performed, nor are frequency-selective fading |
| 131 |
be successfully received. See `"Yet Another Network Simulator" |
149 |
or interference models available. Directional antennas and MIMO are also |
| 132 |
<http://cutebugs.net/files/wns2-yans.pdf>`_ for more details. |
150 |
not supported at this time. For additive white gaussian noise (AWGN) |
|
|
151 |
scenarios, or wideband interference scenarios, performance is governed |
| 152 |
by the application of analytical models (based on modulation and factors |
| 153 |
such as channel width) to the received signal-to-noise ratio, where noise |
| 154 |
combines the effect of thermal noise and of interference from other Wi-Fi |
| 155 |
packets. Moreover, interference from other technologies is not modeled. |
| 156 |
The following details pertain to the physical layer and channel models: |
| 133 |
|
157 |
|
| 134 |
The PHY layer can be in one of five states: |
158 |
* 802.11n MIMO is not supported |
|
|
159 |
* 802.11n/ac MIMO is not supported |
| 160 |
* 802.11n/ac beamforming is not supported |
| 161 |
* PLCP preamble reception is not modeled |
| 162 |
* PHY_RXSTART is not supported |
| 163 |
|
| 164 |
At the MAC layer, most of the main functions found in deployed Wi-Fi |
| 165 |
equipment for 802.11a/b/e/g are implemented, but there are scattered instances |
| 166 |
where some limitations in the models exist. Most notably, 802.11n/ac |
| 167 |
configurations are not supported by adaptive rate controls; only the |
| 168 |
so-called ``ConstantRateWifiManager`` can be used by those standards at |
| 169 |
this time. Support for 802.11n and ac is evolving. Some additional details |
| 170 |
are as follows: |
| 171 |
|
| 172 |
* 802.11g does not support 9 microseconds slot |
| 173 |
* 802.11e TXOP is not supported |
| 174 |
* BSSBasicRateSet for 802.11b has been assumed to be 1-2 Mbit/s |
| 175 |
* BSSBasicRateSet for 802.11a/g has been assumed to be 6-12-24 Mbit/s |
| 176 |
* cases where RTS/CTS and ACK are transmitted using HT formats are not supported |
| 177 |
|
| 178 |
Design Details |
| 179 |
************** |
| 180 |
|
| 181 |
The remainder of this section is devoted to more in-depth design descriptions |
| 182 |
of some of the Wi-Fi models. Users interested in skipping to the section |
| 183 |
on usage of the wifi module (User Documentation) may do so at this point. |
| 184 |
We organize these more detailed sections from the bottom-up, in terms of |
| 185 |
layering, by describing the channel and PHY models first, followed by |
| 186 |
the MAC models. |
| 187 |
|
| 188 |
WifiChannel |
| 189 |
=========== |
| 190 |
|
| 191 |
``ns3::WifiChannel`` is an abstract base class that allows different channel |
| 192 |
implementations to be connected. At present, there is only one such channel |
| 193 |
(the ``ns3::YansWifiChannel``). The class works in tandem with the |
| 194 |
``ns3::WifiPhy`` class; if you want to provide a new physical layer model, |
| 195 |
you must subclass both ``ns3::WifiChannel`` and ``ns3::WifiPhy``. |
| 196 |
|
| 197 |
The WifiChannel model exists to interconnect WifiPhy objects so that packets |
| 198 |
sent by one Phy are received by some or all other Phys on the channel. |
| 199 |
|
| 200 |
YansWifiChannel |
| 201 |
~~~~~~~~~~~~~~~ |
| 202 |
|
| 203 |
This is the only channel model presently in the |ns3| wifi module. The |
| 204 |
``ns3::YansWifiChannel`` implementation uses the propagation loss and |
| 205 |
delay models provided within the |ns3| :ref:`Propagation` module. |
| 206 |
In particular, a number of propagation models can be added (chained together, |
| 207 |
if multiple loss models are added) to the channel object, and a propagation |
| 208 |
delay model also added. Packets sent from a ``ns3::YansWifiPhy`` object |
| 209 |
onto the channel with a particular signal power, are copied to all of the |
| 210 |
other ``ns3::YansWifiPhy`` objects after the signal power is reduced due |
| 211 |
to the propagation loss model(s), and after a delay corresponding to |
| 212 |
transmission (serialization) delay and propagation delay due |
| 213 |
any channel propagation delay model (typically due to speed-of-light |
| 214 |
delay between the positions of the devices). |
| 215 |
|
| 216 |
Only objects of ``ns3::YansWifiPhy`` may be attached to a |
| 217 |
``ns3::YansWifiChannel``; therefore, objects modeling other |
| 218 |
(interfering) technologies such as LTE are not allowed. Furthermore, |
| 219 |
packets from different channels do not interact; if a channel is logically |
| 220 |
configured for e.g. channels 5 and 6, the packets do not cause |
| 221 |
adjacent channel interference (even if their channel numbers overlap). |
| 222 |
|
| 223 |
WifiPhy and related models |
| 224 |
========================== |
| 225 |
|
| 226 |
The ``ns3::WifiPhy`` is an abstract base class representing the 802.11 |
| 227 |
physical layer functions. Packets passed to this object (via a |
| 228 |
``SendPacket()`` method are sent over the ``WifiChannel`` object, and |
| 229 |
upon reception, the receiving PHY object decides (based on signal power |
| 230 |
and interference) whether the packet was successful or not. This class |
| 231 |
also provides a number of callbacks for notifications of physical layer |
| 232 |
events, exposes a notion of a state machine that can be monitored for |
| 233 |
MAC-level processes such as carrier sense, and handles sleep/wake models |
| 234 |
and energy consumption. The ``ns3::WifiPhy`` hooks to the ``ns3::MacLow`` |
| 235 |
object in the WifiNetDevice. |
| 236 |
|
| 237 |
There is currently one implementation of the ``WifiPhy``, which is the |
| 238 |
``ns3::YansWifiPhy``. It works in conjunction with three other objects: |
| 239 |
|
| 240 |
* **WifiPhyStateHelper**: Maintains the PHY state machine |
| 241 |
* **InterferenceHelper**: Tracks all packets observed on the channel |
| 242 |
* **ErrorModel**: Computes a probability of error for a given SNR |
| 243 |
|
| 244 |
YansWifiPhy and WifiPhyStateHelper |
| 245 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 246 |
|
| 247 |
Class ``ns3::YansWifiPhy`` is responsible for taking packets passed to |
| 248 |
it from the MAC (the ``ns3::MacLow`` object) and sending them onto the |
| 249 |
``ns3::YansWifiChannel`` to which it is attached. It is also responsible |
| 250 |
to receive packets from that channel, and, if reception is deemed to have |
| 251 |
been successful, to pass them up to the MAC. |
| 252 |
|
| 253 |
Class ``ns3::WifiPhyStateHelper`` manages the state machine of the PHY |
| 254 |
layer, and allows other objects to hook as *listeners* to monitor PHY |
| 255 |
state. The main use of listeners is for the MAC layer to know when |
| 256 |
the PHY is busy or not (for transmission and collision avoidance). |
| 257 |
|
| 258 |
The PHY layer can be in one of six states: |
| 135 |
|
259 |
|
| 136 |
#. TX: the PHY is currently transmitting a signal on behalf of its associated |
260 |
#. TX: the PHY is currently transmitting a signal on behalf of its associated |
| 137 |
MAC |
261 |
MAC |
|
|
| 139 |
its last bit to forward it to the MAC. |
263 |
its last bit to forward it to the MAC. |
| 140 |
#. IDLE: the PHY is not in the TX, RX, or CCA BUSY states. |
264 |
#. IDLE: the PHY is not in the TX, RX, or CCA BUSY states. |
| 141 |
#. CCA Busy: the PHY is not in TX or RX state but the measured energy is higher than the energy detection threshold. |
265 |
#. CCA Busy: the PHY is not in TX or RX state but the measured energy is higher than the energy detection threshold. |
|
|
266 |
#. SWITCHING: the PHY is switching channels. |
| 142 |
#. SLEEP: the PHY is in a power save mode and cannot send nor receive frames. |
267 |
#. SLEEP: the PHY is in a power save mode and cannot send nor receive frames. |
| 143 |
|
268 |
|
| 144 |
When the first bit of a new packet is received while the PHY is not IDLE (that |
269 |
Packet reception works as follows. The ``YansWifiPhy`` attribute |
| 145 |
is, it is already synchronized on the reception of another earlier packet or it |
270 |
CcaMode1Threshold |
| 146 |
is sending data itself), the received packet is dropped. Otherwise, if the PHY |
271 |
corresponds to what the standard calls the "ED threshold" for CCA Mode 1. |
| 147 |
is IDLE or CCA Busy, we calculate the received energy of the first bit of this new signal |
272 |
In section 16.4.8.5: "CCA Mode 1: Energy above threshold. CCA shall report |
| 148 |
and compare it against our Energy Detection threshold (as defined by the Clear |
273 |
a busy medium upon detection of any energy above the ED threshold." |
| 149 |
Channel Assessment function mode 1). If the energy of the packet k is higher, |
|
|
| 150 |
then the PHY moves to RX state and schedules an event when the last bit of the |
| 151 |
packet is expected to be received. Otherwise, the PHY stays in IDLE |
| 152 |
or CCA Busy state and drops the packet. |
| 153 |
|
274 |
|
| 154 |
The energy of the received signal is assumed to be zero outside of the reception |
275 |
There is a "noise ED threshold" in the standard for non-Wi-Fi signals, and |
| 155 |
interval of packet k and is calculated from the transmission power with a |
276 |
this is usually set to 20 dB greater than the "carrier sense ED threshold". |
| 156 |
path-loss propagation model in the reception interval. where the path loss |
277 |
However, the model doesn't support this, because there are no 'foreign' |
| 157 |
exponent, :math:`n`, is chosen equal to :math:`3`, the reference distance, |
278 |
signals in the YansWifi model-- everything is a Wi-Fi signal. |
| 158 |
:math:`d_0` is choosen equal to :math:`1.0m` and the reference energy is based |
|
|
| 159 |
based on a Friis propagation model. |
| 160 |
|
279 |
|
| 161 |
When the last bit of the packet upon which the PHY is synchronized is received, |
280 |
In the standard, there is also what is called the "minimum modulation |
| 162 |
we need to calculate the probability that the packet is received with any error |
281 |
and coding rate sensitivity" in section 18.3.10.6 CCA requirements. This is |
| 163 |
to decide whether or not the packet on which we were synchronized could be |
282 |
the -82 dBm requirement for 20 MHz channels. This is analogous to the |
| 164 |
successfully received or not: a random number is drawn from a uniform |
283 |
EnergyDetectionThreshold attribute in ``YansWifiPhy``. CCA busy state is |
| 165 |
distribution and is compared against the probability of error. |
284 |
not raised in this model when this threshold is exceeded but instead RX |
|
|
285 |
state is immediately reached, since it is assumed that PLCP sync always |
| 286 |
succeeds in this model. Even if the PLCP header reception fails, the |
| 287 |
channel state is still held in RX until YansWifiPhy::EndReceive(). |
| 166 |
|
288 |
|
| 167 |
To evaluate the probability of error, we start from the piecewise linear |
289 |
In ns-3, the values of these attributes are set to small default values |
| 168 |
functions shown in Figure :ref:`snir` and calculate the |
290 |
(-96 dBm for EnergyDetectionThreshold and -99 dBm for CcaMode1Threshold). |
| 169 |
SNIR function. |
291 |
So, if a signal comes in at > -96 dBm and the state is IDLE or CCA BUSY, |
|
|
292 |
this model will lock onto it for the signal duration and raise RX state. |
| 293 |
If it comes in at <= -96 dBm but >= -99 dBm, it will definitely raise |
| 294 |
CCA BUSY but not RX state. If it comes in < -99 dBm, it gets added to |
| 295 |
the interference tracker and, by itself, it will not raise CCA BUSY, but |
| 296 |
maybe a later signal will contribute more power so that the threshold |
| 297 |
of -99 dBm is reached at a later time. |
| 298 |
|
| 299 |
The energy of the signal intended to be received is |
| 300 |
calculated from the transmission power and adjusted based on the Tx gain |
| 301 |
of the transmitter, Rx gain of the receiver, and any path loss propagation |
| 302 |
model in effect. |
| 303 |
|
| 304 |
The packet reception occurs in two stages. First, an event is scheduled |
| 305 |
for when the PLCP header has been received. PLCP header is often transmitted |
| 306 |
at a lower modulation rate than is the payload. The portion of the packet |
| 307 |
corresponding to the PLCP header is evaluated for probability of error |
| 308 |
based on the observed SNR. The InterferenceHelper object returns a value |
| 309 |
for "probability of error (PER)" for this header based on the SNR that has |
| 310 |
been tracked by the InterferenceHelper. The ``YansWifiPhy`` then draws |
| 311 |
a random number from a uniform distribution and compares it against the |
| 312 |
PER and decides success or failure. The process is again repeated after |
| 313 |
the payload has been received (possibly with a different error model |
| 314 |
applied for the different modulation). If both the header and payload |
| 315 |
are successfully received, the packet is passed up to the ``MacLow`` object. |
| 316 |
|
| 317 |
Even if packet objects received by the PHY are not part of the reception |
| 318 |
process, they are remembered by the InterferenceHelper object for purposes |
| 319 |
of SINR computation and making clear channel assessment decisions. |
| 320 |
|
| 321 |
InterferenceHelper |
| 322 |
~~~~~~~~~~~~~~~~~~ |
| 323 |
|
| 324 |
The InterferenceHelper is an object that tracks all incoming packets and |
| 325 |
calculates probability of error values for packets being received, and |
| 326 |
also evaluates whether energy on the channel rises above the CCA |
| 327 |
threshold. |
| 328 |
|
| 329 |
The basic operation of probability of error calculations is shown in Figure |
| 330 |
:ref:`snir`. Packets are represented as bits (not symbols) in the |ns3| |
| 331 |
model, and the InterferenceHelper breaks the packet into one or more |
| 332 |
"chunks" each with a different signal to noise (and interference) ratio |
| 333 |
(SNIR). Each chunk is separately evaluated by asking for the probability |
| 334 |
of error for a given number of bits from the error model in use. The |
| 335 |
InterferenceHelper builds an aggregate "probability of error" value |
| 336 |
based on these chunks and their duration, and returns this back to |
| 337 |
the ``YansWifiPhy`` for a reception decision. |
| 170 |
|
338 |
|
| 171 |
.. _snir: |
339 |
.. _snir: |
| 172 |
|
340 |
|
|
|
| 174 |
|
342 |
|
| 175 |
*SNIR function over time.* |
343 |
*SNIR function over time.* |
| 176 |
|
344 |
|
| 177 |
From the SNIR function we can derive the Bit Error Rate (BER) and Packet Error Rate (PER) for |
345 |
From the SNIR function we can derive the Bit Error Rate (BER) and Packet |
| 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. |
346 |
Error Rate (PER) for |
|
|
347 |
the modulation and coding scheme being used for the transmission. |
| 179 |
|
348 |
|
| 180 |
WifiChannel configuration |
349 |
ErrorModel |
| 181 |
========================= |
350 |
~~~~~~~~~~ |
| 182 |
|
351 |
|
| 183 |
The WifiChannel implementation uses the propagation loss and delay models provided within the |ns3| :ref:`Propagation` module. |
352 |
The error models are described in more detail in outside references. Please refer to [pei80211ofdm]_, [pei80211b]_, [lacage2006yans]_, [Haccoun]_ and [Frenger]_ for a detailed description of the available BER/PER models. |
|
|
353 |
|
| 354 |
The current |ns3| error rate models are for additive white gaussian |
| 355 |
noise channels (AWGN) only; any potential fast fading effects are not modeled. |
| 356 |
|
| 357 |
The original error rate model was called the ``ns3::YansErrorRateModel`` and |
| 358 |
was based on analytical results. For 802.11b modulations, the 1 Mbps mode |
| 359 |
is based on DBPSK. BER is from equation 5.2-69 from [proakis2001]_. |
| 360 |
The 2 Mbps model is based on DQPSK. Equation 8 of [ferrari2004]_. |
| 361 |
More details are provided in [lacage2006yans]_. |
| 362 |
|
| 363 |
The ``ns3::NistErrorRateModel`` was later added and became the |ns3| default. |
| 364 |
The model was largely aligned with the previous ``ns3::YansErrorRateModel`` |
| 365 |
for DSSS modulations 1 Mbps and 2 Mbps, but the 5.5 Mbps and 11 Mbps models |
| 366 |
were re-based on equations (17) and (18) from [pursley2009]_. |
| 367 |
For OFDM modulations, newer results were |
| 368 |
obtained based on work previously done at NIST [miller2003]_. The results |
| 369 |
were also compared against the CMU wireless network emulator, and details |
| 370 |
of the validation are provided in [pei80211ofdm]_. Since OFDM modes use |
| 371 |
hard-decision of punctured codes, the coded BER is calculated using |
| 372 |
Chernoff bounds. |
| 373 |
|
| 374 |
The 802.11b model was split from the OFDM model when the NIST error rate |
| 375 |
model was added, into a new model called DsssErrorRateModel. The current |
| 376 |
behavior is that users may |
| 377 |
|
| 378 |
Furthermore, the 5.5 Mbps and 11 Mbps models for 802.11b rely on library |
| 379 |
methods implemented in the GNU Scientific Library (GSL). The Waf build |
| 380 |
system tries to detect whether the host platform has GSL installed; if so, |
| 381 |
it compiles in the newer models from [pursley2009]_ for 5.5 Mbps and 11 Mbps; |
| 382 |
if not, it uses a backup model derived from Matlab simulations. |
| 383 |
|
| 384 |
As a result, there are three error models: |
| 385 |
|
| 386 |
#. ``ns3::DsssErrorRateModel``: contains models for 802.11b modes. The |
| 387 |
802.11b 1 Mbps and 2 Mbps error models are based on classical modulation |
| 388 |
analysis. If GNU GSL is installed, the 5.5 Mbps and 11 Mbps from |
| 389 |
[pursley2009]_ are used; otherwise, a backup Matlab model is used. |
| 390 |
#. ``ns3::NistErrorRateModel``: is the default for OFDM modes and reuses |
| 391 |
``ns3::DsssErrorRateModel`` for 802.11b modes. |
| 392 |
#. ``ns3::YansErrorRateModel``: is the legacy for OFDM modes and reuses |
| 393 |
``ns3::DsssErrorRateModel`` for 802.11b modes. |
| 394 |
|
| 395 |
Users should select either Nist or Yans models for OFDM (Nist is default), |
| 396 |
and Dsss will be used in either case for 802.11b. |
| 184 |
|
397 |
|
| 185 |
The MAC model |
398 |
The MAC model |
| 186 |
************* |
399 |
============= |
| 187 |
|
400 |
|
| 188 |
The 802.11 Distributed Coordination Function is used to calculate when to grant |
401 |
The 802.11 Distributed Coordination Function is used to calculate when to grant |
| 189 |
access to the transmission medium. While implementing the DCF would have been |
402 |
access to the transmission medium. While implementing the DCF would have been |
|
|
| 230 |
* etc. |
443 |
* etc. |
| 231 |
|
444 |
|
| 232 |
Rate control algorithms |
445 |
Rate control algorithms |
| 233 |
*********************** |
446 |
####################### |
| 234 |
|
447 |
|
| 235 |
Multiple rate control algorithms are available in |ns3|. |
448 |
Multiple rate control algorithms are available in |ns3|. |
| 236 |
Some rate control algorithms are modeled after real algorithms used in real devices; |
449 |
Some rate control algorithms are modeled after real algorithms used in real devices; |
|
|
| 256 |
* ``AparfWifiManager`` [chevillat2005aparf]_ |
469 |
* ``AparfWifiManager`` [chevillat2005aparf]_ |
| 257 |
|
470 |
|
| 258 |
ConstantRateWifiManager |
471 |
ConstantRateWifiManager |
| 259 |
======================= |
472 |
~~~~~~~~~~~~~~~~~~~~~~~ |
| 260 |
|
473 |
|
| 261 |
The constant rate control algorithm always uses the same |
474 |
The constant rate control algorithm always uses the same |
| 262 |
transmission mode for every packet. Users can set a desired |
475 |
transmission mode for every packet. Users can set a desired |
|
|
| 289 |
all 'request' control packets |
502 |
all 'request' control packets |
| 290 |
|
503 |
|
| 291 |
IdealWifiManager |
504 |
IdealWifiManager |
| 292 |
================ |
505 |
~~~~~~~~~~~~~~~~ |
| 293 |
|
506 |
|
| 294 |
The ideal rate control algorithm selects the best |
507 |
The ideal rate control algorithm selects the best |
| 295 |
mode according to the SNR of the previous packet sent. |
508 |
mode according to the SNR of the previous packet sent. |
|
|
| 309 |
that is used to calculate the SNR threshold for each mode. |
522 |
that is used to calculate the SNR threshold for each mode. |
| 310 |
|
523 |
|
| 311 |
MinstrelWifiManager |
524 |
MinstrelWifiManager |
| 312 |
=================== |
525 |
~~~~~~~~~~~~~~~~~~~ |
| 313 |
|
526 |
|
| 314 |
The minstrel rate control algorithm is a rate control algorithm originated from |
527 |
The minstrel rate control algorithm is a rate control algorithm originated from |
| 315 |
madwifi project. It is currently the default rate control algorithm of the Linux kernel. |
528 |
madwifi project. It is currently the default rate control algorithm of the Linux kernel. |
|
|
| 325 |
For a more detailed information about minstrel, see [linuxminstrel]_. |
538 |
For a more detailed information about minstrel, see [linuxminstrel]_. |
| 326 |
|
539 |
|
| 327 |
Modifying Wifi model |
540 |
Modifying Wifi model |
| 328 |
******************** |
541 |
#################### |
| 329 |
|
542 |
|
| 330 |
Modifying the default wifi model is one of the common tasks when performing research. |
543 |
Modifying the default wifi model is one of the common tasks when performing research. |
| 331 |
We provide an overview of how to make changes to the default wifi model in this section. |
544 |
We provide an overview of how to make changes to the default wifi model in this section. |
|
|
| 348 |
* Modifying or creating new rate control algorithms can be done by creating a new child class of Wi-Fi remote |
561 |
* Modifying or creating new rate control algorithms can be done by creating a new child class of Wi-Fi remote |
| 349 |
station manager or modifying the existing ones. |
562 |
station manager or modifying the existing ones. |
| 350 |
|
563 |
|
| 351 |
Note on the current implementation |
|
|
| 352 |
********************************** |
| 353 |
|
| 354 |
* 802.11g does not support 9 microseconds slot |
| 355 |
* PHY_RXSTART is not supported |
| 356 |
* 802.11e TXOP is not supported |
| 357 |
* 802.11n MIMO is not supported |
| 358 |
* 802.11n/ac MIMO is not supported |
| 359 |
* 802.11n/ac beamforming is not supported |
| 360 |
* PLCP preamble reception is not modeled |
| 361 |
* BSSBasicRateSet for 802.11b has been assumed to be 1-2 Mbit/s |
| 362 |
* BSSBasicRateSet for 802.11a/g has been assumed to be 6-12-24 Mbit/s |
| 363 |
* cases where RTS/CTS and ACK are transmitted using HT formats are not supported |
| 364 |
* Only ``ConstantRateWifiManager`` is supported by **802.11n** or **802.11ac** |