In the work, we assume that there exists a heterogenous network consisting of a single user CR-UWB network and a multiuser PU network, as shown in Figure4. The single CR-UWB network contains one CR communication link, and the CR-UWB’s infrastructure is in distributed manner, i.e., *ad hoc* manner. The CR-UWB network overlaps with the PU network, in which the multiple PUs operate in the same band of the CR-UWB and within the range of being interfered by the CR-UWBs. We assume the use of the overlay spectrum sharing scheme[5], which indicates that the CR-UWB can access to the overlapped spectrum if and only if the CR-UWB’s ED result shows that the PUs are temporarily absent. We also assume that an ideal notch filter is used in the CR-UWB system, hence the impact of the sideband interference can be ignored[20].

### CR-UWB transceiver

Figure5 depicts the architecture of CR-UWB transceiver. It shows that the spectrum sensing function is located in the cognitive engine block which lies posterior to the fast Fourier transform (FFT) engine of the CR-UWB’s receiver side. The sensing results can be forwarded into the cognitive algorithm block for the CR-UWB system to dynamically use a radio resource allocation algorithm according to the sensing output.

Furthermore, for spectrum sensing in low-SNR regime, the low noise amplifier (LNA) and the automatic gain control (AGC) at the CR-UWB receiver side are enhanced compared with the conventional UWB transceiver[21]. Since the power of PUs’ signals are much higher than that of the UWB user, which will lead to unlinear distortion in LNA, the original LNA is changed to an LNA whose dynamic range is wide enough to handle the power range of primary users’ signals. Furthermore, due to the low transmit power of the CR-UWB, the AGC that is set for measuring the peer CR users’ signals cannot detect the PUs signals. Hence, the AGC is adjusted according to the number of bits available in the analog-to-digital converter (ADC), so that the CR-UWB receiver can detect a wide variety of PUs power levels.

### Spectrum sensing method

Our objective is to find the minimum value of the sensing window length in order to enhance the spectrum efficiency of the overlapped spectrum, in such a way that the time length for the effective data transmission is maximized. Meanwhile, the value of the sensing window length needs to be large enough for the CR-UWB’s ED to successfully determine the availability of the overlapped spectrum. An ED is implemented by averaging the squared magnitude of the K-point FFT of the received signal over the sensing period *T* which is proportional to the number of received signal samples. Given a fixed point FFT, the increase of the sensing period will improve the estimate of the signal energy[22]. The test statistic for an ED can be given by[23]

T(y)=\frac{1}{N}\sum _{n=1}^{N}{|y(n)|}^{2},

(1)

where *N* denotes the number of received signal samples, and *y*(*n*) = *x*(*n*) + *u*(*n*), *n* ∈ [1,*N*], represents the discrete received signal at the CR user. Furthermore, *u*(*n*) represents the noise and is a Gaussian independent and identically distributed (i.i.d.) random process with mean zero and varianceE[{|u(n)|}^{2}]={\sigma}_{u}^{2}. The PU’s signal *x*(*n*) is an i.i.d. random process with mean zero and varianceE[{|u(n)|}^{2}]={\sigma}_{x}^{2}, and the parameter{\gamma}_{p}={\sigma}_{x}^{2}/{\sigma}_{u}^{2} denotes the received SNR of the PU.

The sensing result is determined by comparing *T*(*y*) with the threshold, as

