# Energy Efficiency of a Decode-and-Forward Multiple-Relay Network with Rate Adaptive LDPC Codes +
## 2 System Model
### Data Encoding and Decoding Using LDPC Codes  
We generate a \((n,k)\) irregular LDPC code by keeping the code rate \(C_{R}\) the same in an end-to-end transmission. This is the first considered scenario, which implies that same code rate is applied at the source and at all the relays irrespective of the channel conditions. \(C_{R}\) is defined as \(C_{R}=k/n\), where for every \(k\) bits of useful information, LDPC code generates a total of \(n\) bits, \(n\geq k\), of which \((n-k)\) are redundant bits. In Table 1, we enlist five different code rates for an example LDPC code, which have been used in our simulation results as well. At the source, we generate a sparse parity check matrix, \(\mathbf{H}\), with \((n-k)\) rows and \(n\) columns. A corresponding generator matrix \(\mathbf{G}\) is generated to encode the given sequence as \(\mathbf{x}_{s}=\mathbf{u}\circ\mathbf{G}\), where \(\mathbf{u}\) is the input codeword and \(\mathbf{x}_{s}\) is the output codeword. M-ary quadrature amplitude modulation (QAM) is employed by the source in TS-1. At the relay station, \(i\), the received sequence is decoded using log domain sum product algorithm (SPA). The decoded codeword \(\mathbf{u}_{i}^{\prime}\) at \(i^{th}\) relay is encoded again as \(\mathbf{x}_{r_{i}}=\mathbf{u}_{i}^{\prime}\circ\mathbf{G}_{i}\), and after M-QAM modulation, it is transmitted by the relay in TS-2. The destination then decodes the received information using the log-domain SPA. Please note that \(\mathbf{G}\) and \(\mathbf{G}_{i}\) may be the same or different. After demodulation, the received vectors \(\mathbf{y}_{r_{i}}\) and \(\mathbf{y}_{d_{i}}\) constructed from Equations (1) and (2) are valid codewords only if they satisfy the parity check condition, i.e.,  
\[\mathbf{H}\circ\mathbf{y}_{r_{i}}{}^{T}=\mathbf{0}, \tag{3}\]  
\[\mathbf{H}_{i}\circ\mathbf{y}_{d_{i}}{}^{T}=\mathbf{0}, \tag{4}\]  
where \(\mathbf{H}_{i}\) is the parity check matrix corresponding to \(\mathbf{G}_{i}\). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Code Rate** & **Info. Bits** & **Check Bits** & **CodeRate Index** \\ \(C_{R}\) & \(k\) & \((n-k)\) & \(r_{index}\) \\ \hline \(1/4\) & 78 & 234 & 0 \\ \(1/2\) & 156 & 156 & 1 \\ \(3/4\) & 234 & 78 & 2 \\ \(5/6\) & 260 & 52 & 3 \\ \(7/8\) & 273 & 39 & 4 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Different data rates \(C_{R}\) for LDPC (low density parity check), code length \(n=\)312. Figure 1: Two-hop multiple-relay network. The above products in Equations (3) and (4) are zero vectors of dimension \((n-k)\times 1\). At the end, for each bit, the hard decision is made using a sum product algorithm, the SPA halts when the required number of iterations are reached or if all the parity check are satisfied. To improve the performance of the wireless communication links, several copies of the data coming from different paths, (here from the relays) are combined. As all the copies are combined after detection of the signals, therefore, we call it post-detection combining. In the realized scenario, the signals coming from different relays are combined at destination. The signals received from each relay are decoded separately using a LDPC decoder and are combined in a single matrix \(\mathbf{Y}_{pdc}\) of dimensions \((N\times k)\), where \(N\) is the number of relays. Each column of the matrix is decided on the basis of the majority voting rule, i.e., if a bit (0 or 1) has more than 50% occurrences it will be selected as the detected bit, as shown in Figure 2. It is noted that in this study, we consider an end-to-end transmission and emphasize on making an end-to-end BER performance better. Hence, even when some of the relays decode the information with higher individual BERs, when it is received at the destination, the decision is made on majority voting rule. This is also clear from Figure 2 as when the same information is received from different paths, a diversity gain is achieved.