RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code Constructions and Performance Analysis

*Chen Chen and Fengfan Yang*

### **Abstract**

This chapter introduces the Reed-Solomon (RS) codes and the distributed RS-coded cooperative system over the Rayleigh fading channel, where the encoding and decoding procedures of the RS codes are elaborated. Besides, two optimized selection approaches, i.e., the exhaustive search approach and partial search approach, are employed in the relay to obtain a resultant code at the destination with better weight distribution. Moreover, the two joint decoding algorithms, namely naive and smart algorithms, are presented that further improve the overall average bit error rate (BER) performance of the cooperative scheme. Also, the performance analysis of the distributed RS-coded cooperative scheme is provided in detailed.

**Keywords:** BCH codes, RS codes, relay cooperation, distributed RS codes, joint decoding

### **1. Introduction**

Fifth-generation (5G) communication systems may accommodate the traffic generated by a variety of wireless network types such as Device-to-Device (D2D) and sensor networks. Hence, it is reasonable to consider the short-information-transmission scenario. Generally, one of the most important aspects of transmission is to combat the signal fading over a wireless channel. Spatial diversity has proven to be the most effective method for mitigating the impacts of fading [1]. However, many mobile communication devices are unable to leverage spatial diversity techniques owing to size, power, and hardware complexity. Therefore, coded cooperative diversity with the aid of the relay was proposed to provide uplink diversity via single antenna sharing. Factually, various distributed linear block codes have been employed in the coded cooperation such as the distributed turbo codes (DTC) [2], distributed

low-density parity-check codes (D-LDPC) [3], and polar codes [4]. Nevertheless, for the non-binary codes with short information sizes in coded cooperation, the literature has not been thoroughly investigated. Note that Reed-Solomon (RS) codes are a well-known class of non-binary codes with low encoding and decoding complexity. Furthermore, as a member of maximum distance separatable (MDS) codes, shortto-medium-length RS codes perform well in correcting random burst errors. Hence, RS-coded relay cooperation is considered a promising exploration to support short information transmission [5]. In addition, the distinct information selection in the relay may result in a different resultant code at the destination, which will influence the performance of the overall transmission. Hence, the optimized selection approaches [6] at the relay are also introduced in this chapter.

The remaining contexts of this chapter are summarized as follows. Section 2 provides a brief introduction to the BCH codes and RS codes. The general distributed RS-coded cooperative system is presented in Section 3. Section 4 exhibits the two optimized selection approaches and the corresponding examples. The joint decoding algorithms and the performance analysis are elaborated in Section 5. Section 6 concludes this chapter.

### **2. BCH codes and RS codes**

#### **2.1 BCH codes**

Bose-Chaudhuri-Hocquenghem (BCH) codes are a kind of cyclic codes that can effectively correct random errors [7], which can be classified into binary BCH codes and non-binary BCH codes according to the different fields from which symbols are taken. Given any finite field GF qð Þ and its extension field GF *<sup>q</sup>*<sup>m</sup> ð Þ, where *<sup>q</sup>* is a prime or a power of a prime and *m* is a positive integer, let *α* be a non-zero and non-one element of GF *<sup>q</sup>*<sup>m</sup> ð Þ. If the generator polynomial *g x*ð Þ<sup>∈</sup> *F x*½ �ð Þ *<sup>F</sup>* <sup>∈</sup> *GF q*ð Þ is the lowestdegree-polynomial with consecutive roots *α*, *α*2, ⋯, *α*<sup>2</sup>*<sup>t</sup>* � �, then a cyclic code generated from this polynomial *g x*ð Þ is called a BCH code.

Assume that *<sup>φ</sup>i*ð Þ *<sup>x</sup>* denotes the minimum polynomial of *<sup>α</sup><sup>i</sup>* ð Þ <sup>1</sup>≤*<sup>i</sup>* <sup>≤</sup>2*<sup>t</sup>* and *<sup>e</sup><sup>i</sup>* represents the order of *α<sup>i</sup>* . Therefore, the generator polynomial *g x*ð Þ and the code length *n* of BCH code are provided as,

$$\mathbf{g(x)} = \text{LCM}\{\boldsymbol{\rho}\_1(\mathbf{x}), \boldsymbol{\rho}\_2(\mathbf{x}), \dots, \boldsymbol{\rho}\_i(\mathbf{x})\}, \boldsymbol{n} = \text{LCM}\{\boldsymbol{e}\_1, \mathbf{e}\_2, \dots, \mathbf{e}\_2 \mathbf{t}\}, \tag{1}$$

where *LCM* denotes the least common multiple. In particular, when *q* ¼ 2, it is the binary BCH code. Also, if *<sup>α</sup>* is the primitive element in GF *<sup>q</sup>*<sup>m</sup> ð Þ, it is a primitive BCH code of code length *<sup>n</sup>* <sup>¼</sup> *<sup>q</sup><sup>m</sup>* � 1. Otherwise, the BCH code is non-primitive where n is the factor of *<sup>q</sup><sup>m</sup>* � 1. Consider a BCH code of length *<sup>n</sup>*, its parity check matrix is provided as [8],

$$H = \begin{bmatrix} 1 & a & a^2 & a^3 & \cdots & a^{n-1} \\ 1 & a^2 & (a^2)^2 & (a^2)^3 & \cdots & (a^2)^{n-1} \\ 1 & a^3 & (a^3)^2 & (a^3)^3 & \cdots & (a^3)^{n-1} \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & a^{2t} & (a^{2t})^2 & (a^{2t})^3 & \cdots & (a^{2t})^{n-1} \end{bmatrix}. \tag{2}$$

*RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code… DOI: http://dx.doi.org/10.5772/intechopen.109081*

Then, the minimum distance of the *t*-error-correcting BCH codes is at least 2*t* þ 1. The proof process can be referred to [9]. This lower bound on the minimum distance is called the BCH bound.

#### **2.2 RS codes: encoding and decoding**

The most important subclass of *q*-ary BCH codes is the RS codes, a particular subclass of *q*-ary BCH codes for which *m* ¼ 1. The efficient encoding and harddecision decoding algorithms of RS codes as well as their improved capacity to rectify random burst errors have made them extensively applied for error control in both storage systems and digital communication [9]. The following describes the specific characteristic, encoding, and decoding processes of the RS codes.

#### *2.2.1 Free distance of RS codes*

Suppose that *α* is a primitive element in *GF q*ð Þ. The generator polynomial g(x) of *<sup>t</sup>*-error-correcting ð Þ *<sup>n</sup>*, *<sup>k</sup>* RS code has *<sup>α</sup>*, *<sup>α</sup>*2, <sup>⋯</sup>, *<sup>α</sup>*<sup>2</sup>*<sup>t</sup>* as all its roots, where all symbols of RS codes are chosen from *GF q*ð Þ, *n* and *k* denote the code length and length of information sequence, respectively. Therefore, the minimum polynomial *φi*ð Þ *x* corresponding to each *<sup>α</sup><sup>i</sup>* is *<sup>x</sup>* � *<sup>α</sup><sup>i</sup>* . And *g x*ð Þ can be obtained from Eq. (1) given as,

$$\begin{split} \mathbf{g}(\mathbf{x}) &= (\mathbf{x} - a)(\mathbf{x} - a^2) \cdots (\mathbf{x} - a^{2t}) \\ &= \mathbf{g}\_0 + \mathbf{g}\_1 \mathbf{x} + \mathbf{g}\_2 \mathbf{x}^2 + \cdots + \mathbf{g}\_{2t-1} \mathbf{x}^{2t-1} + \mathbf{x}^{2t}, \end{split} \tag{3}$$

