## 5 Energy Detection Process
### Energy Detection with NU and DT Adaptation  
The ED system that jointly encompasses DT adaptation and the estimation of uncertainty in the noise level (NU) is the most realistic from the implementation and simulation perspective. However, it is also the most difficult to implement in practice because it requires the highest processor power in terms of the SU device. This is due to the necessity of the continuous estimation of noise variance (NU) and DT during the sensing process. In this section, the PU signal detection probability and the false alarm probability will be expressed as functions of NU and DT. Hence the limits of NU variation are assumed to be in the interval \(\sigma_{NUDT_{i}}^{2}e^{\left[\frac{\sigma_{n_{i}}^{2}}{\rho},\;\rho\sigma_{n_ {i}}^{2}\right]}\) while the limits of the DT adaptation are assumed to be in the interval \(\lambda_{i}^{NUDT}e^{\left[\frac{\lambda_{i}}{\rho},\;\rho\;\prime\lambda_{i} \right]}\). By taking into account these limiting values, the false alarm probability and the detection probability in the case of NU and ED performed by DT adaptation can be derived based on the central limit theorem, thus becoming [44]:  
\[P_{d_{i}}^{NUDT}=\underset{\lambda_{i}^{NUDT}e^{\left[\frac{\lambda_{i}}{\rho} \right]}}{min}\underset{\rho\wedge_{i}^{NUDT_{i}}e^{\left[\frac{\lambda_{i}}{ \rho}\right]}}{min}Q\left(\frac{\lambda_{i}^{NUDT}-\Big{(}P+\sigma_{NUDT_{i}}^ {2}\Big{)}}{\sqrt{\frac{2}{N^{NNOT}}\Big{(}P+\sigma_{NUDT_{i}}^{2}}\Big{)}} \right)= Q\left(\frac{\frac{\lambda_{i}}{\rho^{\prime}}-\left(P+\frac{\sigma_{n _{i}}^{2}}{\rho}\right)}{\sqrt{\frac{2}{N^{NNOT}}\left(P+\frac{\sigma_{n_{i}} ^{2}}{\rho}\right)}}\right) \tag{22}\]  
\[P_{fa_{i}}^{NUDT}=\underset{\lambda_{i}^{NUDT}e^{\left[\frac{\lambda_{i}}{\rho} \right]}}{max}\underset{\rho\wedge_{i}^{NUDT_{i}}e^{\left[\frac{\lambda_{i}}{ \rho}\right]}}{max}\underset{\rho\wedge_{i}^{NUDT_{i}}e^{\left[\frac{\
u_{n_{i} }^{2}}{\rho}\right]}}{max}Q\left(\frac{\lambda_{i}^{NUDT}-\sigma_{NUDT_{i}}^{2} }{\sqrt{\frac{2}{N^{NNOT}}\sigma_{NUDT_{i}}^{2}}}\right)==Q\left(\frac{\rho^{ \prime}\lambda_{i}-\rho\sigma_{n_{i}}^{2}}{\sqrt{\frac{2}{N^{NNOT}}\rho\sigma_ {n_{i}}^{2}}}\right) \tag{23}\]  
It is possible to define the number of samples needed or sensing duration period as a function of \(P_{d_{i}}^{NUDT}\), \(P_{fa_{i}}^{NUDT}\) and average SNR as [47]:  
\[N^{NUDT}=\frac{2\big{[}\Big{(}\rho/\rho^{\prime}\Big{)}Q^{-1}\Big{(}P_{fa_{i} }^{NUDT}\Big{)}-\rho^{\prime}(1/\rho+SNR)Q^{-1}\Big{(}P_{d_{i}}^{NUDT}\Big{)} \big{]}^{2}}{\big{[}\rho^{\prime}SNR+\rho^{\prime}/\rho\;-\rho/\rho^{\prime} \big{]}^{2}} \tag{24}\]  
The \(N^{NUDT}\) represents the minimum sample quantity needed for the precise detection of PU signal for specified NU factor \(\rho\) and DT factor \(\rho^{\prime}\). It can be observed that the relation (24) does not contain the decision threshold parameter. This means that, for any threshold level, the detection with a higher sample quantity must result in a better probability of ED,and vice versa. According to relations (22) and (23), the detection probability (\(P_{d_{i}}^{NUDT}\)) and the false alarm probability (\(P_{fa_{i}}^{NUDT}\)) are related as [47]:  
\[P_{d_{i}}^{NUDT}=Q\left[\frac{\frac{\rho}{\rho^{\prime}}Q^{-1}\left(P_{fa_{i}}^{ NUDT}\right)-\left(\rho^{\prime}SNR+\frac{\rho^{\prime}}{\rho}-\frac{\rho}{ \rho^{\prime}}\right)\sqrt{\frac{N^{NUDT}}{2}}}{\rho^{\prime}\left(SNR+\frac{1 }{\rho}\right)}\right] \tag{25}\]  
To target the specific PU signal detection probability, relation (25) shows that parameters, such as the average SNR, the probability of a false alarm \(P_{fa_{i}}^{NUDT}\) and the sampling number \(N^{NUDT}\), must be guaranteed for specific factors of DT adaptations (\(\rho^{\prime}\)) and NU variations (\(\rho\)). The influence of NU and DT (as separate factors) on overall ED performance can be simulated based on three cases by selecting appropriate values of \(\rho^{\prime}\) and \(\rho\). For the first case, where \(\rho^{\prime}=1.00\) and \(\rho>1.00\), there is no continuous adaptation of DT.