# Jointly optimized rate-compatible UEP-LDPC codes for half-duplex co-operative relay networks

- Rabiullah Khattak
^{1}Email author and - Sara Sandberg
^{2, 3}

**2014**:22

https://doi.org/10.1186/1687-1499-2014-22

© Khattak and Sandberg; licensee Springer. 2014

**Received: **5 March 2013

**Accepted: **17 January 2014

**Published: **2 February 2014

## Abstract

This paper addresses the design of low-density parity-check (LDPC) codes for half-duplex co-operative relay networks. Structured rate-compatible codes with unequal error protection (UEP) are designed through joint optimization of the codes for the channels between source and relay and source and destination. The proposed codes clearly outperform simpler LDPC codes which are not optimized for relay channels and puncturing-based rate-compatible LDPC codes, and they show a significant performance improvement over the direct link communication depending on the position of relay. The optimization algorithm for the proposed codes is based on density evolution using the Gaussian approximation and optimal variable node degree distributions are found through iterative linear programming. Interestingly, they anyhow show performance which is almost comparable to the performance of codes optimized through a more complex non-linear optimization algorithm. We analyze the performance of our proposed codes with short, medium and long block lengths, and with low and high rates under realistic assumptions, i.e., imperfect decoding of the codeword at relay and variant signal-to-noise ratio within a single codeword.

## Keywords

## 1 Introduction

*ad hoc*networks, and wireless sensor networks. They provide spatial diversity because the terminals in a relay network form virtual multiple antenna systems. Like multiple antenna systems, relay networks increase channel capacity under the same bandwidth constraints and with no additional power consumption. A simple co-operative relay network is composed of three nodes, source (

*S*), relay (

*R*), and destination (

*D*), as shown in Figure 1.

*S*is transmitting data to

*D*via a direct link (

*S*to

*D*) and a relay link (

*S*to

*D*through

*R*). There are three relay channels in a simple relay network, i.e., the channels between

*S*and

*D*, between

*S*and

*R*, and between

*R*and

*D*. The relay is used to increase the reliability and data rate when the channel between

*S*and

*D*is bad due to fading and interference.

In this paper, we propose low-density parity-check (LDPC) code design for half-duplex relay networks based on rate compatibility and unequal error protection (UEP) capabilities. The code is designed by optimizing the variable node degree distribution using density evolution under Gaussian approximation [1]. We design rate-compatible LDPC codes with UEP using sub-degree distributions both for classes of bits with different protection (denoted by protection classes) and for classes of bits transmitted over different relay channels. Henceforth, the bits transmitted over one specific relay channel will be referred to as belonging to one channel class. The separation of the variable node degree distribution into sub-degree distributions significantly increases the number of design parameters. Therefore, it is important to note that the code design is solved by iterative linear programming (LP), which enables an efficient optimization of the sub-degree distributions. Our code design is based on the design method for UEP-LDPC codes with higher order modulations suggested in [2], which employs iterative LP, and the rate-compatible code structure suggested in [3]. Higher order modulations cause different bits in the codeword to have different signal-to-noise ratios (SNRs) in the same way as relay channels with different channel gains cause different codeword bits to be received with different SNRs. In our design, we use the strategy proposed in [2] to optimize the codes for the case where two different codeword segments experience two different SNRs due to different channel gains of the *S* to *D* and the *R* to *D* relay channels. That is, our proposed optimization algorithm considers different SNRs of the relay channels in the code design, like in [3].

The performance of the source to relay channel plays an important role in the overall performance of co-operative relay networks [4, 5]. It is pointed out in [3] that code extension techniques provide better performance than code puncturing in the source to relay channel. In code extension techniques, optimal codewords can be transmitted over the source to relay channel to get the best performance. In code puncturing techniques, only punctured codewords can be transmitted over the source to relay channel, which results in a certain performance loss. Therefore, we design the rate-compatible LDPC codes for relay networks based on the extension technique.

In [3], LDPC codes for relay networks are designed by finding optimal variable and check node degree distributions using differential evolution, which is a nonlinear code optimization method. In the design proposed here, linear programming is used to find an optimal variable node degree distribution. Our code optimization algorithm requires less computational effort than that of [3] and the performance is anyhow similar to the performance of the codes proposed in [3]. Like in [3], joint optimization of the codes for the source to relay and the source to destination channels is performed, and variant SNR within a single codeword is considered in the design. In [3], it is assumed that the codeword received at the relay from the source is perfectly decoded at the relay. However, in this paper, it is not assumed that the codeword is perfectly decoded at the relay, which is a more realistic assumption. In [6], the authors have compared two different LDPC coding schemes from [7] and [8] with their proposed puncturing-based rate-compatible LDPC codes. The code design proposed here is different from the designs proposed in [3] and [6] because it provides UEP properties to the code, i.e., more important bits are made more protected by allocating them higher variable node degrees. The coding scheme in [6] has simple code design as it requires the design of only one single-user LDPC. In contrast to the coding scheme in [6], our proposed coding scheme requires the joint design of two codes. However, our proposed code shows better performance than the code proposed in [6] because the code in [6] has performance loss due to puncturing in the co-operative relay network.

Most of the papers in the literature on relay networks consider a theoretical approach of code design. However, we focus on code design with realistic assumptions, such as imperfect decoding of the codeword in the relay terminal, like in [9] and variant SNR within a single codeword, like in [3].

In [9], quasi-cyclic LDPC (QC-LDPC) codes are used in relay networks through repetition coding schemes. In the code design, the SNR is considered invariant within a single codeword. The fact that [9] uses QC-LDPC codes makes them easier to implement and thereby more realistic, but on the other hand, they also get worse performance. Using the same time slots, transmission power, and processing of the codewords in the relay terminal with the decode and forward strategy as in [9], the codes proposed here achieve up to 1.9-dB gain over the QC-LDPC codes depending on the location of the relay with respect to the source and the destination. The better performance is partly due to the rate-compatible coding scheme and partly due to the UEP properties of the code. The rate-compatible coding scheme provides a better trade-off between bit error rate and data rate than the repetition coding scheme. The UEP provides high protection to the codeword bits transmitted over the source to relay channel, which results in a better performance of the important source to relay channel. Also, in contrast to [9], the proposed codes are optimized for each position of the relay. Depending on the location of the relay relative to the source and the destination, the proposed low-rate codes with short, medium and long block lengths show a performance improvement of up to 3.8-dB gain over the direct link communication. The proposed high-rate code with medium block length has a 1.3-dB gain over the direct link communication.

The remainder of this paper is organized as follows. Section 2 presents an overview of the background and the system model of a half-duplex relay network and introduces the LDPC coding scheme. Section 3 gives the details of the optimization algorithm for the design of rate-compatible LDPC codes with UEP properties for half-duplex relay networks. Section 4 describes the selection of a good check node degree distribution and discusses the simulation results of our proposed code design. The results are also compared to the simulation results for QC-LDPC codes [9] as well as the codes proposed in [3] and [6]. Section 5 concludes this paper.

## 2 Background and system model

### 2.1 Half-duplex operation of relay and types of relay

*t*(normalized), known as broadcast mode (BC),

*S*transmits to both

*R*and

*D*. In the second time slot $\stackrel{\u0304}{t}=1-t$, known as multiple access mode (MAC), either only

*R*or both

*R*and

*S*transmit to

*D*as shown in Figure 2. In this paper, only

*R*transmits to

*D*in MAC mode.

There exist different types of co-operative relay strategies based on how the received signal is processed by the relay node. The two most common types of co-operative relay strategies are amplify and forward (AF) and decode and forward (DF). The AF relay [10] amplifies the received signal and then retransmits it to the destination. The DF relay first decodes the signal received from the source and then retransmits the decoded signal after re-encoding, either with the same code as used by the source or with a different code. The drawback of the AF relay is that noise is also amplified along with the desired signal. In power limited communication networks, the AF relay is preferred as it performs no decoding and re-encoding of the received signal. The drawback of the DF relay is the large delay due to decoding and re-encoding as compared to the AF relay. However, the DF relay can also be implemented without re-encoding [11]. In this work, the DF relay is considered.

### 2.2 Relay channel model

*S*and

*D*is normalized to unity.

*R*is located at a distance of

*d*from

*S*and 1−

*d*from

*D*. The relative distance model in Figure 3 is applied with normalized distance

*d*, where 0<

