FIR Decimation and Energy Detection on IQ Samples

Problem

I chose a signal-processing task that works on IQ data. IQ data has two values per sample: I (in-phase) and Q (quadrature).

The program does three common steps used in SDR:

  1. low-pass FIR filtering,
  2. decimation (keep one sample every D samples),
  3. block-wise energy detection.

This is a realistic workflow in communication/radar/remote-sensing pipelines and is a good target for later multicore, SIMD, and GPU optimization.

The program supports two input modes:

The workload is controlled by command-line options (--samples, --taps, --decim, --repeats, …), so runtime can be tuned from seconds to minutes.

For real-data experiments, I use the HMAP SigMF dataset (Zenodo record 7416081). Its IQ payload (*.sigmf-data) has 8 files:

How the baseline code works

The baseline implementation is iq_baseline.cc (C++17, standard library only).

Main steps:

  1. Input preparation
  2. Filter design
  3. Main computation (timed)
  4. Result check

Printed outputs include main compute time, approximate FIR throughput (GFLOP/s), energy, checksum, and error metrics.

Baseline and improved versions

I implemented two versions of the same algorithm:

Where is parallelism

The most expensive part is FIR + decimation. Each output index is mostly independent, so it maps well to parallel hardware.

Data

Download the data used from the following command lines in code/data:

# Small Zenodo SigMF set
curl -L "https://zenodo.org/api/records/13143544/files/crab-giantpulse.sigmf-data/content" -o code/data/crab-giantpulse.sigmf-data
curl -L "https://zenodo.org/api/records/13143544/files/crab-giantpulse.sigmf-meta/content" -o code/data/crab-giantpulse.sigmf-meta

# Medium size
curl -L "https://zenodo.org/api/records/7416081/files/HMAP_2022-11-16T15:16:06_1ax.sigmf-data/content" -o code/data/HMAP_2022-11-16T15:16:06_1ax.sigmf-data
curl -L "https://zenodo.org/api/records/7416081/files/HMAP_2022-11-16T15:16:06_1ax.sigmf-meta/content" -o code/data/HMAP_2022-11-16T15:16:06_1ax.sigmf-meta