1 Introduction

With the rapid development of wireless networks, the demand for spectrum bandwidth has been raised largely. The number of devices utilizing the spectrum (licensed or unlicensed) is growing very fast as compared to the availability of bandwidth. This spectrum scarcity problem occurred because the current spectrum allocation policy is static which is unable to accommodate the increasing bandwidth demands. In fact, the static allocation policy causes the licensed spectrum bands to be underutilized [14].

Cognitive radio networks (CRNs) come as efficient solution to this spectrum scarcity problem. A CRN enables a secondary or a CR user to utilize the temporally unoccupied licensed bandwidth of a PU (primary user) in order to enhance the utilization of limited spectrum resources. CR maximizes the channel utilization without effecting the well-established spectrum allocation regulation [10].

Spectrum management process in CRNs usually consists of three different steps: firstly because CR gets temporary access to available spectrum; as a result, it monitors the available channel and detects the spectrum holes by continuously examining the PU activities which is spectrum sensing. Then, there can be multiple secondary users (SUs) trying to access the channel; this access should be coordinated to avoid the collision among multiple CR users which is known as spectrum sharing. The third and the most important step is spectrum mobility in which the communication of an SU must be switched to other operating frequencies based on the vacant frequency bands. This requires spectrum handoff which allows the dynamic use of unused spectrum bands [10, 23, 32]. Spectrum handoff is an important step in spectrum management process as it is responsible of seamlessly shifting the on-going transmission of an SU to another free channel without degrading the QoS (quality of service) [1, 10]. Therefore, in this research we are interested in developing a novel adaptive spectrum handoff technique for CRNs.

Spectrum handoff is generally categorized in two types; proactive and reactive handoffs. In proactive handoff process, the future channel for data communication is determined according to the detected traffic patterns of a PU, before the handoff triggering event. While in reactive handoff, the channel is selected by instant sensing after the occurrence of handoff event. The SU (interrupted by the handoff event) can resume its unfinished transmission on newly searched channel [32]. Mostly, proactive and reactive handoff processes, the channel is pre-selected without taking in account the arrival and departure patterns of PUs. As suggested by the authors of [18, 25], it is really desirable to design a handoff solution that can acquire the benefits of both proactive and reactive handoff schemes together (thus a hybrid handoff solution), to avoid unproductive handoffs. A few research efforts such as [19, 39] have been done in the recent literature to combine the pros of both proactive and reactive solutions, however, these approaches are based on the idea of always changing the channel on occurrence of handoff triggering event (i.e. PU arrival), which causes un-productive handoffs. Moreover, the handoff scheme presented in [39] uses backup channel with current transmission channel that can cause channel under-utilization as backup channel stays obsolescent [10, 18].

Based on above and the arguments given in [13, 16, 26], we strongly believe that a handoff strategy should be developed by keeping in view the movement of PUs as an important design factor. Therefore, in this paper, we propose an adaptiveFootnote 1 handoff algorithm that allows an SU to detect the arrival of a PU on the licensed channel with energy detection sensing [9, 23]. This SU then decides on whether to stay and wait on the current channel or shift the on-going transmission to another channel according to the activity of a PU (such as the PU arrival rate). In case of changing the channel, the SU selects between reactive or proactive strategy (showing the adaptive nature of our algorithm) based on the arrival rate of a PU. We also propose a PU prioritized Markov approach to capture various effects of a PU’s activities (arrivals and departures) on SUs transmission [8]. The main purpose of proposed Markov model is to capture the system evolution dynamics, especially the effects of PU arrivals on SU services. With our adaptive spectrum handoff algorithm, we aim to maximize smooth channel access and overall system throughput by minimizing the blocking probability, number of handoffs, handoff delay, data delivery time and channel under-utilization in CRNs.

The rest of this paper is organized as follows. In section II the existing handoff strategies are discussed in a comparative manner. System model is described in section III. The primary prioritized Markov models are derived in Section IV. In section V, the experimental results and comparisons of our strategy with existing handoff schemes are given. Finally, the last section concludes our work with future directions.

2 Literature review

Most of the existing handoff management solutions in CRNs are based on proactive and reactive processes. The authors of [17] analyzed the cost of the handoff process and presented the channel activity tracker handover strategy (CATHS) to minimize the unproductive handoffs. Instead of shifting the operating channel instantly on arrival of PU, the SUs can stay on the current channel when they expect to find sufficient opportunities to transmit their data. CATHS can sufficiently reduce the channel shifting cost by minimizing the number of handoffs during the transmission of an SU. Another proactive handoff approach is presented in [31] that decides on whether to switch to the new channel or not depending on the energy consumed in handoff process. More specifically, the proposed scheme considers the energy state of the SU, switching delay, imperfect sensing, the energy consumed in switching, and channel idle probabilities to answer the question of switching or stay. The SUs sense the available channel through wideband sensing and select a backup channel prior to the arrival of a PU. The proposed scheme maximizes the throughput by avoiding collisions to PU. However, channel utilization is compromised in this scheme. The authors of [27] proposed another proactive handoff scheme that minimizes the frequency of channel switching due to PU appearance by selecting the channel with maximum residual idle time, i.e., minimizing the SU disruption in terms of forced-termination rate. When multiple SUs perform spectrum handoffs at the same time, a pseudo-random selecting sequence for each SU is generated locally. SUs need to perform spectrum handoffs following the same selecting sequence. With this prediction mechanism, the proposed handoff scheme maximizes the throughput for an SU. Like most proactive schemes, this one also has the traditional limitation of an increased waiting time if the prediction of PU movement is not done in an accurate way.

