The joint leasing and sensing-based access model can be described as a CRN with three interacting layers [7]: primary system (with PU access point and PUs), spectrum broker, and secondary system (with SU access point and SUs with CR capabilities). The system model is depicted in Figure 1. The primary system divides the licensed spectrum into two parts. One part consists of reserved channels for PUs transmission only, and the other part consists of the shared channels that can be used by SUs opportunistically. The primary system can temporarily lease its spectrum usage rights of the shared channels to secondary system through the spectrum broker, and get payoff from secondary system as SUs opportunistically utilize the shared channels. The spectrum broker can be either a regulatory authority (e.g., FCC in USA, Ofcom in UK) or an authorized third-party. The spectrum broker works as an interaction entity between the primary and the secondary systems [11]. A contract between the primary and the secondary systems has to be made in spectrum broker. The interactions between the primary and the secondary systems in a three-tier CRN can be modeled by a Stackelberg game [12], where the primary system is the leader and secondary system is the follower. The leader announces its own policies (the range of shared channels, spectrum leasing cost), and the secondary system makes its own decisions (the range of leased channels, service tariff) with the knowledge of the leader's decisions. The primary and the secondary systems exchange their information through spectrum broker. For simplicity, we assume that there are one primary system and one secondary system. In this joint leasing and sensing-based three-tier CRN, the spectrum-sharing mechanism has the major influences on the primary and the secondary systems' decisions. The economic factor is not our focus here and will be considered in our future research.

