SOFTWARE DEFINED RADIO SDR MASTERY
In the past, building a radio required specialized hardware for every function: oscillators, mixers, filters, and amplifiers were all physical components soldered to a board. If you wanted to switch from FM to AM, you needed a different circuit.
Learn Software Defined Radio (SDR): From Zero to Signal Master
Goal: Deeply understand the fusion of radio hardware and digital signal processing. You will move from treating radio as âblack box magicâ to understanding how raw electromagnetic waves are digitized into IQ samples, processed with mathematics, and transformed into audio, data, and visual information. By building your own demodulators from first principles, youâll master the art of âseeingâ the invisible spectrum.
Why Software Defined Radio Matters
In the past, building a radio required specialized hardware for every function: oscillators, mixers, filters, and amplifiers were all physical components soldered to a board. If you wanted to switch from FM to AM, you needed a different circuit.
Software Defined Radio changed the game. By using a high-speed Analog-to-Digital Converter (ADC) close to the antenna, we can bring the raw radio signal into the digital domain. Suddenly, the hardware becomes a general-purpose âeyeâ for the spectrum, and the âradioâ itself is just code.
The Real-World Impact
- Global Transparency: ADS-B allows anyone to track almost every aircraft in the sky in real-time.
- Satellite Communication: DIY enthusiasts download weather photos directly from NOAA satellites using $20 USB sticks.
- Security Research: SDR is the primary tool for auditing car key fobs, IoT devices, and cellular networks.
- Spectrum Governance: Identifying interference and managing the increasingly crowded invisible airwaves.
Core Concept Analysis
1. The SDR Hardware Chain
Before the signal reaches your code, it travels through several stages of hardware. Understanding these stages is critical for knowing why your digital data looks the way it does.
Antenna RF Front-end Digital Processing
| (Tuner & Downconverter) (Your Code)
âź âź âź
[Wave] ----> [LNA] ----> [Mixer] ----> [ADC] ----> [USB/Ethernet]
^ ^ ^ ^
Electromag. Low Noise Frequency Sampling
Radiation Amplifier Shift (IQ)
2. The âSecret Sauceâ: IQ Sampling
Most people think of digital audio as a single stream of numbers representing amplitude over time. SDR is different. It uses Complex Sampling, providing two values for every moment: I (In-phase) and Q (Quadrature).
Why IQ? An IQ sample is a vector. It doesnât just tell you the âheightâ of the wave; it tells you the Magnitude (how strong the signal is) and the Phase (where in the cycle the wave is) simultaneously.
Phase (θ)
|
Q Axis| * (I, Q) Sample
| /|
| / |
| / | Magnitude (A)
| / |
|/____|_______ I Axis
0 I
- Magnitude =
sqrt(I² + Q²) - Phase =
atan2(Q, I)
3. Time Domain vs. Frequency Domain
To master SDR, you must learn to think in two worlds simultaneously.
- Time Domain: A wave moving up and down (what you see on an oscilloscope).
- Frequency Domain: A âmapâ of which frequencies are present (what you see on a Spectrum Analyzer/Waterfall).
The Fast Fourier Transform (FFT) is the bridge between these two worlds.
Time Domain (Waveform) FFT Frequency Domain (Spectrum)
| |
Amplitude Power
| /\ /\ | |
| / \ / \ -----> | |
|____/____\__/____\____ |_________|_________
Time Frequency
4. Sampling Theory & Nyquist
If you want to capture a signal that is 10MHz wide, you must sample at at least 20MHz. If you sample too slowly, you get Aliasingâghost signals appearing where they donât belong. In SDR, because we use IQ sampling, our effective bandwidth is equal to our sample rate (not half!).
Concept Summary Table
| Concept Cluster | What You Need to Internalize |
|---|---|
| IQ Data | Every sample is a coordinate in a complex plane. It captures magnitude and phase. |
| Heterodyning | Shifting a high-frequency signal down to a lower âBasebandâ frequency so we can digitize it. |
| Digital Filtering | Using math (FIR/IIR) to âcutâ out unwanted noise and isolate the signal you want. |
| Demodulation | The process of extracting information (audio/data) from the changes in the waveâs properties. |
| FFT | The tool that reveals what frequencies are hiding inside a âmessyâ time-domain signal. |
Deep Dive Reading by Concept
Foundational Signal Processing
| Concept | Book & Chapter |
|---|---|
| The Nature of DSP | The Scientist & Engineerâs Guide to DSP by Steven W. Smith â Ch. 1: âThe Breadth and Depth of DSPâ |
| Sampling & Aliasing | Understanding Digital Signal Processing by Richard Lyons â Ch. 2: âPeriodic Samplingâ |
| The DFT/FFT | The Scientist & Engineerâs Guide to DSP by Steven W. Smith â Ch. 8: âThe Discrete Fourier Transformâ |
SDR Specifics
| Concept | Book & Chapter |
|---|---|
| IQ Fundamentals | Practical SDR by David & Paul Clark â Ch. 2: âIQ Samplingâ |
| Mixing & Downconversion | Software-Defined Radio for Engineers by Travis Collins â Ch. 3: âCommunication Systems Foundationsâ |
| Modulation Types | Understanding Digital Signal Processing by Richard Lyons â Ch. 10: âDigital Modulatorsâ |
Essential Reading Order
- The Intuition Phase (Week 1):
- Steven W. Smith Ch. 1-3 (Fundamentals)
- Practical SDR Ch. 1-2 (SDR Setup)
- The Tools Phase (Week 2):
- Steven W. Smith Ch. 8 (FFT)
- Richard Lyons Ch. 5-6 (Filtering)
Project List
Project 1: The Spectrum Eye (IQ Visualizer)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: Python
- Alternative Programming Languages: C (with Raylib), Rust (with Plotters)
- Coolness Level: Level 3: Genuinely Clever
- Business Potential: 1. The âResume Goldâ
- Difficulty: Level 1: Beginner
- Knowledge Area: Signal Visualization / FFT
- Software or Tool: RTL-SDR, HackRF, or pre-recorded IQ files
- Main Book: âThe Scientist & Engineerâs Guide to Digital Signal Processingâ by Steven W. Smith
What youâll build: A tool that reads raw IQ data (either from a file or live hardware) and generates a âWaterfall Plotââa scrolling visual representation of the radio spectrum over time.
Why it teaches SDR: You cannot process what you cannot see. This project forces you to handle raw binary data, understand the interleaved I and Q format, and apply the FFT to transform time-domain samples into a frequency-domain map.
Core challenges youâll face:
- Parsing Interleaved Bytes â maps to understanding how SDRs output [I, Q, I, QâŚ]
- Windowing Functions (Hamming/Hann) â maps to reducing FFT âleakageâ
- Logarithmic Scaling (dB) â maps to matching how human ears and electronics perceive power
- Real-time Rendering â maps to managing data throughput vs. UI updates
Key Concepts:
- IQ Interleaving: âPractical SDRâ Ch. 2 - David Clark
- FFT Integration: âThe Scientist & Engineerâs Guide to DSPâ Ch. 8 - Steven W. Smith
- The Decibel (dB): âUnderstanding Digital Signal Processingâ Ch. 1 - Richard Lyons
Difficulty: Beginner
Time estimate: Weekend
Prerequisites: Basic Python, ability to install numpy and matplotlib.
Real World Outcome
Youâll have a program that looks like a simplified version of GQRX or SDR#. You can point it at a data file and see âmountainsâ of energy where radio stations exist.
Example Output:
$ python waterfall_viewer.py --file captures/fm_band.iq --fs 2.048M
[INFO] Reading 2.048 MHz of spectrum...
[INFO] Peak found at +450 kHz (Rel. to center)
# A GUI window opens showing a scrolling waterfall of colors.
# Bright yellow/white lines represent active radio signals.
The Core Question Youâre Answering
âHow do we turn a stream of numbers into a visual map of the airwaves?â
Before you write any code, sit with this question. A radio signal is just a voltage changing over time. How does a single line of data contain hundreds of different radio stations at once? The answer is hidden in the FFT.
Concepts You Must Understand First
Stop and research these before coding:
- The FFT (Fast Fourier Transform)
- What is the difference between a âBinâ and a âFrequencyâ?
- Why do we need a complex FFT for IQ data?
- Book Reference: âThe Scientist & Engineerâs Guide to DSPâ Ch. 8
- IQ Data Formats (8-bit vs 16-bit)
- Why does an RTL-SDR give you
uint8(0-255) while a HackRF givesint8(-128 to 127)? - How do you convert these raw bytes into floating point numbers between -1.0 and 1.0?
- Book Reference: âPractical SDRâ Ch. 2
- Why does an RTL-SDR give you
Questions to Guide Your Design
Before implementing, think through these:
- Data Handling
- How many samples do you need for a single âlineâ of the waterfall? (e.g., 1024 or 2048)
- What happens if the file is 1GB? How will you read it without crashing your RAM?
- Visualization
- How do you map the FFT output (which can be huge numbers) to a color scale (0-255 for RGB)?
- Why do we usually put the âCenter Frequencyâ in the middle of the plot?
Thinking Exercise
The FFT Bin Trace
Imagine you have a sample rate of 1000Hz and you perform a 10-bin FFT.
Questions while tracing:
- What frequency range does each âbinâ represent?
- If a 250Hz signal is present, which bin will show the most energy?
- What happens if a signal is exactly halfway between two bins?
The Interview Questions Theyâll Ask
- âWhat is the purpose of a Windowing function (like Hamming) before an FFT?â
- âHow does the sample rate relate to the maximum bandwidth you can visualize?â
- âExplain why IQ data allows us to distinguish between positive and negative frequencies relative to the center.â
- âWhat is the computational complexity of an FFT compared to a DFT?â
- âIf you see a signal at the very edge of your waterfall that looks âmirroredâ on the other side, what is likely happening?â
Hints in Layers
Hint 1: Loading Data
Use numpy.fromfile. If itâs an RTL-SDR file, itâs uint8. You need to subtract 127.5 to center it around zero, then combine the I and Q into a complex number: samples = (data_i + 1j*data_q).
Hint 2: The FFT
Use numpy.fft.fft. But remember, the standard FFT output puts the 0Hz (DC) component at the start. You need numpy.fft.fftshift to move the center frequency to the middle of your array for a natural âradioâ view.
Hint 3: Power to dB
The result of an FFT is complex. To get power, take the magnitude squared: abs(fft_result)**2. To make it visible, convert to decibels: 10 * log10(power).
Hint 4: Moving Waterfall Use a rolling buffer or an image array. Every time you process an FFT, shift the image rows down by one and insert the new FFT as the top row.
Books That Will Help
| Topic | Book | Chapter |
|---|---|---|
| FFT Theory | âThe Scientist & Engineerâs Guide to DSPâ | Ch. 8 & 12 |
| Practical IQ | âPractical SDRâ | Ch. 2 |
| Visualizing Data | âUnderstanding DSPâ | Ch. 13 |
Project 2: The âEnvelopeâ (AM Demodulator)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: Python
- Alternative Programming Languages: C (using
libsndfile), Rust (usingcpal) - Coolness Level: Level 2: Practical but Forgettable
- Business Potential: 1. The âResume Goldâ
- Difficulty: Level 2: Intermediate
- Knowledge Area: Amplitude Demodulation / Filtering
- Software or Tool: Recorded AM radio capture (.iq file)
- Main Book: âUnderstanding Digital Signal Processingâ by Richard Lyons
What youâll build: A software receiver that takes an IQ recording of an AM radio station and extracts the audio. You will implement a Low-Pass Filter and an Envelope Detector.
Why it teaches SDR: AM is the simplest form of modulation. It teaches you the core âSDR Workflowâ: Downconvert -> Filter -> Decimate -> Demodulate. Mastering this logic is the foundation for everything else.
Core challenges youâll face:
- DC Offset Removal â maps to preventing the âwhineâ in your audio
- Designing a Low-Pass Filter (LPF) â maps to removing the high-frequency carrier wave
- Decimation â maps to converting a 2MHz radio sample rate to a 44.1kHz audio sample rate
- Audio Scaling â maps to preventing digital clipping in your speakers
Key Concepts:
- Envelope Detection: âUnderstanding DSPâ Ch. 10.2 - Richard Lyons
- FIR Filter Design: âThe Scientist & Engineerâs Guide to DSPâ Ch. 14 - Steven W. Smith
- Resampling/Decimation: âUnderstanding DSPâ Ch. 10.1
Difficulty: Intermediate Time estimate: 1 week Prerequisites: Project 1 completed, basic understanding of trigonometry.
Real World Outcome
You will play a .iq file and hear clear music or voices coming through your computer speakers.
Example Usage:
$ python am_receiver.py --input am_station_740khz.iq --output result.wav
[INFO] Decimating from 2048ksps to 48ksps...
[INFO] Applying 5kHz Low-Pass Filter...
[INFO] Audio extracted! Playing result...
The Core Question Youâre Answering
âIf audio is hidden in the amplitude of a 700kHz wave, how do we âpeelâ the carrier away to leave only the sound?â
AM works by changing the strength of a signal. In the IQ plane, this means the vector grows and shrinks. To demodulate, you just need to measure the length of that vector over time.
Concepts You Must Understand First
- Carrier vs. Baseband
- What is a âCarrier Waveâ?
- Why do we move the signal to 0Hz (Baseband) before filtering?
- Book Reference: âPractical SDRâ Ch. 4
- The Nyquist-Shannon Sampling Theorem (revisited)
- Why canât we just play a 2MHz file into a 48kHz soundcard?
- What is an âAnti-aliasing filterâ and why is it mandatory before downsampling?
- Book Reference: âUnderstanding DSPâ Ch. 2
Questions to Guide Your Design
- Filtering
- AM audio usually only goes up to 5kHz. What should the cutoff frequency of your filter be?
- Will you use an FIR filter or an IIR filter? (Hint: FIR is easier to keep stable).
- The âPeelâ (Envelope)
- If a sample is
I + jQ, how do you calculate the âEnvelopeâ? (Think Pythagorean theorem). - After you get the magnitude, it will all be positive numbers (0 to 1). Audio needs to be centered at 0 (-0.5 to 0.5). How do you remove the âDC Biasâ?
- If a sample is
Thinking Exercise
The Vector Length Trace
Look at three sequential IQ samples:
(0.5, 0.0)(0.8, 0.0)(0.4, 0.0)
Questions:
- What is the magnitude of each?
- If these are the âpeaksâ of a carrier wave, what is the shape of the audio wave they are forming?
- What happens if the phase changes but the magnitude stays the same? Does AM care?
The Interview Questions Theyâll Ask
- âWhy is decimation necessary when moving from RF to Audio?â
- âHow do you calculate the magnitude of a complex signal?â
- âWhat happens if your Low-Pass Filter is too wide? What will the user hear?â
- âExplain âAliasingâ in the context of downsampling.â
- âWhat is the mathematical relationship between a carrier and the sidebands in AM?â
Hints in Layers
Hint 1: Centering the Station If your recording contains multiple stations, you must first âShiftâ the one you want to 0Hz. You do this by multiplying your IQ samples by a complex exponential (a digital oscillator) at the negative of the target frequency.
Hint 2: Low-Pass Filter
Use scipy.signal.firwin to create filter coefficients. Then use scipy.signal.lfilter or numpy.convolve to apply them. This removes all the other radio stations.
Hint 3: Decimation After filtering, you have too much data. If your sample rate is 1MHz and you want 50kHz, just keep every 20th sample. This is safe ONLY because your filter already removed the high-frequency content!
Hint 4: Demodulation
The âEnvelopeâ is simply np.abs(complex_samples). Subtract the average value from the result to âcenterâ the audio around zero.
Books That Will Help
| Topic | Book | Chapter |
|---|---|---|
| AM Theory | âSoftware-Defined Radio for Engineersâ | Ch. 4 |
| Filter Design | âThe Scientist & Engineerâs Guide to DSPâ | Ch. 14-16 |
| Practical Receiver Logic | âPractical SDRâ | Ch. 5 |
Project 3: The âFreq-to-Voltsâ (FM Broadcast Receiver)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: Python
- Alternative Programming Languages: C (with FFTW), Rust (with SDR-Rust)
- Coolness Level: Level 4: Hardcore Tech Flex
- Business Potential: 1. The âResume Goldâ
- Difficulty: Level 3: Advanced
- Knowledge Area: Frequency Demodulation / Phase Math
- Software or Tool: RTL-SDR or FM recording
- Main Book: âUnderstanding Digital Signal Processingâ by Richard Lyons
What youâll build: A high-fidelity FM mono receiver. This requires understanding how frequency changes map to phase shifts in the IQ plane.
Why it teaches SDR: Unlike AM, where you just look at the signalâs âstrength,â FM requires you to look at how fast the signalâs âangleâ is changing. This introduces you to complex math derivatives and wide-band filtering.
Core challenges youâll face:
- Calculating Phase Differentiation â maps to converting frequency shifts to audio amplitude
- De-emphasis Filtering â maps to fixing the âtinnyâ sound of raw FM demodulation
- Quadrature Demodulation â maps to the
atan2approach vs. the conjugate product approach - Handling Wide Bandwidth â FM is 200kHz wide, much larger than AM.
Key Concepts:
- FM Demodulation Theory: âUnderstanding DSPâ Ch. 13 - Richard Lyons
- De-emphasis/Pre-emphasis: âSoftware-Defined Radio for Engineersâ Ch. 4.3
- Phase Differentiation: âPractical SDRâ Ch. 6
Difficulty: Advanced
Time estimate: 1-2 weeks
Prerequisites: Project 2 (AM Receiver) completed. Understanding of atan2.
Real World Outcome
You will hear high-quality broadcast radio. Because FM is more complex than AM, the audio quality will be significantly better, but the math is harder.
Example Output:
$ python fm_receiver.py --freq 101.1M --gain 40
[INFO] Centering 101.1 MHz...
[INFO] FM Demodulating (Phase Derivative method)...
[INFO] Applying 75us De-emphasis filter...
[SUCCESS] Playing: "101.1 The Beat - Smooth Jazz"
The Core Question Youâre Answering
âIf information is hidden in how fast a wave vibrates, how do we turn âspeedâ into âsoundâ?â
In FM, the frequency of the carrier changes. In your IQ data, this looks like the vector spinning around the center faster or slower. Demodulation is simply calculating the speed of that rotation.
Concepts You Must Understand First
- Phase Differentiation
- If you have two points on a circle, how do you find the angle between them?
- If the angle is growing, is the frequency increasing or decreasing?
- De-emphasis
- FM radio artificially boosts high frequencies at the transmitter (to fight noise). Your receiver MUST cut those high frequencies back down to make it sound natural.
- Book Reference: âUnderstanding DSPâ Ch. 13
Questions to Guide Your Design
- Math Approach
- Should you use
arctan2(Q, I)and then calculate the difference between samples? - Or should you use the âConjugate Productâ method:
angle(s[n] * conj(s[n-1]))? (One is much faster).
- Should you use
- The Discriminator
- The output of your FM math is âRadians per sampleâ. How do you scale this into a range like -1.0 to 1.0 for your audio card?
Thinking Exercise
The Spinning Vector
Imagine a vector (I, Q) spinning clockwise at 1 revolution per second.
Questions:
- If your sample rate is 10Hz, what is the angle change between each sample?
- If the vector suddenly starts spinning at 2 revolutions per second, what happened to the demodulated âaudioâ voltage?
- What happens if the vector stops spinning and stays at one angle?
The Interview Questions Theyâll Ask
- âWhat is the âCapture Effectâ in FM radio?â
- âWhy does FM sound better than AM in terms of signal-to-noise ratio?â
- âExplain the difference between Narrowband FM (NFM) and Wideband FM (WFM).â
- âHow do you implement a de-emphasis filter in software?â
- âWhat is the relationship between âDeviationâ and âVolumeâ in an FM signal?â
Hints in Layers
Hint 1: The Fast Way to Demodulate
Instead of calling atan2 on every sample (slow), multiply the current complex sample by the complex conjugate of the previous sample: diff = sample[n] * conj(sample[n-1]). The angle of the result (np.angle(diff)) is your frequency!
Hint 2: Bandwidth A broadcast FM signal needs about 200kHz of bandwidth. Make sure your first Low-Pass Filter is wide enough to catch the âswingâ of the frequency, otherwise the audio will sound distorted (clipped).
Hint 3: De-emphasis Filter This is a simple IIR filter. The time constant is usually 75us (USA) or 50us (Europe). You can approximate it with a first-order low-pass filter.
Hint 4: Mono vs. Stereo For now, ignore everything above 15kHz in the demodulated audio. Stereo information is hidden at 19kHz and 38kHz, which requires a much more complex âStereo Decoder.â Focus on Mono first!
Books That Will Help
| Topic | Book | Chapter |
|---|---|---|
| FM Demodulation | âUnderstanding DSPâ | Ch. 13 |
| Phase Math | âPractical SDRâ | Ch. 6 |
| Filter Implementation | âSoftware-Defined Radio for Engineersâ | Ch. 4 |
Project 4: The Aircraft Radar (ADS-B Decoder)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: Python
- Alternative Programming Languages: C (for performance), Go (for networking)
- Coolness Level: Level 5: Pure Magic (Super Cool)
- Business Potential: 1. The âResume Goldâ
- Difficulty: Level 4: Expert
- Knowledge Area: Digital Demodulation / Pulse Position Modulation (PPM)
- Software or Tool: 1090MHz IQ capture or RTL-SDR
- Main Book: âThe 1090 Megahertz Riddleâ by Junzi Sun
What youâll build: A tool that decodes Mode S ADS-B signals from airplanes. You will identify aircraft by their hex IDs, extract their altitude, speed, and GPS coordinates, and print them to the terminal.
Why it teaches SDR: ADS-B is a digital protocol. It uses Pulse Position Modulation (PPM) at 1090MHz. This project moves you away from âAudioâ and into âData.â You will learn how to detect a preamble (a specific bit pattern) in a noisy signal and how to handle error correction (CRC).
Core challenges youâll face:
- Preamble Detection â maps to synchronizing with a high-speed data burst
- PPM Decoding â maps to distinguishing between a â0â and a â1â based on pulse timing
- Parity/CRC Checking â maps to verifying data integrity in a noisy environment
- Bit Slicing â maps to converting continuous analog-like power levels into discrete digital bits
Key Concepts:
- Pulse Position Modulation: âThe 1090 Megahertz Riddleâ Ch. 2
- CRC Algorithms: âThe Scientist & Engineerâs Guide to DSPâ Ch. 15
- High-speed Sampling: RTL-SDR at 2MSPS (The absolute minimum for ADS-B)
Difficulty: Expert Time estimate: 2 weeks Prerequisites: Project 1 completed. Strong understanding of binary and bitwise operations.
Real World Outcome
You will see a real-time feed of planes flying over your house. You can verify the data by looking at FlightRadar24.
Example Output:
$ ./adsb_decoder --input live
[MSG] ICAO:A12B3C | Alt: 35,000ft | Squawk: 1200
[MSG] ICAO:C4D5E6 | Lat: 40.7128 | Lon: -74.0060 | Heading: 270 deg
[MSG] ICAO:A12B3C | Speed: 450kt | Vertical Rate: -500fpm
The Core Question Youâre Answering
âIn a 2MHz stream of noise, how do you find the 120-microsecond burst of data that tells you where a Boeing 747 is?â
ADS-B is like a very fast flashlight blinking in a dark room. You need to build a âdigital eyeâ that triggers only when it sees the specific âblink patternâ (preamble) and then records the next 112 blinks very accurately.
Concepts You Must Understand First
- Pulse Position Modulation (PPM)
- In PPM, a â1â is [High, Low] and a â0â is [Low, High].
- Why is this better than just [High] for â1â and [Low] for â0â? (Hint: DC balance).
- The Mode S Frame
- 8-microsecond preamble followed by 56 or 112 bits of data.
- Each bit is exactly 1 microsecond long.
Questions to Guide Your Design
- Detection
- How do you âslideâ a window across your data to find the preamble?
- What threshold of signal power defines âHighâ vs âLowâ?
- Timing
- If your sample rate is 2MHz, each 1-microsecond bit is exactly 2 samples. How do you decide if a bit is 0 or 1 if the samples are
[0.8, 0.2]?
- If your sample rate is 2MHz, each 1-microsecond bit is exactly 2 samples. How do you decide if a bit is 0 or 1 if the samples are
Thinking Exercise
The Preamble Matcher
A preamble is a pulse at 0, 1.0, 3.5, and 4.5 microseconds.
Questions:
- Draw this out on a timeline.
- If you are sampling at 2MHz (0.5us per sample), which sample indices should be âHighâ?
- What happens if the airplane signal arrives âbetweenâ your samples? (The jitter problem).
The Interview Questions Theyâll Ask
- âWhat is the difference between ADS-B and Radar?â
- âWhy is 2MSPS considered the âNyquist minimumâ for decoding a 1Mbps PPM signal?â
- âExplain how a Cyclic Redundancy Check (CRC) works.â
- âHow do you handle âover-the-horizonâ signals that are very weak?â
- âWhat is the ICAO address and how is it used in aircraft identification?â
Hints in Layers
Hint 1: Work with Magnitude
ADS-B doesnât care about phase. Convert your IQ samples to Magnitude (sqrt(I^2 + Q^2)) immediately. This simplifies everything to a single stream of positive numbers.
Hint 2: Finding the Preamble Look for 4 peaks that match the relative spacing of the ADS-B preamble. Donât look for absolute values (which change based on distance), look for the ratio of the peaks to the background noise.
Hint 3: Bit Slicing Once a preamble is found, jump 8 microseconds ahead. Look at the next two samples. If sample A > sample B, itâs a â1â. If B > A, itâs a â0â.
Hint 4: Parity The last 24 bits of an ADS-B message are a CRC. If your decoded bits donât pass the CRC check, throw the whole message away. Noise will cause 99% of your âdetectionsâ to be false positives.
Books That Will Help
| Topic | Book | Chapter |
|---|---|---|
| ADS-B Protocol | âThe 1090 Megahertz Riddleâ | All |
| Digital Comms | âSoftware-Defined Radio for Engineersâ | Ch. 5 |
| CRC Math | âThe Scientist & Engineerâs Guide to DSPâ | Ch. 15 |
Project 5: The Hidden Text (RDS Decoder)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: Python
- Alternative Programming Languages: C (for embedded), Rust
- Coolness Level: Level 3: Genuinely Clever
- Business Potential: 1. The âResume Goldâ
- Difficulty: Level 3: Advanced
- Knowledge Area: Subcarrier Extraction / BPSK Demodulation
- Software or Tool: FM IQ recording
- Main Book: âUnderstanding Digital Signal Processingâ by Richard Lyons
What youâll build: An extension to your Project 3 FM Receiver that extracts the âRadio Data Systemâ (RDS) signalâthe scrolling text that tells you the song title and artist on your car radio.
Why it teaches SDR: RDS is a âsubcarrierâ at 57kHz. To get it, you have to perform a âRadio within a Radioâ operation. Youâll learn about Band-Pass Filtering, Costas Loops (for phase synchronization), and Differential BPSK decoding.
Core challenges youâll face:
- Extracting the 57kHz Subcarrier â maps to narrowband filtering in the baseband audio
- Clock Recovery â maps to finding the 1187.5bps heartbeat of the data
- BPSK Demodulation â maps to interpreting 180-degree phase flips
- Differential Decoding â maps to handling the fact that phase can be inverted
Key Concepts:
- BPSK Demodulation: âSoftware-Defined Radio for Engineersâ Ch. 5
- Costas Loop: âUnderstanding Digital Signal Processingâ Ch. 13
- Differential Encoding: Standard DSP texts
Difficulty: Advanced Time estimate: 2 weeks Prerequisites: Project 3 (FM Receiver) completed. Understanding of Phase-Locked Loops (PLL).
Real World Outcome
As you listen to the radio, your terminal will scroll the name of the song currently playing on the station.
Example Output:
[RDS] Program Service: BBC R1
[RDS] RadioText: NOW PLAYING: Daft Punk - One More Time
[RDS] Clock: 2025-12-28 14:30:05
The Core Question Youâre Answering
âHow do you hide a digital stream inside an analog music broadcast without anyone hearing it?â
RDS is tucked away at 57kHz, far above the human hearing limit (20kHz). Itâs a tiny, quiet signal that rides on top of the music. Your job is to ignore the loud music and focus only on that tiny 57kHz whisper.
Concepts You Must Understand First
- Subcarriers
- How can one frequency carry multiple âsub-signalsâ?
- Why is 57kHz chosen? (Hint: 19kHz * 3).
- BPSK (Binary Phase Shift Keying)
- In BPSK, we donât change amplitude or frequency; we flip the wave upside down (180-degree phase shift) to represent a â1â.
Questions to Guide Your Design
- Separation
- How do you use a Band-Pass Filter to remove the music (0-15kHz) and the Stereo pilot (19kHz) while keeping only 57kHz +/- 2kHz?
- Synchronization
- How do you stay in sync with the transmitterâs phase? If your â1â becomes a â0â because your clock is slightly off, how do you fix it?
Thinking Exercise
The 57kHz Whisper
Draw the spectrum of an FM signal:
- 0 to 15kHz: Mono Audio
- 19kHz: Pilot Tone
- 23 to 53kHz: Stereo Audio
- 57kHz: RDS
Questions:
- If your sample rate for the demodulated audio is 192kHz, where does 57kHz live?
- If you use a Low-Pass Filter at 15kHz, what happens to the RDS signal?
- Why do we need to multiply the 57kHz signal by the 19kHz pilot tone (times 3) to âlockâ onto it?
The Interview Questions Theyâll Ask
- âWhat is a subcarrier?â
- âWhy is RDS modulated using BPSK instead of AM or FM?â
- âExplain the purpose of a Costas Loop in digital communications.â
- âWhat is âDifferential Encodingâ and why is it used in RDS?â
- âHow does the receiver handle the 57kHz carrier if the transmitterâs frequency drifts?â
Hints in Layers
Hint 1: The First Filter Take the output of your FM demodulator (before the audio LPF). Apply a Band-Pass Filter centered at 57kHz with a width of about 4kHz. This is your raw RDS signal.
Hint 2: Squaring Loop To recover the carrier, square the signal. This removes the BPSK modulation and gives you a pure tone at 114kHz (2 * 57kHz). Lock a PLL to this, divide by 2, and you have your reference carrier.
Hint 3: Symbols to Bits Multiply your filtered RDS signal by your recovered reference carrier. Low-pass filter the result. Youâll see a waveform that looks like a series of pulses. This is the baseband data.
Hint 4: Group Synchronization RDS data is sent in âGroupsâ of 104 bits. You need to look for specific âOffset Wordsâ to find the start of a block. This is the hardest partâitâs pure bit-level logic.
Books That Will Help
| Topic | Book | Chapter |
|---|---|---|
| RDS Specification | âEN 50067â (Standard Doc) | All |
| BPSK & PLLs | âUnderstanding DSPâ | Ch. 13 |
| Subcarriers | âPractical SDRâ | Ch. 8 |
Project 6: The Ship Tracker (AIS Decoder)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: Python
- Alternative Programming Languages: C (for performance), Rust
- Coolness Level: Level 5: Pure Magic (Super Cool)
- Business Potential: 3. The âService & Supportâ Model
- Difficulty: Level 4: Expert
- Knowledge Area: GMSK Demodulation / Marine Protocols
- Software or Tool: 162MHz IQ capture or RTL-SDR
- Main Book: âDigital Communications: A Discrete-Time Approachâ by Michael Rice
What youâll build: An Automatic Identification System (AIS) decoder. AIS is used by ships to broadcast their position, speed, and destination. Youâll decode GMSK (Gaussian Minimum Shift Keying) signals.
Why it teaches SDR: AIS uses GMSK, the same modulation used in GSM cell phones. It teaches you about Gaussian pulse shaping and Minimum Shift Keying. Itâs a step up from FM and BPSK.
Core challenges youâll face:
- GMSK Demodulation â maps to handling signals with constant envelope but complex phase paths
- Bit Stuffing â maps to managing HDLC-style framing
- NRZI Decoding â maps to interpreting bits based on transitions rather than levels
- Dual Channel Processing â AIS broadcasts on two frequencies (161.975MHz and 162.025MHz) simultaneously.
Key Concepts:
- Gaussian MSK: âDigital Communicationsâ by Michael Rice
- NRZI Encoding: Standard networking theory
- HDLC Framing: ISO/IEC 13239
Difficulty: Expert Time estimate: 3 weeks Prerequisites: Project 4 (ADS-B) completed. Familiarity with NRZI and CRC.
Real World Outcome
Youâll see a map (using Pythonâs folium or similar) of every ship in the nearby harbor, including their names, tonnages, and where they are headed.
Example Output:
$ ./ais_decoder --chan A
[AIS] MMSI: 235123456 | Vessel: 'Ever Given' | Status: Underway | Lat: 51.5 | Lon: 0.1
[AIS] MMSI: 244650000 | Vessel: 'Rotterdam Ferry' | Speed: 15.2kts | Heading: 90
The Core Question Youâre Answering
âHow do you pack digital data into a radio signal such that it doesnât âsplatterâ into neighboring frequencies?â
GMSK uses a Gaussian filter to smooth out the âcornersâ of digital transitions. This makes the signal narrow and efficient, but it makes decoding harder because the bits âbleedâ into each other.
Concepts You Must Understand First
- GMSK (Gaussian Minimum Shift Keying)
- Why is it âMinimum Shiftâ? (Hint: Phase continuity).
- What does the âGaussianâ part do to the bandwidth?
- NRZI (Non-Return to Zero Inverted)
- A â0â is a change in level, a â1â is no change. How do you stay in sync if a ship sends a long string of â1âs? (Hint: Bit stuffing).
Questions to Guide Your Design
- Demodulation
- Can you treat GMSK as âjust FMâ and use your Project 3 decoder? (Yes, but itâs not optimal. Why?)
- Framing
- AIS uses a âFlagâ byte (
01111110) to mark the start and end of a packet. How do you handle it if that same byte appears inside your data?
- AIS uses a âFlagâ byte (
Thinking Exercise
The Bit Stuffer
In AIS, if you see five â1âs in a row, the transmitter automatically inserts a â0â to force a transition.
Questions:
- If you receive
01111101, is that a bit-stuffed â0â or part of the real data? - How do you implement a state machine to âun-stuffâ these bits in real-time?
- What happens if the bit-stuffed â0â is corrupted by noise?
The Interview Questions Theyâll Ask
- âWhat are the advantages of GMSK over standard FSK?â
- âHow does NRZI encoding help with clock recovery?â
- âExplain the âMinimumâ in Minimum Shift Keying.â
- âWhat is an MMSI number and how is it allocated?â
- âWhy does AIS use two different channels?â
Hints in Layers
Hint 1: FM as a Shortcut GMSK is technically Frequency Shift Keying. You can use your FM demodulator from Project 3. A â1â will be a positive voltage and a â0â will be a negative voltage.
Hint 2: Low-Pass Filter After FM demodulation, apply a Low-Pass Filter matched to the AIS bit rate (9600 bps). This cleans up the âeye diagramâ making it easier to see the bits.
Hint 3: Clock Recovery You need to sample the middle of each bit. Look for the zero-crossings of the signal to find the âedgesâ of the bits, then jump 50% ahead to find the âcenter.â
Hint 4: HDLC
Once you have a stream of 1s and 0s, look for the 01111110 flag. When you find it, start collecting bits. If you see five 1s followed by a 0, delete the 0 (un-stuffing). If you see six 1s, youâve found the end flag.
Books That Will Help
| Topic | Book | Chapter |
|---|---|---|
| GMSK Theory | âDigital Communicationsâ | Ch. 7 |
| AIS Protocol | âITU-R M.1371â | All |
| Marine Radio | âPractical SDRâ | Ch. 9 |
Project 7: The Satellite Eye (NOAA APT Downloader)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: Python
- Alternative Programming Languages: C (for performance), MATLAB
- Coolness Level: Level 5: Pure Magic (Super Cool)
- Business Potential: 1. The âResume Goldâ
- Difficulty: Level 3: Advanced
- Knowledge Area: Image Transmission / AM-on-FM
- Software or Tool: 137MHz IQ capture (NOAA 15, 18, 19)
- Main Book: âThe Scientist & Engineerâs Guide to Digital Signal Processingâ by Steven W. Smith
What youâll build: A tool that decodes Automatic Picture Transmission (APT) signals from NOAA weather satellites. You will convert a series of âwhistlesâ and âclicksâ into a high-resolution image of Earth from space.
Why it teaches SDR: APT is an âAM on FMâ signal. It teaches you about nested modulation, the Doppler effect (the signal frequency shifts as the satellite moves), and how to sync image scanlines using sync pulses.
Core challenges youâll face:
- Doppler Correction â maps to tracking a signal that is physically moving at 17,000 mph
- Sync Pulse Detection â maps to finding the âstart of lineâ in a noisy analog stream
- Hilbert Transform â maps to cleanly extracting the AM envelope from the FM subcarrier
- Image Resampling â maps to fixing âskewâ caused by sampling clock differences
Key Concepts:
- APT Modulation: AM subcarrier on an FM carrier
- Doppler Shift: âPractical SDRâ Ch. 12
- Image Reconstruction: âThe Scientist & Engineerâs Guide to DSPâ Ch. 23
Project 8: The Beeping Relic (Pager Decoder / POCSAG)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: Python
- Alternative Programming Languages: C, Rust
- Coolness Level: Level 4: Hardcore Tech Flex
- Business Potential: 1. The âResume Goldâ
- Difficulty: Level 3: Advanced
- Knowledge Area: FSK Demodulation / BCH Error Correction
- Software or Tool: 138-174MHz IQ capture
- Main Book: âUnderstanding Digital Signal Processingâ by Richard Lyons
What youâll build: A decoder for the POCSAG (Post Office Code Standardisation Advisory Group) protocol used by pagers. Youâll decode text messages sent over the airwaves.
Why it teaches SDR: POCSAG uses simple Frequency Shift Keying (FSK). Itâs the perfect project to master 2-level FSK. You will also implement BCH (Bose-Chaudhuri-Hocquenghem) error correctionâa vital skill for all digital comms.
Core challenges youâll face:
- BCH Decoding â maps to correcting bit flips in data
- Clock Recovery â maps to sampling bits at exactly 512, 1200, or 2400 baud
- Bit Inversion â maps to handling the fact that FSK can be âhigh-is-0â or âhigh-is-1â
Project 9: The Mobile Whisper (GSM Sniffer - Education Only)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: Python / C
- Alternative Programming Languages: C++
- Coolness Level: Level 5: Pure Magic (Super Cool)
- Business Potential: 3. The âService & Supportâ Model
- Difficulty: Level 5: Master
- Knowledge Area: Complex TDMA / Viterbi Decoding
- Software or Tool: 900MHz IQ capture (Uplink/Downlink)
- Main Book: âGSM - Architecture, Protocols and Servicesâ by JĂśrg Eberspächer
What youâll build: A non-decrypting sniffer for 2G GSM signals. You will decode the âSystem Informationâ blocks that describe the cell tower and the list of surrounding towers.
Why it teaches SDR: GSM is extremely complex. It uses TDMA (Time Division Multiple Access) where users share the same frequency by taking turns in tiny time slots. Youâll learn about frequency hopping, burst synchronization, and Viterbi decoding for convolutional codes.
Project 10: The Space Compass (GPS L1 Tracker)
- File: SOFTWARE_DEFINED_RADIO_SDR_MASTERY.md
- Main Programming Language: C (for performance)
- Alternative Programming Languages: Rust, Python (very slow)
- Coolness Level: Level 5: Pure Magic (Super Cool)
- Business Potential: 5. The âIndustry Disruptorâ
- Difficulty: Level 5: Master
- Knowledge Area: Spread Spectrum / CDMS
- Software or Tool: 1575.42MHz IQ capture
- Main Book: âA Software-Defined GPS and Galileo Receiverâ by Kai Borre
What youâll build: A receiver that âacquiresâ GPS satellites. You will correlate the noisy signal against locally generated âGold Codesâ to find which satellites are visible and calculate their âPseudo-range.â
Why it teaches SDR: GPS is a âSpread Spectrumâ signal. The data is hidden below the noise floor. You cannot see GPS on a waterfall. You can only find it by mathematically âmultiplyingâ the noise by a known pattern. This is the absolute peak of SDR mastery.
Project Comparison Table
| Project | Difficulty | Time | Depth of Understanding | Fun Factor |
|---|---|---|---|---|
| 1. IQ Visualizer | Level 1 | Weekend | High (Foundations) | 3/5 |
| 2. AM Receiver | Level 2 | 1 Week | High (Workflow) | 4/5 |
| 3. FM Receiver | Level 3 | 2 Weeks | Very High (Phase) | 5/5 |
| 4. ADS-B Tracker | Level 4 | 2 Weeks | Very High (Data) | 5/5 |
| 5. RDS Decoder | Level 3 | 2 Weeks | Very High (Subcarriers) | 4/5 |
| 6. AIS Tracker | Level 4 | 3 Weeks | Very High (GMSK) | 5/5 |
| 7. NOAA Satellite | Level 3 | 2 Weeks | High (Doppler/Image) | 5/5 |
| 8. Pager Decoder | Level 3 | 1 Week | High (FSK/BCH) | 3/5 |
| 9. GSM Sniffer | Level 5 | 1 Month+ | Extreme (TDMA) | 5/5 |
| 10. GPS Tracker | Level 5 | 1 Month+ | Extreme (CDMA) | 5/5 |
Recommendation
Start with Project 1 (Visualizer). It is the âHello Worldâ of SDR. Without it, you are flying blind. Once you can see the spectrum, move to Project 2 (AM) and Project 3 (FM) to master analog audio.
If you love data, your first major milestone should be Project 4 (ADS-B). It is incredibly rewarding to see real planes appear on your screen using code you wrote from scratch.
Final Overall Project: The Universal SDR Console
The Goal: Combine all your projects into a single, unified âSoftware Defined Radio Operating System.â
What youâll build: A high-performance GUI application (using C++ and Qt, or Rust and Iced) that can:
- Scan the entire spectrum and identify signals automatically using a âSignal Classifierâ (AI/ML).
- Demodulate any signal (AM/FM/Digital) on the fly by clicking on it in the waterfall.
- Decrypt/Decode data streams and show them in a dashboard (ADS-B planes on a map, AIS ships on a map, RDS text scrolling).
- Record and playback IQ files with âTime Travelâ (rewinding a live stream).
Summary
This learning path covers Software Defined Radio through 10 hands-on projects.
| # | Project Name | Main Language | Difficulty | Time Estimate |
|---|---|---|---|---|
| 1 | The Spectrum Eye | Python | Beginner | Weekend |
| 2 | The Envelope (AM) | Python | Intermediate | 1 week |
| 3 | Freq-to-Volts (FM) | Python | Advanced | 2 weeks |
| 4 | Aircraft Radar (ADS-B) | Python | Expert | 2 weeks |
| 5 | The Hidden Text (RDS) | Python | Advanced | 2 weeks |
| 6 | Ship Tracker (AIS) | Python | Expert | 3 weeks |
| 7 | NOAA Satellite | Python | Advanced | 2 weeks |
| 8 | Pager Decoder | Python | Advanced | 1 week |
| 9 | GSM Sniffer | C | Master | 1 month+ |
| 10 | GPS Tracker | C | Master | 1 month+ |
Recommended Learning Path
For beginners: Start with projects #1, #2, #3. For data enthusiasts: Focus on #1, #4, #6, #8. For space/satellite buffs: Focus on #1, #3, #7, #10.
Expected Outcomes
After completing these projects, you will:
- Master the math of complex IQ sampling.
- Be able to implement any common modulation (AM, FM, FSK, PSK, MSK) in code.
- Understand how to design digital filters (FIR/IIR) from scratch.
- Know how to recover clocks and synchronize data bursts from noisy RF.
- Have a portfolio of impressive, âsuper coolâ hardware-interfacing projects.
Youâll have built 10 working projects that demonstrate deep understanding of Software Defined Radio from first principles.