*d*<1. Note that all the half-duplex relay channels are AWGN channels with fixed path loss. The signals received at

*D*and

*R*in BC and MAC modes are as follows:

*S*and

*R*are denoted by

^{a}

**x**

_{ Si }and

**x**

_{ Ri }, respectively, where

*i*∈{1,2} and 1 and 2 stands for BC and MAC modes, respectively. The received signals at

*R*and

*D*are represented by

**y**

_{ Ri }and

**y**

_{ Di }, respectively. In the above equations,

*h*

_{ SR },

*h*

_{ SD }and

*h*

_{ RD }are the channel realizations between {

*S*,

*R*}, {

*S*,

*D*} and {

*R*,

*D*}, respectively.

**n**

_{ Ri }and

**n**

_{ Di }are AWGN at the

*R*and

*D*receivers with zero means and variance

*σ*

^{2}=

*N*

_{0}/2 in each dimension. The normalized channel gains of the {

*S*,

*R*}, the {

*S*,

*D*}, and the {

*R*,

*D*} channels are given as

*τ*is the path loss exponent which normally ranges from 2 to 5 [13]. Furthermore, BPSK modulation and full channel state information (CSI) available at each terminal of the relay network are assumed. In order to fairly compare the relay channel with the direct link, we assume that the sum of the

*R*and

*S*transmit powers in the relay channel is equal to the direct link transmit power of

*S*. Therefore, the following global power constraint is assumed:

*P*_{S 1} is the source transmit power in BC mode, *P*_{
R
} is the relay transmit power in MAC mode and *P* is the total system transmit power.

### 2.3 Coding strategy for half-duplex relays

*S*is silent in MAC mode and perfect decoding of the codeword at

*R*is not assumed. According to this relay coding strategy, a codeword

**w**

_{1}of length

*N*

_{1}is transmitted from

*S*to

*R*and

*D*in BC mode, i.e., ${\mathbf{x}}_{S1}=\sqrt{{P}_{S1}}{\mathbf{w}}_{1}$.

*R*decodes the codeword

**w**

_{1}and generates the extra parity bits

**w**

_{ e }of length

*N*

_{2}−

*N*

_{1}.

*D*stores $\stackrel{~}{{\mathbf{w}}_{1}}$ (received version of

**w**

_{1}) until it receives $\stackrel{~}{{\mathbf{w}}_{e}}$ from

*R*. Note that

**w**

_{ e }transmitted from

*R*may contain errors if $\stackrel{~}{{\mathbf{w}}_{1}}$ is not decoded correctly at

*R*. In MAC mode

*S*is silent, so only

*R*transmits

**w**

_{ e }to

*D*, i.e., ${\mathbf{x}}_{R2}=\sqrt{{P}_{R}}{\mathbf{w}}_{e}$.

*D*concatenates $\stackrel{~}{{\mathbf{w}}_{1}}$ with $\stackrel{~}{{\mathbf{w}}_{e}}$ to get the extended codeword $\stackrel{~}{{\mathbf{w}}_{2}}=\phantom{\rule{0.3em}{0ex}}\left[\phantom{\rule{0.3em}{0ex}}\stackrel{~}{{\mathbf{w}}_{1}}\phantom{\rule{1em}{0ex}}\stackrel{~}{{\mathbf{w}}_{e}}\right]$ of length

*N*

_{2}belonging to the extended code ${\mathcal{C}}_{2}$. $\stackrel{~}{{\mathbf{w}}_{2}}$ is then decoded at

*D*to recover the original information. From (2) and (3), it follows that the signals received at

*D*in BC and MAC modes can be expressed respectively as

### 2.4 Brief introduction to LDPC codes

LDPC are classified as linear block codes. They are described by parity check equations and are represented by a sparse parity-check matrix *H*. LDPC codes are decoded by a message passing algorithm [14]. The decoding complexity increases linearly with codeword length and also depends on the sparseness of *H*. The parity-check matrix can be represented in graphical form by a bipartite graph, called Tanner graph [15]. The operation of the message passing algorithm is readily explained using a Tanner graph. The two types of nodes in the Tanner graph are variable nodes and check nodes, which correspond to codeword bits and parity-check equations, respectively. The number of variable nodes (codeword bits) is denoted by *n* and the number of check nodes (parity-check equations) is denoted by (*n*−*k*) where *k* is the number of the information bits. A variable node is connected to a check node by an edge if the bit corresponding to the variable node is included in the parity-check equation corresponding to the check node. Thus, the number of edges in the Tanner graph is equal to the number of 1s in the parity-check matrix *H*. The code rate of LDPC codes is defined by *k*/*n*. LDPC codes are classified as regular or irregular based on the degrees of the nodes. The degree of a node is the number of edges connected to it. The regular codes have variable nodes of fixed degree and their check nodes have another similar fixed degree. The irregular codes have variable and check nodes with varying degrees. The variable and check node degree distributions of irregular codes from an edge perspective are represented by $\lambda \left(x\right)=\sum _{i=2}^{{d}_{{v}_{\text{max}}}}{\lambda}_{i}{x}^{i-1}$ and $\rho \left(x\right)=\sum _{i=2}^{{d}_{{c}_{\text{max}}}}{\rho}_{i}{x}^{i-1}$, respectively, where ${d}_{{v}_{\text{max}}}$ is the maximum variable node degree and ${d}_{{c}_{\text{max}}}$ is the maximum check node degree of the code [16]. The coefficients *λ*_{
i
} and *ρ*_{
i
} describe the fraction of edges that are connected to degree-*i* variable and check nodes, respectively. The optimal degree distribution of irregular codes can be found by density evolution (DE) using the Gaussian approximation [1]. DE tracks mutual information exchange between variable and check nodes in the message passing decoding algorithm.

### 2.5 Rate-compatible UEP-LDPC codes for half-duplex relays

From an implementation point of view, the simplest code design scheme for half-duplex relays is the repetition coding scheme, i.e., transmitting the same codeword **w**_{1} of code ${\mathcal{C}}_{1}$ in BC and MAC modes[9]. However, the repetition coding scheme is not preferred as it provides a poor trade-off between bit error rate and data rate. One alternative is to use coding schemes based on incremental redundancy, i.e., transmitting the codeword **w**_{1} in BC mode and extra parity bits **w**_{
e
} being extracted from **w**_{1}, in MAC mode [3]. This yields the extended codeword **w**_{2}= [ **w**_{1} **w**_{
e
}] belonging to the extended code ${\mathcal{C}}_{2}$. In this case, a joint design of the mother code ${\mathcal{C}}_{1}$ and extended code ${\mathcal{C}}_{2}$ is required. The incremental redundancy could also be achieved using puncturing, i.e., deleting a number of parity bits from **w**_{2} to get **w**_{1}. Code design in this case is the joint design of the mother code ${\mathcal{C}}_{2}$ and the punctured code ${\mathcal{C}}_{1}$.

*H*

_{2}representing the code ${\mathcal{C}}_{2}$, which follows the structure proposed in [3], is illustrated in Figure 4.

*H*

_{2}is composed of a non-zero parity check matrix

*H*

_{1}corresponding to the code ${\mathcal{C}}_{1}$, a zero sub-matrix

*O*and non-zero sub-matrices

*A*and

*B*. The zero sub-matrix preserves the parity-check equations of the mother code ${\mathcal{C}}_{1}$. The rate-compatible design of ${\mathcal{C}}_{2}$ is different from [17–19] as

**w**

_{1}and

**w**

_{ e }are in general received with different SNRs. Received SNRs for decoding

**w**

_{1}and

**w**

_{ e }are given later by (8) and (9), respectively.

We introduce UEP along with rate-compatibility in LDPC codes in order to provide better protection to the codeword bits which are transmitted in BC mode than to the extra parity bits transmitted in MAC mode, since the overall performance of relay networks depends largely on the source to relay channel performance [4, 5]. Through UEP, variable nodes of higher degrees are assigned to the **w**_{1} segment of the code ${\mathcal{C}}_{2}$ in order to give it higher protection than its **w**_{
e
} segment.

## 3 Design of RC UEP-LDPC codes for relay networks

### 3.1 Notations

The codeword bits of code ${\mathcal{C}}_{z}$ where *z*∈{1,2} are divided into ${N}_{c}^{{\mathcal{C}}_{z}}$ protection classes in order to give it UEP properties. The proportions ${\mathbf{\alpha}}^{{\mathcal{C}}_{z}}=\phantom{\rule{0.3em}{0ex}}[\phantom{\rule{0.3em}{0ex}}{\alpha}_{1}^{{\mathcal{C}}_{z}},\xb7\xb7\xb7,{\alpha}_{{N}_{c}^{{\mathcal{C}}_{z}}-1}^{{\mathcal{C}}_{z}}]$ denote the normalized lengths of each class corresponding to the information bits *u*_{
i
}. ${\alpha}_{i}^{{\mathcal{C}}_{z}}$ equals the number of bits belonging to protection class *C*_{
i
} divided by the total number of information bits *k*. $\mathbf{p}=\phantom{\rule{0.3em}{0ex}}[\phantom{\rule{0.3em}{0ex}}{\alpha}_{1}^{{\mathcal{C}}_{z}}{R}_{z},\xb7\xb7\xb7,{\alpha}_{{N}_{c}^{{\mathcal{C}}_{z}}-1}^{{\mathcal{C}}_{z}}{R}_{z},(1-{R}_{z}\left)\right]$ defines proportions of the bits in the codeword belonging to different protection classes and *R*_{
z
} is the code rate of ${\mathcal{C}}_{z}$. ${N}_{s}^{{\mathcal{C}}_{z}}$ is the number of relay channels (channel classes) between source, relay and destination associated with ${\mathcal{C}}_{z}$. The bit segments of the codeword being received through different relay channels have different SNRs. The bit segment with a distinct SNR will be classified as belonging to one channel class ${M}_{j},j=1,\xb7\xb7\xb7,{N}_{s}^{{\mathcal{C}}_{z}}$. The proportions of bit segments in the codeword belonging to different channel classes are defined by ${\mathbf{\beta}}^{{\mathcal{C}}_{z}}=\phantom{\rule{0.3em}{0ex}}[\phantom{\rule{0.3em}{0ex}}{\beta}_{1}^{{\mathcal{C}}_{z}},\xb7\xb7\xb7,{\beta}_{{N}_{s}^{{\mathcal{C}}_{z}}}^{{\mathcal{C}}_{z}}]$.

The vectors ${\mathbf{\lambda}}^{{\mathcal{C}}_{z}}$ and ${\mathbf{a}}^{{\mathcal{C}}_{z}}$ contain the overall variable node degree distribution from an edge perspective and a node perspective, respectively, both for different protection classes and different channel classes for a codeword corresponding to code ${\mathcal{C}}_{z}$. Let ${\lambda}_{{M}_{j,i}}^{{\mathcal{C}}_{z},{C}_{k}}$ and ${a}_{{M}_{j,i}}^{{\mathcal{C}}_{z},{C}_{k}}$ be the proportion of edges and nodes, respectively, connected to variable nodes of degree *i* that belong to channel class *M*_{
j
}, protection class *C*_{
k
}, and code ${\mathcal{C}}_{z}$. Similarly, ${b}_{i}^{{\mathcal{C}}_{z}}$ is the proportion of check nodes of degree *i* that belong to code ${\mathcal{C}}_{z}$. Define ${\mathbf{\lambda}}_{{M}_{j}}^{{\mathcal{C}}_{z},{C}_{k}}=\phantom{\rule{0.3em}{0ex}}{[\phantom{\rule{0.3em}{0ex}}{\lambda}_{{M}_{j,2}}^{{\mathcal{C}}_{z},{C}_{k}},\xb7\xb7\xb7,{\lambda}_{{M}_{j,{d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{z}}}}^{{\mathcal{C}}_{z},{C}_{k}}]}^{T}$ and ${\mathbf{\lambda}}^{{\mathcal{C}}_{z}}=\phantom{\rule{0.3em}{0ex}}{[\phantom{\rule{0.3em}{0ex}}{{\mathbf{\lambda}}_{{M}_{1}}^{{\mathcal{C}}_{z},{C}_{1}}}^{T},\xb7\xb7\xb7,{{\mathbf{\lambda}}_{{M}_{1}}^{{\mathcal{C}}_{z},{C}_{{N}_{c}^{{\mathcal{C}}_{z}}}}}^{T},\xb7\xb7\xb7,{{\mathbf{\lambda}}_{{M}_{{N}_{s}^{{\mathcal{C}}_{z}}}}^{{\mathcal{C}}_{z},{C}_{1}}}^{T},\xb7\xb7\xb7,{{\mathbf{\lambda}}^{{\mathcal{C}}_{z},{C}_{{N}_{c}^{{\mathcal{C}}_{z}}}}}_{{M}_{{N}_{s}^{{\mathcal{C}}_{z}}}}^{T}]}^{T}$ where (·)^{
T
} denotes the transpose. ${\mathbf{\lambda}}_{{M}_{j}}^{{\mathcal{C}}_{z},{C}_{k}}$ is a column vector of length ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{z}}-1$ and ${\mathbf{\lambda}}^{{\mathcal{C}}_{z}}$ is a column vector of length $({d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{z}}-1){N}_{s}^{{\mathcal{C}}_{z}}{N}_{c}^{{\mathcal{C}}_{z}}$. The vectors ${\mathbf{\rho}}^{{\mathcal{C}}_{z}}=\phantom{\rule{0.3em}{0ex}}{[\phantom{\rule{0.3em}{0ex}}{\rho}_{2}^{{\mathcal{C}}_{z}},\dots ,{\rho}_{{d}_{{c}_{\text{max}}}^{{\mathcal{C}}_{z}}}^{{\mathcal{C}}_{z}}]}^{T}$ and ${\mathbf{b}}^{{\mathcal{C}}_{z}}$ describe the check node degree distribution from an edge and a node perspective, respectively. Note that ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{z}}$ and ${d}_{{c}_{\text{max}}}^{{\mathcal{C}}_{z}}$ are the maximum variable and check node degrees respectively in the code ${\mathcal{C}}_{z}$. The vector with all-ones is defined by **1** with suitable length.

### 3.2 Protection and channel classes

*u*

_{ i }are divided into ${N}_{c}^{{\mathcal{C}}_{z}}-1$ protection classes ${C}_{1}\xb7\xb7\xb7{C}_{{N}_{c}^{{\mathcal{C}}_{z}}-1}$. The parity bits are assigned to ${C}_{{N}_{c}^{{\mathcal{C}}_{z}}}$. The protection classes are ordered with descending order of protection, i.e.,

*C*

_{1}has the highest protection and ${C}_{{N}_{c}^{{\mathcal{C}}_{z}}}$ has the lowest protection. The bits from the different protection classes are re-multiplexed and assigned to channel classes ${M}_{1},\xb7\xb7\xb7,{M}_{{N}_{s}^{{\mathcal{C}}_{z}}}$ corresponding to the different relay channels. In the half-duplex co-operative relay networks with three terminals, there are two relay channels through which destination receives the signals from the relay and the source, one between source and destination

*M*

_{1}, and the other between relay and destination

*M*

_{2}, see Figure 1.

### 3.3 SNRs of the relay channels

*D*in BC and MAC modes have different received SNRs. The SNRs of the signals received in BC and MAC modes are defined, respectively, as

The noise variances in (12) and (13) are required for density evolution in the proposed optimization algorithm in [2]. For the proposed optimization algorithm in [2], we define the noise vector ${\stackrel{~}{\mathbf{\sigma}}}^{2}=[\phantom{\rule{0.3em}{0ex}}{\stackrel{~}{\sigma}}_{1}^{2},\xb7\xb7\xb7,{\stackrel{~}{\sigma}}_{{N}_{s}^{{\mathcal{C}}_{z}}}^{2}]$ to be a vector that contains the equivalent noise variances of each relay channel in BC and MAC modes, ordered with the highest variance first.

### 3.4 Optimization algorithm

The optimization algorithm presented here is the adaptation of the optimization algorithm proposed in [2] for half-duplex co-operative relay networks. We add an additional constraint to the optimization algorithm of [2] for the design of rate-compatible LDPC codes as described in [3]. In the optimization algorithm, the code ${\mathcal{C}}_{2}$ for half-duplex relay network is designed to be rate-compatible with UEP based on the given degree distributions of the UEP capable code ${\mathcal{C}}_{1}$. Code ${\mathcal{C}}_{1}$ is first designed without the rate-compatible constraint in the optimization algorithm. Then, the rate-compatible code ${\mathcal{C}}_{2}$ is designed given the variable and check node degree distributions of ${\mathcal{C}}_{1}$.

*E*

_{ b }/

*N*

_{0}slightly higher than the threshold. In every sequential execution step, the optimization algorithm keeps the degree distributions of lower protection classes fixed and may change only the degree distributions of higher protection classes [2]. The objective function for protection class

*C*

_{ k }can be expressed as

The optimization algorithm with objective function (14) maximizes the average variable node degree. For maximization of the minimum variable node degree, the optimization is initiated with a high minimum variable node degree and decreased to a lower value until a variable node degree distribution for which density evolution convergence is found, see [2] for details.

#### 3.4.1 Rate-compatible constraints

*H*

_{2}, by considering the rate-compatible constraints for variable and check node degree distributions given the degree distributions of the code ${\mathcal{C}}_{1}$. However, the optimization algorithm in this paper designs the code ${\mathcal{C}}_{2}$ by considering only the rate-compatible constraint for the variable node degree distribution [3] (expressed by (19)) given the degree distributions of the code ${\mathcal{C}}_{1}$. The check node degree distribution of ${\mathcal{C}}_{2}$ is assumed to be given and must satisfy the rate-compatible constraints for the check node degree distribution [3] (expressed by (17)) before using it in the optimization algorithm to determine an optimal variable node degree distribution for ${\mathcal{C}}_{2}$. The rate-compatible constraints for the variable node degree distribution from [3] have been adapted to cover the UEP properties of our proposed code. For ${\mathcal{C}}_{2}$, the overall edge distributions ${\mathbf{\lambda}}^{{\mathcal{C}}_{2}}$ and ${\mathbf{\rho}}^{{\mathcal{C}}_{2}}$ and the overall node distributions ${\mathbf{a}}^{{\mathcal{C}}_{2}}$ and ${\mathbf{b}}^{{\mathcal{C}}_{2}}$ must satisfy the following general constraints from [3] which have been adapted to cover the UEP properties of our proposed code:

*W*

_{ z }is the number of rows in parity-check matrix

*H*

_{ z }and $\Omega =\frac{(1-{R}_{1}){N}_{1}}{(1-{R}_{2}){N}_{2}}=\frac{(1-{R}_{1}){R}_{2}}{(1-{R}_{2}){R}_{1}}$; the first equality is derived from $1-{R}_{z}=\frac{{W}_{z}}{{N}_{z}}$ and the second equality is derived from the rate-compatible feature of

*H*

_{2}, i.e.,

*R*

_{1}

*N*

_{1}=

*N*

_{1}−

*W*

_{1}=

*N*

_{2}−

*W*

_{2}=

*R*

_{2}

*N*

_{2}. Converting the check node perspective constraint (16) into edge perspective using (15) gives

#### 3.4.2 Convergence constraint

*x*

_{ cv }) and from a variable node to a check node (

*x*

_{ vc }) at iteration

*l*are given by

*J*(·) is the mutual information, given by

*m*and variance 2

*m*. The mutual information evolution can be written as a combination of (20) and (21)

The ${\mathbf{\lambda}}^{{\mathcal{C}}_{z}}$ and ${\mathbf{\rho}}^{{\mathcal{C}}_{z}}$ describe the degree distributions of the code for a given **σ**^{2} when the condition ${x}_{\mathit{\text{vc}}}^{\left(l\right)}>{x}_{\mathit{\text{vc}}}^{(l-1)}$ for any ${x}_{\mathit{\text{vc}}}^{(l-1)}$ is satisfied.

#### 3.4.3 Proportion distribution constraints

*C*

_{ k }and to channel class

*M*

_{ j }is

respectively.

#### 3.4.4 Stability condition

**σ**

^{2}. The stability condition for the direct link channel is

*P*

_{0}(

*x*) is the received message density and ${\lambda}^{{\mathcal{C}}_{{z}^{\prime}}}\left(x\right)$ and ${\rho}^{{\mathcal{C}}_{{z}^{\prime}}}\left(x\right)$ are the derivatives of the degree distributions. The stability condition gives an upper bound on the number of degree-2 variable nodes. In case of co-operative relay networks, the codeword bits experience different noise variances ${\sigma}_{j}^{2}$ due to different SNRs of the relay channels and there are different densities

*P*

_{0,j}(

*x*). The derivatives are ${\lambda}^{{\mathcal{C}}_{{z}^{\prime}}}\left(0\right)={\sum}_{j=1}^{{N}_{s}^{{\mathcal{C}}_{z}}}{\sum}_{k=1}^{{N}_{c}^{{\mathcal{C}}_{z}}}{\lambda}_{{M}_{j,2}}^{{\mathcal{C}}_{z},{C}_{k}}$ and ${\rho}^{{\mathcal{C}}_{{z}^{\prime}}}\left(1\right)={\sum}_{m=2}^{{d}_{{c}_{\text{max}}}^{{\mathcal{C}}_{z}}}{\rho}_{m}^{{\mathcal{C}}_{z}}(m-1)$. The stability condition for the co-operative relay network can be expressed as

Similar to [2], the optimization is performed at *E*_{
b
}/*N*_{0}=*δ*+*ε* in dB, where *δ* is the lowest possible threshold for the given ${\mathbf{\rho}}^{{\mathcal{C}}_{z}}$ and ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{z}}$, and *ε* is an offset from the lowest threshold that offers more freedom in the selection of ${\mathbf{\lambda}}^{{\mathcal{C}}_{z}}$. The optimization algorithm is decomposed into an inner and an outer loop. For a fixed *E*_{
b
}/*N*_{0}, the outer loop finds an optimal variable node degree distribution for each protection class and thus finds an optimal variable node degree distribution for the whole code. The inner loop performs the maximization of the minimum variable node degree of a protection class. The optimal ${\mathbf{\lambda}}^{{\mathcal{C}}_{z}}$ is found by executing the optimization algorithm for a given check node degree distribution ${\mathbf{\rho}}^{{\mathcal{C}}_{z}}$, *E*_{
b
}/*N*_{0}=*δ*+*ε*, a maximum variable node degree ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{z}}$, a code rate *R*_{
z
}, and proportion vectors ${\mathbf{\alpha}}^{{\mathcal{C}}_{z}}$ and ${\mathbf{\beta}}^{{\mathcal{C}}_{z}}$.

- 1.
For any given

*E*_{ b }/*N*_{0}=*δ*+*ε*compute ${\stackrel{~}{\mathbf{\sigma}}}^{2}$. - 2.
Find ${\mathbf{\lambda}}^{{\mathcal{C}}_{z}}$ by executing the iterative linear programming optimization algorithm.

- 1.
Initialization: ${d}_{{v}_{\text{min}}}^{\left(k\right){\mathcal{C}}_{z}}={d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{z}}$

- 2.
While optimization failure:

- (a)Optimize$\begin{array}{l}\underset{{\mathbf{\lambda}}^{{\mathcal{C}}_{z}}}{max}\sum _{j=1}^{\underset{s}{\overset{{\mathcal{C}}_{z}}{N}}}\sum _{i=2}^{\underset{{v}_{\text{max}}}{\overset{{\mathcal{C}}_{z}}{d}}}\underset{{M}_{j,i}}{\overset{{\mathcal{C}}_{z},{C}_{k}}{\lambda}}\end{array}$(32)

under the constraints [ *C*_{1}]−[ *C*_{7}].

*C*

_{1}] Rate constraint, from [2] (see (27))

*C*

_{2}] Proportion distribution constraints

- i.from[2] (see (24))$\begin{array}{l}\sum _{j=1}^{{N}_{s}^{{\mathcal{C}}_{z}}}\sum _{k=1}^{{N}_{c}^{{\mathcal{C}}_{z}}}{{\lambda}_{{M}_{j}}^{{\mathcal{C}}_{z},{C}_{k}}}^{T}\mathbf{1}=1\end{array}$(34)
- i., from [2] (see (25) and (28))$\forall k\in \{1,\xb7\xb7\xb7,{N}_{c}^{{\mathcal{C}}_{z}}-1\}$i.$\phantom{\rule{-10.0pt}{0ex}}\begin{array}{c}\sum _{j=1}^{{N}_{s}^{{\mathcal{C}}_{z}}}\sum _{i=2}^{{d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{z}}}\frac{{\lambda}_{{M}_{j,i}}^{{\mathcal{C}}_{z},{C}_{k}}}{i}={\alpha}_{k}^{{\mathcal{C}}_{z}}\frac{{R}_{z}}{1-{R}_{z}}\sum _{i=2}^{{d}_{{c}_{\text{max}}}^{{\mathcal{C}}_{z}}}\frac{{\rho}_{i}^{{\mathcal{C}}_{z}}}{i}\end{array}$(35)$\forall j\in \{1,\xb7\xb7\xb7,{N}_{s}^{{\mathcal{C}}_{z}}\}$

*C*

_{3}] Convergence constraint, from[2] (see (23))

*C*

_{4}] Stability condition, from[2] (see (30) and (31))

*C*

_{5}] Rate-compatible constraint, from[3] (see (19))

*C*

_{6}] Minimum variable node degree constraint from [2]

*C*

_{7}] Previous optimization constraints from [2]

End (While)

When optimal variable node degree distributions for code ${\mathcal{C}}_{1}$ and ${\mathcal{C}}_{2}$ are found, we construct the parity check matrices *H*_{1} and *H*_{2}, as shown in Figure 4, using the ACE algorithm[20]. The ACE algorithm is modified to first construct *H*_{1} and then *H*_{2}, while keeping *H*_{1} fixed.

## 4 Simulation results

In the following subsections, the performance of the proposed code design has been evaluated for low- and high-rate codes of medium block. The performance of the codes has also been evaluated for short and long block length codes. The proposed codes’ performance has been compared to QC-LDPC codes[9], puncturing-based RC LDPC codes [6] and extension-based RC LDPC codes [3]. The proposed codes are simulated with equal transmission power setting at the source and the relay, i.e., *P*_{S 1}=*P*/2 and *P*_{
R
}=*P*/2. The channel gains *γ*_{
SD
}, *γ*_{
SR
}, and *γ*_{
RD
} from (4) are dependent upon path loss propagation only and we consider *τ*=2. Using the relay system model shown in Figure 3, simulations have been performed for different positions *d* of the relay relative to the source. Note that in the simulations for relay network, 20 decoding iterations at the relay and 20 decoding iterations at the destination are considered. In all the direct link simulations, 40 decoding iterations at the destination are considered.