where *gi* <sup>∈</sup> *GF q*ð Þ for 0 <sup>&</sup>lt;*<sup>i</sup>* <sup>&</sup>lt;2*t*. Since the all roots of *xq*�<sup>1</sup> � 1 are *<sup>α</sup>*, *<sup>α</sup>*2, … , *<sup>α</sup>*<sup>2</sup>*<sup>t</sup>* , *g x*ð Þ can divides *xq*�<sup>1</sup> � 1. Thus, *g x*ð Þ generates a *<sup>q</sup>*-ary RS code of length *<sup>n</sup>* <sup>¼</sup> *<sup>q</sup>* � 1 with exactly 2*t* parity-check symbols, which means *n* � *k* ¼ 2*t*.

From the BCH bound and the Eq. (3) where the code polynomial comprises 2*t* þ 1 terms. Hence, there cannot be a zero for any of the coefficients in *g x*ð Þ can be zero. Otherwise, the resultant codeword would have a weight less than 2*t* þ 1, which would be in conflict with the BCH bound on the minimum distance. As a result, the *g x*ð Þ corresponds to a codeword with a weight of precisely 2*t* þ 1. It follows that the minimum distance of the *t*-error-correcting RS code generated by Eq. (3) is determined as exactly 2*t* þ 1, i.e., *dmin* ¼ 2*t* þ 1. In addition, the minimum distance of the RS code is more than the number of its parity-check symbols. Therefore, RS codes are a prominent subgroup of the maximum distance separable (MDS) codes [10]. In this chapter, we simply consider *q* ¼ 2.

Example 1. Let *α* is a primitive element in *GF* 2<sup>4</sup> constructed based on the primitive polynomial 1 <sup>þ</sup> *<sup>x</sup>* <sup>þ</sup> *<sup>x</sup>*<sup>4</sup> shown in **Table 1**. Consider the double-errorcorrecting RS codes with the symbols from *GF* <sup>2</sup><sup>4</sup> . The generator polynomial *g x*ð Þ of this code has *<sup>α</sup>*, *<sup>α</sup>*2, *<sup>α</sup>*3, *<sup>α</sup>*<sup>4</sup> as all its roots. Hence, *g x*ð Þ is acquired as,

$$\begin{aligned} \mathbf{g(x)} &= (\mathbf{x} - a) \left( \mathbf{x} - a^2 \right) \left( \mathbf{x} - a^3 \right) \left( \mathbf{x} - a^4 \right) \\ &= a^{10} + a^3 \mathbf{x} + a^6 \mathbf{x}^2 + a^{13} \mathbf{x}^3 + \mathbf{x}^4, \end{aligned} \tag{4}$$

The code is (15,11) RS code over the *GF* 24 that can correct two errors. And, the minimum distance of this RS code is 5.

The end of Example 1.


**Table 1.**

*Galois field GF* 24 ð Þ *with the primitive polynomial* <sup>1</sup> <sup>þ</sup> *<sup>α</sup>* <sup>þ</sup> *<sup>α</sup>*<sup>4</sup> <sup>¼</sup> <sup>0</sup>*.*

#### *2.2.2 Encoding of RS codes*

Given the generator polynomial *g x*ð Þ illustrated in Eq. (3), the polynomial *c x*ð Þ of the codeword **c** of the RS code is generated as,

$$
\mathfrak{c}(\mathfrak{x}) = \mathfrak{g}(\mathfrak{x})\mathfrak{u}(\mathfrak{x}),
\tag{5}
$$

where *u x*ð Þ¼ *<sup>u</sup>*<sup>0</sup> <sup>þ</sup> *<sup>u</sup>*1*<sup>x</sup>* <sup>þ</sup> *<sup>u</sup>*2*x*<sup>2</sup> <sup>þ</sup> <sup>⋯</sup> <sup>þ</sup> *uk*�<sup>1</sup>*xk*�<sup>1</sup> is the polynomial of the information sequence m, *ui* <sup>∈</sup> GF 2*<sup>m</sup>* ð Þ for *<sup>i</sup>* <sup>¼</sup> 0, 1, … , *<sup>k</sup>* � 1. Moreover, the polynomial *c x*ð Þ of systematic codeword **c** is obtained as,

$$
\omega(\mathbf{x}) = \mathbf{x}^{n-k}\omega(\mathbf{x}) + p(\mathbf{x}), \tag{6}
$$

where *p x*ð Þ¼ *<sup>p</sup>*<sup>0</sup> <sup>þ</sup> *<sup>p</sup>*1*<sup>x</sup>* <sup>þ</sup> *<sup>p</sup>*2*x*<sup>2</sup> <sup>þ</sup> <sup>⋯</sup> <sup>þ</sup> *pn*�*k*�<sup>1</sup>*xn*�*k*�<sup>1</sup> *pi* <sup>∈</sup> GF 2*<sup>m</sup>* ð Þ, *<sup>i</sup>* <sup>¼</sup> 0, 1, … , *<sup>n</sup>* � *k* � 1Þ denotes the parity-check polynomial which can be computed by the polynomial division as,

$$p(\mathbf{x}) = \mathbf{x}^{n-k} u(\mathbf{x}) / \mathbf{g}(\mathbf{x}). \tag{7}$$

#### *2.2.3 Decoding of RS codes*

Consider a ð Þ *n*, *k* RS code with the symbols from GFð Þ*q* . Suppose that a codeword *c x*ð Þ¼ *<sup>c</sup>*<sup>0</sup> <sup>þ</sup> *<sup>c</sup>*1*<sup>x</sup>* <sup>þ</sup> <sup>⋯</sup> <sup>þ</sup> *cn*�<sup>1</sup>*xn*�<sup>1</sup> is transmitted, and the transmission error result in the following received vector *r x*ð Þ¼ *<sup>r</sup>*<sup>0</sup> <sup>þ</sup> *<sup>r</sup>*1*<sup>x</sup>* <sup>þ</sup> <sup>⋯</sup> <sup>þ</sup> *rn*�<sup>1</sup>*xn*�1. Let *e x*ð Þ¼ *<sup>e</sup>*<sup>0</sup> <sup>þ</sup> *<sup>e</sup>*1*<sup>x</sup>* <sup>þ</sup> <sup>⋯</sup> <sup>þ</sup> *en*�<sup>1</sup>*x<sup>n</sup>*�<sup>1</sup> be the error pattern which have relationship with *c x*ð Þ and *r x*ð Þ as,

$$e(\mathbf{x}) = r(\mathbf{x}) - c(\mathbf{x}).\tag{8}$$

Assume that error pattern *e x*ð Þ contains *τ* errors (nonzero components) at locations *xj* <sup>1</sup> , *xj* <sup>2</sup> , … , *xj <sup>τ</sup>* , where 0 ≤*j* <sup>1</sup> <*j* <sup>2</sup> < ⋯ < *j <sup>τ</sup>* ≤*n* � 1. Then,

$$e(\mathbf{x}) = e\_{j\_1}\mathbf{x}^{j\_1} + e\_{j\_2}\mathbf{x}^{j\_2} + \cdots + e\_{j\_r}\mathbf{x}^{j\_r} \tag{9}$$

*RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code… DOI: http://dx.doi.org/10.5772/intechopen.109081*

where *xj <sup>i</sup>* denotes error-location and *ej <sup>i</sup>* is error values, 1≤*i* ≤*τ*. And the specific decoding steps are given as follows,

