Skip to content

mdwasserman/demo_passive_radar

Repository files navigation

Demo Passive Radar

A cheap, working example of a minimum-viable passive radar system for educational purposes.

TL;DR

  • What: Track aircraft using reflected radio signals
  • Hardware: KrakenSDR, two TV antennas, two coax cables with SMA adaptors
  • Signal: DAB radio at 225.64 MHz, ~1.5MHz bandwidth
  • Caveat: Educational only — not a practical setup with this signal/hardware combination

Table of Contents

  1. Quick Start
  2. Hardware
  3. About the Software
  4. Passive Radar in Theory and Practice
  5. Software Setup

Quick Start

  1. Install prerequisites: sudo apt install libfftw3-3 libfftw3-dev python3-pip
  2. Install Heimdall DAQ Firmware
  3. Clone this repo into ~/krakenrf/
  4. Install Python deps: python3 -m pip install -r requirements.txt -U
  5. Copy daq_chain_config.ini to ~/krakenrf/heimdall_daq_fw/Firmware/
  6. Connect reference antenna to CH0, surveillance antenna to CH1
  7. Run ./pr_start.sh and open localhost:8080

See Manual Software Setup for detailed instructions.

Hardware

The hardware setup is minimal and relatively inexpensive — suitable for learning, but not for serious passive radar work. This setup is intended for use with digital TV signals.

  • KrakenSDR coherent multi-channel SDR
  • Two 470-694MHz TV antennas
  • Two 5m coaxial cables with adaptors for the Kraken's SMA ports

The key requirement is finding a transmitter with line-of-sight that broadcasts a signal in the appropriate band with suitable bandwidth. However, even if this is not possible, this setup will still work well enough to learn passive radar basics. More on this later.

Source: Hackaday

About the Software

This project uses a KrakenSDR as the Software Defined Radio. However, Kraken discontinued their passive radar support due to ITAR restrictions some years ago. Instead, the passive radar software used here was written by Mistral 3. Alternative options include blah2, an open-source passive radar project.

Passive Radar in Theory and Practice

How passive radar works

Passive radar captures a reference signal from a transmitter using an antenna pointed directly at it. A second surveillance antenna, pointed in a different direction, captures the same signal after it reflects off an aircraft. Cross-correlating these two signals estimates range, which is derived from the time delay between the direct and reflected signals.

Two complications make this trickier in practice:

  1. Direct path interference — The surveillance antenna inevitably receives some signal directly from the transmitter, not just reflections. This creates interference that must be cancelled.

  2. Doppler shift — The reflected signal isn't an exact copy of the reference. Its frequency shifts in proportion to the aircraft's velocity toward or away from the antenna.

Key gotchas

  • Bandwidth must match your SDR. The signal bandwidth must be less than or equal to the SDR's instantaneous bandwidth. The KrakenSDR handles about 2MHz; digital TV signals run 6-8MHz, making them incompatible.

  • Antennas matter significantly. For proper directional reception, antennas must be matched to the signal frequency. A mismatched antenna may behave as an omnidirectional monopole, degrading performance.

Working configuration

The original plan was to use digital TV signals — they offer high bandwidth, high power, and there are cheap directional antennas available. However, their 6-8MHz bandwidth exceeds what the KrakenSDR can capture. This initial oversight resulted in a lot of wasted time.

The configuration that ultimately worked:

  • 225.64 MHz DAB signal with ~1.5MHz bandwidth
  • Clutter rejection disabled
  • High gain on both channels: 7.7dB (reference), 25.4dB (surveillance)

This is a trial-and-error configuration that produces visible aircraft tracks, which is the primary goal. However, using a DAB signal with TV antennas means the hardware is mismatched — the antennas likely behave as monopoles rather than directional elements. This has a number of knock-on effects, inducing more interference than would normally be expected when the system is properly calibrated.

The plot above shows two forms of interference:

  • Horizontal line — Direct path correlation that the cancellation algorithm would normally remove
  • Vertical line — Constant delay interference, possibly multipath or software-induced

The horizontal interference occurs because the surveillance antenna still receives direct transmitter signal despite pointing elsewhere. The vertical line suggests reflections from a stationary source.

With clutter rejection enabled, both interference lines disappear — but so do the aircraft tracks. A properly matched hardware setup should resolve this trade-off.

Software Setup

This setup assumes a fresh installation.

1. Install the prerequisites

sudo apt update
sudo apt install libfftw3-3 libfftw3-dev python3-pip

2. Install Heimdall DAQ

Follow the instructions at https://github.com/krakenrf/heimdall_daq_fw to install the Heimdall DAQ Firmware. This is the core SDR code that handles data from the KrakenSDR.

3. Clone the demo_passive_radar repo

cd ~/krakenrf
git clone https://github.com/mdwasserman/demo_passive_radar

4. Install Python dependencies

python3 -m pip install -r requirements.txt -U

Running

Directory Structure

After installing the Heimdall DAQ software, the directory structure in ~/krakenrf should look like this:

.
├── heimdall_daq_fw
│   ├── config_files
│   ├── Documentation
│   ├── Firmware
│   │   ├── _calibration
│   │   ├── _daq_core
│   │   │   └── __pycache__
│   │   ├── _data_control
│   │   ├── _logs
│   │   ├── __pycache__
│   │   └── _testing
│   │       ├── test_logs
│   │       └── unit_test
│   └── util
└── demo_passive_radar
    ├── _receiver
    │   └── __pycache__
    ├── _signal_processing
    │   └── __pycache__
    ├── _UI
    │   └── _web_interface
    │       ├── assets
    │       └── __pycache__
    └── util

If the structure differs, reorganize the directories to match.

Running the code

Copy the daq_chain_config.ini file from this repo to ~/krakenrf/heimdall_daq_fw/Firmware. The key change is the data interface, switching from eth to shmem.

Now, connect the reference antenna to Channel 0 and the surveillance antenna to Channel 1. Then start the system:

cd ~/demo_passive_radar
./pr_start.sh

After entering the sudo password, the console will display:

$ ./pr_start.sh 
[sudo] password for krakenrf: 
Config file check bypassed [ WARNING ]
kernel.sched_rt_runtime_us = -1
Design FIR filter with the following parameters: 
Decimation ratio: 1
Bandwidth: 1.00
Tap size: 1
Window function: hann
FIR filter ready
Transfer funcfion is exported to :  _logs/Decimator_filter_transfer.html
Coefficients are exported to:  _data_control/fir_coeffs.txt
Starting DAQ Subsystem
Output data interface: Shared memory
      )  (     
      (   ) )  
       ) ( (   
     _______)_ 
  .-'---------|
 (  |/\/\/\/\/|
  '-./\/\/\/\/|
    '_________'
     '-------' 
               
Have a coffee watch radar
Starting Demo Passive Radar

The first startup may take a while. Be patient. Once ready, open localhost:8080 in a browser.

On the config page, start simple: experiment with signal selection, gain settings, and cancellation toggle. Setting the decay rate to 0.9 produces a phosphor-like effect on the tracks. Click Start Processing and wait for all status indicators to turn green.

Stopping the code

To stop, first press ctrl+c. If that doesn't work, close the terminal. In both case, then run:

cd ~/demo_passive_radar
./pr_stop.sh

This releases resources and ports.

About

A working example of a basic, minimum-viable passive radar setup for educational purposes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors