![Page 1: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/1.jpg)
Decoding of Convolutional Codes
Let Cm be the set of allowable code sequences of length m.
Not all sequences in {0,1}m are allowable code sequences!
Each code sequence can be represented by a unique path
through the trellis diagram What is the probability that the code sequence is sent and the
binary sequence is received?
where p is the probability of bit error of BSC from modulation
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
mCc
c
y
cydHmp
cydHpcy
,)1.(
,|Pr
![Page 2: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/2.jpg)
Decoding Rule for Convolutional Codes
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
Maximum Likelihood Decoding Rule:
Choose the code sequence through the trellis which has the
smallest Hamming distance to the received sequence!
cyH
dmCc
cymCc
,min,Prmax
![Page 3: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/3.jpg)
The Viterbi Algorithm
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
The Viterbi Algorithm (Viterbi, 1967) is a clever way of implementing Maximum Likelihood Decoding.
Computer Scientists will recognize the Viterbi Algorithm as an example of a CS technique called “ Dynamic Programming”
Reference: G. D. Forney, “ The Viterbi Algorithm”, Proceedings of the IEEE, 1973 Chips are available from many manufacturers which implement the Viterbi Algorithm for K < 10 Can be used for either hard or soft decision decoding
We consider hard decision decoding initially
![Page 4: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/4.jpg)
Basic Idea of Viterbi Algorithm
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
There are 2rm code sequences in Cm .
This number of sequences approaches infinity as m
becomes large
Instead of searching through all possible sequences,
find the best code sequence "one stage at a time"
![Page 5: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/5.jpg)
The Viterbi Algorithm(Hamming Distance Metric)
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
Initialization:
Let time i = 0.
We assign each state j a metric Z j 0 at time 0.
We know that the code must start in the state 0.
Therefore we assign:
Z j 0
Z j 0 for all other states
![Page 6: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/6.jpg)
The Viterbi Algorithm (continued)
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
Consider decoding of the ith segment:
Let be the segment of n bits received between times i
and i + 1
There are several code segments of n bits which lead
into state j at time i+1. We wish to find the most likely one.
Let be the state from which the code segment emerged
For each state j, we assume that is the path leading into
state j if:
is the smallest of all the code segments leading into state j.
iy
ic
ics ic
ic
yicH
diicsZ ,
![Page 7: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/7.jpg)
The Viterbi Algorithm (continued)
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
Iteration:
• Let
• Let i=i+1
• Repeat previous step
•Incorrect paths drop out as i approaches infinity.
yicH
diicsZi
jZ ,1
![Page 8: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/8.jpg)
Viterbi Algorithm Decoding Example
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
r =1/2, K = 3 code from previous example
= (0 0 1 1 0 1 0 0 10 10 1 1) is sent
= (0 1 1 1 0 1 0 0 10 10 1 1) is received.
What path through the trellis does the Viterbi Algorithm choose?
c
y
![Page 9: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/9.jpg)
Viterbi Algorithm Decoding Example(continued)
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
![Page 10: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/10.jpg)
Viterbi Decoding Examples
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
There is a company Alantro with a example Viterbi
decoder on the web, made available to promote their
website
http://www.alantro.com/viterbi/workshop.html
Your browser must have JAVA-enabled
![Page 11: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/11.jpg)
Summary of Encoding and Decoding ofConvolutional Codes
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
Convolutional are encoded using a finite state machine.
Optimal decoder for convolutional codes will find the path
through the trellis which lies at the shortest distance to the
received signal.
Viterbi algorithm reduces the complexity of this search by
finding the optimal path one stage at a time.
The complexity of the Viterbi algorithm is proportional to the number of states
exponential relationship to constraint length
![Page 12: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/12.jpg)
Implementation of Viterbi Decoder • Complexity is proportional to number of states
– increases exponentially with constrain length K: 2K
• Very suited to parallel implementation – Each state has two transitions into it
– Each state has two transitions out of it
– Each node must compute two path metrics, add them to previous metric and compare
– Much analysis as gone into optimizing implementation of this
“Butterfly” calculation
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
![Page 13: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/13.jpg)
Other Applications of Viterbi Algorithm
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
Any problem that can be framed in terms of sequence detection can be
solved with the Viterbi Algorithm]
MLSE Equalization
Decoding of continuous phase modulation
Multiuser detection
![Page 14: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/14.jpg)
Continuous Operation
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
When continuous operation is desired, decoder will automatically synchronize with transmitted signal without knowing state
Optimal decoding requires waiting until all bits are received to trace back path.
In practice, it is usually safe to assume that all paths have merged after approximately 5K time intervals
diminishing returns after delay of 5K
![Page 15: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/15.jpg)
Frame Operation of Convolutional Codes
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
Frequently, we desire to transfer short (e.g., 192 bit)
frames with convolutional codes.
When we do this, we must find a way to terminate
code trellis
Truncation
Zero-Padding
Tail-biting
Note that the trellis code is serving as a ‘block’ code in
this application
![Page 16: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/16.jpg)
Trellis Termination: Zero Padding
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
Add K-1 0’s to the end of the data sequence to force
the trellis back to the all zeros state
Performance is goodNow both start and ending state are known by the decoder
Wastes bits in short frame
![Page 17: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/17.jpg)
Performance of Convolutional Codes
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
When the decoder chooses a path through the trellis which diverges from the correct path, this is called an "error event“
The probability that an error event begins during the current time interval is the "first-event error probablity“ Pe
The minimum Hamming distance separating any two distinct
path through the trellis is called the “free distance” dfree.
![Page 18: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/18.jpg)
Calculation of Error Event Probability
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
What's the pairwise probability of choosing a path at distance d from the correct path?
![Page 19: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/19.jpg)
Calculation of First Event Error Probability
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
![Page 20: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/20.jpg)
Evaluating Error ProbabilityUsing the Transfer Function Bound
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
![Page 21: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/21.jpg)
Finding T(D) from State Diagram
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
Break all 0’s state in two, creating a starting state and a terminating state
Re-label every output 1 as a D
ad is the number of distinct paths leading from the starting state to the terminating state while generating the function Dd
![Page 22: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/22.jpg)
Example of State Diagram
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
![Page 23: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/23.jpg)
Performance Example for Convolutional Code
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
![Page 24: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/24.jpg)
Performance of r=1/2 Convolutional Codeswith Hard Decisions
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
![Page 25: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/25.jpg)
Performance of r=1/3 Convolutional Codeswith Hard Decisions
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
![Page 26: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/26.jpg)
Punctured Convolutional Codes
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE
![Page 27: Decoding of Convolutional Codes Let C m be the set of allowable code sequences of length m. Not all sequences in {0,1}m are allowable code sequences!](https://reader036.vdocuments.us/reader036/viewer/2022070307/551b05ce550346f70d8b5899/html5/thumbnails/27.jpg)
Practical Examples of Convolutional Codes
Error Control Coding , © Brian D. Woerner , reproduced by: Erhan A. INCE