# Detection of Transmission State of Multiple Wireless Sources: A Statistical Mechanics Approach
## 2 System Model  
Let us consider a network comprising primary wireless source nodes and SUs, which are randomly placed in a certain region of area \(\mathcal{A}\), with the corresponding node densities denoted by \(n_{s}\) and \(n_{t}\), respectively. The channel power gain at the location of the \(i\)-th SU due to the \(v\)-th source is denoted by \(\mathrm{H}_{iv}\). Each source \(\
u\) in the network is assumed to be in one of two states: idle, in which case its transmitting power \(\pi_{\
u}\) is zero, or active, with its transmitting power \(\pi_{\
u}>0\). For simplicity, we assume that \(\pi_{\
u}\) is the same for all sources. Both \(\mathrm{H}_{iv}\) and \(\pi_{\
u}\) are assumed to be known to the SUs through a REM entity. The received power at SU \(i\) is denoted by \(\mathrm{P}_{i}\), which is a linear combination of the transmitted powers of all the primary sources in its neighborhood and can be expressed as  
\[\mathrm{P}_{i}=\sum_{\
u=1}^{N}\mathrm{H}_{iv}\pi_{\
u}\bigg{(}\frac{1-s_{\
u} }{2}\bigg{)} \tag{1}\]where \(s_{\
u}\in\{-1,+1\}\) is a random variable that describes the emitting state of the \(\
u\)-th primary source. It is convenient to define a shifted version of \(\mathrm{P}_{i}\) as  
\[y_{i}=\mathrm{P}_{i}-\frac{1}{2}\sum_{\
u=1}^{N}\mathrm{H}_{i\
u}\pi_{\
u}\equiv \sum_{\
u=1}^{N}\mathrm{G}_{i\
u}s_{\
u} \tag{2}\]  
where \(\mathrm{G}_{i\
u}=\frac{\mathrm{H}_{i\
u}\pi_{\
u}}{2}\). To model the effects of path loss and fading, we express \(\mathrm{G}_{i\
u}\) as [35]  
\[\mathrm{G}_{i\
u}=\frac{p\,x_{i\
u}z_{i\
u}}{d_{i\
u}^{\gamma}} \tag{3}\]  
where \(p=\frac{\mathrm{P}_{\mathrm{eff}}\,\pi_{\
u}}{2}\), \(\mathrm{P}_{\mathrm{ref}}\) is the reference power (in dBm) at a reference distance from the source node [36], \(z_{i\
u}\) is the shadow fading coefficient, \(x_{i\
u}\) is the fast fading component, \(d_{i\
u}\) is the Euclidean distance between the source \(\
u\) and the \(i\)-th SU, and \(\gamma\) is the path loss exponent. The above-mentioned simple transformation, from \(\pi_{\
u}\to s_{\
u}\), is widely used in various problems connected with statistical mechanics [37] and can be seen in Table 2.  
For simplicity, we assume, as in [38], a simple thresholding approach, where an SU detects a source if  
\[\mathrm{G}_{i\
u}\geq\mathrm{G}_{0} \tag{4}\]  
where \(\mathrm{G}_{0}\) depends on the sensitivity of an SU's receiver and its minimum received energy. We then assume that all \(\mathrm{G}_{i\
u}\) that do not satisfy this inequality vanish. We then neglect all other interferences since they are weak. Thus, we can calculate the distribution of the number of SUs connected to a source and, correspondingly, the distribution of the number of sources connected to a single SU. Starting with the former case, we first note that due to the independence of the positions of the SUs, the probability \(\mathbb{P}_{k}\) of \(k\) SUs connected to a given source follows the Poisson distribution, i.e.,  
\[\mathbb{P}_{k}=\frac{R^{k}}{k!}\exp[-R] \tag{5}\]  
where \(R=n_{s}\mathcal{A}_{\mathrm{eff}}\), and \(\mathcal{A}_{\mathrm{eff}}\) is the effective area where the SU is connected to a source in the presence of fading and shadowing, i.e., when \(\mathrm{G}>\mathrm{G}_{0}\), which is given by  
\[\mathcal{A}_{\mathrm{eff}} =\int\limits_{0}^{+\infty}\mathrm{d}r\,2\pi r\int\limits_{- \infty}^{+\infty}\frac{\mathrm{d}t}{\sqrt{2\pi}}\exp\left[-\frac{t^{2}}{2} \right]\times\int\limits_{0}^{+\infty}\mathrm{d}x\,\exp[-x]\,\Theta\left(\frac {p\,x\exp[\sigma t]}{r\gamma}-\mathrm{G}_{0}\right)\] \[=\pi\left(\frac{p}{\mathrm{G}_{0}}\right)^{\frac{2}{\gamma}}\Gamma \left(\frac{2}{\gamma}+1\right)\exp\left[\left(\frac{2}{\gamma}-1\right) \frac{\sigma^{2}}{\gamma}\right] \tag{6}\]  
where \(\Gamma(\cdot)\) is the Euler \(\Gamma\)-function and \(\Theta(\cdot)\) is the step function. Similarly, the number of sources connected to a given SU follows the Poisson distribution, with the parameter \(T=n_{t}\mathcal{A}_{\mathrm{eff}}\).