CSI Pipeline & Extraction
Relevant source files
The following files were used as context for generating this wiki page:
The Channel State Information (CSI) Pipeline & Extraction system transforms raw WiFi radio signals into structured data for human sensing applications. It captures subcarrier-level amplitude and phase information from commodity WiFi hardware to detect environmental perturbations caused by human presence, vitals, and movement.
The pipeline operates as a multi-stage sequence involving hardware acquisition, signal preprocessing, feature extraction, and neural network inference. This process achieves privacy-preserving human sensing with high accuracy, reaching 87.2% for dense pose estimation without using cameras.
Sources: plans/phase1-specification/functional-spec.md:1-25, v2/crates/README.md:1-15
Pipeline Architecture
The CSI processing architecture is organized into distinct layers to handle data from the physical radio interface to the application-level pose estimation.
The diagram shows the end-to-end data flow from raw radio waves to high-level sensing outputs.
Sources: plans/overview.md:3-35, plans/phase1-specification/functional-spec.md:43-60
Processing Stages
- WiFi Signal Acquisition: Extracts raw CSI from 3×3 MIMO antenna arrays at sampling rates between 10-30 Hz.
- Phase Unwrapping: Corrects phase discontinuities and wrapping artifacts inherent in radio frequency measurements.
- Temporal Filtering: Applies moving average and linear detrending to stabilize the signal.
- Background Subtraction: Removes static environmental components to isolate human motion signatures.
- Noise Reduction: Filters systematic interference to improve the Signal-to-Noise Ratio (SNR) by at least 10dB.
Sources: plans/phase1-specification/functional-spec.md:30-65
Signal Processing Algorithms
The pipeline utilizes several state-of-the-art (SOTA) algorithms to refine raw CSI data into usable features. These are implemented primarily within the wifi-densepose-signal crate.
| Algorithm | Origin / Paper | Purpose |
|---|---|---|
| Conjugate Multiplication | SpotFi (SIGCOMM 2015) | Phase sanitization and ratio calculation |
| Hampel Filter | WiGest (2015) | Outlier removal and signal cleaning |
| Fresnel Zone Model | FarSense (MobiCom 2019) | Geometric motion modeling |
| CSI Spectrogram | Standard STFT | Temporal-frequency analysis |
| Subcarrier Selection | WiDance (MobiCom 2017) | Identifies sensitive subcarriers for motion |
| Body Velocity Profile | Widar 3.0 (MobiSys 2019) | Maps CSI to human movement velocity |
Sources: v2/crates/README.md:95-105
Feature Extraction Logic
The feature extraction stage generates a canonical set of metrics used for downstream neural network inference. To ensure cross-platform determinism, features are quantized before hashing or transmission.
The class diagram represents the structure of the extracted feature sets and the processor responsible for their creation.
Sources: archive/v1/data/proof/verify.py:53-150
Key Feature Sets
- Amplitude Mean/Variance: Captures the signal strength fluctuations across subcarriers.
- Phase Difference: Measures the spatial diversity between antennas.
- Power Spectral Density (PSD): Represents the power distribution of the signal across frequencies.
- Doppler Shift: Identifies the frequency shifts caused by moving objects (human subjects).
Sources: archive/v1/data/proof/verify.py:164-180
Implementation Performance
The Rust implementation (v2) provides significant performance gains over the original Python implementation (v1), allowing for real-time operation on edge hardware.
| Operation | Python v1 | Rust v2 | Speedup |
|---|---|---|---|
| CSI Preprocessing | ~5 ms | 5.19 μs | ~1000x |
| Phase Sanitization | ~3 ms | 3.84 μs | ~780x |
| Feature Extraction | ~8 ms | 9.03 μs | ~890x |
| Motion Detection | ~1 ms | 186 ns | ~5400x |
| Full Pipeline | ~15 ms | 18.47 μs | ~810x |
Sources: v2/crates/README.md:18-28
Configuration and Control
The pipeline behavior is controlled via configuration parameters that define filtering windows and sensitivity thresholds.
Pipeline Configuration Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
sampling_rate | integer | 100 | Frequency of CSI captures (Hz) |
window_size | integer | 56 | Number of subcarriers per frame |
noise_threshold | integer | -60 | Minimum dB level for signal processing |
smoothing_factor | float | 0.9 | Temporal smoothing coefficient |
enable_preprocessing | boolean | True | Toggles phase unwrapping and filtering |
Sources: archive/v1/data/proof/verify.py:53-65, plans/phase1-specification/api-spec.md:200-220
API Integration
The CSI stream is exposed via WebSocket and REST endpoints for real-time monitoring and external applications.
- Endpoint:
GET /pose/stream(Primary low-latency WebSocket) - Protocol: Primary real-time data is delivered via binary or JSON message formats over WebSockets, with latencies targeting <50ms.
Sources: plans/phase1-specification/api-spec.md:250-275, plans/phase1-specification/functional-spec.md:280-300
Conclusion
The CSI Pipeline & Extraction system serves as the foundational layer of the RuView project. By applying SOTA signal processing to WiFi CSI data, it enables complex applications such as vital sign monitoring (breathing/heart rate) and human pose estimation. The transition to a Rust-based pipeline ensures the throughput required for multi-node deployments and real-time disaster survivor detection (MAT).
Sources: v2/crates/README.md:30-55, plugins/ruview/skills/ruview-applications/SKILL.md:10-25