The authors of [29] presented a reactive handoff scheme with next target channel selection process. The next channel is selected on the basis of two criteria; the predicted probability of whether the target channel is idle or busy and the length of the busy period. If a channel is idle or has shorter busy period, then the handoff is performed on that channel. This handoff scheme increases the probability of selecting accurate target channel on cost of increased handoff delay. The authors of [15] proposed a reactive handoff scheme to increase IEEE-802.22 performance in terms of QoS requirements of an SU while providing reliable and timely spectrum sensing for guaranteeing the PU protection. In this strategy, an SU while communicating on current channel observes availability of the next target channel. To avoid interference with PUs, the SU continues its transmission on target channel and starts sensing the previously operating channel. Thus, an increased system throughput can be achieved with this strategy because of interruption avoidance mechanism while the handoff delay and waiting time can also be increased as the handoff decision is taken after the PU arrival. Another reactive handoff scheme is presented in [35] that allows an SU to hold multiple available channels simultaneously even in the presence of PU. The SU then performs is transmission on multiple available channels. This can avoid the harmful interference to the PU while satisfying the transmission needs of the SUs.

The authors of [25] provided a classification and detail of the existing approaches for energy efficient spectrum sensing and handoff. The main purpose of this survey is to find a tradeoff between energy consumption and throughput achieved by an SU with different sensing and handoff strategies. Some important research issues such as channel sensing time, sensing order, maximum number of handoffs, waiting on current channel or handoff, sensing resource allocation, sensing coordination, sensing report forwarding and decision combining of individual SUs are also highlighted in the paper. A detailed classification of spectrum handoff schemes in CRNs is presented in [18]. The authors divided the existing handoff strategies into different classes such as handoff triggering timing, mobility, probability, sensing, operating mode, game, grade and fuzzy logic, based solutions. They also identified some open research areas for each class including intelligent spectrum handoff, priority based spectrum handoff, spectrum handoff scheme based on green CRNs, interference avoidance, spectrum handoff reduction and optimization of handoff information collection parameters. All handoff schemes are critically analyzed in terms of their main features and limitations such as single or multi user CRN, single or multiple spectrum handoffs, on demand sensing, sensing accuracy, backup channel usage, maximum number of interruption for SUs and RF (radio frequency) reconfiguration constraints. The comparative analysis of all schemes together is also presented. Several important proactive and reactive schemes were discussed in this paper such as [27, 3234, 39]. In our current version of paper, we have cited some important references already mentioned in this survey such as [10, 27, 32, 34]. In addition to these, we have also referred some new approaches on proactive, reactive and hybrid (defined below) handoff including [13, 1618, 20, 28, 30, 31, 36, 37]. These works were missing in [18] because they have been done in the recent past (years 2015 and 2016) and are worth mentioning in our paper. The literature on Markov solutions is also nonexistent in [18].

In CRNs, the availability of a channel for an SU is fully dependent on PU activity. As discussed above (some in the latter section), most of the existing handoff schemes [3035] ignore the impact of PU’s activity and arrival rate in their design process that can cause an extra delay, channel under-utilization and un-productive handoffs in the transmission of an SU. One important way of handling these concerns is to look for a hybrid handoff solution that can acquire benefits of both proactive and reactive handoffs. A hybrid handoff scheme jointly applies proactive spectrum sensing and reactive handoff action. Target channel selection is prepared beforehand or during SU data transmission while spectrum handoff is performed after the handoff triggering event, thus shifting to (proactively) selected channel reactively on the arrival of a PU. A hybrid solution would be referred as “adaptive”, if the decisions of channel selection and handoff are made by continuously monitoring the arrival and departure patterns of a PU. When a PU is moving quite regularly, an SU may adapt to reactive handoff strategy. While in case of rare PU movements, a proactive handoff solution is preferred by the corresponding SU. Thus, a secondary user can either choose between proactive or reactive approach based on the frequency of PU arrival and departure. The schemes presented in [19, 39] are hybrid in nature because they exploit benefits of both proactive and reactive decisions, however, a lot of unnecessary handoffs are caused due to “always changing” the channel in case of PU arrival. Some other well-known approaches have also been presented in [2036]. These solutions use the combination of static and dynamic spectrum sharing, fixed and probabilistic sequences, and preemptive and non-preemptive resume priority, respectively, for handling handoff situation. However, these schemes do not fit in the definition of hybrid handoff (as defined in [1, 10, 18, 19, 27, 32, 34]) because they do not work on the principle of combination of proactive and reactive handoff decisions.

