Eye Diagram from text file values

21 Ansichten (letzte 30 Tage)
Russ S
Russ S am 11 Jul. 2019
Beantwortet: Akira Agata am 16 Jul. 2019
Hello,
I am able to generate a random binary sequence (L = 1023) using Matlab code (a text file example is attached).
I would like to take the generated sequence and plot it such that I see the overlayed data as an eye diagram.
Thank you
  2 Kommentare
Akira Agata
Akira Agata am 12 Jul. 2019
The eyediagram function would be some help.
Anyway, looking at your data, the 1st column seems to be clean PRBS sequence. So the eye diagram would be pure square shape (assuming NRZ modulation format). Even so, do you want to generate eye diagram of this?
Russ S
Russ S am 12 Jul. 2019
Thank you for the response!
Yes, I am attempting to model the effects on a waveform passing through certain components of an optical communication link. The graphing is an attempt to show the "before" waveform.
I am not sure how possible the task mentioned above is, but figured the afformentioned waveform is a start.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Akira Agata
Akira Agata am 16 Jul. 2019
The following is one simple example.
I hope this would be some help for your research!
% Load PRBS pattern
D = dlmread('PRBS_2^10_01.txt');
bitPattern = D(:,1);
% Generate NRZ (ex. 100 sampling points per bit)
samplePerBit = 100;
sig = repelem(bitPattern,samplePerBit);
% Plot eye diagram of the original signal
timeSlot = 100;
offset = 50;
eyediagram(sig,samplePerBit,timeSlot,offset)
ylim([-0.2 1.2])
% Generate distorted signal (add noise and apply smoothing)
sig2 = sig + 0.2*randn(size(sig));
sig2 = movmean(sig2,50);
% Plot eye diagram of the distorted signal
eyediagram(sig2,samplePerBit,timeSlot,offset)
ylim([-0.2 1.2])
Eye diagram of the original PRBS
eye1.png
Eye diagram of the distorted signal
eye2.png

Kategorien

Mehr zu Measurements and Feature Extraction finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by