# Detection of Transmission State of Multiple Wireless Sources: A Statistical Mechanics Approach
## 2 System Model
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Binary** & **Bipolar** & **Transformation** \\ \hline \(s\in\{0,1\}\) & \(s\in\{-1,1\}\) & \(s=2s-1\) \\ \hline \(\mathbf{y}=\mathbf{G}\mathbf{s}+\mathbf{\eta}\) & \(\mathbf{y}=(2\mathbf{G})\mathbf{s}+\mathbf{\eta}\) & \(\mathbf{y}=\mathbf{y}+\mathbf{G}\mathbf{1}\) \\ \hline \(\min\limits_{\mathbf{x}}\,\,\|\mathbf{y}-\mathbf{G}\mathbf{s}\|\) & \(\min\limits_{\mathbf{\hat{s}}}\,\,\|\mathbf{y}-(2\mathbf{G})\mathbf{s}\|\) & \\ s.t. \(\mathbf{s}\in\{0,1\}^{N}\) & s.t. \(\mathbf{\hat{s}}\in\{-1,1\}^{N}\) & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Transformation between bipolar and binary representations. We can also evaluate the distribution of \(\mathrm{G}\) for the connected sites as the normalized area density, such that \(\mathrm{G}=r^{-\gamma}px\exp[\sigma t]>\mathrm{G}_{0}\), which can be shown to be  
\[\mathbb{P}(\mathrm{G}|\mathrm{G}>\mathrm{G}_{0})=\frac{2}{\gamma}\frac{\mathrm{ G}_{0}^{\frac{2}{\gamma}}}{\mathrm{G}^{\frac{2}{\gamma}+1}} \tag{7}\]  
After the introduction of the channel model, we now describe the detection process. Define \(\mathbf{s}=[s_{1},s_{2},\ldots,s_{N}]^{T}\) as a vector of length \(N\), with \(s_{\mathrm{\tau}}=\pm 1\), depending on the operational state of the corresponding source, i.e., whether the source is on or off. We also assume that noise \(\eta_{i}\) is added to the received signal at each secondary user, thus corrupting the signal. The form of the measurement vector at the \(i\)-th SU is then expressed by the following equation  
\[y_{i}=\sum_{v\in\mathcal{N}(i)}\mathrm{G}_{iv}s_{v}+\eta_{i} \tag{8}\]  
where \(\mathcal{N}(i)\) signifies the sources connected with secondary user \(i\), i.e., those for which \(\mathrm{G}_{iv}>0\), and similarly, \(\mathcal{N}(v)\) is defined as the neighborhood of source \(v\). Although the sparsity of the channel matrix \(\mathbf{G}\) is obvious due to finite connectivity, which is a consequence of (4), we also make the assumption that the corresponding graph does not have short loops. Nevertheless, the embedding of the graph on a two-dimensional surface inevitably invalidates this assumption. As will be seen later on, the results obtained justify this assumption in accordance with [39]. The desired state vector of the system, \(\mathbf{s}\), can then be obtained by solving the following least-squares (LS) optimization problem  
\[\mathbf{\hat{s}}=\operatorname*{argmin}_{\mathbf{s}\in\{-1,+1\}^{N}}\|\mathbf{y}-\mathbf{ G}\mathbf{s}\|^{2} \tag{9}\]  
It is interesting to note that if \(\eta_{i}\) is additive white Gaussian noise (AWGN), then the LS detection problem is identical to the maximum a posteriori (MAP) estimate, in which we perform maximization of the log-likelihood  
\[-\log\mathbb{P}(\mathbf{s}|\mathbf{y})=\frac{1}{\sigma^{2}}\|\mathbf{y}-\mathbf{G}\mathbf{s} \|^{2} \tag{10}\]  
For simplicity, in the rest of this paper, we restrict ourselves to this case of noise. As a result, the probability of error can be expressed as a function of the true value \(s_{\mu}^{0}\),  
\[\mathbb{P}_{\text{err}}=\frac{1}{2}\Bigg{(}1-\frac{1}{M}\sum_{\mu=1}^{M} \mathbb{E}\Big{[}s_{\mu}s_{\mu}^{0}\Big{]}\Bigg{)} \tag{11}\]  
where the expectation is over \(\mathbf{y},\mathbf{G}\), and \(\mathbf{\eta}\).