In this section, we derive closed-form expressions for the PDF and CDF of packet transmission time as well as outage probability. Based on these results, we not only quantify the first and second moment of packet transmission time but also investigate the queueing theoretical characteristics of the considered spectrum sharing system.

### 3.1. PDF of packet transmission time

In this scenario, the SU-Tx wants to transmit with maximum transmission rate in order to reduce dropped packets due to timeout. On the other hand, the SU-Tx not only needs to adjust its transmission power in response to changes of the transmission environment but also guarantee the QoS of any PU-Rx around.

Given perfect CSI, the maximum instantaneous transmission power of the SU-Tx in (4) can be expressed with equality as

P\left({g}_{1},{g}_{2}...,{g}_{M};{h}_{1}\right)=\frac{{Q}_{\mathsf{\text{pk}}}}{\underset{m}{\text{max}}\left\{{g}_{m}\right\}}

(13)

By substituting (13) into (2), we can rewrite (1) as

T=\frac{\stackrel{\u0303}{\mathsf{\text{B}}}}{{\text{log}}_{e}\left(1+\frac{{h}_{1}}{\underset{m}{\text{max}}\left\{{g}_{m}\right\}}\frac{{Q}_{\mathsf{\text{pk}}}}{{N}_{0}}\right)}

(14)

It is easy to see that the packet transmission time, *T*, now turns out to be a function of multiple random variables, i.e. *h*_{1}, *g*_{
m
}, *m* = 1, 2,..., *M*. Therefore, in order to investigate the delay performance, we need to derive the PDF of *T* in the sequel.

Let us start with the CDF of {g}_{0}=\underset{m}{\text{max}}\left\{{g}_{m}\right\} where *g*_{
m
}is the channel gain. Because the channel coefficients undergo Rayleigh fading, the channel gain, *g*_{
m
}, is a random variable distributed following an exponential distribution with unit-mean, given by

{F}_{{g}_{m}}\left(y\right)=1-{e}^{-y}

(15)

Using order statistics, we can easily obtain the CDF and PDF of *g*_{0}, respectively, as follows:

{F}_{{g}_{0}}\left(y\right)={\left(1-{e}^{-y}\right)}^{M}

(16)

{f}_{{g}_{0}}\left(y\right)=M{e}^{-y}{\left(1-{e}^{-y}\right)}^{M-1}

(17)

For convenient derivation, let us denote *Z* = *h*_{1}*/g*_{0}. The PDF of *Z* can be obtained by applying the method presented in [23] as

fz\left(z\right)=\sum _{m=0}^{M-1}\left(\begin{array}{c}\hfill M-1\hfill \\ \hfill m\hfill \end{array}\right)\frac{{\left(-1\right)}^{m}M}{{\left(1+m+z\right)}^{2}}

(18)

On the other hand, the CDF of *T* can be formulated as

\begin{array}{ll}\hfill {F}_{T}\left(x\right)=\text{Pr}\left\{T<x\right\}& =1-\text{Pr}\left\{Z<\left({e}^{\frac{B}{x}}-1\right)\frac{{N}_{0}}{{Q}_{\mathsf{\text{pk}}}}\right\}\phantom{\rule{2em}{0ex}}\\ =1-\sum _{m=0}^{M-1}\left(\begin{array}{c}\hfill M-1\hfill \\ \hfill m\hfill \end{array}\right)\frac{{\left(-1\right)}^{m}\left({e}^{\frac{B}{x}}-1\right)M}{\left(1+m\right)\left({e}^{\frac{B}{x}}+\frac{m{Q}_{\mathsf{\text{pk}}}}{{N}_{0}}+G\right)}\phantom{\rule{2em}{0ex}}\end{array}

(19)

and the PDF of *T* can be derived by differentiating (19) with respect to *x* as

{f}_{T}\left(x\right)=\sum _{m=0}^{M-1}\left(\begin{array}{c}\hfill M-1\hfill \\ \hfill m\hfill \end{array}\right)\frac{{\left(-1\right)}^{m}\stackrel{\u0303}{\mathsf{\text{B}}}M{Q}_{\mathsf{\text{pk}}}}{{N}_{0}}\frac{\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/x\right)}{{\left(\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/x\right)+\frac{m{Q}_{\mathsf{\text{pk}}}}{{N}_{0}}+G\right)}^{2}},\phantom{\rule{2.77695pt}{0ex}}\phantom{\rule{2.77695pt}{0ex}}\phantom{\rule{2.77695pt}{0ex}}x\ge 0