Table 1 provides an overview of proactive, reactive and hybrid handoff schemes discussed above. The categorization of existing literature on spectrum handoff is done using the main idea of work, the use of Markov model in design process, decision of waiting on current channel or changing the channel on arrival of a PU, channel utilization and handoff delay. Table 1 clarifies that the proactive handoff schemes [1727] (in general) minimize the handoff delay, however, they ignore the effects of channel utilization. On the other hand, reactive handoff schemes [2935] maximize channel utilization while handoff delay is not optimized in these strategies. The hybrid handoff schemes [19, 39] provide a reasonable compromise between proactive and reactive handoff decisions in terms of channel utilization and handoff delay.

Table 1 Comparison of several proactive, reactive and hybrid handoff strategies in terms of waiting on the current channel or to perform handoff on arrival of PU, bandwidth utilization and handoff delay

Therefore, according to the authors of [10], an adaptive (thus hybrid) handoff algorithm is required that may apply the most suitable strategy (among proactive or reactive) according to the PU traffic patterns. In this paper, we propose a handoff scheme that adaptively decides on whether to stay and wait on the current channel or to shift to another one on PU arrival. In latter case, the data delivery time for proactive and reactive handoff decisions is calculated and the scheme with minimum data delivery time is applied for proper handoff function. PU activity is periodically examined by an SU through energy detection sensing [23]. The output of the energy detector is compared with a properly set threshold to declare the arrival of PU.

This threshold value is set depending upon previous arrivals of PU in its licensed band. In addition, the effects of a PU’s activities (arrivals and departures) on SUs transmission are captured using a primary prioritized Markov approach [4].

2.1 Markov based solutions for spectrum handoff management

We capture the movement of primary and secondary users using continuous time Markov chains (CTMCs). Related to this, a few important efforts have been done in the past by various researchers. One of the inspiring models is presented in [33]. The authors propose a primary prioritized continuous time Markov approach (CTMC) to capture the interaction between primary and secondary users. Both queuing and without queuing models are analyzed and the throughput degradation due to SUs interference is compensated. The CTMC models achieve good statistical tradeoffs between fairness and efficiency. Though, the models are designed for Spectrum Sharing, they help us applying the author’s vision in the context of Spectrum Handoff. Another promising work was proposed in [11] which uses CTMC modeling to improve the QoS of SUs in terms of their spectrum access. The whole spectrum usage is modeled in time-slotted periods and SUs’ forced termination probability is reduced to a certain level. In [21], the authors propose a 2-state CTMC to model the channel availability for SUs by taking in account the secondary user’s mobility. A concept known as “guard distance” is introduced which is basically an additional separation between primary and secondary users. The purpose of guard distance is to prevent interference on PU transmissions. This guard distance is then optimized with the “sensing time” to maximize the opportunities in spectrum reuse. The authors of [41] proposed the channel reservation for SU to tradeoff the forced termination probability and blocking probability. A Markov chain analysis is presented in this work to analyze the spectrum access by CR users with and without spectrum handoff. The authors of [30] presented a handoff strategy for cognitive ultra-wide band industrial networks, where an SU has the luxury to access the licensed band of PU in its presence on a specific channel. In the proposed proactive sensing based handoff strategy, an SU can use the licensed band of PU opportunistically as long as there is no interference to the licensed user. The authors model the busy and idle periods of channel by Markov state model. This strategy avoids the collisions among the users accessing a specific channel. Moreover, its dynamic and diverse nature allows the SUs a continuous connectivity under the dynamic licensed user’s activities. The authors of [37] presented another proactive handoff scheme which opportunistically operates on various vacant PU channels. The scheme allows a CR user to predict the channel status and decide on whether to stay idle on the current channel or to perform handoff proactively. The authors formulate this problem as a discrete time Markov decision process that allows a CR user to minimize the total cost for a specific transmission. With this decision capability, the proposed strategy achieves a better data transmission efficiency and energy consumption as compared to always staying and always changing handoff schemes. The authors of [24] analyzed the status of the channels and modeled a spectrum handoff process using a Hidden Markov model (HMM). HMM in this scheme is used to correct the spectrum sensing sequence in order to enhance the spectrum opportunities for SUs. A survey of spectrum prediction techniques in CRNs is done in [38]. The authors consider Markov process to be an important spectrum prediction technique in CRNs. Like most of the mentioned approaches, we use Markov chains to model our spectrum handoff process. However, unlike others, we specifically focus on Continuous Time Markov Chains (CTMCs). The CTMC modeling can capture system dynamics, especially the movement of SUs from one state to another in case of spectrum handoff and PU arrival/departure. Moreover, we compare the results of CTMC modeling with the simulation results in terms of blocking probability and average utility. This type of comparison lacks in most of the existing Markov models designed for spectrum handoff.

