**4. Intelligent broadcasting algorithm**

In this section, we present optimal broadcasting algorithm (OBA), the proposed broadcast protocol for ad hoc CR networks. OBA mainly aims to maximise the reachability and increase the reliability of data dissemination in ad hoc CR networks. To guarantee successful broadcast operation, the OBA protocol adapts to current network characteristics. Hence, based on local measurements of the PR activities, each CR node independently classifies the set of available channels. This process of classification is refined by determining the minimum set of broadcast channels. The receiving channel of a given node is identified from this minimum set of channels. This tuning channel is selected from the set because it has no PR activity, thus being able to reach a higher number of CR neighbours.

To increase the network connectivity, the OBA aims to converge CRs that possess similar spectrum opportunities to the same channel. This in turn reduces the delay in packet dissemination and number of transmissions over multiple channels. This aim is motivated by two key factors. First, grouping CRs with similar available channels indirectly initiates hard-decision cooperative sensing [8, 20]. Second, it minimises the required number of channels in the set that are needed to connect all neighbouring nodes.

In order to guarantee conveying the broadcast message to all the neighbouring nodes in each transmission, the CR sender broadcasts the message over a minimum set of the available channels that are shared between the sender and its neighbouring nodes.

CR nodes with no transmission requests refine the channels based on the same criterion to select the best channel for message reception. The use of similar refining techniques by all nodes in the network means it is highly probable that CR users in close geographic locations select the same channel set. It is probable that neighbouring CR nodes of the transmitter CR node sense the same primary activity. It is highly likely that channels at a CR node's disposition are also free to its neighbours [11]. Therefore, the probability of creating a connected topology is increased by OBA. Once a message is received, the intermediate CR node carries out the procedure again and rebroadcasts in order to deliver the message to its neighbours.

The following characteristics were considered crucial in the development of OBA: (i) decentralisation, distributed implementation of channel allocation; (ii) convergence, CR users with the same available channels individually converge to the same channel decisions; (iii) delay and communication efficiency, channel allocation is achieved with no exchange of messages; and (iv) adaptability, reallocation is required only in the case where there is a change in the network topology.

#### **4.1. Primary radio activity model**

The primary user activity on the licenced channels has a vital effect on the CR network performance. Therefore, the realisation of CR protocols depends on the estimation of these activities. In the literature, many works have used the PR activity model [5, 9, 21], where the PR traffic is modelled as an alternating renewal process of *idle* (*OFF*) and busy (*ON*) periods. It is assumed that both *OFF* and *ON* periods of the PR activity are independent and identically distributed (*i.i.d*.). In addition, the alternating renewal process is represented by a two-state birth-death process with birth rate *λon* and death rate *λoff* [22].

