# Multilevel Coding for the Full-Duplex Decode-Compress-Forward Relay Channel
## 5 Simulations  
For the decode-forward components, we use the DVB-S2 LDPC codes. For the compress-forward components, we use the polar codes designed for compress-forward by [PERSON] [24; 25]. The optimal code rate of each level is obtained via an exhaustive search to maximize the rate. The block length of the component codes is \(n=64k\). Both the relay and destination nodes used belief propagation decoding at each level where the maximum number of iterations is set to 50.  
For simplicity of notation, in the following, we use \(P(x)\) to denote \(P_{X}(x)\). While decoding level \(i\) of the signal \(X_{1}\) at the relay, the relay knows two parts of \(X_{1}\) already. The first is the source assistance to the relay and the second is the output of the preceding decoders at the relay, assuming correct decoding. Therefore, the log-likelihood ratio (LLR) of level \(i\) at the relay is  
\[LLR_{r}=\log\frac{P(y_{2}|c^{k},b^{i-1},0)}{P(y_{2}|c^{k},b^{i-1},1)}, \tag{43}\]  
where  
\[P(y_{2}|\hat{c},b^{i-1},b_{i})=\frac{1}{P(\hat{c},b^{i-1},b_{i})}\sum_{b_{i+1} ^{m}}P(y_{2}|\hat{c},\hat{b}).\]  
The relay removes the effect of \(W_{d}^{(t-1)}\) and \(W_{d}^{(t)}\) from \(Y_{2}\) by first encoding them and removing their effect from \(X_{1}\).  
The decoding at the destination node is performed as follows: after the last transmission block, the destination decodes the decode-forward signal from the relay and then decode the signal from the source node. The LLR of level \(i\) of the relay at the destination node is  
\[LLR_{RD}=\log\frac{P(y_{3}|c^{i-1},0)}{P(y_{3}|c^{i-1},1)}, \tag{44}\]  
where  
\[P(y_{3}|c^{i-1},c_{i})=\frac{1}{P(c^{i-1},c_{i})}\sum_{b^{m},c^{m}_{i+1}}P(y_ {3}|b^{m},c^{m}). \tag{45}\]The next step is to decode the signal from the source given the transmitted signal from the relay with  
\[LLR_{SD}=\log\frac{P(y_{3}|c^{m},b^{i-1},0)}{P(y_{3}|c^{m},b^{i-1},1)}, \tag{46}\]  
where  
\[P(y_{3}|c^{m},b^{i-1},b_{i})=\frac{1}{P(c^{m},b^{i-1},b_{i})}\sum_{ \begin{subarray}{c}b^{m}\\ b^{i-1}\end{subarray}}P(y_{3}|b^{m},c^{m}).\]  
In each of the error plots, a capacity threshold is marked that corresponds to the relay DCF constellation constrained capacity. The source and relay powers are identical throughout all simulations, enabling the use of a single scale for power (dB) in the error curves.  
Figure 9 shows the bit error probability and frame error probability for a 16-QAM source and QPSK relay. The figure compares the performance of DCF under different labelings. The system model is the same as the one considered in Figure 7 where the source, relay and destination are all on one line. The distance between the source and relay is 0.8, the distance between the relay and destination is 0.2 and the distance between the source and destination is 1. The path-loss coefficient is \(\alpha=2\).  
The total transmission rate is 2.2 bits/s/Hz. The four levels of the source operate as follows: the most significant bit transmits the same information of the most significant bit of the relay to provide a beamforming gain to the relay-destination transmission. The following two levels at the source transmit new information to be decodable at the relay while the last level transmits a compress-forward component.  
Figure 10 shows the bit error probability and frame error probability for a 16-QAM source and QPSK relay. The model that is considered this time is given by the channel gains, more specifically, \(H_{12}=1\), \(H_{23}=100\) and \(H_{13}=1\). This figure compares the proposed DCF with DF and CF. The rate is 2 bits/s/Hz. The figure shows that DCF outperforms DF and CF.  
Figure 9: Performance of multilevel superposition for 8-PAM constellation when the relay is located at \(d=2.5\).