The present invention relates to the Long Term Evolution (LTE) technology in the 3rd Generation Partnership Project (3GPP), particularly to a calculation method and device of turbo code internal interleaver in the LTE.
The internal interleaver in a turbo code encoder or turbo code decoder uses
Formula (1) to calculate an output index according to an input index:
Π(i)=(f1·i+f2·i2)mod K (1)
where i is an input index and set to 0, 1, 2, . . . , K−1;
When Formula (1) is used in a turbo code encoder, the input sequence is a bit sequence; when it is used in a turbo code decoder, the input sequence is a soft bit sequence which refers to a non-binary sequence.
Further, the concrete values of f1, f2 and K may be obtained from the parameter table of a turbo code internal interleaver in 3GPP TS 36.212 Evolved Universal Terrestrial Radio Access (E-UTRA); Multiplexing and channel coding (Release 8) v8.5.0 (2008-12).
When prior art directly uses Formula (1) to calculate output index Π(i), excessive modular arithmetic is involved, making the calculation very complex and thereby consuming excessive memory resources and resulting in a long time delay in implementation of the encoding process of a turbo code encoder or implementation of the decoding process of a turbo code decoder.
For this reason, the main object of the present invention is to provide a calculation method of a turbo code internal interleaver, which can reduce computational complexity, so as to save memory resources and reduce time delay.
To achieve the foregoing object, the technical solution of the present invention is realized in the following way.
A calculation method of a turbo code internal interleaver comprises:
dividing a sequence with a length of Kj, which is input into a turbo code internal interleaver, into a plurality of windows each with a window length of Δj, the window length Δj satisfying 2f2Δj(mod Kj)=0, and Kj being divided exactly by Δj, wherein f2 is a parameter dependent on Kj;
obtaining output indices each of which corresponds to each input index in a first window;
calculating successively output indices each of which corresponds to each input index in a rest window according to the output indices each of which corresponds to each input index in the first window.
A formula used for calculating the output indices each of which corresponds to each input index in the rest window may be:
Π(i+k·Δj)=Π(i)+[k·(f1Δj+f2Δj2)](mod Kj)
where i is an input index in the first window and set to 0, 1, 2, . . . , Δj−1;
A formula used for calculating the output indices each of which corresponds to each input index in the rest window may be:
Π(i+Δj)=Π(i)+(f1·Δj+f2·Δj2)(mod Kj)
where i is an input index in a previous window and set to 0, 1, 2, . . . , Δj−1;
The plurality of windows may refer to two or more windows.
The step of obtaining output indices each of which corresponds to each input index in the first window may refer to: reading from a memory or obtaining through calculation.
The step of obtaining output indices each of which corresponds to each input index in the first window through calculation may be calculating with a following formula:
Π(i)=(f1·i+f2·i2)mod Kj
where i is an input index and set to 0, 1, 2, . . . , Kj−1.
The sequence may be a bit sequence or a soft bit sequence.
A calculation device of a turbo code internal interleaver comprises:
a window setting module, for dividing a sequence with a length of Kj, which is input into a turbo code internal interleaver, into a plurality of windows each with a window is length of Δj, the window length Δj satisfying 2f2Δj(mod Kj)=0, and Kj being divided exactly by Δj, wherein f2 is a parameter dependent on Kj;
a first output index obtaining module, for obtaining output indices each of which corresponds to each input index in a first window; and
a second output index obtaining module, for calculating successively output indices each of which corresponds to each input index in a rest window according to the output indices each of which corresponds to each input index in the first window.
The first output index obtaining module may be specifically used for reading from a memory or obtaining through calculation the output indices each of which corresponds to each input index in the first window.
The plurality of windows may refer to two or more windows; and/or
the sequence may be a bit sequence or a soft bit sequence.
From the foregoing technical solution, it may be known that by dividing a sequence with a length of Kj into a plurality of windows each with a window length of Δj, and making the window length Δj satisfy 2f2Δj(mod Kj)=0 and Kj divided exactly by Δj, starting from the second window, the present invention can obtain through calculation the output indices each of which corresponds to each input index in each window according to the output indices each of which corresponds to each input index in the first window. The modular arithmetic involved in this method is very simple, therefore the method can significantly reduce the computational complexity of the turbo code internal interleaver, thereby saving the memory resources used for this computation. In other words, it may reduce the memory area used for this computation, thereby reducing cost. Further, the output indices obtained through calculation are used for a turbo code encoder or turbo code decoder. As the computational complexity of the turbo code internal interleaver is reduced, the time delay in the implementation of the entire encoding process of a turbo code encoder or in the implementation of the entire decoding process of a turbo code decoder is reduced; thus, the present invention can save the cost and time delay of the whole system.
Before detailed description of a calculation method of a turbo code internal interleaver according to the present invention, the principle of this calculation method is introduced.
Firstly, a bit sequence or soft bit sequence with a length of Kj, which is input into the turbo code internal interleaver, is divided into a plurality of segments which have a same length. Each segment is called a window. It is supposed that the length of each window is Δj, an input index of an element a in window n is i, and an output index after i is interleaved with Formula (1) is Π(i); in window n+1, the input index of element b with a distance of Δj, from element a is i+Δj, and the output index after i+Δj is interleaved with Formula (1) is Π(i+Δj)=[f1(i+Δj)+f2(i+Δj)2](mod Kj).
Successively, the following equation may be obtained:
From the foregoing equation, it may be known that if 2f2Δj(mod Kj)=0, then 2f2Δji(mod Kj)=0, and Formula (2) may be obtained:
Π(i+Δj)=Π(i)+[f1·Δj+f2·Δ2](mod Kj) (2)
Therefore, if window length Δj can satisfy 2f2Δj(mod Kj)=0, then an output index of an element in a subsequent window may be easily calculated based on the output index of the element in the first window.
In fact, according to the parameter table of the turbo code internal interleaver, for every Kj, an appropriate Δj can be obtained to make 2f2Δj (mod Kj)=0 and Kj divided exactly by Δj. According to the parameter table of the turbo code internal interleaver, the range of j is 1, 2, 3, . . . , 188.
For example, Kj=40, f1=3, f2=10, to make 2×10×Δj mod 40=0 and 40 divided exactly by Δj, Δj may be set to 20. Here, the value of Δj is not exclusive as long as 2f2Δj (mod Kj)=0 is satisfied and Kj is divided exactly by Δj. For example, Δj may be 2 or 4.
Therefore, from the foregoing example, it may be known that for different Kj, as long as 2f2Δj(mod Kj)=0 is satisfied and Kj is divided exactly by Δj, Δj may be set to different values.
Here, those skilled in the art may know why Δj needs to satisfy the condition that Kj is divided exactly by Δj in addition to satisfying the condition of 2f2Δj(mod Kj)=0. This is because all windows should have a same length and the number of windows should be an integer.
From Formula (2), Formula (3) may be deduced:
Π(i+k·Δj)=Π(i)+[k·(f1·Δj+f2·Δj2)](mod Kj) (3)
where i is an input index in the first window and set to 0, 1, 2, . . . , Δj−1;
the value of k is set to 1, 2, . . . ,
When k=1, it means the output indices each of which corresponds to each input index in the second window is calculated based on the output indices Π(i) each of which corresponds to each input index i in the first window. When k is another value, the rest may be deduced by analogy.
Below the technical solution of the present invention is described in details.
As shown in
S101, dividing a sequence with a length of Kj, which is input into the turbo code internal interleaver, into a plurality of windows each with a window length of Δj, the window length Δj satisfying 2f2Δj(mod Kj)=0, and Kj being divided exactly by Δj, wherein f2 is a parameter dependent on Kj.
The sequence is a bit sequence or soft bit sequence; the soft bit sequence refers to a non-binary sequence.
The plurality of windows refers to two or more windows.
S102, obtaining output indices each of which corresponds to each input index in a first window.
When a memory stores pre-calculated output indices each of which corresponds to each input index in the first window, then the output indices each of which corresponds to each input index in the first window may be directly read from the memory, or obtained through calculation with Formula (1).
S103, calculating successively the output indices each of which corresponds to each input index in a rest window according to the output indices each of which corresponds to each input index in the first window.
The so-called “successively” refers to: calculating the output indices each of which corresponds to each input index in a window at first, and then calculating the output indices each of which corresponds to each input index in a next window.
The actual calculation formula may be Formula (3) as described above:
Π(i+k·Δj)=Π(i)+[k·(f1·Δj+f2·Δj2)](mod Kj) (3)
where i is an input index in the first window and set to 0, 1, 2, . . . , Δj−1;
Alternatively, Formula (4) may be adopted for the calculation, i.e. calculating the output indices each of which corresponds to each input index in a next window according to the output indices each of which corresponds to each input index in a previous window.
Π(i+Δj)=Π(i)+(f1·Δj+f2·Δj2)(mod Kj) (4)
where i is an input index in the previous window and set to 0, 1, 2, . . . , Δj−1;
In the following parameter matrix of the turbo code internal interleaver, the first column is Kj, the second column is f1, the third column is f2, and the fourth column is Δj:
The above parameter matrix of the turbo code internal interleaver lists the reasonable values of Δj in real application.
Below the technical solution of the present invention is further described in combination with an embodiment.
When the length Kj of a bit sequence, which is input into the turbo code internal interleaver, is 6144, it may be known from the parameter table of the turbo code internal interleaver that f1=263, f2=480. According to the condition that window length Δj needs to satisfy 2f2Δj (mod Kj)=0 and Kj is divided exactly by Δj, window length is set to Δj=64, then there will be 6144/64=96 windows.
64 is not the only value of window length Δj, but is used here as an example only.
The output indices each of which corresponds to each input index in the first window are read from the memory or obtained through calculation with Formula (1).
The input index i in the first window is 0, 1, 2, . . . , 63.
Supposing k=1, the output indices each of which corresponds to each input index in the second window are calculated with Formula (3).
The formula used to calculate the output indices each of which corresponds to each input index in the second window is:
Next, the output indices each of which corresponds to each input index in the rest windows are successively calculated with Formula (3).
In this embodiment, except the first window, the general formula used for calculating the output indices each of which corresponds to each input index in the rest windows is:
where k is set to 1, 2, 3, . . . , 95.
From the above analysis, it may be known that when the present invention calculates the output indices each of which corresponds to each input index in a window, the modular arithmetic involved is very simple, so compared with the prior art, the present invention significantly reduces the computational complexity of the turbo code internal interleaver.
To realize the foregoing method, the present invention provides a calculation device of the turbo code internal interleaver accordingly, as shown in
a window setting module 10, for dividing a sequence with a length of Kj, which is input into the turbo code internal interleaver, into a plurality of windows each with a window length of Δj, the window length Δj satisfying 2f2Δj(mod Kj)=0, and Kj being divided exactly by Δj, wherein f2 is a parameter dependent on Kj;
a first output index obtaining module 11, for obtaining output indices each of which corresponds to each input index in a first window, and the output indices in the first window may be read from a memory or obtained through calculation; and
a second output index obtaining module 12, for calculating successively output indices each of which corresponds to each input index in a rest window according to the output indices each of which corresponds to each input index in the first window.
The first output index obtaining module 11 is specifically used for reading from the memory or obtaining through calculation the output indices each of which corresponds to each input index in the first window.
The plurality of windows refers to two or more windows.
The sequence is a bit sequence or a soft bit sequence.
The foregoing description is a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
200910087635.9 | Jun 2009 | CN | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CN10/72164 | 4/23/2010 | WO | 00 | 12/23/2011 |