Step 1. Compute the syndrome. The syndrome is a 2*t*-tuple vector as,

$$\begin{aligned} \mathbf{S} &= (\mathbf{S}\_1, \mathbf{S}\_2, \dots, \mathbf{S}\_{2t}) = \mathbf{r} \cdot H^T \\ &= [r\_0, r\_1, \dots, r\_{n-1}] \cdot \left[ \begin{array}{ccccc} \mathbf{1} & \mathbf{1} & \mathbf{1} & \cdots & \mathbf{1} \\ a & a^2 & a^3 & \cdots & a^{2t} \\ a^2 & (a^2)^2 & (a^3)^2 & \cdots & (a^{2t})^2 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ a^{n-1} & (a^2)^{n-1} & (a^3)^{n-1} & \cdots & (a^{2t})^{n-1} \end{array} \right] . \end{aligned} \tag{10}$$

Evidently, *Si* <sup>¼</sup> *<sup>r</sup> <sup>α</sup><sup>i</sup>* � �ð Þ <sup>1</sup><sup>≤</sup> *<sup>i</sup>*≤2*<sup>t</sup>* .

Step 2. Determined the error-location polynomial *σ*ð Þ *x* and the error value evaluator *Z*0ð Þ *x* based on Euclidean algorithm.

(1) From Eq. (8) and (10), we obtain,

$$\mathbf{S}\_i = r(a^i) = e(a^i) + c(a^i) = e(a^i). \tag{11}$$

From Eq. (9), all 2*t* syndromes are obtained,

$$\begin{aligned} S\_1 &= e\_{j\_1} \left( a^{j\_1} \right)^1 + e\_{j\_2} \left( a^{j\_2} \right)^1 + \dots + e\_{j\_r} \left( a^{j\_r} \right)^1, \\ S\_2 &= e\_{j\_1} \left( a^{j\_1} \right)^2 + e\_{j\_2} \left( a^{j\_2} \right)^2 + \dots + e\_{j\_r} \left( a^{j\_r} \right)^2, \\ &\vdots \\ S\_{2t} &= e\_{j\_1} \left( a^{j\_1} \right)^{2t} + e\_{j\_2} \left( a^{j\_2} \right)^{2t} + \dots + e\_{j\_r} \left( a^{j\_r} \right)^{2t}, \end{aligned} \tag{12}$$

where *α<sup>j</sup> <sup>i</sup>* is called the error location number and *ej <sup>i</sup>* is the error value 1ð Þ ≤ *i*≤2*t* . Let *βi*≜*α<sup>j</sup>* <sup>1</sup> , *δi*≜*ej i* , Eq. (12) can be simplified as,

$$\begin{array}{rcl} \mathcal{S}\_{1} &= \delta\_{1}\boldsymbol{\beta}\_{1} + \delta\_{2}\boldsymbol{\beta}\_{2} + \cdots + \delta\_{\tau}\boldsymbol{\beta}\_{\tau}, \\ \mathcal{S}\_{2} &= \delta\_{1}\boldsymbol{\beta}\_{1}^{2} + \delta\_{2}\boldsymbol{\beta}\_{2}^{2} + \cdots + \delta\_{\tau}\boldsymbol{\beta}\_{\tau}^{2}, \\ &\vdots \\ \mathcal{S}\_{2t} &= \delta\_{1}\boldsymbol{\beta}\_{1}^{2t} + \delta\_{2}\boldsymbol{\beta}\_{2}^{2t} + \cdots + \delta\_{\tau}\boldsymbol{\beta}\_{\tau}^{2t}. \end{array} \tag{13}$$

(2) To solve these 2*t* equations, the error-location polynomial is firstly defined as:

$$\begin{split} \sigma(\mathbf{x}) &= (\mathbf{1} - \boldsymbol{\beta}\_1 \boldsymbol{\mathfrak{x}})(\mathbf{1} - \boldsymbol{\beta}\_2 \boldsymbol{\mathfrak{x}}) \cdots (\mathbf{1} - \boldsymbol{\beta}\_\tau \boldsymbol{\mathfrak{x}}) \\ &= \sigma\_0 + \sigma\_1 \boldsymbol{\mathfrak{x}} + \sigma\_2 \boldsymbol{\mathfrak{x}}^2 + \cdots + \sigma\_\tau \boldsymbol{\mathfrak{x}}^\tau. \end{split} \tag{14}$$

The roots of *<sup>σ</sup>*ð Þ *<sup>x</sup>* are *<sup>β</sup>*�<sup>1</sup> <sup>1</sup> , *β*�<sup>1</sup> <sup>2</sup> , … , *β*�<sup>1</sup> *<sup>τ</sup>* , which are the inverses of the error-location numbers [11].

(3) Define error-value evaluator *Z*0ð Þ *x* . Firstly, the syndrome polynomial *S x*ð Þ is defined as,

$$\mathbf{S}(\mathbf{x}) \triangleq \mathbf{S}\_1 + \mathbf{S}\_2 \mathbf{x} + \mathbf{S}\_3 \mathbf{x}^2 + \dots + \mathbf{S}\_{2t} \mathbf{x}^{2t-1} + \mathbf{S}\_{2t+1} \mathbf{x}^{2t} + \dots = \sum\_{j=1}^{\infty} \mathbf{S}\_j \mathbf{x}^{j-1}. \tag{15}$$

Then, *S x*ð Þ can be further simplified as,

$$S(\mathbf{x}) = \sum\_{j=1}^{\infty} \mathbf{x}^{j-1} \sum\_{l=1}^{r} \delta\_l \theta\_l^j = \sum\_{l=1}^{r} \delta\_l \theta\_l \sum\_{j=1}^{\infty} \left( \mathbf{x} \delta\_l \right)^{j-1}. \tag{16}$$

Since <sup>1</sup> <sup>1</sup>�*βlx* <sup>¼</sup> <sup>P</sup><sup>∞</sup> *<sup>j</sup>*¼<sup>1</sup> *<sup>x</sup>β<sup>l</sup>* ð Þ*j*�<sup>1</sup> , Thus Eq. (16) comes to,

$$S(\mathbf{x}) = \sum\_{l=1}^{\tau} \frac{\delta\_l \beta\_l}{1 - \beta\_l \mathbf{x}}.\tag{17}$$

Then, we have,

$$\begin{aligned} \sigma(\mathbf{x})\mathbf{S}(\mathbf{x}) &= (\mathbf{1} + \sigma\_1 \mathbf{x} + \dots + \sigma\_r \mathbf{x}^r) \left( \mathbf{S}\_1 + \mathbf{S}\_2 \mathbf{x} + \mathbf{S}\_3 \mathbf{x}^2 + \dotsb \right) = \mathbf{S}\_1 + (\mathbf{S}\_2 + \sigma\_1 \mathbf{S}\_1) \\ &+ (\mathbf{S}\_3 + \sigma\_1 \mathbf{S}\_2 + \sigma\_2 \mathbf{S}\_1) \mathbf{x}^2 + \dotsb + (\mathbf{S}\_{2t} + \sigma\_1 \mathbf{S}\_{2t-1} + \sigma\_2 \mathbf{S}\_{2t-2} + \dotsb + \sigma\_r \mathbf{S}\_{2t-r}) \mathbf{x}^{2t-1} \\ &+ (\mathbf{S}\_{2t} + \sigma\_1 \mathbf{S}\_{2t-1} + \sigma\_2 \mathbf{S}\_{2t-2} + \dotsb + \sigma\_r \mathbf{S}\_{2t-r}) \mathbf{x}^2 t + \dotsb \end{aligned} \tag{18}$$

