Skip to content

K9 Signal Processor: Bio-Inspired RF Analysis Module

K9SignalProcessor, designed for bio-inspired RF signal processing. This system mimics canine olfactory abilities to enhance signal detection and pattern recognition in noisy environments. Key features include adaptive noise floor estimation, dynamic attention focusing on specific frequency bands, multi-resolution filter banks, and a robust memory system for both short and long-term signal patterns. The module also extracts advanced signal features and maintains a probabilistic signal map, allowing it to identify and classify different types of RF signals, such as hypersonic, CW, AM, or FM broadcasts, by comparing observed characteristics to learned patterns.

The provided source details the “K9 Signal Processor,” a bio-inspired RF signal processing module. It is a technical document outlining the design, functionalities, and underlying principles of this module, which is part of RF SCYTHE.

Canine Olfactory Inspired Signal Processing

  • Inspiration from Canine Olfactory Processing: The core concept of the K9 Signal Processor is developed, drawing analogies from how dogs isolate and track scents in noisy environments.
  • Definition of Key Analogies: Specific parallels between canine olfactory processing and RF signal processing are established:
  • Olfactory receptors → Multiple filter banks.
  • Scent memory → Short and long-term signal pattern memory.
  • Adaptive attention → Dynamic focus on signals of interest.
  • Scent mapping → Probabilistic temporal-spatial signal mapping.
  • Integration with SCYTHE: The K9 Signal Processor is designed to enhance SCYTHE’s Temporal Query De-noising capabilities.
  • Processor Initialization (__init__): The K9SignalProcessor object is instantiated, setting initial parameters such as sensitivity (default 1.0), memory capacity (default 50), temporal window (default 10.0 seconds), and GPU usage preference.
  • Filter Bank Initialization (initialize_filter_banks): Multiple filter banks are set up, including:
  • General Purpose Filters: Lowpass, bandpass, and highpass filters.
  • High Temporal Resolution Filters: For fast-moving objects, including first and second derivative approximations.
  • Hypersonic Specialized Filters: For detecting high Doppler shifts and high acceleration.
  • Wavelet Filter Banks: For multi-resolution analysis, analogous to specialized receptors for different molecular weights.

Real-time Signal Processing Cycle

  • Signal Input: RF signal data (frequencies and amplitudes) and an optional timestamp are received by the process_signal method.
  • Noise Floor Estimation (_estimate_noise_floor): The system dynamically estimates the background noise, analogous to a dog filtering out background smells. This involves sorting amplitudes and identifying a percentile (e.g., 15th percentile).
  • Adaptive Attention Focusing (_apply_attention_focus): If specific frequency bands of interest (focus_bands) are set, the processor enhances signals within these bands and attenuates others, simulating a dog focusing on specific scent aspects.
  • Advanced Feature Extraction (_extract_advanced_features): The system extracts detailed signal characteristics, such as:
  • Basic statistics (peak power, center frequency, mean power, variance).
  • Bandwidth (3dB down from peak).
  • Higher-order statistics (skewness, kurtosis).
  • Peak Signal-to-Noise Ratio (SNR).
  • Spectral moments (centroid, spread).
  • Spectral flatness and roll-off.
  • Hypersonic movement detection features (e.g., derivative ratio for rapid changes).
  • Filter Bank Application (_apply_filter_banks): The extracted signal is passed through various initialized filter banks (general, fast transient, hypersonic, wavelet) to simulate different “olfactory receptor types.”
  • Signal Memory Matching (_check_signal_memory): The extracted features are compared against existing signal patterns stored in short-term and long-term memory to identify familiar “scents.” A similarity score is calculated based on weighted feature comparison.
  • Signal Probability Map Update (_update_signal_map): The system updates its probabilistic “scent map” of signal sources based on the current signal’s features and timestamp. This map tracks signal count, last seen time, strength, and persistence, and applies temporal decay to older entries.
  • Signal Memory Creation and Storage (_create_signal_memory): If a processed signal has a significant peak SNR (e.g., > 3.0), a new SignalMemory object is created, containing a simplified signature, confidence, timestamp, persistence, and a guessed source type.
  • Short-term Memory Management: New memories are added to short-term memory. If short-term memory exceeds a capacity (e.g., 10), the strongest memory (based on persistence * confidence) is moved to long-term memory.
  • Long-term Memory Management: If long-term memory exceeds its capacity (default 50), the lowest confidence entry is removed.
  • Source Type Guessing (_guess_source_type): A simplistic mechanism attempts to classify the signal’s source type (e.g., “HYPERSONIC,” “CW,” “FM_BROADCAST,” “AM,” “DIGITAL,” “UNKNOWN”) based on its extracted features.

