# Double-Threshold Cooperative Spectrum Sensing Algorithm Based on Sevcik Fractal Dimension
## 2 Double-Threshold Cooperative Spectrum Sensing Algorithm Based on Sevcik Fractal Dimension
### System Model of the Proposed Algorithm  
Local spectrum sensing on the basis of SFD can be formulated as the following binary hypothesis problem:  
\[y(n)= \begin{cases}\omega(n)&H_{0}(n=0,1,\ldots,N-1)\\ s(n)+\omega(n)&H_{1}(n=0,1,\ldots,N-1)\end{cases}  \tag{20}\]  
where \(\omega(n)\) is the independently and identically distributed AWGN with mean 0 and variance \(\omega^{2}\). \(y(n)\) is the received signal of the cognitive user. Hypothesis \(H_{0}\) and \(H_{1}\) represent the absence and presence of the PU, respectively. Primary signal \(s(n)\) can either be a deterministic signal (accounting for AWGN channel) or a stochastic signal (corresponding to channel characteristics like fading) with mean \(\mu\) and variance \(\sigma_{\mathrm{s}}{}^{2}\). \(s(n)\) and \(\omega(n)\) are mutually independent. \(y(n)\) follows the following distribution:  
\[y(n)\sim \begin{cases}N(0,\sigma_{0}{}^{2})&H_{0}\\ N(\omega,\sigma_{\mathrm{s}}{}^{2}+\sigma_{0}{}^{2})&H_{1}\end{cases}  \tag{21}\]  
The SFD of the signal fluctuates little with the SNR, and it can be distinguished from the SFD of Gaussian white noise. Therefore, SFD can be used to distinguish the signal and noise. The block diagram of spectrum sensing system based on SFD in the frequency domain is shown in Figure 3. Firstly, the received primary user signal is transformed into the frequency domain by DFT, and then SFD is calculated. In the following, we illustrate the spectrum sensing scheme based on SFD in detail. Firstly, applying DFT to (20), we have the frequency domain form of the received signal:  
\[y(k)= \begin{cases}W(k)&H_{0}(k=0,1,\ldots,N-1)\\ S(k)+W(k)&H_{1}(k=0,1,\ldots,N-1)\end{cases}  \tag{22}\]  
\(Y(k)\), \(W(k)\), and \(S(k)\) respectively represent the complex spectrum of \(y(n)\), \(\omega(n)\), and \(s(n)\). We perform normalization to \(Y(k)\). \[Y_{k}^{*}=\frac{Y_{k}-Y_{\mathrm{min}}}{Y_{\mathrm{max}}-Y_{\mathrm{min}}} \tag{23}\]  
Since \(Y(k)\) is the DFT transform of \(y(n)\), we set \(Y_{\mathrm{min}}=0\). Equation (23) can be simplified into:  
\[Y_{k}^{*}=\frac{Y_{k}}{Y_{\mathrm{max}}} \tag{24}\]  
Calculate the SFD of the signal by using (6), and judge whether the PU exists or not through (25). \[ \begin{cases}D>\lambda,\;H_{0}\\ D\leq\lambda,\;H_{1}\end{cases}  \tag{25}\]  
Equation (25) is the local spectrum sensing decision expression based on SFD. If the SFD of the received signal calculated by the SU is less at than the decision threshold \(\lambda\), the judgment that is the PU exists; otherwise, the judgment is that the PU does not exist. Figure 3: The block diagram of spectrum sensing system based on Sevcik fractal dimension (SFD) in the frequency domain. DFT: discrete Fourier transform. As mentioned earlier, we can select a typical noise SFD value as the decision threshold \(\lambda\). However, the noise SFD randomly changes in a certain range, leading to better detection performance at high SNR and poor performance when the SNR is low or noise is uncertain. Therefore, the drawback would be revealed if we use the single threshold method shown in (25): when the SFD of the signal falls within the fluctuation range of the noise SFD, the signal and noise would be easily confused, leading to the inaccurate judgement of the PU's presence, and thus increasing the false alarm probability or even misjudgment. The single threshold cannot meet the requirement of detection precision due to channel environment change and noise uncertainty in practical application. Therefore, based on the existing double-threshold spectrum sensing theory, we propose a double-threshold CSS strategy based on SFD. Figure 4 shows the double-threshold decision. We select the maximum and minimum values of the noise SFD as the two thresholds, where \(\lambda_{1}=\min\{D\}\), \(\lambda_{2}=\max\{D\}\), and \(\lambda_{1}<\lambda_{2}\).