An IEEE 802.11ah simulation module for NS-3 Le Tian, Steven Latr´e, and Jeroen Famaey University of Antwerp – iMinds
[email protected] https://www.uantwerpen.be/en/rg/mosaic/projects/ieee-802-11ah/ January 12, 2016
1
Introduction
Current IoT communication technologies can be categorized in two groups: wireless sensor networks (WSNs) and mobile (cellular) networks. The former group focuses on energy-efficient low-throughput connectivity between many devices over relatively short distances (i.e., tens of meters), and includes technologies such as 802.15.4, ZigBee, 6LoWPAN and Bluetooth. The latter supports communication over longer distances and comes in both high-throughput (e.g., GPRS, LTE) and energy-efficient (e.g., SIGFOX, LoRA) variants. The downside of the latter is that they require an expensive fixed infrastructure of base stations with sufficient coverage area. As such, a gap still exists for a WSN technology that supports long-range energy-efficient communications for IoT devices. The recently released IEEE 802.11ah Wi-Fi standard (marketed as Wi-Fi HaLow) fills this gap, combining the advantages of Wi-Fi and low-power WSN communication technologies. IEEE 802.11ah is a wireless local area network (WLAN) PHY and MAC layer protocol that operates in the unlicensed sub-1Ghz frequency bands (e.g., 863–868Mhz in Europe and 902–928Mhz in North-America). It was designed to provide communications over distances up to 1 kilometer or more while maintaining a data rate of over 100Kbps, offering both a greater reach and throughput than existing WSN technologies. In the MAC layer, 802.11ah introduces mechanisms such as hierarchical organization, short MAC header, restricted access window (RAW), TIM segmentation and target wake time (TWT), to support a large number of densely deployed energy-constrained stations. The RAW feature divides stations into groups, allowing only one group to access the channel simultaneously, reducing the collision probability in dense networks.
2
IEEE 802.11ah
IEEE 802.11ah operates at sub-1GHz, supporting long distance transmission, 8192 nodes connected to a single AP and high energy efficiency. These features make it an attractive standard for long-range IoT applications, such as sensor-based monitoring, smart meters and home automation. Throughout this section we highlight aspects of the standard that are important for our subsequent evaluation. For a more detailed overview, the reader is referred to existing literature [1].
2.1
PHY layer
The IEEE 802.11ah PHY layer inherits characteristics from 802.11ac and adapts them to sub-1Ghz frequencies. Its channel bandwidths range from 1 to 16 MHz, with 1 and 2 MHz support being mandatory. Operating at low frequency and narrow bandwidth allow it to transmit at longer ranges (up to 1 km) and with considerably less power consumption than traditional Wi-Fi technologies (e.g., 802.11n and 802.11ac), which use frequencies in the 2.4 and 5 GHz bands. For different data rates and bandwidths, IEEE 802.11ah utilizes different sets of modulation and coding schemes (MCSs), number of spatial streams (NSS) and duration of the guard interval (GI). Coding schemes include binary conventional coding (BCC), which is mandatory, as well as the optional low density parity check (LDPC). Table 1 lists data rates and their MCSs when GI and NSS are 8 us and 1 respectively for 1 and 2 MHz bandwidth. 1
Beacon ! carrying RPS!
Station X!
Beacon! carrying RPS!
assigned to!
RAW B!
RAW A!
RAW D!
RAW C!
assigned to!
slot 0!
slot 1!
…
slot i!
…
slot NRAW-1!
Figure 1: Schematic representation of the restricted access window mechanism or RAW Table 1: IEEE 802.11ah MCSs for 1, 2 MHz, NSS = 1, GI = 8 us
2.2
MCS Index 0 1 2 3 4 5 6 7 8 9
BPSK QPSK QPSK 16-QAM 16-QAM 64-QAM 64-QAM 64-QAM 256-QAM 256-QAM
10
256-QAM
Modulation
Coding rate 1/2 1/2 3/4 1/2 3/4 2/3 3/4 5/6 3/4 5/6 1/2 with 2x repetition
Data rate (Kbps) 1 Mhz 2 Mhz 300 650 600 1300 900.0 1950 1200.0 2600 1800.0 3900 2400.0 5200 2700.0 5850 3000.0 6500 3600.0 7800 4000.0 Not valid 150.0
Not valid
MAC layer
The MAC layer of IEEE 802.11ah, besides inheriting characteristics from IEEE 802.11ac, consists of several novel mechanisms, such as hierarchical organization, short MAC header, traffic information map (TIM) segmentation, target wake time (TWT) and RAW, which all help it to address the requirements of dense IoT networks. To simplify operations and improve scalability with a huge number of associated stations, the range of Association Id (AID) values for stations is extended to 8192. The hierarchical organization mechanism organizes stations by AIDs according to a four-level structure, including pages, blocks, sub-blocks and stations. Stations are divided into 4 pages of 32 blocks each, each block includes 8 sub-blocks of 8 stations each. To reduce MAC header overhead, the 802.11ah draft standard defines a new backward incompatible format of shortened headers for data, management and novel control frames, both the legacy and new MAC headers can be used in 802.11ah. In the current 802.11 standards, beacons trigger power saving (PS) station contention for the channel, which is the bottleneck of the whole power management framework since stations have to wake up to listen to every beacon. IEEE 802.11ah introduces the TIM segmentation mechanism to split information transmitted in TIM into several segments and to transmit TIM segments separately. The AP uses the delivery traffic indication map (DTIM) beacon to broadcast to stations which TIM segments have pending data, between two consecutive DTIM beacons, there are as many TIM beacons carrying TIM segment information. Stations belong to these TIM segments only need wake up to listen to their corresponding
2
TIM beacon, thus they can maintain a long power-saving state. Power consumption can be further reduced by TWT for stations transmitting data rarely. TWT stations can negotiate a time slot with the AP when they should wake up to exchange frames. Therefore they can stay in a power-saving state for very long periods of time during their TWT intervals. The restricted access window or RAW mechanism aims to reduce collisions and improve throughput when hundreds or even thousands of stations are simultaneously contending for channel access [2]. It restricts the number of stations that can simultaneously access the channel, by splitting them into groups and only allowing stations that belong to a certain group to access the channel at certain times. Figure 1 schematically depicts how RAW works. The airtime is split into intervals, each of which is assigned to one RAW group. Each interval is preceded by a beacon that carries a RAW parameter set (RPS) information element that specifies the stations that belong to the group, as well as the interval start time. Moreover, each RAW interval consists of one or more slots, over which the stations of the group are split evenly. As such, the RPS also contains the number of slots in each RAW interval and their duration. Outside of RAW intervals, the channel may be accessed by any station. Different from previous IEEE 802.11 technologies, each station uses two back-off states for Enhanced Distributed Channel Access (EDCA) to manage transmission inside and outside its assigned RAW slot respectively. The first back-off function state is used outside RAW and the second is used inside RAW slots. For the first back-off state, the station suspends its back-off at the start of each RAW and restores it to resume back-off at the end of the RAW. For the second back-off state, stations start back-off with initial back-off state inside their own RAW slot and discard the back-off state at the end of their RAW slot.
3
NS-3 simulation module
Currently, NS-3 comes with support for several IEEE 802.11 standards, including 802.11a, 802.11b, 802.11g, 802.11n and since recently 802.11ac. Their implementation is modular and consists of 4 main components: • WifiChannel: An analytical approximation of the physical medium over which data is transmitted (i.e., the air in case of Wi-Fi), consisting of propagation loss and delay models. • WifiPhy: The PHY part of the protocol, takes care of sending and receiving frames and determining loss due to interference. • MacLow: Implements RTS/CTS/DATA/ACK transactions, the distributed coordination function (DCF) and enhanced distributed coordination function (EDCA), packet queues, fragmentation, retransmission and rate control. • MacHigh: Implements management functions such as beacon generation, probing, association and authentication. The former two comprise the PHY layer and the latter two the MAC layer. We implemented IEEE 802.11ah by adapting the 802.11ac version of the models as outlined throughout the remainder of this section.
3.1
PHY layer
Figure 2 shows the components of the ns-3 PHY model. Our work in implementing 802.11ah focused on the components marked in the figure: InterferenceHelper/ErrorRateModel, WifiPhy/YansWifiPhy and PropagationLossModel. 3.1.1
WifiPhy/YansWifiPhy
We defined the modulation and coding schemes MCS0 to MCS10 for channel bandwidths 1, 2, 4, 8 and 16 Mhz (cf. Table 1). Moreover, IEEE 802.11ah uses different packet formats than previous standards. As such, those formats were implemented, as well as the way of calculating sending/receiving duration of preamble, header and payload.
3
InterferenceHelper/ ErrorRateModel!
get SNR and ! Packet error rate!
WifiPhy/YansWifiPhy!
send packets!
receive packets! get signal ! strength!
get delay! PropagationDelayModel!
WifiChannel!
PropagationLossModel!
Figure 2: NS-3 PHY models and interactions 3.1.2
InterferenceHelper/ErrorRateModel
Since 802.11ah defines a new packet format, the way of calculating SNR and error rate for 802.ah, which is based on physical packet header and payload is added in InterferenceHelper model. The ErrorRateModel used to calculate packet error rate can be NistErrorRate or YansErrorRate model, which are both supported in ns-3 and can be selected by the user through configuration. 3.1.3
PropagationLossModel
This model determines the signal strength in the wireless medium based on the distance between sender and receiver. We implemented the indoor and outdoor propagation loss models for 802.11ah developed by Hazmi et al. [3]. They proposed two different outdoor models, one for macro deployments and one for pico or hotzone deployments. The macro deployment model assumes an antenna height of 15 meters above a rooftop, with the propagation loss (in dB) given as follows: f L (d) = 8 + 37.6 log10 (d) + 21 log10 (1) 900MHz The pico deployment model is assumed to be at rooftop height, with the propagation loss (in dB) given as follows: f L(d) = 23.3 + 36.7 log10 (d) + 21 log10 (2) 900MHz Finally, the indoor propagation loss model is the same as that of 802.11n, and consists of the free space loss (LFS) with a slope of 2 up to a breakpoint distance and a slope of 3.5 after this breakpoint: 20 log10 4dπf d ≤ dBP c (3) L(d) = 20 log10 4dπf + 35 log10 d d > dBP c dBP With d, f , c and dBP the transmit-receive distance in meters, carrier frequency, speed of light and breakpoint distance respectively.
3.2
MAC layer
Of the new features of IEEE 802.11ah, our simulator currently supports RAW. Figure 3 depicts the components of the Wi-Fi MAC layer in NS-3. Our implementation focuses mainly on the MacHigh and DcaTxop/EdcaTxopN components.
4
MacHigh (ApWifiMAC/StaWifiMac)!
enqueue packets! DCF function!
receive packets!
access granted! DcaTxop/ EdcaTxopN!
DcfManager!
packet queue! MacRxMiddle! fragmentation! retransmission!
request access! star transmission!
receive!
listener!
MacLow!
send packets! listener!
RTS/CTS! /DATA/ACK! transaction!
receive packets!
WifiPhy/YansWifiPhy!
Figure 3: NS-3 MAC models and interactions 3.2.1
MacHigh
The new RPS element was added to the beaconing scheme in ApWifiMac, to carry RAW group information from the access point (AP) to the stations. We implemented a RAW information recognition module, that reads RAW information carried by the beacon and uses it to control station behavior, i.e., making sure stations are not accessing the channel during RAW slots they do not belong to. Finally, since RAW assignment is based on the AID, which was previously not implemented in NS-3, we added an AID assignment scheme, which allows the AP to assign an AID to stations during the association exchange. 3.2.2
DcaTxopN/EdcaTxopN
The double back-off mechanism, which is new in IEEE 802.11ah, was implemented in the DcaTxop and EdcaTxopN models, supporting both QoS and non-QoS data transmissions. Based on the behaviors set in the MacHigh component, stations start to contend for the channel in the appropriate period with the proper back-off state.
References [1] M. Park, “IEEE 802.11ah: sub-1-ghz license-exempt operation for the internet of things,” IEEE Communications Magazine, vol. 53, no. 9, pp. 145–151, 2015. [2] K. Shin, I. Park, J. Hong, D. Har, and D.-h. Cho, “Per-node throughput enhancement in Wi-Fi densenets,” IEEE Communications Magazine, vol. 53, no. 1, pp. 118–125, 2015. [3] A. Hazmi, J. Rinne, and M. Valkama, “Feasibility study of IEEE 802.11ah radio technology for IoT and M2M use cases,” in 2012 IEEE Globecom Workshops. IEEE, 2012, pp. 1687–1692.
5