3 System model

3.1 Assumptions

We assume here that the CRN is a time slotted system [34] where every CR user performs event monitoring at the first part of each time slot to detect the arrival of a PU. At the second part of a time slot, a CR user can transmit or receive data if the channel is found to be idle. On the other hand, if channel is busy, the CR user will perform proper mobility management function of either to wait on the current channel or to shift its transmission to another channel.

We consider a CRN with M independent channels where each channel has virtual low priority and high priority queues [34]. The traffic primary and secondary users is connected to the low and high priority queues, respectively. Each low priority queue has multiple CR users which are served on FCFS (first come first serve) basis, while there is only one PU in each high priority queue which is the licensed user of that channel. PUs have a primitive right to interrupt the transmission of SUs.

In this research, we consider a handoff processing protocol in which the available time of an SU is divided into sensing and transmission slots. This division of available time into sensing and transmission slots is adapted from [32, 34]. When the arrival of PU is detected by an SU in its current operating channel, it must spend the first part of each time slot in sensing the idle channels while the transmission is done in second part of the time slot. If more than one idle channel is assessed, the SU will randomly select one idle channel for its future communication. We assume here that this random selection follows the uniform distribution [32].

Furthermore, an SU will stay and wait on its current operating channel if all other channels are busy. According to [12], when PU and SUs coexist on the same channel simultaneously, the capacity achieved by them is very low. Therefore, in this paper we assume that when a PU is operating on any channel, an SU cannot share that channel simultaneously.

3.2 The adaptive spectrum handoff framework

The framework for our adaptive spectrum handoff strategy is illustrated in Fig. 1. Basically, our design is based on three different interlinked parts event monitoring, spectrum mobility management and spectrum handoff decision. In event monitoring, the PU activity (arrival or end of transmission) is periodically examined by an SU on its current operating channel. This monitoring can be done by any of the spectrum sensing techniques such as energy detection, matched filter or cooperative sensing [2, 6, 40]. In our approach we use energy detection presented in [23], because of its low computational and implementation complexities [7]. In addition, it is more generic technique (as compared to matched filter and cooperative sensing) as receivers do not need any knowledge of a primary user’s signals. The signal is detected by comparing the output of the energy detector with a properly set threshold. This threshold value is set depending on the previous arrival of PU as when a PU comes to its licensed channel the perceived energy level is increased sufficiently. The perceived energy level in presence and absence of the PU is examined multiple times and a threshold value of energy level is set. If the received signal strength is greater than the threshold value, then a handoff event is triggered to perform a handoff action. Spectrum mobility management function gets the PU arrival information from event monitoring module and then the staying duration of a PU is predicted according to its past staying behavior on the licensed band [22]. The stay of a PU on a channel may vary in duration; therefore, we assume that the staying duration follows a random distribution. The decision of whether to stay and wait on the current channel or to perform handoff action is made according to the staying duration of PU. If PU tends to stay for a shorter period, then an SU does not perform the handoff action. SU waits on the current channel and after the completion of PU’s transmission, it can resume its transmission on the corresponding channel. On the other hand, if PU tends to stay for a longer duration in its licensed channel then the SU decides to perform handoff action. The waiting time is the total time an SU waits in the queue for allocation of a channel. It is calculated by the equation of M/G/1 queuing network model [32, 34].

Fig. 1
figure 1

Proposed adaptive spectrum handoff framework where Tp and Tr represent the data delivery time of proactive and reactive handoff decisions, respectively

Spectrum handoff decision module decides on a proper handoff type among proactive and reactive on the basis of data delivery time of an SU. The data delivery consists of waiting time, sensing time, channel processing time and transmission time. In Fig. 1, Tp and Tr represent the data delivery time of proactive and reactive handoff decisions, respectively. The strategy with lower data delivery time is applied for the handoff action. After performing proper handoff action, an SU can resume its transmission on newly selected channel.

Let us explain our approach with a simple example of two channels each having one priority queue for a PU and one for (multiple) SUs as shown in Fig. 2. The PUs are placed in high priority queues while the SUs are put in low priority queues. When an interruption occurs (i.e. arrival of a PU), an SU has two options of either to stay on the current channel or to shift its transmission on another channel. In former, the remaining transmission of an SU is placed at the head of low priority queue, while in case of changing the channel, the remaining transmission is placed on the tail [32, 34]. When the channel becomes free, SU can resume its transmission in both cases. This head and tail placement ensures FCFS priority among the SUs. The SU that released the channel on arrival of a PU has higher priority than all other SUs waiting for that specific channel, therefore, it is placed at the head of low priority queue. As soon as the channel is released by PU, the SU placed at the head gets the access. Compared to [32, 34], the function of the S block is extended in our model. It takes over the decision of performing handoff action (proactively or reactively) based on the data delivery time of an SU.

