# 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  
In consideration of the unreliable characteristic of the reporting channels, let us determine its effect on the reliability of the local decision made by the FC. Let \(v_{i}\) denote the decoded version of \(z_{i}\) for the \(i\)-th SVU at the FC, the decoded rule can be expressed as  
\[v_{i}=\left\{ \begin{array}{l l}1&if\quad z_{i}\geq 0\\ 0&if\quad z_{i}<0\end{array} \right.. \tag{19}\]  
And, more remarkable, under the hypothesis \(\mathcal{H}_{j}\left(j=0,1\right)\)  
\[ \begin{array}{l l}\mathrm{E}[v_{i}\left|\mathcal{H}_{j}\right.]&=P(v_{i}=1 \left|\mathcal{H}_{j}\right.)\times 1+P(v_{i}=0\left|\mathcal{H}_{j}\right.) \times 0\\ &=P(z_{i}\geq 0\left|\mathcal{H}_{j}\right.),\end{array}  \tag{20}\]  
\[ \begin{array}{l l}\mathrm{D}[v_{i}\left|\mathcal{H}_{j}\right.]&=\mathrm{E} [v_{i}^{2}\left|\mathcal{H}_{j}\right.]-\mathrm{E}[v_{i}\left|\mathcal{H}_{j} \right.]^{2}\\ &=P(z_{i}\geq 0\left|\mathcal{H}_{j}\right.)-\big{(}P(z_{i}\geq 0\left| \mathcal{H}_{j}\right.)\big{)}^{2},\end{array}  \tag{21}\]  
where \(\mathrm{E}[x]\), \(\mathrm{D}[x]\) denotes the expectation and variance operator with respect to \(x\), respectively. As can be seen from (20) and (21), the expectation and variance of the received decision \(v_{i}\) are directly dependent on the probability \(P(z_{i}\geq 0\left|\mathcal{H}_{j}\right. )\), which can also be referred to the equivalent probabilities of false-alarm and misdetection of local sensing. For notational convenience, let us denote these probabilities as \(P_{Fi}\) and \(P_{Di}\) under both hypotheses. In order to capture the statistical properties of \(v_{i}\), we first need to obtain the probabilities \(P_{Fi}=f(z_{i}\geq 0|\mathcal{H}_{0})\) and \(P_{Di}=f(z_{i}\geq 0|\mathcal{H}_{1})\). Clearly, under the hypothesis \(\mathcal{H}_{0}\left(\mathcal{H}_{1}\right)\), \(u_{i}\) obeys the following distribution with the parameter of \(P_{fi}\left(P_{di}\right)\). \[P(u_{i}\left|\mathcal{H}_{0}\right. )=\left\{ \begin{array}{l l}P_{fi}&u_{i}=+ 1\\ 1-P_{fi}&u_{i}=-1\end{array} \right.,\]  
\[P(u_{i}\left|\mathcal{H}_{1}\right. )=\left\{ \begin{array}{l l}P_{di}&u_{i}=+ 1\\ 1-P_{di}&u_{i}=-1\end{array} \right..\]Then, under hypotheses \(\mathcal{H}_{0}\) and \(\mathcal{H}_{1}\), the equivalent probability of false alarm and misdetection can be written as:  
\[ \begin{array}{rl}P_{Fi}=f(z_{i}\geq 0\,|\,\mathcal{H}_{0}\,)&=\sum\limits_{u_{i} \in\{+1,-1\}}f(z_{i}\geq 0\,|\,u_{i})P(u_{i}\,|\,\mathcal{H}_{0}\,)\\ &=f(z_{i}\geq 0\,|u_{i}=+1)P_{fi}+f(z_{i}\geq 0\,|\,u_{i}=-1)(1-P_{fi}),\\ \\ P_{Di}=f(z_{i}\geq 0\,|\,\mathcal{H}_{1}\,)&=\sum\limits_{u_{i}\in\{+1,-1\}}f(z_{i} \geq 0\,|\,u_{i})P(u_{i}\,|\,\mathcal{H}_{1}\,)\\ &=f(z_{i}\geq 0\,|\,u_{i}=+1)P_{di}+f(z_{i}\geq 0\,|\,u_{i}=-1)(1-P_{di}).\end{array}  \tag{22}\]  
Without loss of generality, suppose that the reporting channels between SVUs and FC is also Rayleigh fading channel draw from CSCG distribution \(\mathcal{CN}(0,2)\). In other words, the PDF of the channel gain \(g_{i}\) can be represented as  
\[f(g_{i})=\left\{ \begin{array}{rl}g_{i}\exp\left(-\frac{g_{i}^{2}}{2}\right) &g_{i}\geq 0\\ 0&g_{i}<0\end{array} \right.. \tag{24}\]  
On the basis of the fact that \(y_{i}=g_{i}u_{i}\), \(z_{i}=y_{i}+w_{i}\) and \(w_{i}\) is a Gaussian random variable with mean zero and variance \(\delta_{i}^{2}\), we can easily get  
\[f(z_{i}\,|\,y_{i})=\frac{1}{\sqrt{2\pi}\delta_{i}}\exp\left(-\frac{\left(z_{i} -y_{i}\right)^{2}}{2\delta_{i}^{2}}\right), \tag{25}\]  
\[f(y_{i}\,|\,u_{i})=u_{i}y_{i}\exp\left(-\frac{y_{i}^{2}}{2}\right)\mathrm{I}(u _{i}y_{i}), \tag{26}\]  
where \(\mathrm{I}(\cdot)\) denotes the indicator function given by  
\[\mathrm{I}(t)=\left\{ \begin{array}{l l}1&if\quad t\geq 0\\ 0&if\quad t<0\end{array} \right..\]  
Further still, according to this fact that \(f(z_{i}\,|\,y_{i},u_{i})=f(z_{i}\,|\,y_{i})\), which stemmed from the fact that \((g_{i},u_{i})\to y_{i}\to z_{i}\) is a Markov chain, we can safely come to the following result  
\[