# Wideband Spectrum Sensing Based on Reconfigurable Filter Bank in Cognitive Radio
## 4 Wideband Spectrum-Sensing Based on RFB
### Energy Detection for Sub-Bands  
\(r(n)\) is the input signal at the receiving end. Assume that the channel noise \(w(n)\) is an additive white Gaussian noise with a mean of 0 and a variance of \(\sigma_{n}^{2}=1\), and the PU transmission signal is \(x(n)\), then:  
when there is no PU user: \(\mathrm{r}(n)=w(n)\);  
when there is a PU user: \(\mathrm{r}(n)=x(n)+w(n)\).  
After the input signal \(r(n)\) is processed by the RFB, the \(m\)-th sub-band gets the received signal as \(Y_{m}(l)\). According to the energy detection principle, each sub-band selects the same threshold value \(\lambda\). Comparing the detection statistics \(T_{m}=\frac{1}{L_{l=1}^{L}}\big{|}Y_{m}(l)\big{|}^{2}\) of \(Y_{m}(l)\) with \(\lambda\), if \(T_{m}\) is smaller than \(\lambda\), the sub-band is viewed as idle, represented by \"0\", and if \(T_{m}\) is greater than or equal to \(\lambda\), it is determined that the sub-band is occupied, represented by \"1\", which is represented as:  
\[\left\{\begin{array}{l}H_{0}=0:T_{m}<\lambda\\ H_{1}=1:T_{m}\geq\lambda\end{array}\right. \tag{8}\]  
The energy detection performance of each sub-band is evaluated by the detection probability \(P_{d}^{(m)}\) and the false alarm probability \(P_{f}^{(m)}\), which are defined as follows:  
\[P_{d}^{(m)}=P(T_{m}\geq\lambda|H_{1})=P(H_{1}|H_{1}) \tag{9}\]  
\[P_{f}^{(m)}=P(T_{m}\geq\lambda|H_{0})=P(H_{1}|H_{0}) \tag{10}\]  
which means that \(P_{d}^{(m)}\) indicates the probability of the detection result being occupied when the sub-band is occupied, \(P_{f}^{(m)}\) indicates the probability of the detection result being occupied when the sub-band is idle, and the probability of misdetection is expressed as \(P_{md}^{(m)}=P(H_{0}|H_{1})=1-P(H_{1}|H_{1})=1-P_{d}^{(m)}\), indicating the probability of the detection result being idle when the sub-band is occupied.  
According to the central limit theorem, when \(L\gg 1\), \(T_{m}\) may be approximated as a Gaussian random process, where \(P_{d}^{(m)}\) and \(P_{f}^{(m)}\) are expressed as:  
\[P_{d}^{(m)}=Q\bigg{(}\frac{\lambda-(\sigma_{n}^{2}+\sigma_{x}^{2})}{\sqrt{1/L} (\sigma_{n}^{2}+\sigma_{x}^{2})}\bigg{)} \tag{11}\]  
\[P_{f}^{(m)}=Q\bigg{(}\frac{\lambda-\sigma_{n}^{2}}{\sqrt{1/L}\sigma_{n}^{2}} \bigg{)} \tag{12}\]  
where \(\sigma_{x}^{2}\) is the power of the transmitted signal \(x(n)\), \(Q(x)\) is the tail probability of the standard zero-mean Gaussian random variable, i.e., \(Q(x)=\frac{1}{\sqrt{2n}}\int_{x}^{\infty}\exp(-\frac{t^{2}}{2})dt\).  
When the values of \(\sigma_{n}^{2}\) and \(\sigma_{x}^{2}\) are constant, the selection of the decision threshold \(\lambda\) has effects on \(P_{d}^{(m)}\) and \(P_{f}^{(m)}\). A larger \(\lambda\) would lead to a larger \(P_{d}^{(m)}\), and a larger \(P_{f}^{(m)}\). If \(P_{f}^{(m)}\) is too large, the false alarm may cause the cognitive user to miss many opportunities for spectrum utilization, resulting in lower spectrum utilization. If \(P_{d}^{(m)}\) is too small, a large number of PU signals may be missed, increasing interference to authorized users. Therefore, \(\lambda\) presents the optimization result of maximizing \(P_{d}^{(m)}\) and minimizing \(P_{f}^{(m)}\). Generally, when \(P_{f}^{(m)}\) is given, the threshold \(\lambda\) may be derived from Equation (12) as:  
\[\lambda=\frac{\sigma_{n}^{2}}{\sqrt{L}}Q^{-1}(P_{f}^{(m)})+\sigma_{n}^{2} \tag{13}\]where \(Q^{-1}(x)\) is the inverse function of \(Q(x)\), and because \(L=N/M\), the threshold \(\lambda\) is expressed as:  
\[\lambda=\frac{\sigma_{n}^{2}}{\sqrt{N/M}}Q^{-1}(P_{f}^{(m)})+\sigma_{n}^{2} \tag{14}\]  
Working with the FB, the wideband spectrum detection probability \(P_{d}\) is obtained from the average detection probability of each sub-band, i.e.,  
\[P_{d}=\frac{1}{M}\sum_{m=1}^{M}P_{d}^{(m)} \tag{15}\]