Fig. 2
figure 2

Queuing behaviors of primary and secondary users

Figure 3 delineates the behavior of an SU on the arrival of a PU. Our adaptive spectrum handoff process starts with the detection of PU arrival by event monitoring and predicting PU stayed duration in its licensed channel. A secondary user either stays on the current channel or goes to the spectrum handoff decision phase. At the end, a proper handoff strategy is applied between proactive and reactive depending on the minimum data delivery time.

Fig. 3
figure 3

Behavior of an SU

4 Continuous time markov models for secondary user spectrum access

In this section, we develop a PU prioritized Markov CTMC model in order to capture the interactions between primary and secondary users in channel access. Based on the simplified model given in [5], we start by describing the interactions between one PU and one SU and then generalize it for N SUs considering our adaptive handoff scheme. The arrival and departure rates for users are modelled using two different Poisson processes with rates λ/msec and μ/msec, respectively.

4.1 1-PU, 1-SU primary prioritized CTMC

1-PU and 1-SU CTMC can be modeled as four states chain shown in Fig. 4. For simplification, we denote the arrival and departure rates for a PU and an SU as λ p , λ s and μp, μs, respectively, measured in msec (milliseconds). The first state is idle state where no user is accessing the channel. The primary prioritized CTMC goes to state P or S with rates λ p and λ s where a PU or an SU can access the channel individually. The CTMC can return to idle state with rate μp or μs if the operating user completes its transmission. Now assume that an SU is currently operating on a specific channel, a PU comes to that channel and SU senses the arrival of the PU. The SU has two options according to our adaptive approach. In case of stay and waiting on the current channel, the SU instantly pauses its ongoing transmission and starts waiting in the queue. The state PS w represents the scenario where a PU is transmitting on its licensed channel and the SU is waiting on that channel to continue its paused transmission after the completion of PU. When the PU leaves the channel, the CTMC goes to state S with rate μp. On the other hand, if PU tends to stay for longer duration, the waiting SU can leave the channel and move to state P with rate μs.

Fig. 4
figure 4

1-PU, 1-SU CTMC model

The infinitesimal generator matrix G PS for 1-PU, 1-SU CTMC is shown in Table 2. The balance equations with the rate of flow are given below:

$$\begin{aligned} & \pi_{idle} \lambda_{p} + \, \pi_{psw} \mu_{s} = \, \pi_{p} (\mu_{p} + \, \lambda_{s} ) \\ & \Rightarrow \pi_{p} = \, \pi_{idle} \lambda_{p} + \pi_{psw} \mu_{s} \left( {\lambda_{s} + \mu_{p} } \right) \\ \end{aligned}$$
(1)
$$\begin{aligned} & \pi_{idle} \lambda_{s} + \, \pi_{psw} \mu_{p} = \, \pi_{s} (\mu_{s} + \, \lambda_{p} ) \\ & \Rightarrow \, \pi_{s} = \, \pi_{idle} \lambda_{s} + \pi_{psw} \mu_{p} (\lambda_{p} + \mu_{s} ) \\ \end{aligned}$$
(2)
$$\begin{aligned} & \pi_{idle} \lambda_{s} + \pi_{psw} \mu_{p} = \pi_{s} (\mu_{s} + \lambda_{p} ) \\ & \Rightarrow \pi_{idle} = \pi_{p} \mu_{p} + \pi_{s} \mu_{s} (\lambda_{p} + \lambda_{s} ) \\ \end{aligned}$$
(3)
$$\begin{aligned} & \pi_{p} \lambda_{s} + \pi_{s} \lambda_{p} = \pi_{psw} (\mu_{p} + \mu_{s} ) \\ & \Rightarrow \pi_{psw} = \pi_{p} \lambda_{s} + \pi_{s} \lambda_{p} (\mu_{p} + \mu_{s} ) \\ \end{aligned}$$
(4)
$$\pi_{idle} + \, \pi_{p} + \, \pi_{s} + \, \pi_{psw} = 1$$
(5)

where π is the stationary probability of being in any states {idle, P, S, PS w }. Supposing λp = λs = λ and μP = μs = μ [5] and solving the above equations, we get the following stationary probability values:

$$\begin{aligned} \pi_{idle} & = \frac{\mu }{{\lambda \left( {2 + \frac{\lambda }{\mu } + \frac{\mu }{\lambda }} \right)}} \\ \pi_{p} & = \pi_{s} = \frac{1}{{2 + \frac{\lambda }{\mu } + \frac{\mu }{\lambda }}} \\ \pi_{psw} & = \frac{\lambda }{{\mu \left( {2 + \frac{\lambda }{\mu } + \frac{\mu }{\lambda }} \right)}} \\ \end{aligned}$$
(6)
Table 2 The infinitesimal generator matrix for 2 users primary prioritized CTMC

4.2 N-SUs primary prioritized CTMC

