Radix-2 Technologies
← Back to all case studies & articles
Digital Signal Processing DSP I/Q RF Design Software Defined Radio SDR

Understanding Phase Modulation: An Intuitive Guide to I/Q Data and Carrier Phase Control

64-QAM Constellation with AWGN Noise and Modulation Metrics

When I first started trying wrap my mind around the concept of quadrature signals, I struggled to visualize what the signals represented in the physical world. It just didn’t seem intuitive. However, if memory serves me correctly, there was an old Java-based web site maintained by an engineer that contained interactive widgets to visualize the signals. I emailed the curator but received no response and the site eventually disappeared, so I promised myself to eventually recreate it. Hopefully, you will find this post helpful in strengthening your understanding of quadrature singals and digital communications. The interactive widgets are React JS components and will hopefully help you visualize the mathematics behind the concepts.

In Part 1 of our wireless transmission series, we looked at how binary data can be transmitted by switching an RF carrier on and off—On-Off Keying (OOK)—and why smoothing those amplitude transitions is critical for controlling spectral sidelobes.

While simple amplitude switching is easy to build, varying the amplitude of a carrier wave alone has two fundamental drawbacks in wireless links:

  1. Limited Signal-Space Utilization: Encoding information only in carrier amplitude uses a single dimension of the available two-dimensional I/Q signal space, limiting how efficiently distinct symbols can be separated for a given average signal power.
  2. Power-Efficiency Tradeoffs: Packing more amplitude levels onto a single dimension reduces the distance between adjacent symbols for a given average power, making reliable detection increasingly demanding as the constellation grows.

To pack more bits per second into a narrow channel, modern communications and radar systems encode information into both the phase and amplitude of the carrier wave using In-Phase (II) and Quadrature (QQ) modulation.


How This Article Is Organized

To make this guide useful whether you are encountering I/Q data for the very first time or designing a physical FPGA/SDR transceiver, the article is structured in two progressive layers:

  • Part I — Core Digital Modulation (Sections 1–4): Builds the complete conceptual foundation from first principles: Carrier →\rightarrow I/Q & Complex Baseband (I+jQI + jQ) →\rightarrow Bits, Symbols & Baud Rate →\rightarrow BPSK, QPSK & QAM →\rightarrow Noise, Decision Boundaries & Gray Coding.
  • Part II — Making a Real Radio Work (Sections 5–7): Explores the practical RF hardware and DSP engineering required to transmit and recover those symbols over the air: PA Linearity & OQPSK →\rightarrow Nyquist Pulse Shaping (RRC) & Matched Filtering →\rightarrow Coherent Downconversion & Live Costas Loop Carrier Recovery.

At every step, keep this single End-to-End Digital Radio Signal Chain in mind—every concept and interactive lab in this article fits directly into one of these blocks:

End-to-End Digital Radio Signal Chain
1. TRANSMITTER (TX) — Baseband DSP to RF Passband Digital Baseband → RF Passband
flowchart LR
T1(["Input Bits<br/>0 1 1 0..."]) --> T2["Symbol Mapper<br/>(Gray Code)"] --> T3["Complex Baseband<br/>z = I + jQ"] --> T4["Pulse Shaping<br/>(TX RRC Filter)"] --> T5["I/Q Modulator<br/>s(t) = I·cos − Q·sin"]
classDef txNode fill:#1e1b4b,stroke:#6366f1,stroke-width:2px,color:#e0e7ff;
classDef ioNode fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#e0f2fe;
class T2,T3,T4,T5 txNode;
class T1 ioNode;
↓ RF Air Interface
2. WIRELESS RF PROPAGATION CHANNEL
AWGN Thermal Noise n(t) Carrier Phase Offset θe = θ_TX − θ_LO Multipath ISI & Channel Distortion
RX Antenna ↓
3. RECEIVER (RX) — Coherent Downconversion, Filtering & Carrier Sync RF Passband → Recovered Bits
flowchart LR
R1["I/Q Demodulator<br/>(Quadrature LO)"] --> R2["Matched Filter<br/>(RX RRC Filter)"] --> R3["Costas Loop PLL<br/>(Phase Derotation)"] --> R4["Decision Slicer<br/>(Nearest Symbol)"] --> R5(["Recovered<br/>Bits"])
classDef rxNode fill:#064e3b,stroke:#10b981,stroke-width:2px,color:#d1fae5;
classDef ioNode fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#e0f2fe;
class R1,R2,R3,R4 rxNode;
class R5 ioNode;
Figure 1: Complete single-carrier digital radio signal flow from raw input bits through complex baseband (I + jQ), RRC pulse shaping, RF upconversion, wireless channel propagation, and receiver Costas loop recovery. (No Equalization - A future topic)

End-to-End Digital Radio Architecture — Road Map to This Article

1. SYMBOL MAPPER
Bits → (I + jQ)
Sections 2 & 3 (BPSK, QPSK, QAM)
2. PULSE SHAPING
RRC Filter I(t), Q(t)
Section 5 (Nyquist Zero-ISI & BW)
3. I/Q MODULATOR
s(t) = I·cos − Q·sin
Sections 1 & 6 (RF Upconversion & PA)
4. CHANNEL & SLICER
AWGN & Decisions
Section 4 (Noise, d_min, Gray Code)
5. I/Q DEMOD & PLL
Costas Carrier Sync
Section 7 (Downconversion & PLL)

Part I: Core Digital Modulation (From Carrier Wave to Constellations & Decisions)

1. What Can We Change About a Carrier, What Are I/Q, and What Is Complex Baseband?

1.1 The Three Knobs of a Sine Wave

At the heart of every wireless transmitter is a pure sinusoidal RF carrier wave:

s(t)=Acos⁡(2πfct+ϕ)s(t) = A \cos(2\pi f_c t + \phi)

If we want to embed information onto that wave, nature gives us only three physical parameters (“knobs”) we can vary over time:

  1. Amplitude (AA): The peak height (envelope) of the wave.
  2. Frequency (fcf_c): How rapidly the wave oscillates per second.
  3. Phase (ϕ\phi): The starting angular offset of the wave relative to a time-zero reference clock (measured in degrees from −180∘-180^\circ to +180∘+180^\circ, or radians from −π-\pi to +π+\pi).

Digital modulation works by deliberately stepping one or more of these parameters between a finite set of discrete, pre-agreed states. Before looking at how hardware controls phase, use the interactive explorer below to adjust Amplitude (AA), Frequency (ff), and Phase (ϕ\phi) against a fixed reference carrier:

Interactive Carrier Parameter Explorer

Reference Sine Wave vs. Amplitude (A), Frequency (f), and Phase (φ)

Reference: s_ref(t) = 1.00 · sin(2π · 1.0t + 0°)
s(t) = 1.00 · sin(2π · 1.0t + 0°)(+0.00 rad)
0.0s0.5s1.0s1.5s2.0s+2.0+1.00.0-1.0-2.0
Reference Sine Wave (Fixed: A = 1.0, f = 1.0 Hz, φ = 0°)Modulated Wave s(t)
1.00
Min: 0.20Ref: 1.00Max: 2.00
1.0 Hz
Min: 0.5 HzRef: 1.0 HzMax: 3.0 Hz
+0°
-180° (-π)0°+180° (+π)

1.2 Why Hardware Radios Don’t Shift Phase Directly: The Two-Dial I/Q Solution

Suppose we want to transmit data by shifting the phase ϕ(t)\phi(t) of a 2.4 GHz2.4\text{ GHz} carrier wave to any arbitrary angle—say, 45∘45^\circ, 135∘135^\circ, or −60∘-60^\circ.

Directly building an electronically variable delay line or shifting the phase of a multi-gigahertz crystal oscillator linearly and instantaneously across 360∘360^\circ without corrupting its frequency stability is a hardware nightmare.

Fortunately, a fundamental trigonometric angle-sum identity rescues us:

Acos⁡(ωct+ϕ)  =  (Acos⁡ϕ)⏟Icos⁡(ωct)  −  (Asin⁡ϕ)⏟Qsin⁡(ωct)A\cos(\omega_c t + \phi) \;=\; \underbrace{(A\cos\phi)}_{I} \cos(\omega_c t) \;-\; \underbrace{(A\sin\phi)}_{Q} \sin(\omega_c t)

