Matlab Report
Matlab Report
Matlab Report
2
EEE2417 SIGNALS AND COMMUNICATION II
MATLAB PRACTICAL REPORT
MEMBERS
ENE212-0265/2018 Allan Alala
ENE212-0242/2020 Faith Ngina
ENE212-0266/2020 Judy Wangechi
ENE212-0268/2020 Tabby Achieng
ENE212-0292/2020 Mirriam Kerubo
Simulation of Reed-Solomon and Convolutional Coding
Introduction
Digital communication systems are designed to transmit information reliably over various types
of channels that can introduce errors into the transmitted signals. To mitigate these errors and
improve the reliability of communication, error-correcting codes like Reed-Solomon and
Convolutional codes are employed. These codes add redundancy to the transmitted information,
allowing the receiver to detect and correct errors that may occur during transmission.
Objective
To evaluate the performance of a communication system utilizing Reed-Solomon and
Convolutional coding schemes under an Additive White Gaussian Noise (AWGN) channel with a
high Signal-to-Noise Ratio (SNR).
Parameters
Reed-Solomon code parameters:
k_rs = 2: Information symbols
n_rs = 7: Total symbols
Convolutional code parameters:
n_conv = 7: Constraint length
k_conv = 1: Information bits per symbol
SNR_dB = 25: Signal-to-Noise Ratio in decibels
Methodology
Initialization: MATLAB environment was prepared by closing all existing figures to ensure a
clear workspace for the simulation.
>> close all;
% Updated parameters
k_rs = 2; % Number of information symbols for Reed-Solomon
n_rs = 7; % Total number of symbols for Reed-Solomon
n_conv = 7; % Constraint length for convolutional code
k_conv = 1; % Number of information bits per symbol for convolutional code
SNR_dB = 25; % Signal-to-Noise Ratio in dB
% Display results
fprintf('Original Data:\n');
disp(data.');
fprintf('Decoded Data:\n');
disp(decoded_data.');
fprintf('Bit Error Rate (BER): %f\n', ber);
Original Data:
0 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 1 1 1 0
Decoded Data:
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0
Encoder/Decoder Definition:
A Reed-Solomon encoder and decoder were defined using MATLAB's comm.RSEncoder and
comm.RSDecoder functions, respectively.
A Convolutional encoder and decoder were established with a specified trellis structure and a
termination method set as 'Terminated'. The Viterbi decoder's traceback depth was set to 7.
Data Processing:
Generated a binary data sequence of size data_size = k_rs * 10 to ensure divisibility by k_rs.
Encoded the data using the Reed-Solomon encoder, then converted the symbols to binary for
convolutional encoding.
The Convolutional encoder processed the binary data, which was then transmitted through an
AWGN channel modeled at 25 dB SNR.
Discussion
The BER of 0.30 is significant and suggests a high error rate despite the high SNR of 25 dB.
This could be due to the following factors:
Small Block Size: With k_rs = 2, the block size for Reed-Solomon encoding is small,
which may limit error correction capabilities.
Code Parameters and Depth: The chosen parameters for the convolutional code,
particularly the traceback depth, may not be optimal for the given data size and noise
level, affecting the decoding accuracy.
Conclusion
The simulation demonstrated the impact of coding parameters on the performance of a
communication system under noisy conditions. While Reed-Solomon and Convolutional codes
can effectively reduce errors, their performance is highly dependent on appropriate parameter
selection and operating conditions. Future simulations should explore the effects of varying the
block size, code rate, and traceback depth to optimize the system performance and minimize the
BER.