# Message Passing Detectors for UAV-Based Uplink Grant-Free NOMA Systems
## 2 System Model and Factor Graph
### Probabilistic Formulation  
From (2), the hidden variable \(\mathbf{Z}\triangleq\mathbf{H}\mathbf{B}\in\mathbb{C}^{N\times J}\) is defined, where \(\mathbf{z}_{j}=\mathbf{H}\mathbf{b}_{j},\forall j\in J\). Then, the detector transfer function can be written as  
\[p(\mathbf{Y}|\mathbf{B})=p(\mathbf{Y}|\mathbf{Z})p(\mathbf{Z}|\mathbf{B})=\prod_{j=1}^{J}p(\mathbf{y}_{j}| \mathbf{z}_{j})p(\mathbf{z}_{j}|\mathbf{b}_{j}). \tag{3}\]  
The conditional PDF \(p(\mathbf{y}_{j}|\mathbf{z}_{j})\) can be further factorized as  
\[p(\mathbf{y}_{j}|\mathbf{z}_{j})=\prod_{n=1}^{N}\underbrace{p(y_{n,j}|z_{n,j})}_{f_{Y, n,j}}=\prod_{n=1}^{N}\mathcal{CN}(y_{n,j};z_{n,j},\lambda^{-1}). \tag{4}\]  
The hard constraint factors provided by \(p(\mathbf{z}_{j}|\mathbf{b}_{j})\) can be concretely represented as  
\[p(\mathbf{z}_{j}|\mathbf{b}_{j})=\prod_{n=1}^{N}\underbrace{p(z_{n,j}|\mathbf{b}_{j})}_{f_{ Z,n,j}}=\prod_{n=1}^{N}\delta\Big{(}z_{n,j}-\sum_{k=1}^{K}h_{n,k}b_{k,j}\Big{)}, \tag{5}\]  
where \(h_{n,k}\) denotes the element in the \(n\)-th row and \(k\)-th column of \(\mathbf{H}\).  
For the channel prior model, the BG-MC probability model [18] is utilized, which can exploit both the block sparse structure and the slow change of the UE AS feature simultaneously. Each element \(b_{k,j}\) has a conditionally independent distribution given by  
\[\begin{split} p(\mathbf{B}|\mathbf{S},\mathbf{V})&=\prod_{k=1}^ {K}\prod_{j=1}^{J}\underbrace{p(b_{j,k}\,|\,s_{k,j},\
u_{k,j})}_{f_{B,k,j}}\\ &=\delta(s_{k,j})\delta(b_{k,j})+\delta(1-s_{k,j})\mathcal{CN}( b_{k,j};0,\
u_{k,j}^{-1}),\end{split} \tag{6}\]  
where \(s_{k,j}\in\{0,1\}\) denotes the MC state implicating if the UE is active (\(s_{k,j}=1\)) or inactive (\(s_{k,j}=0\)) at the \(j\) time slot; \(v_{k,j}^{-1}\) is a non-negative hyperparameter controlling the sparsity of the transmitted signal \(b_{k,j}\).  
Similar to [12; 18; 19], the stationary first-order MC is employed to effectively capture the slow evolution of UE AS across time slots. The MC here is given by  
\[p(\mathbf{S})=\prod_{k=1}^{K}p(\mathbf{s}_{k})=\prod_{k=1}^{K}\big{[}\underbrace{p(s_ {k,1})}_{f_{S_{k,1}}}\big{]}_{j=2}\underbrace{p(s_{k,j}|s_{k,j-1})}_{f_{S_{k,j}} }\big{]}, \tag{7}\]  
with the initial probability given by \(p(s_{k,1})=(p_{k}^{10})^{s_{k,1}}(1-p_{k}^{10})^{1-s_{k,1}}\), and the transition probability is expressed as  
\[p(s_{k,j}|s_{k,j-1})=\begin{cases}(1-p_{k}^{10})^{1-s_{k,j}}(p_{k}^{10})^{s_{ k,j}},s_{k,j-1}=0,\\ (p_{k}^{01})^{1-s_{k,j}}(1-p_{k}^{01})^{s_{k,j}},s_{k,j-1}=1.\end{cases} \tag{8}\]  
The MC is characterized by parameters \(p_{k}^{01}\triangleq\Pr(s_{k,j}=0|s_{k,j-1}=1)\) and \(p_{k}^{10}\triangleq\Pr(s_{k,j}=1|s_{k,j-1}=0)\) for different UEs. Differing from [12; 18], the parameters \(p_{k}^{01},p_{k}^{10}\) are considered as variables, with the prior given by the Beta distributions  
\[\underbrace{p(p_{k}^{01})}_{f_{p_{k}^{01}}}=\text{Be}(p_{k}^{01};c_{k},d_{k} ),\underbrace{p(p_{k}^{10})}_{f_{p_{k}^{10}}}=\text{Be}(p_{k}^{10};e_{k},f_{k}), \tag{9}\]where \(c_{k},d_{k}\), and \(e_{k},f_{k}\) can control the initial values of \(p_{k}^{01}\) and \(p_{k}^{10}\), respectively. Meanwhile, the precision term \(v_{k,j}\) can be modeled as the Gamma distribution [20], i.e.,  
\[p(\mathbf{V})=\prod_{k=1}^{K}\prod_{j=1}^{J}\underbrace{p(v_{k,j})}_{f_{\eta_{k,j}}} =\prod_{k=1}^{K}\prod_{j=1}^{J}\text{Ga}(v_{k,j};\epsilon_{k,j},\eta_{k,j}), \tag{10}\]  
where the initial values of \(v_{k,j}\) are controlled by the parameters \(\epsilon_{k,j},\eta_{k,j}\). The main assumptions considered in the system model are summarized in Table 1.