CONSTELLATION AND EYE PATTERN DIAGRAMS

The constellation and eye diagrams are two graphical methods for displaying the structure of digitized signals. Among other things, they can be used to understand, identify, and debug communications systems which employ FSK or PSK digital modulation formats.

This page develops a simple low-level tool for generating these diagrams. As a starting point, we'll assume that the original signal has been sampled and digitized and placed into a file in complex format compatible with GNU Radio. Although the GNU Radio software is required, no special hardware such as a USRP is needed to use these tools. Also, GNU Plot is required.

First we must pre-process the sample file if needed to remove any tuning (calibration) offset and to get the proper sampling rate. The rate after resampling is chosen to be a convenient multiple of the symbol rate (48,000 is used here).
    $ resample.py -i samples/smiq-1011-cqpsk-d256.dat -s 250000 -o prwn-48k.dat -c -828
Two new files should result: prwn-48k.dat, and rx_fm_demod.dat, for creating the constellation and eye diagrams, respectively.

CONSTELLATION DIAGRAMS



We start with one of the sample files, smiq-1011-cqpsk.dat. The file contains a signal which is centered about 828 Hz and is sampled at a 250,000/sec. rate. We first remove the tuning offset (828 Hz) and "resample" to a new sampling rate, which must be an integral multiple of the symbol rate. The rates used here are 4,800 Symbols per Second and 48,000 Samples per Second, which yields 10 Samples per Symbol. (The recived symbol rate is unlikely to be exactly at 10.0 SPS because the respective clocks generally aren't correlated. The result is a slippage which would be corrected by periodic adjustments to the slicing point).

The PI/4 CQPSK (P25) modulation scheme is shown in the constellation diagrams, whereas FSK signals were used to create the eye diagrams.

SLICING-POINT SELECTION
For every ten samples we see, we throw away nine and keep one, which is then recorded as the official value for the symbol. (We could possibly interpolate an even more accurate value, since the exact slicing point in time is likely to lie somewhere between two of our samples). The proper slicing point occurs at the same sample in each group of ten. We want to slice when the signal has arrived at a constellation point (slice 9 as illustrated below) -- not when it's in transition, enroute part way between constellation points (such as example slices 2-6).

The first set of diagrams shows the effects of varying the slicing point, that is, of varying which one out of the ten samples is selected as the symbol value.

NOTE: these plots are enhanced by coloring alternate samples in red and green -- reflecting the π/4 scheme in use.










FREQUENCY TUNING (CALIBRATION) ADJUSTMENT
The constellation will appear to rotate unless the signal has been tuned to "zero-beat", eliminating any tuning offset. This frequency error is separate from and unrelated to any slicing point adjustment error (above).

The diagrams below show the constellation as the tuning frequency is swept from 823 through 833 Hz at 1 Hz intervals. The best value is clearly 828.

Each of these plots contains 200 symbols * 10 SPS = 2,000 samples, or 1/24th sec. worth. According to theory each one Hz of mistuning would cause a spreading or smearing of these 200 symbols over a range of angular width π/12 (1/24th of a circle). A three Hz error would be π/4, which agrees nicely with diagrams 825 and 831.












EYE PATTERN DIAGRAMS



Probably dating before 1950, when the height and width of the eye opening were used to measure telegraph circuit error margins, eye diagrams are plots of several symbol transitions overlayed on one picture. The value plotted is the demodulated baseband (received serial data) line. The "sharp edges" of the bits are "rounded" when they exit the far end of the "pipe" [the symbols are modified by the filtering action of the channel, usually to optimize bandwidth].

The sample eye diagram (above), with 100 superimposed traces (lines), is typical. It contains all possible combinations of zeros, ones, zero-to-one transitions, and one-to-zero transitions. Horizontally, halfway between zero-crossing points is the optimum symbol slicing point, since that's where the amount of eye opening (error-rejection margin) is greatest.

The next example shows four-level FSK (FSK4); that is, the symbol can take on one of four possible values, instead of two as above.

Whereas constellation diagrams require an input file in complex format, the eye plots use a demodulated (float or .WAV, etc.) input file. At the beginning (see above) we resampled the input file to an integral multiple (10) of the symbol rate (4800), and FM-demodulated it (rx_fm_demod.dat).

We now generate the eye diagram:
    $ diagram.pl I 100 rx_fm_demod 10
The first parameter (I) specifies an eye diagram; the second (100) sets the persistence, or number of superimposed traces; the third, the input file name without suffix; and the fourth (10), the samples-per-symbol (SPS).

The result (rx_fm_demod.png) looks like this: