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

Convolution Exp 7

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

Convolution Exp 7

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

DIGITAL COMMUNICATION 2023

EXPERIMENT NO-7.
AIM: To study channel coding using implementation of Convolution codes on
MATLAB.

APPARATUS: MATLAB Software.

THEORY:
Convolutional codes are a class of error-correcting codes used in digital communication
systems. They are distinct from linear block codes like Hamming codes or Reed-Solomon
codes and are characterized by their continuous encoding process. Here's a brief overview of
convolutional codes:

1. Continuous Encoding: Unlike block codes that encode data in fixed-size blocks,
convolutional codes continuously encode data streams by processing one or more input bits
at a time. This continuous encoding is achieved through a shift register and modulo-2 adder,
which together form a "convolutional encoder."
2. Shift Register: The core component of a convolutional encoder is a shift register, which
consists of multiple flip-flops connected in series. Each flip-flop stores one bit of information.
As data bits enter the encoder, they are shifted through the shift register.
3. Encoder State and Transition: The configuration of the bits in the shift register represents
the encoder's current state. The encoder's behavior is defined by a set of rules, often
represented in a trellis diagram, that dictate how the input bits are combined and shifted based
on the current state. These rules are determined by the encoder's "connection polynomial" or
"generator polynomial."
4. Code Rate: Convolutional codes have a code rate defined as "k/n," where "k" represents the
number of output bits (code bits) produced for every "n" input bits. The code rate determines
the trade-off between error correction capability and bandwidth efficiency. Higher code rates
transmit more data but provide less error correction, while lower code rates offer better error
correction at the expense of reduced data throughput.
5. Viterbi Decoding: Convolutional codes are typically decoded using the Viterbi algorithm,
which is a maximum likelihood decoding technique. The Viterbi decoder explores different
paths through the trellis diagram and selects the most likely path, corresponding to the original
transmitted data.
6. Error Correction: Convolutional codes can correct errors by using the Viterbi decoder to
identify and correct errors in the received data stream. The ability to correct errors is
determined by the code rate and the constraint length (the number of memory elements in the
shift register).
7. Applications: Convolutional codes are widely used in digital communication systems,
especially in situations where the data transmission channel is subject to noise and
interference. They are commonly used in satellite communication, wireless communication
(e.g., cellular networks), and digital broadcasting.
8. Concatenated Codes: Convolutional codes are sometimes used in combination with other
error-correcting codes, such as Reed-Solomon codes, in a concatenated coding scheme to
enhance error correction capabilities.

S.V.N.I.T, SURAT Page 1


DIGITAL COMMUNICATION 2023

In summary, convolutional codes are a class of error-correcting codes that operate on


continuous data streams using a shift register-based encoder and are decoded using the Viterbi
algorithm. They are a crucial component of modern digital communication systems, ensuring
reliable data transmission in the presence of noise and interference.

MATLAB CODE:

clc;
clear all;
close all;

k=3;
G1=7;
G2=5;
msg=[1 1 0 0 1 0]
trel=poly2trellis(k,[G1 G2]);
coded=convenc(msg,trel)
tblen=length(msg);

decoded=vitdec(coded,trel,tblen,'trunc','hard')

N=length(coded);

X_a=msg;

No=1;
p_db=-10;
p=10.^(p_db/10);
X=2*X_a-1;
Y=sqrt(p)*X+sqrt(No)*(randn());
Y_dec=(Y>=0);
err_cnt=sum(Y_dec~=X_a);
ber=(err_cnt/N)*100

X_b=coded;

No=1;
p_db=-10;
p=10.^(p_db/10);
X=2*X_b-1;
Y=sqrt(p)*X+sqrt(No)*(randn());
Y_dec=(Y>=0);
err_cnt=sum(Y_dec~=X_b);
ber_encoded=(err_cnt/N)*100

S.V.N.I.T, SURAT Page 2


DIGITAL COMMUNICATION 2023
OUTPUT:

ber =

25

ber_encoded =

S.V.N.I.T, SURAT Page 3

You might also like