Look closely at what this equation reveals:

  • Instead of trying to reach inside a high-frequency oscillator to twist its phase angle ϕ\phi directly, we only need two fixed, 90∘90^\circ-shifted carrier waves from the same local oscillator: a cos⁡(ωct)\cos(\omega_c t) wave (In-Phase) and a sin⁡(ωct)\sin(\omega_c t) wave (Quadrature, shifted by a quarter-cycle, 90∘90^\circ).
  • We multiply those two fixed waves by two simple baseband DC/low-frequency voltages—II and QQ—and add them together:
s(t)=I(t)cos⁡(ωct)−Q(t)sin⁡(ωct)s(t) = I(t)\cos(\omega_c t) - Q(t)\sin(\omega_c t)

where the polar-to-Cartesian conversion is simply:

I=Acos⁡(ϕ),Q=Asin⁡(ϕ)I = A\cos(\phi), \qquad Q = A\sin(\phi)

and the inverse Cartesian-to-polar relationship is:

A=I2+Q2,ϕ=atan2(Q,I)A = \sqrt{I^2 + Q^2}, \qquad \phi = \text{atan2}(Q, I)

The “Two Dials” Mental Model: Think of II and QQ as an Etch-a-Sketch for radio waves. Instead of turning a polar steering wheel (ϕ\phi) and throttle (AA), you have two simple linear volume dials—one controlling the height of cos⁡(ωct)\cos(\omega_c t) (II) and one controlling the height of −sin⁡(ωct)-\sin(\omega_c t) (QQ). By setting just those two voltages (I,Q)(I, Q), their sum automatically synthesizes any amplitude AA and any phase angle ϕ\phi across all 360∘360^\circ!


1.3 Complex Baseband (z(t)=I(t)+jQ(t)z(t) = I(t) + jQ(t)): One Complex Number Equals Amplitude & Phase

In digital signal processing (DSP) and software-defined radio (SDR), we package the two real baseband signals I(t)I(t) and Q(t)Q(t) into a single Complex Baseband Signal z(t)z(t) using Euler’s formula (ejϕ=cos⁡ϕ+jsin⁡ϕe^{j\phi} = \cos\phi + j\sin\phi, where j=−1j = \sqrt{-1}):

z(t)=I(t)+jQ(t)=A(t)ejϕ(t)z(t) = I(t) + jQ(t) = A(t)e^{j\phi(t)}

Therefore, the instantaneous RF envelope amplitude A(t)A(t) and phase ϕ(t)\phi(t) are simply the magnitude and angle of the complex number z(t)z(t):

A(t)=∣z(t)∣=I(t)2+Q(t)2,ϕ(t)=∠z(t)=atan2(Q(t), I(t))A(t) = |z(t)| = \sqrt{I(t)^2 + Q(t)^2}, \qquad \phi(t) = \angle z(t) = \text{atan2}\big(Q(t),\, I(t)\big)

Key Takeaway: A digital radio can represent the instantaneous amplitude and phase of a modulated signal with a single complex number.

When you write a single line of Python or MATLAB code in an SDR flowgraph:

# Complex baseband I/Q sample stream in NumPy / GNU Radio / USRP / bladeRF
z = I + 1j*Q
amplitude = np.abs(z)      # Instantaneous RF envelope A(t)
phase_rad = np.angle(z)    # Instantaneous RF phase angle phi(t)

this is far more than convenient software shorthand—z = I + 1j*Q is the exact mathematical representation of the physical signal prior to upconversion. Every SDR hardware interface (USRP, bladeRF, PlutoSDR, RTL-SDR), FFT spectrum analyzer, and digital baseband equalizer operates directly on arrays of these complex numbers z[n]=I[n]+jQ[n]z[n] = I[n] + jQ[n].


1.4 Why Do We Call Them “Orthogonal”?

Why do we pick cos⁡(ωct)\cos(\omega_c t) and sin⁡(ωct)\sin(\omega_c t)—waves separated by 90∘90^\circ—rather than two waves separated by 30∘30^\circ or 60∘60^\circ?

The cosine and sine basis functions form orthogonal quadrature components under coherent detection. This allows the receiver to independently recover the II and QQ projections of the transmitted signal.

This zero cross-term holds over an integer number of carrier cycles (or an equivalent coherent observation interval), which is why an ideal coherent receiver can project the received waveform independently onto the II and QQ basis functions.

When a coherent receiver multiplies the incoming passband waveform s(t)=I(t)cos⁡(ωct)−Q(t)sin⁡(ωct)s(t) = I(t)\cos(\omega_c t) - Q(t)\sin(\omega_c t) by synchronized local cos⁡(ωct)\cos(\omega_c t) and −sin⁡(ωct)-\sin(\omega_c t) oscillators and low-pass filters the resulting double-frequency (2fc2f_c) mixer terms (assuming fc≫Rsf_c \gg R_s), the ideal cross-term between the two rails vanishes after coherent demodulation and low-pass filtering. Under ideal coherent synchronization, this allows the II and QQ projections to be recovered as independent orthogonal components on the same RF carrier frequency at the same time—a result we derive step-by-step in Section 7.

1.5 Interactive Lab: The I/Q Phasor & Waveform Synthesizer

Drag the In-Phase (II) and Quadrature (QQ) sliders (or click the quick phase presets) below to see how setting two DC levels (I,Q)(I, Q) moves the complex phasor z=I+jQz = I + jQ on the constellation plane and synthesizes the exact passband RF wave s(t)s(t):

Interactive I/Q & Phase Modulation Explorer

Steering Carrier Phase φ via Baseband I & Q Weights

Complex Baseband (I/Q Plane)A = 1.00, φ = 45°
+I+Q
I = +0.71
Q = +0.71
φ = 45°
s(t) = I·cos(ωc·t) − Q·sin(ωc·t) = A·cos(ωc·t + φ)
RF Output s(t)0° Reference cos(ωc·t)I·cos(ωc·t)−Q·sin(ωc·t)
Phase Angle (φ)45°
In-Phase Weight (I = A·cos φ)0.71
Quadrature Weight (Q = A·sin φ)0.71

2. Bits, Symbols, and Baud Rate (Rb=Rslog⁡2MR_b = R_s \log_2 M)

Before introducing specific digital modulation formats like BPSK, QPSK, or QAM, we need the single most important bridge between digital software and analog radio waves: the difference between a Bit and a Symbol.

In digital communications, a transmitter does not necessarily send raw bits (0 and 1) one at a time. Instead, the Symbol Mapper groups the incoming binary stream into chunks of kk bits and selects one Symbol from an alphabet of M=2kM = 2^k allowed (I,Q)(I, Q) coordinates:

Binary Bits  →Group k bits at a time  Symbol Sm∈{1…M}  →Lookup Table  Complex Coordinate zm=Im+jQm  →Upconvert  RF Waveform s(t)\boxed{\text{Binary Bits}} \;\xrightarrow{\text{Group } k \text{ bits at a time}}\; \boxed{\text{Symbol } S_m \in \{1\dots M\}} \;\xrightarrow{\text{Lookup Table}}\; \boxed{\text{Complex Coordinate } z_m = I_m + jQ_m} \;\xrightarrow{\text{Upconvert}}\; \boxed{\text{RF Waveform } s(t)}

Compare how BPSK (1 bit per symbol1\text{ bit per symbol}) and QPSK (2 bits per symbol2\text{ bits per symbol}) process the exact same 8-bit sequence 0 1 1 0 1 0 0 1:

1. BPSK (M = 2 allowed states → k = 1 bit per symbol):
   Input Bits:      0   |   1   |   1   |   0   |   1   |   0   |   0   |   1
                    ↓       ↓       ↓       ↓       ↓       ↓       ↓       ↓
   Symbols Sent:   S0      S1      S1      S0      S1      S0      S0      S1   (8 symbols required)

2. QPSK (M = 4 allowed states → k = 2 bits per symbol):
   Input Bit Pairs:   01    |     10    |     10    |     01
                      ↓           ↓           ↓           ↓
   Symbols Sent:      S1          S2          S2          S1                    (Only 4 symbols required!)

Symbol Rate (Baud, RsR_s) vs. Bit Rate (RbR_b)

  • Symbol Rate (Rs=1/TsR_s = 1 / T_s, measured in symbols/sec\text{symbols/sec} or Baud\text{Baud}): How many times per second the radio changes from one modulation symbol to the next.
  • Bit Rate (RbR_b, measured in bits/sec\text{bits/sec}): The raw bit rate represented by the modulation, related to the symbol rate RsR_s and constellation size MM by:
Rb=Rs⋅log⁡2(M)R_b = R_s \cdot \log_2(M)

