# Wideband Spectrum Sensing Based on Reconfigurable Filter Bank in Cognitive Radio
## 4 Wideband Spectrum-Sensing Based on RFB
### Selection of RFB Sub-Bands Number  
If the FB sub-bands number \(M\) is too small, the calculation involved would be in a smaller amount. The problem is that there is severe aliasing between the spectrums, leading to a lower spectrum detection resolution. For a larger \(M\), the sub-band bandwidth gets smaller, along with more FFT points as shown in Figure 5. As a result, the spectrum detection performs better to some extent, yet the order \(N\) of the prototype filter is augmented. The computational workload that comes with it would go up dramatically. Therefore, under the condition that the performance requirements of the FB is satisfied, the number of sub-bands of the FB \(M\) is adjusted in real time to meet the occupancy of each sub-band, so as to reduce the calculation amount and improve the detection efficiency and performance. The idle state proportion and occupancy state proportion of the wideband spectrum are \(P_{0}\) and \(P_{1}\), respectively, which are statistically obtained from the occupancy of each sub-band, expressed as:  
\[P_{0}=M_{0}/M \tag{16}\]  
\[P_{1}=M_{1}/M \tag{17}\]  
where \(M_{0}\) is the number of free sub-bands, and \(M_{1}\) is the number of occupied sub-bands, and \(P_{0}+P_{1}=1\). The detected idle state proportion and occupancy state proportion of the wideband spectrum is \(\hat{P}_{0}\) and \(\hat{P}_{1}\) respectively, which are obtained from the detected occupancy of each sub-band, expressed as:  
\[\hat{P}_{0}=\hat{M}_{0}/M=(\hat{M}_{00}+\hat{M}_{01})/M \tag{18}\]  
\[\hat{P}_{1}=\hat{M}_{1}/M=(\hat{M}_{11}+\hat{M}_{10})/M \tag{19}\]  
where \(\hat{M}_{0}\) stands for the number of idle sub-bands detected, \(\hat{M}_{00}\) is for the number of sub-bands when their states are idle and the detected values are also idle, and \(\hat{M}_{01}\) indicates the number of sub-bands when their states are occupied but the detected values are idle. The number of sub-bands is determined by the misdetection probability \(P_{md}^{(m)}\), and \(\hat{M}_{1}\) indicates the detected number of occupied sub-bands, and \(\hat{M}_{11}\) is the number of sub-bands when their states are occupied and the detected values are also occupied, and \(\hat{M}_{10}\) represents the number of sub-bands when their states are idle but the detected values are occupied, which is measured with the false alarm probability \(P_{f}^{(m)}\), and \(\hat{P}_{0}+\hat{P}_{1}=1\). For reconfigurable P-DFTFB, only the number of sub-bands \(M\) is reset. Since the input signal bandwidth is a constant value, the number of sub-bands dominates the resolution of the spectrum detection. Therefore, the spectrum detection result of each sub-band controls the adjustment of the FB division on the sub-band number \(M\), and \(M\) is in a range of 4-256. The pseudo code of the algorithm to select \(M\) is described as follows (Algorithm 1). The initial value of \(M\) is the common value of the FB used to divide sub-bands, that is, \(M=16\). In view of the current spectrum detection result, the adjustment of the \(M\) at the next sensing time is made and divided into three cases: increasing, decreasing or not changing. If the current detection result is \(\hat{P}_{0}\geq 2/3\), according to Equation (18), it shows that the value of \(\hat{M}_{01}\) may be large, and it is necessary to reduce \(P_{md}^{(m)}\). From Equation (14), when the value of \(M\) is added, the value of \(\lambda\) becomes larger, leading to a larger value of \(P_{d}^{(m)}\) and a smaller \(\hat{M}_{01}\). Therefore, the value of \(M\) is increased to two times in the next sensing time, and the current sensing ends. If the change of two detections with two adjacent \(M\) is less than \(5\%\), that is \(\left|P_{d}^{(m)}-P_{d}^{(m)}\right|\leq 5\%\), the \(M\) would not be changed in the next sensing time, for the detection performance is not much better even with an added value of \(M\). If the current detection result is \(\hat{P}_{1}\geq 2/3\), Equation (19) shows that the value of \(\hat{M}_{10}\) may be larger, and \(P_{f}^{(m)}\) needs to be reduced.