Eye Diagrams
Eye Diagrams
M= fix(length(y)/8);
y= y(1:M*8)
plot(A),grid
Fs = 1.024*10^6;
Rs = 256*10^3;
ns = Fs/Rs;
rolloff = 0.2;
M = 4;
'FilterSpanInSymbols', 6, ...
'Gain', 1);
frameLen = 2000;
msgSymbols = qpskMod(msgData);
msgTx = rctFilt(msgSymbols);
t = 0:1/Fs:500/Rs-1/Fs;
idx = round(t*Fs+1);
hFig = figure;
plot(t, real(msgTx(idx)));
hold on;
xlabel('Time (sec)');
ylabel('Amplitude');
grid on;
managescattereyefig(hFig);
eyeObj = commscope.eyediagram(...
'SamplesPerSymbol', 4, ...
'SymbolsPerTrace', 2)
update(eyeObj, 0.5*msgTx);
clear
N = 10^3; % number of symbols
am = 2*(rand(1,N)>0.5)-1 + j*(2*(rand(1,N)>0.5)-1); % generating random
binary sequence
fs = 10; % sampling frequency in Hz
gt_alpha5 = sincOp.*cosOp;
alpha = 1;
cosNum = cos(alpha*pi*[-fs:1/fs:fs]);
cosDen = (1-(2*alpha*[-fs:1/fs:fs]).^2);
cosDenZero = find(abs(cosDen)<10^-10);
cosOp = cosNum./cosDen;
cosOp(cosDenZero) = pi/4;
gt_alpha1 = sincOp.*cosOp;
% filtered sequence
st_alpha5 = conv(amU,gt_alpha5);
st_alpha1 = conv(amU,gt_alpha1);
st_alpha5_reshape = reshape(st_alpha5,fs*2,N*fs/20).';
st_alpha1_reshape = reshape(st_alpha1,fs*2,N*fs/20).';
close all
figure;
plot([0:1/fs:1.99],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([0:1/fs:1.99],real(st_alpha1_reshape).','b');
title('eye diagram with alpha=1')
xlabel('time')
ylabel('amplitude')
axis([0 2 -1.5 1.5 ])
grid on