(20)

where G=\frac{{Q}_{\mathsf{\text{pk}}}}{{N}_{0}}-1 is introduced for brevity. It is noted that (20) exactly leads to the PDF of [[11], Eq.(10)] for the peak interference power constraint of a single PU-Rx by setting *M* = 1.

In the subsequent sections, the important result in (20) will be used to investigate the outage probability, the average transmission time and the average waiting time of packets.

### 3.2. Outage probability

Given the channel conditions and the peak interference power constraint, the outage probability *P*_{out} is defined as the probability that the packet transmission time *T* exceeds the interval *t*_{out}:

{P}_{\mathsf{\text{out}}}=\text{Pr}\left(T\ge {t}_{\mathsf{\text{out}}}\right)

(21)

From (19), we can easily obtain the closed-form expression for the outage probability as

\begin{array}{ll}\hfill {P}_{\mathsf{\text{out}}}& =1-Pr\left(T<{t}_{\mathsf{\text{out}}}\right)=1-{F}_{T}\left({t}_{\mathsf{\text{out}}}\right)\phantom{\rule{2em}{0ex}}\\ =\sum _{m=0}^{M-1}\left(\begin{array}{c}\hfill M-1\hfill \\ \hfill n\hfill \end{array}\right)\frac{{\left(-1\right)}^{m}M}{1+m}\frac{\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/{t}_{\mathsf{\text{out}}}\right)-1}{\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/{t}_{\mathsf{\text{out}}}\right)+\frac{m{Q}_{\mathsf{\text{pk}}}}{{N}_{0}}+G}\phantom{\rule{2em}{0ex}}\end{array}

(22)

On the other hand, let *T*_{
suc
}denote the transmission time of a packet given that it is not dropped, i.e.,

{T}_{suc}=\left\{T|T<{t}_{\mathsf{\text{out}}}\right\}

(23)

Accordingly, applying Bayes' rule, the probability that the event *T*_{
suc
}takes place can be expressed as

P\left\{T|T<{t}_{\mathsf{\text{out}}}\right\}=\frac{P\left\{T,T<{t}_{\mathsf{\text{out}}}\right\}}{p\left\{T<{t}_{\mathsf{\text{out}}}\right\}}=\frac{P\left\{T,T<{t}_{\mathsf{\text{out}}}\right\}}{1-{P}_{\mathsf{\text{out}}}}

(24)

Based on (24), we can express the CDF of *T*_{
suc
}as follows:

{F}_{{T}_{suc}}\left(x\right)=\frac{1}{1-{P}_{\mathsf{\text{out}}}}\underset{0}{\overset{x}{\int}}{f}_{T}\left(t\right)dt,\phantom{\rule{2.77695pt}{0ex}}\phantom{\rule{2.77695pt}{0ex}}0\le x<{t}_{\mathsf{\text{out}}}

(25)

and {F}_{{T}_{suc}}\left(x\right)=0 for *x* ≥ *t*_{out}. Differentiating both sides of (25) with respect to *x*, the PDF of the packet transmission time without being timed out can be presented as

{f}_{{T}_{suc}}\left(x\right)=\frac{d}{dx}{F}_{{T}_{suc}}\left(x\right)=\frac{{f}_{T}\left(x\right)}{1-{P}_{\mathsf{\text{out}}}},\phantom{\rule{2.77695pt}{0ex}}\phantom{\rule{2.77695pt}{0ex}}0\le x<{t}_{\mathsf{\text{out}}}

(26)

and {f}_{{T}_{suc}}\left(x\right)=0 for *x* ≥ *t*_{out}. Substituting (20) into (26), the PDF of packet transmission time without being timed out can be obtained as