Therefore,

$$\begin{split} Z\_0(\mathbf{x}) & \stackrel{\scriptstyle \triangleq}{=} \left\{ \prod\_{l=1}^{\tau} (\mathbf{1} - \boldsymbol{\beta}\_l \mathbf{x}) \right\} \cdot \left\{ \sum\_{l=1}^{\tau} \frac{\delta\_l \boldsymbol{\beta}\_l}{\mathbf{1} - \boldsymbol{\beta}\_l \mathbf{x}} \right\} \\ &= \sum\_{l=1}^{\tau} \frac{\delta\_l \boldsymbol{\beta}\_l}{\mathbf{1} - \boldsymbol{\beta}\_l \mathbf{x}} \cdot \prod\_{i=1}^{\tau} (\mathbf{1} - \boldsymbol{\beta}\_i \mathbf{x}) \\ &= \sum\_{l=1}^{\tau} \delta\_l \boldsymbol{\beta}\_l \cdot \prod\_{i=1, i \neq l}^{\tau} (\mathbf{1} - \boldsymbol{\beta}\_i \mathbf{x}). \end{split} \tag{19}$$

Step 3. Solve the key equation based on the Euclidean algorithm. In the expansion of *<sup>σ</sup>*ð Þ *<sup>x</sup> S x*ð Þ, only the coefficient of the first 2*<sup>t</sup>* terms (from *<sup>x</sup>*<sup>0</sup> to *<sup>x</sup>*<sup>2</sup>*<sup>t</sup>* ) are known. Let *Z*0ð Þ¼ *x* ½ � *σ*ð Þ *x S x*ð Þ <sup>2</sup>*<sup>t</sup>* denote the first 2*t* terms of *σ*ð Þ *x S x*ð Þ. Then, *σ*ð Þ *x S x*ð Þ� ½ � *σ*ð Þ *x S x*ð Þ <sup>2</sup>*<sup>t</sup>* is divisible by *x*<sup>2</sup>*<sup>t</sup>* . This simply says that if *<sup>σ</sup>*ð Þ *<sup>x</sup> S x*ð Þ is divided by *<sup>x</sup>*<sup>2</sup>*<sup>t</sup>* , the remainder is *Z*0ð Þ *x* .

Therefore, we obtain,

$$
\sigma(\mathbf{x})\mathbf{S}(\mathbf{x}) = Z\_0(\mathbf{x}) \mod \mathbf{x}^{2t},\tag{20}
$$

which is called the key equation in decoding BCH code. Thus, the key equation can be expressed in the following forms:

$$
\sigma(\mathbf{x})\mathbf{S}(\mathbf{x}) = \mathbf{Q}(\mathbf{x})\mathbf{x}^{\text{2t}} + \mathbf{Z}\_0(\mathbf{x}) \Rightarrow \mathbf{Z}\_0(\mathbf{x}) = -\mathbf{Q}(\mathbf{x})\mathbf{x}^{\text{2t}} + \sigma(\mathbf{x})\mathbf{S}(\mathbf{x}).\tag{21}
$$

Setting,

$$a(\mathfrak{x}) = \mathfrak{x}^{\mathfrak{x}}, b(\mathfrak{x}) = \mathbb{S}(\mathfrak{x}).\tag{22}$$

Then the key equation is exactly in the form given as follows,

$$Z\_0(\mathbf{x}) = -Q(\mathbf{x})a(\mathbf{x}) + \sigma(\mathbf{x})b(\mathbf{x}).\tag{23}$$

*RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code… DOI: http://dx.doi.org/10.5772/intechopen.109081*

Therefore, *σ*ð Þ *x* and *Z*0ð Þ *x* can be found by the Euclidean iterative division algorithm. Let

$$Z\_0^{(i)}(\mathbf{x}) = r\_i(\mathbf{x}), \sigma^{(i)}(\mathbf{x}) = \mathbf{g}\_i(\mathbf{x}), \boldsymbol{\gamma}^{(i)}(\mathbf{x}) = -\mathbf{Q}^{(i)}(\mathbf{x}) = \boldsymbol{f}\_i(\mathbf{x}).\tag{24}$$

To find *σ*ð Þ *x* and *Z*0ð Þ *x* , we carry out the iteration process as follows: (1) Firstly, the initial conditions are given as,

$$\begin{aligned} Z\_0^{(-1)}(\mathbf{x}) &= \mathbf{x}^{2t} \left( a(\mathbf{x}) = \mathbf{x}^{2t} \right), \\ Z\_0^{(0)}(\mathbf{x}) &= \mathcal{S}(\mathbf{X}) (b(\mathbf{x}) = \mathcal{S}(\mathbf{x})), \\ \mathcal{Y}^{(-1)}(\mathbf{x}) &= \sigma^{(0)}(\mathbf{x}) = \mathbf{1}, \\ \mathcal{Y}^{(0)}(\mathbf{x}) &= \sigma^{(-1)}(\mathbf{x}) = \mathbf{0}. \end{aligned} \tag{25}$$

(2) Step *i*: at the *i*-th step,

$$\begin{aligned} Z\_0^{(i-2)}(\varkappa) &= q\_1(\varkappa) Z\_0^{(i-1)}(\varkappa) + Z\_0^{(i)}(\varkappa), \\ \Rightarrow \quad Z\_0^{(i)}(\varkappa) &= \gamma^{(i)}(\varkappa) \varkappa^{2t} + \sigma^{(i)}(\varkappa) S(\varkappa), \end{aligned} \tag{26}$$

where

$$
\sigma^{(i)}(\mathbf{x}) = \sigma^{(i-2)}(\mathbf{x}) - q\_i(\mathbf{x})\sigma^{(i-1)}(\mathbf{x}), \\
\gamma^{(i)}(\mathbf{x}) = \gamma^{(i-2)}(\mathbf{x}) - q\_i(\mathbf{x})\gamma^{(i-1)}(\mathbf{x}).\tag{27}
$$

(3) Finally, iteration stops when the iteration reaches a step *ρ* for which

$$\deg \,\, Z\_0^{(\rho)}(\mathfrak{x}) < \deg \,\, \sigma^{(\rho)}(\mathfrak{x}) \le t. \tag{28}$$

Therefore, *<sup>Z</sup>*0ð Þ¼ *<sup>x</sup> <sup>Z</sup>*ð Þ*<sup>ρ</sup>* <sup>0</sup> , *<sup>σ</sup>*ð Þ¼ *<sup>x</sup> <sup>σ</sup>*ð Þ*<sup>ρ</sup>* are obtained.

Step 4. Evaluate error location numbers and error values.

(1) Determine error-location numbers *α<sup>j</sup> <sup>i</sup>* from *σ*ð Þ *x* . The error-location numbers are the inverse of the roots of *σ*ð Þ *x* .

(2) Determine the error values *<sup>δ</sup>l*, 1≤*l*<sup>≤</sup> *<sup>τ</sup>* from *<sup>Z</sup>*0ð Þ *<sup>x</sup>* and *<sup>σ</sup>*ð Þ *<sup>x</sup>* . Subsitituting *<sup>β</sup>*�<sup>1</sup> *<sup>l</sup>* in *Z*0ð Þ *x* , then,

