4.2.3 Channel coding

25.2123GPPMultiplexing and channel coding (FDD)Release 17TS

Code blocks are delivered to the channel coding block. They are denoted by , where i is the TrCH number, r is the code block number, and Ki is the number of bits in each code block. The number of code blocks on TrCH i is denoted by Ci. After encoding the bits are denoted by , where Yi is the number of encoded bits. The relation between oirk and yirk and between Ki and Yi is dependent on the channel coding scheme.

The following channel coding schemes can be applied to TrCHs:

– convolutional coding;

– turbo coding.

Usage of coding scheme and coding rate for the different types of TrCH is shown in table 1.

The values of Yi in connection with each coding scheme:

– convolutional coding with rate 1/2: Yi = 2*Ki + 16; rate 1/3: Yi = 3*Ki + 24;

– turbo coding with rate 1/3: Yi = 3*Ki + 12.

Table 1: Usage of channel coding scheme and coding rate

Type of TrCH

Coding scheme

Coding rate

BCH

Convolutional coding

1/2

PCH

RACH

DCH, FACH

1/3, 1/2

Turbo coding*

1/3

* For DCH, turbo coding is not allowed when DL_DCH_FET_Config is configured by higher layers.

4.2.3.1 Convolutional coding

Convolutional codes with constraint length 9 and coding rates 1/3 and 1/2 are defined.

The configuration of the convolutional coder is presented in figure 3.

Output from the rate 1/3 convolutional coder shall be done in the order output0, output1, output2, output0, output1, output 2, output 0,…,output2. Output from the rate 1/2 convolutional coder shall be done in the order output 0, output 1, output 0, output 1, output 0, …, output 1.

8 tail bits with binary value 0 shall be added to the end of the code block before encoding.

The initial value of the shift register of the coder shall be "all 0" when starting to encode the input bits.

Figure 3: Rate 1/2 and rate 1/3 convolutional coders

4.2.3.2 Turbo coding

4.2.3.2.1 Turbo coder

The scheme of Turbo coder is a Parallel Concatenated Convolutional Code (PCCC) with two 8-state constituent encoders and one Turbo code internal interleaver. The coding rate of Turbo coder is 1/3. The structure of Turbo coder is illustrated in figure 4.

The transfer function of the 8-state constituent code for PCCC is:

G(D) = ,

where

g0(D) = 1 + D2 + D3,

g1(D) = 1 + D + D3.

The initial value of the shift registers of the 8-state constituent encoders shall be all zeros when starting to encode the input bits.

Output from the Turbo coder is

x1, z1, z1, x2, z2, z2, …, xK, zK, zK,

where x1, x2, …, xK are the bits input to the Turbo coder i.e. both first 8-state constituent encoder and Turbo code internal interleaver, and K is the number of bits, and z1, z2, …, zK and z1, z2, …, zK are the bits output from first and second 8-state constituent encoders, respectively.

The bits output from Turbo code internal interleaver are denoted by x1, x2, …, xK, and these bits are to be input to the second 8-state constituent encoder.

Figure 4: Structure of rate 1/3 Turbo coder (dotted lines apply for trellis termination only)

4.2.3.2.2 Trellis termination for Turbo coder

Trellis termination is performed by taking the tail bits from the shift register feedback after all information bits are encoded. Tail bits are padded after the encoding of information bits.

The first three tail bits shall be used to terminate the first constituent encoder (upper switch of figure 4 in lower position) while the second constituent encoder is disabled. The last three tail bits shall be used to terminate the second constituent encoder (lower switch of figure 4 in lower position) while the first constituent encoder is disabled.

The transmitted bits for trellis termination shall then be:

xK+1, zK+1, xK+2, zK+2, xK+3, zK+3, xK+1, zK+1, xK+2, zK+2, xK+3, zK+3.

4.2.3.2.3 Turbo code internal interleaver

The Turbo code internal interleaver consists of bits-input to a rectangular matrix with padding, intra-row and inter-row permutations of the rectangular matrix, and bits-output from the rectangular matrix with pruning. The bits input to the Turbo code internal interleaver are denoted by , where K is the integer number of the bits and takes one value of 40 K 5114. The relation between the bits input to the Turbo code internal interleaver and the bits input to the channel coding is defined by and K = Ki.

The following subclause specific symbols are used in subclauses 4.2.3.2.3.1 to 4.2.3.2.3.3:

K Number of bits input to Turbo code internal interleaver

R Number of rows of rectangular matrix

C Number of columns of rectangular matrix

p Prime number

v Primitive root

Base sequence for intra-row permutation

qi Minimum prime integers

ri Permuted prime integers

Inter-row permutation pattern

Intra-row permutation pattern of i-th row

i Index of row number of rectangular matrix

j Index of column number of rectangular matrix

k Index of bit sequence

4.2.3.2.3.1 Bits-input to rectangular matrix with padding

The bit sequence input to the Turbo code internal interleaver is written into the rectangular matrix as follows.

(1) Determine the number of rows of the rectangular matrix, R, such that:

.

The rows of rectangular matrix are numbered 0, 1, …, R – 1 from top to bottom.

(2) Determine the prime number to be used in the intra-permutation, p, and the number of columns of rectangular matrix, C, such that:

if (481 K 530) then

p = 53 and C = p.

else

Find minimum prime number p from table 2 such that