\left\{\begin{array}{ll}{\mathcal{H}}_{1},& T(y)>\epsilon (N)\\ {\mathcal{H}}_{0},& T(y)<\epsilon (N),\end{array}\right.

(2)

where *ε*(*N*) represents the threshold,{\mathcal{H}}_{1} denotes the hypothesis that the primary user is present, whereas{\mathcal{H}}_{0} shows the hypothesis that the primary user is absent.

In an ED, the PD is the probability of detecting under the hypothesis{\mathcal{H}}_{1} and is determined by the received signal’s SNR, the threshold, and the number of signal samples[24]. Thus,

\begin{array}{ll}\phantom{\rule{6.5pt}{0ex}}{P}_{d}& =P(T(y)>\epsilon (N)|{\mathcal{H}}_{1})\\ =P\left(\frac{T(y)/{\sigma}_{u}^{2}-N-{\gamma}_{p}}{\sqrt{2(2{\gamma}_{p}+N)}}>\frac{\epsilon (N)/{\sigma}_{u}^{2}-N-{\gamma}_{p}}{\sqrt{2(2{\gamma}_{p}+N)}}|{\mathcal{H}}_{1}\right)\\ \approx Q\left(\frac{\epsilon (N)/{\sigma}_{u}^{2}-N-{\gamma}_{p}}{\sqrt{2(2{\gamma}_{p}+N)}}\right).\end{array}

(3)

For PF which denotes the probability of detecting that the licensed user under the hypothesis{\mathcal{H}}_{0}, the expression can be given as[24]

\begin{array}{ll}\phantom{\rule{6.5pt}{0ex}}{P}_{f}& =P(T(y)>\epsilon (N)|{\mathcal{H}}_{0})\\ =P\left(\frac{T(y)/{\sigma}_{u}^{2}-N}{\sqrt{2N}}>\frac{\epsilon (N)/{\sigma}_{u}^{2}-N}{\sqrt{2N}}|{\mathcal{H}}_{0}\right)\\ \approx Q\left(\frac{\epsilon (N)/{\sigma}_{u}^{2}-N}{\sqrt{2N}}\right).\end{array}

(4)

Hence, for a given target *P*_{
d
} and *P*_{
f
}, the minimum *N* is determined by manipulating Equations 3 and 4, as

N\approx \frac{2}{{\gamma}_{p}^{2}}{\left[{Q}^{-1}({P}_{f})-{Q}^{-1}({P}_{d})\right]}^{2}.

(5)

Note that the complexity of ED is proportional to\mathcal{O}(\frac{1}{{\gamma}_{p}^{2}}).

By observing Equation 5, *Q*^{-1}(*P*_{
d
}) and *Q*^{-1}(*P*_{
f
}) are expressed as

{Q}^{-1}({P}_{d})=\frac{\epsilon (N)/{\sigma}_{u}^{2}-N-{\gamma}_{p}}{\sqrt{2(2{\gamma}_{p}+N)}},

(6)

{Q}^{-1}({P}_{f})=\frac{\epsilon (N)/{\sigma}_{u}^{2}-N}{\sqrt{2N}}.

(7)

Thus, *P*_{
d
} and *P*_{
f
} are related to each other by

{P}_{d}=Q\left(\frac{{Q}^{-1}({P}_{f})\sqrt{2N}-{\gamma}_{p}}{\sqrt{2(2{\gamma}_{p}+N)}}\right),

(8)

{P}_{f}=Q\left(\frac{{Q}^{-1}({P}_{d})\sqrt{2(2{\gamma}_{p}+N)}+{\gamma}_{p}}{\sqrt{2N}}\right).

(9)

### Problem formulation

In the work, we model the spectrum sensing window optimization problem as a convex optimization problem. The decision variable is the CR-UWB’s sensing window length, and the main constraints consist of the thresholds of CR-UWB’s PD and PFA. Hence, the problem of optimizing the spectrum sensing window length is expressed as:

\mathbf{P}\mathbf{1}{\tau}_{s}={\text{arg max}}_{{\tau}_{s}}\phantom{\rule{0.3em}{0ex}}\beta S(1-{P}_{f})(1-P({\mathcal{H}}_{1}))

(10)

subject to

{P}_{f}=Q\left(\frac{{Q}^{-1}({P}_{d})\sqrt{2(2{\gamma}_{p}+{\tau}_{s}{f}_{s})}+{\gamma}_{p}}{\sqrt{2{\tau}_{s}{f}_{s}}}\right)\ge \stackrel{\u0304}{{P}_{f}},

where *S* represents the spectral efficiency when the CR-UWB has full access to the overlapped spectrum where no PU is surrounded, *β* denotes the ratio between the CR-UWB’s transmission window length and the fixed duration of the CR-UWB’s access to the overlapped spectrum, as

\beta =\frac{({T}_{\text{op}}-{\tau}_{s})}{{T}_{\text{op}}},

(11)

where *T*_{op} is the pre-defined length of the spectrum access window[12]. The constraint presents the threshold PAF of the CR-UWB’s energy detector. The parameter *τ*_{
s
} represents the sensing window length which is determined by the PU’s SNR, UWB’s sampling frequency, and the target PFA; *P*_{
f
} and\stackrel{\u0304}{{P}_{f}} represents the actual PFA and the target PFA, respectively, *P*_{
d
} represents the real-time PD, andP({\mathcal{H}}_{1}) shows the probability that a PU activates within *T*_{op}.

We assume that the probability that a PU is activated during *T*_{op} follows a Poisson process and is expressed as[25]

P({\mathcal{H}}_{1})=p(x;\lambda t)=\frac{{e}^{-\lambda t}{(\lambda t)}^{x}}{x!},

(12)

where *x* denotes the expected number of occurrences of PU’s activations during the period of *t* which in our system model *t* = *T*_{op}.

The objective function in Equation 10 shows that the spectrum efficiency of the overlapped spectrum is determined by multiplying *S* by the ratio of the CR-UWB’s transmission window length to the total operating window length when the PU is not activated (i.e.,1-P({\mathcal{H}}_{1})), and the CR-UWB’s energy detector successfully determines the absence of the PU within the overlapped spectrum (i.e., 1- *P*_{
f
}).

For the constraints expressed in **P1**, *γ*_{
p
} represents the received PU signals SNR at the CR-UWB receiver, and *f*_{
s
} denotes the UWB’s sampling rate. Furthermore, *Q*(*x*) is the one-dimensional Gaussian Q-function, as[26]

Q(x)={\int}_{x}^{\infty}\frac{1}{\sqrt{2\pi}}\text{exp}\left(-\frac{{y}^{2}}{2}\right)\mathit{\text{dy}},

(13)

For a certain threshold\stackrel{\u0304}{{P}_{f}}, the corresponding threshold sensing window length\stackrel{\u0304}{{\mathit{\text{tau}}}_{s}} can be determined by manipulating Equation 5, as

{\tau}_{s}\ge \frac{2}{{\gamma}_{p}^{2}{f}_{s}}{({Q}^{-1}(\stackrel{\u0304}{{P}_{f}})-{Q}^{-1}(\stackrel{\u0304}{{P}_{d}}))}^{2},

(14)

where\stackrel{\u0304}{{P}_{d}} denotes the target PD which can be calculated through the use of the receiver operating characteristic (ROC) curves[11], and it shows that the value of the CR-UWB’s spectrum sensing window length should not be less than the threshold in order to ensure a successful detection of the availability of the overlapped spectrum. The threshold is determined by the value of\stackrel{\u0304}{{P}_{f}},\stackrel{\u0304}{{P}_{d}}, the received PU signals SNR *γ*_{
p
}, and the CR-UWB system’s sampling rate *f*_{
s
}.

By observing that both *S* andP({\mathcal{H}}_{1}) are independent of *τ*_{
s
}, we can transform the optimization problem shown in **P1** into **P2** which is simpler to tackle as

\begin{array}{l}\mathbf{P}\mathbf{2}{\tau}_{s}={\text{arg max}}_{{\tau}_{s}}\phantom{\rule{0.3em}{0ex}}\beta \left[1-Q\left(\frac{{Q}^{-1}({P}_{d})\sqrt{2(2{\gamma}_{p}+N)}+{\gamma}_{p}}{\sqrt{2N}}\right)\right],\end{array}

(15)

subject to

{P}_{f}=Q\left(\frac{{Q}^{-1}({P}_{d})\sqrt{2(2{\gamma}_{p}+{\tau}_{s}{f}_{s})}+{\gamma}_{p}}{\sqrt{2{\tau}_{s}\phantom{\rule{2.77626pt}{0ex}}{f}_{s}}}\right)\ge \stackrel{\u0304}{{P}_{f}},

where *N* = *τ*_{
s
}*f*_{
s
} represents the number of spectrum sensing samples of CR-UWB’s energy detector,

Figure6 shows the time for spectrum sensing deduces exponentially when the received SNR *γ*_{
p
} increases. At low *γ*_{
p
} (< 15dB), the sensing time length is longer when the target value of *P*_{
f
} is reduced. For example, for the target *P*_{
f
} = 0.10, *P*_{
d
} = 0.90, and *P*_{
f
} = 0.01, *P*_{
d
} = 0.99, the time for spectrum sensing *τ*_{
s
} is 250 and 820 *μ* s (1 *μ* s = 10^{-6}s), respectively. When the value of *γ*_{
p
} increases to a higher level, such as over 12 dB, the sensing time difference between the two target values of *P*_{
f
} becomes minor.

In Figure7, it shows that the value of *α* increases exponentially with the increase of the received SNR *γ*_{
p
}. When *γ*_{
p
} is low (< -17.6 dB) for *P*_{
f
} = 0.01, *P*_{
d
} = 0.99, over 50% of the transmission opportunity is used for spectrum sensing. Thus, the cognitive UWB system can reach a higher spectrum efficiency if the UWB system totally use the TXOP for transmission on the non-overlapped spectrum (i.e., the remaining 64 subcarriers) than performing the spectrum sensing first in order to use the 128 subcarriers for transmission. When the value of *γ*_{
p
} continues to increase, the fraction of time differences for UWB’s data transmission under the two target values of *P*_{
f
} becomes minor.