### 4.1 Low-rate medium block length codes

This subsection describes the simulation results of the proposed codes of low-rate and medium block length for cooperative relay networks. The results are also compared to the results for quasi-cyclic LDPC codes (QC-LDPC) from [9]. The code ${\mathcal{C}}_{1}$ for BC mode, described by the parity-check matrix *H*_{1}, is designed by optimizing the variable node degree distributions for *R*_{1}=1/2, ${N}_{c}^{{\mathcal{C}}_{1}}=2$, ${N}_{s}^{{\mathcal{C}}_{1}}=1$, ${\alpha}^{{\mathcal{C}}_{1}}=1$, ${\beta}^{{\mathcal{C}}_{1}}=1$, ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{1}}=11$, and ${\rho}^{{\mathcal{C}}_{1}}={x}^{6}$. The code ${\mathcal{C}}_{2}$ for the half-duplex relay network is extended from the code ${\mathcal{C}}_{1}$ by appending extra parity bits to the codewords of the code ${\mathcal{C}}_{1}$. Variable node degree distributions of ${\mathcal{C}}_{2}$ are optimized for *R*_{2}=1/4, ${N}_{c}^{{\mathcal{C}}_{2}}=3$, ${N}_{s}^{{\mathcal{C}}_{2}}=2$, ${\alpha}^{{\mathcal{C}}_{2}}=\phantom{\rule{0.3em}{0ex}}\left[\phantom{\rule{0.3em}{0ex}}0.5\phantom{\rule{1em}{0ex}}0.5\right]$, ${\beta}^{{\mathcal{C}}_{2}}=\phantom{\rule{0.3em}{0ex}}\left[\phantom{\rule{0.3em}{0ex}}0.5\phantom{\rule{1em}{0ex}}0.5\right]$, ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{2}}=15$ and check node degree distribution ${\rho}^{{\mathcal{C}}_{2}}$. Suitable ${\rho}^{{\mathcal{C}}_{2}}$ for ${\mathcal{C}}_{2}$ are chosen by evaluating the performance of ${\mathcal{C}}_{2}$ for different check node degree distributions for different positions of relay as explained in the following subsection.