{f}_{{T}_{suc}}\left(x\right)=\sum _{m=0}^{M-1}\left(\begin{array}{c}\hfill M-1\hfill \\ \hfill m\hfill \end{array}\right)\frac{{\left(-1\right)}^{m}\stackrel{\u0303}{\mathsf{\text{B}}}M{Q}_{\mathsf{\text{pk}}}}{\left(1-{P}_{\mathsf{\text{out}}}\right){N}_{0}}\frac{\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/x\right)}{{\left[\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/x\right)+\frac{m{Q}_{\mathsf{\text{pk}}}}{{N}_{0}}+G\right]}^{2}},\phantom{\rule{2.77695pt}{0ex}}0\le x<{t}_{\mathsf{\text{out}}}

(27)

while {f}_{{T}_{suc}}\left(x\right)=0 for *x* ≥ *t*_{out}. In the following, the PDF {f}_{{T}_{suc}}\left(x\right) given in (27) will be used to derive the moment of packet transmission time.

### 3.3. Moment of packet transmission time

Let us recall that a transmitted packet can be received successfully or not due to the fading channel. Therefore, examining average transmission time shall consider both packet transmission time without and with timeout.

Let us start with the average transmission time of packet without timeout as follows

\begin{array}{ll}\hfill E\left[{T}_{suc}\right]& =\underset{0}{\overset{{t}_{\mathsf{\text{out}}}}{\int}}x{f}_{{T}_{suc}}\left(x\right)dx\phantom{\rule{2em}{0ex}}\\ =\frac{M{Q}_{\mathsf{\text{pk}}}}{\left(1-{P}_{\mathsf{\text{out}}}\right){N}_{0}}\sum _{m=0}^{M-1}\left(\begin{array}{c}\hfill M-1\hfill \\ \hfill m\hfill \end{array}\right){\left(-1\right)}^{m}\underset{0}{\overset{{t}_{\mathsf{\text{out}}}}{\int}}\frac{\stackrel{\u0303}{\mathsf{\text{B}}}\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/x\right)}{x{\left[\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/x\right)+\frac{m{Q}_{pk}}{{N}_{0}}+G\right]}^{2}}dx\phantom{\rule{2em}{0ex}}\end{array}

(28)

By setting t=\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/x\right) and applying an exchange of variables in the integral of (28), we finally obtain the first moment of packet transmission time without timeout as

\mathbb{E}\left[{T}_{suc}\right]=\frac{M{Q}_{\mathsf{\text{pk}}}}{\left(1-{P}_{\mathsf{\text{out}}}\right){N}_{0}}{\psi}_{1}\left(\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/{t}_{\mathsf{\text{out}}}\right),G\right)

(29)

where

{\psi}_{1}\left(a,b\right)=\sum _{m=0}^{M-1}\left(\begin{array}{c}\hfill M-1\hfill \\ \hfill m\hfill \end{array}\right){\left(-1\right)}^{m}\underset{a}{\overset{\infty}{\int}}\frac{\stackrel{\u0303}{\mathsf{\text{B}}}}{\left({\text{log}}_{e}t\right){\left(t+\frac{m{Q}_{\mathsf{\text{pk}}}}{{N}_{0}}+b\right)}^{2}}dt

(30)

Similarly, we can calculate the second moment of packet transmission time without timeout as follows:

\begin{array}{ll}\hfill \mathbb{E}\left[{T}_{{}_{suc}}^{2}\right]& =\underset{0}{\overset{{t}_{\mathsf{\text{out}}}}{\int}}{x}^{2}{f}_{{T}_{suc}}\left(t\right)dt\phantom{\rule{2em}{0ex}}\\ =\frac{M{Q}_{\mathsf{\text{pk}}}}{\left(1-{P}_{\mathsf{\text{out}}}\right){N}_{0}}\sum _{m=0}^{M-1}\left(\begin{array}{c}\hfill M-1\hfill \\ \hfill m\hfill \end{array}\right){\left(-1\right)}^{m}\underset{0}{\overset{{t}_{\mathsf{\text{out}}}}{\int}}\frac{\stackrel{\u0303}{\mathsf{\text{B}}}\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/x\right)}{x{\left[\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/x\right)+\frac{m{Q}_{pk}}{{N}_{0}}+G\right]}^{2}}dx\phantom{\rule{2em}{0ex}}\end{array}

