docs/adr/ADR-064-multimodal-ambient-intelligence.md
Status: Proposed Date: 2026-03-15 Deciders: @ruvnet Related: ADR-063 (mmWave fusion), ADR-039 (edge intelligence), ADR-042 (CHCI), ADR-029 (RuvSense multistatic), ADR-024 (AETHER contrastive embeddings)
With ADR-063 we demonstrated real-time fusion of WiFi CSI (ESP32-S3, COM7) and 60 GHz mmWave radar (Seeed MR60BHA2 on ESP32-C6, COM4). The live capture showed:
This ADR explores the full spectrum of what becomes possible when these modalities are combined — from immediately practical applications to speculative research directions.
Current state: CSI-only fall detection with 15.0 rad/s² threshold (v0.4.3.1). With fusion: mmWave confirms fall via range-velocity signature (sudden height drop + impact deceleration). CSI provides the alert; mmWave provides the confirmation.
CSI phase acceleration > 15 rad/s² ─┐
├─► AND gate + temporal correlation
mmWave: height drop > 50cm in <1s ──┘ → CONFIRMED FALL (call 911)
Impact: Elderly care facilities spend $34B/year on fall injuries. A $24 sensor node with zero false positives replaces $200/month medical alert wearables that residents forget to wear.
Sensors used: mmWave (BR/HR), CSI (bed occupancy, movement), BH1750 (light)
| Metric | Source | Method |
|---|---|---|
| Sleep onset | CSI motion → still transition | Phase variance drops below threshold |
| Sleep stages | mmWave BR variability | BR 12-20 = light sleep, 6-12 = deep sleep |
| REM detection | mmWave HR variability | HR variability increases during REM |
| Restlessness | CSI motion energy | Counts of motion episodes per hour |
| Room darkness | BH1750 | Correlate light exposure with sleep latency |
| Wake events | CSI + mmWave | Motion + HR spike = awakening |
Output: Sleep score (0-100), time in each stage, disturbance log. No wearable required. Works through a mattress.
Sensors: CSI (room-level presence through walls), mmWave (precise count + distance), BH1750 (ambient light)
Energy savings: 20-40% HVAC reduction by not heating/cooling empty rooms.
Sensor placement: One CSI node outside bathroom (through-wall), one mmWave inside.
mmWave at crib-side: Contactless breathing monitoring at 0.5-1m range.
Method: CSI tracks walking pattern across the room; mmWave measures stride length and velocity.
| Feature | Source | Clinical Use |
|---|---|---|
| Gait velocity | mmWave Doppler | < 0.8 m/s = fall risk indicator |
| Stride variability | CSI phase patterns | High variability = cognitive decline marker |
| Turning stability | CSI + mmWave | Difficulty turning = Parkinson's indicator |
| Get-up time | mmWave (sit→stand) | Timed Up and Go (TUG) test, contactless |
Clinical value: Gait velocity is called the "sixth vital sign" — it predicts hospitalization, cognitive decline, and mortality. Currently requires a $10,000 GAITRite mat. A $24 sensor node replaces it.
mmWave at desk: Continuous HR variability (HRV) monitoring during work.
Application: Smart office that adjusts lighting, temperature, and notification frequency based on detected stress level.
CSI: Already has DTW template matching gesture classifier (ruvsense/gesture.rs).
mmWave: Adds range-Doppler micro-gesture detection (hand wave, swipe, circle).
Use case: Wave at the sensor to turn off lights. Swipe to change music. No voice assistant, no camera, no wearable.
mmWave BR patterns over days/weeks:
| Pattern | Indicator |
|---|---|
| BR > 20 at rest, trending up | Possible pneumonia/COVID |
| Periodic breathing (Cheyne-Stokes) | Heart failure |
| Obstructive apnea pattern | Sleep apnea (> 5 events/hour) |
| BR variability decrease | COPD exacerbation |
CSI adds: Cough detection (sudden phase disturbance pattern), movement reduction (malaise indicator).
Longitudinal tracking via ruvsense/longitudinal.rs (Welford stats, biomechanics drift detection) — the system learns your normal breathing pattern and alerts on deviations.
3-6 CSI nodes (through walls) + 1-2 mmWave (key rooms):
Kitchen (CSI): person detected, high motion → cooking
Living room (mmWave + CSI): 2 people, low motion, HR stable → watching TV
Bedroom (CSI): person detected, minimal motion → sleeping
Bathroom (CSI): person entered 3 min ago, still inside → OK
Front door (CSI): motion pattern = leaving/arriving
Output: Activity timeline, daily routine deviation alerts, loneliness detection (no visitors in N days).
mmWave at < 1m range: Beat-to-beat interval extraction from chest wall displacement.
Challenge: Requires sub-millimeter displacement resolution. The MR60BHA2 may lack the SNR for single-beat extraction, but clinical-grade 60 GHz modules (Infineon BGT60TR13C) can achieve this.
CSI role: Validates that the person is stationary (motion corrupts beat-to-beat analysis).
Theory: Pulse Transit Time (PTT) between two body points correlates with blood pressure. With two mmWave sensors at different body positions, PTT can be estimated from the phase difference of reflected chest/wrist signals.
Feasibility: Academic papers demonstrate ±10 mmHg accuracy in controlled settings. Far from clinical grade but useful for trending.
Method: Multiple CSI nodes form a tomographic array. Each TX-RX pair measures signal attenuation. Inverse problem (ISTA L1 solver, already in ruvsense/tomography.rs) reconstructs a 3D voxel grid of where absorbers (people) are.
mmWave adds: Range-gated targets as sparse priors for the tomographic reconstruction, dramatically reducing the ill-posedness of the inverse problem.
CSI tomography (coarse 3D grid, 50cm resolution) ─┐
├─► Sparse fusion
mmWave targets (precise range, cm resolution) ─────┘ → 10cm 3D occupancy map
CSI phase patterns (body/arm movement) + mmWave Doppler (hand micro-movements):
ADR-024) learn to map (CSI phase sequence, mmWave Doppler) → sign labelTraining data: Record CSI + mmWave while performing signs with a camera as ground truth, then deploy camera-free.
Multimodal features:
| Feature | Source | Cognitive Load Indicator |
|---|---|---|
| HR increase | mmWave | Sympathetic activation |
| BR irregularity | mmWave | Cognitive interference |
| Posture stiffness | CSI motion variance | Reduced when concentrating |
| Fidgeting frequency | CSI high-freq motion | Increases with frustration |
| Micro-saccade proxy | mmWave head micro-movement | Correlated with attention |
Application: Adaptive learning systems that slow down when the student is overloaded. Smart meeting rooms that detect when participants are disengaged.
CSI mesh as indoor GPS: A network of CSI nodes creates a spatial RF fingerprint map. A robot or drone with an ESP32 can localize itself by matching its observed CSI to the map.
mmWave on the robot: Obstacle avoidance + human detection (don't collide with people).
CSI from the environment: Tells the robot where people are in adjacent rooms (through walls) so it can plan routes that avoid occupied spaces.
CSI multipath signature over months/years:
ruvsense/cross_room.rs (environment fingerprinting) tracks these long-term driftsApplication: Early warning for structural degradation in bridges, tunnels, old buildings.
50+ nodes across a building:
Each node runs local edge intelligence (ADR-039). The hive-mind consensus system (ADR-062) aggregates across nodes. Emergent behaviors:
If multiple people are in a room and the system can estimate individual HR/HRV (via multi-target mmWave + CSI subcarrier clustering), you can detect:
During REM sleep (detected via mmWave HR variability + CSI minimal body movement):
Based on published lucid dreaming induction research (e.g., LaBerge's MILD technique with external cues).
WiFi signals pass through plant tissue differently based on water content.
Academic proof-of-concept: "Sensing Plant Water Content Using WiFi Signals" (2023).
(For the entertainment/hobbyist market)
Actual explanation: Temperature changes, HVAC drafts, and EMI cause CSI fluctuations. But it would sell.
| Application | Sensors Needed | Effort | Value | Priority |
|---|---|---|---|---|
| Fall detection (zero false positive) | CSI + mmWave | 1 week | Critical (healthcare) | P0 |
| Sleep monitoring | mmWave + BH1750 | 2 weeks | High (wellness) | P1 |
| Occupancy HVAC/lighting | CSI + mmWave | 1 week | High (energy) | P1 |
| Baby breathing monitor | mmWave | 1 week | Critical (safety) | P1 |
| Bathroom safety | CSI + mmWave | 1 week | Critical (elderly) | P1 |
| Gait analysis | CSI + mmWave | 3 weeks | High (clinical) | P2 |
| Gesture control | CSI + mmWave | 4 weeks | Medium (UX) | P2 |
| Multi-room activity | CSI mesh + mmWave | 4 weeks | High (elder care) | P2 |
| Respiratory screening | mmWave longitudinal | 6 weeks | High (health) | P2 |
| Stress/emotion detection | mmWave HRV + CSI | 6 weeks | Medium (wellness) | P3 |
| RF tomography | CSI mesh + mmWave | 8 weeks | Medium (research) | P3 |
| Sign language | CSI + mmWave + ML | 12 weeks | Medium (accessibility) | P3 |
| Cardiac arrhythmia | High-res mmWave | 12 weeks | High (clinical) | P3 |
| Swarm sensing | 50+ nodes | 16 weeks | High (safety) | P3 |
Document these possibilities as the product roadmap for the RuView multimodal ambient intelligence platform. Prioritize P0-P1 items (fall detection, sleep, occupancy, baby monitor, bathroom safety) for immediate implementation using the existing hardware (ESP32-S3 + MR60BHA2 + BH1750).