Design of Convolutional Encoder and Viterbi Decoder Using MATLAB
Design of Convolutional Encoder and Viterbi Decoder Using MATLAB
Design of Convolutional Encoder and Viterbi Decoder Using MATLAB
E-ISSN: 2349-7610
ABSTRACT
The main aim of any communication schemes is to provide error-free data transmission .Error control coding is a method to detect
and possibly correct errors by introducing redundancy to the stream of bits to be sent to the channel. This coding has the
usefulness that it allows us to increase the rate at which information may be transmitted over a channel while maintaining a fixed
error rate. The Convolution (Channel) Encoder will add bits to the message bits to be transmitted systematically. After passing
through the channel, at the receiver end the original message sequence is obtained from the received data using Viterbi decoder. It
implements Viterbi Algorithm, which is a maximum likelihood algorithm, based on the minimum cumulative hamming distance it
decides the optimal trellis path that is most likely followed at the encoder. Convolutional encoding and Viterbi decoding are error
correction techniques widely used in Communication systems to improve the bit error rate (BER) performance. In this paper, I
present the convolution encoder and Viterbi decoder for constraint length 4 and bit rate 1/2. In addition, a Viterbi decoder is
developed in MATLAB.
1. INTRODUCTION
Coding theory deals with transmission of data over noisy
channels by adopting various source and channel
coding/decoding schemes. The convolution codes are
widely used as forward error correction codes. The main
decoding strategy for convolutional codes is based on the
widely used Viterbi algorithm.
Convolutional encoding with Viterbi decoding is a
powerful Forward Error Correction technique that is
particularly suited to a channel in which the transmitted
signal is corrupted mainly by Additive White Gaussian
Noise (AWGN). The purpose of forward error correction
(FEC) is to improve the capacity of a channel by adding
some carefully designed redundant information to the
data being transmitted through the channel [1]. The
Viterbi algorithm essentially performs maximum
likelihood decoding to correct the errors in received data,
which are caused by the channel noise. Hence, minimize
the bit error rate (BER) to improve the performance.
Viterbi decoding has the advantage that it has a fixed
decoding time and it is well suited to hardware decoder
implementation. The requirements for the Viterbi
2. CONVOLUTION ENCODER
Convolutional coding is a bit-level encoding technique.
Convolutional codes are used in applications that require
good performance with low implementation cost. Using
convolutional codes a continuous sequence of
10
INTERNATIONAL JOURNAL FOR RESEARCH IN EMERGING SCIENCE AND TECHNOLOGY, VOLUME-1, ISSUE-7, DECEMBER-2014
Input bit
m
Register
contents
State at
time ti
E-ISSN: 2349-7610
State at
time ti+1
Output
word
code
O1
O2
000
00
00
100
00
10
110
10
11
011
11
01
101
01
10
110
10
11
011
11
01
001
01
00
11
INTERNATIONAL JOURNAL FOR RESEARCH IN EMERGING SCIENCE AND TECHNOLOGY, VOLUME-1, ISSUE-7, DECEMBER-2014
E-ISSN: 2349-7610
b) Trellis Diagram:
A trellis diagram is a kind of state diagram and mainly it
can be used for decoding of convolutional codes. The
detection of the original stream can be described as
finding the most probable path through the trellis.
In the trellis diagram, each node specifies an individual
state at a given time and indicates a possible pattern of
recently received data bits. Each branch indicates the
transition to a new state at the next timing cycle. When
two paths enter the same state, the one having the best
metric is chosen: this path is called the surviving path. In
the decoder the selection of surviving paths are
performed by all the states. Based on the received coded
bits we can choose the more likely path and ignore the
least likely paths. The decoding complexity can reduce
by ignoring the minimum likely paths.
12
INTERNATIONAL JOURNAL FOR RESEARCH IN EMERGING SCIENCE AND TECHNOLOGY, VOLUME-1, ISSUE-7, DECEMBER-2014
E-ISSN: 2349-7610
e. Survivors at t6
Fig-6: State Metric comparison at each state
3. VITERBI DECODER
In 1967 by Andrew Viterbi was proposed the Viterbi
algorithm (VA) and is used to decoding a bit stream that
has been encoded using FEC code [3]. Viterbi algorithm
can be explained by a trellis diagram it requires which
comprises of minimum path and minimum distance
Calculation and retracing the path. Fig-7 shows the block
diagram of the Viterbi decoder.
It consists of following blocks
a.
b.
c.
d.
a. Survivors at t2
b. Survivors at t3
c. Survivors at t4
VOLUME-1, ISSUE-7, DECEMBER-2014
d. Survivors at t5
13
INTERNATIONAL JOURNAL FOR RESEARCH IN EMERGING SCIENCE AND TECHNOLOGY, VOLUME-1, ISSUE-7, DECEMBER-2014
E-ISSN: 2349-7610
4. RESULTS
Fig-9 shows that the bit error rate (BER) as a function of
the signal to noise ratio (SNR), from this graph the
performance improvement of soft decision Viterbi as
compared with hard decision Viterbi is approximately
2db.
Fig-: 9 BER graph for hard decision (HD) and soft decision
(SD) Viterbi decoder with C=4 and R=1/2.
5. CONCLUSION
Soft Decisions versus Hard Decisions
The primary difference between the hard decision and
soft decision Viterbi algorithm is that the soft decision
algorithm cannot use hamming distance metric because
of its limited resolution. A distance metric with needed
resolution is the Euclidean distance.
To compare the performance of coded binary systems on
a AWGN channel when the decoder performs either hard
or soft decisions, the energy Ec per coded bit is fixed and
VOLUME-1, ISSUE-7, DECEMBER-2014
14
INTERNATIONAL JOURNAL FOR RESEARCH IN EMERGING SCIENCE AND TECHNOLOGY, VOLUME-1, ISSUE-7, DECEMBER-2014
E-ISSN: 2349-7610
REFERENCES
[1]
[2]
[3]
[4]
[5]
15