# Hard Fusion Based Spectrum Sensing over Mobile Fading Channels in Cognitive Vehicular Networks
## 4 Cooperative Sensing with Counting Rule
### Equivalent Local Probability of False Alarm and Misdetection
\begin{array}{rl}f(z_{i}\,|\,u_{i})&=\frac{f(z_{i}\,u_{i})}{p(u_{i})}=\frac {\int f(z_{i}\,|\,y_{i}\,|\,u_{i})f(y_{i}\,|\,u_{i})p(u_{i})dy_{i}}{p(u_{i})} \\ &=\int f(z_{i}\,|\,y_{i})f(y_{i}\,|\,u_{i})dy_{i}.\end{array}  \tag{27}\]  
Then, substituting (25) and (26) into (27), we can obtain the conditional PDF of the received observation \(z_{i}\), given the local decision \(u_{i}=+1\), as  
\[ \begin{array}{rl}f(z_{i}\,|\,u_{i}=+1)&=\int_{0}^{\infty}\frac{1}{\sqrt{2 \pi}\delta_{i}}\exp\left(-\frac{(z_{i}-y_{i})^{2}}{2\delta_{i}^{2}}\right)y_{i }\exp\left(-\frac{y_{i}^{2}}{2}\right)dy_{i}\\ &=\frac{1}{\sqrt{2\pi}\delta_{i}}\exp\left(-\frac{z_{i}^{2}}{2(1+\delta_{i}^{ 2})}\right)\int_{0}^{\infty}y_{i}\exp\left(-\frac{(y_{i}-\frac{z_{i}}{1+\delta _{i}^{2}})^{2}}{\frac{2\delta_{i}^{2}}{1+\delta_{i}^{2}}}\right)dy_{i}.\end{array}  \tag{28}\]  
More specifically, performing a change of variable \(t=y_{i}-\frac{z_{i}}{1+\delta_{i}^{2}}\) and making the best of the integral properties of \(\mathcal{Q}\)-function, we can obtain  
\[f(z_{i}\,|\,u_{i}=+1)=\frac{C^{2}\delta_{i}^{3}}{\sqrt{2\pi}}\exp\left(-\frac{ z_{i}^{2}}{2\delta_{i}^{2}}\right)\left[1+\sqrt{2\pi}Cz_{i}\exp\left(\frac{C^{2} z_{i}^{2}}{2}\right)\mathcal{Q}\left(-Cz_{i}\right)\right], \tag{29}\]where \(C=\frac{1}{\delta_{i}\sqrt{1+\delta_{i}^{2}}}\), \(Q\left(-x\right)=1-Q\left(x\right)\). Integrating both sides of (29) with respect to \(z_{i}\), we can obtain  
\[ \begin{array}{l}P(z_{i}\geq 0\left|u_{i}=+1\right.)=\int_{0}^{\infty}f(z_{i} \left|u_{i}=+1\right.)dz_{i}\\ =\frac{C^{2}\delta_{i}^{2}}{\sqrt{2\pi}}\int_{0}^{\infty}\left[\exp\left(- \frac{z_{i}^{2}}{2\delta_{i}^{2}}\right)+\frac{\sqrt{2\pi}}{\delta_{i}\sqrt{1+ \delta_{i}^{2}}}z_{i}\exp\left(-\frac{z_{i}^{2}}{2(1+\delta_{i}^{2})}\right) \mathcal{Q}\left(-\frac{z_{i}}{\delta_{i}\sqrt{1+\delta_{i}^{2}}}\right) \right]dz_{i}\\ =\frac{\delta_{i}}{\sqrt{2\pi}(1+\delta_{i}^{2})}\left[\frac{\sqrt{2\pi}\delta _{i}}{2}+\frac{\sqrt{2\pi}\sqrt{1+\delta_{i}^{2}}}{2\delta_{i}}+\frac{\sqrt{2 \pi}}{2\delta_{i}}\right]\\ =\frac{1}{2}+\frac{1}{2\sqrt{1+\delta_{i}^{2}}}=\frac{1}{2}\left(1+\sqrt{ \frac{\gamma_{i}}{2+\gamma_{i}}}\right),\end{array}  \tag{30}\]  
where \(\gamma_{i}\) denotes the SNR of the Rayleigh fading reporting channel. A similar analysis can be conducted for the case of \(u_{i}=-1\), we have  
\[f(z_{i}\left|u_{i}=-1\right.)=\frac{C^{2}\delta_{i}^{3}}{\sqrt{2\pi}}\exp\left( -\frac{z_{i}^{2}}{2\delta_{i}^{2}}\right)\left[1-\sqrt{2\pi}Cz_{i}\exp\left( \frac{C^{2}z_{i}^{2}}{2}\right)\mathcal{Q}\left(Cz_{i}\right)\right], \tag{31}\]  
\[P(z_{i}\geq 0\left|u_{i}=-1\right.)=\int_{0}^{\infty}f(z_{i}\left|u_{i}=-1 \right.)dz_{i}=\frac{1}{2}\left(1-\sqrt{\frac{\gamma_{i}}{2+\gamma_{i}}}\right). \tag{32}\]  
By substituting (30) and (32) in (22) and (23), and after some calculations, we can obtain the equivalent local probability of false alarm, detection and miss detection as  
\[P_{Fi}=P(z_{i}\geq 0\left|\mathcal{H}_{0}\right.)=\frac{1}{2}+\left(P_{ fi}-\frac{1}{2}\right)\sqrt{\frac{\gamma_{i}}{2+\gamma_{i}}}, \tag{33}\]  
\[P_{Di}=P(z_{i}\geq 0\left|\mathcal{H}_{1}\right.)=\frac{1}{2}+\left(P_{di}- \frac{1}{2}\right)\sqrt{\frac{\gamma_{i}}{2+\gamma_{i}}}, \tag{34}\]  
and  
\[P_{Mi}=1-P_{Di}=\frac{1}{2}+\left(P_{mi}-\frac{1}{2}\right)\sqrt{\frac{\gamma_ {i}}{2+\gamma_{i}}}. \tag{35}\]  
From (33) and (34), we can see that, if \(P_{di}>\frac{1}{2}\), then \(P_{Di}\;<\;P_{di}\). Only when \(P_{di}<\frac{1}{2}\), then \(P_{Di}\;>\;P_{di}\). In other words, the equivalent local probability of detection at the FC is high above the local probability of detection at each SVU. In the same manner, when \(P_{fi}>\frac{1}{2}\), \(P_{Fi}<P_{fi}\). Only when \(P_{fi}<\frac{1}{2}\), the channel error \"increases\" \(P_{Fi}\) to be higher than \(P_{fi}\). Without doubt, this is achieved with an accompanied rise in the probability of detection.