Like in [3], the code ${\mathcal{C}}_{1}$ in this paper is designed by considering the SNR of the source to destination channel, therefore there is only one channel class ${N}_{s}^{{\mathcal{C}}_{1}}=1$. Note that the SNR of the source to relay channel is always higher than the SNR of the source to destination channel as |*h*_{
SR
}|^{2}>|*h*_{
SD
}|^{2}, therefore the successful decoding of the codeword **w**_{1} of the code ${\mathcal{C}}_{1}$ is possible at the relay even when it fails at the destination. The codeword **w**_{1} is composed of equally protected information bits and less protected parity bits, by choosing ${N}_{c}^{{\mathcal{C}}_{1}}=2$. The code ${\mathcal{C}}_{2}$ is designed by taking into account the SNRs of the source to destination and the relay to destination channels, i.e., ${N}_{s}^{{\mathcal{C}}_{2}}=2$. The codeword **w**_{2} of ${\mathcal{C}}_{2}$, which is decoded at the destination, is composed of **w**_{1} and **w**_{
e
}. We let ${N}_{c}^{{\mathcal{C}}_{2}}=3$ for **w**_{2} assuming that it is composed of equally important information bits and less important parity bits of **w**_{1} and least important extra parity bits **w**_{
e
}. **w**_{1} is received at the destination from the source, while **w**_{
e
} is received at the destination from the relay. In relay networks, the source to destination channel is worse than the relay to destination channel. Therefore, the equally important information bits and less important parity bits of **w**_{1} in **w**_{2} are assigned to protection classes *C*_{1} and *C*_{2}, respectively, in order to give them good protection against the channel conditions of the source to destination channel and the least important bits **w**_{
e
} in **w**_{2} are assigned to protection class *C*_{3}, as the relay to destination channel has a better SNR than the source to destination channel.

We compare the performance of the proposed codes for relay networks with an LDPC code designed for the direct link. The design of the code for the direct link is the same as for ${\mathcal{C}}_{1}$ except that the code is designed with code rate 1/4 the same as for ${\mathcal{C}}_{2}$, a suitable check node degree distribution **ρ**=0.1350*x*^{2}+0.3695*x*^{3}+0.0684*x*^{4}+0.2812*x*^{5}+0.1459*x*^{6} (from LOPT [21]), full transmission power *P* and ${d}_{{v}_{\text{max}}}=15$. In the simulations, the lengths of the codewords **w**_{1} and **w**_{2} are *N*_{1}=1296 and *N*_{2}=2592, respectively. In the simulations of the direct link, an LDPC codeword of length *N*_{2} is used.

#### 4.1.1 Selection of good check node degree distributions

In this subsection, we analyze the performance of the proposed codes for different check node degree distributions and for different positions *d* of the relay. Optimization of the check node degree distributions is outside the scope of this paper. The aim of this analysis is to select a good check node degree distribution for each *d*.

Code ${\mathcal{C}}_{1}$ is designed with a concentrated check node degree distribution ${\mathbf{\rho}}^{{\mathcal{C}}_{1}}={x}^{6}$, since concentrated check node degree distributions have been shown to perform well[16]. The code ${\mathcal{C}}_{2}$ is designed with a non-concentrated check node degree distribution because it is shown in [3] that co-operative relay networks show better performance with LDPC codes designed with non-concentrated check node degree distributions. The maximum check node degrees are chosen as ${d}_{{c}_{\text{max}}}^{{\mathcal{C}}_{1}}={d}_{{c}_{\text{max}}}^{{\mathcal{C}}_{2}}=7$ in order to keep the same maximum check node degree as the code in [9] to simplify the comparison.

For the design of code ${\mathcal{C}}_{2}$, optimal variable node degree distributions are found by choosing a check node degree distribution for which code ${\mathcal{C}}_{2}$ gives good performance in terms of bit error rate for a specific position *d* of relay. The performance of code ${\mathcal{C}}_{2}$ is analyzed for four different check node degree distributions for different positions *d*. The four non-concentrated check node degree distributions for ${\mathcal{C}}_{2}$ satisfy the rate-compatible constraint for the check node degree distribution as defined by (17). It is observed that our designed codes have error floor at high bit error rate if the four check node degree distributions are chosen with a minimum check node degree less than 4 and have the waterfall region at high SNR if the four check node degree distributions are chosen with a minimum check node degree greater than 4. Therefore, to design the codes with the error floor at lower bit error rate and the waterfall region at lower SNR, the four check node degree distributions are chosen with a minimum check node degree equal to 4 but with different fraction of edges of the minimum degree. Furthermore, 4 is the highest possible minimum degree with which the four check node degree distributions still satisfy (17). The optimal variable node degree distribution at each *d* is found for each one of the four check node degree distributions.

