# WLAN Aware Cognitive Medium Access Control Protocol for IoT Applications
## 3 Overview and Operation of IEEE 802.11 and IEEE 802.15.4  
### Iee 802.11  
IEEE 802.11 specifies medium access control, physical layer rules, and algorithms for WLAN. There are two modes of operation for implementation of Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) in WLAN that are supported by the IEEE 802.11: (i) Distributed Coordination Function (DCF): Contention-based access method that uses virtual carrier sensing along with physical sensing. Just like Ethernet, it first checks whether the radio link is free before transmitting. Stations use a random backoff after every frame to avoid collision, with the first transmitting devices seizing the channel. DCF may apply Clear To Send/Request To Send technique to further reduce the probability of collisions; and (ii) Point Coordination Function (PCF): Contention-free access method where the access point manages transmission between nodes using polling. To obtain priority over standard contention based utilities, PCF allows stations to transmit frames after a shorter interval [28]. WLAN DCF Traffic Model  
WLAN traffic is bursty and its channel utilization is as shown in Figure 1. As can be seen, there exist gaps or periods of inactivity between two consecutive packets, as shown in Figure 2[12]. WLAN data frames exist in clusters with short intervals between them, whereas the idle inactive periods between the clusters are longer. The reason for short intervals between the frames is due to the contention mechanism of the IEEE 802.11 MAC layer, in which senders take backoff for a short random interval before every transmission [29]. Most of the WLAN traffic uses Distributed Coordination Function (DCF) method. In case of DCF media access type, WLAN users sense the channel before initiating a transmission, as shown in Figure 3. If the medium is sensed as idle for Distributed Interframe Spacing (DIFS) time interval, the transmission takes place; otherwise, the node defers its transmission. After the DIFS interval, the node will generate a random backoff delay uniformly chosen between an interval \([0,W]\), which is  
Figure 1: Traffic traces of Wireless Local Area Network (WLAN) networks in real-time environment [12]. Figure 2: Enlarged view of WLAN traffic traces, packet transmission [12]. called the Contention Window (CW), where \(W\) is the size of the contention window. Initial \(W\) is set to a value of minimum contention window, or \(CW_{min}\). Once the channel is again free for a DIFS time interval, the back-off timer is decremented. The backoff counter freezes if a transmission is detected on the medium. When the backoff timer reaches zero, the node transmits a data packet and waits for the Short Interframe Spacing (SIFS) interval before the next transmission [30]. WLAN activity is divided into two states, the active state and the idle state. The active state consists of the time data is transmitted, including DIFS, SIFS, and Acknowledgment (ACK) intervals. The idle state consists of the WLAN contention period known as the contention window (CW) and WLAN inactive period known as white space (WS). Several works in the literature have modeled the active and inactive periods of WLAN [27; 31]. As in Reference [25], active period \(f_{A}(t)\) can be modeled by a uniform distribution, as given below:  
\[f_{A}(t)=\frac{1}{\tau_{max}-\tau_{min}},\;t\;\epsilon\;(\tau_{min},\tau_{max}), \tag{1}\]  
where parameters \((\tau_{max})\) and \((\tau_{min})\) define range of maximum and minimum values of the estimated active period. Similarly, time spent by the WLAN users for contention, i.e., for backoff procedure, can be modeled by uniform distribution, as given below [25]:  
\[f_{CW}(t)=\frac{1}{\tau_{BK}-0},\;t\;\epsilon\;(0,\tau_{BK}), \tag{2}\]  
where parameters \((\tau_{BK})\) represent the maximum backoff time, given by the WLAN specification. To estimate the idle duration due to WLAN inactive periods is more involved and depends on the type of user traffic.