(8 votes, average: 4.50 out of 5)

# Soft Input Viterbi decoder

by on January 14, 2009

In two previous posts, we have discussed Convolutional Coding and the associated hard decision Viterbi decoding. In this post lets extent Viterbi decoding algorithm to soft input decision scheme. The modulation used is BPSK and the channel is assumed to be AWGN alone.

## System Model

$y=c + n$, where

$c$ is the modulated coded sequence taking values $+\sqrt{E_c}$ if the coded bit is 1 and $-\sqrt{E_c}$ if the coded bit is 0,

$n$is the Additive White Gaussian Noise following the probability distribution function,

$p(x) = \frac{1}{\sqrt{2\pi\sigma^2}}e^{\frac{-(x-\mu)^2}{2\sigma^2}$ with mean $\mu=0$ and variance $\sigma^2 = \frac{N_0}{2}$.

The conditional probability distribution function (PDF) of $y$ if the coded bit is 0 is,

$p(y|c_{0}) = \frac{1}{\sqrt{\pi N_0}}e^{\frac{-(y+\sqrt{E_c})^2}{N_0}$.

Conditional probability distribution function (PDF) of $y$ if the coded bit is 1 is,

$p(y|c_{1}) = \frac{1}{\sqrt{\pi N_0}}e^{\frac{-(y-\sqrt{E_c})^2}{N_0}$ .

## Euclidean distance

In the hard decision Viterbi decoding, based on the location of the received coded symbol, the coded bit was estimated – if the received symbol is greater than zero, the received coded bit is 1; if the received symbol is less than or equal to zero, the received coded bit is 0.

In Soft decision decoding, rather than estimating the coded bit and finding the Hamming distance, the distance between the received symbol and the probable transmitted symbol is found out.

Euclidean distance if transmitted coded bit is 0 is,

$ed_0 = (y- -\sqrt{E_c})^2 = (y^2 + 2y\sqrt{E_c} + E_c)^2$.

Euclidean distance if transmitted coded bit is 1 is,
$ed_1 = (y- \sqrt{E_c})^2 = (y^2 - 2y\sqrt{E_c} + E_c)^2$.

As the terms $2$, $y^2$, $\sqrt{E_c}$ and $E_c$ are common in both the equations they can be ignored. The simplified Euclidean distance is,

$ed_0 = +y$ and

$ed_1 = -y$.

As the Viterbi algorithm takes two received coded bits at a time for processing, we need to find the Euclidean distance from both the bits.

$ed_{00} = (y_{i,1}- -\sqrt{E_c})^2 + (y_{i,2}- -\sqrt{E_c})^2 = (+y_{i,1} + y_{i,2})$

$ed_{01} = (y_{i,1}- -\sqrt{E_c})^2 + (y_{i,2}- +\sqrt{E_c})^2 = (+y_{i,1} - y_{i,2})$

$ed_{10} = (y_{i,1}- +\sqrt{E_c})^2 + (y_{i,2}- -\sqrt{E_c})^2 = (-y_{i,1} + y_{i,2})$

$ed_{11} = (y_{i,1}- +\sqrt{E_c})^2 + (y_{i,2}- +\sqrt{E_c})^2 = (-y_{i,1} - y_{i,2})$

Summarizing, in Soft decision decoding, Euclidean distance is used instead of Hamming distance for branch metric and path metric computation.

Note:

For details on branch metric, path metric computation and trace back unit refer to the post on hard decision Viterbi decoding.

## Simulation Model

Octave/Matlab source code for computing the bit error rate for BPSK modulation in AWGN using the convolutional coding and soft decision Viterbi decoding is provided.

The simulation model performs the following:

(a) Generation of random BPSK modulated symbols +1’s and -1’s

(b) Convolutionally encode them using rate -1/2, generator polynomial [7,5] octal code

(c) Passing them through Additive White Gaussian Noise channel

(d) Received soft bits and hard bits are passed to Viterbi decoder

(e) Counting the number of errors from the output of Viterbi decoder

(f) Repeating the same for multiple Eb/No value.

(Warning: The simulation took around 5 hours in desktop to generate the plots)

BER plot for BPSK with AWGN in soft decision Viterbi decoding

Figure: BER plot for BPSK with AWGN in soft decision Viterbi decoding

## Summary

1. When compared with hard decision decoding, soft decision decoding provides around 2dB of gain for bit error rate of $10^{-4}$ .

2. In the current simulation model, soft bit are used with full precision for obtaining the BER curves. However in typical implementations, soft bits will be quantized to finite number of bits.

D id you like this article? Make sure that you do not miss a new article by subscribing to RSS feed OR subscribing to e-mail newsletter. Note: Subscribing via e-mail entitles you to download the free e-Book on BER of BPSK/QPSK/16QAM/16PSK in AWGN.