As discussed in the related work section, most MAC protocols in the literature did not take into account the channel usage characteristics of the PUs, with [9,25] being exceptions. But in those schemes too, the effect of SU access was not taken into account. Therefore, if all the SUs tried to access the optimum channel, the packet collisions bring the throughput down. In this section, we discuss how the PU channel usage statistics and the SU channel usage statistics could be used towards increasing the throughput of SUs. First, we explain how the PU channel statistics can be used in the CCC sequence selection process. Then, we explain how both the PU and SU statistics can be used in the data transmission process.
4.1 Proactive common control channel
Most SH CCC schemes in the literature searched for idle channels in a predetermined or random order. So each SU selected channels based on that channel scan order and listened to them to identify the state of the channel. If the channel was idle, the SU used it and if not, the search continued till it finds one and the receiver channel selection coincided with it. In the scheme presented, to reduce the interruptions to the primary and secondary users, we ordered the channels in the ascending order of activity. Thus, the SUs selected the channel with the highest expected availability more often, saving them from interfering with the PU and high variability in the idle channel search delay.
Let p
i
denote the stationary probability of PU channel i being idle, where i∈{1,2,…,N}. This probability is given by the distribution of events at node e. This node e represents empty string in the PST. Then, Algorithm 1 was used to generate the channel sequence \({\phi _{j}^{t}}\), where \({\phi _{j}^{t}}\) is the channel selected by SU j at time slot t.
In the above scheme, it can be seen that the SUs select the channels with less PU activity more often. Furthermore, due to the randomness in the selection process, the packet collisions will be low. The downside to this channel selection method is not having a guaranteed rendezvous time as the schemes [24] and [23].
4.1.1 Analytic formulation of the average time to rendezvous
The time to rendezvous is an important performance metric because it decides the number of attempts an SU has to make to successfully complete a handshake with the receiver which in turn dictates the packet delays. Therefore, time to rendezvous should be as small as possible. In order to derive a formula for the average time to rendezvous for a transmitting SU, first, the probability of successfully contacting the receiver should be calculated. The method of calculation is explained below.
First, the following assumptions were made: the contention window size is CW, all backoff time values are equiprobable with probability \(\frac {1}{{\text {CW}}+1}\) and the total number of SUs is M. The vulnerable time is given by t
v
. This is the minimum time gap between the smallest backoff time window and the second smallest backoff time window of contending neighbors on the same channel to avoid a packet collision. In other words, this is the average time duration it takes for nodes in the CSMA/CA network to identify the channel is busy after the first node transmits. This time is equal to the sum of the transmission time duration of the request to send (RTS) packet and the propagation time, in the unit of sub-time slots (smallest synchronous time unit) [29]. The false alarm probability is given by symbol p
fa and the probability of selecting channel k(≤N) is given by \({p^{s}_{k}}\). According to the CCC selection algorithm above, \({p^{s}_{k}} = \frac {p_{k}}{\sum _{i=1}^{N} p_{i}}\). The probability of channel access by an SU is given by a, and the cumulative distribution of the random backoff time slots generated is given by F(·). Using these parameters, the formula for the probability of successful handshake, θ
s
, was formulated as given in Equation 1.
$$ \begin{aligned} \theta_{s} &= \!\sum\limits_{i=1}^{N} p_{i} {p^{s}_{i}} \left[ \sum\limits_{r=0}^{M-1}\left(1\,-\,p_{\text{fa}} \right) \binom{M\,-\,1}{r} \left(a {p^{s}_{i}} \right)^{r} \left(1\,-\,a {p^{s}_{i}} \right)^{M-r-1}\right. \\ &\quad \times\left. \sum\limits_{\tau=0}^{\text{CW}} \left(1-F(\tau + t_{v}) \right)^{r} \frac{1}{{\text{CW}}+1} \right] {p^{s}_{i}} (1-a)~. \end{aligned} $$
((1))
The steps of the derivation of this equation are given below.
Proof.
First let us find the conditions that should be met in order for an SU to succeed in the handshake. A given SU j can succeed in the handshake if all the conditions below are satisfied:
-
SU j has a packet to transmit which is given by probability a.
-
The SU j selects channel i which is given by the probability \({p^{s}_{i}}\).
-
Channel i is idle, given by probability p
i
.
-
Channel i is sensed as idle by j, given by (1−p
fa).
-
SU j wins the contention.
-
The receiver has selected channel i and is not transmitting, given by \({p^{s}_{i}} \times (1-a)\).
For the SU j to win the contention, the backoff duration of it should be less than the minimum of all the other SUs trying to transmit in the same channel by atleast the vulnerable time t
v
. In this paper, we assumed all the SUs can hear each other. If the cumulative distribution function of the backoff duration is given by F(·) and SU j’s backoff duration is τ, the probability, R(τ+t
v
)
r
, that r number of transmitting SUs backoff times are more than τ+t
v
is given by:
$$ R(\tau + t_{v})_{r} = \left(1-F(\tau +t_{v}) \right)^{r} ~. $$
((2))
Then, the distribution of r SUs trying to access channel i can be derived using the binomial distribution with probability of success \(a \times {p^{s}_{i}}\) and total number of other SUs M−1 as given in Equation 3.
$$ B\left(M-1,a {p^{s}_{i}}\right) = \binom{M-1}{r} \left(a {p^{s}_{i}} \right)^{r} \left(1-a {p^{s}_{i}} \right)^{M-r-1} ~. $$
((3))
Equation 2 gives the probability of winning the contention conditioned on, the backoff time τ of SU j, the number of other SUs trying to access channel i which is r and the given SU j is trying to transmit on channel i. Since the backoff time is uniformly distributed in [0,CW], we took the expectation of R(τ+t
v
)
r
with respect to the backoff duration and the number of other users trying to access channel i. The result is the probability of an SU winning the contention which is given in Equation 4.
$$\begin{array}{@{}rcl@{}} \zeta_{s}(i) &=& \sum_{r=0}^{M-1} \binom{M-1}{r} \left(a {p^{s}_{i}} \right)^{r} \left(1-a {p^{s}_{i}} \right)^{M-r-1} \\ & & \times \sum_{\tau=0}^{\text{CW}} \left(1-F(\tau + t_{v}) \right)^{r} \frac{1}{{\text{CW}}+1}. \end{array} $$
((4))
Then, multiplying ζ
s
(i) by the probability of the receiver being tuned into channel i, \(a {p^{s}_{i}}\), we get the probability of successful handshake in channel i. Then, finally, we took the expectation of it w.r.t. all the channels where the probability of selecting a given channel was \(p_{i}\left (1-p_{\text {fa}} \right) {p^{s}_{i}}\) which gave us the result given in Equation 1.
Then, the probability distribution for the number of time slots to achieve rendezvous T
R(q=l) was calculated as given in Equation 5.
$$ TR(q=l) = \left(1-\theta_{s} \ \right)^{l-1}\theta_{s} ~. $$
((5))
4.1.2 Channel load in the SH control channel
Since this scheme uses a stochastically selected control channel, only the average channel load can be calculated. The probability of r users out of M SUs accessing channel i can be given by \(B(M,a {p^{s}_{i}})\) which was defined in Equation 3. Then, using \(B(M,a {p^{s}_{i}})\), an equation for the maximum average channel load was formulated as shown in Equation 6.
$$ L\left(M,\underline{\mathbf{p}}^{s},a \right) = \displaystyle\max_{i=\left\lbrace1,2,\cdots,N \right\rbrace} \sum_{r=1}^{M} r \cdot B(M,a{p_{i}^{s}})~. $$
((6))
4.1.3 Degree of rendezvous
This metric gives the number of minimum overlaps between any two channel sequences in a SH-based CCC. In a stochastic channel selection scheme, although a number for the degree of rendezvous cannot be given, the probability for two sequences of length Q to have a minimum of k overlaps can be calculated. Equation 7 gives an expression for this probabilistic degree of rendezvous.
$$ {\text{DR}}(Q,k,\underline{\mathbf{p}}^{s}) = \sum\limits_{i=1}^{N} {p_{i}^{s}} \sum\limits_{r=k}^{Q} \binom{Q}{r}\left({p_{i}^{s}}\right)^{2r}\left(1-\left({p_{i}^{s}} \right)^{2}\right)^{Q-r}~. $$
((7))
4.2 Channel set selection for the data transmission
In predicting the status of a channel using the PST, we need to sense the channels. To make the CR less expensive, we used a single half-duplex transceiver and did energy detection-based narrow band sensing. Therefore, in our scheme, only sequential sensing was possible and there is an upper bound m, to the number of channels an SU can sense in a given time slot. This upper bound is the time needed to fail in transmitting m−1 times and trying transmitting for the mth time, so that there is time for contention window, RTS and clear to send (CTS) messages, data, and the ACK. Therefore, the selection of a set of channels which are both utilized less by the PU and the other SUs is necessary to achieve a better throughput. We used a channel set selection scheme which chose the channels which are highly available for a given SU j with high probability. To find this channel set, we have to calculate the probability of winning the contention on a given idle channel i.
4.2.1 Calculating the probability of winning the contention
This is a subjective usage indicator on an SU j of interest. To calculate this parameter, each SU kept track of the instances it tried to access channel i, \(\epsilon ^{\text {tot}}_{\textit {ij}}\) and the instances it acquired channel i, \(\epsilon ^{\text {acq}}_{\textit {ij}}\). Then, for the channels that the SU has been accessing, we calculated c
ij
using the ratio between the two,\(\frac {\epsilon ^{\text {acq}}_{\textit {ij}}}{\epsilon ^{\text {tot}}_{\textit {ij}}}\). For the channels that the SU has not tried to access, these parameter values were calculated based on the probability a channel is successfully accessed by an SU, given that each SU chooses each channel with equal probability \(\frac {1}{N}\). Thus, for the unused channel i and SU j, the parameter c
ij
was calculated as given in Equation 8.
$$\begin{array}{@{}rcl@{}} c_{ij} &=& \sum\limits_{r=0}^{M-1}\left(1-p_{\text{fa}} \right) \binom{M-1}{r} \left(\frac{a}{N} \right)^{r} \left(1-\frac{a}{N} \right)^{M-r-1} \\ & & \times \sum\limits_{\tau=0}^{\text{CW}} \left(1-F(\tau + t_{v}) \right)^{r} \frac{1}{\mathrm{CW+1}}~. \end{array} $$
((8))
4.2.2 Channel set selection for the data transmission
Using the above calculated parameter c
ij
and the stationary probability of channel i being idle, p
i
, we selected the channel set using Algorithm 2.
In the following section, we discuss how the communication between two SUs happen.
4.3 Communication between two SUs
In the scheme presented, the communication between two nodes happens in two stages. First, an initial handshake between SUs is completed, and then, the SUs communicate data between each other. In the first stage, the transmitting SU generates the channels to be used at each time slot t, \({\phi _{j}^{t}}\), using Algorithm 1. Then, it generates the channel set \(\mathcal {S}_{j}\) to be used for data transmission, using Algorithm 2. After that, the transmitting SU u starts the handshake phase with receiver v. This is explained in the next sub-section.
4.3.1 Handshake between the sender and the receiver
Prior to the handshake with the receiver, in the QP, the transmitter u senses the channel list \(\mathcal {S}_{j}\) first and then senses the control channel \({\phi _{j}^{t}}\). Then, in the backoff period, it calculates the statistical availability of the channel set \(\mathcal {S}_{j} \cup {\phi _{j}^{t}}\) at time slot t+1 using the sensing results and the PST models acquired. Then, the channels which have the probability of being idle greater than 0.5 are arranged in the descending order. This ordered list \(H_{u}^{t+1}\) is piggybacked on the RTS packet. If the intended receiver happened to listen to the same channel (i.e., \({\phi _{u}^{t}} = {\phi _{v}^{t}}\)) and was able to decode the packet, it transmits a CTS packet. Then, the data communication is done using the same channel \({\phi _{j}^{t}}\) till the end of the time slot and the receiver sends an ACK. At this stage, the handshake is considered to be successful. If the CTS get timed out, the procedure is continued in the next time slot. A diagram showing an example of transmitter slot structure at handshake phase is given in Figure 2.
4.3.2 Data transmission after the successful handshake
If the handshake was successful at time slot t, the receiver v and transmitter u, knowing the channels to be used in access, sense the channel set \(H_{u}^{t+1}\) in the quiet period of time slot t+1. This sensing is done starting from the worst to the best (i.e., in the reverse order). Therefore, after sensing the best channel, the transmitter u generates the backoff time and if sensed idle, it will send the RTS with the sensed channel status data on set \(H_{u}^{t+1}\) piggybacked on it. Then, if this RTS was received at the receiver v, it replies with a CTS with sensed channel status data on set \(H_{u}^{t+1}\) piggybacked on it. Then, after the data transmission starts at the end of the time slot, the receiver v sends an ACK if the transmission was successful. If the CTS was not received at the transmitter, the transmitter will try the next channel in sequence \(H_{u}^{t+1}\) after the CTS times out. This goes on until the list \(H_{u}^{t+1}\) gets exhausted within time slot t+1. We set this time out period to be equal to the sum of CTS transmission time and propagation delay and the time to transmit the header of the data part and propagation delay. If the transmitter u was unable to contact the receiver v for an entire time slot, then the initial handshake has to be redone, because the channel status at both ends of the current slot are not known to both u and v.
If the RTS and CTS exchange was successful, then the sensing outcomes of the channels at both ends are available to both u and v. Then, both u and v fuse the sensing results using OR decision fusion and save this result for each channel i separately in a buffer \(s_{\textit {uv}}^{i}\), where \(i \in \mathcal {S}_{j} \cup {\phi _{j}^{t}} \). Each user u clears the buffer \(s_{\textit {uv}}^{i}\) when the channel i is not sensed or the communication between each other is over in that time slot. Then, this buffer content at time slot t+1 is used to predict the channel status at time t+2. Then, both u and v make their ordered lists \(H_{u}^{t+2}\) and \(H_{v}^{t+2}\). Both of these lists are the same. Therefore, in time slot t+2, the communication is possible. This process goes on till the communication between u and v is complete. A diagram showing an example of transmitter slot structure at data transmission phase is given in Figure 3.
4.4 Registration of new users, synchronization, and model updates
We assume that the REM transmits beacons every T time slots on all the available PU channels. This beacon transmission starts at the QP of the SUs; therefore, it is easy for the SUs to detect this beacon. This beacon contains a synchronizing bit sequence and encoded channel models. The SUs who has registered with the REM can decode these models. In these beacons, the periodic channel hopping pattern of the REM is mentioned so that the SUs newly arriving to the network can follow the REM hopping pattern and communicate with it to get registered. A newly arriving SU should scan the spectrum till it receives the beacon. The period T was determined as the minimum of the time for 5% of SUs to have a clock drift of \(\frac {\text {QP}}{2}\) and the inter-arrival time between two new user arrivals to have 95% probability of arrival. Since all the registered SUs get synchronized with the REM from time to time, the assumption of synchronicity holds true.