In the plan stage of the cognition cycle, the cognitive MAC protocol has two major functions. One is to prevent CR users from interfering the legacy system, and the other is to make them efficiently and effectively access the unused spectrum in a short available transmission time. To this end, we suggest three improved approaches as
follows:
1. gating mechanism - to forbid the transmissions that may interfere to primary users or collide with other CR users;
2. linear backoff algorithm - to expedite the link establishment of delay-sensitive traffic flows;
3. stall avoidance scheme - to speed up the transmission of stalled non-real-time data packets.
The three above mechanisms help to achieve the objectives of high throughput, low access delay, and fairness for secondary users.
4.3.1 Gating Mechanism
The gating mechanism is used to avoid interfering the primary user of the legacy system and to reduce the collision among CR users. The basic idea is cooperating the spectrum usage information obtained from the spectrum sensing, identification and allocation techniques to prevent from interfering the primary users. Recall that the PIT stores the information of primary user transmissions. The gating mechanism postpones the secondary user transmitting packets when the primary user appears on the channel. In addition, we also suggest the modified p-persistent CSMA algorithm to improve the efficiency of spectrum usage for CR users, where the optimal value of p can be computed according to the number of nrt-nodes in CIT [69].
The detailed procedure of the proposed gating mechanism is described as follows:
1. When a frame of a CR user is requested for transmission, the gating mechanism first checks whether a legacy user occupies the channel from the information in PIT.
• If so, the transmission of this CR user is deferred.
• Otherwise, the optimal transmission probability p is calculated based on the neighborhood information in CIT.
2. Apply the p-persistent algorithm to determine whether the frame can be trans-mitted:
• If the frame is granted for transmission, the CR user immediately sends the frame.
• Otherwise, the frame will be deferred and again contend for the channel access.
According to the proposed procedure, one may argue that it still cause the in-terference with the legacy system using the CSMA/CA MAC protocol by suppressing the bandwidth. However, most existing systems using the CSMA/CA MAC are oper-ated on unlicensed frequency bands. Both legacy and CR devices have the equal right to access these frequency bands, and thus we believe that the bandwidth suppression is not an issue for secondary users.
4.3.2 Linear Backoff Algorithm
To expedite the channel access in supporting delay-sensitive application, we sug-gest that the link establishment of delay-sensitive traffic flows shall follow the linear backoff algorithm instead of increasing the CW size exponentially as in the legacy CSMA/CA MAC protocol. That is, if the request for sending the first frame of a delay-sensitive traffic flow is collided, the CW size (CWrt) for that particular frame increases according to the following principle:
CWrt= min(CWmax, CWmin× (Nreq− 1)), (4.1) where Nreq is the number of attempts for sending the frame; CWmax and CWmin
are the maximum and minimum CW sizes in the contention resolution mechanism, respectively.
Figure 4.1 shows the CW sizes for the linear and binary exponential backoff algorithms. As shown in the figure, the CW size in the linear backoff algorithm increases less slowly than that in the binary exponential backoff algorithm. Therefore, the channel access of the first frame in a delay-sensitive traffic flow can be faster than that of the non-real-time data flows. As long as the delay-sensitive traffic flow is successfully established, the remaining frames are sent in the reserved time slot according to the proposed invited reservation procedure (which will be discussed in Section 4.4). Based on our design, because only the first frame contends for accessing the channel, the number of attempts of establishing a delay-sensitive traffic flow is much fewer than that of non-real-time traffic flows. Thus, the proposed MAC protocol can avoid the collisions issue of the linear backoff algorithm, while reducing the access delay in the link establishment of delay-sensitive traffic flows.
4.3.3 Stall Avoidance Scheme
In order to improve the fairness for the CR users, we develop a stall avoidance scheme aiming to reduce the transmission delay of the nrt-nodes with excessive buffered frames. The specific goal of the suggested approach is to minimize the variance of the access delay among all the nrt-nodes. Due to the short available transmission time of the spectrum in an overlaying cognitive ad hoc network, the small variance of the access delay makes CR users have equal opportunities to access the channel. Here, the access delay includes the waiting time in the queue and the channel access time.
Therefore, obviously, reducing the variance of access delay implies to speed up the back-logged frame transmission.
The suggested stall avoidance scheme with respect to nrt-nodes is described as follows. Select a pre-determined threshold Qth for the maximum allowable buffered data frames and the guaranteed CW size for the stalled nrt-nodes CWstall, where
CWstall < CWmin. (4.2)
number of retransmissions CWmax
CWmin
0 1 2 3 N_att-1 N_att
: linear backoff algorithm : binary backoff algorithm
Fig. 4.1: Comparison of CW size between linear and binary exponential backoff algorithms.
If the number of buffered frames in an nrt-node is more than Qth, the CW size of the subsequent frames in the queue is reduced to CWstall. Because a smaller CW size leads to a higher transmission probability, the lagging frames in a stalled nrt-node with CWstall can be transmitted earlier than others, thereby improving the fairness performance among nrt-nodes. Both Qth and CWstall are system parameters, which optimal values can be obtained through heuristic search but beyond the scope of this paper.
One may argue that reducing the CW size worsens the network congestion in a crowded system and thus causes the instability for a network. However, this situation may seldom happen because secondary users in a cognitive network have plenty of channels, and the number of secondary users choose and access on the same channel is small compared to the legacy system. Furthermore, our simulation results shown in the later section illustrate that the system up to 140 stations can still remain stable.
Therefore, we believe the system instability is not a severe problem for the proposed MAC protocol.