0% found this document useful (0 votes)
169 views

Ex - No:3C Convolutional Codes Date AIM

This document discusses convolutional codes for error detection and correction. Convolutional codes transform m-bit information symbols into n-bit symbols using a finite state machine. They have memory and use previous bits to encode following bits. Trellis diagrams are used to represent convolutional codes. The Viterbi algorithm is used for decoding by comparing branch codes to received codes and eliminating paths with larger Hamming distances. The document provides an example that defines a trellis code, convolutionally encodes input data, decodes the output, and displays the results.

Uploaded by

bbmathi
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
169 views

Ex - No:3C Convolutional Codes Date AIM

This document discusses convolutional codes for error detection and correction. Convolutional codes transform m-bit information symbols into n-bit symbols using a finite state machine. They have memory and use previous bits to encode following bits. Trellis diagrams are used to represent convolutional codes. The Viterbi algorithm is used for decoding by comparing branch codes to received codes and eliminating paths with larger Hamming distances. The document provides an example that defines a trellis code, convolutionally encodes input data, decodes the output, and displays the results.

Uploaded by

bbmathi
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

EX.

NO:3c

CONVOLUTIONAL CODES

DATE:
AIM
To design an error detection and correction codes using convolutional codes.

SOFTWARE TOOL REQUIRED

MATLAB Version 7.1

THEORY
CONVOLUTIONAL CODE
Convolutional code is a type of error-correcting code in which m-bit information symbol
to be encoded is transformed into n-bit symbol. Convolutional codes are used extensively in
numerous applications in order to achieve reliable data transfer, including digital video, radio,
mobile communication, and satellite communication.
A convolutional encoder is a finite state machine. An encoder with n registers will
have 2n states.
Convolutional codes have memory that uses previous bits to encode or decode
following bits
The most commonly known graphical representation of a code is the trellis
representation. A code trellis diagram is simply an edge labeled directed graph in
which every path represents a code sequence.
This representation has resulted in a wide range of applications of convolutional
codes for error control in digital communications.
Viterbi algorithm is used for decoding a bit stream that has been encoded using
forward error correction based on a convolutional code.
Viterbi decoding compares the hamming distance between the branch code and the
received code.
Path producing larger hamming distance is eliminated.
In information theory, the Hamming distance between two strings of equal length is
the number of positions at which the corresponding symbols are different.

Fig: Encoder

Fig: State Diagram

Fig: Trellis Diagram


PROCEDURE

Get the input.

Define Trellis code.

Conventional code using input data with defined trellis.

Decode the output.

Display the result.

CODING
%General Format
clc
close all
clear all
i=input('Enter the input data:');
trellis = struct('numInputSymbols',2,'numOutputSymbols',8,...
'numStates',4,'nextStates',[0 2;0 2;1 3;1 3],...
'outputs',[0 7;3 4;1 6;2 5]);
t=convenc(i,trellis)
tblen=3;
decoded1 = vitdec(t,trellis,tblen,'trunc','hard')
% 1/3 Conventional Encoder
clc;
clear all;
close all;
m=[0 1 0 1 0 1 0 1];
m1=[0 0 1 1 0 0 1 1];
m2=[0 0 0 0 1 1 1 1];
for i=1:8
x1=m(i);
x2=xor(m(i),m2(i));
x3=xor(x2,m1(i));
x=[x1;x2;x3]'
i=i+1;
end

OUTPUT
Enter the input data: [1 0 1]
t=1

decoded1 = 1

% 1/3 Convolutional Encoder


x=
0

x=
1
x=
0
x=
1
x=
0
x=
1
x=
0
x=
1

RESULT:
Thus error detection and correction using convolutional codes was designed and the
output was also displayed successfully.

You might also like