Symbol rate sets the fundamental time scale of the waveform, but the actual occupied bandwidth also depends on the pulse-shaping filter; for example, a Raised-Cosine response with roll-off α\alpha has one-sided baseband bandwidth (1+α)Rs/2(1+\alpha)R_s/2.

Bandwidth vs. Modulation Order: For a fixed pulse-shaping filter and roll-off factor α\alpha, nominal null-to-null RF bandwidth is primarily determined by symbol rate RsR_s (BRF=(1+α)RsB_{\text{RF}} = (1 + \alpha)R_s), rather than the number of bits represented by each symbol. Increasing MM therefore increases the bit rate RbR_b at a fixed symbol rate without increasing the nominal occupied bandwidth, assuming the same pulse shaping.

This relationship explains the motivation for the modern digital modulation ladder:

Modulation FormatAllowed Symbol States (MM)Bits per Symbol (k=log⁡2Mk = \log_2 M)Bit Rate (RbR_b) at Fixed Rs=10 MBaudR_s = 10\text{ MBaud}How Symbols Are Placed on the I/QI/Q Plane
BPSKM=2M = 21 bit / symbol1\text{ bit / symbol}10 Mbps10\text{ Mbps}22 points on the real II axis (±1,0\pm 1, 0)
QPSK (4-QAM)M=4M = 42 bits / symbol2\text{ bits / symbol}20 Mbps20\text{ Mbps}44 points in the four quadrants (±0.707,±0.707\pm 0.707, \pm 0.707)
16-QAMM=16M = 164 bits / symbol4\text{ bits / symbol}40 Mbps40\text{ Mbps}4×44 \times 4 square grid of (I,Q)(I, Q) voltage levels
64-QAMM=64M = 646 bits / symbol6\text{ bits / symbol}60 Mbps60\text{ Mbps}8×88 \times 8 square grid of (I,Q)(I, Q) voltage levels
256-QAMM=256M = 2568 bits / symbol8\text{ bits / symbol}80 Mbps80\text{ Mbps}16×1616 \times 16 square grid of (I,Q)(I, Q) voltage levels

Let’s walk up this modulation ladder step by step.


3. Walking Up the Modulation Ladder: BPSK (M=2M=2), QPSK (M=4M=4), and QAM (M=16,64,256M=16, 64, 256)

3.1 Binary Phase Shift Keying (BPSK): M=2  ⟹  1 bit/symbolM = 2 \implies 1\text{ bit/symbol}

The simplest phase modulation format uses only M=2M = 2 symbols separated by 180∘180^\circ along the In-Phase (II) axis while keeping the Quadrature (QQ) rail permanently set to zero:

zBPSK∈{+1+j0,    −1+j0}z_{\text{BPSK}} \in \big\{+1 + j0,\;\; -1 + j0\big\}
  • Bit 0 (S0S_0): I=+1,Q=0  ⟹  s(t)=+cos⁡(ωct)I = +1, Q = 0 \implies s(t) = +\cos(\omega_c t) (ϕ=0∘\phi = 0^\circ)
  • Bit 1 (S1S_1): I=−1,Q=0  ⟹  s(t)=−cos⁡(ωct)=cos⁡(ωct+180∘)I = -1, Q = 0 \implies s(t) = -\cos(\omega_c t) = \cos(\omega_c t + 180^\circ) (ϕ=180∘\phi = 180^\circ)

Because BPSK places both points on the horizontal II axis (Q=0Q = 0), it leaves the entire vertical Quadrature (QQ) dimension unused.


3.2 Quadrature Phase Shift Keying (QPSK): M=4  ⟹  2 bits/symbolM = 4 \implies 2\text{ bits/symbol}

Each QPSK symbol contains two bits. In the rectangular mapping used here, one bit determines the sign of II and the other determines the sign of QQ, selecting one of M=4M = 4 allowed (I+jQ)(I + jQ) coordinates equally spaced around the unit circle (A=I2+Q2=1A = \sqrt{I^2 + Q^2} = 1):

Ik∈{+12,  −12},Qk∈{+12,  −12}I_k \in \left\{+\frac{1}{\sqrt{2}},\; -\frac{1}{\sqrt{2}}\right\}, \qquad Q_k \in \left\{+\frac{1}{\sqrt{2}},\; -\frac{1}{\sqrt{2}}\right\}
Bit Pair (bIbQb_I b_Q)In-Phase (II)Quadrature (QQ)Complex Symbol (z=I+jQz = I + jQ)Carrier Phase (ϕ\phi)
00+0.707+0.707+0.707+0.707+0.707+j0.707+0.707 + j0.70745∘45^\circ (π/4\pi/4)
10−0.707-0.707+0.707+0.707−0.707+j0.707-0.707 + j0.707135∘135^\circ (3π/43\pi/4)
11−0.707-0.707−0.707-0.707−0.707−j0.707-0.707 - j0.707225∘225^\circ (5π/45\pi/4)
01+0.707+0.707−0.707-0.707+0.707−j0.707+0.707 - j0.707315∘315^\circ (7π/47\pi/4)

Because each QPSK symbol represents 2 bits instead of 1, QPSK doubles the bit rate at a fixed symbol rate RsR_s (or, for the same pulse-shaping roll-off, halves the symbol rate and nominal occupied bandwidth needed to carry a given raw bit rate RbR_b)!

Interactive Comparator: BPSK (M=2M=2) vs. QPSK (M=4M=4)

Click any of the 8 input bits (0 or 1) below to compare how BPSK sends 8 individual 1-bit symbols while QPSK groups them into 4 two-bit symbols (Ts=2TbT_s = 2T_b):

Interactive Digital Phase Modulation Comparator

BPSK vs. QPSK vs. Offset-QPSK (OQPSK) Bit-to-Phase Mapping

Click bits to toggle input stream:
2 bits/symbol • 4 symbols (half symbol rate / nominal BW) • ±90° & 180° transitions
Track 4 Reference Carrier Phase Alignment:
Sym 1: "10" (135°)Sym 2: "11" (225°)Sym 3: "00" (45°)Sym 4: "10" (135°)I(t) In-Phase BasebandQ(t) Quadrature Baseband RF Output s(t) = I(t)·cos(ωc·t) − Q(t)·sin(ωc·t)Reference Locked to Sym "00" cos(ωc·t + 45°) (Dashed) vs. Modulated RF s(t) Overlay
I/Q Constellation Trajectory

Notice diagonal 180° transitions through (0,0)

+I+Q00 (45°)10 (135°)11 (225°)01 (315°)
Idealized symbol transition: simultaneous I & Q flips pass through (0,0), producing a 100% envelope dip.

3.3 Extending the Exact Same Grid: Quadrature Amplitude Modulation (16-QAM, 64-QAM, and 256-QAM)

Once you understand QPSK as selecting from 22 voltage levels on II (±1\pm 1) and 22 voltage levels on QQ (±1\pm 1) to form a 2×2=42 \times 2 = 4-point grid, Quadrature Amplitude Modulation (M-QAMM\text{-QAM}) is simply the natural continuation of the exact same idea!

Instead of restricting our II and QQ Digital-to-Analog Converters (DACs) to only 2 binary levels (±1\pm 1), we allow II and QQ to step across L=ML = \sqrt{M} evenly spaced discrete amplitude levels on each of the II and QQ axes:

Ik, Qk  ∈  {±1,  ±3,  ±5,  …,  ±(L−1)}I_k,\, Q_k \;\in\; \big\{\pm 1,\; \pm 3,\; \pm 5,\; \dots,\; \pm (L - 1)\big\}
  • 16-QAM (M=16  ⟹  4 bits/symbolM = 16 \implies 4\text{ bits/symbol}): The first 22 bits choose from 44 levels on II ({−3,−1,+1,+3}\{-3, -1, +1, +3\}) and the next 22 bits choose from 44 levels on QQ ({−3,−1,+1,+3}\{-3, -1, +1, +3\}), forming a 4×4=164 \times 4 = 16-point grid.
  • 64-QAM (M=64  ⟹  6 bits/symbolM = 64 \implies 6\text{ bits/symbol}): 33 bits on II (88 levels) ×\times 33 bits on QQ (88 levels) = 8×8=648 \times 8 = 64-point grid.
  • 256-QAM (M=256  ⟹  8 bits/symbolM = 256 \implies 8\text{ bits/symbol}): 44 bits on II (1616 levels) ×\times 44 bits on QQ (1616 levels) = 16×16=25616 \times 16 = 256-point grid.