(31)

Using similar exchange of variables as above for (31), we obtain the second moment of *T*_{
suc
}as

\mathbb{E}\left[{T}_{{}_{suc}}^{2}\right]=\frac{M{Q}_{\mathsf{\text{pk}}}}{\left(1-{P}_{\mathsf{\text{out}}}\right){N}_{0}}{\psi}_{2}\left(\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/{t}_{\mathsf{\text{out}}}\right),G\right)

(32)

where

{\psi}_{2}\left(a,b\right)=\sum _{m=0}^{M-1}\left(\begin{array}{c}\hfill M-1\hfill \\ \hfill m\hfill \end{array}\right){\left(-1\right)}^{m}\underset{a}{\overset{\infty}{\int}}\frac{{\stackrel{\u0303}{\mathsf{\text{B}}}}^{2}}{\left({\text{log}}_{{}_{e}}^{2}t\right){\left(t+\frac{m{Q}_{\mathsf{\text{pk}}}}{{N}_{0}}+b\right)}^{2}}dt

(33)

Finally, by applying the law of total expectation, the first and the second moment of packet transmission time (including dropped packets) can be given by

\mathbb{E}\left[{T}^{i}\right]=\left(1-{P}_{\mathsf{\text{out}}}\right)\mathbb{E}\left[{T}_{suc}^{i}\right]+{t}_{\mathsf{\text{out}}}^{i}{P}_{\mathsf{\text{out}}},\phantom{\rule{2.77695pt}{0ex}}\phantom{\rule{2.77695pt}{0ex}}\phantom{\rule{2.77695pt}{0ex}}i=1,2

(34)

where *P*_{
out
}is given by (22) and \mathbb{E}\left[{T}_{suc}^{i}\right], *i* = 1, 2 can be calculated by (29) and (32), respectively

### 3.4. Queuing theoretical characteristics

Firstly, the expression for the average waiting time of packets in the buffer of SU-Tx can be obtained by substituting (34) with respect to *i* = 1, 2 into (5) and (6) as

\begin{array}{ll}\hfill E\left[W\right]& =\frac{{N}_{0}{t}_{\mathsf{\text{out}}}{P}_{\mathsf{\text{out}}}+M{Q}_{\mathsf{\text{pk}}}{\psi}_{1}\left(\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/{t}_{\mathsf{\text{out}}}\right),G\right)}{{N}_{0}}\phantom{\rule{2em}{0ex}}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{\lambda M{Q}_{pk}{\psi}_{2}\left(\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/{t}_{\mathsf{\text{out}}}\right),G\right)+\lambda {N}_{0}{t}_{{}^{\mathsf{\text{out}}}}^{2}{P}_{\mathsf{\text{out}}}}{2\left[{N}_{0}-\lambda M{Q}_{\mathsf{\text{pk}}}{\psi}_{1}\left(\text{exp}\left(\stackrel{\u0303}{\mathsf{\text{B}}}/{t}_{\mathsf{\text{out}}}\right),G\right)-\lambda {t}_{\mathsf{\text{out}}}{P}_{\mathsf{\text{out}}}\right]}\phantom{\rule{2em}{0ex}}\end{array}

(35)

Secondly, the transmission of an SU is stable if and only if the average arrival rate is less than the average transmission rate. Thus, we can make a statement about the stable transmission condition as follows:

*Remark*: Given the channel state information and the peak interference power constraint of *M* PUs, the transmission of the SU is stable if and only if the average arrival rate of packet, *λ*, satisfies the condition

\lambda <\frac{1}{\left(1-{P}_{\mathsf{\text{out}}}\right)E\left[{T}_{suc}\right]+{t}_{\mathsf{\text{out}}}{P}_{\mathsf{\text{out}}}}

(36)

The inequality (36) is derived by substituting (34) for *i* = 1 into (7).

Finally, by using the Little theorem [20, Eq. (8.2)], the average number of packets waiting in the buffer of the SU-Tx can be formulated as

{N}_{\mathsf{\text{buffer}}}=\lambda \mathbb{E}\left[W\right]

(37)

where E\left[W\right] is given by (35).