*d*<0.6, the code designed with the check node degree distributions, which have the lowest fraction of edges of the minimum degree, has its waterfall region at high SNR as compared to the codes with check node degree distributions with a higher fraction of edges of the minimum degree. Figure 6 shows the performance of the proposed code with four different check node degree distributions for

*d*=0.2. It is noticed in Figure 6 that the proposed code design gives good performance with ${\mathbf{\rho}}^{{\mathcal{C}}_{2}}=0.4177{x}^{3}+0.5823{x}^{6}$. This holds also for

*d*=0.3 and 0.5, but simulation results are omitted here. Figure 7 shows the performance of the proposed codes with four different check node degree distributions for

*d*=0.4 and good performance is observed with ${\mathbf{\rho}}^{{\mathcal{C}}_{2}}=0.5{x}^{3}+0.5{x}^{6}$. This holds also for

*d*=0.1 but simulation results are omitted here. For

*d*=0.6,0.7,0.8,0.9 it is observed in Figure 8 that the choice of check node degree distribution does not have a large impact on the performance.

#### 4.1.2 Results for low-rate medium block length codes

*d*are designed with the suitable check node degree distributions found in the previous subsection. The simulation results for the proposed codes are shown in Figure 9 for different positions of the relay. The results show that the relay network achieves better performance with the proposed codes than the direct link with a LDPC code optimized for this link. At a BER of 10

^{−5}, the relay network has best performance for

*d*=0.4. At a BER of 10

^{−4}, the proposed code achieves 3.8-dB gain over the direct link transmission for the position of relay

*d*=0.4, as shown in Figure 9. A degradation in the performance of the proposed codes in the waterfall region can be observed when the relay is located closer to the destination than the source, i.e., for relay positions

*d*>0.5, as shown in Figure 9. Note that for all

*d*, both the source and the relay have fixed transmit power, i.e., the total power

*P*is divided in half for the source and the relay for all

*d*. The performance of the co-operative relay network depends mostly on the performance of the source to relay channel. At

*d*>0.5, the signal received at the relay has higher path loss than at

*d*≤0.5, so the probability of erroneous decoding of $\stackrel{~}{{\mathbf{w}}_{1}}$ in the relay increases with increasing

*d*. The erroneously decoded $\stackrel{~}{{\mathbf{w}}_{1}}$ is then used to calculate

**w**

_{ e }, which in turn is transmitted to the destination and increases the probability of erroneous decoding of the entire codeword

**w**

_{2}. This causes the performance degradation of the proposed codes at

*d*>0.5. At

*d*≥0.7, the relay network has worse performance than the direct link, at least for some SNRs.

### 4.2 High-rate medium block length codes

The performance of the proposed code design has also been analyzed for a high-rate code of medium block length. The code ${\mathcal{C}}_{1}$ is designed by optimizing the variable node degree distributions for *R*_{1}=0.9, ${N}_{c}^{{\mathcal{C}}_{1}}=2$, ${N}_{s}^{{\mathcal{C}}_{1}}=1$, ${\mathbf{\alpha}}^{{\mathcal{C}}_{1}}=1$, ${\mathbf{\beta}}^{{\mathcal{C}}_{1}}=1$, ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{1}}=7$, and ${\mathbf{\rho}}^{{\mathcal{C}}_{1}}={x}^{29}$. Variable node degree distributions of ${\mathcal{C}}_{2}$ are optimized for *R*_{2}=0.6, ${N}_{c}^{{\mathcal{C}}_{2}}=3$, ${N}_{s}^{{\mathcal{C}}_{2}}=2$, ${\alpha}^{{\mathcal{C}}_{2}}=\phantom{\rule{0.3em}{0ex}}\left[\phantom{\rule{0.3em}{0ex}}0.9\phantom{\rule{1em}{0ex}}0.1\right]$, ${\beta}^{{\mathcal{C}}_{2}}=\phantom{\rule{0.3em}{0ex}}[\phantom{\rule{0.3em}{0ex}}2/3\phantom{\rule{1em}{0ex}}1/3]$, ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{2}}=50$ and check node degree distribution ${\mathbf{\rho}}^{{\mathcal{C}}_{2}}$. The lengths of the codewords **w**_{1} and **w**_{2} are *N*_{1}=1,730 and *N*_{2}=2,592, respectively.

*d*has been chosen by using the procedure adopted in Section 4.1.1 for finding good ${\mathbf{\rho}}^{{\mathcal{C}}_{2}}$ for medium block length codes of low rate. We have analyzed the performance of ${\mathcal{C}}_{2}$ with four different non-concentrated check node degree distributions ${\mathbf{\rho}}^{{\mathcal{C}}_{2}}=0.25{x}^{10}+0.75{x}^{29},{\mathbf{\rho}}^{{\mathcal{C}}_{2}}=0.5{x}^{10}+0.5{x}^{29},{\mathbf{\rho}}^{{\mathcal{C}}_{2}}=0.4177{x}^{10}+0.5823{x}^{29}$, and ${\mathbf{\rho}}^{{\mathcal{C}}_{2}}=0.1{x}^{10}+0.9{x}^{29}$ for different positions

*d*. All the check node degree distributions for ${\mathcal{C}}_{2}$ satisfy the rate-compatible constraint for the check node degree distribution as defined by (17). In the same way as for the code with low rate in Section 4.1.1, the code ${\mathcal{C}}_{2}$ with high rate is also designed such that it has the error floor at lower bit error rates and the waterfall region at a lower SNR by keeping the minimum check node degree in all the check node degree distributions equal to 11. Note that 11 is the highest possible minimum degree with which the four check node degree distributions satisfy (17). The good check node degree distributions being found for

*d*=0.1,0.2,0.4 and 0.5 are ${\rho}^{{\mathcal{C}}_{2}}=0.25{x}^{10}+0.75{x}^{29}$, ${\rho}^{{\mathcal{C}}_{2}}=0.25{x}^{10}+0.75{x}^{29}$, ${\rho}^{{\mathcal{C}}_{2}}=0.5{x}^{10}+0.5{x}^{29}$, and ${\rho}^{{\mathcal{C}}_{2}}=0.25{x}^{10}+0.75{x}^{29}$, respectively. As for the low-rate code proposed in Section 4.1.1, the choice of check node degree distribution does not have a large impact on the performance for

*d*=0.6,0.7,0.8 and 0.9. The performance of the proposed code has been evaluated for

*d*=0.1,0.2,0.4,0.5,0.7 and 0.9 as shown in Figure 10. It is shown that the relay network has the best performance for

*d*=0.4, like the low-rate code in Section 4.1.2. It is reported in [9] that codes with different code rates have similar sensitivity to the relay position for a given transmit power distribution of the source and the relay; hence, for both cases of low- and high-rate codes, the optimal position where the proposed code achieves best performance is

*d*=0.4. The performance of the proposed high-rate code is compared to the performance of an LDPC code designed for the direct link. The design of the code for the direct link is the same as for ${\mathcal{C}}_{1}$ except that the code is designed with code rate 0.6, a suitable

**ρ**=0.5143

*x*

^{10}+0.0986

*x*

^{18}+0.0717

*x*

^{24}+0.2339

*x*

^{26}+0.0816

*x*

^{29}(from LOPT [22]), full transmission power

*P*and ${d}_{{v}_{\text{max}}}=50$. In the simulations of the direct link, the codeword length is 2,592 bits. At a BER of 10

^{−5}, the proposed high-rate code shows 1.3-dB gain over the direct link transmission for

*d*=0.4, as shown in Figure 10.

### 4.3 Short and long block length codes

