Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added _images/gaussian_IQ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/gaussian_histogram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/gaussian_transformed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'sphinx.ext.mathjax',
'sphinx.ext.autosectionlabel',
#'sphinxcontrib.tikz', #added for dutch
"sphinxcontrib.mermaid"
]

mathjax_path = "mathjax/tex-mml-chtml.js" # so that the textbook can work offline
Expand Down
48 changes: 13 additions & 35 deletions content/detection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -433,43 +433,21 @@ To operate in real-time, we will accumulate samples in **buffers** (chunks of, s

Implementation
##############

Our detector will follow this workflow:

.. code-block:: text

┌─────────────────────────────────────────────────────────────┐
│ Continuous IQ Stream from SDR (e.g., 1 MHz sample rate) │
└────────────────────┬────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Buffer Accumulation (e.g., 100k samples = 0.1 sec) │
└────────────────────┬────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Cross-Correlation with Known Preamble │
│ → Produces correlation vs. sample index │
└────────────────────┬────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ CFAR Threshold Computation │
│ → Adaptive threshold that tracks noise floor │
└────────────────────┬────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Peak Detection (correlation > threshold) │
│ → List of candidate packet start indices │
└────────────────────┬────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Packet Extraction & Validation │
│ → Extract samples, pass to demodulator │
└─────────────────────────────────────────────────────────────┘
.. mermaid::

flowchart TD

A("Continuous IQ Stream from SDR<br/>(1 MHz sample rate)")
B("Buffer Accumulation<br/>(100k samples = 0.1 sec)")
C("Cross-Correlation with Known Preamble")
D("CFAR Threshold Computation")
E("Peak Detection<br/>(correlation > threshold)")
F("Packet Extraction & Validation")

A --> B --> C --> D --> E --> F


To avoid missing packets that straddle buffer boundaries, we use an **overlap-save** approach, where each buffer includes the last ``N_preamble`` samples from the previous buffer. This ensures any packet starting near the end of buffer ``i`` will be fully contained in buffer ``i+1``. This requires a small additional computational overhead but we don't want to miss packets just because they straddle buffer boundaries.

Expand Down
Loading
Loading