## 3 Traditional Energy Detection Algorithm and Principle  
Energy detection is the most classic and basic algorithm in spectrum-sensing technology. The type of signal is not limited, and the application range is wide. Its core is to judge the state of the main user by calculating the energy value of the signal. Energy detection can be realized in two ways:  
1. The sampled value of the time-domain signal is modulated, and the sum of the modulus squared of all sampling points is calculated. 2. FFT conversion is performed on the frequency-domain signal, and the sum of the squares of the moduli of all sampling points is calculated. \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Implication** \\ \hline y & The energy value of the signal \\ \hline x(t) & Input signal \\ \hline n(t) & Noise signal \\ \hline \(\sigma_{\text{n}}\) & The variance of the noisy signal \\ \hline \(\sigma_{\text{x}}\) & The average power of the signal \\ \hline \(\Delta t\) & Doppler shift \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The main notation that has been used in the paper. Figure 2: Intrinsic path model schematic. Figure 3 shows the flow chart of energy detection. The signal is first passed through a filter to filter out unnecessary frequency bands and is then sampled. The amplitude \(|\mathrm{x(t)}|\) is then calculated for each sample point, and the sum of the modulus squares y of all samples is compared to a threshold value to determine if the band is idle. The calculation method of the signal energy value is as follows:  
\[\mathrm{y}=\frac{1}{N}\sum_{n=1}^{N}\left|\mathrm{x(n)}\right|^{2} \tag{2}\]  
N is the number of sampling points, and y is the energy value of the signal. The binary hypothesis model is used to represent its detection process, as follows:  
\[\mathrm{Y(t)}=\left\{ \begin{array}{ll}\mathrm{x(t)+n(t)}&\mathrm{H_{1}}\\ \mathrm{n(t)}&\mathrm{H_{0}}\end{array} \right. \tag{3}\]  
H\({}_{0}\) indicates that the frequency band is idle, H\({}_{1}\) indicates that the frequency band is occupied, and n(t) stands for noise signal. When the number of sampling points N is large enough, y follows the Gaussian distribution. \[\left\{ \begin{array}{ll}\mathrm{y}\ \sim\mathrm{Normal(N\sigma_{n}^{2},2N \sigma_{n}^{4})}&\mathrm{H_{0}}\\ \mathrm{y}\ \sim\mathrm{Normal(N\big{(}\sigma_{n}^{2}+\sigma_{\mathrm{x}}^{2} \big{)},2N\big{(}(\sigma_{n}^{2}+\sigma_{\mathrm{x}}^{2})^{2}\big{)}}&\mathrm{ H_{1}}\end{array} \right. \tag{4}\]  
\(\sigma_{n}^{2}\) represents the variance of the noisy signal, and \(\sigma_{\mathrm{x}}^{2}\) represents the average power of the signal. The main indicators used to measure perception performance are as follows: (1) False alarm probability: When the frequency band is occupied, the detection result is idle. (2) Missed detection probability: When the frequency band is idle, the detection result is occupied. (3) Detection probability: The detection result is the same as the actual frequency band occupancy. The calculation method is as follows:  
\[\mathrm{P_{f}^{\rho}=P(y>\ \rho|H_{0})=Q(\frac{\rho-N\sigma_{n}^{2}}{\sqrt{2N \sigma_{n}^{2}}})} \tag{5}\]  
\[\mathrm{P_{m}^{\rho}=P(y<\ \rho|H_{1})=Q(\frac{N\big{(}\sigma_{n}^{2}+\sigma_{ \mathrm{x}}^{2}\big{)}-\rho}{\sqrt{2N(\sigma_{n}^{2}+\sigma_{\mathrm{x}}^{2}) ^{2}}})} \tag{6}\]  
\[\mathrm{P_{d}^{\rho}=P(y>\ \rho|H_{1})=Q(\frac{\rho-N\big{(}\sigma_{n}^{2}+ \sigma_{\mathrm{x}}^{2}\big{)}}{\sqrt{2N(\sigma_{n}^{2}+\sigma_{\mathrm{x}}^{ 2})^{2}}})} \tag{7}\]  
Figure 3: Flow chart of energy detection. where \(\rho\) is the threshold value, and \(Q(x)=\int_{x}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}t^{2}}dt\) is the right-tail function of the standard normal distribution. Figure 4 shows the energy detection diagram of a single threshold. If the energy value of the signal is greater than \(\rho\), it is in the H\({}_{1}\) state, and the frequency band is occupied. If it is less than \(\rho\), it is in the H\({}_{1}\) state, and the channel is not occupied.