Analysis of the local delay with slotted-ALOHA based cognitive radio ad hoc networks

We analyze the local delay of cognitive radio ad hoc networks in which secondary nodes are overlaid with a pair of primary nodes. Supposing slotted ALOHA multiple access is adopted by secondary nodes, we derive the closed-form expression of the local delay by modeling the channel occupied by primary nodes as continuous-time Markov on-off process. Furthermore, we obtain the asymptotic local delay for two special cases: large and small primary traffic. We theoretically prove that the local delay increases with the increasing primary packet arrival rate and decreases with the increasing primary packet departure rate. Numerical and simulation results show that the local delay could be approximated to be the result obtained with significant primary traffic in most cases, which is the steady of the channel idle state.


Introduction
Delay is one of the important indicators to measure the quality of service (QoS) of wireless network. Throughput, reliability, and delay comprehensively measure the ability of the network to transfer information. The local delay is defined as the mean time (number of time slots) needed for a packet being received successfully from a transmitter to its nearest receiver. This also provides the base for researching end-to-end delay. In [1], Baccelli et al. first proposed the local delay in mobile ad hoc networks with ALOHA medium access control (MAC) protocol. Based on this framework, Martin [2] derived the local delay in both static and high-mobility networks, in which all nodes are assumed to be distributed as a Poisson point process (PPP) for each time slot, and he also proved that the local delay is always finite in highly mobile networks. Furthermore, Martin [3] obtained the closed-form expression of the local delay for four types of transmission strategies. In addition, the local delay [4] is regarded as the metric of an opportunistic routing protocol for multi-hop context in mobile ad hoc network, and then the opportunistic routing protocol is certified to be valuable through simulation.
*Correspondence: jing401@126.com 1 School of Electronics and Communication Engineering, Tianjin Normal University, West Bin Shui Road, Xiqing District, 300387 Tianjin, China Full list of author information is available at the end of the article All the above-mentioned studies are focused on homogeneous network models but not involved in heterogeneous networks. A practical network usually consists of interdependent, interactive, and hierarchical network components which lead to a heterogeneous network structure. Cognitive radio (CR) network is one type of heterogeneous networks which can efficiently solve the problem of spectrum shortage. Recently, many research results have been developed for the performance of CR network, for instance, 1) the scaling law of throughput and delay for the density of nodes in overlaid networks [5] and 2) the transmission capacity of spectrum sharing networks by employing stochastic geometry [6]. However, there is little research of the local delay in CR networks despite its importance for the analysis of end-to-end delay.
In this paper, we analyze the local delay of CR networks in which secondary nodes are overlaid with primary nodes and adopt slotted ALOHA MAC protocol to access the channel. The closed-form expression of the local delay is derived with furthest receiver routing protocol. The relationship is analyzed finally between the local delay and some important parameters of CR networks (such as the packet arrival (departure) rate of the primary network, the transmission probability and node density of the secondary network).
The paper is organized as follows: the 'System model' section gives the system model and the definition of some symbols. 'The analysis of the local delay' section analyzes the local delay of the secondary network. The 'Numerical and simulation results' section presents the numerical and simulation results with some observations of them. Finally, the conclusions are given in the 'Conclusions' section.

System model
Considering a CR network, a secondary network is overlaid with a primary network, i.e., the secondary nodes could be allowed to occupy the channel when it is not used by primary nodes. In order to analyze conveniently, we suppose a single wireless channel shared by both primary and secondary networks. And the results could be further extended to the scenario of multiple channels. In this section, the system model will be introduced first, and then the local delay of secondary nodes will be defined.

Primary network model
The occupancy of the licensed channel by primary network is modeled as a continuous-time Markov process with two states: S (t) = 0 (idle) and S (t) = 1 (busy). The states of the channel are dominated by the activity of primary network. Similar to that in [7], the packet arrival and departure rate of primary network are λ and μ, respectively. The holding times are exponentially distributed with parameters λ −1 for idle state and μ −1 for busy state. The state transition rate matrix (Q-matrix) under the continuous-time Markov process is given by: The stationary distribution of the process can then be determined as: The transition matrix for the Markov process within continuous time τ is given by the following expression: (3)

Secondary network model The topology
Assume the secondary network is an ad hoc network and the slotted ALOHA MAC protocol is adopted (T is the time slot length). In each time slot, secondary nodes are modeled as a marked PPPˆ S = x i , t x i ⊂ R 2 × (0, 1) [8], where S = {x i } is a homogeneous PPP with density λ S . Mark t x i as independent Bernoulli distributions with parameter P (t = 1) = p = 1 − q.x i is supposed to be a transmitting node when t x i = 1 and a receiving node when t x i = 0. According to the displacement theorem, all transmitting nodes in a time slot follow a PPP t S with density λ S p and all receiving nodes in a time slot follow another PPP r S with density λ S (1 − p), correspondingly.