In this subsection, the performance of the proposed code design has been analyzed for short and long block lengths. The codeword lengths for the short block length are *N*_{1}=512 and *N*_{2}=1,024 bits, and for the long block length, we consider *N*_{1}=5,344 and *N*_{2}=10,688 bits. Note that the proposed code optimization algorithm is independent of the code length. The parameters used for the design of the proposed code with short and long block lengths are the same as those used for medium block length in Section 4.1. For comparison, codes for the direct link with codeword lengths of 1,024 and 10,688 bits have been constructed, according to the degree distributions found for the medium length code in Section 4.1.

*d*=0.4. We have analyzed the performance of the proposed code with short and long block lengths at the optimal position of the relay, i.e., at

*d*=0.4. At a BER of 10

^{−4}, the proposed code with short and long block lengths have 3.8-dB gain over the direct link transmission for

*d*=0.4, as shown in Figure 11.

### 4.4 Comparison

This subsection provides a performance comparison of the codes proposed in this paper to QC-LDPC codes [9], extension-based RC LDPC codes [3] and puncturing-based RC LDPC codes [6].

#### 4.4.1 Comparison to QC-LDPC codes

*E*

_{ b }/

*N*

_{0}to achieve the same bit error probability.

Equal time slots are assumed in BC and MAC modes as well as equal transmit powers at the source and the relay, i.e., *P*_{S 1}=*P*/2 and *P*_{
R
}=*P*/2. In [9], the length of each codeword being transmitted in BC and MAC modes is 1,296 bits and the rate is 1/2. For the RC UEP-LDPC codes, the length of **w**_{1} is equal to 1,296 with rate 1/2. Additional parity bits **w**_{
e
} of length 1,296 are transmitted in MAC mode. Hence, the total number of bits received at the destination, both for the QC-LDPC codes and for the RC UEP-LDPC codes, is equal to 2,592 bits.

In [9], the LDPC code is decoded by the layered belief propagation (LBP) algorithm as defined in [23]. LBP is a variation of the standard belief propagation [1] which is designed for architecture aware (AA) LDPC codes with quasi-cyclic properties. It is shown that with LBP, the decoding of AA LDPC codes is improved by two times in the number of iterations required for a given error rate [24]. However, we have used standard belief propagation decoding to reproduce the results of [9] and to analyze the performance of the proposed LDPC codes in co-operative relay networks. To get the equivalent performance of LBP using standard belief propagation decoding, the number of decoding iterations is set to twice the number of iterations defined in [9]. In [9], ten decoding iterations at the relay and ten decoding iterations at the destination are used. We use 20 decoding iterations at both the relay and the destination.

From the comparison of Figures 9 and 12, the RC UEP-LDPC codes give better performance than the QC-LDPC codes in [9]. The QC-LDPC codes also show best performance for *d*=0.4. Under the same time slots, transmission power and using the DF strategy for the relay, the proposed codes outperform the codes in [9] with a gain of 1.9 dB at a BER of 10^{−4} for *d*=0.4, as shown in Figure 12. For the positions of the relay other than *d*=0.4, the proposed codes have different gains over the codes in [9], which can be observed by comparing the results for each *d* in Figures 9 and 12. The improved performance of the proposed codes over the QC-LDPC codes in [9] is due to separate optimization of the proposed codes for each relay position. Furthermore, the proposed code design is based on the rate-compatible coding scheme, which provides a better trade-off between bit error rate and data rate than the repetition coding scheme.

#### 4.4.2 Comparison to extension-based RC LDPC Codes

It is observed from Figure 9 that the performance of the proposed codes is close to the performance of the code proposed in [3] for the range of *d* between 0.2 and 0.3 (see the simulation of the optimized code of length 20,000 in [3] for a comparison). We perform the optimization of the code through an iterative linear programming algorithm in contrast to the code design in [3], which is achieved through differential evolution, a complex non-linear constrained optimization algorithm. There are three reasons why the RC UEP-LDPC codes are not exactly approaching the performance of the codes in [3]. First, the codeword length considered in [3] is almost ten times higher than the codeword length considered for the RC UEP-LDPC codes. Second, in [3], it is assumed that each codeword is perfectly decoded at the relay. Third, in [3], it is assumed that the source is active also in MAC mode.

#### 4.4.3 Comparison to puncturing-based RC LDPC codes

The performance of the proposed codes is also compared to puncturing-based RC LDPC codes proposed in [6] for half-duplex co-operative relay networks. The puncturing-based rate-compatible coding scheme proposed in [6] requires the design of only one single-user LDPC code as a mother code
. The mother code
with code rate *R*_{
c
} is first designed either by linear programming or by using an optimized LDPC degree distribution from [25]. Then, a proportion of the parity bits is punctured randomly, which raises the code rate of
to *R*_{
p
}. In BC mode, the punctured codeword of
is transmitted to the destination and the relay. The destination stores the punctured codeword until it receives the punctured parity bits from the relay. The punctured parity bits are recovered at the relay and are sent as extra parity bits to the destination in MAC mode. Thus, the destination receives the entire codeword corresponding to the mother code
with different SNRs for the punctured codeword and the extra parity bits as expressed by (8) and (9). The coding scheme proposed in [6] only requires the design of a mother code
and the code design proposed in [6] is therefore simpler than the code design proposed here, which requires joint design of two codes.

**ρ**=0.2465

*x*

^{3}+0.2990

*x*

^{5}+0.1307

*x*

^{6}+0.1774

*x*

^{7}+0.1464

*x*

^{8}(from LOPT [25]),

*R*

_{ c }=1/4 and ${d}_{{v}_{\text{max}}}=33$. The code is punctured at the source and the code rate is raised to

*R*

_{ p }=0.5. The performance of the coding scheme proposed in [6] is shown in Figure 13 for a codeword length of 2,048 bits and

*d*=0.4. It is assumed in [6], as in the coding strategy proposed here, that the source is silent in MAC mode, the codeword is imperfectly decoded at the relay and that extra parity bits from the relay are sent without encoding to the destination.

To compare the performance of the RC UEP-LDPC code proposed here to the coding scheme proposed in [6], the simulations of the RC UEP-LDPC codes are set with codeword lengths *N*_{1}=1,024 and *N*_{2}=2,048 for **w**_{1} and **w**_{2}, respectively, code rates *R*_{1}=0.5 and *R*_{2}=0.25 and *d*=0.4. Other parameters that are specific to the code design proposed here are as follows. Code ${\mathcal{C}}_{1}$ is designed by optimizing the variable node degree distributions for ${N}_{c}^{{\mathcal{C}}_{1}}=2$, ${N}_{s}^{{\mathcal{C}}_{1}}=1$, ${\mathbf{\alpha}}^{{\mathcal{C}}_{1}}=1$, ${\mathbf{\beta}}^{{\mathcal{C}}_{1}}=1$, ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{1}}=30$, and ${\mathbf{\rho}}^{{\mathcal{C}}_{1}}={x}^{8}$. Code ${\mathcal{C}}_{2}$ is designed by optimizing the variable node degree distributions for ${N}_{c}^{{\mathcal{C}}_{2}}=3$, ${N}_{s}^{{\mathcal{C}}_{2}}=2$, ${\mathbf{\alpha}}^{{\mathcal{C}}_{2}}=\phantom{\rule{0.3em}{0ex}}\left[\phantom{\rule{0.3em}{0ex}}0.5\phantom{\rule{1em}{0ex}}0.5\right]$, ${\mathbf{\beta}}_{{\mathcal{C}}_{2}}=\phantom{\rule{0.3em}{0ex}}\left[\phantom{\rule{0.3em}{0ex}}0.5\phantom{\rule{1em}{0ex}}0.5\right]$, ${d}_{{v}_{\text{max}}}^{{\mathcal{C}}_{2}}=33$, and check node degree distribution ${\rho}^{{\mathcal{C}}_{2}}$. The performance of ${\mathcal{C}}_{2}$ has been analyzed for four different check node degree distributions ${\rho}^{{\mathcal{C}}_{2}}=0.5{x}^{4}+0.5{x}^{8},{\rho}^{{\mathcal{C}}_{2}}=0.25{x}^{4}+0.75{x}^{8},{\rho}^{{\mathcal{C}}_{2}}=0.4177{x}^{4}+0.5823{x}^{8}$, and ${\rho}^{{\mathcal{C}}_{2}}=0.1{x}^{4}+0.9{x}^{8}$ at *d*=0.4 by using the procedure adopted in Section 4.1.1 to find a good ${\rho}^{{\mathcal{C}}_{2}}$ for ${\mathcal{C}}_{2}$. The good check node degree distribution for ${\mathcal{C}}_{2}$ at *d*=0.4 is ${\rho}^{{\mathcal{C}}_{2}}=0.5{x}^{4}+0.5{x}^{8}$. The code proposed in [6] shows worse performance than the code proposed here, as shown in Figure 13. The reason for this may be that the code proposed in [6] uses punctured codewords in BC mode, which results in a certain performance loss in the source to relay channel. Note that the overall performance of the co-operative relay network depends largely on the performance of the source to relay channel [4, 5]. Our proposed coding scheme uses an optimized code in BC mode to achieve the best performance in the source to relay channel.

