Sandia PDU Technical Report
Sandia PDU Technical Report
Sandia PDU Technical Report
Prepared by
Sandia National Laboratories
Albuquerque, New Mexico
87185 and Livermore,
California 94550
Issued by Sandia National Laboratories, operated for the United States Department of Energy by National
Technology & Engineering Solutions of Sandia, LLC.
NOTICE: This report was prepared as an account of work sponsored by an agency of the United States
Government. Neither the United States Government, nor any agency thereof, nor any of their employees, nor any of
their contractors, subcontractors, or their employees, make any warranty, express or implied, or assume any legal
liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or
process disclosed, or represent that its use would not infringe privately owned rights. Reference herein to any specific
commercial product, process, or service by trade name,trademark, manufacturer, or otherwise, does not necessarily
constitute or imply its endorsement, recommendation, or favoring by the United States Government, any agency
thereof, or any of their contractors or subcontractors. The views and opinions expressed herein do not necessarily
state or reflect those of the United States Government, any agency thereof, or any of their contractors.
Printed in the United States of America. This report has been reproduced directly from the best available copy.
NeSA
bErbkvaadMeN.r$,Icem*Admin4.,km
ABSTRACT
The Sandia Utilities form an RF toolkit extending the GNU Radio framework for
straightforward interaction with bursty RF systems which can be cumbersome using built in
capabilities of the framework or other open source extensions. Motivated by the abstract
exercise of responding to a modulated burst ofinformation with a unique modulated burst of
information, the Sandia Utilities provide several dozen additional debug and signal processing
blocks through four software modules. These blocks manifest their utility through a new
general concept of operation for GNU Radio applications and extend many existing streaming
capabilities to the PDU-based message passing API. Using these concepts and tools, it is
straightforward to develop software capabilities to interact with existing and new bursty RF
devices.
3
CONTENTS
1. Background 8
1.1. Document Organization 8
2. Software Structure 9
2.1. GR PDU Utilities (gr-pdu_utils) 9
2.2. GR Timing Utilities (gr-timing_utils) 9
2.3. GR FHSS Utilities (gr-fhss_utils) 9
2.4. GR Sandia Utilities (gr-sandia_utils) 10
3. Streaming To Message Conversion 11
3.1. Burst Tagging Methods 12
3.1.1. Start and End of Burst Tagging 12
3.1.2. Broadband Energy Burst Tagging 12
3.1.3. Additional PDU Techniques 13
4. Key Signal Processing Blocks 14
4.1. Key Blocks from the GNU Radio PDU Utilities Module 14
4.1.1. Tags to PDU Block 14
4.1.1.1. Basic Usage 14
4.1.1.2. Optional Burst Identification Parameters: 14
4.1.1.3. Advanced Timing Features: 14
4.1.1.4. Detection Emissions: 14
4.1.2. Take Skip to PDU Block 15
4.1.3. PDU to Bursts Block 15
4.1.3.1. Basic Usage: 15
4.1.3.2. Timed Transmissions: 15
4.1.4. Tag Message Trigger Block 15
4.1.4.1. Overview• 15
4.1.4.2. Basic Tag Based Message Emission: 15
4.1.4.3. Usage of the Arming and Re-trigger Holdoff: 16
4.1.4.4. Timed PDU Mode: 16
4.1.4.5. Transmission Limit• 16
4.1.5. PDU Pack Unpack Block 16
4.1.6. PDU Add Noise Block 16
4.1.7. PDU Clock Recovery Block 17
4.1.8. PDU Blocks From gr::filter 17
4.1.8.1. PDU FIR Filter Block 17
4.1.8.2. PDU PFB Arbitrary Resampler Block 17
4.1.9. PDU Flow Controller Block 17
4.2. Key Blocks from the GNU Radio Timing Utilities Module 17
4.2.1. Wall Clock Time Block 17
4.2.2. Time Delta Block 18
4.3. Key Blocks from the GNU Radio FHSS Utilities Module 18
4.3.1. FFT Burst Tagger Block 18
4.3.1.1. Usage 18
4.3.1.2. Operation 18
4.3.2. Tagged Burst to PDU Block 19
4.3.3. FSK Burst Extractor Hier Block 19
4
4.4. Blocks from the GNU Radio Sandia Utilities Module 20
4.4.1. Block Buffer Block 20
4.4.2. Sandia File I/0 Blocks 20
4.4.2.1. Sandia Utilities File Source 20
4.4.2.2. Sandia Utilities File Sink 20
Appendix A. Complete List of GNU Radio Utilities Blocks 22
LIST OF FIGURES
Figure 1 - General Concept ofPDU Conversion 10
Figure 2 - PDU Receive Time Tracking 10
Figure 3 - PDU Transmit Time Tracking 10
Figure 4 - Examples of Using SOB/EOB Burst Tagging 11
Figure 5 - Broadband Energy Detection of Bursts 11
LIST OF TABLES
Table 1 - List of Blocks 19
5
This page left blank
6
ACRONYMS AND DEFINITIONS
Abbreviation Definition
API Application Programming Interface
EOB End of Burst
FHSS Frequency Hopping Spread Spectrum
GNU "GNU's Not Unix" — recursive acronym representing large collection of free software
GR GNU Radio
QA Quality Assurance
PDU Protocol Data Unit
PMT Polymorphic Type
RF Radio Frequency
SDR Software Defined Radio
SOB Start of Burst
7
1. BACKGROUND
The Sandia GNU Radio Utilities are a series of software modules that Sandia has developed
for the GNU Radio Software Defined Radio framework to support development of software
defined RF systems. GNU Radio operates on two basic data flow models supported by the
Streaming API and the Asynchronous Message Passing API. A robust set of processing blocks
are included ("in tree") with the GNU Radio framework for use with the Streaming API, but
despite providing a very capable structure for representing data as Protocol Data Units, an
internal structure for metadata and vector data, there is only a significantly reduced set of
blocks for the Message Passing API primarily focused on debugging and control as opposed to
signal processing.
Using only in tree components from GNU Radio, it is very challenging to accomplish many
fairly straightforward tasks that are extremely common for RF communication systems such as
`receive a burst of data on an arbitrary frequency in a given band' or 'respond to modulated
data in a burst of energy with other modulated data in a new burst of energy'.
The Streaming API is a useful SDR paradigm for both continuous and bursty RF systems as
the data from the software radio is generally continuous. The Message Passing API is well
suited for higher layer protocols where data is refined into discrete blocks ofinformation,
albeit substantially relying custom blocks to convert the initially streaming data to a packetized
format. Message passing remains preferable when working with RF signals for which data are
organized into bursts or chunks as opposed to a continuous stream, and various benefits can
be realized when doing this conversion early in the processing chain.
GNU Radio leaves the non-trivial task of bridging the Streaming and Message Passing
paradigms primarily to the end user. The Sandia Utilities modules provide several methods for
accomplishing this translation, as well as substantial enhancements of the basic set of
Messaging Passing API blocks with signal processing functions found within the in-tree
Streaming API as presented at the GNU Radio Conference in 2019 M.
8
2. SOFTWARE STRUCTURE
The Sandia GNU Radio Utilities are organized into four primary software extensions to GNU Radio
developed as Out of Tree(OOT) modules. These are separate software projects that are managed
through the git version control system and have a branch structure that mirrors that of the upstream
GNU Radio project. The maint-x.Y branches represent the latest supported code that are
compatible to the upstream GNU Radio framework version x.Y, while the master branch is
intended to track the latest GR master codebase. Due to the maintenance burden of managing
multiple branches, the latest maint-x.Y branch receives the most up-to-date support.
The specific intention of the various modules is discussed in subsequent sections. Blocks are
coarsely categorized into functional groupings and are maintained in different modules to simplify
software deployment and build overhead. Over time as requirements evolve some blocks become
outliers and may not fit well in the prescribed module, these are eventually adjusted but because of
backward compatibility concerns this may take some time to happen.
9
The module is named'MSS Utilities' due to the original application being frequency hopped signal
reception, but despite this the concept of operation has many applications beyond FHSS systems. It
has direct application to any need to extract bursty energy from a band with unknown time or
frequency. This module is not well suited for situations where bursts of energy rely on process gain
for reception as the detection sensitivity is around 6-8dB when properly tuned, below which false
alarms tend to overwhelm valid detections.
Blocks in this module that are not hierarchical blocks should be written in C++,have minimal
stdout output, and have QA written.
10
3. STREAMING TO MESSAGE CONVERSION
The general conccpt of PDU conversion using this modulc is shown below in Figure 1.
SDR Source ... Burst Tagging Tags to PDU Allii PDU Processing PDU To Stream SDR Sink
SDR Source Tag UHD Offset Burst Tagger Tags to PDU 110" PDU Processing
Filteri g or modulation
I necessary
11
3.1. Burst Tagging Methods
Conversion between the Streaming and Messaging APIs using the Sandia Utilities require that
signals be localized temporally and spectrally in order to be further processed. There are several ways
to tag bursts that work well with this type of data that are presented here.
burst s
12
In this model, time domain data representing a broadband digitized signal is passed through a
processing block which makes time and frequency estimates for energy using the Discrete Fourier
Transform and applies tags in the output data stream. The next block isolates these tagged start and
end of bursts in time, of which there can be many simultaneously, and emits each individually as a
PDU with metadata indicating the approximate center frequency estimation. The final block in this
processing chain uses the center frequency estimate to decimate the block in frequency, re-estimate
the center frequency, and perform fine frequency correction prior to emitting the signal data that has
been time/frequency isolated.
Many such detections can happen simultaneously as would be observed in real-world congested
multi-user bands such as the various unlicensed ISM bands.
13
4. KEY SIGNAL PROCESSING BLOCKS
The concept and usage of a few significant blocks is described in this section. Many blocks are
omitted as their behavior is straightforward or documented in the GRC YAML sufficiently.
A complete listing of blocks as of this document is shown in Appendix A.
4.1. Key Blocks from the GNU Radio PDU Utilities Module
14
prone to false detections. The emission is simply a uint64 PMT containing the offset of the received
SOB tag.
4.1.4.1. Overview:
The Tag Message Trigger block emits PDUs based on certain input conditions observed on either
stream or message inputs and supports operating with or without an arming step prior to triggering.
This block is more complicated and powerful that it looks, though it has utility in many
straightforward applications also. The initial intention of this block was to allow for a stream tag to
emit a PDU immediately. This has been expanded upon to support several additional modes of
operation which are described here.
15
key is set to PMT NIL, the block is always armed and operates in the simple mode of emitting a
message when a key is seen.
Which is to say that the order of operations is to apply the random data first, then scale the data,
then offset it. Generally useful for debugging and testing, and as such it has not seen extensive use
so there may be some issues. Noise profiles are not supported, only uniform random data from the
ranl() function within gr::random. It could be argued that these should be separate blocks entirely,
16
but to reduce the overhead of converting data to and from PMT it was implemented this way to
allow all three operations to be done at once.
4.2. Key Blocks from the GNU Radio Timing Utilities Module
17
This is very helpful when it comes to debugging message passing performance, as the conventional
in-tree tools for performance evaluation of Streaming API blocks are not all usable with the Message
Passing API. Non-PDU type messages are dropped.
To compute the nominal time a PDU is taking to process through a message-based GR flowgraph,
the Wall Clock Time block should be placed upstream of the block under test, and the Time Delta
block downstream. The resulting metadata will accumulate the time difference across the block
under test as the flowgraph executes.
4.3. Key Blocks from the GNU Radio FHSS Utilities Module
4.3.1.1. Usage
The FFT Burst Tagger block accepts an input stream of data, generally a wideband recording, and
emits an identical stream of data with the addition of metadata stream tags representing energy
detections within the stream. The stream tags are one of two types: new burst with a PMT key of
new burst or end of burst tags with a PMT key of gone burst. Both tags have a PMT value of a
dictionary with a burst_id entry to correlate the start and end of bursts. New burst tag value
dictionaries, in addition to the burst identifier also have the following additional fields:
• Relative Burst Frequency Estimate
• Input Stream Center Frequency
• Magnitude Estimate
• Noise Power Estimate
• Input Stream Sample Rate
• Bandwidth Estimate
This block requires a significant amount of output buffer be available in the upstream block, and
due to some GNU Radio oddities, this cannot effectively be set internally. Thus,it is necessary to set
the minimum output items of the upstream block to a large value. If this is not possible due to the
upstream block behavior, and intermediate block such as the Multiply Constant(m=1) block may
need to be used.
4.3.1.2. Operation
Configuration of this block is complicated in the sense that misconfiguration can cause very poor or
unexpected performance. Most configuration issues can be avoided by understanding a few
important concepts.
18
First, the block operates on fft_size blocks of data, which is user configurable at instantiation.
The smallest internal unit of time this block can manage is fft size/sample rate seconds and
setting this value large can result in problems particularly when the before-burst and after-burst
lengths are small. Bursts must be observed on one or more contiguous FFT bins above the
configured threshold for a user specified number of FFTs (quantized duration) before what in
internally termed a 'pre-burst' will be tagged as a burst.
The decision of whether an FFT bin has crossed the threshold or not is made based on a dynamic
noise floor estimation based on a user configurable amount of historical data known as the
history_size. Upon startup or reset, the block will acquire at a minimum history_size FFTs of
data to establish a noise floor estimate. Energy present will be factored into the noise floor, and as
such initial bursts will be missed by design. The noise floor of each bin is managed individually, and
adjacent energy is not factored into the calculation, and this calculation is only updated when a bin is
not declared to contain a burst of energy to prevent spectral desensitization. There is a hard-coded
hysteresis factor of 50% on the threshold to declare a burst gone.
A small amount of energy on either side of the detected burst is generally useful, and the
pre_burst_length and post_burst_length accomplish this. If these values are set too large,
temporally adjacent but spectrally aligned bursts may become combined into single detections.
19
Shared configuration parameters are derived from the same input configuration source, and most
values with units of FFTs are unwrapped to seconds. This block formerly contained the PDU
Quadrature Demod and PDU Clock Recovery blocks making it 2-FSK specific, but it is significantly
more general now.
20
REFERENCES
[1] Gilbert,J. A.(2019, September 16-20) The GNU Radio PDU Utilities [Conference Presentation].
GNU Radio Conference 2019, Huntsville, AL,United States.
https://www.gnuradio.org/grcon/grcon19/presentations/the gnu radio pdu utilities
[2] Ossmann, M. https://github.com/mossmann/clock-recovery/blob/master/wper.py
21
APPENDIX A. COMPLETE LIST OF GNU RADIO UTILITIES BLOCKS
This is accurate as of publication but is subject to change as development continues.
Table 1 - List of Blocks
Module Block Name Status
pdu_utils extract_metadata active
pdu_utils message_counter active
pdu_utils message_emitter active
pdu_utils message_gate active
pdu_utils message_keep_1_in_n active
pdu_utils msg_drop_random active
pdu_utils pack_unpack active
pdu_utils pdu_add_noise active
pdu_utils pdu_align active
pdu_utils pdu_binary_tools active
pdu_utils pdu_burst_combiner active
pdu_utils pdu_clock_recovery active
pdu_utils pdu_complex_to_mag2 active
pdu_utils pdu_downsample active
pdu_utils pdu_fine_time_measure active
pdu_utils pdu_fir_filter active
pdu_utils pdu_flow_ctrl active
pdu_utils pdu_gmsk_fc active
pdu_utils pdu_head_tail active
pdu_utils pdu_length_filter active
pdu_utils pdu_logger active
pdu_utils pdu_pfb_resamp active
pdu_utils pdu_preamble active
pdu_utils pdu_quadrature_demod_cf active
pdu_utils pdu_range_filter active
pdu_utils pdu_round_robin active
pdu_utils pdu_set_m active
pdu_utils pdu_split active
22
Module Block Name Status
pdu_utils pdu_to_bursts active
pdu_utils qt_pdu_source active
pdu_utils sandia_message_debug deprecated
pdu_utils tag_message_trigger active
pdu_utils tags_to_pdu active
pdu_utils take_skip_to_pdu active
pdu_utils upsample active
timing_utils add_usrp_tags active
timing_utils edge_detector_bb active
timing_utils edge_distance active
timing_utils interrupt_emitter active
timing_utils retune_uhd_to_timed_tag active
timing_utils system_time_diff active
timing_utils system_time_tagger active
timing_utils tag_uhd_offset active
timing_utils thresh_trigger_f active
timing_utils timed _cordic_emulator active
timing_utils time_delta active
timing_utils timed_freq_xlating_fir deprecated
timing_utils timed_tag_retuner deprecated
timing_utils uhd_timed_pdu_emitter active
timing_utils usrp_gps_time_sync active
timing_utils wall_clock_time active
fhss_utils cf_estimate active
fhss_utils coarse_dehopper active (GRC hier)
fhss_utils fft_burst_tagger active
fhss_utils fft_peak active (GRC hier)
fhss_utils fine_dehopper active (GRC hier)
fhss_utils fsk_ burst_extractor_ hier active (GRC hier)
fhss_utils s_and_h_detector active (GRC hier)
fhss_utils tagged_burst_to_pdu active
23
Module Block Name Status
fhss_utils fsk_burst_extractor_hier active (Python hier)
sandia_utils block_buffer active
sandia_utils burst_power_detector active
sandia_utils complex_to_interleaved_short active
sandia_utils compute_stats active
sandia_utils csv_reader active
sandia_utils csv_writer active
sandia_utils file_archiver active
sandia_utils file_monitor active
sandia_utils file_sink active
sandia_utils file_source active
sandia_utils interleaved_short_to_complex active
sandia_utils invert_tune active
sandia_utils max_every_n active
sandia_utils message_file_debug active
sandia_utils message_vector_file_sink active
sandia_utils message_vector_raster_file_sink active
sandia_utils python_interface_sink active
sandia_utils python_message_interface active
sandia_utils rftap_encap active
sandia_utils stream_gate active
sandia_utils tag_debug deprecated
sandia_utils tag_debug_file active
sandia_utils tagged_bits_to_bytes active
24
DISTRIBUTION
Email—Internal
Name Org. Sandia Email Address
Simon Palfery 05334 [email protected]
Technical Library 01977 sanddocs(@,sandia.gov
This page left blank
26
This page left blank
27
Sandia National Laboratories
is a multimission laboratory
managed and operated by
National Technology &
Engineering Solutions of
Sandia LLC, a wholly owned
subsidiary of Honeywell
International inc. for the U.S.
Department of Energy's
National Nuclear Security
Administration under contract
DE-NA0003525.