# Hard Fusion Based Spectrum Sensing over Mobile Fading Channels in Cognitive Vehicular Networks
## 3 Local Sensing with Energy Detection
It is worthwhile mentioning that, \(P_{fi}\) in (8) is independent of received SNR because \(P_{fi}\) is considered for the hypothesis of no PU signal transmission. On the other hand, \(P_{mi}\) in (10) is a conditional probability depending on instantaneous received SNR \(\eta_{i}\). In this circumstance, the average \(P_{m}\) can be calculated by integrating the conditional \(P_{mi}\) in the AWGN case over the SNR fading distribution [24]. From (8) and (10), we also see that, \(\lambda\) can be analytically set to maintain the desired \(P_{f}\) if \(P_{f}\) is designated as the constraint of the detection problem. Then, we can obtain \(P_{mi}\) related to the desired \(P_{f}\) as follows:  
\[P_{mi}(\eta_{i})=\mathcal{Q}\left(\frac{\eta_{i}-\sqrt{L}\mathcal{Q}^{-1}(P_{f} )}{\sqrt{L+2\eta_{i}}}\right), \tag{11}\]  
where \(\mathcal{Q}^{-1}(x)\) stands for the inverse of the Gaussian \(\mathcal{Q}\)-function. In the following, let us begin by considering the case of \(\mathcal{M}_{1}\) where the channel gain \(h_{i}(k)\) is time-invariant during the sensing interval, i.e., \(h_{i}(k)=h_{i}\) for \(k=1,2,\cdots,L\). Then, \(\eta_{i}\) in (7) can be rewritten as  
\[\eta_{i}=\left|h_{i}\right|^{2}\frac{E_{s}}{\sigma_{n}^{2}}=\left|h_{i}\right| ^{2}\eta_{s}. \tag{12}\]  
Under Rayleigh fading, the received instantaneous SNR \(\eta_{i}\) can be viewed as exponentially distributed  
\[f_{\eta_{i}}(\eta_{i})=\frac{1}{\eta_{s}}e^{-\eta_{i}/\eta_{s}}. \tag{13}\]  
Under the assumptions of \(\mathrm{E}[|h_{i}|^{2}]=1\), for the convenience of computing, we can make the following approximation for Equation (11) as  
\[P_{mi}(\eta_{i})\approx\mathcal{Q}\left(\frac{\eta_{i}-\sqrt{L}\mathcal{Q}^{- 1}(P_{f})}{\sqrt{L+2\eta_{s}}}\right). \tag{14}\]  
For brevity of the presentation, in the following sections we will define  
\[A=\frac{1}{\sqrt{L+2\eta_{s}}},B=\frac{\sqrt{L}\mathcal{Q}^{-1}(P_{f})}{\sqrt{ L+2\eta_{s}}},\]  
then  
\[P_{mi}(\eta_{i})\approx\mathcal{Q}\left(A\eta_{i}-B\right). \tag{15}\]  
The average \(P_{m}\) in the case of \(\mathcal{M}_{1}\), \(\overline{P}_{m}\), can be evaluated by averaging (15) over (13) with the change of variable \(x=A\eta-B\). Consequently, this yields  
\[ \begin{split}\overline{P}_{m}&=\int_{0}^{\infty}P_ {m}(\eta_{i})f_{\eta_{i}}(\eta_{i})d\eta_{i}\\ &\approx\frac{1}{\eta_{s}}\int_{0}^{\infty}\mathcal{Q}\left(A \eta_{i}-B\right)e^{-\eta_{i}/\eta_{s}}d\eta_{i}\\ &=\frac{1}{A\eta_{s}}\int_{-B}^{\infty}\mathcal{Q}\left(x\right) e^{-\frac{x+B}{A\eta_{s}}}dx.\end{split}  \tag{16}\]  
With the aid of the integrating properties of \(\mathcal{Q}\)-function [27], and after some mathematical manipulations, we can deduce the approximate closed-form expression for \(\overline{P}_{m}\),  
\[\overline{P}_{m}\approx\mathcal{Q}(-B)-e^{-\frac{B}{A\eta_{s}}}e^{\frac{1}{2A \eta_{s}^{2}}}\mathcal{Q}\left(\frac{1}{A\eta_{s}}-B\right). \tag{17}\]  
In the case of \(\mathcal{M}_{2}\), in order to obtain the analytic expression for \(\overline{P}_{m}\) based on using the PDF approach, it is desirable to obtain the PDF of \(\eta_{i}\) given in (7). However, to the best of our knowledge, there is no analytic expression available for such a distribution. Therefore, it makes things computationally very difficult to find an analytic expression for \(\overline{P}_{m}\) with the existence of time correlation. Instead of deriving an analytic expression for \(\overline{P}_{m}\), we estimate \(\overline{P}_{m}\) by means of Monte Carlo simulations. In the case of \(\mathcal{M}_{3}\), the sampling observations of the fading channel \(\{h_{i}(k)\}\) are completely independent of each other. \(h_{i}(k)\) can be modeled as a complex Gaussian random variable with mean zero and variance \(\sigma_{h}^{2}=1\), i.e., \(h_{i}(k)\sim\mathcal{CN}(0,\sigma_{h}^{2})\). Thus, \(\eta_{i}\) given by (7) can be reduced to the following equation  
\[\eta_{i} =\frac{\sigma_{h}^{2}E_{s}}{\sigma_{n}^{2}}=\sigma_{h}^{2}\eta_{s}. \tag{18}\]  
It is plain to see that \(\eta_{i}\) is independent of instantaneous fading statistics.