## 5 Conclusions

Using a relay node increases the reliability and the data rate when the direct link between the source and the destination is bad due to fading and interference. This paper proposes an LDPC code design algorithm for half-duplex co-operative relay networks, which is based on density evolution using linear programming. The proposed codes are rate-compatible with unequal error protection and the codes are designed through optimization of the variable node degree distribution. The proposed codes are jointly optimized for the source to relay and the source to destination channels.

The performance of the proposed codes is evaluated with short, medium and long block lengths, and with low and high rates under realistic assumptions covering imperfect decoding at the relay and variation of SNR within a single codeword. The proposed codes of rate 0.25 outperform the direct link communication for short, medium and long block lengths with 3.8-dB gain at a BER of 10^{−4}, when the relay is located at position *d*=0.4. The proposed code of medium block length and high-rate outperforms the direct link communication with 1.3-dB gain at a BER of 10^{−5} for *d*=0.4. In contrast to the QC-LDPC codes proposed in [9], the proposed codes are optimized for each position of the relay relative to the source by considering the variation of SNR within a codeword due to the transmission over different relay channels. Under the same time slots, transmission power and processing of the codewords at the relay terminal with the decode and forward strategy, the proposed codes achieve a 1.9-dB gain over the repetition coding scheme-based QC-LDPC codes in [9] for the position of the relay *d*=0.4 at a BER of 10^{−4}. In contrast to the puncturing-based RC-LDPC codes proposed in [6], the proposed code uses an optimized LDPC code in BC mode to achieve the best performance in the source to relay channel. Although the proposed code design is based on a low-complexity linear programming algorithm, its performance is close to the performance of codes proposed in [3] being optimized by the more complex differential evolution algorithm and using much longer codewords.

## Endnote

^{a} In this paper, vectors are represented by bold letters.

## Declarations

### Acknowledgements

This study was supported by the Department of Computer Science, Electrical and Space Engineering, Luleå University of Technology, Sweden.

## Authors’ Affiliations

## References

- Chung SY, Richardson T, Urbanke R: Analysis of sum-product decoding of low-density parity-check codes using a Gaussian approximation.
*Inf. Theory IEEE Trans*2001, 47(2):657-670.MathSciNetView ArticleGoogle Scholar - Sandberg S, Von Deetzen N: Design of bandwidth-efficient unequal error protection LDPC codes.
*Commun. IEEE Trans*2010, 58(3):802-811.View ArticleGoogle Scholar - Li C, Yue G, Wang X, Khojastepour M: LDPC code design for half-duplex cooperative relay.
*Wireless Commun. IEEE Trans*2008, 7(11):4558-4567.View ArticleGoogle Scholar - Li C, Khojastepour M, Yue G, Wang X, Madihian M: Performance analysis and code design for cooperative relay channels. In
*Information Sciences and Systems, 2006 40th Annual Conference*. Princeton, NJ; 22–24 March 2006:1032-1037.View ArticleGoogle Scholar - Li C, Yue G, Khojastepour M, Wang X, Madihian M: LDPC-coded cooperative relay systems: performance analysis and code design.
*Commun. IEEE Trans*2008, 56(3):485-496.View ArticleGoogle Scholar - Wu M, Weitkemper P, Wubben D, Kammeyer KD: Comparison of distributed LDPC coding schemes for decode-and-forward relay channels. In
*Smart Antennas (WSA), 2010 International ITG Workshop*. Bremen; 23–24 Feb 2010:127-134.View ArticleGoogle Scholar - Chakrabarti A, de Baynast A, Sabharwal A, Aazhang B: Low density parity check codes for the relay channel.
*Selected Areas Commun. IEEE J*2007, 25(2):280-291.View ArticleGoogle Scholar - Razaghi P, Yu W: Bilayer low-density parity-check codes for decode-and-forward in relay channels.
*Inf. Theory IEEE Trans*2007, 53(10):3723-3739.MathSciNetView ArticleGoogle Scholar - Karkooti M, Cavallaro J: Cooperative communications using scalable, medium block-length LDPC codes. In
*IEEE Wireless Communications and Networking Conference 2008*. Las Vegas, NV, 31 March-03 April 2008; 2008:88-93.View ArticleGoogle Scholar - Laneman J, Tse D, Wornell G: Cooperative diversity in wireless networks: Efficient protocols and outage behavior.
*Inf. Theory IEEE Trans*2004, 50(12):3062-3080.MathSciNetView ArticleGoogle Scholar - Khuong HV, Kong HY: Performance analysis of cooperative communications protocol using sum-product algorithm for wireless relay networks. In
*Advanced Communication Technology, 2006. ICACT 2006. The 8th International Conference, Volume 3*. Phoenix Park; 20–22 Feb 2006, 6:-2173.Google Scholar - Khojastepour M, Ahmed N, Aazhang B: Code design for the relay channel and factor graph decoding. In
*Signals, Systems and Computers, 2004. Conference Record of the Thirty-Eighth Asilomar Conference on, Volume 2*. Pacific Grove, CA; 7–10 Nov 2004:2000-2004.View ArticleGoogle Scholar - Rappaport TS:
*Wireless Communications, Principles and Practice*. Upper Saddle River: Prentice Hall PTR; 1996.Google Scholar - Kschischang F, Frey B, Loeliger HA: Factor graphs and the sum-product algorithm.
*Inf. Theory IEEE Trans*2001, 47(2):498-519.MathSciNetView ArticleGoogle Scholar - Tanner R: A recursive approach to low complexity codes.
*Inf. Theory IEEE Trans*1981, 27(5):533-547.MathSciNetView ArticleGoogle Scholar - Richardson T, Shokrollahi M, Urbanke R: Design of capacity-approaching irregular low-density parity-check codes.
*Inf. Theory IEEE Trans*2001, 47(2):619-637.MathSciNetView ArticleGoogle Scholar - Bi D, Perez L: Rate-compatible low-density parity-check codes with rate-compatible degree profiles.
*Electron. Lett*2006, 42: 41-43.View ArticleGoogle Scholar - Li J, Narayanan KR: Rate-compatible low density parity check codes for capacity-approaching ARQ schemes in packet data communications. In
*Proceeding of the 2002 Int. Conf. Commun., Int.rnet, and Inform. Tech.Tech. (CIIT)*. St. Thomas; 18–20 November 2002:201-206.Google Scholar - Yazdani M, Banihashemi A: On construction of rate-compatible low-density parity-check codes.
*Commun. Lett. IEEE*2004, 8(3):159-161.View ArticleGoogle Scholar - Tian T, Jones C, Villasenor J, Wesel R: Selective avoidance of cycles in irregular LDPC code construction.
*Commun. IEEE Trans*2004, 52(8):1242-1247.View ArticleGoogle Scholar - LOPT - Online Optimization of LDPC Degree Distributions Accessed 27 September 2012 [http://sonic.newcastle.edu.au/ldpc/lopt/results/a7e98878c] [] Accessed 27 September 2012
- LOPT - Online Optimization of LDPC Degree Distributions Accessed 8 November 2013 [http://sonic.newcastle.edu.au/ldpc/lopt/results/a9bbcb2c1] [] Accessed 8 November 2013
- Mansour M, Shanbhag N: High-throughput LDPC decoders.
*Very Large Scale Integration (VLSI) Syst. IEEE Trans*2003, 11(6):976-996.View ArticleGoogle Scholar - Hocevar D: A reduced complexity decoder architecture via layered decoding of LDPC codes. In
*IEEE Workshop on Signal Processing Systems 2004*. Austin, TX; 13–15 Oct 2004:107-112.Google Scholar - LOPT - Online Optimization of LDPC Degree Distributions Accessed 19 November 2013 [http://sonic.newcastle.edu.au/ldpc/lopt/results/af562fb8c] [] Accessed 19 November 2013

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.