The primary prioritized CTMC model can be extended for N secondary users as shown in Fig. 5 (which is actually an extension of Fig. 4), such that λ S1  = λ S2  = …. λSN = λ and μS1 = μS2 = …. μSN = μ, respectively. It can be seen from the figure that the queue can be formed by two users i.e. one accessing the channel and other waiting for the channel. More users join the queue later on for channel access. For the CTMC with a set of N secondary users such that S = {1, 2…, N}, the state space α consists of all possible 2 N+1 combinations of the interactions between a PU and several SUs in accessing a specific channel:

$$\alpha \, = \, \left\{ {P, \, S_{N}^{w} } \right\} \, U \, \left\{ {P^{0} , \, S_{N,} S_{N - 1}^{w} } \right\}$$
(7)

where {P, S w N } represents all 2 N states in which the PU is operating on a channel and N SUs are waiting on that channel and {P 0 , S N , S w N1 } represents all the 2 N states in which the PU is not present on its licensed channel, one SU is operating and (N − 1) SUs are waiting on that channel. The stationary probabilities for N SUs CTMC can be obtained by combining the Eqs. (16) as follows:

$$G\pi^{T} = \, b$$
(8)

where π =  idle , π p , π s1, … π s1s2…SN },

$$G = \left[ {\frac{{{\text{G}}^{\text{T}} }}{{1\frac{\text{N}}{1x(2 + 1)}}}} \right]{\text{ and b = }}\left[ {\frac{{0\frac{N}{{(2 + 1){\text{x}}1}}}}{1}} \right]$$

and(G is constructed in Fig. 6).

Fig. 5
figure 5

N-SUs primary prioritized CTMC

Fig. 6
figure 6

Infinitesimal generator matrix for N-SUs primary prioritized CTMC

5 Experimental results

In this section, we first compare the simulation results of our approach with theoretical analysis in terms of blocking probability and average utility of SUs. Then, based on extensive simulations, we analyze the performance of our spectrum handoff strategy in terms of number of handoffs, data delivery time, channel utilization, throughput and cumulative handoff delay, by comparing it with several existing approaches.

5.1 Simulation setup

In order to validate our adaptive handoff scheme with CTMC, we use Matlab to simulate a two queues system. The primary and secondary users are generated with two different Poisson processes in continuous time cognitive radio network where the inter-arrival and data delivery time for users are non-integer time slots. The high priority users (PUs) can interrupt the transmission of the low priority users (SUs). The users with the same priority (i.e. SUs) follow an FCFS scheduling policy in order to avoid collision in channel access.

The parameters used to obtain simulation results are listed in Table 3. The simulations are performed multiple times for a total of 100 runs and the average values are taken for plotting the graphs. We assume the mean packet length of a PU and a SU to be 10 bytes each. Data delivery time for an SU comprises of waiting time, sensing time, channel processing time and transmission time. We assume here that the channel processing time is 0.05 ms [32]. The arrival and departure rates for the PU and SU follow Poisson processes. For simplicity, we fix the value of arrival rate of an SU to 0.1 and compare our parameters at different values of PU arrival rates (i.e. 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, and 0.08) unless otherwise stated. This variation factor helps us understanding the behavior of an SU in our adaptive approach with different arrival rates of a PU. Furthermore, we consider the service rate of a PU and an SU as 0.5 and 0.4, respectively, because the PU has higher priority than the SU. As the data delivery time of an SU depends on the arrival rate of a PU, therefore we show via our experiments the possible effects of various arrival rates of the PUs on data delivery time of several SUs.

Table 3 Parameters setting

The simulations are performed based on our proposed adaptive spectrum handoff process. Our simulations start with the detection of a PU by an SU on a temporarily occupied licensed band. In our approach, we use energy detection presented in [23]. The signal is detected by comparing the output of the energy detector with a properly set threshold. If the received signal strength is greater than the threshold value, then the arrival of PU is declared because when a PU arrives to its licensed channel the perceived energy level is increased sufficiently. The SU then decides to perform a handoff action to another channel or to stay and wait on the current channel. This decision is taken by considering the data delivery time in each case (i.e. waiting on current channel or shifting transmission to another channel). In the case of performing handoff, the data delivery time for proactive and reactive decisions is calculated. The SU then decides to perform proactive or reactive handoff on the basis of this calculation of data delivery time in each decision (proactive and reactive). The strategy with minimum data delivery time is applied for the proper handoff function. The main purpose of these simulations is to show the improvement our adaptive handoff scheme can bring into CRNs.

5.2 Blocking probability and average utility

Blocking probability is the fraction of time in which the request of an SU to access a channel is denied because all the channels are in busy state. In Fig. 7, the blocking probability of the N-SUs CTMC is compared in terms of PU arrival rate. To obtain this set of results, we take the arrival rates of SUs as λ s  = 10, 20, 30 and departure rate is fixed as μ s  = 10. As can be seen from the figure, with the increasing PU arrival rate the blocking probability obviously increases. However, the main purpose of this graph is to show the better working of our CTMC approach compared to dynamic frequency hopping community (DFHC) strategy presented in [15]. Our CTMC approach has lower blocking probability compared to DFHC scheme because the newly arriving SUs have more options of either to wait in the queue or to access another channel using our adaptive algorithm. Moreover, analytical results show a good match with simulations which validate the accuracy of our approach.

Fig. 7
figure 7

Comparison of analytical and simulation results in terms of blocking probability

The average utility of an SU is defined as the channel holding or access time divided by the time for which it desired to use the channel. In Fig. 8, we compare the average utility of SUs for our analytical and simulation models. The average utility decreases with the increasing arrivals of PU because with more number of users, the demand for spectrum access increases and the newly arriving SUs have to wait longer in the queue. The average utility is also compared with a hybrid approach presented in [39]. The queuing mechanism proposed in our model enables an SU to avoid unproductive handoff and contention in channel access, thus, outperforming the hybrid approach.

Fig. 8
figure 8

Analytical and simulation results of average utility in our adaptive handoff approach with CTMC

5.3 Time complexity of the proposed algorithm

Table 4 illustrates the time complexity of our adaptive handoff algorithm. The number of iterations to reach the optimal solution is taken as the measure of complexity. The proposed algorithm has a linear time complexity for any chosen number of PU arrivals due to its closed-form solutions. To compute the running time T(n) for our algorithm on an input of n PU arrival values, we sum the products of the cost and time columns, thus obtaining:

$${\text{T}}\left( {\text{n}} \right) = {\text{C}}_{ 1} {\text{n }} + {\text{ C}}_{ 2} {\text{n }} + {\text{ C}}_{ 3} {\text{n }} + {\text{ C}}_{ 4} {\text{n }} + {\text{ C}}_{ 5} {\text{n }} + {\text{ C}}_{ 6} {\text{n }} + {\text{ C}}_{ 7} {\text{n }} = {\text{ O}}\left( {\text{n}} \right)$$
Table 4 Time complexity of the proposed algorithm

5.4 Experimental results of other parameters

In this section, we first show the probability of PU detection by energy detection sensing scheme [23] used in our approach (Fig. 9). As energy detection mechanism is used for sensing arrivals of a PU, therefore, the probability of detection depends on the signal to noise ratio (SNR). It can be seen from Fig. 9, the PU detection probability remains high with larger values of SNR i.e., the values greater than minus eight (−8). This is because the energy detection sensing works efficiently with greater values of SNR [7].

Fig. 9
figure 9

Probability of detection

Data delivery time is the total time an SU takes to complete its specific transmission, therefore the ideal condition for an SU is to achieve minimum data delivery time (i.e. to complete its transmission with less delay). As our scheme with CTMC intelligently shifts among proactive and reactive handoff decisions in order to minimize the data delivery time, so we find a threshold value of PU arrival rate. In Fig. 10, we plot the data delivery time of proactive and reactive handoff decisions as a function of PU arrival rate. When the arrival rate of PU is lower than 0.05, the data delivery time of proactive handoff is comparatively low than reactive handoff as in proactive approach the actual handoff action is performed before the handoff triggering event. So, with a lower value of PU arrival rate, the proactive handoff decision outperforms the reactive handoff decision. When the arrival rate of PU crosses 0.05, the reactive handoff scheme performs better because the actual handoff action is performed after the handoff triggering event. Therefore, depending on the above discussion, the threshold value to shift between proactive or reactive handoff modes is 0.05.

Fig. 10
figure 10

A threshold value to switch between proactive and reactive handoff decisions

Figure 11 compares our handoff strategy with proactive and reactive handoff schemes in terms of data delivery time. When the arrival rate crosses the threshold value our approach shifts to reactive handoff mode which enables it to perform almost 9.26% better than the proactive handoff scheme. On contrary, when the arrival rate of PU is less than threshold value, the adaptive approach allows an SU to shift to proactive handoff mode which yields 3.28% better results than the reactive handoff scheme. Thus, the adaptive scheme utilizes the advantages of both reactive and proactive approaches wherever required.

Fig. 11
figure 11

Comparison of our proposed adaptive spectrum handoff strategy with proactive and reactive handoff strategies in terms of data delivery time

Figure 12 depicts the number of handoffs performed by an SU as a function of PU arrival rate. The proactive and reactive strategies perform more number of handoffs on average as compared to our strategy because each time a PU appears on a channel, the SUs in proactive and reactive schemes must perform handoffs. Both these strategies work on the principle of always changing the channel on arrival of a PU and there is no such mechanism to stay and wait for the PU to complete its transmission. On contrary, our adaptive approach intelligently decides whether to perform handoff action or not, depending on predicted data delivery time of a PU. In this way, the unproductive handoffs are avoided.

Fig. 12
figure 12