$$\begin{split} Z\_0(\boldsymbol{\beta}\_l^{-1}) &= \sum\_{l=1}^{\tau} \delta\_l \boldsymbol{\beta}\_l \prod\_{\substack{i=1, i \neq l}}^{\tau} \left( \mathbf{1} - \boldsymbol{\beta}\_i \boldsymbol{\beta}\_l^{-1} \right) \\ &= \delta\_l \boldsymbol{\beta}\_l \prod\_{\substack{i=1, i \neq l}}^{\tau} \left( \mathbf{1} - \boldsymbol{\beta}\_i \boldsymbol{\beta}\_l^{-1} \right) \end{split} \tag{29}$$

(3) Compute the derivative of *σ*ð Þ *x* as,

$$\sigma'(\mathbf{x}) = \frac{\mathbf{d}}{\mathbf{d}\mathbf{x}} \prod\_{i=1} \mathbf{r}(\mathbf{1} - \beta\_i \mathbf{x}) = -\sum\_{l=1}^{r} \beta\_l \prod\_{\substack{i=1,\ i \neq l}}^{r} (\mathbf{1} - \beta\_i \mathbf{x}). \tag{30}$$

Moreover, substitute *β*�<sup>1</sup> *<sup>l</sup>* in Eq. (30) and obtain,

$$\sigma'(\beta\_l^{-1}) = -\beta\_l \prod\_{i=1, i \neq l}^{r} (1 - \beta\_i \beta\_l^{-1}).\tag{31}$$

Hence, the error values *δ<sup>l</sup>* at location *betal* is evaluated as,