,

and determine C such that

.

end if

The columns of rectangular matrix are numbered 0, 1, …, C – 1 from left to right.

Table 2: List of prime number p and associated primitive root v

p

v

p

v

p

v

p

v

p

v

7

3

47

5

101

2

157

5

223

3

11

2

53

2

103

5

163

2

227

2

13

2

59

2

107

2

167

5

229

6

17

3

61

2

109

6

173

2

233

3

19

2

67

2

113

3

179

2

239

7

23

5

71

7

127

3

181

2

241

7

29

2

73

5

131

2

191

19

251

6

31

3

79

3

137

3

193

5

257

3

37

2

83

2

139

2

197

2

41

6

89

3

149

2

199

3

43

3

97

5

151

6

211

2

(3) Write the input bit sequence into the R C rectangular matrix row by row starting with bit y1 in column 0 of row 0:

where yk = xk for k = 1, 2, …, K and if RCK, the dummy bits are padded such that for k = K + 1, K + 2, …, RC. These dummy bits are pruned away from the output of the rectangular matrix after intra-row and inter-row permutations.

4.2.3.2.3.2 Intra-row and inter-row permutations

After the bits-input to the RC rectangular matrix, the intra-row and inter-row permutations for the RC rectangular matrix are performed stepwise by using the following algorithm with steps (1) – (6):

(1) Select a primitive root v from table 2 in clause 4.2.3.2.3.1, which is indicated on the right side of the prime number p.

(2) Construct the base sequence for intra-row permutation as:

, j = 1, 2,…, (p – 2), and s(0) = 1.

(3) Assign q0 = 1 to be the first prime integer in the sequence , and determine the prime integer qi in the sequence to be a least prime integer such that g.c.d(qi, p – 1) = 1, qi > 6, and qi > q(i – 1) for each i = 1, 2, …, R – 1. Here g.c.d. is greatest common divisor.

(4) Permute the sequence to make the sequence such that

rT(i) = qi, i = 0, 1, …, R – 1,

where is the inter-row permutation pattern defined as the one of the four kind of patterns, which are shown in table 3, depending on the number of input bits K.

Table 3: Inter-row permutation patterns for Turbo code internal interleaver

Number of input bits

K

Number of rows R

Inter-row permutation patterns

<T(0), T(1), …, T(R – 1)>

(40K159)

5

<4, 3, 2, 1, 0>

(160K200) or (481K530)

10

<9, 8, 7, 6, 5, 4, 3, 2, 1, 0>

(2281K2480) or (3161K3210)

20

<19, 9, 14, 4, 0, 2, 5, 7, 12, 18, 16, 13, 17, 15, 3, 1, 6, 11, 8, 10>

K = any other value

20

<19, 9, 14, 4, 0, 2, 5, 7, 12, 18, 10, 8, 13, 17, 3, 1, 16, 6, 15, 11>

(5) Perform the i-th (i = 0, 1, …, R – 1) intra-row permutation as:

if (C = p) then

, j = 0, 1, …, (p – 2), and Ui(p – 1) = 0,

where Ui(j) is the original bit position of j-th permuted bit of i-th row.

end if

if (C = p + 1) then

, j = 0, 1, …, (p – 2). Ui(p – 1) = 0, and Ui(p) = p,

where Ui(j) is the original bit position of j-th permuted bit of i-th row, and

if (K = RC) then

Exchange UR-1(p) with UR-1(0).

end if

end if

if (C = p – 1) then

, j = 0, 1, …, (p – 2),

where Ui(j) is the original bit position of j-th permuted bit of i-th row.

end if

(6) Perform the inter-row permutation for the rectangular matrix based on the pattern ,

where T(i) is the original row position of the i-th permuted row.

4.2.3.2.3.3 Bits-output from rectangular matrix with pruning

After intra-row and inter-row permutations, the bits of the permuted rectangular matrix are denoted by yk:

The output of the Turbo code internal interleaver is the bit sequence read out column by column from the intra-row and inter-row permuted R C rectangular matrix starting with bit y1 in row 0 of column 0 and ending with bit yCR in row R – 1 of column C – 1. The output is pruned by deleting dummy bits that were padded to the input of the rectangular matrix before intra-row and inter row permutations, i.e. bits yk that corresponds to bits yk with k > K are removed from the output. The bits output from Turbo code internal interleaver are denoted by x1, x2, …, xK, where x1 corresponds to the bit yk with smallest index k after pruning, x2 to the bit yk with second smallest index k after pruning, and so on. The number of bits output from Turbo code internal interleaver is K and the total number of pruned bits is:

R CK.

4.2.3.3 Concatenation of encoded blocks

After the channel coding for each code block, if Ci is greater than 1, the encoded blocks are serially concatenated so that the block with lowest index r is output first from the channel coding block, otherwise the encoded block is output from channel coding block as it is. The bits output are denoted by , where i is the TrCH number and Ei = CiYi. The output bits are defined by the following relations:

k = 1, 2, …, Yi

k = Yi + 1, Yi + 2, …, 2Yi

k = 2Yi + 1, 2Yi + 2, …, 3Yi

k = (Ci – 1)Yi + 1, (Ci – 1)Yi + 2, …, CiYi

If no code blocks are input to the channel coding (Ci = 0), no bits shall be output from the channel coding, i.e. Ei = 0.