What is a Eye Diagram - create it in Python

In summary: An eye diagram shows the effect of inter symbol interference.In summary, an eye diagram is a measure of the quality of your signal transmission.
  • #1
PrakashPrasad
22
0
I am self learning Python and developing Communication signals concept by coding programs.

But I am not sure how to develop Eye Diagram code in Python - cause I do not know the formulas / concept to do so - say I have a signal bits like -

1 1 1 0 0 0 1 1

So what formulas of concept I should implement that I can create Eye Diagram?
 
Technology news on Phys.org
  • #2
The eye diagram for displaying a degraded bit stream?
 
  • #4
PrakashPrasad said:
Kindly find more details of eye diagram at http://www.edn.com/design/test-and-...gram-Basics-Reading-and-applying-eye-diagrams portal

I am quiet unsure of the step by step concept of how we can create an eye diagram

Do you understand what an eye pattern is actually showing you? ~It's all to do with the effect of inter symbol interference. The 'eye' in the middle of the pattern shows you how accurately you need to be with the placing of your sampling / decision making circuit- in timing and volts. It also gives you a qualitative idea of the signal to noise ratio that you can get away with. (Sorry if this is obvious to you.)
Put the boxcar digital bit stream through a low pass filter and superimpose many short data streams on top of each other (just as an oscilloscope would do). That should produce an eye diagram for you. You would need a long pseudorandom bit stream if you want a realistic eye pattern; a short stream could result in missing out a bit combination that can produce a particularly bad bit of inter symbol interference.
 
  • Like
Likes berkeman
  • #5
I am sorry, I come from a software background only. I am using Python to develop a free open source code communication software. I do not have a strong background in signal processing but my aim is to develop a software in same domain.

Hence my approach is more logical than theoretical. Logical understanding is a process where complicated or unknown things are explained to a layman in a simple manner. Its like making a baby make to learn walking from crawling. Later baby can run all by himself gradually.

sophiecentaur said:
Put the boxcar digital bit stream through a low pass filter

My input data stream is of 0's and 1's bit stream (0 - 0 volts and 1 - 5 volts). Since all is generated with same frequency (Hz) value as imputed by user the frequency would remain same -

sophiecentaur said:
superimpose many short data streams on top of each other

I understand that my input stream bit needs to an big array of 0's and 1's - say an array with 1024 index values like -

100110010101011101010110 ... until 1024 index

Now how short bit stream should I take - as per http://www.edn.com/design/test-and-...gram-Basics-Reading-and-applying-eye-diagrams portal bit sequences 010, 101,011, 001, 100, and 110 needs to be superimposed as a properly constructed eye should contain every possible bit sequence from simple alternate 1’s and 0’s to isolated 1’s after long runs of 0’s, and all other patterns that may show up weaknesses in the design.

Hence as per my understanding is that I break my 1024 bit stream to a group of 3 bits - each capturing at least a change from 0 to 1 or 1 to 0. So should I take group where there are alternates 0's and 1's at least:

1 2 3 4 5 6 7 8 9 10 11 12 ...
0 0 0 0 1 0 1 1 1 0 1 0 ...

Is it that irrespective of what the patter is I just create the digital signal graph of these bit patterns:

Digital Signal group 1 and 3 need not be plotted in chart as there is no change in signal values.

Digital Signal chart for group 2 needs to plotted as there is change in bit pattern: 010

Digital Signal chart for group 4 needs to plotted as there is change in bit pattern: 010

Please confirm my understanding.
 
  • #6
You're right about the point of an eye diagram but the problem is if you do an I diagram using arrays of 1 and 0 you will have a perfect eye diagram and that won't tell you much, will it?

Like Sophiecentuar said, the eye diagram is a measure of the quality of your signal transmission. In that sense it is an ANALOG measurement. You need to know the impulse response of the communication channel. Then, convolve your bit sequence with the impulse response. You will get a sequence of analog values. You will need your impulse response to be more finely grained in time (higher resolution) that your data so you get multiple analog values per unit data interval. The impulse response stretches out your pulses. Eventually they will interact. This is called intersymbol interference.

Then, make a plot where you overlap every bit period. This is an eye diagram. The method I describe only takes care of intersymbol interference. Jitter (that is the uncertainty of your time base) usually ends up limiting overall performance because intersymbol interference can be mitigated more easily using various signal processing techniques.

So here is your practical instruction: get your data vector. Convolve it with the channel input response. Overlap each bit period. Viola! You have an eye diagram.
 
  • Like
Likes PrakashPrasad
  • #7
analogdesign said:
Overlap each bit period

Thanks a lot for the complete detailed explanation. Just one more help - I may be misleading myself with the per-assumption to take 3 bits at a time while others to skip (at least I should see a change from 0's to 1 or vice verse) - am I correct or should I take based upon any other method?
 
  • #8
PrakashPrasad said:
Thanks a lot for the complete detailed explanation. Just one more help - I may be misleading myself with the per-assumption to take 3 bits at a time while others to skip (at least I should see a change from 0's to 1 or vice verse) - am I correct or should I take based upon any other method?
I am still not sure how much you have made yourself familiar with the ideas behind the eye diagram. How many different sources have you read? There are many available at all levels, via Google. Is this eye diagram project of yours 'out of the blue' or is it associated with some greater project? You must think 'analogue' here, because that is the whole point of the eye diagram. It was used as a diagnostic tool when the data rates being used were as fast as they could get and it was necessary to use an analogue display, rather than (much higher frequency) digital analysis - which was much more problematical at the time.
A display that's three bits wide would be ok but, as you don't have any problem with data storage or processor power (no one does, these days), why not use a display length of five?
If you want a convincing 'analogue style' eye diagram then you will need to have a very much oversampled signal , giving at least ten samples per bit period. (Many more would be better but easy to achieve with your software). A 2047 bit sequence would be fine (but why not more?) and there are many simple algorithms for generating PRBSs. If you want to consider the effects of jitter, then it would be easiest to introduce that on the initial boxcar waveform (i.e. before the filtering). You can then add the filtering and some band limited noise, if you want.
BTW do you intend to have a 'real time' display of this in action?
 
  • Like
Likes PrakashPrasad
  • #9
Bump
Is the OP still interested in this topic?
 

Related to What is a Eye Diagram - create it in Python

1. What is an Eye Diagram?

An eye diagram is a graphical representation of a signal's amplitude and timing. It is commonly used in communication systems to analyze signal quality and identify potential issues.

2. How is an Eye Diagram created?

An eye diagram is created by plotting the amplitude of a signal over time, with time on the horizontal axis and amplitude on the vertical axis. This is typically done using a digital oscilloscope or with software like Python.

3. Why is an Eye Diagram useful?

An eye diagram allows for visual inspection of a signal's quality, making it easier to identify issues such as noise, distortion, or timing errors. It can also be used to compare signals before and after passing through a communication channel or device.

4. What is the difference between an Eye Diagram and a Waveform?

While both an eye diagram and a waveform display a signal's amplitude over time, a waveform shows the complete signal, while an eye diagram only shows a portion of the signal. An eye diagram also includes additional features such as the eye opening, which represents the signal's timing margin.

5. Can an Eye Diagram be created in Python?

Yes, an eye diagram can be created in Python using various libraries and packages, such as matplotlib and scipy. These tools allow for easy plotting and analysis of signals, making it a useful tool for scientists and engineers in the field of communication systems.

Similar threads

  • Programming and Computer Science
Replies
10
Views
2K
Replies
6
Views
795
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
17
Views
2K
  • Programming and Computer Science
Replies
7
Views
726
  • Programming and Computer Science
Replies
7
Views
617
  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
Replies
7
Views
2K
  • Programming and Computer Science
Replies
5
Views
921
  • Programming and Computer Science
Replies
1
Views
1K
Back
Top