We assume that there are *N* licensed channels in a primary system, and each of them has identical bandwidth. Among these *N* channels, *R* channels are dedicated for PUs, and *N* - *R* channels are shared by PUs and SUs. A SU can sense the shared channels by spectrum sensing and access the channel if it is not occupied by a PU. The PU and the SU arrival processes follow Poisson process with arrival rates *λ*_{p} and *λ*_{s}, respectively. The service in the CRN is a single-slot first come first served transmission. The service time of the PU follows exponential distribution with mean 1/*μ*_{p} and that of the SU follows exponential distribution with mean 1/*μ*_{s}. As the number of spectrum holes varies with PUs traffic dramatically, we assume the traffic of SUs has much shorter average service time compared to the traffic of PUs. A first in first out buffer of size *Q* is allocated for the secondary system.

In this section, we describe the process of spectrum sharing in the CRN as a multi-dimensional Markov chain with three state variables. The states in the model are denoted as \left\{{N}_{\mathsf{\text{p}}}\left(t\right),{N}_{\mathsf{\text{s}}}^{\prime}\left(t\right),{N}_{\mathsf{\text{s}}}\left(t\right)\right\}.

{P}_{i,j,k}=\underset{t\to \infty}{lim}P\left\{{N}_{\mathsf{\text{p}}}\left(t\right)=i,\phantom{\rule{2.77695pt}{0ex}}{N}_{\mathsf{\text{s}}}^{\mathsf{\text{\u2019}}}\left(t\right)=j,\phantom{\rule{2.77695pt}{0ex}}{N}_{\mathsf{\text{s}}}\left(t\right)=k\right\} represents the steady probability of state, in which *N*_{p}(*t*) = *i* is the number of PUs in the system, {N}_{\mathsf{\text{s}}}^{\prime}\left(t\right)=j is the number of SUs in the system, *N*_{s}(*t*) = *k* is the number of SUs in service. Here, we use (*i, j, k*) as the notation of a state in the model.

### 2.1 Preemptive mechanism

In the preemptive mechanism, a SU has to switch to another spectrum hole or stop its transmission (be preempted) as soon as a PU reclaims the channel, since PUs are given priorities over SUs. The preempted SU that ceases ongoing packet transmission will put the failed transmission packet into the buffer and wait for transmission again. However, if the buffer is full, then the SU's failed transmission packet will be dropped. The number of channels that SUs can use is a random variable, which depends on the PUs' service probability distributions. Since the number of the spectrum holes depends on the PUs' traffic, the number of SUs in service also varies with PUs' traffic. Figure 2 shows an example of the state transition diagram with *N* = 3, *R* = 1. The state space of the preemptive mechanism Ω^{pre} is presented as

{\Omega}^{\mathsf{\text{pre}}}=\left\{\begin{array}{c}\left(i,j,k\right):0\le i\le N;0\le k\le min\left(N-R,N-i\right);\\ j=k,\mathsf{\text{if0}}\le kmin\left(N-R,N-i\right);\\ k\le j\le k+Q,\mathsf{\text{if}}k=min\left(N-R,N-i\right)\end{array}\right\}.

In Figure 2, we can see that unidirectional transitions exist in the Markov chain, so that the Markov chain cannot be reversible, which means that the exact closed-form solutions are non-trivial to obtain. Decomposition technique [9] is used as a tool to derive the approximate closed-form solutions of steady-state probabilities in the Markov chain. The Markov chain can be broken down into a hierarchy of groups of aggregate states. Each group of states comprises of all the states with a fixed number of PUs. Figure 2 shows that there are four groups of aggregate states and each group is circled by a line separately. All transitions between the groups are in terms of *λ*_{p} and *μ*_{p}. For the duration of a specific number of PUs, the states of SUs achieve equilibrium. All the transitions within a group are in terms of *λ*_{s} and *μ*_{s}, and the steady-state probabilities {P}_{i,j,k}^{\mathsf{\text{pre}}} in the preemptive mechanism can be approximated by ignoring the transitions between groups.

PUs have preemptive priorities over SUs, which implies that the equilibrium distribution of PUs can simply be modeled as a *M/M/N/N* queueing system. *P*_{
i
} represents the probability of *i* PUs in the system, which can be derived by Erlang-B formula [9]:

{P}_{i}=\frac{{\rho}_{\text{p}}^{i}/i!}{{\displaystyle \sum _{j=0}^{N}{\rho}_{\text{p}}^{j}}/j!},\phantom{\rule{0.5em}{0ex}}\text{where}\phantom{\rule{0.5em}{0ex}}{\rho}_{\text{p}}=\frac{{\lambda}_{\text{p}}}{{\mu}_{\text{p}}}.

(1)

∀_{
i
}∈ {0, 1, ..., *R*}, the *M/M/N-R/N-R+Q* queueing system can be used to obtain {P}_{i,j,min\left(j,N-R\right)}^{\mathsf{\text{pre}}}, which represents the probability of *j* SUs in the system. *ρ*_{s} = *λ*_{s}/*μ*_{s} refers to the SU traffic load in Erlang. For simplicity, we denote *N-R* = *D*, *N-R+Q* = *E*.

{P}_{i,j,\mathrm{min}\left(j,D\right)}^{\text{pre}}=\{\begin{array}{c}{P}_{i}\cdot {P}_{i,0}^{\text{pre}}{\rho}_{\text{s}}^{j}/j!\phantom{\rule{0.5em}{0ex}}\text{0}\le \phantom{\rule{0.5em}{0ex}}j<D\\ {P}_{i}\cdot \frac{{P}_{i,0}^{\text{pre}}{\rho}_{\text{s}}^{j}}{D!{D}^{j-D}}\phantom{\rule{0.5em}{0ex}}D\le j\le E\end{array}\phantom{\rule{0.5em}{0ex}}

(2)

{P}_{i,0}^{\text{pre}}={\left(\frac{{\rho}_{\text{s}}^{D}\left(1-{\left({\rho}_{\text{s}}/D\right)}^{\left(Q+1\right)}\right)}{\left(1-\frac{{\rho}_{\text{s}}}{D}\right)D!}+{\displaystyle \sum _{x=0}^{D-1}{\rho}_{\text{s}}^{x}/x!}\right)}^{-1}

(3)

∀_{
i
}∈ {*R*+1, ..., *N*-1}, {P}_{i,j,min\left(j,N-i\right)}^{\mathsf{\text{pre}}} can be derived from the *M/M/N-i/N-i+Q* queueing system similarly as (2) and (3).

For *i* = *N*, we construct the balance equations of the states in the group. The steady-state probabilities can be easily obtained.

{P}_{N,j,0}^{\mathsf{\text{pre}}}={\lambda}_{\mathsf{\text{s}}}^{j}{P}_{N,0,0}^{\mathsf{\text{pre}}}

(4)

\sum _{j=0}^{Q}{P}_{N,j,0}^{\mathsf{\text{pre}}}=\left(1+{\lambda}_{\mathsf{\text{s}}}+\cdots +{\lambda}_{\mathsf{\text{s}}}^{Q}\right){P}_{N,0,0}^{\mathsf{\text{pre}}}={P}_{N}

(5)

All the steady-state probabilities in the preemptive mechanism are given approximately in above formulas. The complete algorithm for the steady-state probabilities in the preemptive mechanism is described in Appendix A

### 2.2. NP mechanism

In the NP mechanism, PUs have no preemptive priorities over SUs. When there is no spectrum hole to switch, a SU would not vacate the channel reclaimed by a PU until the SU finishes its ongoing transmission. It means that SUs would not be forcibly terminated by PUs. Both the primary and the secondary systems can communicate with the spectrum broker through auxiliary control channels [7]. We describe the explicit interactions between the primary and the secondary systems as follows.

In the secondary system, SUs can monitor the real-time situation of the shared channels by periodic spectrum sensing. Once there is no spectrum hole, the secondary system will inform a waiting signaling to the primary system through the spectrum broker. After receiving this signaling, the PU who is ready to transmit will wait for a period of time and inform the secondary system the target channel that it reclaims. The SU in the specific channel will vacate the channel immediately after it finishes the ongoing transmission. If the channel can be released before the PU's waiting time is due, then the PU can access the target channel and the PU's service is only deferred. Otherwise, the PU will be blocked. Once the SUs sense that there appears a spectrum hole (a SU or PU in service left), the waiting signaling is canceled for PUs in the primary system via the spectrum broker. In the situation without waiting signaling, the proposed mechanism works in the same way as the preemptive mechanism.

In this article, we assume that the waiting time of a PU follows exponential distribution with mean 1/*μ*_{p}, which is the same as the PU's service time. Therefore, the total rate of a PU leaving the system only depends on *N*_{p} (*t*). This implies that the number of PUs in the system is independent of the SUs' traffic and the steady state probabilities of *N*_{p} (*t*) can also be derived by (1).

Figure 3 shows an example of the state transition diagram of NP mechanism with *N* = 3, R = 1. The state space of NP mechanism Ω^{nonpre} is

{\Omega}^{\mathsf{\text{nonpre}}}=\left\{\begin{array}{c}{S}^{n}={\Omega}^{\mathsf{\text{pre}}}\\ {S}^{q}=\left\{\begin{array}{c}\left(i,j,k\right):R+1\le i\le N;\\ min\left(N-i,N-R\right)<k\le max\left(N-i,N-R\right);\\ k\le j\le k+Q\end{array}\right\}\end{array}\right\}.

In Figure 3, the shaded states represent the states with PUs queueing for transmission, and these states do not exist in preemptive mechanism. The set of states with PUs queueing is denoted as *S*^{q}, while the set of the other states in Ω^{nonpre} is denoted as *S*^{n}. In queueing states, *i+k* > *N*, only *N-K* PUs are in service, *i*-(*N-K*) PUs are queueing for transmission.

We use the decomposition technique to derive the approximate closed-form solutions of steady-state probabilities {P}_{i,j,k}^{\mathsf{\text{nonpre}}} in the proposed NP mechanism.

Step 1. For *i* ∈ (0, ..., *R*), all states are in *S*^{n}, and the state transitions in each group can be modeled as *M/M/(N-R)/(N-R)+Q*. Therefore, the steady-state probabilities of *j* SUs in the system {P}_{i,j,min\left(j,N-R\right)}^{\mathsf{\text{nonpre}}} can be derived by the same formulas as (2) and (3).

Step 2. For *i* ∈ (*R*, ..., *N*-1), we denote the queueing states as (*i', j, k*) to distinguish it from the non-queueing states here. The transitions into the queueing states {*i* = 1 ≤ *i'* ≤ *N*, *j* ≤ *k*, *k* = min(*N-i, N-R*)} are only from the non-queueing states {*i*, *j* ≤ *k*, *k* = min(*N-i, N-R*)}, which have been obtained from last step. Figure 4 shows an example of the transition diagram between non-queueing states and queueing states.

We define the terms *F*_{
i, j, k
}, *R*_{
i, j, k
} as follows.

\begin{array}{cc}\hfill {F}_{{i}^{\prime},j,k}& \equiv {P}_{{i}^{\prime},j-1,k}^{\mathsf{\text{nonpre}}}{\lambda}_{s}\phi \left({i}^{\prime},j-1,k\right)\hfill \\ =\mathsf{\text{totalprobabilityfluxintostate}}\left({i}^{\prime},j,k\right)\hfill \\ \mathsf{\text{otherthanfrom}}\left({i}^{\prime}-1,j,k\right)\mathsf{\text{or}}\left({i}^{\prime}+1,j,k\right)\hfill \end{array}

(6)

in which *φ*(*i', j, k*) indicates whether the state (*i', j, k*) exists or not, i.e. *φ*(*i', j, k*) = 1, if (*i', j, k*) ∈ Ω^{nonpre}.

\begin{array}{cc}\hfill {R}_{{i}^{\prime},j,k}& ={\lambda}_{s}+k{\mu}_{s}+{\lambda}_{p}+{i}^{\prime}{\mu}_{\mathsf{\text{p}}}\hfill \\ \mathsf{\text{=totalrateoutofstate}}\left({i}^{\prime},j,k\right).\hfill \end{array}

(7)

We use (6) and (7) to construct balance equations for the queueing states, as proposition 1 in [10]. {P}_{i,j,k}^{\mathsf{\text{nonpre}}} satisfies the following recursive relationship:

{P}_{{i}^{\prime},j,k}^{\mathsf{\text{nonpre}}}={\Gamma}_{{i}^{\prime}-1,j,k}+{P}_{{i}^{\prime}-1,j,k}^{\mathsf{\text{nonpre}}}{\Theta}_{{i}^{\prime}-1,j,k}.

(8)

{\Gamma}_{{i}^{\prime}-1,j,k}=\left\{\begin{array}{c}\hfill \frac{{F}_{{i}^{\prime},j,k}+\left({i}^{\prime}+1\right){\mu}_{p}{\Gamma}_{{i}^{\prime},j,k}}{{R}_{{i}^{\prime},j,k}-\left({i}^{\prime}+1\right){\mu}_{p}{\Theta}_{{i}^{\prime},j,k}}R\mathsf{\text{+1}}\le {i}^{\prime}\le N\hfill \\ \hfill 0{i}^{\prime}N\hfill \end{array}\right.

(9)

{\Theta}_{{i}^{\prime}-1,j,k}=\left\{\begin{array}{c}\hfill \frac{{\lambda}_{p}}{{R}_{{i}^{\prime},j,k}-\left({i}^{\prime}+1\right){\mu}_{p}{\Theta}_{{i}^{\prime},j,k}}R\mathsf{\text{+1}}\le {i}^{\prime}\le N\hfill \\ \hfill 0{i}^{\prime}N\hfill \end{array}\right.

(10)

Step 3. For *i*∈ (*R*+1, ..., *N*-1), we can derive the non-queueing states' equilibrium probabilities {P}_{i,j,min\left(j,N-i\right)}^{\mathsf{\text{nonpre}}} according to the following balance equations. Figure 5 shows an example of the transition diagram between the queueing states with known equilibrium probabilities and the non-queueing states we are interested in.

{P}_{i,0,0}^{\mathsf{\text{nonpre}}}{\lambda}_{\mathsf{\text{s}}}={P}_{i,1,1}^{\mathsf{\text{nonpre}}}{\mu}_{\mathsf{\text{s}}}

{P}_{i,0,0}^{\mathsf{\text{nonpre}}}+{P}_{i,1,1}^{\mathsf{\text{nonpre}}}+\cdots +{P}_{i,N-i+Q,N-i}^{\mathsf{\text{nonpre}}}={P}_{i}-{P}_{q}\left(i\right)

{P}_{q}\left(i\right)\equiv \sum _{\forall j,k\mathsf{\text{s}}\mathsf{\text{.t}}\mathsf{\text{.}}\left(i,j,k\right)\in {S}^{q}}{P}_{i,j,k}

The closed-form solutions of steady-state probabilities {P}_{i,j,min\left(j,g\left(i\right)\right)}^{\mathsf{\text{nonpre}}} for the queueing states with *i*∈ (*R*+1, ..., *N*-1) can be written as (11). We denote N-i=g\left(i\right),\phantom{\rule{0.3em}{0ex}}N-i+1=x\left(i\right),\phantom{\rule{0.3em}{0ex}}\left(N-i+1\right){P}_{i,b,N-i+1}^{\mathsf{\text{nonpre}}}={f}_{i,b} here.

{P}_{i,j,min\left(j,g\left(i\right)\right)}^{\mathsf{\text{nonpre}}}=\left\{\begin{array}{c}\hfill {P}_{i,0}^{\mathsf{\text{nonpre}}}\frac{{\rho}_{\mathsf{\text{s}}}^{j}}{j!}\mathsf{\text{1}}\le j\le g\left(i\right)\hfill \\ \hfill \begin{array}{cc}\hfill \begin{array}{c}{P}_{i,0}^{\mathsf{\text{nonpre}}}\frac{{\rho}_{\mathsf{\text{s}}}^{g\left(i\right)}}{g\left(i\right)!}{\left(\frac{{\rho}_{\mathsf{\text{s}}}}{g\left(i\right)}\right)}^{j-g\left(i\right)}\\ -\sum _{a=0}^{j-x\left(i\right)}{\left(\frac{{\rho}_{\mathsf{\text{s}}}}{g\left(i\right)}\right)}^{j-x\left(i\right)-a}\sum _{b=x\left(i\right)}^{x\left(i\right)+a}\frac{{f}_{i,b}}{g\left(i\right)}\end{array}\hfill & \hfill g\left(i\right)j\hfill \end{array}\hfill \end{array}\right.

(11)

{P}_{i,0}^{\mathsf{\text{nonpre}}}=\frac{{P}_{i}-{P}_{q}\left(i\right)+\sum _{j=x\left(i\right)}^{g\left(i\right)+Q}\sum _{a=0}^{j-x\left(i\right)}{\left(\frac{{\rho}_{\mathsf{\text{s}}}}{g\left(i\right)}\right)}^{j-x\left(i\right)-a}\sum _{b=x\left(i\right)}^{x\left(i\right)+a}\frac{{f}_{i,b}}{g\left(i\right)}}{\sum _{j=0}^{g\left(i\right)}\frac{{\rho}_{\mathsf{\text{s}}}^{j}}{j!}+\frac{{\rho}_{\mathsf{\text{s}}}^{g\left(i\right)}}{g\left(i\right)!}\sum _{b=1}^{Q}{\left(\frac{{\rho}_{\mathsf{\text{s}}}}{g\left(i\right)}\right)}^{b}}

(12)

Step 4. For *i = N*, Figure 6 shows an example of the transition diagram between states with known equilibrium probabilities and states that we are interested in.

According to the decomposition technique, local balance equation can be presented as (13). As a result, the equilibrium probabilities can easily be written as (14) and (15).

{P}_{N,1,1}^{\mathsf{\text{nonpre}}}{\mu}_{\mathsf{\text{s}}}+{P}_{N-1,0,0}^{\mathsf{\text{nonpre}}}{\lambda}_{\mathsf{\text{p}}}={P}_{N,0,0}^{\mathsf{\text{nonpre}}}\left({\lambda}_{\mathsf{\text{s}}}+N{\mu}_{\mathsf{\text{p}}}\right)

(13)

{P}_{N,0,0}^{\mathsf{\text{nonpre}}}=\frac{{P}_{N,1,1}^{\mathsf{\text{nonpre}}}{\mu}_{\mathsf{\text{s}}}+{P}_{N-1,0,0}^{\mathsf{\text{nonpre}}}{\lambda}_{\mathsf{\text{p}}}}{{\lambda}_{\mathsf{\text{s}}}+N{\mu}_{\mathsf{\text{p}}}}

(14)

{P}_{N,j,0}^{\mathsf{\text{nonpre}}}=\frac{{P}_{N,j+1,1}^{\mathsf{\text{nonpre}}}{\mu}_{\mathsf{\text{s}}}+{P}_{N,j-1,0}^{\mathsf{\text{nonpre}}}{\lambda}_{\mathsf{\text{s}}}}{{\lambda}_{\mathsf{\text{s}}}+N{\mu}_{\mathsf{\text{p}}}}1\le j\le Q

(15)

All the steady-state probabilities in the NP mechanism are given approximately by above four steps. The complete algorithm for calculating the steady-state probabilities in the NP mechanism is presented in Appendix B. The main purpose of deriving the steady-state probabilities is to evaluate the performance metrics in the joint leasing and sensing-based CRN.