Classroom Glossary Public page

RF-201 Week 8 — SDR Fundamentals Deep-Dive: IQ Sampling, Nyquist, and Dynamic Range

1,305 words

"Wyglinski and colleagues argue in Chapter 6 that the in-phase / quadrature representation isn't a clever optimisation. It's a structural consequence of how a real band-limited signal's spectrum is reconstructable when you sample at the Nyquist rate of its bandwidth (not its highest frequency)." — VCA-RF-201 public page anchor-weave excerpt


Lecture (2 hr)

This week is the mathematical core of the course. Weeks 1-7 built physical intuition about modulation and protocols. Weeks 8-9 build the engineering substrate they run on. Read Wyglinski Ch 6 before this lecture.

8.1 The Real-Valued Bandpass Signal

A transmitted RF signal is real-valued and bandpass: it occupies a band around a carrier frequency f_c. The full spectrum of a real signal has Hermitian symmetry (negative frequencies are the complex conjugate of positive frequencies) — which means the negative-frequency half carries no independent information. We are wasting half our samples.

The IQ representation eliminates this waste.

Mathematical derivation:

Any real bandpass signal s(t) with bandwidth B centred at f_c can be written as:

s(t) = I(t)·cos(2πf_c·t) - Q(t)·sin(2πf_c·t)

where I(t) and Q(t) are real-valued lowpass signals (the baseband equivalents) each with bandwidth B/2. Together they form the complex baseband signal:

z(t) = I(t) + jQ(t)          (complex envelope)

The original bandpass signal is the real part of z(t)·e^(j2πf_c·t). The complex envelope z(t) carries all the information in s(t). It has bandwidth B (not 2B), and it lives at baseband (centred at 0 Hz).

Sampling z(t): z(t) needs to be sampled at rate f_s ≥ B (Nyquist for complex signals). Compare to sampling s(t) directly: f_s ≥ 2(f_c + B/2) — which at f_c = 2.4 GHz and B = 20 MHz requires > 4.84 Gsps, a very expensive ADC. The IQ representation brings this down to 20 MSPS — the ANTSDR E200's sample rate.

8.2 The IQ Mixer in Hardware

How does the ANTSDR E200's AD9361 produce z(t) from the antenna?

Antenna → BPF → Mixer-I × cos(2πf_c·t) → LPF → ADC → I samples
                                                          ↓ complex
Antenna → BPF → Mixer-Q × -sin(2πf_c·t) → LPF → ADC → Q samples

The two mixers (in-phase and quadrature branches) down-convert the bandpass signal to baseband. The LPFs reject out-of-band content. The two ADCs sample simultaneously at the IQ sample rate f_s.

Non-ideal IQ balance: In practice, the two mixer branches are not perfectly matched. IQ imbalance (amplitude mismatch δA, phase mismatch δφ) creates an image of the desired signal at -f_signal frequency (in the complex baseband view), which manifests as a ghost signal at the mirror frequency. High-quality ADCs like the AD9361 have on-chip IQ imbalance correction; cheaper designs (early RTL-SDRs) have visible IQ imbalance that creates a DC-centred image artefact.

DC offset: The down-conversion mixer leaks a small amount of the local oscillator into the baseband. This appears as a DC offset in I and Q, which shows up as a spike at the centre of the spectrum display. Most SDR displays show this artefact. The ANTSDR E200 has hardware DC offset correction; tune ±1-2 MHz from the target to avoid it when precision matters.

8.3 Sampling Rate, Bandwidth, and Aliasing

The Nyquist-Shannon sampling theorem for complex signals:

A complex signal of bandwidth B is uniquely represented by IQ samples taken at any rate f_s ≥ B.

Observable bandwidth = f_s (for complex IQ sampling).

Aliasing in IQ: If a signal at frequency f (relative to centre) is within the range [-f_s/2, +f_s/2], it is captured correctly. Signals outside this range alias: they fold into the observable window at a mirrored frequency. The anti-aliasing LPF in the ADC chain removes out-of-band signals before sampling.

The ANTSDR E200 sample rate options:

f_s Observable bandwidth Typical use
2 MSPS 2 MHz Narrowband protocols (LoRa, GFSK sensors, 433 MHz OOK)
5 MSPS 5 MHz BLE, ZigBee channels
10 MSPS 10 MHz 802.11b/g/n 20 MHz channels (with some filtering headroom)
20 MSPS 20 MHz 802.11n/ac full 20 MHz channel
61.44 MSPS 61.44 MHz Wideband survey; observe multiple channels simultaneously

Exercise (Lab 7): You will capture the same 433 MHz OOK signal at 2/8/20 MSPS and observe:

  1. How spectral resolution changes (more samples per symbol = sharper FFT bins)
  2. How neighbouring signals appear at higher sample rates (you see more of the band)
  3. How the noise floor changes (wider bandwidth = more noise power)

8.4 Dynamic Range: ADC Bits, Noise, and SNR

Dynamic range is the ratio between the largest signal the ADC can represent and the smallest signal it can distinguish from noise.

Theoretical ADC dynamic range: For an ideal N-bit ADC:

SNDR (dB) ≈ 6.02N + 1.76  (SQNR from quantisation noise)

RTL-SDR: 8-bit ADC → SQNR ≈ 50 dB
ANTSDR E200 (AD9361): 12-bit ADC → SQNR ≈ 74 dB
USRP N310 (AD9371): 14-bit ADC → SQNR ≈ 86 dB

Why more bits matter for protocol RE: Weak signals (low-power IoT sensors, signals at range) may be 40-50 dB below the strongest signal in the band. An 8-bit ADC at 50 dB SQNR has almost no headroom for a weak signal when a strong one is present (the strong signal dominates the ADC range). A 12-bit ADC's extra 24 dB of headroom makes the difference between capturing and missing the weak signal.

Noise figure: The receiver adds noise. The noise figure (NF) quantifies how much noise the receiver adds above thermal noise (kTB):

Thermal noise floor (1 Hz BW): -174 dBm/Hz
Thermal noise floor (2 MHz BW, 63 dB higher): -174 + 63 = -111 dBm
With NF=6 dB: -111 + 6 = -105 dBm minimum receivable signal

The ANTSDR E200's AD9361 NF is approximately 5-7 dB. A typical indoor 433 MHz OOK sensor transmitting +10 dBm at 10 metres produces about -50 dBm at the receiver — well above this floor.

Gain control: Both automatic (AGC) and manual gain control affect dynamic range. High gain amplifies weak signals but clips strong ones. Low gain preserves dynamic range but misses weak signals. AGC is fine for general scanning; manual gain is essential for precise measurement.

8.5 SFDR, Harmonics, and Spurious Products

SFDR (Spurious-Free Dynamic Range): The ratio between the fundamental signal and the strongest spurious product. Spurious products come from:

  • Harmonics: nonlinearity in the amplifier chain produces signals at 2f, 3f, etc.
  • Intermodulation (IMD): two strong signals at f_1 and f_2 create products at 2f_1-f_2 and 2f_2-f_1

SFDR matters for protocol RE when a strong nearby signal (e.g., a Wi-Fi AP at 2.4 GHz) produces an intermodulation product that falls on your target frequency (e.g., a 915 MHz sub-GHz signal). The product is an artefact — it looks like a real signal but isn't.

How to identify spurious products: Move the centre frequency slightly. Real signals move with the band. Spurious products from the ADC chain move in a predictable way relative to the offset.


Homework

Reading (2 hr):

  • Wyglinski Ch 6, §6.1-6.6 full (IQ sampling; quadrature mixer; ADC; dynamic range; quantisation noise)
  • Lyons Ch 2 (Sampling and Discrete Fourier Transform) — review from WIR-101 context at full depth
  • PySDR Ch 11 (Practical SDR) — the practitioner chapter for these concepts

Hands-on (2 hr): Lab 7 first session. Set up the ANTSDR E200 and capture a 433.92 MHz signal (or use the lab7-2msps.iq virtual-path file). Perform the three-sample-rate comparison:

import numpy as np
import matplotlib.pyplot as plt

def plot_spectrum(filename, fs, label):
    samples = np.fromfile(filename, dtype=np.complex64)
    N = 4096
    spectrum = np.abs(np.fft.fftshift(np.fft.fft(samples[:N], N)))**2
    freqs = np.fft.fftshift(np.fft.fftfreq(N, 1/fs))
    spectrum_db = 10*np.log10(spectrum + 1e-10)
    plt.plot(freqs/1e3, spectrum_db, label=label, alpha=0.7)

plt.figure(figsize=(12, 6))
plot_spectrum("lab7-2msps.iq",  2e6, "2 MSPS")
plot_spectrum("lab7-8msps.iq",  8e6, "8 MSPS")
plot_spectrum("lab7-20msps.iq", 20e6, "20 MSPS")
plt.xlabel("Frequency offset (kHz)"); plt.ylabel("Power (dB)")
plt.title("433.92 MHz OOK signal at 3 sample rates"); plt.legend(); plt.grid(True)
plt.show()

Write a 1-paragraph analysis: what changes with sample rate, and which rate would you choose for this protocol and why?


Key Terms

  • Complex baseband signal z(t) = I(t) + jQ(t): the IQ representation; all information in the bandpass signal encoded in a bandwidth-B complex signal
  • Observable bandwidth: equals the IQ sample rate f_s for complex sampling; equals f_s/2 for real sampling
  • IQ imbalance: amplitude or phase mismatch between I and Q mixer branches; creates image artefact in spectrum
  • DC offset: LO leakage into ADC; appears as a spike at centre of spectrum display; most SDRs have correction circuitry
  • Dynamic range: ratio between largest representable and smallest distinguishable signal; limited by ADC bit depth + noise figure
  • SQNR (Signal-to-Quantisation-Noise Ratio): ≈ 6.02N + 1.76 dB for an N-bit ideal ADC
  • Noise figure (NF): how much noise the receiver chain adds above thermal noise; lower is better
  • SFDR (Spurious-Free Dynamic Range): ratio between fundamental and strongest spurious product; critical for RE in crowded bands