The receiving model
Secondary nodes could opportunistically access the channel only when the channel state is idle, which is determined by primary network. That is to say, secondary nodes are assumed to be able to acknowledge the primary activity at the beginning of each time slot.
Considering an interference dominant network, we ignore the noise in this paper. The wireless channel combines large-scale path loss and small-scale Rayleigh fading. A receiving node y can successfully receive the packets from its transmitting node x at the nth slot if and only if: where SIR xy (n) is the signal-to-interference ratio at node In this paper, the transmitting power of the secondary nodes are assumed to be the same and normalized to 1, h xy is the small-scale fading coefficient having exponential distribution with a mean of 1, α > 2 is the path loss factor, and β 1 is the successful decoding threshold. Supposing a typical node u locates at the origin, the probability of node v which can successfully accept the packets from u at time slot n is: where r is the link distance from node u to node v.

The selection strategy of receiving nodes
Based on (5), whether a typical node could successfully transmit its packets mainly depends on the signal-tointerference ratio of the corresponding receiving node. As in [9], the interference of all receiving nodes in each time slot could be characterized as the model of shot noise. On the other hand, the signal power catched by a receiving node is determined by both path-loss function and small-scale fading. So, the distance of the typical link, i.e., how to select a receiving node becomes the key factor impacting the receiving signal power. In the following, the distribution of the link distance will be analyzed.
Since the node location is varying from time slot to time slot, the link distance Ł is a random variable whose distribution is related to the selection strategy of receiving nodes. A nearest receiver strategy has been discussed in [1,2]. In this paper, considering one-hop transmission in a multi-hop ad hoc networks, we choose the farthest receiving node strategy for balancing the hop numbers which is important for multi-hop performance. That is to say, a transmitting node will send packets to the farthest receiving node in its transmission radius. A realization of secondary network in one slot is shown in Figure 1; RX is the receiving node which is the farthest from the transmitting node TX within the transmission radius R. And then all signal power received from other transmitting nodes are assumed to be the interference.
Since all receiving nodes follow a PPP with density λ S q, the probability distribution function of link distance L is: and the probability density function of L is The local delay The local delay D of ad hoc network is defined in [1] as the average number of time slots needed by a typical transmitting node u = o successfully sending packets to its receiving node v = y, and: where δ 0 (n) indicates that (4) holds in time slot n. Let π c = P o (n), and π c is a variable which is irrelevant to n and equal to the probability of successful transmission in the first time slot since the distribution of nodes is independent from time slot to time slot. And the local delay: TX RX L transmitting nodes receiving nodes R Figure 1 The selection strategy of receiving node.

The local delay of CR network
Combining the definition of the local delay in (8) with the CR network model in this paper, the local delay of CR network is given in the following. Let ∂ n denote the event that the licensed channel is idle in time slot n, and a packet being successfully sent in time slot n is: where P o (n) is given in (5). And then the number of transmission K needed for a packet sent from a transmitting node to the receiving node is valuable following a binomial distribution with parameter P 1 (n). Denote D 1 as the local delay of CR network which is the expectation of K, and: Substituting (5) into (10), and based on (1), (11) can be rewritten as wherep S = E [P o (n)] is the expectation of probability for a successful transmission, which has nothing to do with time slot n. According to lemma 1 in [9], we havē where C α = 2π 2 β 2/α α sin(2π/α) . Putting (7) into (13), we havē Comparing (11) with (9), the average probability of successful transmission E (P 1 (n)) at time slot n is a function related to n because of the existence of primary network (term P (∂ n = 1)). D 1 is derived by the law of total probability which is related to time slot n. Thus, we resort to the computer to show the relationship between D 1 and network parameters.

The local delay for two special cases
In some cases, the local delay can be approximated to be a value unrelated to the time slot. In the following, we will further analyze the local delay under two specifical cases of primary traffic.
Case 1: λ < μ << 1. Put all terms into (1) and we get: where P 11 (•) is the value in the first row and first column of matrix P in (3). The existence of the above expression is on the hypothesis of small amount of primary traffic, and time slot T is in units of microseconds, i.e., (λ + μ)T << 1. In this case, the channel is almost regarded as idle state. The number of time slots needed by a successful transmission for a typical node obeys the binomial distribution. The local delay of secondary network is Case 2: 1 << λ < μ and (λ + μ) T >> 1. It means a large amount of primary traffic. Since the packet arrival rate is always less than the departure rate which deduces to a stationary state of primary network at last. So, we have: Since P (S (t) = 0) is a variable irrelated to t, the local delay is a geometric variable with parameter μp S λ+ μ and

The optimization of CR local delay
According to the definition, the local delay is determined by both primary traffic and successful transmission probability of the secondary network. In the following, we will give the optimization of the local delay about the three network parameters.

