A Digital Communication System

Quadrature Amplitude Modulation (QAM)

A general QAM detector with respective waveforms at each block

We discussed earlier that Pulse Amplitude Modulation (PAM) transmits information through amplitude scaling of the pulse p(nT_S) according to the symbol value. To understand QAM, we have to differentiate between baseband and passband signals.

A baseband signal has a spectral magnitude that is nonzero only for frequencies around origin (F=0) and negligible elsewhere. An example spectral plot for a PAM waveform is shown below for 500 2-PAM symbols shaped by a Square-Root Raised Cosine pulse with excess bandwidth \alpha = 0.5 and samples/symbol L = 8. The PAM signal has its spectral contents around zero and hence it is a baseband signal.

Spectrum of a binary PAM modulated signal shaped y a Square-Root Raised Cosine pulse

For wireless transmission, this information must be transmitted through space as an electromagnetic wave. Also observe that once this spectrum is occupied, no other entity in the surrounding region can share the wireless channel for the purpose of communications. For these reasons (and a few others as well), a wireless system is allocated a certain bandwidth around a higher carrier frequency and the generated baseband signal is shifted to that specific portion of the spectrum. Such signals are called passband signals. That is why wireless signals in everyday use such FM radio, WiFi, cellular like 4G, 5G, and Bluetooth are all passband signals which execute their transmissions within their respective frequency bands sharing the same physical medium.

The easiest method to shift the spectrum to a designated carrier frequency is by multiplying, or mixing, it with a sinusoidal waveform. This is because time domain multiplication is frequency domain convolution between spectra of the sinusoid and the desired signal. Now in the article on DFT examples, we saw that the spectrum of a pure sinusoid at any frequency is composed of two impulses at that frequency (one positive and one negative and half amplitude). Also, convolution of a signal with a unit impulse results in the same signal shifted at the location of that impulse. Hence, a PAM waveform can be multiplied with a carrier sinusoid at frequency F_C to “park” the actual spectrum in its allocated slot. This is drawn in Figure below.

Upconversion implies multiplying the signal in time domain with a higer frequency sinusoid

After this spectral upconversion, both positive and negative portions of the baseband spectrum appear at +F_C and -F_C. The bandwidth — positive portion of the spectrum — hence becomes double. However, a relief comes from the fact that both \cos(\cdot) and \sin (\cdot) can be used to carry independent waveforms due to their orthogonality (having phases 90 ^\circ apart) to each other over a complete period, i.e.,

    \begin{equation*}                     \sum \limits _{n=0} ^{N-1} \cos 2\pi \frac{k}{N}n \cdot \sin 2\pi \frac{k}{N}n = 0             \end{equation*}

That is the birth of Quadrature Amplitude Modulation (QAM), in which two independent PAM waveforms are communicated through mixing one with a cosine and the other with a sine. Just like constellation, the term quadrature also comes from astronomy to describe position of two objects 90 ^\circ apart.

For mathematical expression for QAM, first consider two independent PAM waveforms with symbol streams a_I and a_Q, respectively.

(1)   \begin{equation*}           \begin{aligned}             v_I(nT_S)\: &= \sum _{m} a_I[m] p(nT_S-mT_M) \\             v_Q(nT_S) &= \sum _{m} a_Q[m] p(nT_S-mT_M)           \end{aligned}         \end{equation*}

Next, we multiply the resulting complex signal with a complex sinusoid at carrier frequency and collect its real part, i.e., multiply v_I arm with \sqrt{2}\cos 2\pi (k_C/N) n and v_Q arm with -\sqrt{2}\sin 2\pi (k_C/N) n. The reason of including these two factors, \sqrt{2} and the negative sign, will be discussed later during QAM detection. Consequently, a general QAM waveform can be written as

(2)   \begin{align*}         s(nT_S) &= v_I(nT_S) \sqrt{2} \cos 2\pi \frac{k_C}{N} n - v_Q(nT_S) \sqrt{2}\sin 2\pi \frac{k_C}{N} n  \\                 &= v_I(nT_S) \sqrt{2}\cos 2\pi \frac{F_C}{F_S}n - v_Q(nT_S) \sqrt{2}\sin 2\pi \frac{F_C}{F_S}n \nonumber                 \end{align*}

(3)   \begin{align*}                 &= \sum _{m} a_I[m] p(nT_S-mT_M) \sqrt{2}\cos 2\pi F_C nT_S - \nonumber \\                 &~ \hspace{1in} \sum _{m} a_Q[m] p(nT_S-mT_M) \sqrt{2}\sin 2\pi F_C nT_S \nonumber     \end{align*}

where we have used the fundamental relation between continuous and discrete frequencies k/N = F/F_S, and k_C corresponds to the carrier frequency F_C. Observe that s(nT_S) is a real signal with no Q component. After digital to analog conversion (DAC), the continuous-time signal s(t) can be expressed as

