Traceback Operation in Viterbi Decoding for Rate-k n Convolutional Codes
Field of the Invention
The present invention relates generally to improvements in traceback operation in the Viterbi decoder that is used in decoding rate-k/n convolutional codes or trellis codes. The present invention is applicable to the implementation of Viterbi decoder in decoding the Trellis-coded modulation (TCM). A typical application of this invention is decoding of the encoded TCM symbol data in the baseband signal of the PHY layer of a network.
Background
In most wireless communication systems, particularly those with significant intersymbol interference, convolutional encoding and Viterbi decoding are used to perform error detection and correction. The convolution encoder achieves error free transmission by adding enough redundancy to the source symbols. The choice of the convolutional code is application dependent and varies with the frequency characteristics of the transmission medium as well as the desired transmission rate. The Viterbi algorithm is a method commonly used for decoding bit streams encoded by convolution encoders. Figure 1 shows the block diagram of a Viterbi decoder. Viterbi decoding is mainly composed of an Add-Compare-Select (ACS) circuit (110) and a traceback circuit (130). The details of a particular decoder algorithm depend on the encoder.
Figure 2 shows an example of a convolutional code encoder having two time delay units (210 and 220). x(n) is the input and G0(n) and Gl(n) are the encoded outputs. The rate of the convolution encoder is defined as the number of input bits to output bits. This system has 1 input and 2 outputs thereby resulting in a coding rate of Vi. Its number of delay units determines the number of states of a convolution coder. For a
system with k delay units, there are 2k states. There are 2 delay units in this system and therefore, there are 22 = 4 states.
The system block diagram can be expressed with the following equations: G0(n) - x(n) + x(n- 1 ) + x(n-2)
Gl(n) = x(n) + x(n-2)
If there are m inputs, then there will be 2m state transitions. The total number of state transitions at a point in time is the product of the number of state transitions and the number of states, 2m+k. Figure 3 shows a trellis diagram of the systems in Figure 2 which include time in state transitions. Each node in the trellis diagram (310) denotes a state at a point in time. The branches connecting the nodes denote the state transitions (320). The state transitions are independent of the system equations. This a consequence of including the input, x(n), in the state definition. In certain systems, definition of the states may be more complicated and may require special considerations.
Viterbi decoding is composed of an Add-Compare-Select (ACS) operation and a traceback operation. In ACS, two things are done in every symbol interval (Refer to Figure 2, 1 symbol = 1 input bit = 2 encoded bits): the accumulated metric or path metric, which is the addition between the corresponding branch metric and the path metric of the originating state, is calculated for each state and the optimal incoming path or maximum likelihood path associated with each state is determined. The optimal incoming path, which is also called survivor path for each state will be stored in the storage unit. For the example from Figure 2 with 1 input, only 1 bit is needed to indicate the chosen path. A value of 0 indicates that the top incoming path of the given state is chosen as the best path whereas a value of 1 indicates the bottom path is chosen.
Traceback begins after completing the ACS operation of the last symbol in the frame, which is equal to the traceback length. The length of the traceback is typically chosen as 5 times of the constraint length. Traceback uses the survivor path information
from the storage unit to derive an optimal path through the trellis. The starting state for the traceback operation is either known or estimated to be correct. During traceback operation, the survivor path value is sent to the decoder output and the originating state of the survivor path is determined. The number of repetition for this process is equal to the traceback length. A more exact method is to wait until an entire frame of data is received before beginning traceback. In this case, tail bits or tail symbols are added to force the trellis to the zero state, providing a known point to begin traceback. The order with which the decoded output is generated is reversed as the path taken by traceback operation is from the end to the beginning of trellis, which is in the opposite direction to the path taken by ACS operation. In this example, coincidentally, the survivor path value can be directly sent to the decoder output without any other added operation. Lastly, the ordering of the decoded output need to be reversed to exactly reconstruct the sample input, x(n).
As described above, the traceback operation for a rate V2 convolution encoder only needs 1 bit to indicate the survivor path for an individual state and that particular bit is actually the desired output of the decoder. However, this method will not be sufficient if it applies to rate-k/n convolutional codes or trellis codes. Figure 4 shows an example of a rate-2/3 TCM encoder with 3 time delay units (410, 420 and 430) and Figure 5 shows the trellis diagram (510) of the system. In order to get the desired output of the decoder with the methods described in the prior art, it will need at least 2 bits to indicate the survivor path and some look up tables to determine the desired outputs from the survivor path information. This will increase the complexity of hardware implementation and time taken to process to get the desired output of the decoder.
The problem to be solved by this invention is to develop a new method for traceback operation having less hardware and time complexities than the methods described in the prior art to decode a rate-k/n convolutional codes or trellis codes.
Summary of the Invention
There is provided a method for performing a traceback operation in Viterbi decoding for decoding a stream of code signals, said method comprising at least the step of sequentially performing traceback operations on a current frame starting from a state through which a path of a previous frame passes.
The new method of performing traceback operation for rate-k/n convolutional codes or trellis codes, for example in Figure 5 (510) is described as follows. The order of the survivor path for each state in a symbol interval that is stored to the storage unit need to be arranged in such a way that it will simplify the process of deteπnining the originating state. All the states of the encoder will be equally divided into two conditions: even or odd. The condition is the key element in determining the originating state of the survivor path and obtaining the desired outputs of the decoder.
Two stage of operation is needed to obtain the desired final outputs. First stage is the error-free starting state calculation stage. Two storage elements are needed for storing the survivor path and its originating state. Then, the survivor path of the originating state will be used to determine the next symbol's originating state that will overwrite the storage element that stored the previous survivor path. Other means of performing said first stage of operation are a counter means, a memory pointer means, a condition indicator means, a dependent constant means and a shift & mask means. Second stage is the result output calculation stage. Said second stage uses the same means that performs said first stage operation and other additional means. Said additional means are a third storage element and a dedicated logic means.
A description will now be made on the operation of the traceback operation invented for viterbi decoding. Said step of determining a starting state location begins with initializing said first and second storage element to zero, said counter value to at least five times of said constraint length but less than said traceback length and said storage unit pointer to a constant. Said condition indicator updates value to zero if the
value of said first storage element is even and one if the value of said first storage element is odd. Reading a word of survivor path information from said storage unit overwrites said first storage element. Said condition indicator and said second storage element determine said number of state location in said first storage element to be right shifted and masked. Said condition indicator updates value but this time is based on said second storage element. The operation repeats until said counter value decreases to zero. The role of said first storage element and said second storage element interchanges whenever the operation repeats. The final value of condition indicator and said storage element determines the starting state for said step of obtaining said m decoded outputs, where m is the traceback length.
The operations of obtaining said m decoded outputs are now explained. Said initializing step includes initialize said third storage element to zero, said counter value to said traceback length and said storage unit pointer to a constant. Said values of said first or second storage element and condition indicator of said previous frame determines said starting state of said traceback operation. Said third storage element updates its value in a manner that the least significant bit is equal to said bit location 1 of said first storage element from said previous frame and the most significant bit is equal to said condition indicator from said previous frame. Said condition indicator updates value to zero if the value of said first storage element is even and one if the value of said first storage element is odd. Reading a word of survivor path information from said storage unit overwrites said first storage element. Said condition indicator and said second storage element determine said number of state location in said first storage element to be right shifted and masked.
The operation continues with interchanging the role of said first storage element with said second storage element. Said third storage element updates its value in a manner that the least significant bit is equal to said bit location 1 of said second storage element from said previous frame and the most significant bit is equal to said condition indicator from said previous frame. Said condition indicator updates value to zero if the
value of said second storage element is even and one if the value of said second storage element is odd. Reading a word of survivor path information from said storage unit overwrites said second storage element. Said condition indicator and said first storage element determine said number of state location in said second storage element to be right shifted and masked. Also, said value of condition indicator determines the type of exclusive-or operation to perform in order to get said result outputs. The operation repeats until said counter value decreases to zero. The role of said first storage element and said second storage element interchanges whenever the operation repeats. The final desired outputs that are equal to the source data could be obtained by reversing the order of said calculated result.
Brief Description of the Drawings
Figure 1 : Illustrates the block diagram of a Viterbi decoder.
Figure 2: Illustrates an example of a convolutional code encoder having two time delay units.
Figure 3: Illustrates the trellis diagram of the system shown in Figure 2.
Figure 4: Illustrates an example of a rate-2/3 TCM encoder with 3 time delay units.
Figure 5: Illustrates the trellis diagram of the system shown in Figure 4.
Figure 6(a): Illustrates the modified trellis diagram after bit-reverse method and separates into odd and even condition.
Figure 6(b): Illustrates the position of the state location, which stores the survivor path information.
Figure 7: Illustrates the operation flow of the error-free starting state calculation stage.
Figure 8: Illustrates the operation flow of the result output calculation stage.
Figure 9: Illustrates the operation flow of the result output calculation stage with consideration of tail bits or tail symbols.
Detailed Description
An embodiment of this invention is shown in Figure 7. Before the real traceback operation begins, the order of the survivor path for each state stored on the storage unit need to be arranged in such a way shown in Figure 6(a) and 6(b). Each state location will have 2 bits to indicate the survivor path. The arrangement is made successful by bit- reverse every state of the trellis diagram in Figure 5 and categorize it to two groups, which are odd and even. The definition of odd or even in this context is based on the 2 most significant bits of every current state (610-680). The order to read the survivor path is from the tail to the tip of the arrow (610-680). According to Figure 6(a), the left side of the diagram represents the even condition while the right side of the diagram represents the odd condition. The 2 bits will represent the survivor path and stored accordingly to the predefined state location (690).
The operation of the embodiments shown in Figure 7 is now explained. Said step of determining a starting state location begins with initializing said first and second storage element to zero, said counter value to at least five times of said constraint length but less than said traceback length and said storage unit pointer to a constant (710). Said condition indicator updates value to zero if the value of said first storage element is even and one if the value of said first storage element is odd (720). Reading a word of survivor path information from said storage unit overwrites said first storage element
(730). Said condition indicator and said second storage element determine said number of state location in said first storage element to be right shifted and masked (740 and 750). Said condition indicator updates value but this time is based on said second storage element. The operation repeats until said counter value decreases to zero (760). The role of said first storage element and said second storage element interchanges whenever the operation repeats (770). The final value of condition indicator and said storage element determines the starting state for said step of obtaining said m decoded outputs, where m is the traceback length.
Figure 8 shows the embodiment of the second stage of the traceback operation, which is obtaining said result outputs. Said initializing step includes initialize said third storage element to zero, said counter value to said traceback length and said storage unit pointer to a constant (810). Said values of said first or second storage element and condition indicator of said previous frame determines said starting state of said traceback operation (810). Said third storage element updates its value in a manner that the least significant bit is equal to said bit location 1 of said first storage element from said previous frame and the most significant bit is equal to said condition indicator from said previous frame (811). Said condition indicator updates value to zero if the value of said first storage element is even and one if the value of said first storage element is odd (812). Reading a word of survivor path information from said storage unit overwrites said first storage element (813). Said condition indicator and said second storage element determine said number of state location in said first storage element to be right shifted and masked (814 and 815).
The operation continues with interchanging the role of said first storage element with said second storage element. Said third storage element updates its value in a manner that the least significant bit is equal to said bit location 1 of said second storage element from said previous frame and the most significant bit is equal to said condition indicator from said previous frame (820). Said condition indicator updates value to zero if the value of said second storage element is even and one if the value of said second
storage element is odd (821). Reading a word of survivor path information from said storage unit overwrites said second storage element (822). Said condition indicator and said first storage element determine said number of state location in said second storage element to be right shifted and masked (823 and 824). Also, said value of condition indicator determines the type of exclusive-or operation to perform in order to get said result outputs (825). The operation repeats until said counter value decreases to zero (830). The role of said first storage element and said second storage element interchanges whenever the operation repeats (840). The final desired outputs that are equal to the source data could be obtained by reversing the order of said calculated result.
Figure 9 shows the embodiment of the second stage of the traceback operation with tail bits or tail symbols, which is obtaining said result outputs. Said initializing step includes initialize said first storage element, second storage element and third storage element to zero, said condition indicator to zero, said counter value to said traceback length and said storage unit pointer to a constant (910). Said third storage element updates its value in a manner that the least significant bit is equal to said bit location 1 of said first storage element from said previous frame and the most significant bit is equal to said condition indicator from said previous frame (911). Said condition indicator updates value to zero if the value of said first storage element is even and one if the value of said first storage element is odd (912). Reading a word of survivor path information from said storage unit overwrites said first storage element (913). Said condition indicator and said second storage element determine said number of state location in said first storage element to be right shifted and masked (914 and 915).
The operation continues with interchanging the role of said first storage element with said second storage element. Said third storage element updates its value in a manner that the least significant bit is equal to said bit location 1 of said second storage element from said previous frame and the most significant bit is equal to said condition indicator from said previous frame (920). Said condition indicator updates value to zero
if the value of said second storage element is even and one if the value of said second storage element is odd (921). Reading a word of survivor path information from said storage unit overwrites said second storage element (922). Said condition indicator and said first storage element determine said number of state location in said second storage element to be right shifted and masked (923 and 924). Also, said value of condition indicator determines the type of exclusive-or operation to perform in order to get said result outputs (925). The operation repeats until said counter value decreases to zero (930). The role of said first storage element and said second storage element interchanges whenever the operation repeats (940). The final desired outputs that are equal to the source data could be obtained by reversing the order of said calculated result.
This invention provides an efficient method to perform traceback operation in Viterbi decoding for rate-k/n convolutional codes. The two stages of traceback operation further improve the accuracy of Viterbi decoding wherein the error-free starting state is determined before performing the traceback operation to obtain the desired outputs. This method reduces the hardware and time complexities to perform traceback operation by avoiding the usage of look up tables in order to determine the desired outputs from the survivor path information. The ability to separate the survivor path information into two basic conditions with proper arrangement is the key element in this invention.