"The critical first step in analyzing a digital signal is understanding the analog signal it represents." — Understanding Digital Signal Processing, Richard Lyons (3rd ed., Ch 1)
Lecture (90 min)
1.1 The Carrier-Wave Picture at Intermediate Depth
WIR-101 Week 1 introduced the carrier wave as a thing that oscillates and can be modulated. RF-201 starts from the same picture and pushes it to the depth that Wyglinski builds the IQ chain from.
A sinusoidal carrier is fully described by three parameters:
s(t) = A(t) · cos(2πf_c·t + φ(t))
- A(t): instantaneous amplitude (can vary with time)
- f_c: carrier frequency (fixed; the frequency you tune to)
- φ(t): instantaneous phase (can vary with time)
Every modulation scheme encodes information by varying A(t), f_c (via φ's derivative), or φ(t) directly. That's it. The seven modulation families are seven different choices in that design space.
Why this framing matters: When you look at a signal in URH or Inspectrum and see a pattern, you are seeing the consequence of a specific choice about what to vary. Your demodulation strategy is the inverse of the modulator's choice. Get the choice right, and the data falls out.
1.2 Amplitude Modulation: AM and ASK
Analog AM: The audio signal m(t) scales the carrier amplitude.
s_AM(t) = [1 + k_a · m(t)] · cos(2πf_c·t)
where k_a is the modulation index (typically 0 < k_a ≤ 1 for conventional AM). The envelope detector is the classic demodulator: a diode rectifier + RC low-pass filter. You can build one on a breadboard in 5 minutes. That's not an accident — the whole WWII radio ecosystem was built around detectors that could be built with minimal components.
ASK (Amplitude Shift Keying): The digital variant. On-Off Keying (OOK) is the simplest: 1 = carrier on, 0 = carrier off.
s_OOK(t) = b[n] · cos(2πf_c·t) where b[n] ∈ {0, 1}
You have seen OOK in WIR-101: sub-GHz remote controls (garage door openers, tire pressure monitors) almost universally use OOK or ASK. The reason: the receiver can be built with a diode envelope detector. No phase lock loop. No frequency synthesiser. This is the cheapest demodulator on earth, which is why it has been winning in low-cost IoT devices for decades.
Bandwidth cost of AM: AM's sidebands sit ± f_message around the carrier. A 1 kHz audio signal produces sidebands at f_c ± 1 kHz, consuming 2 kHz of bandwidth. For voice, that's acceptable. For high-rate digital, it's inefficient — which is why modern high-data-rate systems use phase and amplitude together (QAM).
Noise robustness: Poor. Amplitude is the most vulnerable parameter to additive white Gaussian noise (AWGN) and multipath fading. Amplitude varies with distance, reflections, and interference in ways phase does not. The noise performance disadvantage of AM is the primary reason most digital systems moved to PSK and QAM.
1.3 Frequency Modulation: FM and FSK
Analog FM: The instantaneous frequency of the carrier varies with the message signal.
s_FM(t) = A · cos(2πf_c·t + 2π·k_f · ∫m(τ)dτ)
where k_f is the frequency sensitivity (Hz/V). The FM-broadcast signal you listen to on 88-108 MHz uses wide-deviation FM (±75 kHz deviation for 15 kHz audio), consuming about 200 kHz of channel bandwidth.
Why FM sounds better than AM (noise immunity): Amplitude noise affects AM directly. FM encodes information in the instantaneous frequency, not the amplitude. A discriminator (phase-locked loop or limiter + differentiator) can extract frequency changes while the limiter stage strips amplitude variations. The price is bandwidth: FM trades bandwidth for noise immunity, a fundamental tradeoff that Shannon's channel capacity theorem illuminates.
FSK (Frequency Shift Keying): The digital FM variant. Binary FSK uses two frequencies: f_1 for bit 1, f_0 for bit 0.
s_FSK(t) = A · cos(2π·f_i·t + φ_i) where f_i ∈ {f_1, f_0}
Bluetooth uses GFSK (Gaussian-filtered FSK): the symbol transitions are smoothed through a Gaussian filter before frequency modulation, reducing spectral splatter and improving co-channel interference. You captured Bluetooth with the RTL-SDR in WIR-101 without knowing this detail. Now you do.
LoRa's chirp: LoRa uses chirp spread spectrum, which is FM with a linearly increasing (or decreasing) instantaneous frequency across the symbol duration. We will open this in Chapter 5. For now: LoRa is an FM variant. You can demodulate the chirp as a swept-frequency FM signal.
1.4 Phase Modulation: PM and PSK
Analog PM: The instantaneous phase varies with the message signal.
s_PM(t) = A · cos(2πf_c·t + k_p · m(t))
PM and FM are closely related: FM varies instantaneous frequency (derivative of phase), PM varies phase directly. You can implement one from the other with an integrator or differentiator at the input, which is why commercial FM broadcast is actually PM-of-integrated-audio in many transmitter designs.
PSK (Phase Shift Keying): The digital PM variant. The carrier amplitude stays constant; the phase encodes the symbol.
BPSK (Binary PSK): Two phase states, 0° and 180°. Each symbol carries 1 bit.
s_BPSK(t) = b[n] · A · cos(2πf_c·t) where b[n] ∈ {+1, -1}
Graphically: two points on the real axis of the IQ constellation at +A and -A.
QPSK (Quadrature PSK): Four phase states: 0°, 90°, 180°, 270°. Each symbol carries 2 bits. Bandwidth efficiency doubles versus BPSK for the same symbol rate.
Phase states: {0° = 00, 90° = 01, 180° = 11, 270° = 10}
Wi-Fi uses BPSK at low MCS (MCS 0), and QPSK at MCS 1. At MCS 7, 802.11n uses 64-QAM (6 bits/symbol). 802.11ax at MCS 11 uses 1024-QAM (10 bits/symbol). Each step up the QAM ladder demands higher SNR because the constellation points are closer together.
Why PSK resists noise better than ASK: The phase discriminator can be designed to reject amplitude variations entirely (constant-envelope BPSK). The demodulator compares phase, not amplitude. AWGN in the noise-floor sense affects phase more gracefully than amplitude. The cost: coherent demodulation requires a phase-locked loop that tracks the carrier — significantly more complex receiver.
1.5 The Modulation-Choice Design Table
| Scheme | Vary | Digital variant | Bandwidth | Noise immunity | Receiver complexity | Primary deployment |
|---|---|---|---|---|---|---|
| AM | Amplitude | ASK / OOK | Low | Low | Very low | Sub-GHz remotes; RFID; AM broadcast |
| FM | Frequency | FSK / GFSK | Medium-high | Medium-high | Medium | Bluetooth; FM broadcast; paging |
| PM | Phase | BPSK / QPSK | Medium | High | High | Wi-Fi; GPS; satellite comms |
| — | Phase + Amp | QAM (16/64/256/1024) | Low | Decreases with order | High | Wi-Fi high MCS; cable/DSL; 5G NR |
This table summarises the central tension in modulation design: noise immunity vs. bandwidth efficiency vs. receiver complexity. Every modulation choice in every protocol you will encounter is a specific point in that three-way design space.
1.6 Wyglinski's IQ Mixer — Why SDRs Output Complex Samples
Wyglinski Chapter 6 (IQ Sampling) is required reading alongside this lecture. The key argument, restated:
A real-valued bandpass signal centred at f_c with bandwidth B contains exactly the same information as a complex-valued (IQ) baseband signal sampled at rate B (not 2B). This is not a trick. It is the consequence of the Hilbert transform relationship between the in-phase and quadrature components of any narrowband analytic signal.
SDR hardware implements the IQ mixer in hardware: two mixers (one multiplied by cos(2πf_c·t), one by -sin(2πf_c·t)) followed by low-pass filters produce the I and Q baseband samples. The ANTSDR E200's AD9361 chip does this in silicon; the IQ samples it delivers via Ethernet are the raw output of that mixer.
When you load a .iq file in Python with np.fromfile(..., dtype=np.complex64), each sample is I + jQ. The magnitude is the instantaneous amplitude. The angle (arctan2(Q, I)) is the instantaneous phase. The derivative of the angle is the instantaneous frequency.
This is the key. Every demodulator you build will read one or more of {magnitude, angle, d(angle)/dt} from the complex sample stream.
Lab Preview
Lab 1 begins in Week 1 and extends through Week 2. Week 1 task: build the GNU Radio flowgraph for AM/OOK and FM/GFSK signals (using Signal Source + Throttle in software-only mode). Observe the time domain, frequency domain, and constellation for each. No hardware required Week 1.
Homework
Reading (1.5 hr):
- Lyons Ch 6, §6.1-6.2 (moving average filters + symmetry properties) — frame this as filter design for demodulation, not audio
- Wyglinski Ch 6, §6.1-6.3 (IQ representation; quadrature mixer; baseband equivalent signal)
- PySDR Ch 1 review (IQ Samples) — treat as a complement to the Wyglinski math
Hands-on (1.5 hr): Build these two GNU Radio flowgraphs and capture screenshots of the QT GUI Frequency Sink and QT GUI Constellation Sink for each:
- AM/OOK:
Signal Source (square, 1 kHz, amplitude 0.5)→Multiply←Signal Source (sine, carrier)→Frequency Sink - GFSK:
GFSK Mod(samples/symbol=4, bt=0.3) →Frequency Sink+Waterfall Sink
Write a 1-paragraph observation log for each: what does the spectrum tell you about the modulation?
Toolchain Diary Entry
Deepened this week: GNU Radio flowgraph construction; QT GUI sinks
First-introduce this week: QT GUI Constellation Sink
QT GUI Constellation Sink: displays the IQ constellation — the scatter plot of I vs. Q samples. BPSK shows two clusters on the real axis. QPSK shows four clusters at 45° offsets. QAM shows a rectangular grid. If your demodulator is working correctly, the constellation is clean. If it is noisy, the clusters are spread and you are losing bits. The constellation is the primary signal-quality diagnostic for phase-modulated signals.
Key Terms
- IQ (in-phase / quadrature): the complex baseband representation; I is the real part, Q is the imaginary part; every SDR outputs IQ samples
- Constellation: scatter plot of I vs. Q samples; each modulation scheme has a characteristic constellation shape
- Instantaneous frequency: d(phase)/dt; the derivative of the phase of the analytic signal; FM demodulation extracts this
- Envelope detection: recover the amplitude of a modulated signal; the classic AM demodulator
- Coherent detection: demodulation that requires knowledge of the carrier phase (PSK/QAM); more complex but more noise-resistant than envelope detection
- Modulation index (k_a, k_f, k_p): the depth of modulation; too low = poor SNR, too high = distortion or out-of-band emissions