(4)   \begin{align*}         s(t) &= v_I(t) \sqrt{2} \cos 2\pi F_C t - v_Q(t) \sqrt{2}\sin 2\pi F_C t  \\                 &= \sum _{m} a_I[m] p(t-mT_M)\sqrt{2} \cos 2\pi F_C t ~- \nonumber \\                 &~ \hspace{1in} \sum _{m} a_Q[m] p(t-mT_M) \sqrt{2} \sin 2\pi F_C t \nonumber     \end{align*}

In Eq (4), symbols a_I[m] determine the I signal while a_Q[m] control the Q signal. Such representation of the QAM waveform as a sum of amplitude scaled and pulse shaped sinusoids is known as the rectangular form. Using trigonometric identity \cos (A+B) = \cos A \cos B - \sin A \sin B, Eq (4) can also be written as

    \begin{equation*}         s(t) = \sqrt{a_I^2[m] + a_Q^2[m]} \cdot p(t-mT_M) \cdot \sqrt{2} \cos \left(2\pi F_C t+ \tan^{-1} \frac{a_Q[m]}{a_I[m]}\right)     \end{equation*}

Called the polar form, here we have a single sinusoid whose amplitude and phase are determined by some combination of symbols a_I[m] and a_Q[m].

Constellation Diagram

Some examples of QAM constellations are discussed below.

  • For an even power of 2, square QAM is a constellation whose points are spaced on a grid in the form of a square. It is formed by a product of two \sqrt{M}-PAM constellations, one on I axis and the other on Q axis. For example, a 16-QAM constellation is formed by two \sqrt{16}=4 PAM constellations as drawn in Figure below, while some other square QAM constellations are also shown in the next Figure.

    A 16-QAM constellation is formed by two 4-PAM constellations

    QAM constellation diagrams for M  = 4, 16 and 64

    Notice how constellation points in higher-order QAM are closer to each other compared to lower-order QAM. A relatively lower noise power is then enough to cause a decision error by moving the received symbol over the decision boundary. This is the cost of increasing data rate by packing more bits in the same symbol. We will have more to say about it when we discuss Bit Error Rates (BER) for each constellation in another article.

    For M=4, the average symbol energy in square QAM is derived using Pythagoras theorem as

        \begin{equation*}             E_{M-\text{QAM}} = \frac{1}{4}\left\{ 4 \left( A^2 + A^2\right) \right\} = 2A^2         \end{equation*}

    For general M, a similar derivation as in the case of PAM yields

    (5)   \begin{equation*}             E_{M-\text{QAM}} = \frac{2}{3} \left(M-1\right)A^2         \end{equation*}

  • A special case of M-QAM is M-PSK, which stands for Phase Shift Keying. As the name PSK implies, the amplitude remains constant in this configuration while the information is conveyed by different phases. Examples of 2-PSK, 4-PSK and 8-PSK are drawn in Figure below.

    PSK constellation diagrams for M = 2, 4 and 8

    Notice that

    • 2-PSK constellation (also known as BPSK) looks similar to 2-PAM. However, the difference is that there is no carrier upconversion in PAM systems.
    • 4-PSK constellation (also known as QPSK) is exactly the same as square 4-QAM.
    • For M>4, square QAM packs the constellation points more efficiently than PSK and hence the modulation of choice in many wireless standards. Points come relatively closer in PSK and the closer the points, the larger the probability of receiving a symbol in error due to a jump across the decision boundary. On the other hand, QAM heavily depends on overall system linearity due to information conveyed in the signal amplitude. A constant envelope of the modulated signal is much more suitable for transmission over nonlinear channels where PSK is the preferred choice. In such situations, the performance of PSK is quite insensitive to nonlinear distortion and heavy filtering.
  • Since any constellation that uses both amplitude and phase modulation fall under the general category of QAM, there can be many other rearrangements of QAM constellation points. However, we focus on square QAM and PSK in this text which are widely used in practice. Non-regular constellations can be formed which yield a small performance advantage, though it is usually not much significant. Moreover, the more points are in the constellation, the lesser is the difference.

QAM Modulator

To build a conceptual QAM modulator, we follow similar steps as in a PAM modulator. The block diagram for a 4-QAM modulator is drawn in Figure below.

A general QAM modulator with respective waveforms at each block

  • Every T_b seconds, a new bit arrives at the input forming a serial bit stream.
  • A serial-to-parallel (S/P) converter collects \log_2 M such bits every T_M = \log_2 M \times T_b seconds that are used as an address to access two Look-Up Tables (LUT). One LUT stores \sqrt{M} symbol values a_I while the other \sqrt{M} symbol values a_Q specified by the constellation.
  • To produce a QAM waveform, the symbol sequences a_I[m] and a_Q[m] are converted to discrete-time impulse trains in separate arms (one I and the other Q) through upsampling by L, where L is samples/symbol defined in as ratio of symbol time to sample time T_M/T_S, or equivalently sample rate to symbol rate F_S/R_M.
  • As explained in sample rate conversion, upsampling inserts L-1 zeros between each symbol after which the interpolated intermediate samples can be raised from dead with the help of a pulse shaping filter in each arm that — in addition to shaping the spectrum — suppresses all the spectral replicas arising from upsampling except the primary one. These are the two I and Q PAM waveforms forming the signal v_I.
  • Next, I PAM waveform v_I is upconverted by mixing with the carrier \cos 2\pi F_C nT_S while the Q PAM waveform v_Q with -\sin 2\pi F_C nT_S, which are then summed to form the QAM signal s(nT_S). The carriers are generated through an oscillator at the Tx.
  • This discrete-time signal s(nT_S) is converted to a continuous-time signal s(t) by a DAC.

The mathematical derivation for the QAM modulator was shown in Eq (2) and Eq (4).

In the meantime, if you found this article useful, you might want to subscribe to my email list below to receive new articles.

QAM Detector

The received signal r(t) is the same as the transmitted signal s(t) but with the addition of additive white Gaussian noise (AWGN) w(t). The symbols are detected through the following steps illustrated in Figure below.

