Radio direction finding is the practical art of turning RF samples into a bearing. This tutorial walks through the common software approaches you can reproduce on a bench or on a mobile platform using inexpensive SDR hardware and open toolkits. I focus on methods that are accessible to hobbyists and engineers while highlighting the calibration and synchronization steps that make the results usable in the real world.
Overview of practical DF techniques
There are four practical families of direction-finding methods you will see in software projects:
-
Amplitude comparison. Two or more directional antennas or a pair of elements provide different received power levels that you convert into a bearing using a calibrated lookup or interpolation. This is simple but limited in precision and heavily affected by multipath.
-
Time difference of arrival. TDoA uses phase or timing differences between spatially separated receivers to compute angle or hyperbolic intersections. Accuracy depends on precise time alignment and stable clocks. TDoA can give high accuracy if you have coherent receivers or a common clock.
-
Phase interferometry. With a coherent multichannel front end you compute phase differences across elements and solve for angle of arrival. This is the basis for high-resolution algorithms like MUSIC and ESPRIT. Proper calibration of channel phase and gain is essential.
-
Pseudo-doppler (switching) technique. A circular or segmented array is rapidly switched to emulate a rotating antenna. The switching imprints a low frequency modulation on the received carrier whose phase gives the bearing. This approach is popular because it avoids multiple receiver chains, but it requires careful filtering and switch timing to avoid sideband artifacts.
Hardware choices and the software tradeoffs
Single-channel SDR plus antenna switcher. If you only have one SDR you can still do DF using a fast RF switch or diode matrix and implement pseudo-doppler or TDoA by time multiplexing the antenna elements. This saves cost but forces you to manage switching timing inside the radio sampling window. Projects using HackRF plus an Opera Cake switcher are a concrete example of this route. Expect to spend time on switch timing and on-band filtering to clean switching sidebands.
Multi-channel coherent SDRs. When you can acquire phase-coherent multichannel samples you open up interferometry and subspace algorithms. Commercial and community devices like KrakenSDR and KerberosSDR provide multiple RTL front ends that are phase aligned by a DAQ and server process. These devices commonly expose a data stream that integrates with GNU Radio and other DSP code, enabling MUSIC and covariance-based DOA processing without manual sample alignment. If you plan to run MUSIC or beamforming, choose a hardware path that guarantees channel coherence or provides calibration routines.
Multiple SDRs and synchronization. You can build coherent arrays from multiple SDRs by sharing a common 10 MHz reference and a PPS pulse, or by using a distributed DAQ with timestamped packets. USB bandwidth, host CPU, and driver stability become limiting factors as channel count increases. For precise TDoA based geolocation across sites you will need GPS-disciplined clocks or wired synchronization.
Software stack and building blocks
GNU Radio. GNU Radio is the practical workhorse for implementing DF flowgraphs because it gives you real time blocks for filtering, correlation, vectorization, and integration with custom Python blocks. You will find existing example flowgraphs for DF in community modules and in device-specific blocks such as gr-krakensdr. Use GNU Radio for real-time visualization and prototyping.
MUSIC and other DOA algorithms. MUSIC is a subspace method that forms the sample covariance of the array snapshots, separates signal and noise subspaces by eigendecomposition, and then searches angles for steering vectors that are orthogonal to the noise subspace. MUSIC gives super-resolution under the assumptions of narrowband signals and uncorrelated sources, but it needs good sample support and accurate array geometry. Implementation libraries and reference Python projects exist and are good starting points for porting into GNU Radio blocks or standalone scripts.
Cross correlation and TDoA. For TDoA or interferometry you often compute cross correlations between a reference channel and other channels in short snapshots, extract peak lags, and convert lag to angle using geometry. With narrowband signals you can extract phase differences rather than time lags; phase differences unwrap and map to bearing. These steps are straightforward in Python or GNU Radio using FFT-based correlation.
Step by step: a minimal pseudo-doppler DF using an inexpensive SDR
1) Hardware: pick a single SDR that can stream continuously at your chosen sample rate, and build a small circular array of matched monopoles with an RF switch at the feedpoint. The Opera Cake add-on for HackRF is a ready example of an integrated switcher. Ensure the switching circuit supports the dwell times your sampling plan requires.
2) Frequency and bandwidth: select a narrow offset around the carrier of interest and set the SDR sample rate to cover the switching modulation while keeping compute load practical. Typical pseudo-doppler switch rates sit well above the effective modulation bandwidth you will process but not so fast that your switch cannot follow. You will apply decimation and an FIR filter to isolate the recovered low frequency bearing tone produced by switching.
3) Capture and demodulate: stream IQ samples into GNU Radio or a Python capture script. Demodulate or heterodyne to baseband on the carrier and lowpass filter to remove switching sidebands outside the expected pseudo-doppler tone band.
4) Extract the bearing tone: compute the analytic signal for the switching cycle and reference the phase of that tone to the switch clock. The phase offset between the recovered tone and the switch reference is your raw bearing modulo array symmetry. Apply calibration offsets gathered from known-heading tests.
5) Filter and average: average multiple switching cycles to reduce noise. Implement a simple tracker or particle filter on top of the bearing estimate if you plan to drive a mobile platform. In mobile or multipath rich environments the instantaneous bearing can jump; temporal smoothing helps.
Step by step: a compact multichannel DF using MUSIC
1) Hardware: use a phase-coherent multichannel SDR such as KrakenSDR or a USRP with multiple coherent daughterboards. Verify that the DAQ provides coherent IQ streams and that the device or server can handle the channel IO bandwidth.
2) Array geometry: define the element coordinates precisely. MUSIC needs the steering vector model which depends on element spacing in wavelengths and on the array manifold. Use half wavelength spacing for ULAs to avoid grating lobes when possible.
3) Preprocessing: bandpass the desired channel, downconvert to complex baseband, decimate, and collect snapshots of M channels by N time samples. Form the M x M sample covariance matrix from the snapshots.
4) Eigen decomposition: perform eigendecomposition on the covariance matrix, separate noise and signal subspaces, and build the MUSIC pseudo-spectrum across a grid of candidate angles. Peaks indicate DOA estimates. Use peak finding on the pseudo-spectrum and validate with SNR checks.
5) Calibration and corrections: run calibration using a known transmitter at multiple bearings to compute per-channel phase and gain corrections. Apply these corrections before computing covariance. Without calibration you will get biased or ambiguous bearings.
Practical tips and traps
-
Calibration matters. Phase and gain calibration across channels is the most common source of error. Do a bench run with a fixed transmitter at known bearings and sweep the array heading to collect correction factors.
-
Multipath and reflections. In built environments multipath will confuse single-shot bearings. Use temporal averaging, motion, or fusing with other sensors like IMU and GPS to improve robustness. Filtering and narrowband selection also reduce multipath influence.
-
Band choice. Lower frequencies give longer wavelengths and easier array spacing but worse multipath behavior. Higher frequencies give more compact arrays and potentially better angular resolution for a fixed aperture.
-
Snapshot length vs stationarity. MUSIC and covariance methods assume that the signal statistics are stationary over the snapshot. Choose snapshot lengths short enough for the transmitter and channel to be stable but long enough for reliable estimates.
-
USB and host limitations. When you use multiple USB SDRs, USB bandwidth and host CPU are common failure points. If you see dropped samples or buffer overruns you need a faster host or a dedicated DAQ device.
Legal and safety note
Do not monitor or attempt to locate transmitters you are not authorized to intercept. Follow local laws and spectrum regulations. Many DF techniques can be used for benign tasks such as fox hunts in license-free bands or wildlife tracking with permission, but misuse has legal consequences.
Where to look for examples and code
-
KrakenSDR and gr-krakensdr provide a practical, out-of-the-box path for multichannel DF with example GNU Radio flowgraphs and a Heimdall DAQ server that manages channel coherence. These examples are helpful if you want to avoid building your own phase alignment stack.
-
Pseudo-doppler demonstrations, including the Opera Cake for HackRF, are good references for single-channel switching implementations and include practical notes about switching rates, sidebands, and filtering. These community demos and conference talks are useful for learning what to watch for when you implement a switcher based DF system.
-
Community tutorials and projects such as RTL-SDR DF robots show concrete workflows combining GNU Radio, simple beacon transmitters, and mobile platforms. These are good starting points for robotics or field trials.
Final words
Software direction finding is a classic example of the trade between hardware complexity and signal processing. A single SDR plus clever switching can give you a working reader for hobby tasks. If you need precision, coherence and careful calibration with a multichannel front end plus subspace algorithms will get you there. Start simple, validate with controlled transmitters, and add calibration and sensor fusion as you push toward fielded performance.