# How is a constellation diagram constructed in practice?

I am simulating some optical signals in Matlab as they pass through a waveguide, get amplified, mixed with noises, etc. For the record, I am a theoretical physicist, not an engineer nor an experimentalist, so I have no clue how these measurements are done in real life.

My idea is to compare two types of information encoding: encoding into the amplitude (e.g. a sequence of Gaussian pulses of a certain duration, for instance a pulse equals a 1, no pulse equals a zero) or into the phase of the wave (modulating the phase using something like QPSK, so that if the phase is 45 degrees, then that's a 11 bit pair, and so on).

My main problem is when it comes to reading out the bit sequence in the output. I know for instance that what would be done by a detector is something like what is shown below: (https://spie.org/etop/ETOP2005_021.pdf)

So we sample the voltage at the center of the bit period for each bit, and then we turn that into a 1 or a 0 depending on whether it falls above or below a threshold value. That seems fine to me.

So here come the questions:

(1) Now for the phase modulation case, do we do the same in practice? Do we extract the phase at a single point at the center of the bit period? (in the case of QPSK case presumably the bit period would be 2-bits long, since 1 phase encodes 2 bits at a time).

(2) Is there ever a case in which instead of sampling a single point in the bit period, we take multiple points and do a sample average before determining whether the value should correspond to a 1 or a 0? If so, can you point me to some resources that might talk about how this is done?

I mainly want to do this to estimate things like the Bit Error Rate of my system, as well as creating constellation diagrams (I don't like black boxes, so I want to understand the procedure myself)

• Do you mean an eye diagram? Jul 3, 2021 at 2:52

Constructing a constellation diagram is done in the transmitter (generation of the signal) while the OP's questions have to do with sampling a constellation already constructed (receiver). Perhaps the question is mistitled?

(1) Now for the phase modulation case, do we do the same in practice? Do we extract the phase at a single point at the center of the bit period? (in the case of QPSK case presumably the bit period would be 2-bits long, since 1 phase encodes 2 bits at a time).

Each of the possible constellation states would be referred to as a "symbol"; for QPSK we have 4 possible symbols that could be transmitted and this is often viewed on a complex plane consistent with most demodulation approaches that would evaluate amplitude and phase and determine the minimum Euclidean distance from received sample to actual symbol. In practice the received signal is sampled multiple samples per symbol as we will use the information in the samples to determine offsets in the demodulation process- notably amplitude, frequency/phase offset and time offset. Ultimately, once the amplitude is normalized, and carrier and timing offset is estimated and corrected, and once the waveform is optimally filtered, we would use one sample per symbol to make our best estimate as to which symbol was actually transmitted. There is also significant efforts in ensuring that no inter-symbol interference is created, and that any such interference that is introduced by the channel is removed (equalization).

(2) Is there ever a case in which instead of sampling a single point in the bit period, we take multiple points and do a sample average before determining whether the value should correspond to a 1 or a 0? If so, can you point me to some resources that might talk about how this is done?

Yes it is always the case that an asynchronous receiver would need to take multiple samples as it otherwise won't have the information needed to determine from the samples taken where the optimum sample would be in which to ultimately compare the received sample to the possible set of symbols. Often the optimum sample is an interpolated value between the actual samples taken. This entire process, done correctly, is not trivial. If this is for a work application, this would certainly be something in the category where it would make sense to hire a consultant with experience in this space to detail further solutions.

A full answer would require half a textbook, but here are some pointers about aspects not covered in the other answers.

• The diagram shown in your question is known as a "train" (or sequence) of orthogonal pulses, and can be written as $$\sum_k a_k g(t-kT),$$ where $$a_k \in \{0, A\}$$ is the pulse amplitude (which carries the actual information), $$T$$ is the pulse duration, and $$g$$ is a rectangular pulse.

• The constellation is simply the set of allowed values for the symbols $$a_k$$.

• Setting the decision threshold at $$A/2$$ is optimum only if the values $$\{0, A\}$$ are equally likely.

• The receiver's first task is to find the pulse boundaries, so that it can sample in the middle of each pulse. This is known as pulse synchronization.

• A receiver that samples the received signal in the middle of each pulse is known as a "sampling receiver", and it does not have optimal performance. The reason is that taking just one sample throws away the information provided by the rest of the pulse.

• The "matched filter" receiver provides optimum error performance. This receiver filters the received signal with a filter "matched" to the pulse shape $$g$$, and then samples in the middle. This one sample contains the aggregated information from the entire pulse.

The signal we've been considering up to now is baseband: it has no carrier, and therefore it has no phase (or rather, its phase is constant). In order to use phase to transmit information, a carrier must be introduced, and now the signal is known as passband. We start by demultiplexing the symbols $$a_k$$ into two streams, called $$a^I_k$$ and $$a^Q_k$$. Then, the signal $$\sum_k \left( a^I_k g(t-kT) \cos(2\pi f_c t) - a^Q_k g(t-kT) \sin(2\pi f_c t) \right)$$ has phase $$\phi_k = \text{atan}(a^Q_k/a^I_k)$$.

• Receiving a passband signal is, in principle, similar to receiving two baseband signals, but the implementation is more complicated. For example, in radio systems one multiplies the received signal by the sine and cosine carriers and then low-pass filters the result in order to bring the signal back to baseband.

I hope this helps you get started. I would recommend getting the book "Software receiver design" by Johnson and Sethares; it is a practical book focused on implementation of actual receivers. It covers this material, and much more, in a very approachable fashion.

Although a sample is often described as representing the signal value at a single point in time, it's important to remember that this is not entirely realistic, and why it's a perfectly reasonable simplification.

If you actually want to sample any weighted distribution of points around each sample time, instead of a single value at the exactly sample time, you can could do this very easily (well, mathematically easy) by just filtering the signal before sampling. You would convolve the signal with the time-reversed weighted distribution, and then sample exactly at the sample time.

So any kind of averaging of nearby points is exactly equivalent to filtering the signal first... and anything you sample is already heavily filtered. It's simpler in concept and implementation to fold any considerations like this into the pre-filtering process. Any imperfections in your sampler, which really does form an average of nearby points, are also thought of as a filter on the input signal, which you can correct digitally after sampling.

Because the input signal is heavily filtered before sampling, the pictures in your question are very unrealistic. Those curves will be quite smooth on the time scale of the sample period, and if you saw what they really looked like, you wouldn't be worried about averaging multiple sample points.

If you want to know what the signal you're sampling really looks like, the google incantation is "eye diagram". Ignore pictures of eyes :) https://assets.testequity.com/te1/Documents/pdf/applications/anatomy-eye-diagram-an.pdf