# LDPC Coded Massive MIMO Systems
## 3 Joint Detection and Decoding for LDPC Coded Massive MIMO System
### Operation of Joint Detection and Decoding
The overall procedure of JDD is presented in Algorithm 1 and the FG-GAI BP detection is summarized in Algorithm 2. Message flows between component nodes of the JDD are illustrated in \[\bar{y}_{i}^{(l)}=\sum_{j=1}^{2n_{T}}\bar{h}_{ij}^{(l)}\bar{x}_{j}^{(l)}+\bar{w}_{ i}^{(l)},\qquad i=1,\cdots,2n_{R}. \tag{3}\]3  
```
1 Initialize : \(\beta_{ki}^{(l)}(s)=\frac{1}{\sqrt{M_{\rm e}}}\), \(\forall l,i,k,s\), \(\Pr\{x_{k}^{(l)}=s\}=\frac{1}{\sqrt{M_{\rm e}}}\), \(\forall l,k,s\), and \(L_{cv}=0\), \(\forall c,v\). 2 for\(l^{\prime}=1\) to \(N_{g}\)do
3 for\(l=1\) to \(N_{ch}\)do
4 Perform FG-GAI BP detection (see Algorithm 2). 5 Compute \(L_{v}\), \(\forall v\), by Equation (11). 6 for\(l^{\prime\prime}=1\) to \(N_{dec}\)do
7 Update \(L_{cv}\) and \(L_{cv}\), \(\forall v,c\), by Equation (12) and (13), respectively. 8 Compute \(\Pr\{x_{k}^{(l)}=s\}\), \(\forall l,k,s\), by Equation (14). 9 Determine the value of coded bit corresponding to \(v\), \(\forall v\)
```  
**Algorithm 2** FG-GAI BP detection. ```
1 for\(m=1\) to \(N_{det}\)do
2 for\(i=1\) to \(2n_{R}\)do
3\(\xi_{\
u_{i}z_{i}}\leftarrow\sum_{j=1}^{2n_{T}}\tilde{h}_{ij}^{(l)}\cdot\sum_{s \in\bar{\mathbb{A}}}\left(s\cdot\beta_{ji}^{(l)}(s)\right)\)
4\(\xi_{\sigma_{z_{i}}^{2}}\leftarrow\sum_{j=1}^{2n_{T}}\left(\tilde{h}_{ij}^{(l) }\right)^{2}\cdot\left\{\sum_{s\in\bar{\mathbb{A}}}\left(s^{2}\cdot\beta_{ji}^ {(l)}(s)\right)-\left(\sum_{s\in\bar{\mathbb{A}}}s\cdot\beta_{ji}^{(l)}(s) \right)^{2}\right\}+\frac{\mathrm{e}^{2}}{2}\)
5 for\(k=1\) to \(2n_{T}\)do
6\(\mu_{z_{k}}\leftarrow\xi_{\mu_{zi}}-\bar{h}_{ik}^{(l)}\cdot\sum_{s\in\bar{ \mathbb{A}}}\left(s\cdot\beta_{ki}^{(l)}(s)\right)\)
7\(\sigma_{z_{ik}}^{2}\leftarrow\xi_{\sigma_{z_{i}}^{2}}-\left(\tilde{h}_{ik}^{(l )}\right)^{2}\cdot\left\{\sum_{s\in\bar{\mathbb{A}}}\left(s^{2}\cdot\beta_{ ki}^{(l)}(s)\right)-\left(\sum_{s\in\bar{\mathbb{A}}}s\cdot\beta_{ki}^{(l)}(s) \right)^{2}\right\}\)
8\(\alpha_{ik}^{(l)}(s)\leftarrow\frac{1}{\sqrt{2\pi\sigma_{z_{ik}}^{2}}}\exp \left(-\frac{(\beta_{i}^{(l)}-\tilde{h}_{ik}^{(l)}s-\mu_{z_{ik}})^{2}}{2\sigma _{z_{ik}}^{2}}\right)\), \(\forall s\in\bar{\mathbb{A}}\). 9 for\(k=1\) to \(2n_{T}\)do
10 for\(i=1\) to \(2n_{R}\)do
11\(\beta_{ki}^{(l)}(s)\leftarrow\prod_{j=1,j\
eq i}^{2n_{R}}\alpha_{jk}^{(l)}(s) \cdot\Pr\{x_{k}^{(l)}=s\}\), \(\forall s\in\bar{\mathbb{A}}\)
```  
**Algorithm 3** FG-GAI BP detection. \[\bar{y}_{i}^{(l)}=\sum_{j=1}^{2n_{T}}\bar{h}_{ij}^{(l)}\bar{x}_{j}^{(l)}+\bar{w}_{ i}^{(l)},\qquad i=1,\cdots,2n_{R}. \tag{3}\]4 Message passing in the JDD of receiver for LDPC coded massive MIMO system. Let us think about the computational complexity of FG-GAI BP detection in terms of the number of multiplications. We focus on one detection iteration for one channel use with a given modulation. It is easily inferred from Algorithm 2 that the FG-GAI BP detection requires a computational complexity of \(O\left(n_{T}n_{R}\right)\). For a brief comparison, we consider some other SISO MIMO detectors such as BP detector [21], SISO MMSE detector, tree-searching detector such as sphere decoding (SD) aided max-log method [26] and subspace marginalization with interference suppression (SUMIS) detector [26]. These detectors require computational complexities of \(O\left(n_{T}^{2}n_{R}\right)\). It is clear that the FG-GAI-BP detector requires lower computational complexity than other SISO MIMO detectors under comparison.