A general QAM detector with respective waveforms at each block

  • Out of the infinite spectrum, the desired signal r(t) is selected with the help of a Bandpass Filter (BPF).
  • Through an analog to digital converter (ADC), this signal is sampled at a rate of F_S samples/s to produce a sequence of T_S-spaced samples r(nT_S).
  • Next, a complex signal x(nT_S is produced when r(nT_S) by downconverted by mixing with two carriers, \cos 2\pi F_C nT_S and \sin 2\pi F_C nT_S which are generated through an oscillator at the Rx.
  • The resulting complex waveform x(nT_S) in I and Q arms is processed through two matched filters thus generating z_I(nT_S) and z_Q(nT_S). As discussed earlier, the output of the matched filters are continuous correlations of the symbol-scaled pulse shape with an unscaled and time-reversed pulse shape.
  • These I and Q outputs are downsampled by L at optimal sampling instants

        \begin{equation*}                 n = mL = m \frac{T_M}{T_S}             \end{equation*}

    to produce T_M-spaced numbers z_I(mT_M) and z_Q(mT_M) back from the signal.

  • The minimum distance decision rule is employed in IQ-plane to find the symbol estimates \hat a_I[m] and \hat a_Q[m] to decide on the final constellation point.

Let us discuss the mathematical details of this process for a noiseless received signal as in Eq (4),

(6)   \begin{equation*}         r(t) = s(t) = v_I(t) \sqrt{2} \cos 2\pi F_C t - v_Q(t) \sqrt{2}\sin 2\pi F_C t     \end{equation*}

where F_C is the carrier frequency and v_I(t) and v_Q(t) are defined in Eq (1). After bandlimiting the incoming signal through a bandpass filter, it is sampled by the ADC operating at F_S samples/second to produce

    \begin{align*}         r(nT_S) &= v_I(nT_S) \sqrt{2}\cos 2\pi F_C nT_S - v_Q(nT_S)\sqrt{2} \sin 2\pi F_C nT_S \\                 &= v_I(nT_S) \sqrt{2}\cos 2\pi \frac{k_C}{N}n - v_Q(nT_S) \sqrt{2}\sin 2\pi \frac{k_C}{N}n     \end{align*}

where the relation F/F_S = k/N is used. To produce a complex baseband signal from the received signal, the samples of this waveform are input to a mixer which multiplies them with discrete-time quadrature sinusoids \sqrt{2}\cos 2\pi (k_C/N)n and -\sqrt{2}\sin 2\pi (k_C/N)n yielding

    \begin{align*}         \begin{aligned}             x_I(nT_S) &= r(nT_S) \cdot \sqrt{2}\cos 2\pi \frac{k_C}{N}n \: \\                   &= 2v_I(nT_S) \cos^2 2\pi \frac{k_C}{N}n - 2v_Q(nT_S) \sin 2\pi \frac{k_C}{N}n \cos 2\pi \frac{k_C}{N}n         \end{aligned}     \end{align*}

    \begin{align*}         \begin{aligned}             x_Q(nT_S) &= r(nT_S) \cdot -\sqrt{2}\sin 2\pi \frac{k_C}{N} n \\                   &= 2v_Q(nT_S) \sin ^2 2\pi \frac{k_C}{N}n -2v_I(nT_S) \cos 2\pi \frac{k_C}{N}n \sin 2\pi \frac{k_C}{N}n         \end{aligned}     \end{align*}

Using the identities \cos^2 A = 1/2(1+\cos 2A), \sin^2 A = 1/2(1-\cos 2A) and 2 \sin A \cos A = \sin 2A,

    \begin{align*}       \begin{aligned}         x_I(nT_S) &= v_I(nT_S) + \underbrace{v_I(nT_S)\cos 2 \pi \frac{2k_C}{N}n - v_Q(nT_S) \sin 2\pi \frac{2k_C}{N}n}_{\text{Double frequency terms}} \\         x_Q(nT_S) &= v_Q(nT_S) - \underbrace{v_Q(nT_S)\cos 2\pi \frac{2k_C}{N}n - v_I(nT_S) \sin 2\pi \frac{2k_C}{N}n}_{\text{Double frequency terms}}       \end{aligned}     \end{align*}

Now we can observe why the two factors, a \sqrt{2} with both sinusoids and a negative sign with \sin 2\pi (k/N)n, were inserted.

  • A \sqrt{2} at the modulator and later another \sqrt{2} in the detector result in a gain of 2, which cancels the halving of sinusoid amplitudes in above trigonometric multiplications.
  • When a complex signal is multiplied with a complex sinusoid, a negative sign appears for phase addition of I and Q in the I section of cumulative waveform (see the multiplication rule for clarity). This I section of the cumulative waveform is the real part of the complex product which is transmitted through the channel. Another negative sign with \sin 2\pi (k/N)n at the Rx delivers a positive v_Q(nT_S) at the output.

The matched filter output is written as

    \begin{align*}         \begin{aligned}             z_I(nT_S) &= x_I(nT_S) * p(-nT_S) \\                       &= \left(v_I(nT_S) + \text{Double freq terms}\right) * p(-nT_S) \\                       &= \Big( \sum \limits _i a_I[i] p(nT_S - iT_M) + \frac{2k_C}{N}~ \text{terms}\Big) * p(-nT_S) \\                       &= \sum \limits _i a_I[i] r_p(nT_S - iT_M)         \end{aligned}     \end{align*}

    \begin{align*}         \begin{aligned}             z_Q(nT_S) &= x_Q(nT_S) * p(-nT_S) \\                       &= \left(v_Q(nT_S) + \text{Double freq terms}\right) * p(-nT_S) \\                       &= \Big( \sum \limits _i a_Q[i] p(nT_S - iT_M) + \frac{2k_C}{N}~ \text{terms}\Big) * p(-nT_S) \\                       &= \sum \limits _i a_Q[i] r_p(nT_S- iT_M)         \end{aligned}     \end{align*}

where r_p(nT_S) comes into play from the definition of auto-correlation function. The double frequency terms in the above equation are filtered out by the matched filter h(nT_S) = p(-nT_S), which also acts a lowpass filter due to its spectrum limitation in the range -0.5 R_M \le F \le +0.5R_M. To generate symbol decisions, T_M-spaced samples of the matched filter output are required at n = mL = mT_M/T_S. Downsampling the matched filter output generates

    \begin{align*}         \begin{aligned}             z_I(mT_M) &= z_I(nT_S) \bigg| _{n = mL = mT_M/T_S} \\                       &= \sum \limits _i a_I[i] r_p(mT_M - iT_M) = \sum \limits _i a_I[i] r_p\{(m-i)T_M\} \\                       &= \underbrace{a_I[m] r_p(0T_M)}_{\text{current symbol}} + \underbrace{\sum \nolimits _{i \neq m} a_I[i] r_p\{(m-i)T_M\}}_{\text{ISI}}         \end{aligned}     \end{align*}


    \begin{align*}         \begin{aligned}             z_Q(mT_M) &= z_Q(nT_S) \bigg| _{n = mL = mT_M/T_S} \\                       &= \sum \limits _i a_Q[i] r_p(mT_M - iT_M) = \sum \limits _i a_Q[i] r_p\{(m-i)T_M\} \\                       &= \underbrace{a_Q[m] r_p(0T_M)}_{\text{current symbol}} + \underbrace{\sum \nolimits _{i \neq m} a_Q[i] r_p\{(m-i)T_M\}}_{\text{ISI}}         \end{aligned}     \end{align*}

A square-root Nyquist pulse p(nT_S) has an auto-correlation r_p(nT_S) that satisfies no-ISI criterion,

    \begin{equation*}         r_p(mT_M) = \left\{ \begin{array}{l}         1, \quad m = 0 \\         0, \quad m \neq 0 \\         \end{array} \right.     \end{equation*}


    \begin{align*}       \begin{aligned}         z_I(mT_M) &= a_I[m] \\         z_Q(mT_M) &= a_Q[m] \\       \end{aligned}     \end{align*}

In conclusion, the downsampled matched filter outputs map back to the Tx symbols in the absence of noise. If the world was simple, that would have been an end to it! But the world is complicated, and there are layers of issues that happen between the Tx information generation and Rx decision making. Anything we do after this will be to combat a subset of signal distortions and towards recovering the original information.

Observe that the system shown in Figure above is a multirate system. In the QAM detector, for example, the ADC and the matched filters operate at the sample rate F_S. After the outputs of the matched filters are downsampled by L, the symbol decisions are made at the symbol rate R_M. Furthermore, there are some hidden assumptions in the QAM detector:

[Resampling] The ADC in general does not produce an integer number of samples per symbol, i.e., T_M/T_S is not an integer. As we will see later, a resampling system is required in the Rx chain that changes the sample rate from the ADC rate to a rate that is an integer multiple of the symbol rate.
[Symbol Timing Synchronization] The peak samples at the end of symbol durations in both I and Q arms are not known in advance at the Rx and in fact do not necessarily coincide with generated samples as well. This is because ADC just samples the incoming continuous waveform without any information about the symbol boundaries. This is a symbol timing synchronization problem which we will discuss later.
[Carrier Frequency Synchronization] The carrier frequency of the oscillator at the Tx and that at the Rx are not exactly the same, equal to F_C. Instead, if the oscillator frequency at the Tx is denoted as F_C, then at the Rx, we have F_C+\Delta F_C, where \Delta F_C is the difference between the two and can be either positive or negative. Any movement by the Tx, the Rx or within the environment between them also causes a shift in frequency (known as Doppler shift) that needs to be compensated. We will discuss carrier frequency synchronization in another article.
[Carrier Phase Synchronization] Furthermore, the carrier phase at the Rx oscillators is not known beforehand and needs to be estimated which will be explained in another article.

QAM Eye Diagram and Scatter Plot

As discussed above, a QAM signal consists of two PAM signals riding on orthogonal carriers. At baseband, these two PAM signals appear as I and Q components of a complex signal at the Tx and Rx. Therefore, there are two eye diagrams for a QAM modulated signal, one for I and the other for Q and both of them are exactly the same as PAM.

The case of scatter plot is a little different. After downsampling the matched filter output to symbol rate, the samples thus obtained are mapped back to the constellation, previously illustrated in QAM detector block diagram and now drawn in Figure below for 4-QAM modulation. This cloud of samples around the constellation points is now 2-dimensional (for PAM, there was no Q component) and can also be understood as a plot of Q versus I for each mapped value.

A scatter plot for 4-QAM modulation

Looking at the scatter plot, one can readily deduce a lot of features for the particular transmission system. At this stage, however, it is enough to observe that the diameter of these clouds is a rough measure of the noise power corrupting the signal. For the ideal case of no noise, this diameter is zero and all the optimally timed samples coincide with their respective constellation points.

A Simple Communication System

Blocks of a simple binary communication system

In every digital communication system, whether it is a home DSL or cellular data plan, one fundamental parameter we always hear about is the data rate. Data rate is simply the number of bits transmitted and received during one second, also called the bit rate denoted by R_b bits/second (b/s). Stated in another way, the source produces one bit during every 1/R_b = T_b seconds.

Since these bits consist of 0’s and 1’s, we start with assigning them two distinguishable voltage levels -A and +A, an example of which is shown in Figure below. Such a representation is called a constellation. Our ultimate purpose is to transmit a sequence of these voltage levels according to the bit stream at the Tx side. Then, we design the system such that these voltage levels are received undistorted in every manner at the Rx side so that the Rx can perform the inverse mapping from voltage to bits and find out the original bit stream.

Representation of two voltage levels, +A and -A

Based on this reasoning, a very simple digital communication system can be built as follows: At the Tx side, logic 0 and 1 of a bit sequence \underline{b} are mapped to levels -A and +A of a symbol sequence a[m], respectively, at discrete time intervals m = 0,1,2,\cdot\cdot\cdot. This process is called bit-symbol mapping and the time index m counts each such symbol time, T_M. A symbol is basically a mapping from the binary logic levels to signal levels into the real world. The constellation in Figure above illustrates the relationship between bits in \underline{b} and symbols a[m] as

(1)   \begin{equation*}         a[m] = \left\{ \begin{array}{l}         -A, \quad b = 0 \\         +A, \quad b = 1 \\         \end{array} \right.     \end{equation*}

For a bit sequence 1010, the generated symbols for A=2 are shown in Table below.

A table of bits, symbol mappings, received sequence and decisions

Blocks in a simple binary communication system

The block diagram of such a system is shown in Figure above. The received signal is corrupted by the addition of random noise w[m] on the Rx side such that the the received signal r[m] is given as

    \begin{equation*}        r[m] = a[m] + w[m]     \end{equation*}

As a consequence of noise addition, the received symbols are scattered around the actual symbol values as illustrated in the decision block of Figure above. Common sense dictates that symbol decisions \hat a[m] should be taken according to the following rule:

Minimum distance rule

If r[m] is closer to -A, it is decided that symbol -A was sent at time m, and if it closer to +A, it is taken as symbol +A.

To construct a general intuitive rule, the point in their middle is (-A+A)/2=0, and hence

(2)   \begin{equation*}         \hat a[m] = \left\{ \begin{array}{l}         -A, \quad r[m] < 0 \\         +A, \quad r[m] > 0 \\         \end{array} \right.     \end{equation*}

Such a decision rule is applied to compute \hat a[m] in Table above for A=2 where we luckily encounter no errors. The above relation is actually a manifestation of the minimum distance rule.

Finally, the subsequent symbol-bit mapping generates bit 0 for symbol -A and bit 1 for symbol +A to form the estimated bit sequence \hat{\underline{b}}. Notice that the digital communication system constructed above is sending and receiving one bit in every symbol time T_M.

Tools for Signal Diagnosis

All symbol intervals are overlayed on top of one another and the time axis is shifted to bring ideal sampling instant in the middle. Eye diagram generated for 250 2-PAM symbols and Square-Root Raised Cosine pulse with excess bandwidth 0.5

We are now in a position to devise some tools that help us diagnose problems with the communication system under study. I like to call them the stethoscopes for a communications system due to the crucial functionality they provide regarding the health of the communication system being analyzed. We discuss two such tools, namely an eye diagram and a scatter plot below.

Eye Diagram

Imagine the samples of matched filter output in a stream of PAM symbols Figure taken at a much higher rate, say L=64 samples/symbol, instead of L=2 samples/symbol so that the underlying plot looks continuous as in Figure below. The waveform is divided into black boxes of width T_M seconds such that each signal portion within a box starts half a symbol duration T_M/2 before the ideal sampling time iT_M, where i is an integer. Similarly, each signal portion within a box ends half a symbol duration T_M/2 after the ideal sampling time iT_M as well.

Matched filter output for PAM as a continuous waveform

Assume that the such a stream of PAM symbols is printed on a paper and all black boxes are cut into separate pieces precisely at symbol boundaries. My daughter just did that when I gave her a printed PAM sequence, as shown below.

PAM symbol stream printed on a paper and cut into pieces at symbol boundaries

Now if they are placed on top of one another, we get a diagram drawn on the left in Figure below. This is eye diagram, which is a modulo-T_M plot of matched filter output against time. Compare the color patterns between both figures and observe that time base in left Figure below is shifted such that optimum sampling instant occurs in the middle of the plot. This shift in time base can sometimes cause confusion and hence it should be remembered that although the ideal sampling instants actually occur at the end of a symbol interval, eye diagram shows that instant in the middle.

All symbol intervals are overlayed on top of one another and the time axis is shifted to bring ideal sampling instant in the middle. Eye diagram generated for 250 2-PAM symbols and Square-Root Raised Cosine pulse with excess bandwidth 0.5

Also note that the eventual pattern strongly depends on the underlying pulse auto-correlation from which the pulse shape for transmitting data is derived. Now remember that we are only using an example of a 2-PAM modulation with 10 bits, and hence 10 symbols, only. When a large number of symbols are generated for such a plot and overlaid on each other, all possible trajectories of the pulse auto-correlation dictated by the symbol sequence come into play. A diagram for Square-Root Raised Cosine pulse shape (and hence Raised Cosine pulse auto-correlation) generated for 250 symbols and excess bandwidth \alpha=0.5 is shown on the right side of Figure above. Notice that this plot resembles a human eye, hence the name eye diagram.


Interestingly, tracing a single transition in an eye diagram gives information about 3 symbols. As an example, look at the green trace around 5T_M on the left in Figure above:

[NOW] Observe that the trace goes through +A at the current sampling instant.
[Past] Also, it starts from a high voltage level. That is an indicator that in a clean system, its previous symbol would have been +A. Now compare it with matched filter output Figure for PAM and it is verified that its previous symbol, the purple trace, is indeed +A.
[Future] Finally, its level is falling below zero and towards -A which indicates that the next symbol should be -A. The fact that the black trace in matched filter output Figure for PAM is -A verifies this observation.

This will help us when we discuss symbol timing synchronization later.

The Purpose of Eye Diagram

Eye diagram is a diagnostic tool that helps in evaluation of the effects of channel noise and Inter-Symbol Interference (ISI) on the performance of a communication system. For this purpose, an eye diagram for a real transmission system can be generated through an oscilloscope. The horizontal time base of the oscilloscope is set equal to a symbol interval T_M and the matched filtered sequence is connected to the vertical axis. This superimposes the symbol intervals into a family of traces, all displayed within the same duration. The persistence of oscilloscope display makes it look like an eye.

To see how it helps, consider Figure below that consists of two symbol durations. Relevant information that can be extracted from an eye diagram is detailed below.

Eye diagram as a system diagnostic tool in a noiseless case

[Best Sampling Instant] For Nyquist pulses, no ISI occurs at the end of a symbol duration T_M — which falls in the center of the eye. This gives the maximum possible SNR on average because the sample value is farthest from the decision threshold at this point. A wrong decision will only happen if noise is sufficient to move the sample towards the other side of this threshold.
[Timing Error] A timing error occurs when the eye is not sampled at maximum average opening.
[Noise Margin] If a timing error occurs, the signal is sampled closer to the decision boundary. A relatively smaller amount of noise can cause a decision error. Or in other words, noise margin gets reduced. \footnote{For some trajectories, a timing error actually improves the noise margin, while for many others, it reduces that margin. When the average of all trajectories is taken into account, the noise margin decreases proportionally to the timing error.}
[Timing Jitter] Timing jitter is a measure of the average deviation of zero crossings.
[Eye Width] The wider the eye, the cleaner the channel. Channel distortion decreases the eye width and also decreases the eye opening at the best sampling instant. An open eye pattern corresponds to minimal signal distortion. Some channels can even cause the eye to close: there remains no sampling instant where a best symbol estimate can be obtained.

In fact, the eye in above Figure looks so symmetric because it is drawn for a noiseless case. Even for an AWGN channel with a low SNR, the eye can close but will remain symmetric in general as illustrated in Figure below. Depending on the SNR, there is distortion at the best sampling instant instead of zero ISI as in the previous case. Moreover, noise margin gets reduced, as a consequence of which decision errors can occur for relatively smaller noise power.

Eye diagram in an AWGN channel

Finally, channel distortions destroy this symmetry and result in strange looking eye diagrams, examples of which we will encounter in later chapters.

[Slope] Slope of the eye determines its sensitivity to timing errors. A large slope implies that even a little deviation in timing instant can cause the sample value — and subsequently noise margin — to reduce significantly. Therefore, a smaller slope lessens the effect of this dependence.

Eye diagrams can also be drawn for modulation schemes packing multiple bits in one symbol. For the case M=4, due to the presence of more than 2 symbols, the next symbol after every particular symbol can be +3A, +A, -A or -3A resulting into many different trajectories. Therefore, an eye diagram for modulation order M>2 displays multiple eyes, an example of which is illustrated in Figure below. Also notice that the larger the excess bandwidth \alpha, the lesser the interference among adjacent symbols in time and the eye is more open.

Eye diagrams generated for 400 4-PAM symbols and Square-Root Raised Cosine pulse for excess bandwidths 0.25 and 1

Scatter Plot

In general, a scatter plot is a graph that shows the relationship between two sets of data. For the purpose of digital communications, a scatter plot can be explained as follows.

Remember that we used a continuous version of PAM symbols Figure to understand eye diagrams. For scatter plot, we will use another PAM symbols Figure as a reference. After downsampling the matched filter output to symbol rate, the samples thus obtained are mapped back to the constellation as illustrated in above mentioned PAM symbols Figure. Before the symbol decisions are made, those samples form a cloud around the ideal constellation points as shown in Figure below. This cloud of symbol-spaced samples mapped on the original constellation diagram is called a scatter plot.

A scatter plot for binary PAM modulation

If you found this article useful, you might want to subscribe to my email list below to receive new articles.

Modulation – From Numbers to Signals

A rectangular pulse scaled by two amplitude levels, +A and -A

The purpose of digital communications is to send digital data across a channel which can be

  • wireless
  • telephone lines
  • coaxial cable
  • optical fiber
  • Ethernet
  • USB
  • chips on a printed circuit board

Considering the examples shown in Figure above, clearly neither a bit sequence nor a symbol sequence can be transmitted on their own through these channels — as they are nothing more than a set of numbers. Therefore, a signal waveform is an appropriate tool that can travel down the channel and carry the required information — just like a train running on its track and carrying the load.

For this purpose, the symbol sequence needs to be converted into an analog waveform that suits the characteristics of that particular channel. Let us start with a simple example.

A discrete-time rectangular pulse shape

Assume a rectangular pulse shape p(nT_S) (technically, it is called Non Return to Zero (NRZ) pulse shape but we will continue using the term rectangular for ease of visualization) shown in Figure above whose length is equal to one symbol interval in continuous-time, T_M = LT_S. However, observe that an interval of length LT_S seconds is not the same as the interval covered by L samples with a separation of T_S seconds between them. In discrete-time, the pulse length contains L samples with a total length of (L-1)T_S seconds but the missing sample in the end is the same as the first sample of the next pulse if they were transmitted in a continuous stream.

During each symbol interval T_M, some characteristic of p(nT_S) can be altered to make it a function of the symbol sequence a[m]. This process is called modulation. The amplitude of the pulse is one such candidate that can be varied according to the symbol values.

Note that the pulse energy without any normalization constant is given by \sum _{n=0}^{L-1} 1^2 = L. To make the system independent of the pulse amplitude itself, it can be normalized with 1/\sqrt{L} as shown in Figure above, thus turning it into a unit energy pulse.

    \begin{align*}         E_p &= \sum \limits _{n=0}^{L-1} \left(\frac{1}{\sqrt{L}}\right)^2 = 1     \end{align*}

Let us now relate the bit rate R_b with the symbol rate R_M and sample rate R_S. Typically, data bits 0 and 1 are generated with equal probability at a rate of R_b = 1/T_b b/s. In our simple scenario, a 0 is represented by symbol -A and a 1 by symbol +A and the symbol rate is denoted as R_M = 1/T_M. Here, T_b and T_M are equal due to a single bit for every symbol duration. Subsequently, a pulse shape at a sample rate of F_S = 1/T_S is generated with number of samples

(1)   \begin{equation*}         L = \frac{T_M}{T_S} = \frac{F_S}{R_M}     \end{equation*}

This parameter L is known as samples/symbol, or sample rate normalized to symbol rate, or oversampling factor. It is standard practice to select an integer L so that the sample rate is an integer multiple of the symbol rate.

The amplitude of the pulse p(nT_S) can be multiplied with -A for transmitting a 0 and with +A for transmitting a 1. As a consequence, two scaled versions of that pulse shape s_0(nT_S) and s_1(nT_S) are created whose amplitudes bear the symbol levels -A and +A representing 0 and 1, respectively. This amplitude scaling of the pulse p(nT_S) according to the symbol value is called Pulse Amplitude Modulation (PAM) and is illustrated in Figure below.

A rectangular pulse scaled by two amplitude levels, +A and -A

This can be seen as a natural result of holding the amplitude constant at a symbol level for the duration of a symbol T_M. Mathematically,

(2)   \begin{align*}             s_0(nT_S) &= -A \cdot p(nT_S) \\             s_1(nT_S) &= +A \cdot p(nT_S)         \end{align*}

During the transmission, the signal is corrupted by Additive White Gaussian Noise (AWGN) with power spectral density N_0/2 Watt/Hz. The received signal can be expressed as

    \begin{equation*}         r(nT_S) = \left\{ \begin{array}{l}         s_0(nT_S) + w(nT_S), \quad b = 0,  \\         s_1(nT_S) + w(nT_S), \quad b = 1,  \\         \end{array} ~~ \quad 0 \le n \le L-1 \right.     \end{equation*}

The task of the receiver is to find the most probable symbol in the interval 0 \le n \le L-1 and hence determine whether a 0 or a 1 was transmitted.

How to get numbers back from signals?

A natural question at this stage is the following: Basically, digital communication is all about numbers but how will we get those numbers back from such signals for detection purpose? In the answer to this question lies most of the theory and practice of digital communication systems.

To accomplish this task, we need a simple mechanism through which we can map all the possible information in a symbol interval 0 < t \le T_M back to a number. That number should be an estimate of the symbol and consequently can be used to detect the bit pattern as discussed in a later post.

What is Communications?

Wired and wireless channels

"The fundamental problem of communication is that of reproducing at one point either exactly or approximately a message selected at another point."

Our main purpose is to transfer digital information – which is a sequence of bits 0’s and 1’s – from one system to another through a communication channel. Let us return for a moment to the concept behind simple digital logic where logic 0 can be assigned to one voltage level while logic 1 to another. Provided the static discipline is followed, all our system electronics has to do is to be able to differentiate between these two levels.

Of course, digital circuits also have real voltages and real currents which are never exact. The infinite voltage levels are just broken into two discrete regions. Hence, they remain close to that state when the real world noise is introduced, which makes the digital circuits very robust and noise tolerant. This breaking down of real numbers on a continuous scale into discrete regions is the basis of the whole digital revolution.

This particular philosophy is very close to human nature too. Think about it: we like to classify everyday stuff into clearly defined boxes. For example, day and night, black and white, good and bad. The reality, however, is continuous in the sense that the brightness of light varies throughout the 24 hours, there are multiple shades of grey, and people are much more complex than being simply good and bad.

Digital communication follows the same principle but allows for multiple discrete regions. Let us explore why and how. Since many textbooks on digital communications concentrate on mathematical derivations of the concepts, we explain these concepts from more of an intuitive viewpoint without rigorous proofs. Those texts are highly recommended for readers seeking mathematical derivations.