






Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!







MIT 6.02 DRAFT Lecture Notes Fall 2010 (Last update: October 6, 2010) Comments, questions or bug reports? Please contact [email protected]
This lecture describes an elegant and efficient method to decode convolutional codes. It avoids the explicit enumeration of the 2 N^ possible combinations of N -bit parity bit se- quences. This method was invented by Andrew Viterbi (’57, SM ’57) and bears his name.
At the receiver, we have a sequence of voltage samples corresponding to the parity bits that the transmitter has sent. For simplicity, and without loss of generality, we will assume 1 sample per bit. In the previous lecture, we assumed that these voltages have been digitized to form a re- ceived bit sequence. If we decode this received bit sequence, the decoding process is termed hard decision decoding (aka “hard decoding”). If we decode the voltage samples directly before digitizing them, we term the process soft decision decoding (aka “soft decoding”). The Viterbi decoder can be used in either case. Intuitively, because hard decision decoding makes an early decision regarding whether a bit is 0 or 1, it throws away information in the digitizing process. It might make a wrong decision, especially for voltages near the thresh- old, introducing a greater number of bit errors in the received bit sequence. Although it still produces the most likely transmitted sequence given the received sequence, by intro- ducing additional errors in the early digitization, the overall reduction in the probability of bit error will be smaller than with soft decision decoding. But it is conceptually a bit easier to understand hard decoding, so we will start with that, before going on to soft decision decoding. As mentioned in the previous lecture, the trellis provides a good framework for un- derstanding decoding. Suppose we have the entire trellis in front of us for a code, and now receive a sequence of digitized bits (or voltage samples). If there are no errors (i.e., the noise is low), then there will be some path through the states of the trellis that would exactly match up with the received sequence. That path (specifically, the concatenation of the encoding of each state along the path) corresponds to the transmitted parity bits. From
1
2 LECTURE 9. VITERBI DECODING OF CONVOLUTIONAL CODES
Figure 9-1: The trellis is a convenient way of viewing the decoding task and understanding the time evo- lution of the state machine.
there, getting to the original message is easy because the top arc emanating from each node in the trellis corresponds to a “0” bit and the bottom arrow corresponds to a “1” bit. When there are errors, what can we do? As explained earlier, finding the most likely transmitted message sequence is appealing because it minimizes the BER. If we can come up with a way to capture the errors introduced by going from one state to the next, then we can accumulate those errors along a path and come up with an estimate of the total number of errors along the path. Then, the path with the smallest such accumulation of errors is the path we want, and the transmitted message sequence can be easily determined by the concatenation of states explained above. To solve this problem, we need a way to capture any errors that occur in going through the states of the trellis, and a way to navigate the trellis without actually materializing the entire trellis (i.e., without enumerating all possible paths through it and then finding the one with smallest accumulated error). The Viterbi decoder solves these problems. It is an example of a more general approach to solving optimization problems, called dynamic pro- gramming. Later in the course, we will apply similar concepts in network routing protocols to find good paths in multi-hop networks.
The decoding algorithm uses two metrics: the branch metric (BM) and the path metric (PM). The branch metric is a measure of the “distance” between what was transmitted and what was received, and is defined for each arc in the trellis. In hard decision decoding, where we are given a sequence of digitized parity bits, the branch metric is the Hamming distance between the expected parity bits and the received ones. An example is shown in
4 LECTURE 9. VITERBI DECODING OF CONVOLUTIONAL CODES
depend only on the constraint length of the code and not on the parity functions. Figure 9- 2 shows the predecessor states for each state (the other end of each arrow). For instance, for state 00, α = 00 and β = 01; for state 01, α = 10 and β = 11. Any message sequence that leaves the transmitter in state s at time i + 1 must have left the transmitter in state α or state β at time i. For example, in Figure 9-2, to arrive in state ’01’ at time i + 1, one of the following two properties must hold:
PM[s, i + 1] = min(PM[α, i] + BM[α → s], PM[β, i] + BM[β → s]), (9.1)
where α and β are the two predecessor states. In the decoding algorithm, it is important to remember which arc corresponded to the minimum, because we need to traverse this path from the final state to the initial one keeping track of the arcs we used, and then finally reverse the order of the bits to produce the most likely message.
We can now describe how the decoder finds the most likely path. Initially, state ‘00’ has a cost of 0 and the other 2 k−^1 − 1 states have a cost of ∞. The main loop of the algorithm consists of two main steps: calculating the branch metric for the next set of parity bits, and computing the path metric for the next column. The path metric computation may be thought of as an add-compare-select procedure:
SECTION 9.3. SOFT DECISION DECODING 5
practical is that the number of survivor paths is much, much smaller than the total number of paths in the trellis. Another important point about the Viterbi decoder is that future knowledge will help it break any ties, and in fact may even cause paths that were considered “most likely” at a certain time step to change. Figure 9-4 continues the example in Figure 9-3, proceeding un- til all the received parity bits are decoded to produce the most likely transmitted message, which has two bit errors.
Hard decision decoding digitizes the received voltage signals by comparing it to a thresh- old, before passing it to the decoder. As a result, we lose information: if the voltage was 0.500001, the confidence in the digitization is surely much lower than if the voltage was 0.999999. Both are treated as “1”, and the decoder now treats them the same way, even though it is overwhelmingly more likely that 0.999999 is a “1” compared to the other value. Soft decision decoding (also sometimes known as “soft input Viterbi decoding”) builds on this observation. It does not digitize the incoming samples prior to decoding. Rather, it uses a continuous function of the analog sample as the input to the decoder. For example, if the expected parity bit is 0 and the received voltage is 0.3 V, we might use 0.3 (or 0. 32 , or some such function) as the value of the “bit” instead of digitizing it. For technical reasons that will become apparent later, an attractive soft decision metric is the square of the difference between the received voltage and the expected one. If the convolutional code produces p parity bits, and the p corresponding analog samples are v = v 1 , v 2 ,... , v (^) p , one can construct a soft decision branch metric as follows
BMsoft[u, v] =
^ p
i=
(u (^) i − v (^) i ) 2 , (9.2)
where u = u 1 , u 2 ,... , u (^) p are the expected p parity bits (each a 0 or 1). Figure 9-5 shows the soft decision branch metric for p = 2 when u is 00. With soft decision decoding, the decoding algorithm is identical to the one previously described for hard decision decoding, except that the branch metric is no longer an integer Hamming distance but a positive real number (if the voltages are all between 0 and 1, then the branch metric is between 0 and 1 as well). It turns out that this soft decision metric is closely related to the probability of the decoding being correct when the channel experiences additive Gaussian noise. First, let’s look at the simple case of 1 parity bit (the more general case is a straightforward extension). Suppose
the receiver gets the ith parity bit as v (^) i volts. (In hard decision decoding, it would decode − as 0 or 1 depending on whether v (^) i was smaller or larger than 0.5.) What is the probability that v (^) i would have been received given that bit u (^) i (either 0 or 1) was sent? With zero-mean additive Gaussian noise, the PDF of this event is given by
f (v (^) i |u (^) i ) =
e −d^2 i^ /^2 σ^2 √ 2 πσ 2
where d (^) i = v (^2) i if u (^) i = 0 and d (^) i = (v (^) i − 1) 2 if u (^) i = 1.
SECTION 9.5. SUMMARY 7
it is defined as 10 log 10 E (^) b /N 0 , where E − b is the signal strength ( 0. 5 2 = 0. 25 in our case because the difference between a voltage sent and the threshold voltage is 0.5 V) and N 0 is the noise, which for technical reasons is defined as 2 σ 2 (σ is the Gaussian noise variance— the factor of 2 is the technical definition). The important point is that the x axis is proportional to the logarithm of 1/(noise variance). The y axis shows the probability of a decoding error on a log scale. Some observations:
From its relatively modest, though hugely impactful, beginnings as a method to decode convolutional codes, Viterbi decoding has become one of the most widely used algorithms in a wide range of fields and engineering systems. Modern disk drives with “PRML” technology to speed-up accesses, speech recognition systems, natural language systems, and a variety of communication networks use this scheme or its variants. In fact, a more modern view of the soft decision decoding technique described in this lecture is to think of the procedure as finding the most likely set of traversed states in a Hidden Markov Model (HMM). Some underlying phenomenon is modeled as a Markov state machine with probabilistic transitions between its states; we see noisy observations from each state, and would like to piece together the observations to determine the most likely sequence of states traversed. It turns out that the Viterbi decoder is an excellent starting point to solve this class of problems (and sometimes the complete solution). On the other hand, despite its undeniable success, Viterbi decoding isn’t the only way to decode convolutional codes. For one thing, its computational complexity is exponential in the constraint length, k, because it does require each of these states to be enumerated. When k is large, one may use other decoding methods such as BCJR or Fano’s sequential decoding scheme, for instance. Convolutional codes themselves are very popular over both wired and wireless links. They are sometimes used as the “inner code” with an outer block error correcting code, but they may also be used with just an outer error detection code.
8 LECTURE 9. VITERBI DECODING OF CONVOLUTIONAL CODES
We are now at the end of the four lectures on error detection and error correcting codes to design point-to-point links over a communication channel. The techniques for error de- tection and correction constitute a key component of the physical layer of a communication network. In the next few lectures, we will move from the issues of a point-to-point link to sharing a common channel amongst multiple nodes that wish to communicate. Our solu- tion to this problem involves approaches that affect two layers of the network: the physical layer and the so-called link layer (we will study a class of protocols called “media access protocols” that form part of the link layer. We will develop these ideas and then get back to the different layers of the network in a few lectures.
10 LECTURE 9. VITERBI DECODING OF CONVOLUTIONAL CODES
Figure 9-4: The Viterbi decoder in action (continued from Figure 9-3. The decoded message is shown. To produce this message, start from the final state with smallest path metric and work backwards, and then reverse the bits. At each state during the forward pass, it is important to remeber the arc that got us to this state, so that the backward pass can be done properly.
SECTION 9.5. SUMMARY 11
!"!#$"!% $"!#$"!%
&'!#&'$%
!"#$%&'()$+,&-$ &./&'&0$/1()'2$ 3)'4$1(&$565$
!"!#!"!% $"!#!"!%
&('!%)%&('$%
Figure 9-5: Branch metric for soft decision decoding.
Figure 9-6: Error correcting performance results for different rate-1/2 codes.