1

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

FrimHart64
  • 377
  • 1
  • 7

1 Answers1

3

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

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
  • i tried it as well. plot(I); hold on; plot(Q) . It does nt give me an eye diagram – FrimHart64 Apr 25 '22 at 12:05
  • 2
    @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. – MBaz Apr 25 '22 at 12:31
  • 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? – FrimHart64 May 05 '22 at 11:57
  • @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 – Dan Boschen May 05 '22 at 13:59
  • 0.25, is it horizontal opening /2 ? – FrimHart64 May 16 '22 at 08:42
  • The opening appears to be at $t=0.25$. In Q there is some initial transient but if you start the eye diagram later in your waveform this should be avoided. – Dan Boschen May 16 '22 at 09:00
  • According to the literature about eyediagram, the I and Q signals are shifted in time – but not in the figure i added as EDIT 1. Where does this discrepancy come from? ( my ex this paper) – FrimHart64 May 25 '22 at 10:29
  • @FrimHart64 ah yes I see what you are referring to; yes for GMSK the I and Q would be offset unlike yours - it looks like you are missing a delay in the implementation? – Dan Boschen May 26 '22 at 02:35
  • I can start my baseband signal from some point ( add a delay). How can I define this dely ( transient )? should I just test with different delay? – FrimHart64 May 30 '22 at 06:06
  • @FrimHart64 I meant your I vs Q delay, yours appears aligned while the GMSK I vs Q would have a 90 degree offset as in the referenced paper you showed. I don't know if that is an artifact of how you created your eye diagram or if it is a problem in your implementation. – Dan Boschen May 30 '22 at 06:09
  • I use the matlab function to plot eyediagram. EDIT 2 I have added delay (~>transient ), but it does not still look good for me... :( – FrimHart64 May 30 '22 at 06:56
  • @FrimHart64 You delayed your whole signal. I said the issue is I relative to Q. Your I and Q signals are in phase while in the referenced paper when I goes through the origin Q is at its maximum values and vice versa. This sounds like a problem with your implementation. – Dan Boschen May 30 '22 at 07:11
  • How does the correct constelation of gmsk look like? i am confused, the function I used and Matlab function give me the same plots and they are still wrong...how can it be? – FrimHart64 Jun 07 '22 at 05:43
  • @FrimHart64 See my updated plots at the bottom of my answer specific to GMSK (BT=1 in my example) showing how this can happen if the constellation is referenced by a 45 degree rotation; try rotating your IQ waveform 45 degrees before taking the eye diagram (this is just a change of reference and not an issue with your waveform specifically). – Dan Boschen Jun 07 '22 at 13:02
  • 1
    do you mean smth like here described? – FrimHart64 Jun 08 '22 at 11:30