Theorem 1. The local delay D 1 increases with increas-
ing primary arrival rate λ and decreasing departure rate μ when the other parameters are fixed.
Proof. The local delay is the expectation of a random variable with parameter P 1 (n). Observing (4), we find that the term P (∂ n = 1) indicates the influence of the primary network. And: P (∂ n = 1) = P (S(nT) = 0) = P 11 (nT) Taking the derivative of (13) with respect to λ and μ, we have: It is obvious that P 1 (n) increases monotonously with λ and decreases monotonously with μ. We complete the proof.
Theorem 2. When 0 < p < π π+C α , the necessary and sufficient condition for the local delay D 1 being concave with respect to the transmission probability of secondary nodes p is: (18) And we could get an optimal transmission probability in 0, π π+C α to minimize the local delay by solving the equation in the following: where λ 1 = λ S πR 2 , λ 2 = λ S C α R 2 , e 1 = e −λ S qπR 2 , and e 2 = e −λ S pC α R 2 .
Proof. Since secondary nodes are overlaid with primary nodes, to prove the local delay is concave with respect to the transmission probability of secondary nodes p, all we have to do is to certify the second-order derivative of the average probability of successful transmissionp S in (13) which is less than zero, i.e., d 2p S dp 2 < 0. After calculating and classifying, we get d 2p S dp 2 < 0 when λ S meets the requirements of (17) if 0 < p < π π+C α . Derivation is easy and omitted.
By solving the equation dp S dp = 0, we derive the optimal probability of successful transmission to minimize the local delay as shown in (18).
The proof is completed. Note that the probability p is always less than 1, and thus, the optimization of local delay makes sense. Theorem 3. When 0 < p < π π+C α , the local delay D 1 is concave with respect to the density of secondary nodes λ S . And the optimal λ S is: Proof. Since the method of proving is the same as that of Theorem 2, it is omitted.

Numerical and simulation results
In this section, some numerical results are shown based on the theoretical analysis above. In order to verify the correctness of our analysis, we further give some simulation results. Unless otherwise specified, the network parameters are set as shown in Table 1.

Simulation scenario settings
The primary network is modeled as the Markov process described in the 'System model' section. The arrival rate λ and departure rate μ are given in the figures. The original state of primary network is idle. The secondary nodes are uniformly distributed on a finite plane with area [0, 2, 000] m × [0, 2, 000] m. In each time slot, the number of transmitting and receiving nodes follow a Poisson distribution with parameter λ S p nodes/m 2 and λ S (1 − p) nodes/m 2 , respectively. Put a typical node on the center of the plane, the axis of which is [1, 000, 1, 000]. Consider the typical node begin to transmit packets with probability p once the channel state is detected to be idle in each slot. Regarding the number of time slots needed for a packet to be sent successfully as an example, the final simulation results are the mean value of 10,000 examples.
In Figure 2, we show the approximate (App.), numerical (Num.), and simulation (Sim.) results for the local delay with the transmission probability p varying from 0 to 0.1. We see that 1) the local delay is concave with respect to the transmission probability p when p and λ S meet Theorem 2. In addition, an optimal p can be found to minimize the local delay. Putting the parameters into (19), we solve the optimal transmission probability as p opt = 0.0405, which is the same as that in Figure 2. 2) The numerical result of the local delay with λ = 3, μ = 5) has a great difference between the approximate result of the local delay with λ = 0.003, μ = 0.005, while nearly equal to the approximate result of the local delay with λ = 3 × 10 6 , μ = 5 × 10 6 and very near the approximate solution of Equation 16. The local delay increases with the increasing primary traffic. But the increase of it slows down when the primary traffic reaches a certain value.
3) The simulation result is almost the same as the numerical result when λ = 3 × 10 6 , μ = 5 × 10 6 . The simulation result is slight larger than the approximate result when the  primary traffic is zero. The simulation results prove the correctness of the theoretical analysis.
In Figure 3, we illustrate the approximate, numerical, and simulation results for the local delay with the density of secondary nodes λ S varying from 0 to 0.01 when p meets the requirement of Theorem 3. And we also could solve the optimal λ S as λ opt S = 0.0021 which agrees with the numerical results. Similar to Figure 2, the numerical result of the local delay with λ = 3, μ = 5 is almost the same as that with λ = 3 × 10 6 , μ = 5 × 10 6 and equal to that in case 2 in the section 'The local delay for two special cases'. This explains that the reciprocal of the local delay could be approximated to the product of the probability for idle channel state and success transmission probability for the secondary network without the primary network.  Similarly, the simulation result proves the correctness of the theoretical analysis.
In Figure 4, we give the local delay versus λ S with three different transmission radii: R = 15, R = 18, and R = 21. It is shown that the local delay increases with the increasing R when λ S is small, while the opposite is the case when λ S is larger. This is because when λ S is small, whether a transmitting node could find a receiving node in its transmission radius affects the local delay greater than the interference coming from other transmitting nodes. Since the likelihood of existing receiving node is greater when R gets larger and the probability of successful transmission is larger, the local delay is smaller. The situation is on the contrary when the density of secondary nodes is larger and will not be covered here.

Conclusions
We conducted an analytical study of the local delay in cognitive radio ad hoc networks. We modeled the occupancy of the licensed channel by the primary network as a Markov process, and the secondary nodes opportunistically accessed the channel with the ALOHA protocol. The local delay is analyzed by employing the property of PPP in stochastic geometry.
We derived the analytical expression of the local delay and discussed the relationship between the local delay and some important network parameters which conclude the following: primary traffic (arrival and departure rates), transmission probability, and node density of the secondary network. Both numerical and simulation results are obtained for different primary traffic. We drew a conclusion that the local delay in most cases could be approximated to that for significant primary traffic which is important for further research of end-to-end delay.