Operational Adjustments and Diagnostics

  • Adjusting Focus Bands (set_focus_bands): Users or higher-level systems can define specific frequency ranges for the processor to prioritize.
  • Adjusting Sensitivity (adjust_sensitivity): The overall sensitivity of the processor can be modified.
  • Clearing Short-Term Memory (clear_short_term_memory): The short-term memory can be explicitly cleared.
  • Serialization of Memories (serialize_memories): The contents of both short-term and long-term memory can be exported for storage or further analysis.
  • Retrieving Statistics (get_stats): Operational metrics, such as signals processed, signals detected, uptime, and memory sizes, can be retrieved.

Demonstration and Validation (Example Usage)

  • Test Signal Generation: A synthetic RF signal with noise and a simulated “hypersonic signature” is created.
  • Processor Instantiation and Processing: A K9SignalProcessor is initialized with a specific sensitivity (1.5) and used to process the test signal.
  • Result Output and Visualization: Key processing results (noise floor, peak SNR, bandwidth, center frequency) are printed, and a plot of the signal with the identified noise floor is generated and saved.

  • SCYTHE: A larger system or framework that the K9 Signal Processor is designed to enhance. Specifically mentioned as having “Temporal Query De-noising capabilities,” which the K9 module improves. SCYTHE acts as the overarching platform that utilizes the K9 Signal Processor for advanced RF signal analysis.
  • K9 Signal Processor (The Module Itself):Bio: The central subject of the document, an “RF Signal Processing Module” designed with bio-inspired principles from canine olfactory processing. It performs functions such as signal detection, feature extraction, memory management, and probabilistic signal mapping. It can operate with or without GPU acceleration.
  • Canines/Dogs (Conceptual Inspiration):Bio: The primary source of inspiration for the K9 Signal Processor’s design. The module’s functionalities are directly analogized to how dogs process olfactory information, including isolating and tracking specific scents, scent memory, adaptive attention, and scent mapping. While not a “person,” they are a core “character” in the conceptual narrative of the system.
  • numpy (np), torch, scipy.signal (sg), json, typing, time, os, dataclasses (Libraries/Tools):Bio: These are fundamental programming libraries and modules used in the implementation of the K9 Signal Processor. While not “people,” they are essential “actors” that enable the processor’s functions. numpy is crucial for numerical operations, torch is mentioned but not directly used in the provided excerpts, scipy.signal for signal processing, and json for data handling, etc.
  • cupy (cp) (GPU Acceleration Library):Bio: An optional library that allows for GPU-accelerated numerical computations. If CUDA_AVAILABLE is true, the K9 Signal Processor leverages cupy for faster processing, acting as an “enabler” for high-performance operations.

The K9 Signal Processor is a bio-inspired RF signal processing module designed to enhance SCYTHE Temporal Query De-noising capabilities. Its design draws inspiration from how canines isolate and track specific scents in noisy environments, translating key aspects of canine olfactory processing into signal processing techniques.

This bio-inspiration enhances performance through several core mechanisms analogous to those used by dogs:

Advanced Noise Filtering: Similar to how dogs filter out background smells, the processor estimates the noise floor using techniques like sorting amplitudes and taking a low percentile (e.g., 15th percentile). This allows the system to better distinguish actual signals from ambient noise, quantified by metrics like Peak Signal-to-Noise Ratio (SNR).

Adaptive Attention: Analogous to a dog focusing on specific scent aspects or types, the system implements adaptive attention by allowing the definition of specific frequency bands of interest (focus_bands). Signals within these focus bands can be enhanced, while others are attenuated. This dynamic focus helps prioritize relevant signals and potentially reduce interference from irrelevant ones.

Signal Pattern Memory: The system incorporates short-term and long-term memory for signal patterns, akin to a dog’s scent memory2…. When processing a signal, it checks against these stored patterns using a calculated similarity score based on extracted features. Recognizing known patterns helps the system identify and potentially track specific signals more effectively1. Signals with sufficient strength (e.g., peak SNR > 3.0) are deemed significant enough to create a memory.