Comparison of our proposed adaptive spectrum handoff approach with proactive and reactive handoff strategies in terms of number of handoffs

Figure 13 shows the throughput comparison of our approach with proactive and reactive handoff schemes in terms of increasing PU arrival rate. The reactive handoff strategy starts sensing the next available channel after the handoff triggering event which causes extra latency, thus the throughput for an SU is pretty low. On the other hand, the proactive handoff scheme performs spectrum sensing and handoff before the handoff triggering event, yielding a greater throughput compared to reactive scheme. Our scheme achieves better throughout as compared to proactive and reactive handoff strategies because it can shift to proactive and reactive modes whenever required. Moreover, the queuing mechanism presented for our scheme avoids the collisions among SUs in channel access which results in better throughput values. The increase in throughput with increasing number of arrivals of PU is because of reduced data delivery time and efficient channel utilization in adaptive handoff scheme.

Fig. 13
figure 13

Throughput comparison of our proposed adaptive handoff strategy with proactive and reactive handoff schemes

Figure 14 compares algorithm with static spectrum access approach in terms of channel utilization. Static spectrum access is characterized by a technique in which only licensed users are allowed to utilize the channel and SUs cannot use the spectrum opportunistically even in the absence of a PU [32, 34]. The adaptive handoff strategy being a dynamic spectrum access scheme shows high performance in terms of channel utilization because it allows the SU to utilize the spectrum in absence of a PU. While in static access, only PU is allowed to use the channel which results in channel under-utilization, as can be seen from Fig. 14.

Fig. 14
figure 14

Comparison of our proposed adaptive handoff scheme with static spectrum access technique in terms of channel utilization

In Fig. 15, we compare our algorithm with dynamic frequency hopping (DFH), DSA (dynamic spectrum access) hybrid and M/G/1 approaches presented in [15, 32, 39], respectively. Cumulative handoff delay is the time an SU takes to pause its ongoing transmission on arrival of a PU and restart it on another available channel. It can been seen from the figure that DFH being a reactive handoff approach has largest handoff delay because the spectrum sensing and handoff actions are performed after the handoff triggering event. DSA is a hybrid handoff approach in which the sensing is performed prior to the arrival of PU while handoff action is performed after PU’s arrival, as a result it has lesser cumulative handoff delay compared to DFH. M/G/1 based scheme is a proactive handoff approach, so the cumulative delay remains low compared to both DSA and DFH. The queuing mechanism in our approach sufficiently decreases the handoff delay due to its adaptive nature.

Fig. 15
figure 15

Comparison of adaptive handoff scheme with existing schemes in terms of cumulative handoff delay

In Fig. 16, the performance behavior of the adaptive handoff scheme is analyzed when the number of available channels increases. To obtain this set of results, we fix the PU arrival rate (λp) to 0.02 and 0.08 and set the arrival rate of SU (λs) to 0.01. The range of number of channels (i.e. 2–10) is adapted from the article [3] to elaborate the complexity of the proposed scheme in terms of large channel numbers. The delivery time and number of handoffs decrease with the increasing number of channels as can be seen from Fig. 16a, b, respectively. Moreover, the cumulative handoff delay also shows the similar behavior with increasing number of channels (Fig. 16c). This trend can be justified; as with increasing number of channels, the SUs have more opportunities to access the spectrum which also leads to increase in throughput as shown in Fig. 16d.

Fig. 16
figure 16

Performance analyses in terms of increasing number of channels

Figure 17 shows the performance beavior of the proposed adaptive scheme in terms of increasing number of SUs. This set of experiments is performed by varying the number of SUs from 10 to 100 [12] to reveal the complexity of our algorithm with large set of SUs. It can be seen from the figure that with increasing number of SUs, the data delivery time, number of handoffs and cumulative handoff delay sufficiently increase (Fig. 17a–c, respectively), because, the competition in channel access becomes higher. This also results in a decrement for throughput values which can be seen from Fig. 17d.

Fig. 17
figure 17

Performance analyses in terms of increasing number of SUs

6 Conclusion and future work

In this paper, we proposed a novel handoff approach for spectrum access. Firstly, an adaptive handoff scheme is proposed in which an SU intelligently shifts between proactive or reactive handoff modes depending on the data delivery time. Thus, the adaptive scheme utilizes the advantages of both reactive and proactive decisions. Further, a PU prioritized Markov CTMC model is presented in order to capture the interactions between primary and secondary users for smooth channel access. Simulation and experimental results compared with other well-known approaches show the efficient working of our proposed strategy.

In future, some interesting research issues can be extended from this paper. In our model, we assume that an SU is transmitting its data to only one temporally vacant primary channel. However, one can relax this assumption and consider a scenario where an SU can transmit its data on multiple available primary channels simultaneously. Moreover, a coordination mechanism among the SUs accessing the primary channels can also be developed. The SUs can communicate with each other the information about their stay as well as the PU activity on a corresponding channel, thus making transmission more consistent.