10.1 Title: Implementation of Correlative Coding for Data Transmission and Eye Diagram Analysis
10.2 Aim of the experiment: To implement correlative coding for data transmission, plot the eye pattern, and analyse inter symbol interference (ISI).
10.3 Theoretical background for the experiment: Correlative Coding: Correlative coding is used in digital communication systems to control the spectral characteristics of the transmitted signal and mitigate ISI. A common form of correlative coding is partial response signalling, where symbols are intentionally designed to overlap, producing controlled ISI. The most popular types are:
Duobinary Coding
Modified Duobinary Coding
Eye Diagram: An eye diagram is a graphical representation of a digital signal, showing how overlapping signals behave over time. It provides insights into ISI, noise levels, and the quality of the received signal. Key features analyzed include:
Eye opening: Indicates signal clarity.
Eye closure: Indicates increased ISI and noise.
Timing jitter: Variation in zero-crossing points.
10.4 Design:
Generate a random binary sequence.
Encode the data using duobinary or modified duobinary coding.
Transmit the encoded data through an additive white Gaussian noise (AWGN) channel.
Reconstruct the signal and plot the eye pattern.
Analyze the eye diagram for ISI and noise.
10.5 Step by step procedure to carry out the experiment:
Generate a random binary sequence.
Apply duobinary or modified duobinary encoding:
Duobinary: Add adjacent bits to introduce controlled ISI.
Modified Duobinary: Introduce a precoding step to prevent error propagation.
Transmit the encoded signal through a communication channel.
Add AWGN noise to simulate a realistic environment.
Decode the received signal using a matched filter.
Plot the eye diagram of the received signal.
Evaluate the effect of ISI and noise on the signal quality.
10.6 Code:
Eye Pattern
clc;
clear all;
close all;
N = 10^3; % number of symbols
% N=100;
% am = 2*(rand(1,N)>0.5)-1 + 1i*(2*(rand(1,N)>0.5)-1); % generating
random binary sequence
data = randi([0,1],1,N);
am = 2.*data -1;% converting to polar +1 & -1 (PAM with M = 2)
fs = 10; % oversampling rate / sampling frequency in Hz
t = -fs:1/fs:fs;
% defining the sinc filter
sincNum = sin(pi*t); % numerator of the sinc function
sincDen = (pi*t); % denominator of the sinc function
sincDenZero = find(abs(sincDen) < 10^-10); % Finding index of
values closer to zero
sincOp = sincNum./sincDen;
sincOp(sincDenZero) = 1; % sin(pix/(pix) =1 for x =0
% raised cosine filter for alpha = 0.5
alpha = 0.5;
cosNum = cos(alpha*pi*t);
cosDen = (1-(2*alpha*t).^2);
cosDenZero = find(abs(cosDen)<10^-10);% Finding index of values
closer to zero
cosOp = cosNum./cosDen;
cosOp(cosDenZero) = pi/4;
gt_alpha5 = sincOp.*cosOp;
figure;
plot(t,gt_alpha5);
title('Raised Cosine pulse for alpha = 0.5');
alpha = 1;
cosNum = cos(alpha*pi*t);
cosDen = (1-(2*alpha*t).^2);
cosDenZero = find(abs(cosDen)<10^-10);
cosOp = cosNum./cosDen;
cosOp(cosDenZero) = pi/4;
gt_alpha1 = sincOp.*cosOp;
figure;
plot(t,gt_alpha1);
title('Raised Cosine pulse for alpha = 1');
% upsampling the transmit sequence by 10
amUpSampled = [am;zeros(fs-1,length(am))];
amU = amUpSampled(:).';
% am_up = upsample(am,fs);
% filtered sequence
st_alpha5 = conv(amU,gt_alpha5);
st_alpha1 = conv(amU,gt_alpha1);
% st_alpha5 = conv(am_up,gt_alpha5);
% st_alpha1 = conv(am_up,gt_alpha1);
% taking only the first N*fs samples
st_alpha5_rs = st_alpha5([1:(N*fs)]);
st_alpha1_rs = st_alpha1([1:(N*fs)]);
st_alpha5_reshape = reshape(st_alpha5_rs,fs*2,N/2);
st_alpha1_reshape = reshape(st_alpha1_rs,fs*2,N/2);
% close all
t1 = 0:1/fs:(((2*fs)-1)/fs);
figure;
plot(t1,real(st_alpha5_reshape),'b');
title('eye diagram with alpha=0.5');
xlabel('time')
ylabel('amplitude')
axis([0 2 -1.5 1.5])
grid on
figure;
plot(t1,real(st_alpha1_reshape),'b');
title('eye diagram with alpha=1')
xlabel('time')
ylabel('amplitude')
axis([0 2 -1.5 1.5 ])
grid on;
10.7 Observations and results:
The duobinary encoded signal exhibited controlled ISI as expected.
The eye diagram showed a clear relationship between ISI, noise, and signal quality:
A wider eye opening indicated low ISI and noise.
A narrower eye opening indicated increased ISI and noise.
10.8 Plotting of the graph:
10.9 Conclusion of the experiment:
Correlative coding was successfully implemented, and the eye diagram was plotted to analyze ISI and noise effects. The experiment demonstrated the utility of correlative coding in controlling ISI and highlighted the eye diagram as a powerful tool for assessing signal quality in digital communication systems.