# Joint Iterative Decoding Design of Cooperative Downlink SCMA Systems
## 3 Joint Iterative Decoding Design of a Cooperative SCMA System  
In this section, we propose the joint iterative decoding design of a cooperative SCMA system. Specially, we first reconstruct the indicator matrix for the users within the second group by integrating the received signal in the first and second phases, and then the iterative decoding process is introduced with the help of a joint factor graph. After the data transmission in two phases, both the signal of the direct transmission and the relay are received. With \(\mathbf{y}^{f}\) and \(\mathbf{y}^{s}\) in hand, by stacking the signal from the direct link and the relay together, the received signal of the \(j\)-th user in the second group can be described as  
\[\mathbf{y}=\mathrm{diag}(\mathbf{h})\sum_{j=1}^{J}\mathbf{x}_{j}+ \mathbf{n}, \tag{7}\]  
where  
\[\mathbf{y}=\left[ \begin{array}{c}\mathbf{y}^{f}\\ \mathbf{y}^{s}\end{array} \right]=\left[ \begin{array}{c}\mathbf{y}_{1}^{f}\\ \vdots\\ \mathbf{y}_{K}^{s}\\ \vdots\\ \mathbf{y}_{K}^{s}\end{array} \right]=\left[ \begin{array}{c}y_{1}\\ \vdots\\ \vdots\\ \mathbf{y}_{2K}\end{array} \right],\mathbf{h}=\left[ \begin{array}{c}\mathbf{ h}^{f}\\ \mathbf{h}^{s}\end{array} \right]=\left[ \begin{array}{c}h_{1}^{f}\\ \vdots\\ h_{K}^{s}\\ \vdots\\ h_{K}^{s}\end{array} \right]=\left[ \begin{array}{c}h_{1}\\ \vdots\\ h_{2K}\end{array} \right], \tag{8}\]  
and  
\[\mathbf{x}_{j}=\left[ \begin{array}{c}\mathbf{x}_{j}^{b}\\ \mathbf{x}_{j}^{r}\end{array} \right]=\left[ \begin{array}{c}x_{1,j}^{b}\\ \vdots\\ x_{K,j}^{b}\\ x_{1,j}^{r}\\ \vdots\\ x_{K,j}^{r}\end{array} \right]=\left[ \begin{array}{c}x_{1,j}\\ \vdots\\ x_{2K,j}\end{array} \right],\mathbf{n}=\left[ \begin{array}{c}\mathbf{n}^{f} \\ \mathbf{n}^{s}\end{array} \right]=\left[ \begin{array}{c}n_{1}^{f}\\ \vdots\\ n_{K}^{s}\\ \vdots\\ n_{K}^{s}\end{array} \right]=\left[ \begin{array}{c}n_{1}\\ \vdots\\ n_{2K}\end{array} \right]. \tag{9}\]  
As can be seen in (7), the sparse feature of this downlink cooperative SCMA system can be represented by a binary \(2K\times J\) virtual indicator matrix \(\mathbf{F}\), whose element at the \(u\)-th row and the \(j\)-th column is denoted as \(f_{u,j},u=1,2,\cdots,2K\), given by  
\[\mathbf{F}=\left[ \begin{array}{c}\mathbf{F}^{\prime}\\ \mathbf{F}^{\prime}\end{array} \right]. \tag{10}\]  
It is clear that the column weight of \(\mathbf{F}\) is two times that of \(\mathbf{F}^{\prime}\), while the row weight of \(\mathbf{F}\) is identical to that of \(\mathbf{F}^{\prime}\), giving us  
\[d_{c}=d_{c^{\prime}}^{\prime},d_{v}=2d_{v}^{\prime}. \tag{11}\]  
Intuitively, all the possible codewords of \(\mathbf{x}_{j}\) constitute the virtual codebook of the downlink cooperative SCMA system, given by  
\[\mathbf{C}=\left[ \begin{array}{c}\mathbf{C}^{b}\\ \mathbf{C}^{r}\end{array} \right], \tag{12}\]  
where \(\mathbf{C}^{b}\) and \(\mathbf{C}^{r}\) are the codebooks of the transmitted signals \(\mathbf{x}_{j}^{b}\) and \(\mathbf{x}_{j}^{r}\), respectively. The virtual indicator matrix \(\mathbf{F}\) can be represented by a joint factor graph, as shown in Figure 3, which consists of \(2K=8\) virtual resource nodes and \(J=6\) variable nodes. The near-optimal MPA detector can be applied to detect the transmitted bits for the downlink cooperative SCMA system, whose decoding process can be described as the exchanging of the marginal probability distribution of each virtual codeword between virtual RNs and VNs. The conventional probability domain MPA involves a great amount of exponentiation computation, which limits its application. In this way, the logarithm domain MPA is adopted. Before introducing the MPA, we define two sets  
\[\mathcal{R}_{j}=\{k|f_{k,j}=1\},j=1,2,\cdots,J, \tag{13}\]  
and  
\[\mathcal{V}_{k}=\{j|f_{k,j}=1\},k=1,2,\cdots,2K, \tag{14}\]  
to represent the set of virtual resource indices allocated to the \(j\)-th VN and the set of VNs sharing the \(k\)-th virtual RN. Note that the cardinality of \(\mathcal{R}_{j}\) and \(\mathcal{V}_{k}\) are \(d_{v}\) and \(d_{c}\), respectively.