# LDPC Coded Massive MIMO Systems
## 3 Joint Detection and Decoding for LDPC Coded Massive MIMO System
### Operation of Joint Detection and Decoding
Then, \(\alpha_{ik}^{(l)}(s)\) is computed at the observation node \(o_{i}^{(l)}\) by using \(\beta_{ji}^{(l)}(s)\), \(j\
eq k\), via \(\mu_{z_{ik}^{(l)}}\) and \(\sigma_{z_{ik}^{(l)}}^{2}\) based on Equations (7)-(9) and delivered to the middle node \(m_{k}^{(l)}\). Note that \(\beta_{ki}^{(l)}(s)\) is computed at the middle node \(m_{k}^{(l)}\) by using \(\alpha_{jk}^{(l)}(s),j\
eq i\), as in Equation (10), and delivered to the observation node \(o_{i}^{(l)}\). Consequently, \(\alpha_{ik}^{(l)}(s)\) and \(\beta_{ki}^{(l)}(s)\) are updated in a recursive manner through detection iterations. At the end of detection iterations, the log-likelihood ratios (LLR) of coded bits are computed at middle nodes in the following manner and delivered to the decoder. We suppose that a variable node \(v=v_{r}\) represents the \(t\)th bit in the bit-stream generating \(\tilde{x}_{k}^{(l)}\), which results in \(r=(l-1)\cdot n_{T}\log_{2}M_{o}+(k-1)\cdot\log_{2}\sqrt{M_{o}}+t\). Then, the LLR of the coded bit \(u_{r}\), corresponding to the variable node \(v_{r}\) is defined by \(L_{v_{r}}=\log\frac{\Pr\{u_{r}=0\}}{\Pr\{u_{r}=1\}}\) and obtained at the middle node \(m_{k}^{(l)}\) as [22]  
\[L_{v_{r}}=\log\frac{\sum_{s\in\mathbb{S}_{t}^{-}}\Pr\{\tilde{x}_{k}^{(l)}=s| \mathbf{\hat{H}}^{(l)},\mathbf{\tilde{y}}^{(l)}\}}{\sum_{s\in\mathbb{S}_{t}^{ +}}\Pr\{\tilde{x}_{k}^{(l)}=s|\mathbf{\hat{H}}^{(l)},\mathbf{\tilde{y}}^{(l)} \}}=\log\frac{\sum_{s\in\mathbb{S}_{t}^{-}}\prod_{i=1}^{2n_{R}}\alpha_{ik}^{(l) }(s)}{\sum_{s\in\mathbb{S}_{t}^{+}}\prod_{i=1}^{2n_{R}}\alpha_{ik}^{(l)}(s)}, \tag{11}\]  
where \(\mathbb{S}_{t}^{-}=\{s|\) is the \(t\)th bit of a bit-stream generating a symbol \(s\) is \(0\}\) and \(\mathbb{S}_{t}^{+}=\{s|\) is the \(t\)th bit of a bit-stream generating a symbol \(s\) is \(1\}\). In the last equality of Equation (11), we use \(\Pr\{\tilde{x}_{k}^{(l)}=s|\mathbf{\hat{H}}^{(l)},\mathbf{\tilde{y}}^{(l)}\} \propto\prod_{i=1}^{2n_{R}}\Pr\{g_{i}^{(l)}|\mathbf{\hat{H}}^{(l)},\mathbf{ \tilde{x}}_{k}^{(l)}=s\}\). The messages \(L_{v_{r}}\) obtained at middle nodes are delivered to the decoder to be used in the sum-product decoding. Next, consider the operation of sum-product decoding. Let \(L_{v_{r}c}\) and \(L_{cv_{r}}\), denote the message flowing from the variable node \(v_{r}\) to the check node \(c\) and the message flowing from the check node \(c\) to the variable node \(v_{r}\), respectively. These messages are updated in an iterative manner by [29; 30]  
\[\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}\]0  
and  
\[\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}\]1  
where \(\phi(x)=\log(\frac{\exp(x)+1}{\exp(x)-1})\). Note that \(C_{v_{r}}\backslash c\) denotes the set of check nodes except \(c\) connected to the variable node \(v_{r}\) and \(V_{c}\backslash v_{r}\) denotes the set of variable nodes except \(v_{r}\) connected to the check node \(c\). At the end of decoding iterations, the LLR message of the \(t\)th bit in the bit-stream generating \(\tilde{x}_{k}^{(l)}\) is computed as \(L_{k}^{(l)}(t)=\sum_{c\in C_{v_{r}}}L_{cv_{r}}\), and delivered to the middle node \(m_{k}^{(l)}\) in the detector. At the beginning of the next detection iteration, the probability \(\Pr\{\tilde{x}_{k}^{(l)}=s\}\) is computed at the middle node \(m_{k}^{(l)}\) by  
\[\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}\]2  
and used in the detector as in Equation (10), where \(s(t)\) denotes the value of the \(t\)th bit in the bit-stream generating a symbol \(s\). After \(N_{g}\) global iterations, the decision on bits is made such that the coded bit \(u_{r}\) is estimated as \(1\) if \(L_{v_{r}}+L_{k}^{(l)}(t)<0\) and as \(0\) otherwise, where \(r=(l-1)\cdot n_{T}\log_{2}M_{o}+(k-1)\cdot\log_{2}\sqrt{M_{o}}+t\).