Why arrange the points in a 2D square grid instead of placing 16 or 64 phase angles around a single circle (16-PSK16\text{-PSK} or 64-PSK64\text{-PSK})? Because crowding 16 or 64 symbols onto the perimeter of a 1D circle wastes the entire interior of the I/QI/Q plane! Spreading the points across a 2D square grid modulates both amplitude A(t)A(t) and phase ϕ(t)\phi(t), keeping neighboring points much farther apart (about a 4.2 dB4.2\text{ dB} advantage in normalized squared minimum Euclidean distance for 16-QAM versus 16-PSK at equal average symbol energy).

Interactive Explorer: 16-QAM vs. 64-QAM vs. 256-QAM

Switch between 16-QAM, 64-QAM, and 256-QAM below. Click any symbol slot (S1–S4) and click any point on the constellation grid to see how its (I,Q)(I, Q) coordinates control the amplitude and phase of the RF waveform:

Interactive Multi-Level I/Q Constellation & Waveform Explorer

Quadrature Amplitude Modulation: 16-QAM vs. 64-QAM vs. 256-QAM

Spectral Density4 bits / symbol
Min Euclidean Dist (d_min)0.632 · √E_s
Constellation PAPR+2.55 dB
RMS EVM @ 24 dB SNR6.3%
Click S1–S4 to cycle symbol (or click lattice):
Flip S1 bits (I|Q):|
Scaling:
Ref Phase:
S1: "1000" (I=+3, Q=+3)S2: "0010" (I=-3, Q=-3)S3: "1101" (I=+1, Q=+1)S4: "0111" (I=-1, Q=-1)I(t) Multi-Level PAM Baseband (4 discrete voltage levels)Q(t) Multi-Level PAM Baseband (4 discrete voltage levels)RF Output s(t) = A(t)·cos(ωc·t + φ(t)) & Instantaneous Envelope A(t)Reference Locked to 45° Diagonal cos(ωc·t + 45°) (Dashed) vs. Modulated QAM s(t)
16-QAM Reference Lattice
+I+QS1S2S3S4
Channel SNR (Es/N0)24 dB (EVM: 6.3%)
12 dB (Noisy)24 dB38 dB (High Linearity)

4. Noise, Decision Boundaries, Euclidean Distance (dmin⁡d_{\min}), and Gray Coding

If 256-QAM transmits 8 bits/symbol8\text{ bits/symbol}—eight times the raw bit rate of BPSK at the same symbol rate and nominal pulse-shaped bandwidth—why don’t we use 256-QAM or 4096-QAM on every deep-space probe and weak-signal link?

The answer lies in what happens inside the RF Channel and the Receiver Symbol Slicer.

4.1 Additive White Gaussian Noise (AWGN): Why Received Points Form a Cloud

When a radio wave travels through space and enters a receiver front-end amplifier, random noise from the propagation channel and receiver—often modeled as thermal-noise-dominated—adds an unpredictable complex noise sample n[k]=nI[k]+jnQ[k]n[k] = n_I[k] + j n_Q[k]. In the standard Additive White Gaussian Noise (AWGN) model:

zRX[k]=zTX[k]+(nI[k]+jnQ[k])z_{\text{RX}}[k] = z_{\text{TX}}[k] + \big(n_I[k] + j n_Q[k]\big)

In the standard complex-baseband AWGN model, nIn_I and nQn_Q are independent zero-mean Gaussian components with equal variance. The exact relationship between that variance and N0N_0 depends on the one-sided/two-sided PSD convention, so this article uses Eb/N0E_b/N_0 and Es/N0E_s/N_0 without requiring a particular discrete-time noise-variance normalization.

After receive filtering and sampling, the resulting Gaussian noise perturbation causes constellation samples to form a fuzzy 2D Gaussian cloud centered around each ideal transmitted coordinate:

   Transmitted Symbol (TX)             Received Symbol Cloud (RX + Noise)
                                                    .  .
              •                                  .   •   .
                                                   .   .

The spread of this noise cloud relative to the signal power is quantified by two closely related metrics:

  • Energy-to-Noise-Density Ratios (Es/N0E_s / N_0 and Eb/N0E_b / N_0): The symbol-energy-to-noise-density ratio Es/N0E_s/N_0 and bit-energy-to-noise-density ratio Eb/N0E_b/N_0 normalize signal energy to the noise power spectral-density parameter N0N_0. For an uncoded MM-ary modulation carrying k=log⁡2Mk=\log_2M bits per symbol, Es=kEb=Eblog⁡2ME_s=kE_b=E_b\log_2M. These quantities are closely related to SNR but allow modulation schemes with different symbol and bit rates to be compared on a common energy basis.
  • Error Vector Magnitude (EVMrms\text{EVM}_{\text{rms}}): The root-mean-square length of the error vector e⃗[k]=zRX[k]−zTX[k]\vec{e}[k] = z_{\text{RX}}[k] - z_{\text{TX}}[k] expressed as a percentage of the constellation reference amplitude. For a correctly normalized signal impaired only by uncorrelated AWGN, and with signal and noise powers evaluated over the same measurement bandwidth, EVMrms≈10−SNRdB/20×100%\text{EVM}_{\text{rms}} \approx 10^{-\text{SNR}_{\text{dB}}/20} \times 100\%. (In a physical radio transceiver, measured EVM also includes contributions from carrier phase noise, residual frequency offset, I/Q gain and quadrature imbalance, non-linear PA distortion, timing error, and DAC/ADC quantization.)

4.2 Receiver Decision Boundaries & Minimum Euclidean Distance (dmin⁡d_{\min})

The receiver does not know which symbol was transmitted; it only sees the noisy coordinate zRX=(IRX,QRX)z_{\text{RX}} = (I_{\text{RX}}, Q_{\text{RX}}). For equally likely symbols in AWGN, Maximum Likelihood detection reduces to minimum-Euclidean-distance detection: the receiver partitions the I/QI/Q plane with Decision Boundaries (the perpendicular bisectors halfway between neighboring constellation points) and picks whichever valid symbol lies closest to zRXz_{\text{RX}}.

A Symbol Error occurs whenever a random noise gust pushes zRXz_{\text{RX}} by more than half the distance to the nearest neighbor (dmin⁡/2d_{\min} / 2), crossing a decision boundary!

For a fixed average transmit power (Es=1E_s = 1), packing more points into the I/QI/Q plane shrinks the Minimum Euclidean Distance (dmin⁡d_{\min}) between neighboring symbols:

dmin⁡,BPSK=2.000Es,dmin⁡,QPSK=2Es≈1.414Es,dmin⁡,QAM=6EsM−1d_{\min,\text{BPSK}} = 2.000\sqrt{E_s}, \qquad d_{\min,\text{QPSK}} = \sqrt{2}\sqrt{E_s} \approx 1.414\sqrt{E_s}, \qquad d_{\min,\text{QAM}} = \sqrt{\frac{6 E_s}{M - 1}}
ModulationBits / SymbolMin. Symbol Separation (dmin⁡/Esd_{\min}/\sqrt{E_s}, Average-Energy Normalized)Normalized Decision Margin (dmin⁡/2Esd_{\min}/2\sqrt{E_s})Approx. Es/N0E_s/N_0 for Uncoded BER=10−5\text{BER} = 10^{-5} in AWGN
BPSK (M=2M=2)112.0002.000±1.000\pm 1.0009.6 dB9.6\text{ dB}
QPSK (M=4M=4)221.4141.414±0.707\pm 0.70712.6 dB12.6\text{ dB} (Eb/N0=9.6 dBE_b/N_0 = 9.6\text{ dB})
16-QAM (M=16M=16)440.6320.632±0.316\pm 0.31619.5 dB19.5\text{ dB}
64-QAM (M=64M=64)660.3090.309±0.154\pm 0.15425.8 dB25.8\text{ dB}
256-QAM (M=256M=256)880.1530.153±0.076\pm 0.07631.9 dB31.9\text{ dB}

Because each modulation carries a different number of bits per symbol, Es/N0E_s/N_0 should not be interpreted directly as energy efficiency per information bit; for uncoded modulation, the corresponding value is Eb/N0=(Es/N0)/log⁡2ME_b/N_0=(E_s/N_0)/\log_2M in linear units, or (Eb/N0)dB=(Es/N0)dB−10log⁡10(log⁡2M)(E_b/N_0)_{\text{dB}}=(E_s/N_0)_{\text{dB}}-10\log_{10}(\log_2M).