Let 1/*λon* and 1/*λoff* be the average *ON* and *OFF* times of the *k*th channel. The probability of the *k*th channel being occupied is given by

$$P\_{busy}^{k} = \frac{\lambda\_{\circ \circ}}{\lambda\_{on} + \lambda\_{\circ \circ}} \, \, \, \, \tag{1}$$

where *1 ≤ k ≤ K* (the total number of channels). Therefore, the probability of utilising the *k*th channel (i.e. the channel being idle) without causing harmful interference to the primary users is

$$P\_{idle}^k = \mathbf{1} - P\_{hasy}^k = \frac{\lambda\_m}{\lambda\_{gt} + \lambda\_m}. \tag{2}$$

Let the channel set that match the user requirements (i.e. probability of idle channels being greater or equal to a predefined threshold *Pth*), represented by Φ. From Eq. (2), the set of available channels Φ for each node can be obtained as follows:

$$\mathfrak{O}\_{\text{idle}}^{k} = P\_{\mathfrak{U}'} \quad \forall k \in \mathfrak{O}\_{\prime} \text{ 1 } \le k \le K \tag{3}$$

#### **4.2. Bipartite graph representation**

CR nodes with no transmission requests refine the channels based on the same criterion to select the best channel for message reception. The use of similar refining techniques by all nodes in the network means it is highly probable that CR users in close geographic locations select the same channel set. It is probable that neighbouring CR nodes of the transmitter CR node sense the same primary activity. It is highly likely that channels at a CR node's disposition are also free to its neighbours [11]. Therefore, the probability of creating a connected topology is increased by OBA. Once a message is received, the intermediate CR node carries out the procedure again and rebroadcasts in order to deliver the message to its neighbours. The following characteristics were considered crucial in the development of OBA: (i) decentralisation, distributed implementation of channel allocation; (ii) convergence, CR users with the same available channels individually converge to the same channel decisions; (iii) delay and communication efficiency, channel allocation is achieved with no exchange of messages; and (iv) adaptability, reallocation is required only in the case where there is a change in the

The primary user activity on the licenced channels has a vital effect on the CR network performance. Therefore, the realisation of CR protocols depends on the estimation of these activities. In the literature, many works have used the PR activity model [5, 9, 21], where the PR traffic is modelled as an alternating renewal process of *idle* (*OFF*) and busy (*ON*) periods. It is assumed that both *OFF* and *ON* periods of the PR activity are independent and identically distributed (*i.i.d*.). In addition, the alternating renewal process is represented by a two-state

Let 1/*λon* and 1/*λoff* be the average *ON* and *OFF* times of the *k*th channel. The probability of the

*<sup>k</sup>* <sup>=</sup> *<sup>λ</sup>* \_\_\_\_\_\_ *off λon* + *λoff*

where *1 ≤ k ≤ K* (the total number of channels). Therefore, the probability of utilising the *k*th channel (i.e. the channel being idle) without causing harmful interference to the primary

Let the channel set that match the user requirements (i.e. probability of idle channels being greater or equal to a predefined threshold *Pth*), represented by Φ. From Eq. (2), the set of avail-

*<sup>k</sup>* <sup>=</sup> *<sup>λ</sup>* \_\_\_\_\_\_ *on λoff* + *λon*

*<sup>k</sup>* = 1 − *Pbusy*

, (1)

. (2)

, ∀*k* ∈ *Φ*, 1 ≤ *k* ≤ *K* (3)

network topology.

14 Cognitive Radio

users is

**4.1. Primary radio activity model**

*k*th channel being occupied is given by

*Pidl*<sup>e</sup>

*Φidle*

*Pbusy*

birth-death process with birth rate *λon* and death rate *λoff* [22].

able channels Φ for each node can be obtained as follows:

*<sup>k</sup>* = *Pth*

Different CR nodes may detect different available channel sets and neighbours due to the temporal and spatial distribution of the primary activity. To initiate communication with other nodes, each CR node must construct a local view of the network topology. This will include neighbouring nodes in the vicinity and their channels' information. A bipartite graph jointly models the set of shared idle channels among neighbouring nodes and the CR network topology [23].

A graph *G*(*V*, *E*) is called a bipartite graph *G*(*X*, *Y*, *E*) if the set of vertices *V* can be divided into two disjoint sets *X* and *Y* with *X* ∪ *Y = V*, such that each edge in *E* has one endpoint in *X* and the other in *Y*.

Each *CRi* detects available channel set *λ<sup>k</sup> i* and acquires information from its single-hop neighbours *Ni* on their available channels. To jointly represent the similarities between its own idle channels and those of its neighbours, it can construct an undirected bipartite graph. Each *CRi* constructs a bipartite graph *Gi* (*Xi* , *Yi* , *Ei* ), where the single-hop neighbour *Ni* is represented by the set of vertices *Xi* , and while the set of channels *λ<sup>k</sup> i* is represented by the set of vertices *Yi* .

An edge (*x*, *y*) exists between vertex *x* ∈ *Xi* and a vertex *y* ∈ *Yi* if and only if *y* ∈ *λ<sup>k</sup> i* , i.e. channel *y* is in the idle channel set of both *CRi* and *CRj* . Note that *CRi* is connected to all vertices in *Yi* , since *Yi* = *λ<sup>k</sup> i* . The graph model is then used as the basis for computing the broadcast channel set.

**Figure 3** shows the topology graph for a CRN with six nodes. **Figure 4** shows the bipartite graph *GA*(*XA*, *YA*, *EA*) constructed by *CRA*. **Figure 5** presents the bipartite graph *GB*(*XB*, *YB*, *EB*) constructed by *CRB*, for the same topology of **Figure 3**. Note that *GA ≠ GB* despite the fact that *CRA* and *CRB* are one-hop neighbours. This holds true because *NA ≠ NB* and with different physical locations, it is expected that *λ<sup>k</sup> <sup>A</sup> ≠ λ<sup>k</sup> B*.

#### **4.3. Broadcast channel selection**

Based on its own bipartite graph *Gi* (*Xi* , *Yi* , *Ei* ), the CR determines the minimum broadcast channel set (BCS) and selects the finest channel as the tuning channel (TC). The problem of determining the minimum broadcasting channels set for a CR node can be modelled as the set cover problem.

The set cover problem is defined as follows: Given a set of *n* elements called the universe *U =* {*U*<sup>1</sup> , *U*<sup>2</sup> , …, *Un* } and a set of *m* subsets of *U*, *S* = {*S*<sup>1</sup> , *S*<sup>2</sup> , …, *Sm*}, find a minimum collection *C* of sets from *S* such that *C* covers all elements in *U* [24].

Finding the minimum and most effective BCS is the main goal of the OBA. Therefore, it represents the universe by the set of vertices X, the sets by the set of vertices Y and the inclusion of elements in sets as edges. Thus, Y has been transformed into a set of subsets of X. The aim is to identify the minimum cardinality subset of Y that covers all vertices of X. Finding the minimum set cover is an NP-complete problem [25].

**Figure 3.** Six-node CR network.

**Figure 4.** Bipartite graph constructed by node A.

**Figure 5.** Bipartite graph constructed by node B.

A comprehensive search may be possible for bipartite graphs of small size. However, the space of possible solutions grows exponentially with the cardinality of the vertex set. Hence, OBA has been introduced as it is a greedy heuristic algorithm for finding a cover set with a minimum number of channels.

OBA continually examines a single channel. In each round, OBA selects the channel which connects the greatest number of nodes that have not been covered yet. The indexes of channels that have already been chosen is represented by vector BCS, while the set of CRs that are not covered yet by the channels in the BCS is represented by U. Initially, BCS = 0, while U = Xi and S = Yi. In each round, a channel Si from S is chosen, which has the maximum overlap with U. Then, Si will be added to BCS, removed from S, and any CR users covered by Si will be dropped from U, and the operation will be repeated until U is empty.

Broadcast channels set BCS as the output. It is sorted in descending order based on the number of neighbours covered per channel. Prioritising channels in descending order is essential for two key reasons: (1) to guarantee the node picks the first channel in the list as the tuning channel TC enabling the maximum connectivity with its neighbouring nodes and (2) the node will ensure that the maximum number of neighbouring nodes are targeted during the first transmission, the second highest number of neighbours will be targeted during the second transmission and so on. **Figure 6** explains the operation of the OBA algorithm.

**Figure 6.** Flowchart for OBA.

A comprehensive search may be possible for bipartite graphs of small size. However, the space of possible solutions grows exponentially with the cardinality of the vertex set. Hence, OBA has been introduced as it is a greedy heuristic algorithm for finding a cover set with a

OBA continually examines a single channel. In each round, OBA selects the channel which connects the greatest number of nodes that have not been covered yet. The indexes of channels that have already been chosen is represented by vector BCS, while the set of CRs that are not covered yet by the channels in the BCS is represented by U. Initially, BCS = 0, while U = Xi and S = Yi. In each round, a channel Si from S is chosen, which has the maximum overlap with U.

minimum number of channels.

**Figure 4.** Bipartite graph constructed by node A.

**Figure 3.** Six-node CR network.

16 Cognitive Radio

**Figure 5.** Bipartite graph constructed by node B.

## **5. Performance evaluation**

The OBA protocol is implemented with the ns-2 simulator; we randomly deployed 100 CR nodes in a square region of sides 1000 m. The sensing and transmission times are set to *Ts* = 0.1 s and *Tt* = 0.6 s, respectively. To get accurate results, we repeated each group of simulations 100 times. The transmission range of each CR user is set to CrCR = 150 m. Moreover, the PR user has a transmission range CrPR = 250 m.

The performance of the proposed OBA protocol is compared against three studies: (a) SURF strategy proposed in Ref. [9], (b) selective broadcasting (SB) presented in Ref. [19] and (c) random strategy (RS).

In SURF, the channels are classified based on the PR vacancy and CR occupancy. This scheme transmits on a single channel; therefore, CR nodes within the transmission range of the sender may not be able to receive the transmitted data if they tune onto a different channel.

Instead of broadcasting over a single channel, in SB CR nodes broadcast the information over a selected group of channels. This approach requires the node to tune to more than one channel. SB does not provide any synchronisation between transmitter and receiver nodes.

However, RS strategy has been chosen as it is the simplest, and no further information is required. In RS, CR nodes randomly pick channels for transmission and/or receiving, without any consideration of the ongoing CR and PR activity over these channels.

#### **5.1. PR communication protection**

In this section, probable interference ratio (PIR) is characterised. Due to an inappropriate channel decision from OBA, RS, SB and SURF, PIR is caused by CR nodes to PR nodes. **Figure 7** demonstrates that OBA allows less interference to PR nodes, compared to SURF, SB and RS. The proposed broadcasting protocol (OBA) tries to reduce the interference with the PR users' communication. This is achieved by intelligently identifying the unutilised spectrum based on a real-time sensing.

In OBA, if there is no available channel at the time of broadcasting due to PR activity, the CR will not broadcast the message. **Figure 4** illustrates a small PIR value for OBA, which demonstrates the cases where potential interference would happen if no channel was available and the broadcasting continued.

**Figure 7.** The effect on the PR users due to CR transmissions.

#### **5.2. Packet delivery ratio**

**Table 2** and **Figures 8** and **9** show the Packet Delivery Ratio (PDR) of OBA, SURF, SB and RS, when the total number of channels (Ch) is Ch = 5 and Ch = 10, respectively. Compared to other schemes, OBA performed very well and achieves a significant packet delivery ratio.

OBA ensures approximately a 70–80% successful delivery ratio when Ch = 5, while in the case of SURF, it is 32%, 21% in SB and 3% in RS. When Ch = 10, OBA guarantees almost an 80–90% successful delivery ratio, compared to 29% for SURF, 17% for SB and almost 1% in the case of RS.

It is important to mention that the diversity of PR activity and channel availability lead to the formation of different clusters (network topologies) at each CR node. To overcome this problem, OBA creates communication links with other clusters by broadcasting over the minimum set of idle channels. This covers all CR users in the vicinity that increase the successful delivery of the broadcast messages.

RS does not ensure the broadcast channel is free from PR activity for its transmission. Therefore, this causes a severe reduction in the delivery ratio. Although broadcasting is performed using multiple channels, SB achieves less successful broadcast delivery compared to OBA.

In certain cases, because of the lack of transmitter/receiver synchronisation between nodes (i.e. the tuning channel is selected randomly), the transmitter may not have any effective receivers. SURF strategy transmits using a single channel. This means only CR nodes within the transmission range of the source node and tuned to the same channel will be able to receive the broadcast message.

It is worth noting that the performance of OBA is slightly enhanced when the number of channels is increased. Since adding more channels automatically spreads nodes over more channels; thus, this result is not unreasonable. However, OBA achieves better results when more channels are available, when the proper metric is used and the same algorithm is employed at the sender and the receiver.

#### **5.3. Channel set size**

The number of channels utilised by a CR node to broadcast a message to its single-hop neighbouring node is defined as the channel set size (CSS). In **Figure 10**, the CSS of OBA is compared with the CSS of RS, SB and SURF in relation to the number of available channels. It is clear that SB utilises nearly all of the available channels.


**Table 2.** Successful packet delivery ratio.

**Figure 7.** The effect on the PR users due to CR transmissions.

100 times. The transmission range of each CR user is set to CrCR = 150 m. Moreover, the PR

The performance of the proposed OBA protocol is compared against three studies: (a) SURF strategy proposed in Ref. [9], (b) selective broadcasting (SB) presented in Ref. [19] and (c)

In SURF, the channels are classified based on the PR vacancy and CR occupancy. This scheme transmits on a single channel; therefore, CR nodes within the transmission range of the sender

Instead of broadcasting over a single channel, in SB CR nodes broadcast the information over a selected group of channels. This approach requires the node to tune to more than one channel. SB does not provide any synchronisation between transmitter and receiver nodes.

However, RS strategy has been chosen as it is the simplest, and no further information is required. In RS, CR nodes randomly pick channels for transmission and/or receiving, without

In this section, probable interference ratio (PIR) is characterised. Due to an inappropriate channel decision from OBA, RS, SB and SURF, PIR is caused by CR nodes to PR nodes. **Figure 7** demonstrates that OBA allows less interference to PR nodes, compared to SURF, SB and RS. The proposed broadcasting protocol (OBA) tries to reduce the interference with the PR users' communication. This is achieved by intelligently identifying the unutilised spectrum based

In OBA, if there is no available channel at the time of broadcasting due to PR activity, the CR will not broadcast the message. **Figure 4** illustrates a small PIR value for OBA, which demonstrates the cases where potential interference would happen if no channel was available and

may not be able to receive the transmitted data if they tune onto a different channel.

any consideration of the ongoing CR and PR activity over these channels.

user has a transmission range CrPR = 250 m.

random strategy (RS).

18 Cognitive Radio

**5.1. PR communication protection**

on a real-time sensing.

the broadcasting continued.

**Figure 8.** Successful packet delivery ratio, Ch = 5.

**Figure 9.** Successful packet delivery ratio, Ch = 10.

**Figure 10.** Average number of used channels for broadcast per node.

Moreover, the number of the utilised channels increases when there is more available channels. This can be explained by the fact that CR nodes are spread over more channels when the number of idle channels increases. Consequently, the CR user needs to broadcast over more channels. However, the CSS in the case of OBA is considerable.

Furthermore, the increase in the number of available channels does not significantly impact the number of used channels. This is achieved by OBA and by using proper metrics to prevent CR nodes from dispersing over all the available channels. In addition, OBA helps to merge the neighbouring CR nodes to the same channel selection. This in turn results in a considerable reduction in the CSS.

Irrespective of the number of available channels, RS and SURF use only a single channel for the transmission. It is difficult to use a single channel for broadcasting in CR networks. This is because of the nonuniform channel availability and the impossibility of a global common channel being available. In the case of OBA, most of the CR neighbouring nodes will successfully receive the broadcasting message. This is because OBA connects different local topologies, which results in a significant increase in the successful packet delivery.
