ArticleslgStudy

science

Viterbi decoder

Viterbi decoder is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Viterbi decoder rather than just read about it. In short: A Viterbi decoder uses the Viterbi algorithm for decoding a bitstream that has been encoded using a convolutional code or trellis code. There are other algorithms for decoding a convolutionally encoded stream (for example, the Fano algorithm).

Viterbi decoder — main illustration
Viterbi decoder — illustration

Key takeaways

  • Viterbi decoder belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Viterbi decoder to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Viterbi decoder from memory before moving on to harder problems.

Reference excerpt

A Viterbi decoder uses the Viterbi algorithm for decoding a bitstream that has been encoded using a convolutional code or trellis code. There are other algorithms for decoding a convolutionally encoded stream (for example, the Fano algorithm). The Viterbi algorithm is the most resource-consuming, but it does the maximum likelihood decoding. It is most often used for decoding convolutional codes with constraint lengths k≤3, but values up to k=15 are used in practice. Viterbi decoding was developed by Andrew J. Viterbi and published in the paper "Error Bounds for Convolutional Codes and an Asymptotically Optimum Decoding Algorithm". There are both hardware (in modems) and software implementations of a Viterbi decoder. Viterbi decoding is used in the iterative Viterbi decoding algorithm.

Hardware implementation

A hardware Viterbi decoder for basic (not punctured) code usually consists of the following major blocks:

Branch metric unit (BMU) Path metric unit (PMU) Traceback unit (TBU)

Branch metric unit (BMU)

A branch metric unit's function is to calculate branch metrics, which are normed distances between every possible symbol in the code alphabet, and the received symbol. There are hard decision and soft decision Viterbi decoders. A hard decision Viterbi decoder receives a simple bitstream on its input, and a Hamming distance is used as a metric. A soft decision Viterbi decoder receives a bitstream containing information about the reliability of each received symbol. For instance, in a 3-bit encoding, this reliability information can be encoded as follows:

Of course, it is not the only way to encode reliability data. The squared Euclidean distance is used as a metric for soft decision decoders.

Path metric unit (PMU)

A path metric unit summarizes branch metrics to get metrics for 2 K − 1 {\displaystyle 2^{K-1}} paths, where K is the constraint length of the code, one of which can eventually be chosen as optimal. Every clock it makes 2 K − 1 {\displaystyle 2^{K-1}} decisions, throwing off wittingly nonoptimal paths. The results of these decisions are written to the memory of a traceback unit. The core elements of a PMU are ACS (Add-Compare-Select) units. The way in which they are connected between themselves is defined by a specific code's trellis diagram. Since branch metrics are always ≥ 0 {\displaystyle \geq 0} , there must be an additional circuit (not shown on the image) preventing metric counters from overflow. An alternate method that eliminates the need to monitor the path metric growth is to allow the path metrics to "roll over"; to use this method it is necessary to make sure the path metric accumulators contain enough bits to prevent the "best" and "worst" values from coming within 2(n-1) of each other. The compare circuit is essentially unchanged.

It is possible to monitor the noise level on the incoming bit stream by monitoring the rate of growth of the "best" path metric. A simpler way to do this is to monitor a single location or "state" and watch it pass "upward" through say four discrete levels within the range of the accumulator. As it passes upward through each of these thresholds, a counter is incremented that reflects the "noise" present on the incoming signal.

Traceback unit (TBU)

Back-trace unit restores an (almost) maximum-likelihood path from the decisions made by PMU. Since it does it in inverse direction, a viterbi decoder comprises a FILO (first-in-last-out) buffer to reconstruct a correct order. Note that the implementation shown on the image requires double frequency. There are some tricks that eliminate this requirement.

Implementation issues

Quantization for soft decision decoding In order to fully exploit benefits of soft decision decoding, one needs to quantize the input signal properly. The optimal quantization zone width is defined by the following formula:

T = N 0 2 k , {\displaystyle \,\!T={\sqrt {\frac {N_{0}}{2^{k}}}},}

where N 0 {\displaystyle N_{0}} is a noise power spectral density, and k is a number of bits for soft decision.

Euclidean metric computation The squared norm ( ℓ 2 {\displaystyle \ell _{2}} ) distance between the received and the actual symbols in the code alphabet may be further simplified into a linear sum/difference form, which makes it less computationally intensive. Consider a 1/2 convolutional code, which generates 2 bits (00, 01, 10 or 11) for every input bit (1 or 0). These Return-to-Zero signals are translated into a Non-Return-to-Zero form shown alongside.

Each received symbol may be represented in vector form as vr = {r0, r1}, where r0 and r1 are soft decision values, whose magnitudes signify the joint reliability of the received vector, vr. Every symbol in the code alphabet may, likewise, be represented by the vector vi = {±1, ±1}. The actual computation of the Euclidean distance metric is:

… excerpt ends here. Continue reading the full article.

Illustrations

Viterbi decoder: A sample implementation of a branch metric unit
A sample implementation of a branch metric unit
Viterbi decoder: A sample implementation of a path metric unit for a specific K=4 decoder
A sample implementation of a path metric unit for a specific K=4 decoder
Viterbi decoder: A sample implementation of an ACS unit
A sample implementation of an ACS unit
Viterbi decoder: A sample implementation of a traceback unit
A sample implementation of a traceback unit

Worked examples

Example 1 — a first encounter with Viterbi decoder

Start with the simplest possible case. Write down what Viterbi decoder claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Viterbi decoder before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Viterbi decoder ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Viterbi decoder

In research
Viterbi decoder appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Viterbi decoder in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Viterbi decoder is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data transmission, Error detection and correction, so understanding it makes those chapters shorter.
In everyday life
Look for Viterbi decoder outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Viterbi decoder” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Viterbi decoder in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Viterbi decoder means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Viterbi decoder out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Viterbi decoder in simple terms?

A Viterbi decoder uses the Viterbi algorithm for decoding a bitstream that has been encoded using a convolutional code or trellis code. There are other algorithms for decoding a convolutionally encoded stream (for example, the Fano algorithm).

Why does Viterbi decoder matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Viterbi decoder?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Viterbi decoder.

Tags

  • Data transmission
  • Error detection and correction

Keep exploring