4.3 Why Gray Coding (00 →\rightarrow 01 →\rightarrow 11 →\rightarrow 10) Minimizes Bit Errors from Nearest-Neighbor Symbol Errors

Once we understand decision boundaries, the reason for Gray Coding becomes immediately obvious.

When noise causes a symbol error at normal operating SNR, the received dot almost always spills across a single boundary into an immediately adjacent cell (distance dmin⁡d_{\min}) rather than jumping all the way across the constellation.

  • If we labeled our four QPSK quadrants in Natural Binary counting order (00 →\rightarrow 01 →\rightarrow 10 →\rightarrow 11), crossing the single boundary between 01 (135∘135^\circ) and 10 (225∘225^\circ) would flip both bits at once (2 bit errors2\text{ bit errors} from 1 symbol error1\text{ symbol error})!
  • By labeling adjacent cells using Gray Code (00 →\rightarrow 10 →\rightarrow 11 →\rightarrow 01), every pair of neighboring symbols sharing a decision boundary differs by exactly 1 bit. Thus, a nearest-neighbor symbol error corrupts only 11 bit out of log⁡2(M)\log_2(M), minimizing the Bit Error Rate (BER)!

Interactive Lab: Noise Cloud, Decision Boundaries & Gray Coding vs. Natural Binary

Use the interactive explorer below to adjust the Channel SNR (Es/N0E_s/N_0) across BPSK, QPSK, and 16-QAM, see the red dashed Decision Boundaries, and toggle between Gray Coding and Natural Binary to see how Gray coding reduces the Bit Error Rate:

Core Concept Explorer — Noise & Symbol Decisions

AWGN Noise Cloud, Decision Boundaries, Euclidean Distance (d_min) & Gray Coding

Channel SNR (E_s/N_0):11 dB
Bit Mapping:
00101101

Dashed Red Lines = Receiver Decision Boundaries | Green Dots = Decoded Correctly | Red Dots = Crossed Boundary (Symbol Error!)

How the Receiver Decodes Noisy Symbols

1. Ideal Symbol Target (00): Transmitted at I = 0.707, Q = 0.707.

2. Minimum Euclidean Distance (d_min = 1.414): As you switch from BPSK (d_min = 2.000) to QPSK (1.414) to 16-QAM (0.632), neighboring symbols pack closer together and decision cells shrink.

3. Why Gray Coding Matters: When noise pushes a received dot across a single dashed boundary into a neighboring cell, Gray coding guarantees only 1 bit flips, whereas natural binary counting flips multiple bits at once!

Symbol Error Count
0 / 160
SER = 0.0%
Bit Errors (Gray Coded)
0 / 320 bits
BER = 0.0%
Bit Errors (Natural Binary)
0 / 320 bits
BER = 0.0%

LEVEL 1 COMPLETE

Core Digital Modulation Summary & Transition to Part II

“Digital modulation maps groups of bits onto allowed complex I/Q symbols (z = I + jQ). Those I/Q values control the amplitude and phase of an RF carrier. The receiver estimates the transmitted I/Q symbols across decision boundaries and maps them back into bits.”

At this point, we know how bits become modulation symbols and how those symbols become complex I/Q values. A real radio must solve three additional engineering problems before those symbols can be transmitted efficiently and recovered reliably over the air: (Section 5) Nyquist pulse shaping & occupied bandwidth, (Section 6) RF Power Amplifier linearity & OQPSK, and (Section 7) Coherent receiver downconversion & Costas Loop carrier synchronization.


Timing-Recovery Assumption: To keep this article focused on carrier phase recovery, we assume the receiver has already acquired symbol timing and knows the correct matched-filter sampling instants. Practical receivers recover this timing separately using timing-error detectors such as Gardner or Mueller-and-Müller with an interpolator/NCO loop; that topic will be covered in a later receiver-synchronization article.

Part II: Making a Real Radio Work — Practical RF & DSP Implementation

5. Spectral Occupied Bandwidth, Nyquist Baseband Pulse Shaping (RC / RRC), & Matched Filtering

(Signal-Chain Blocks: Transmit Pulse Shaping & Receiver Matched Filter)

In Sections 2 and 3, we sketched our baseband I(t)I(t) and Q(t)Q(t) signals as sharp rectangular voltage steps of duration TsT_s. Why can’t we send raw rectangular steps directly to the antenna?

5.1 Why Rectangular Steps Spill Across the RF Spectrum

By the Fourier Transform, a sharp rectangular pulse rect(t/Ts)\text{rect}(t / T_s) of duration Ts=1/RsT_s = 1 / R_s in the time domain transforms into a wide sinc(fTs)\text{sinc}(f T_s) spectrum in the frequency domain. Upconverted to fcf_c, its Power Spectral Density (PSD) is:

Srect(f)=Ts sinc2 ⁣((f−fc)Ts)=Ts(sin⁡ ⁣(π(f−fc)Ts)π(f−fc)Ts) ⁣2S_{\text{rect}}(f) = T_s\,\text{sinc}^2\!\big((f - f_c)T_s\big) = T_s \left(\frac{\sin\!\big(\pi (f - f_c) T_s\big)}{\pi (f - f_c) T_s}\right)^{\!2}

The first spectral sidelobe of sinc2(fTs)\text{sinc}^2(f T_s) sits only −13.3 dB-13.3\text{ dB} below the main carrier lobe, and subsequent sidelobes decay slowly at 1/f21/f^2 (−6 dB/octave-6\text{ dB/octave}), spraying wideband interference across neighboring radio channels.


5.2 Nyquist’s First Criterion: Band-Limiting Without Inter-Symbol Interference (ISI)

To confine the transmitted signal to a tight RF channel bandwidth BRFB_{\text{RF}}, we must pass our discrete complex symbols z[k]=I[k]+jQ[k]z[k] = I[k] + jQ[k] through a band-limiting low-pass pulse-shaping filter p(t)p(t).

Low-pass filtering stretches each symbol into a smooth oscillating wave spanning several symbol periods (−3Ts⋯+3Ts-3T_s \dots +3T_s). How do we keep the ringing tails of preceding symbols from corrupting the current symbol (Inter-Symbol Interference, ISI)?

For a synchronized linear pulse-amplitude modulation system, zero ISI at the symbol decision instants (t=kTst = kT_s) is obtained when the end-to-end pulse p(t)p(t) satisfies the time-domain form of Nyquist’s First Criterion:

p(kTs)={1,k=00,k=±1,  ±2,  ±3,  …p(k T_s) = \begin{cases} 1, & k = 0 \\ 0, & k = \pm 1,\; \pm 2,\; \pm 3,\; \dots \end{cases}

In other words, the pulse can oscillate between samples as long as its zero-crossings land at every integer multiple of the symbol period (±Ts,±2Ts,±3Ts,…\pm T_s, \pm 2T_s, \pm 3T_s, \dots)! At the exact instant the receiver samples symbol kk, the tails of all other symbols pass through 0.00 V0.00\text{ V}.


5.3 The Raised-Cosine (RC) & Root-Raised-Cosine (RRC) Matched Filter Pair

Practical digital radios use the Raised-Cosine (RC) pulse family, parameterized by the Roll-Off Factor α∈[0,1]\alpha \in [0, 1] (excess bandwidth factor):

pRC(t)=sin⁡(πt/Ts)πt/Ts⋅cos⁡(παt/Ts)1−(2αt/Ts)2p_{\text{RC}}(t) = \frac{\sin(\pi t / T_s)}{\pi t / T_s} \cdot \frac{\cos(\pi \alpha t / T_s)}{1 - (2 \alpha t / T_s)^2}

which bounds the total occupied RF passband bandwidth to:

BRF=(1+α) Rs=(1+α) Rblog⁡2(M)B_{\text{RF}} = (1 + \alpha)\,R_s = (1 + \alpha)\,\frac{R_b}{\log_2(M)}

The PAPR values below are representative results for a particular pulse-shaped QPSK sequence and filter implementation; unlike occupied bandwidth, waveform PAPR is not determined by α\alpha alone.

Roll-Off Factor (α\alpha)Occupied RF Bandwidth (BRFB_{\text{RF}})Time-Domain Tail RingingExample Simulated Peak Envelope (QPSK PAPR)Representative Wireless & Wireline Standards
α=0.00\alpha = 0.00 (Ideal Sinc)1.00×Rs1.00 \times R_s (Nyquist Limit)Severe (1/t1/t decay)+3.9 dB+3.9\text{ dB}Theoretical baseline / OFDM limit
α=0.15\alpha = 0.151.15×Rs1.15 \times R_sHigh (1/t31/t^3 decay)∼+3.2 dB\sim +3.2\text{ dB}DVB-S2X satellite transponders
α=0.22\alpha = 0.221.22×Rs1.22 \times R_sModerate∼+2.6 dB\sim +2.6\text{ dB}3GPP UMTS / WCDMA & cellular links
α=0.35\alpha = 0.351.35×Rs1.35 \times R_sLow∼+1.9 dB\sim +1.9\text{ dB}DOCSIS cable modems, APCO P25, & SATCOM
α=0.50–1.00\alpha = 0.50\text{–}1.001.50–2.00×Rs1.50\text{–}2.00 \times R_sMinimal (Fast damping)+0.8–1.3 dB+0.8\text{–}1.3\text{ dB}Short-range telemetry & microcontroller radios

Interactive Lab: Nyquist Pulse Shaping, Spectrum & Zero-ISI Superposition

Use the interactive lab below to switch between Unfiltered Rect, TX Only (Single RRC), and TX + RX Cascade (Raised-Cosine), drag the Roll-Off Factor (α\alpha) slider, and observe how all 6 overlapping symbol pulses sum to zero ISI at the symbol decision instants marked by the green sampling strobes (t=kTst = kT_s):

Interactive Lab 4

Spectral Occupied Bandwidth & Nyquist Baseband Pulse Shaping (Rect vs. RRC vs. RC)

Roll-Off Factor (α):α = 0.25
Click Symbols (S1–S6):
Frequency Domain — Power Spectral Density (PSD)BW = 1.25 × R_s
0dB-13dB-20dB-40dB-2R_s-1R_s-0.5R_sf_c+0.5R_s+1R_s+2R_sRect sinc²(fT_s) (−13.3 dB sidelobe)Shaped Spectrum (B_RF = 1.25 R_s)
Time Domain — Single-Symbol Impulse Response p(t)p(kT_s) = 0 for all k ≠ 0 (Zero ISI)
-3T_s-2T_s-1T_s0+1T_s+2T_s+3T_s● Green dots at ±T_s, ±2T_s, ±3T_s = Exact Zero-Crossing (0.00 V tail at adjacent symbols)
Multi-Symbol Superposition (S1–S6) & Pulse-Shaped RF Output
── Composite I(t)── Composite Q(t)● Decision Strobes (t = kT_s)
S1 ("00")S2 ("10")S3 ("01")S4 ("11")S5 ("00")S6 ("11")I(t)Q(t)s(t) & Ref
Occupied RF Bandwidth
1.25 × R_s
Adjacent-Channel Sidelobes
≤ −48 dB (Band-Limited)
Peak RF Envelope Overshoot
1.16× (+1.29 dB PAPR)
Min Envelope / Zero-ISI
A_min = 0.12 | 0.0% ISI

6. RF Transmitter Limitations: 180∘180^\circ Envelope Collapse, PA Compression, and Why OQPSK Exists

(Signal-Chain Block: I/Q Modulator & RF Power Amplifier)

Now that we see how Root-Raised-Cosine filtering smooths I(t)I(t) and Q(t)Q(t) between symbols, we can understand a critical RF hardware trap. On paper, QPSK looks like a constant-envelope modulation because all four constellation points lie on the unit circle (A=I2+Q2=1A = \sqrt{I^2 + Q^2} = 1). Once pulse-shaped, however, QPSK is NOT constant-envelope.

6.1 Idealized 180∘180^\circ Origin Crossings & Pulse-Shaped Envelope Excursions

With idealized simultaneous I/QI/Q transitions, a 180∘180^\circ QPSK transition (such as 00 at 45∘→45^\circ \to 11 at 225∘225^\circ, or 10 at 135∘→135^\circ \to 01 at 315∘315^\circ) passes directly through the origin (I=0,Q=0)(I=0, Q=0), producing a momentary 100%100\% envelope null. Multi-symbol RRC pulse shaping modifies the exact inter-symbol trajectory depending on the filter roll-off α\alpha and surrounding symbols, but 180∘180^\circ phase reversals still cause deep envelope dips and large peak-to-average envelope excursions.

When a pulse-shaped waveform with deep envelope dips and +3 dB+3\text{ dB} overshoots drives a high-efficiency RF Power Amplifier (PA) operating near compression (P1dBP_{1\text{dB}}), the amplifier’s non-linear AM-to-AM (gain compression) and AM-to-PM (phase rotation vs. drive level) distortion violently regenerates the outer spectral sidelobes (spectral regrowth)—undoing the spectral containment of our RRC filter!

6.2 The Hardware Solution: Offset-QPSK (OQPSK)

By inserting a half-symbol delay (Tb=Ts/2T_b = T_s / 2) into the Quadrature (QQ) baseband path before the mixer, I(t)I(t) and Q(t)Q(t) never transition at the same instant:

  • At even bit intervals (t=0,2Tb,4Tb…t = 0, 2T_b, 4T_b\dots), only I(t)I(t) can transition while Q(t)Q(t) holds steady.
  • At odd bit intervals (t=Tb,3Tb,5Tb…t = T_b, 3T_b, 5T_b\dots), only Q(t)Q(t) can transition while I(t)I(t) holds steady.

Because only one coordinate can change sign at a time, 180∘180^\circ diagonal transitions through the origin (0,0)(0,0) are eliminated. The phase never steps by more than ±90∘\pm 90^\circ, so that in the idealized rectangular-pulse trajectory the envelope does not pass through zero; with practical pulse shaping, the exact minimum envelope depends on the filter and surrounding symbol sequence, substantially reducing envelope fluctuations and allowing satellite and tactical RF power amplifiers to operate efficiently near saturation. (Tip: Scroll back to the interactive Phase Modulation Comparator in Section 3 and toggle between QPSK and OQPSK to compare their constellation trajectories.)


7. Coherent Demodulation, Quadrature Downconversion, & Costas Loop Carrier Recovery

(Signal-Chain Blocks: I/Q Demodulator & Carrier Phase Recovery)

We now arrive at the final link in our signal chain: when only a single real passband voltage s(t)=I(t)cos⁡(ωct+θTX)−Q(t)sin⁡(ωct+θTX)s(t) = I(t)\cos(\omega_c t + \theta_{\text{TX}}) - Q(t)\sin(\omega_c t + \theta_{\text{TX}}) reaches the receiver antenna, how does the receiver separate I(t)I(t) and Q(t)Q(t) and lock onto the transmitter’s phase without a reference wire?


7.1 Consistent Phase-Error Sign Convention & Coherent Quadrature Downconversion

Let’s define our phase convention explicitly so that the mixer equations, baseband rotation matrix, constellation plot, and Costas loop equations are 100%100\% consistent:

  • Let the incoming transmitted RF wave have instantaneous carrier phase ΦTX(t)=ωct+θTX(t)\Phi_{\text{TX}}(t) = \omega_c t + \theta_{\text{TX}}(t): s(t)=I(t)cos⁡(ωct+θTX(t))−Q(t)sin⁡(ωct+θTX(t))s(t) = I(t)\cos\big(\omega_c t + \theta_{\text{TX}}(t)\big) - Q(t)\sin\big(\omega_c t + \theta_{\text{TX}}(t)\big)
  • Let the receiver’s Local Oscillator (LO) have instantaneous phase ΦLO(t)=ωct+θLO(t)\Phi_{\text{LO}}(t) = \omega_c t + \theta_{\text{LO}}(t), driving two quadrature downconversion mixers:
    • Top (IRXI_{\text{RX}}) Mixer: Multiplies s(t)s(t) by +2cos⁡(ωct+θLO(t))+2\cos\big(\omega_c t + \theta_{\text{LO}}(t)\big) followed by the RRC Low-Pass Matched Filter.
    • Bottom (QRXQ_{\text{RX}}) Mixer: Multiplies s(t)s(t) by −2sin⁡(ωct+θLO(t))-2\sin\big(\omega_c t + \theta_{\text{LO}}(t)\big) followed by an identical Low-Pass Matched Filter.
  • Define the Channel / Receiver Phase Error θe(t)\theta_e(t) as the phase of the incoming TX carrier relative to the receiver LO: θe(t)  ≜  θTX(t)−θLO(t)  =  (ωc−ωLO)t+θ0  =  2πΔf t+θ0\theta_e(t) \;\triangleq\; \theta_{\text{TX}}(t) - \theta_{\text{LO}}(t) \;=\; (\omega_c - \omega_{\text{LO}})t + \theta_0 \;=\; 2\pi \Delta f\,t + \theta_0

Applying the product-to-sum identities (2cos⁡Acos⁡B=cos⁡(A−B)+cos⁡(A+B)2\cos A \cos B = \cos(A - B) + \cos(A + B) and 2sin⁡Acos⁡B=sin⁡(A−B)+sin⁡(A+B)2\sin A \cos B = \sin(A - B) + \sin(A + B)) with A=ωct+θTXA = \omega_c t + \theta_{\text{TX}} and B=ωct+θLOB = \omega_c t + \theta_{\text{LO}} (so that the difference angle is A−B=θTX−θLO=θeA - B = \theta_{\text{TX}} - \theta_{\text{LO}} = \theta_e), the upper mixer output before low-pass filtering is:

s(t)⋅2cos⁡(ωct+θLO)=I(t)cos⁡(θe)−Q(t)sin⁡(θe)+I(t)cos⁡(2ωct+θTX+θLO)−Q(t)sin⁡(2ωct+θTX+θLO)⏟Double-frequency (2fc) terms rejected by Low-Pass Matched Filter\begin{aligned} s(t) \cdot 2\cos(\omega_c t + \theta_{\text{LO}}) &= I(t)\cos(\theta_e) - Q(t)\sin(\theta_e) \\ &\quad + \underbrace{I(t)\cos(2\omega_c t + \theta_{\text{TX}} + \theta_{\text{LO}}) - Q(t)\sin(2\omega_c t + \theta_{\text{TX}} + \theta_{\text{LO}})}_{\text{Double-frequency } (2f_c) \text{ terms rejected by Low-Pass Matched Filter}} \end{aligned}

And similarly for the lower mixer s(t)⋅(−2sin⁡(ωct+θLO))s(t)\cdot\big(-2\sin(\omega_c t + \theta_{\text{LO}})\big), after the Low-Pass Matched Filter strips away the 2fc2f_c terms, we obtain the exact downconverted baseband outputs:

IRX(t)=I(t)cos⁡θe(t)−Q(t)sin⁡θe(t),QRX(t)=I(t)sin⁡θe(t)+Q(t)cos⁡θe(t)I_{\text{RX}}(t) = I(t)\cos\theta_e(t) - Q(t)\sin\theta_e(t), \qquad Q_{\text{RX}}(t) = I(t)\sin\theta_e(t) + Q(t)\cos\theta_e(t)

Notice two critical results from this single derivation:

  1. When the Receiver LO Is Phase-Locked (θe=0∘  ⟹  cos⁡0∘=1,sin⁡0∘=0\theta_e = 0^\circ \implies \cos 0^\circ = 1, \sin 0^\circ = 0): IRX(t)=I(t),QRX(t)=Q(t)I_{\text{RX}}(t) = I(t), \qquad Q_{\text{RX}}(t) = Q(t) With the 2fc2f_c mixer products rejected by the low-pass matched filter and θe=0\theta_e=0, the remaining I/QI/Q cross-coupling terms are zero.
  2. When a Phase Error θe(t)=θTX−θLO≠0\theta_e(t) = \theta_{\text{TX}} - \theta_{\text{LO}} \ne 0 Exists: Packaging (IRX,QRX)(I_{\text{RX}}, Q_{\text{RX}}) into complex baseband zRX(t)=IRX(t)+jQRX(t)z_{\text{RX}}(t) = I_{\text{RX}}(t) + jQ_{\text{RX}}(t) yields the Complex Baseband Rotation: zRX(t)=(I(t)+jQ(t))(cos⁡θe(t)+jsin⁡θe(t))=zTX(t)⋅e+jθe(t)z_{\text{RX}}(t) = \big(I(t) + jQ(t)\big)\big(\cos\theta_e(t) + j\sin\theta_e(t)\big) = z_{\text{TX}}(t)\cdot e^{+j\theta_e(t)} Or in 2×22 \times 2 rotation matrix form: [IRX(t)QRX(t)]=[cos⁡θe(t)−sin⁡θe(t)sin⁡θe(t)cos⁡θe(t)][I(t)Q(t)]\begin{bmatrix} I_{\text{RX}}(t) \\ Q_{\text{RX}}(t) \end{bmatrix} = \begin{bmatrix} \cos\theta_e(t) & -\sin\theta_e(t) \\ \sin\theta_e(t) & \cos\theta_e(t) \end{bmatrix} \begin{bmatrix} I(t) \\ Q(t) \end{bmatrix} (Note on sign conventions: If one instead defines phase error as the LO phase advance θe′≜θLO−θTX=−θe\theta'_e \triangleq \theta_{\text{LO}} - \theta_{\text{TX}} = -\theta_e, then substituting −θe′-\theta'_e flips the sign of sin⁡θe\sin\theta_e, giving IRX=Icos⁡θe′+Qsin⁡θe′I_{\text{RX}} = I\cos\theta'_e + Q\sin\theta'_e, QRX=−Isin⁡θe′+Qcos⁡θe′Q_{\text{RX}} = -I\sin\theta'_e + Q\cos\theta'_e, and zRX=zTXe−jθe′z_{\text{RX}} = z_{\text{TX}}e^{-j\theta'_e}. Both describe the exact same physical phenomenon: a mismatch between TX and LO phases rotates the complex constellation!)

7.2 The Costas Loop & 90∘90^\circ Rotational Phase Ambiguity

Because suppressed-carrier BPSK, QPSK, and QAM signals have symmetric constellations (±V\pm V), their average carrier power at fcf_c cancels to zero—leaving no discrete carrier tone for an ordinary PLL to track.

Instead, coherent receivers use a Decision-Directed Costas Loop:

  • Phase Error Detector (PED): Strips away the data modulation using hard constellation decisions. For BPSK, a conventional multiplier-type Costas detector can form eϕ[k]=IRX[k]QRX[k]e_\phi[k] = I_{\text{RX}}[k]Q_{\text{RX}}[k], with an ideal detector characteristic proportional to sin⁡(2θe)\sin(2\theta_e); near lock, sin⁡(2θe)≈2θe\sin(2\theta_e)\approx2\theta_e. Its 180∘180^\circ periodicity produces the expected BPSK phase ambiguity. For QPSK, I^=sgn(IRX)\hat{I} = \text{sgn}(I_{\text{RX}}) and Q^=sgn(QRX)\hat{Q} = \text{sgn}(Q_{\text{RX}}) identify the nearest quadrant. For higher-order QAM, the receiver instead uses a full constellation slicer z^[k]=I^[k]+jQ^[k]=slice{zRX[k]}\hat{z}[k] = \hat{I}[k] + j\hat{Q}[k] = \text{slice}\{z_{\text{RX}}[k]\} that selects the nearest valid amplitude and phase state. A decision-directed phase-error detector can then be written compactly as: eϕ[k]=Im⁡ ⁣{zRX[k]z^∗[k]}e_\phi[k] = \operatorname{Im}\!\left\{z_{\text{RX}}[k]\hat{z}^{*}[k]\right\} For QPSK, this is equivalent (up to sign convention) to QRX[k]I^[k]−IRX[k]Q^[k]Q_{\text{RX}}[k]\hat{I}[k] - I_{\text{RX}}[k]\hat{Q}[k]. Because the QPSK constellation has fourfold rotational symmetry, the detector characteristic repeats every 90∘90^\circ, producing four possible carrier-phase lock orientations. Square QAM constellations have the same fourfold rotational symmetry, so decision-directed carrier recovery can retain the same 90∘90^\circ phase ambiguity until pilots, differential encoding, or higher-layer framing resolve the absolute orientation. The Costas loop therefore performs carrier synchronization modulo the constellation symmetry; a known pilot, preamble, differential encoding, or framing constraint is what resolves the remaining absolute phase orientation.
  • PI Loop Filter & NCO: Feeds eϕ[k]e_\phi[k] through a 2nd-order Proportional-Integral filter to advance the Numerically Controlled Oscillator (NCO) phase θLO\theta_{\text{LO}} until θe=θTX−θLO→0\theta_e = \theta_{\text{TX}} - \theta_{\text{LO}} \to 0.
  • The 90∘90^\circ Phase Ambiguity Problem: Because sin⁡(4θe)\sin(4\theta_e) repeats four times every 360∘360^\circ, the Costas loop has 4 stable lock points (0∘,+90∘,±180∘,−90∘0^\circ, +90^\circ, \pm 180^\circ, -90^\circ). If the loop settles into +90∘+90^\circ, the constellation stops spinning and locks sharply—but every Quadrant I "00" symbol is rotated into Quadrant II ("10")! Real-world receivers resolve this by correlating against known Pilot / Preamble symbols (or by using differential encoding, DQPSK).

Interactive Lab: Real-Time Streaming Costas Loop & 90° Phase Ambiguity Simulator

Watch the live ~24 symbol/sec streaming Costas Loop below:

  1. Click Open-Loop (Watch LO Spin!) to see how a tiny frequency offset Δf\Delta f causes the constellation to orbit continuously around the unit circle.
  2. Click Engage Costas Loop PLL to watch the NCO grab the spinning stream, track out Δf\Delta f, and pull the red operating ball into a stable zero-crossing valley on the S-curve!
  3. Click ⚡ Kick +68° Step (Force 90° False Lock!) to watch the loop settle into the +90∘+90^\circ ambiguity valley (where green "00" symbols stream into Quadrant II), then click Resolve 90°/180° Ambiguity via Pilot ("00") to derotate the live stream back to Quadrant I:
Interactive Lab 5 — Real-Time Streaming DSPPULLING IN...

Live Streaming Costas Loop Carrier Recovery & 90° Phase Ambiguity Simulator

Static Phase (θ₀):+35°
−175°Drag to Perturb Phase+175°
Freq Offset (Δf/R_s):0.40% R_s
0 HzNCO Est: 0.00%1.5% R_s
Loop BW (B_L T_s):0.040
Slow Pull-InFast Pull-In
Channel E_s/N_0:25 dB
12 dB (Noisy)34 dB (Clean)
Live I_RX / Q_RX Phosphor Constellation65-Symbol Persistence Trail
Q1 ("00" Target)Q2 ("10")Q3 ("11")Q4 ("01")
✓ Costas Loop Tracking Live Stream: Green "00" symbols are locked inside Quadrant I (Q1) while NCO cancels Δf = 0.40% R_s.
Live Strip-Chart — Residual Phase Error θ_e(t) & NCO LockLive θ_e: +35.0° | NCO Δf: 0.00% R_s
-180°-90°0°+90°+180°Real-Time Rolling Telemetry Window (Last 95 Symbols)
Costas Phase Detector S-Curve e_φ(θ_e) — Watch Red Operating Point Roll Into Locksin(4θ_e)
-180°-90°0°+90°+180°

Summary & What’s Next in the Series

We have traveled all the way from a raw sinusoidal carrier s(t)=Acos⁡(2πfct+ϕ)s(t) = A\cos(2\pi f_c t + \phi) to a complete single-carrier digital transceiver:

Single-Carrier Digital Transceiver — Conceptual Mathematical Summary
1. TRANSMITTER MATHEMATICAL PIPELINE Digital Baseband → RF Passband
flowchart LR
M1(["Bit Stream<br/>Rb = Rs·log₂M"]) --> M2["Constellation<br/>zₖ = Iₖ + jQₖ"] --> M3["TX RRC Filter<br/>B_NN = (1+α)Rs"] --> M4["OQPSK / PA<br/>Avoid 180° Zero"] --> M5["RF Upconverter<br/>Re{z(t)·eʲ²πfᶜt}"]
classDef txNode fill:#1e1b4b,stroke:#6366f1,stroke-width:2px,color:#e0e7ff;
classDef ioNode fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#e0f2fe;
class M2,M3,M4,M5 txNode;
class M1 ioNode;
↓ RF Air Interface
2. WIRELESS RF PROPAGATION & IMPAIRMENTS
Received Passband s_RX(t) + n(t) Phase Rotation θe = θ_TX − θ_LO Multipath Channel h(t) & Delay Spread
RX Antenna ↓
3. RECEIVER MATHEMATICAL PIPELINE RF Passband → Recovered Bits
flowchart LR
D1["I/Q Downconverter<br/>z_RX = z_TX·e⁺ʲθe"] --> D2["RX RRC Matched<br/>H_RRC² = H_RC (0 ISI at Sampling Instants)"] --> D3["Carrier Recovery<br/>Costas / Pilot-Aided<br/>z_corr = z_RX·e⁻ʲθ̂"] --> D4["Minimum-Distance Slicer<br/>arg min |z − z_m|²"] --> D5(["Decoded Bits<br/>Gray Mapped"])
classDef rxNode fill:#064e3b,stroke:#10b981,stroke-width:2px,color:#d1fae5;
classDef ioNode fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#e0f2fe;
class D1,D2,D3,D4 rxNode;
class D5 ioNode;
Figure 2: Mathematical transformations across every stage of the digital transmitter, wireless RF channel, and coherent Costas-loop receiver.
  1. Complex Baseband (z=I+jQz = I + jQ): Lets digital hardware steer any RF amplitude A=∣z∣A = |z| and phase ϕ=∠z\phi = \angle z using simple Cartesian addition on two orthogonal cos⁡(ωct)\cos(\omega_c t) and −sin⁡(ωct)-\sin(\omega_c t) carriers.
  2. Modulation Order (Rb=Rslog⁡2MR_b = R_s \log_2 M): Stepping from BPSK (1 bit/symbol1\text{ bit/symbol}) to QPSK (2 bits/symbol2\text{ bits/symbol}) to 16/64/256-QAM (4–8 bits/symbol4\text{–}8\text{ bits/symbol}) increases the raw modulation bit rate inside the same nominal symbol rate and nominal null-to-null RF bandwidth BRF=(1+α)RsB_{\text{RF}} = (1 + \alpha)R_s, trading smaller symbol separation (dmin⁡d_{\min}) for higher spectral efficiency.
  3. Practical Transceiver Engineering: Gray coding minimizes bit errors across decision boundaries; Root-Raised-Cosine (RRC) pulse shaping confines the transmitted spectrum, while the matched TX/RX RRC pair produces a Raised-Cosine response satisfying the zero-ISI criterion at the symbol decision instants; Offset-QPSK (OQPSK) prevents 180∘180^\circ origin crossings; and Costas Loops + Pilot Preambles recover the suppressed carrier phase at the receiver.

Coming Up Next in This Series

  • Next Article — Multipath Channels & Receiver Equalization: In this guide, our TX and RX Root-Raised-Cosine filters achieved zero inter-symbol interference (HRRC2(f)=HRC(f)H_{\text{RRC}}^2(f) = H_{\text{RC}}(f)) over an ideal line-of-sight AWGN channel. Next, we explore what happens when real-world RF waves bounce off buildings, terrain, and indoor walls—creating multipath echoes, delay spread, and frequency-selective fading that smear symbols together—and how digital receivers undo that channel distortion using Adaptive Time-Domain Equalizers (FFE, DFE, LMS, and Blind CMA) and Frequency-Domain Equalization (FDE).
  • Following After Equalization — Orthogonal Frequency-Division Multiplexing (OFDM): Once we see why equalizing a single wideband carrier becomes computationally expensive across severe multipath channels, we will show how OFDM uses the Fast Fourier Transform (FFT) and a Cyclic Prefix to split one wide channel into hundreds of parallel, narrowband QPSK and QAM subcarriers—forming the physical-layer backbone of Wi-Fi, 4G LTE, DVB-T2, and 5G NR!

For readers looking to dive deeper into digital communications, complex baseband signal processing, and synchronization algorithms, the following references are highly recommended:

  1. Lyons, Richard G. — Understanding Digital Signal Processing, 3rd ed., Prentice Hall / Pearson, 2010.
    A masterclass in intuitive DSP exposition—especially essential for understanding quadrature signals, complex downconversion, FIR filter design, and Hilbert transforms.

  2. Johnson, C. Richard, Jr., William A. Sethares, and Andrew G. Klein — Software Receiver Design: Build Your Own Digital Communication System in Five Easy Steps, Cambridge University Press, 2011.
    An exceptional, hands-on guide that builds a complete SDR receiver from first principles, providing concrete insight into Costas loops, decision-directed phase tracking, and timing synchronization.

  3. Schwarzinger, Andreas — Digital Signal Processing in Modern Communication Systems, 2nd ed., CreateSpace / Andreas Schwarzinger, 2017.
    A practical, engineering-centric textbook bridging the gap between mathematical communications theory and real-world FPGA/DSP hardware implementations, with excellent coverage of pulse shaping, matched filtering, and carrier phase synchronization.

Discussion & Comments

Leave a question, feedback, or technical insight using your GitHub account.

GitHub Discussions