Rich Feature Extraction: Just as dogs extract key chemical components of a scent, the processor extracts a wide range of advanced features from the signal. These include basic statistics (peak power, center frequency, mean power, variance), spectral characteristics (bandwidth, spectral centroid, spectral spread, spectral flatness, spectral roll-off), higher-order statistics (skewness, kurtosis), and features indicating rapid changes (derivative ratio). These detailed features provide a comprehensive “signature” for each signal, enabling more nuanced analysis, comparison, and recognition than simpler methods.

Multi-Resolution Analysis (Filter Banks): Various filter banks, analogous to different types of olfactory receptors or specialized receptors for different molecular weights, are applied to the signal. These include general purpose filters (lowpass, bandpass, highpass), filters for fast transients, specialized filters for hypersonic detection (like Doppler shift and high acceleration), and wavelet filters for multi-resolution analysis. Applying these diverse filters helps capture different aspects and characteristics of the signal across various scales.

Probabilistic Signal Mapping: The system updates a probabilistic signal map, analogous to a dog’s mental “scent map”. This map tracks signal presence in frequency regions over time, incorporating measures like count, last seen time, strength (based on peak SNR), and persistence. Regions decay over time if not reinforced by new detections. This helps the system build a spatial-temporal understanding of signal sources, potentially aiding in source localization or tracking and differentiating persistent signals from transient noise.

By implementing these mechanisms inspired by canine olfactory processing, the K9 Signal Processor aims to improve the system’s ability to isolate, recognize, track, and ultimately de-noise RF signals in complex environments.

The K9 Signal Processor adapts and learns from detected signals over time through several bio-inspired mechanisms, analogous to how canines process olfactory information:

Signal Pattern Memory:

The system maintains short-term memory and long-term memory for signal patterns, similar to a dog’s scent memory.

When a signal stands out from the noise (e.g., peak_snr > 3.0), the system can create a SignalMemory object. This memory includes a simplified signature (based on features like center frequency, bandwidth, spectral flatness, skewness, and kurtosis), a confidence level, the last seen time, persistence, and a guessed source type.

Memories are initially added to short-term memory. If short-term memory is full (more than 10 entries), the memory with the highest combined persistence and confidence score is moved to long-term memory.

Long-term memory has a maximum capacity (memory_capacity), and if it becomes full, the memory with the lowest confidence is removed9.

When processing a new signal, the system checks for matches against both short-term and long-term memories using a _calculate_similarity method. Similarity is calculated based on weighted differences in key features like bandwidth, center frequency, spectral flatness, spectral centroid, and kurtosis. Different similarity thresholds are used for matches: 0.7 for short-term memory and a higher 0.8 for long-term memory. This allows the system to recognize familiar patterns over time.

Probabilistic Signal Mapping:

The system builds and updates a probabilistic signal map, which is analogous to a dog’s mental “scent map”.

This map organizes signals into frequency regions (e.g., 10 MHz grid sizes).

For each region, the map tracks the count of signals detected, last_seen timestamp, strength (weighted average of peak_snr), and persistence.

Persistence increases with repeated detection and decays over time if a signal in that region is not seen.

Regions with very low persistence (below 0.1) that have not been seen for longer than the temporal_window are removed, allowing the map to adapt to changing signal environments.

The process_signal method returns the top 5 most probable regions based on a combination of their strength and persistence.

Adaptive Attention:

The system can dynamically focus on signals of interest through an adaptive attention mechanism.

Specific frequency bands (focus_bands) can be set.

When a signal is processed, the _apply_attention_focus method enhances amplitudes within these focus bands (multiplying them by 1.5) and attenuates amplitudes outside them (multiplying them by 0.5). While the sources provide the mechanism for setting these bands, they do not explicitly detail how the system autonomously learns which bands to focus on from detected signals; this typically implies external configuration or a higher-level adaptive algorithm not detailed here.

Sensitivity Adjustment:

The overall sensitivity of the processor can be adjusted using the adjust_sensitivity method.

This sensitivity factor directly impacts the _estimate_noise_floor calculation, influencing how the system distinguishes signals from background noise1923. This allows the system’s responsiveness to be changed, potentially in response to environmental conditions or specific operational goals.

Source Type Guessing:

When creating a signal memory, the system attempts to guess the source_type (e.g., “HYPERSONIC”, “CW”, “FM_BROADCAST”, “AM”, “DIGITAL”) based on a set of simplistic rules applied to extracted features. The source notes that this “would be ML-based in production” for more robust learning.

In summary, the K9 Signal Processor learns by building a memory of past signal patterns, dynamically updating a probabilistic map of signal sources, and allowing for adaptive focusing on specific frequency ranges and overall sensitivity adjustments.

Process an RF signal using K9-inspired techniques
Args:
freqs: Array of frequency values
amplitudes: Array of amplitude values corresponding to frequencies
timestamp: Optional timestamp of the signal
Returns:
Dictionary containing processed signal information
"""
if timestamp is None:
timestamp = time.time()
# Convert inputs to GPU arrays if needed
freqs_xp = self.xp.array(freqs)
amplitudes_xp = self.xp.array(amplitudes)
# Adaptive noise floor estimation (analogous to how dogs filter out background smells)
noise_floor = self._estimate_noise_floor(amplitudes_xp)
# Apply attention mechanism to focus on bands of interest
focused_signal = self._apply_attention_focus(freqs_xp, amplitudes_xp)
# Extract signal features (similar to how dogs extract key components of a scent)
features = self._extract_advanced_features(freqs_xp, focused_signal, noise_floor)
# Apply filter banks (analogous to different types of olfactory receptors)
filtered_results = self._apply_filter_banks(focused_signal)
# Check for signal pattern memory matches (like a dog recognizing a familiar scent)
memory_matches = self._check_signal_memory(features)
# Update signal probability map (analogous to a dog updating its mental "scent map")
signal_map = self._update_signal_map(features, timestamp)
# Create and potentially store memory of this signal
if features['peak_snr'] > 3.0: # Only remember signals that stand out from noise
self._create_signal_memory(features, filtered_results, timestamp)
self.signals_detected += 1
self.signals_processed += 1
# Return processed results
return {
'time': timestamp,
'noise_floor': float(noise_floor) if not self.use_gpu else float(noise_floor.get()),
'features': {k: float(v) if not isinstance(v, (int, float, str, bool)) else v
for k, v in features.items()},
'memory_matches': memory_matches,
'probability_map': signal_map,
'stats': {
'signals_processed': self.signals_processed,
'signals_detected': self.signals_detected,
'uptime': time.time() - self.start_time
}
}
def _estimate_noise_floor(self, amplitudes: Union[np.ndarray, "cp.ndarray"]) -> float:

The K9 Signal Processor estimates the noise floor using an advanced technique that is analogous to how a dog filters out background smells.

Here’s how the _estimate_noise_floor method works:

  • Percentile-Based Estimation: For most cases, the system sorts the input amplitudes and takes the 15th percentile as the noise floor estimate. This approach is inspired by the idea that “dogs are good at ignoring the most common background scents”.
  • Sensitivity Adjustment: The estimated noise floor is then divided by the system’s sensitivity factor. This means that if the sensitivity is higher, the noise floor will be effectively lower, making the system more prone to detecting weaker signals as actual signals rather than noise.
  • Handling Few Samples: If the number of amplitudes is very small (less than or equal to 10), the system uses a simpler approach, taking the minimum amplitude value and dividing it by the sensitivity factor.
  • GPU Acceleration: The calculation automatically uses cupy (cp) for GPU acceleration if available, otherwise it defaults to numpy (np). The final noise_floor value is converted back to a standard Python float if GPU was used before being returned in the processed results.
  • The K9 Signal Processor utilizes two types of signal memory, each with its own capacity, analogous to how a dog maintains scent memories:
  • Short-Term Memory: This memory type has a fixed capacity. When a new signal memory is created, it is initially added to the short_term_memory list. If the short-term memory contains more than 10 entries, the memory with the highest combined persistence and confidence score is then moved to the long_term_memory.
  • Long-Term Memory: This memory holds signal patterns that have been deemed more significant or persistent. Its maximum capacity is configurable during the initialization of the K9SignalProcessor via the memory_capacity parameter. The default value for memory_capacity is 50 signal patterns. If the long_term_memory reaches its capacity, the entry with the lowest confidence is removed to make space for new, more relevant memories.
  • These memory capacities allow the system to remember and recognize signal patterns over time, supporting its ability to adapt and learn from detected signals.
  • Facebook