4.2.7 Rate matching
25.2223GPPMultiplexing and channel coding (TDD)Release 17TS
Rate matching means that bits on a TrCH are repeated or punctured. Higher layers assign a rate-matching attribute for each TrCH. This attribute is semi-static and can only be changed through higher layer signalling. The rate-matching attribute is used when the number of bits to be repeated or punctured is calculated.
The number of bits on a TrCH can vary between different transmission time intervals. When the number of bits between different transmission time intervals is changed, bits are repeated to ensure that the total bit rate after TrCH multiplexing is identical to the total channel bit rate of the allocated physical channels.
If no bits are input to the rate matching for all TrCHs within a CCTrCH, the rate matching shall output no bits for all TrCHs within the CCTrCH.
Notation used in subclause 4.2.7 and subclauses:
N_{ij} : Number of bits in a radio frame before rate matching on TrCH i with transport format combination j.
: If positive – number of bits to be repeated in each radio frame on TrCH i with transport format combination j.
If negative – number of bits to be punctured in each radio frame on TrCH i with transport format combination j.
RM_{i} : Semi-static rate matching attribute for TrCH i. Signalled from higher layers.
PL : Puncturing limit. This value limits the amount of puncturing that can be applied in order to minimise the number of physical channels. Signalled from higher layers. The allowed puncturing in % is actually equal to (1-PL)*100.
N_{data,j} : Total number of bits that are available for a CCTrCH in a radio frame with transport format combination j.
P : number of physical channels used in the current frame.
P_{max} : maximum number of physical channels allocated for a CCTrCH.
U_{p} : Number of data bits in the physical channel p with p = 1…P during a radio frame.
I : Number of TrCHs in a CCTrCH.
Z_{ij} : Intermediate calculation variable.
F_{i} : Number of radio frames in the transmission time interval of TrCH i.
n_{i} : Radio frame number in the transmission time interval of TrCH i (0 n_{i} < F_{i}).
q : Average puncturing or repetition distance(normalised to only show the remaining rate matching on top of an integer number of repetitions).
P1_{F}(n_{i}) : The column permutation function of the 1^{st} interleaver, P1_{F}(x) is the original position of column with number x after permutation. P1 is defined on table 4 of section 4.2.5 (note that P1_{F} self-inverse).
S[n] : The shift of the puncturing or repetition pattern for radio frame n_{i} when .
TF_{i}(j) : Transport format of TrCH i for the transport format combination j.
TFS(i) : The set of transport format indexes l for TrCH i.
e_{ini} : Initial value of variable e in the rate matching pattern determination algorithm of subclause 4.2.7.3.
e_{plus} : Increment of variable e in the rate matching pattern determination algorithm of subclause 4.2.7.3.
e_{minus} : Decrement of variable e in the rate matching pattern determination algorithm of subclause 4.2.7.3.
b : Indicates systematic and parity bits.
b=1: Systematic bit. X(t) in subclause 4.2.3.2.1.
b=2: 1^{st} parity bit (from the upper Turbo constituent encoder). Y(t) in subclause 4.2.3.2.1.
b=3: 2^{nd} parity bit (from the lower Turbo constituent encoder). Y'(t) in subclause 4.2.3.2.1.
Note: when the TTI is 5msec for 1.28Mcps, the above notation refers to a sub-frame rather than a radio frame. In this case, F_{i} = 1 and n_{i} = 0.
4.2.7.1 Determination of rate matching parameters
The following relations, defined for all TFC j, are used when calculating the rate matching pattern:
for all i = 1 … I (1)
for all i = 1 … I
Puncturing can be used to minimise the required transmission capacity. The maximum amount of puncturing that can be applied is 1-PL, PL is signalled from higher layers. The possible values for N_{data} depend on the number of physical channels P_{max }, allocated to the respective CCTrCH, and on their characteristics (spreading factor, length of midamble and TFCI code word, usage of TPC and multiframe structure), which is given in [7].
For each physical channel an individual minimum spreading factor Sp_{min} is transmitted by means of the higher layers. Denote the number of data bits in each physical channel by U_{p,Sp} , where p indicates the sequence number 1 p P_{max} and Sp indicates the spreading factor of this physical channel: Sp takes the possible values {16, 8, 4, 2, 1} for 1.28Mcps TDD and 3.84Mcps TDD, Sp takes the possible values {32, 16, 8, 4, 2, 1} for 7.68Mcps TDD. The index p is described in section 4.2.12 with the following modifications: spreading factor (Q) is replaced by the minimum spreading factor Sp_{min} and k is replaced by the channelization code index at Q= Sp_{min}. Then, for N_{data} one of the following values in ascending order can be chosen:
Optionally, if indicated by higher layers for the UL the UE shall vary the spreading factor autonomously, so that N_{data} is one of the following values in ascending order:
N_{data, j }for the transport format combination j is determined by executing the following algorithm:
SET1 = { N_{data} such that is non negative }
N_{data, j }= min SET1
The number of bits to be repeated or punctured, N_{i,j}, within one radio frame (one sub-frame when the TTI is 5msec) for each TrCH i is calculated with the relations given at the beginning of this subclause for all possible transport format combinations j and selected every radio frame (sub-frame). The number of physical channels corresponding to N_{data, j,} shall be denoted by P.
If N_{i,j} = 0 then the output data of the rate matching is the same as the input data and the rate matching algorithm of subclause 4.2.7.3 does not need to be executed.
Otherwise, the rate matching pattern is calculated with the algorithm described in subclause 4.2.7.3. For this algorithm the parameters e_{ini}, e_{plus}, e_{minus}, and X_{i} are needed, which are calculated according to the equations in subclauses 4.2.7.1.1 and 4.2.7.1.2.
4.2.7.1.1 Uncoded and convolutionally encoded TrCHs
a = 2
N_{i} = N_{i,j}
X_{i} = N_{i,j}
R = N_{i}_{,}_{j} mod N_{i}_{,}_{j} — note: in this context N_{i}_{,}_{j} mod N_{i}_{,}_{j} is in the range of 0 to N_{i,j}-1 i.e. -1 mod 10 = 9.
if R 0 and 2R N_{i,j}
then q = N_{i,j} / R
else
q = N_{i,j} / (R – N_{i,j})
endif
NOTE 1: q is a signed quantity.
If q is even
then q’ = q + gcd(q, F_{i}) / F_{i} — where gcd (q, F_{i}) means greatest common divisor of q and F_{i}
NOTE 2: q’ is not an integer, but a multiple of 1/8.
else
q’ = q
endif
for x = 0 to F_{i}-1
S[xq’ mod F_{i}] = (x*q’ div F_{i})
end for
e_{ini} = (a S[P1_{Fi}(n_{i})] |N_{i} | + 1) mod (a N_{i,j})
e_{plus} = a X_{i}
e_{minus} = a |N_{i}|
puncturing for N_{i} <0, repetition otherwise.
4.2.7.1.2 Turbo encoded TrCHs
If repetition is to be performed on turbo encoded TrCHs, i.e. N_{i,j }>0, the parameters in subclause 4.2.7.1.1 are used.
If puncturing is to be performed, the parameters below shall be used. Index b is used to indicate systematic (b=1), 1^{st} parity (b=2), and 2^{nd} parity bit (b=3).
a = 2 when b=2
a = 1 when b=3
If is calculated as 0 for b=2 or b=3, then the following procedure and the rate matching algorithm of subclause 4.2.7.3 don’t need to be performed for the corresponding parity bit stream.
X_{i} = N_{i,j }/3 ,
q = X_{i }/|N_{i}|
if(q2)
for r=0 to F_{i}-1
S[(3r+b-1) mod F_{i}] = r mod 2;
end for
else
if q is even
then q = q – gcd(q, F_{i})/ F_{i} — where gcd (q, F_{i}) means greatest common divisor of q and F_{i}
NOTE: q is not an integer, but a multiple of 1/8.
else q = q
endif
for x=0 to F_{i} –1
r = xq’ mod F_{i};
S[(3r+b-1) mod F_{i}] = xq div F_{i};
endfor
endif
For each radio frame, the rate-matching pattern is calculated with the algorithm in subclause 4.2.7.3, where:
X_{i} is as above,
e_{ini} = (aS[P1 F_{i} (n_{i})]|N_{i}| + X_{i}) mod (aX_{i}), if e_{ini} = 0 then e_{ini} = aX_{i}
e_{plus} = aX_{i}
e_{minus} = a|N_{i}|
4.2.7.2 Bit separation and collection for rate matching
The systematic bits of turbo encoded TrCHs shall not be punctured, the other bits may be punctured. The systematic bits, first parity bits, and second parity bits in the bit sequence input to the rate matching block are therefore separated into three sequences.
The first sequence contains:
– All of the systematic bits that are from turbo encoded TrCHs.
– From 0 to 2 first and/or second parity bits that are from turbo encoded TrCHs. These bits come into the first sequence when the total number of bits in a block after radio frame segmentation is not a multiple of three.
– Some of the systematic, first parity and second parity bits that are for trellis termination.
The second sequence contains:
– All of the first parity bits that are from turbo encoded TrCHs, except those that go into the first sequence when the total number of bits is not a multiple of three.
– Some of the systematic, first parity and second parity bits that are for trellis termination.
The third sequence contains:
– All of the second parity bits that are from turbo encoded TrCHs, except those that go into the first sequence when the total number of bits is not a multiple of three.
– Some of the systematic, first parity and second parity bits that are for trellis termination.
The second and third sequences shall be of equal length, whereas the first sequence can contain from 0 to 2 more bits. Puncturing is applied only to the second and third sequences.
The bit separation function is transparent for uncoded TrCHs, convolutionally encoded TrCHs, and for turbo encoded TrCHs with repetition. The bit separation and bit collection are illustrated in figures 4 and 5.
Figure 4: Puncturing of turbo encoded TrCHs
Figure 5: Rate matching for uncoded TrCHs, convolutionally encoded TrCHs,
and for turbo encoded TrCHs with repetition
The bit separation is dependent on the 1^{st} interleaving and offsets are used to define the separation for different TTIs. b indicates the three sequences defined in this section, with b=1 indicating the first sequence, b = 2 the second one, and b = 3 the third one.
The offsets _{b} for these sequences are listed in table 5.
Table 5: TTI dependent offset needed for bit separation
TTI (ms) |
_{1} |
_{2} |
_{3} |
5, 10, 40 |
0 |
1 |
2 |
20, 80 |
0 |
2 |
1 |
The bit separation is different for different radio frames in the TTI. A second offset is therefore needed. The radio frame number for TrCH i is denoted by n_{i}. and the offset by .
Table 6: Radio frame dependent offset needed for bit separation
TTI (ms) |
_{0} |
_{1} |
_{2} |
_{3} |
_{4} |
_{5} |
_{6} |
_{7} |
5, 10 |
0 |
NA |
NA |
NA |
NA |
NA |
NA |
NA |
20 |
0 |
1 |
NA |
NA |
NA |
NA |
NA |
NA |
40 |
0 |
1 |
2 |
0 |
NA |
NA |
NA |
NA |
80 |
0 |
1 |
2 |
0 |
1 |
2 |
0 |
1 |
4.2.7.2.1 Bit separation
The bits input to the rate matching are denoted by , where i is the TrCH number and N_{i} is the number of bits input to the rate matching block. Note that the transport format combination number j for simplicity has been left out in the bit numbering, i.e. N_{i}=N_{ij}. The bits after separation are denoted by . For turbo encoded TrCHs with puncturing, b indicates the three sequences defined in section 4.2.7.2, with b=1 indicating the first sequence, and so forth. For all other cases b is defined to be 1. X_{i} is the number of bits in each separated bit sequence. The relation between e_{i,k} and x_{b,i,k} is given below.
For turbo encoded TrCHs with puncturing:
k = 1, 2, 3, …, X_{i} X_{i} = N_{i} /3
k = 1, …, N_{i} mod 3 Note: When (N_{i} mod 3) = 0 this row is not needed.
k = 1, 2, 3, …, X_{i} X_{i} = N_{i} /3
k = 1, 2, 3, …, X_{i} X_{i} = N_{i} /3
For uncoded TrCHs, convolutionally encoded TrCHs, and turbo encoded TrCHs with repetition:
k = 1, 2, 3, …, X_{i} X_{i} = N_{i}
4.2.7.2.2 Bit collection
The bits x_{b,i,k} are input to the rate matching algorithm described in subclause 4.2.7.3. The bits output from the rate matching algorithm are denoted .
Bit collection is the inverse function of the separation. The bits after collection are denoted by . After bit collection, the bits indicated as punctured are removed and the bits are then denoted by , where i is the TrCH number and V_{i} = N_{i,j}+N_{i,j}. The relations between y_{b,i,k}, z_{b,i,k}, and f_{i,k} are given below.
For turbo encoded TrCHs with puncturing (Y_{i}=X_{i}):
k = 1, 2, 3, …, Y_{I}
k = 1, …, N_{i} mod 3 Note: When (N_{i} mod 3) = 0 this row is not needed.
k = 1, 2, 3, …, Y_{i}
k = 1, 2, 3, …, Y_{i}
After the bit collection, bits z_{i,k} with value , where {0, 1}, are removed from the bit sequence. Bit f_{i,}_{1} corresponds to the bit z_{i,k} with smallest index k after puncturing, bit f_{i,}_{2} corresponds to the bit z_{i,k} with second smallest index k after puncturing, and so on.
For uncoded TrCHs, convolutionally encoded TrCHs, and turbo encoded TrCHs with repetition:
k = 1, 2, 3, …, Y_{i}
When repetition is used, f_{i,k}=z_{i,k} and Y_{i}=V_{i}.
When puncturing is used, Y_{i}=X_{i} and bits z_{i,k} with value , where {0, 1}, are removed from the bit sequence. Bit f_{i,}_{1} corresponds to the bit z_{i,k} with smallest index k after puncturing, bit f_{i,}_{2} corresponds to the bit z_{i,k} with second smallest index k after puncturing, and so on.
4.2.7.3 Rate matching pattern determination
The bits input to the rate matching are denoted by , where i is the TrCH and X_{i} is the parameter given in subclauses 4.2.7.1.1 and 4.2.7.1.2.
NOTE: The transport format combination number j for simplicity has been left out in the bit numbering.
The rate matching rule is as follows:
if puncturing is to be performed
e = e_{ini} — initial error between current and desired puncturing ratio
m = 1 — index of current bit
do while m <= X_{i}
e = e – e_{minus} — update error
if e <= 0 then — check if bit number m should be punctured
set bit x_{i,m} to where {0, 1}
e = e + e_{plus} — update error
end if
m = m + 1 — next bit
end do
else
e = e_{ini} — initial error between current and desired puncturing ratio
m = 1 — index of current bit
do while m <= X_{i}
e = e – e_{minus} — update error
do while e <= 0 — check if bit number m should be repeated
repeat bit x_{i,m}
e = e + e_{plus} — update error
end do
m = m + 1 — next bit
end do
end if
A repeated bit is placed directly after the original one.