$$\delta\_l = -\frac{Z\_0 \left(\beta\_l^{-1}\right)}{\sigma' \left(\beta\_l^{-1}\right)}.\tag{32}$$

The Euclidean decoding algorithm is terminated [12].

Example 2. Consider the triple-error-correcting RS code of length *n* ¼ 15 over GF 2<sup>4</sup> , *<sup>α</sup>* be a primitive element of GF 24 such that *<sup>α</sup>*<sup>4</sup> <sup>þ</sup> *<sup>α</sup>* <sup>þ</sup> <sup>1</sup> <sup>¼</sup> 0. The generator polynomial has *α*, *α*2, *α*3, *α*4, *α*5, *α*<sup>6</sup> as roots; that is,

$$\begin{split} \mathbf{g(x)} &= (\mathbf{x} + a)(\mathbf{x} + a^2)(\mathbf{x} + a^3)(\mathbf{x} + a^4)(\mathbf{x} + a^5)(\mathbf{x} + a^6) \\ &= a^6 + a^9 \mathbf{x} + a^9 \mathbf{x}^2 + a^4 \mathbf{x}^3 + a^{14} \mathbf{x}^4 + a^{10} \mathbf{x}^5 + \mathbf{x}^6. \end{split} \tag{33}$$

Suppose that the codeword of all zero is transmitted, and the received polynomial is *r x*ð Þ¼ *<sup>α</sup>*<sup>7</sup>*x*<sup>3</sup> <sup>þ</sup> *<sup>α</sup>*<sup>11</sup>*x*10. The decoding procedures are shown as follows,

Step 1. Compute the syndromes ð Þ *S*1, *S*2, … , *S*<sup>6</sup> . The syndrome components are exhibited as,

$$\begin{aligned} \mathcal{S}\_1 &= r(a) = a^\top \cdot a^3 + a^{11} \cdot a^{10} = a^\top, \\ \mathcal{S}\_2 &= r\left(a^2\right) = a^\top \cdot \left(a^2\right)^3 + a^{11} \cdot \left(a^2\right)^{10} = a^{12}, \\ \mathcal{S}\_3 &= r\left(a^3\right) = a^\top \cdot \left(a^3\right)^3 + a^{11} \cdot \left(a^3\right)^{10} = a^6, \\ \mathcal{S}\_4 &= r\left(a^4\right) = a^\top \cdot \left(a^4\right)^3 + a^{11} \cdot \left(a^4\right)^{10} = a^{12}, \\ \mathcal{S}\_5 &= r\left(a^5\right) = a^\top \cdot \left(a^5\right)^3 + a^{11} \cdot \left(a^5\right)^{10} = a^{14}, \\ \mathcal{S}\_6 &= r\left(a^6\right) = a^\top \cdot \left(a^6\right)^3 + a^{11} \cdot \left(a^6\right)^{10} = a^{14}. \end{aligned} \tag{34}$$

The syndrome polynomial is *S x*ð Þ¼ *<sup>α</sup>*<sup>7</sup> <sup>þ</sup> *<sup>α</sup>*<sup>12</sup>*<sup>x</sup>* <sup>þ</sup> *<sup>α</sup>*<sup>6</sup>*x*<sup>2</sup> <sup>þ</sup> *<sup>α</sup>*<sup>12</sup>*x*<sup>3</sup> <sup>þ</sup> *<sup>α</sup>*<sup>14</sup>*x*<sup>4</sup> <sup>þ</sup> *<sup>α</sup>*<sup>14</sup>*x*5. Step 2. Determine the error-location polynomial *σ*ð Þ *x* and the error-value evaluator *Z*0ð Þ *x* based on the Euclidean algorithm.

(1) Firstly, the initial conditions are acquired as,

$$\begin{aligned} Z\_0^{(-1)}(\mathbf{x}) &= \mathbf{x}^6, \\ Z\_0^{(0)}(\mathbf{x}) &= \mathbf{S}(\mathbf{X}) = a^\top + a^{12}\mathbf{x} + a^6\mathbf{x}^2 + a^{12}\mathbf{x}^3 + a^{14}\mathbf{x}^4 + a^{14}\mathbf{x}^5, \\ \gamma^{(-1)}(\mathbf{x}) &= \sigma^{(0)}(\mathbf{x}) = \mathbf{1}, \\ \gamma^{(0)}(\mathbf{x}) &= \sigma^{(-1)}(\mathbf{x}) = \mathbf{0}. \end{aligned} \tag{35}$$

(2) When l = 1, then,

$$\begin{aligned} Z\_0^{(-1)}(\mathbf{x}) &= q\_1(\mathbf{x}) Z\_0^{(0)}(\mathbf{x}) + Z\_0^{(1)}(\mathbf{x}), \\ \Rightarrow \quad \mathbf{x}^6 &= q\_1(\mathbf{x}) \left( a^7 + a^{12} \mathbf{x} + a^6 \mathbf{x}^2 + a^{12} \mathbf{x}^3 + a^{14} \mathbf{x}^4 + a^{14} \mathbf{x}^5 \right) + Z\_0^{(0)}(\mathbf{x}), \\ \Rightarrow \quad q\_1(\mathbf{x}) &= a \mathbf{x} + a, Z\_0^{(1)}(\mathbf{x}) = a^6 \mathbf{x}^4 + a^5 \mathbf{x}^3 + a^5 \mathbf{x}^2 + a^3 \mathbf{x} + a^8, \end{aligned} \tag{36}$$

where,

$$
\sigma^{(1)}(\mathbf{x}) = \sigma^{(-1)}(\mathbf{x}) - q\_1(\mathbf{x})\sigma^{(0)}(\mathbf{x}) \Rightarrow \sigma^{(1)}(\mathbf{x}) = a\mathbf{x} + a \tag{37}
$$

*RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code… DOI: http://dx.doi.org/10.5772/intechopen.109081*

(3) When l = 2,

$$\begin{aligned} Z\_0^{(0)}(\mathbf{x}) &= q\_2(\mathbf{x}) Z\_0^{(1)}(\mathbf{x}) + Z\_0^{(2)}(\mathbf{x}), \\ \Rightarrow \quad a^\top + a^{12}\mathbf{x} + a^6\mathbf{x}^2 + a^{12}\mathbf{x}^3 + a^{14}\mathbf{x}^4 + a^{14}\mathbf{x}^5 \\ = & q\_2(\mathbf{x}) (a^6\mathbf{x}^4 + a^5\mathbf{x}^3 + a^5\mathbf{x}^2 + a^3\mathbf{x} + a^8) + Z\_0^{(2)}(\mathbf{x}), \\ \Rightarrow \quad q\_2(\mathbf{x}) &= a^8\mathbf{x} + a^{11}, Z\_0^{(2)}(\mathbf{x}) = a^2\mathbf{x} + a^3, \end{aligned} \tag{38}$$

where,

$$
\sigma^{(2)}(\mathbf{x}) = \sigma^{(0)}(\mathbf{x}) - q\_2(\mathbf{x})\sigma^{(1)}(\mathbf{x}) \Rightarrow \sigma^{(2)}(\mathbf{x}) = a^9 \mathbf{x}^2 + a^8 \mathbf{x} + a^{11} \tag{39}
$$

Observe that deg*Z*ð Þ<sup>2</sup> <sup>0</sup> ð Þ *<sup>x</sup>* <sup>&</sup>lt; deg*σ*ð Þ<sup>2</sup> ð Þ *<sup>x</sup>* <sup>≤</sup><sup>3</sup> <sup>¼</sup> *<sup>t</sup>*. Hence, The iteration is terminated, and we can acquire,

$$Z\_0(\mathbf{x}) = Z\_0^{(2)}(\mathbf{x}) = a^2 \mathbf{x} + a^3,\\ \sigma(\mathbf{x}) = \sigma^{(2)}(\mathbf{x}) = a^9 \mathbf{x}^2 + a^8 \mathbf{x} + a^{11} \tag{40}$$

Step 3. Evaluate error-location numbers and error values. The all roots of *σ*ð Þ *x* are *<sup>α</sup>*<sup>5</sup> and *<sup>α</sup>*12. Then, the error location numbers are *<sup>α</sup>*<sup>5</sup> ð Þ�<sup>1</sup> <sup>¼</sup> *<sup>α</sup>*10, *<sup>α</sup>*<sup>12</sup> ð Þ�<sup>1</sup> <sup>¼</sup> *<sup>α</sup>*3. The error values at these locations are

$$\begin{aligned} \epsilon\_3 &= \frac{-Z\_0(a^{-3})}{\sigma'(a^{-3})} = \frac{a^3 + a^2 a^{-3}}{a^{11} a^3 (1 + a^{10} a^{-3})} = \frac{1}{a^8} = a^7, \\ \epsilon\_{10} &= \frac{-Z\_0(a^{-10})}{\sigma'(a^{-10})} = \frac{a^3 + a^2 a^{-10}}{a^{11} a^{10} (1 + a^3 a^{-10})} = \frac{a^4}{a^8} = a^{11}. \end{aligned} \tag{41}$$

Step 4. Perform error correction.

Therefore, the error polynomial is *e x*ð Þ¼ *<sup>α</sup>*<sup>7</sup>*x*<sup>3</sup> <sup>þ</sup> *<sup>α</sup>*<sup>11</sup>*x*10. the decoded coded polynomial is *c*<sup>0</sup> ð Þ¼ *<sup>x</sup> r x*ð Þ� *e x*ð Þ¼ *<sup>α</sup>*<sup>7</sup>*x*<sup>3</sup> <sup>þ</sup> *<sup>α</sup>*<sup>11</sup>*x*<sup>10</sup> <sup>ð</sup> Þ � *<sup>α</sup>*<sup>7</sup>*x*<sup>3</sup> <sup>þ</sup> *<sup>α</sup>*<sup>11</sup>*x*<sup>10</sup> <sup>ð</sup> Þ ¼ **<sup>0</sup>**, which is all-zero codeword.

The end of Example 2.

### **3. General distributed RS coded-cooperative systems**

Coded cooperative diversity is an efficient technique combining channel coding and cooperative diversity to combat the influence of channel fading and improve the performance of the systems [13]. Generally, the coded cooperation is composed of three terminals, i.e., source, relay, and destination. Hence, the channel codes employed in each terminal are named distributed channel codes. Many distributed channel codes are applied in the coded-cooperative systems. For short-to-mediumlength transmission information blocks, the RS channel coding may be a promising candidate which illustrates a superior performance [13–16].

**Figure 1** demonstrates the general distributed RS coded-cooperative scheme. Evidently, all three terminals transmit and receive signals through one antenna and the entire transmission requires two-time slots. During time slot-1, the binary information sequence **b**<sup>1</sup> is first converted to the *M*-ary symbol vector **u**<sup>1</sup> of length *K*<sup>1</sup> over the GF 2*<sup>M</sup>* . Then, **<sup>u</sup>**<sup>1</sup> is encoded by the *RS*1ð Þ *<sup>N</sup>*, *<sup>K</sup>*1, *<sup>d</sup>*<sup>1</sup> encoder to obtain the systematic

**Figure 1.** *The system model of the general distributed RS-coded cooperation.*

codeword **c**<sup>1</sup> of length *N*, where *d*<sup>1</sup> ¼ *N* � *K*<sup>1</sup> þ 1 and the generator polynomial *g*1ð Þ *x* of *RS*<sup>1</sup> is given as,

$$\mathbf{g\_1(x)} = (\mathbf{x} - \boldsymbol{\gamma}) \left(\mathbf{x} - \boldsymbol{\gamma}^2\right) \cdots \left(\mathbf{x} - \boldsymbol{\gamma}^{N-K\_1}\right),\tag{42}$$

where *<sup>γ</sup><sup>k</sup>* <sup>∈</sup> GF 2*<sup>M</sup>* , *<sup>k</sup>* <sup>¼</sup> 0, 1, … , *<sup>N</sup>* � *<sup>K</sup>*1. Then, **<sup>c</sup>**<sup>1</sup> is further modulated to the signal **v**<sup>1</sup> by the *M*-ary quadrature amplitude modulation (*M*-QAM). Subsequently, **v**<sup>1</sup> ¼ *<sup>v</sup>*0, *<sup>v</sup>*1, … , *<sup>v</sup>*ð*N*�<sup>1</sup>Þ� generated at the source is transmitted to the both relay and destination through the respective fading channels where the signals **<sup>r</sup>**<sup>1</sup> <sup>¼</sup> *<sup>r</sup>*<sup>1</sup> 0,*r*<sup>1</sup> 1, … ,*r*<sup>1</sup> *N*�1 and **<sup>r</sup>**<sup>2</sup> <sup>¼</sup> *<sup>r</sup>*<sup>2</sup> 0,*r*<sup>2</sup> 1, … ,*r*<sup>2</sup> *N*�1 are obtained at the relay and destination, respectively. Moreover, each signal symbol *r j i* ð Þ *i* ¼ 0, 1, … , *N* � 1, *j* ¼ 1, 2 is modeled as,

$$
\sigma\_i^j = h\_i^j v\_i + n\_i^j,\tag{43}
$$

where *h j <sup>i</sup>* is the complex Gaussian variable satisfying zero mean and 1*=*2 variance per dimension, and *n<sup>j</sup> <sup>i</sup>* represents the complex Gaussian variable with zero mean and *N*0*=*2-variance per dimension. Note that *N*<sup>0</sup> denotes the power spectral density (PSD) of the noise.

During time slot 2, **r**<sup>2</sup> is demodulated and decoded subsequently to obtain the estimated information sequence **u**~1. If the source-to-relay channel is ideal, then, **u**~<sup>1</sup> ¼ **u**1. For the system, the information symbols at the relay are only from the source. Therefore, the *K*<sup>2</sup> symbols are simply chosen from **u**~<sup>1</sup> of length *N* through the 'Symbol Selection' block. Note that different selection patterns contribute to a different minimum distance of the resultant code at the destination and further affect the overall performance of the RS coded-cooperative scheme, which will be elaborated on in the next section. After that, the selected message vector **u**<sup>2</sup> is also encoded by the *RS*2ð Þ *N*,*K*2, *d*<sup>2</sup> to acquire the *c*2, where *d*<sup>2</sup> ¼ *N* � *K*<sup>2</sup> and the generator polynomial *g*2ð Þ *x* of *RS*<sup>2</sup> is provided as,

*RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code… DOI: http://dx.doi.org/10.5772/intechopen.109081*

$$\mathbf{g\_1(x)} = (\mathbf{x} - \boldsymbol{\gamma})(\mathbf{x} - \boldsymbol{\gamma^2}) \cdots (\mathbf{x} - \boldsymbol{\gamma^{N-K\_2}}),\tag{44}$$

Similarly, the codeword **c**<sup>2</sup> is modulated by an *M*-QAM modulator and further transmitted to the destination. The received signal **r**<sup>3</sup> is also modeled similarly to Eq. (43).

At the destination, the obtained signals **r**<sup>1</sup> and **r**<sup>3</sup> are concatenated is series as,

$$\mathbf{r} = (\mathbf{r}\_1|\mathbf{r}\_3),\tag{45}$$

where '∣' denotes that the two signals are conjunct in series during two-time slots. Following that, r passes to the '*M*-QAM Demodulator' block to get the joint demodulated message sequence (~**c**1∣~**c**2) and then decoded by the joint RS decoding algorithm that will be introduced in detailed later. Finally, the estimated information sequence **u**^<sup>1</sup> is transformed to the extensive bit sequence ^ **b**1.

### **4. The optimized codes resulted at destination by proper selection at relay**

The different relay selection patterns determine the different minimum distance of the final joint code at the destination, which influences the performance of the system. Therefore, we need to consider the proper selection approach at the relay to capture the resulting code with a minimum distance as large as possible. The following will introduce two proper selection approaches, detailed content can refer to [13].

Obviously, we should consider the worst-case scenario and aim to avoid as many of them as possible. Since the minimum weight of the code at source is already determined as *d*1, only the minimum weight of the codeword selected by the relay needs to be considered. Firstly, some nomenclatures are described below before providing design steps:


#### **4.1 Exhaustive search approach**

The exhaustive search approach is performed for all information sequences with the weight 0 < *wt*ð Þ **u**<sup>1</sup> ≤*d*<sup>1</sup> that may be encoded to the codeword with the weight *d*1. The preceding are the particular steps of this approach.


$$L = K\_1 \, \_{K\_2} = \frac{K\_1!}{K\_2!(K\_1 - K\_2)!}.\tag{46}$$


Example 3. In the distributed RS-coded cooperative system, consider the *RS*1ð Þ 15,11,5 and *RS*2ð Þ 15,7,9 are employed in the source and relay, respectively. The symbol elements of the *RS*<sup>1</sup> and *RS*<sup>2</sup> are chosen from GF 24 � � shown in **Table 1**. The exhaustive search for selecting the information symbol of *K*<sup>2</sup> ¼ 7 from *K*<sup>1</sup> ¼ 11 is demonstrated below.



**Table 2.**

*The procedure of exhaustive search approach to obtain an optimized selection pattern.*

*RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code… DOI: http://dx.doi.org/10.5772/intechopen.109081*

4.For the four selection patterns, determine the minð Þ¼ *w*<sup>2</sup> 16635 that corresponding to a selection pattern *ξ<sup>g</sup>* ¼ ½ � 5,6,7,8,9,10,11 . Thus, ∣Ω∣ ¼ 1 and the optimized *<sup>ξ</sup>*ð Þ *ES* <sup>¼</sup> ½ � 5,6,7,8,9,10,11 is determined.

The end of Example 3.

### **4.2 Partial search approach**

The exhaustive search approach can choose the optimal selection pattern with the final codeword at the destination having a better weight distribution. However, the complexity of determining the information sequence set *ψ* and the selection pattern set *ϕ* increases rapidly when the information length and code length become large. Therefore, we need to consider a low-complexity search approach, i.e., a partial search approach [16]. This approach reduces the search range of the information sequences and the scope of the selection patterns.

First, divide the information positions into two parts illustrated in **Figure 2**. Case (a): the first part is greater than the other part one symbol. Case (b): the last part is greater than the first part symbol. In two cases, make sure the symmetric structure of the *K*<sup>1</sup> information symbols. Hence, it is reasonable to position the information symbols appropriately. Note that the message sequence generating the codeword with the weight *d*<sup>1</sup> has at least *θ* ¼ *K*<sup>1</sup> � minð Þ *K*1, *d*<sup>1</sup> zero symbols. Thus, we focus on selecting the distribution positions of the *θ* zero symbols and *K*<sup>2</sup> selection pattern.


**Figure 2.**

*The symmetric division structure of the positions of K*<sup>1</sup> *information symbols, case (a) one more symbol in the first part, case (b) one more symbol in the last part.*

Based on the reduced sets *ψ* and *ϕ*, the subsequent steps are same as the Step 3–6 of the exhaustive search approach.

Example 4. This example uses the same codes as Example 4.1. Evidently, the information sequence that can be encoded to the codeword with weight 5 includes at least 6 zero-symbols. The division structure of the partial search approach is shown in **Figure 3**.


### **Figure 3.**

*The symmetric division structure of the positions of 11 information symbols, case (a) 6 symbols in the first part, case (b) 6 symbols in the last part.*


#### **Table 3.**

*The procedure of partial search approach to obtain an optimized selection pattern.*

*RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code… DOI: http://dx.doi.org/10.5772/intechopen.109081*

#### **Figure 4.**

*The BER performance comparison of the distributed RS-coded cooperative scheme with two selection approaches at the relay over the fast-fading channel.*

The end of Example 4.

Based on Examples 3 and 4, the BER performance of the distributed RS-coded cooperative scheme over the Rayleigh fast-fading channel employing the exhaustive search and partial search is exhibited in **Figure 4** where the 16-QAM modulation is employed and the source-to-relay channel is ideal. The result reveals that the scheme with two different approaches illustrates almost identical performance, which further shows the feasibility of the reduced-complexity approach. More simulation results can refer to [13].

#### **4.3 Complexity comparisons**

First, the complexity comparisons of the two search approaches are listed in **Table 4**, where *λ*<sup>þ</sup> <sup>1</sup> , *λ*� 1 and *λ*<sup>þ</sup> <sup>2</sup> , *λ*� 2 represent the number of the operations of the addition and the multiplication required to encode the information sequence from the set *ψ* and *ψ* at the source and relay, respectively, and *λtotal* denotes the total operations.

### **5. Joint decoding algorithms and error performance analysis**

The section introduces the two joint decoding algorithms, namely, the naive algorithm and the smart algorithm. The two decoding algorithms may enhance the overall


**Table 4.**

*Complexity comparisons of two approaches.*

performance by making full advantage of the two signals from the source and relay, respectively.

### **5.1 Nave decoding algorithmm**

The detailed steps for the naive algorithm are listed as follows:


### **5.2 Smart decoding algorithm**

The specific steps for the smart algorithm are described below:


**Figure 5** illustrates the BER performance of the distributed RS-coded cooperative scheme under two different decoding algorithms over a fast fading channel, where 16-QAM is applied in the scheme and the partial search approach is employed in the

*RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code… DOI: http://dx.doi.org/10.5772/intechopen.109081*

**Figure 5.** *The performance comparison of the distributed RS-coded cooperative scheme under two different joint decoding algorithms over the fast-fading channel.*

relay. From the simulated result, the scheme under the smart decoding algorithm is superior to that of the naive by a gain of over 1.5 dB at *BER*≈<sup>4</sup> � <sup>10</sup>�<sup>5</sup> .

#### **5.3 Error performance of distributed RS coded-cooperative systems**

This section presents the average error probability (AEP) bound for the distributed RS coded-cooperative scheme over the Rayleigh fast-fading channel. First, the unconditional error probability is provided as follows [5, 17, 18],

$$P\_b(E) = \frac{1}{\pi} \int\_0^{\pi/2} \left( \mathbf{1} + \frac{\Lambda\_1}{\sin^2 \varrho} \right)^{d\_1} \left( \mathbf{1} + \frac{\Lambda\_2}{\sin^2 \varrho} \right)^{d\_2} d\varrho,\tag{47}$$

where Λ<sup>1</sup> and Λ<sup>2</sup> denote the average signal-to-noise ratio (SNR) per information bit from the source-to-destination and relay-to-destination links. The integral in Eq. (47) is calculated by the available computer package. Then, the upper bound may be acquired by assuming sin <sup>2</sup> *φ* ¼ 1, shown as,

$$P\_b(E) \le \frac{1}{2} \left(\frac{1}{\mathbf{1} + \Lambda\_1}\right)^{d\_1} \left(\frac{\mathbf{1}}{\mathbf{1} + \Lambda\_2}\right)^{d\_2},\tag{48}$$

Therefore, based on Eq. (48), the upper bound of the bit error probability *Pb* is further given as [6],

$$P\_b \le \sum\_{w=d\_1+d\_2}^{N} \frac{J\_w}{K\_1} P\_b(E),\tag{49}$$

where *J<sup>ϖ</sup>* represents a weight enumerating factor for each codeword with weight w which is obtained by exhaustive computer search.

### **6. Conclusions**

The chapter first introduces the encoding and decoding procedure of the BCH codes and RS codes. Then, the system model of the distributed RS-coded cooperation is presented which improves the anti-interference transmission performance of the short-to-medium-length information block. In the scheme, the exhaustive and partial search approaches are introduced and employed in the relay to choose an optimized selection pattern that results in a final code with a better weight distribution at the destination. In addition, two joint decoding algorithms are provided to further enhance the performance and the performance analysis validates the system.

### **Acknowledgements**

The financial assistance provided by the National Natural Science Foundation of China under contract No. 61771241 is acknowledged.

### **Conflict of interest**

The authors declare no conflict of interest.

### **Author details**

Chen Chen and Fengfan Yang\* College of Electronics and Information Engineering, Nanjing University of Aeronautics and Astronautics, Nanjing, China

\*Address all correspondence to: yffee@nuaa.edu.cn

© 2022 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

*RS Codes and Optimized Distributed RS-Coded Relay Cooperative Communications: Code… DOI: http://dx.doi.org/10.5772/intechopen.109081*

### **References**

[1] Alamouti SM. A simple transmit diversity technique for wireless communications. IEEE Journal on Selected Areas in Communications. 1998;**16**(8):1451-1458. DOI: 10.1109/ 49.730453

[2] Ejaz S, Yang FF. Turbo codes with modified code matched interleaver for coded-cooperation in half-duplex wireless relay networks. Frequenz. 2015; **69**(3–4):171-184. DOI: 10.1515/freq-2014-0072

[3] Wang H, Chen Q. LDPC based network coded cooperation design for multi-way relay networks. IEEE Access. 2019;**7**:62300-62311. DOI: 10.1109/ ACCESS.2019.2915293

[4] Umar YFF, Mughal S. Distributed polar coded single carrier-FDMA based on multilevel construction over multipath channels. Wireless Personal Communications. 2019;**105**(3):835-856. DOI: 10.1007/s11277-019-06124-4

[5] Park J, Kim J. Generator polynomial model-based eye diagram estimation method for Bose-Chaudhuri-Hocquenghem (BCH) code and reed-Solomon (RS) code. IEEE Transactions on Electromagnetic Compatibility. 2020; **62**(1):240-248. DOI: 10.1109/ TEMC.2018.2881146

[6] Ejaz S, Yang FF. Jointly optimized reed-uller codes for multilevel multirelay coded-cooperative VANETS. IEEE Transactions on Vehicular Technology. 2017;**66**(5):4017-4028. DOI: 10.1109/ TVT.2016.2604320

[7] Gong B, Ding C, Li C. The dual codes of several classes of BCH codes. IEEE Transactions on Information Theory. 2022;**68**(2):953-964. DOI: 10.1109/ TIT.2021.3125933

[8] Guruswami V, Sudan M. Improved decoding of Reed-Solomon and algebraic-geometry codes. IEEE Transactions on Information Theory. 1999;**45**(6):1757-1767. DOI: 10.1109/ 18.782097

[9] Barry JR, Lee EA, Messerschmitt DG. Digital Communication. 3rd ed. Springer US; 2004

[10] Blasco FL, Garrammone G, Liva G. Parallel concatenation of non-binary linear random fountain codes with maximum distance separable codes. IEEE Transactions on Communications. 2013;**61**(10):4067-4075. DOI: 10.1109/ TCOMM.2013.090513.120834

[11] Zeh A, Li W. Decoding Reed-Solomon codes up to the Sudan radius with the Euclidean algorithm. In: 2010 International Symposium On Information Theory & Its Applications. 2010. pp. 986-990

[12] Andreas FM. Channel coding and information theory. Wireless Communications. IEEE. 2011;**63**:277-317. DOI: 10.1002/9781119992806.ch14

[13] Guo PC, Yang FF, Zhao CL, Ullah W. Jointly optimized design of distributed Reed-Solomon codes by proper selection in relay. Telecommunication System. 2021;**78**(3):391-403. DOI: 10.1007/ s11235-021-00822-w

[14] Halbawi W, Ho T, Yao HY, Duursma I. Distributed Reed-Solomon codes for simple multiple access networks. In: IEEE International Symposium on Information Theory. 2014. pp. 651-655

[15] Zhao C, Yang FF, Waweru DK. Reed-Solomon coded cooperative spatial

### *Coding Theory Essentials*

modulation based on nested construction for wireless communication. Radioengineering. 2021;**30**(1):172-183. DOI: 10.13164/re.2021.0172

[16] Chen C, Yang FF, Zhao CL, Xu HJ. Distributed reed-Solomon coded cooperative space-time labeling diversity network. Radioengineering. 2022;**4**(96): 496-509. DOI: 10.13164/re.2022.0496

[17] Hunter TE, Nosratinia A. Diversity through coded cooperation. IEEE Transactions on Wireless Communications. 2006;**5**(2):283-289. DOI: 10.1109/TWC.2006.1611050

[18] Simon MK, Alouini M. A unified approach to the performance analysis of digital communication over generalized fading channels. Proceedings of the IEEE. 1998;**86**(9):1860-1877. DOI: 10.1109/5.705532

### **Chapter 3**
