1
$\begingroup$

I want to plot an eye dagram of output of modulator.

In Maltab I tried plot( I, Q), but it doesnt give me the diagram.

In Matlab there is a function eyediagram(x,n,period,offset,plotstring,h) in Communicatio Toolbox. Unfortunately I dont have the licence and can't use it.

Does anyone know another possobility how to generate the eye diagram?

EDIT 1 Eye diagram with my data

enter image description here

EDIT 2

I have added a dely and my new result is

a = 10;
eyediagram(bb(a;end), ovs)

enter image description here

EDIT 3

sps = 4;
data = randi([0 1],1000,1);
gmskMod = comm.GMSKModulator('BitInput',true,'PulseLength',5, 'BandwidthTimeProduct' , 0.25, ...
    'SamplesPerSymbol',sps);
modSigGMSK = gmskMod(data);
eyediagram(modSigGMSK,sps,1,sps/2)

enter image description here

$\endgroup$

1 Answer 1

3
$\begingroup$

Plotting I vs Q (which is real vs imaginary) is a polar plot, not the eye diagram. The eye diagram is plotted with I alone or Q alone over one or more symbol periods (typically just one or two) and repeatably synchronized with the symbol rate so that the result is multiple plots superimposed showing how the waveform behaves from symbol to symbol.

This can be done easily in MATLAB using the reshape function on either I or Q which will create a matrix that when plotted will be the eye diagram. However the waveform should be resampled to be an integer number of samples and many samples per symbol so that the trajectories between the actual samples are visible.

This link contains example code I have written in Python that can easily be ported to Python, as well as other open source code available for creating eye diagrams.

Here is an example of that done for a 16QAM waveform where the blue dots are the original waveform samples at 4 samples per symbol (with a time offset error that the eye diagram shows us), and the trajectories shown are after resampling to 64 samples per symbol and plotting the eye diagram to show two symbol durations:

eye diagram

Note for comparison that if we plotted the first 1200 samples of just I alone without the retrace over the two symbol periods as done above, the plot would look like this (the dashed lines show the two symbol period boundaries used for plotting the eye diagram above:

real part of waveform

Please see this other post with further details on what the eye diagram is an how to use it.

This post shows how the eye diagram will appear if there is a phase offset rather than time (delay) offset as in the example above. (Note phase and delay are not the same thing! Phase is a rotation, not a delay but a delay will cause a rotation at any given frequency).

Below shows the expected eye diagram over two symbols for GMSK with BT=1.

GMSK Eye Diagram

Note that if we rotate the constellation 45° then the eye diagram would look like the following (this is just changing the reference for the constellation but doesn't change anything with the actual waveform).

GMSK with constellation rotated

$\endgroup$
15
  • $\begingroup$ i tried it as well. plot(I); hold on; plot(Q) . It does nt give me an eye diagram $\endgroup$
    – FrimHart64
    Apr 25, 2022 at 12:05
  • 2
    $\begingroup$ @FrHart64 An eye diagram is a superposition of the plots of short segments of the signal. You need to take I, break it up into a large number of contiguous segments, and plot each segment. $\endgroup$
    – MBaz
    Apr 25, 2022 at 12:31
  • $\begingroup$ I plot the eye diagramof my data and i got a result ( see EDIT 1 )which looks different ftom your answer you linked. I can not see ISI or I read wrong my results? $\endgroup$
    – FrimHart64
    May 5, 2022 at 11:57
  • $\begingroup$ @FrHart64 your eye diagram looks good with the opening at 0.25. In Q i see a residual transient which you can avoid by starting the eye later in the waveform $\endgroup$ May 5, 2022 at 13:59
  • 1
    $\begingroup$ do you mean smth like here described? $\endgroup$
    – FrimHart64
    Jun 8, 2022 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.