跳转至

相干人体信道成像(CHCI)领域模型

领域驱动设计规范

通用语言

术语 定义
相干人体信道成像(CHCI) 一种专门构建的射频感知协议,利用相位锁定探测、多频段融合和认知波形自适应,以亚毫米分辨率重建人体表面和生理运动
探测帧 一种具有已知导频结构的确定性 OFDM 传输(NDP 或自定义突发),以固定周期发送用于信道测量——不同于从数据流量中提取的被动 CSI
相位相干性 多个射频节点共享公共相位参考的属性,使无需逐节点 LO 漂移校正即可进行复数值信道测量
参考时钟 通过同轴电缆分发到所有 CHCI 节点的共享振荡器(TCXO + PLL),同时提供 40 MHz 定时参考和带内相位参考信号
认知波形 一种探测波形,其参数(周期、带宽、频段选择、功率、子载波子集)基于从人体模型推断的当前场景状态实时自适应
衍射断层成像 从多个节点对和多个频段的复数值信道响应中相干重建人体表面几何形状——生成表面轮廓而非体积不透明度
感知模式 六种运行状态之一(IDLE、ALERT、ACTIVE、VITAL、GESTURE、SLEEP),决定波形参数和处理流水线配置
微突发 一种非常短(4–20 μs)的确定性 OFDM 符号,以高周期(1–5 kHz)发送,用于在不引入完整 802.11 帧开销的情况下最大化多普勒分辨率
多频段融合 同时在 2.4 GHz 和 5 GHz(可选 6 GHz)进行探测,并使用人体模型先验作为约束,将其融合为同一潜在运动场的投影
位移下限 在给定距离下可检测的最小表面位移,由相位噪声、相干平均深度和天线数量决定:δ_min = λ/(4π) × σ_φ/√(N_ant × N_avg)
信道对比度 有人体存在时的复信道响应与空房间参考响应之比——衍射断层成像的输入
相干差值 连续观测窗口之间相位相干性指标的变化——认知波形转换的触发信号
NDP 空数据 PPDU——一种 802.11bf 标准探测帧,仅包含前导和训练字段,没有数据载荷
感知可用窗口(SAW) 802.11bf 定义的时间间隔,在此期间允许感知发起方和响应方之间进行 NDP 探测交换
人体模型先验 从已知人体尺寸(节段长度、关节角度限制)推导出的几何约束,用于正则化跨频段融合和断层重建
相位参考信号 位于工作频段中心频率的连续波音调,与 40 MHz 时钟一起分发,使所有节点能够测量并补偿残余相位偏移

限界上下文

1. 波形生成上下文

职责:在所有 CHCI 节点上生成、调度和传输确定性探测波形。

┌──────────────────────────────────────────────────────────────┐
│              Waveform Generation Context                      │
├──────────────────────────────────────────────────────────────┤
│                                                                │
│  ┌───────────────┐    ┌───────────────┐    ┌──────────────┐  │
│  │ NDP Sounding  │    │ Micro-Burst   │    │ Chirp        │  │
│  │ Generator     │    │ Generator     │    │ Generator    │  │
│  │ (802.11bf)    │    │ (Custom OFDM) │    │ (Multi-BW)   │  │
│  └───────┬───────┘    └───────┬───────┘    └───────┬───────┘  │
│          │                    │                    │          │
│          └────────────┬───────┴────────────────────┘          │
│                       ▼                                       │
│            ┌──────────────────┐                               │
│            │ Sounding         │                               │
│            │ Scheduler        │ ← Cadence, band, power from  │
│            │ (Aggregate Root) │   Cognitive Engine             │
│            └────────┬─────────┘                               │
│                     │                                         │
│          ┌──────────┴──────────┐                             │
│          ▼                     ▼                             │
│  ┌──────────────┐    ┌──────────────┐                       │
│  │ TX Chain     │    │ TX Chain     │                       │
│  │ (2.4 GHz)   │    │ (5 GHz)      │                       │
│  └──────────────┘    └──────────────┘                       │
│                                                               │
│  Events emitted:                                             │
│    SoundingFrameTransmitted { band, timestamp, seq_id }      │
│    BurstSequenceCompleted { burst_count, duration }           │
│    WaveformConfigChanged { old_mode, new_mode }               │
│                                                               │
└──────────────────────────────────────────────────────────────┘

聚合: - SoundingScheduler(聚合根)— 根据当前波形配置,跨节点和频段编排探测帧传输

实体: - SoundingFrame — 单个 NDP 或微突发传输,包含序列 ID、频段、时间戳和导频结构 - BurstSequence — 一个观测窗口内有序的微突发集合,用于相干多普勒积分 - WaveformConfig — 当前波形参数集(周期、带宽、频段选择、功率电平、子载波掩码)

值对象: - SoundingCadence — 以 Hz 为单位的传输速率(1–5000),受监管占空比限制约束 - BandSelection — 当前模式的活动频段集合 {2.4 GHz, 5 GHz, 6 GHz} - SubcarrierMask — 选择活动子载波以进行聚焦感知的位向量(VITAL 模式使用最优子集) - BurstDuration — 单个突发的长度,单位为微秒(4–20 μs) - DutyCycle — 计算得出的占空比百分比,不得超过监管限制(ETSI:最大突发 10 ms)

领域服务: - RegulatoryComplianceChecker — 在应用之前,验证任意波形配置是否满足 FCC Part 15.247 和 ETSI EN 300 328 约束 - BandCoordinator — 管理时分或同时多频段探测,以避免自干扰


2. 时钟同步上下文

职责:在感知网格中的所有 CHCI 节点之间分发并维护相位相干定时。

┌──────────────────────────────────────────────────────────────┐
│              Clock Synchronization Context                    │
├──────────────────────────────────────────────────────────────┤
│                                                                │
│  ┌───────────────┐                                           │
│  │ Reference      │                                           │
│  │ Clock Module   │ ← TCXO (40 MHz, ±0.5 ppm)               │
│  │ (Aggregate     │                                           │
│  │  Root)         │                                           │
│  └───────┬────────┘                                           │
│          │                                                    │
│  ┌───────┴────────┐                                           │
│  │ PLL Synthesizer│ ← SI5351A: generates 40 MHz clock        │
│  │                │   + 2.4/5 GHz CW phase reference         │
│  └───────┬────────┘                                           │
│          │                                                    │
│    ┌─────┼─────────────────┐                                 │
│    ▼     ▼                 ▼                                 │
│  ┌─────┐ ┌─────┐        ┌─────┐                            │
│  │Node1│ │Node2│  ...   │NodeN│                            │
│  │Phase│ │Phase│        │Phase│                            │
│  │Lock │ │Lock │        │Lock │                            │
│  └──┬──┘ └──┬──┘        └──┬──┘                            │
│     │       │              │                                 │
│     └───────┼──────────────┘                                 │
│             ▼                                                │
│  ┌──────────────────┐                                        │
│  │ Phase Calibration │ ← Measures residual offset            │
│  │ Service           │   per node at startup                 │
│  └──────────────────┘                                        │
│                                                               │
│  Events emitted:                                             │
│    ClockLockAcquired { node_id, offset_ppm }                 │
│    PhaseDriftDetected { node_id, drift_deg_per_min }         │
│    CalibrationCompleted { residual_offsets: Vec<f64> }        │
│                                                               │
└──────────────────────────────────────────────────────────────┘

聚合: - ReferenceClockModule(聚合根)— 整个 CHCI 网格的唯一定时真值来源

实体: - NodePhaseLock — 按节点跟踪锁定状态、残余偏移和漂移速率的状态 - CalibrationSession — 一种定时过程,在静态条件下测量并记录每个节点的相位偏移

值对象: - PhaseOffset — 时钟分发后每个节点每个子载波的残余相位偏移(以度为单位) - DriftRate — 相位漂移(以度/分钟为单位),必须保持在阈值以下(心跳感测为 0.05°/min) - LockStatus — 枚举 {Acquiring, Locked, Drifting, Lost},指示当前同步状态

领域服务: - PhaseCalibrationService — 运行启动和周期性校准例程;替代当前 phase_align.rs 中的统计 LO 估计 - DriftMonitor — 持续后台服务,检测任何节点超过漂移阈值并触发重新校准

不变量: - 所有节点必须在 CHCI 感测开始前达到 Locked 状态 - 任何 10 分钟窗口内,每个子载波的相位方差必须保持 ≤ 0.5° RMS - 如果任何节点转为 Lost,系统回退到统计相位校正(遗留模式)


3. 相干信号处理上下文

职责:使用衍射层析和多频段融合,将原始相干 CSI 处理为体表面表示。

┌──────────────────────────────────────────────────────────────────┐
│              Coherent Signal Processing Context                   │
├──────────────────────────────────────────────────────────────────┤
│                                                                    │
│  ┌───────────────┐    ┌───────────────┐    ┌──────────────────┐  │
│  │ Coherent CSI  │    │ Reference     │    │ Calibration      │  │
│  │ Stream        │    │ Channel       │    │ Store            │  │
│  │ (per node     │    │ (empty room)  │    │ (per deployment) │  │
│  │  per band)    │    │               │    │                  │  │
│  └───────┬───────┘    └───────┬───────┘    └────────┬─────────┘  │
│          │                    │                     │            │
│          └────────────┬───────┴─────────────────────┘            │
│                       ▼                                           │
│           ┌───────────────────────┐                              │
│           │ Channel Contrast      │                              │
│           │ Computer              │                              │
│           │ H_c = H_meas / H_ref  │                              │
│           └───────────┬───────────┘                              │
│                       │                                           │
│            ┌──────────┴──────────┐                               │
│            ▼                     ▼                               │
│  ┌──────────────────┐  ┌──────────────────┐                    │
│  │ Diffraction      │  │ Multi-Band       │                    │
│  │ Tomography       │  │ Coherent Fusion  │                    │
│  │ Engine           │  │                  │                    │
│  │ (Aggregate Root) │  │ Body model priors │                    │
│  │                  │  │ as soft           │                    │
│  │ Complex          │  │ constraints       │                    │
│  │ permittivity     │  │                  │                    │
│  │ contrast per     │  │ Cross-band phase  │                    │
│  │ voxel            │  │ alignment         │                    │
│  └────────┬─────────┘  └────────┬─────────┘                    │
│           │                     │                               │
│           └──────────┬──────────┘                               │
│                      ▼                                          │
│           ┌──────────────────┐                                  │
│           │ Body Surface     │──▶ DensePose UV Mapping          │
│           │ Reconstruction   │                                  │
│           └──────────────────┘                                  │
│                                                                  │
│  Events emitted:                                                │
│    VoxelGridUpdated { grid_dims, resolution_cm, timestamp }      │
│    BodySurfaceReconstructed { n_vertices, confidence }           │
│    CoherenceDegradation { node_id, band, severity }              │
│                                                                  │
└──────────────────────────────────────────────────────────────────┘

聚合: - DiffractionTomographyEngine(聚合根)——从所有节点对和频段的相干通道对比度测量中重建三维人体表面几何形状

实体: - CoherentCsiFrame — 单个相干通道测量:每个子载波的复数 H(f),包含相位锁定元数据、节点 ID、频段、序列 ID 和时间戳 - ReferenceChannel — 每个链路每个频段的空房间复数通道响应,用作通道对比度计算中的分母 - VoxelGrid — 复数介电常数对比度值的三维网格,是衍射层析的输出 - BodySurface — 从体素网格中提取的等值面,表示为三角网格或点云

值对象: - ChannelContrast — 每个链路每个子载波的复数比值 H_measured/H_reference — 层析的基本输入 - SubcarrierResponse — 单个子载波频率处的复数(幅度 + 相位)通道响应 - VoxelCoordinate — 房间坐标系中的 (x, y, z) 位置及其关联的复数介电常数值 - SurfaceNormal — 每个表面顶点处的方向向量,由介电常数梯度导出 - CoherenceMetric — 复数相干分数(幅度 + 相位),替代当前实数 Z 分数

领域服务: - ChannelContrastComputer — 将测量通道除以参考通道,以隔离人体引起的扰动 - MultiBandFuser — 使用人体模型先验在各频段间对齐相位,并组合成统一频谱响应 - SurfaceExtractor — 对介电常数对比度网格应用行进立方体或类似等值面算法

RuVector 集成: - ruvector-attention → 跨频段注意力权重,用于频率融合(扩展 CrossViewpointAttention) - ruvector-solver → 用于欠定层析反演的稀疏重建 - ruvector-temporal-tensor → 跨帧表面重建的时间相干性


4. 认知波形上下文

职责:根据场景状态实时调整感知波形,优化感知保真度与功耗之间的权衡。

┌──────────────────────────────────────────────────────────────┐
│              Cognitive Waveform Context                       │
├──────────────────────────────────────────────────────────────┤
│                                                                │
│  ┌───────────────────────────────────────────────────────┐   │
│  │              Scene State Observer                       │   │
│  │                                                         │   │
│  │  Body Model ──▶ ┌──────────────┐                       │   │
│  │                  │ Coherence    │                       │   │
│  │  Coherence   ──▶│ Delta        │──▶ Mode Transition    │   │
│  │  Metrics        │ Analyzer     │    Signal              │   │
│  │                  └──────────────┘                       │   │
│  │  Motion      ──▶                                       │   │
│  │  Classifier                                            │   │
│  └───────────────────────────────────────────────────────┘   │
│                       │                                       │
│                       ▼                                       │
│           ┌───────────────────────┐                           │
│           │ Sensing Mode          │                           │
│           │ State Machine         │                           │
│           │ (Aggregate Root)      │                           │
│           │                       │                           │
│           │ IDLE ──▶ ALERT ──▶ ACTIVE                        │
│           │                   ╱  │  ╲                         │
│           │              VITAL  GESTURE  SLEEP               │
│           │                                                   │
│           └───────────┬───────────┘                           │
│                       │                                       │
│                       ▼                                       │
│           ┌───────────────────────┐                           │
│           │ Waveform Parameter    │                           │
│           │ Computer              │                           │
│           │                       │──▶ WaveformConfig          │
│           │ Mode → {cadence,      │    (to Waveform            │
│           │   bandwidth, bands,   │     Generation Context)    │
│           │   power, subcarriers} │                           │
│           └───────────────────────┘                           │
│                                                               │
│  Events emitted:                                             │
│    SensingModeChanged { from, to, trigger_reason }            │
│    PowerBudgetAdjusted { new_budget_mw, mode }                │
│    SubcarrierSubsetOptimized { selected: Vec<u16>, criterion }│
│                                                               │
└──────────────────────────────────────────────────────────────┘

聚合: - SensingModeStateMachine(聚合根)——管理六种感知模式之间的转换,依据相干差值、运动分类和人体模型状态

实体: - SensingMode — {IDLE, ALERT, ACTIVE, VITAL, GESTURE, SLEEP} 之一,并带有相应的波形参数集 - ModeTransition — 带有触发原因、时间戳和滞回计数器的状态变更事件 - PowerBudget — 每种模式的功率分配,约束节奏和发射功率

值对象: - CoherenceDelta — 连续观测窗口之间相干性变化的幅度——主要模式转换触发器 - MotionClassification — 枚举 {Static, Breathing, Walking, Gesturing, Falling},由微多普勒特征导出 - ModeHysteresis — 防止模式快速振荡的计数器:转换前需要 N 个连续触发事件(默认 N=3) - OptimalSubcarrierSet — 用于生命体征提取的信噪比最高的子载波子集,根据近期通道统计计算得出

领域服务: - SceneStateObserver — 将人体模型输出、相干性指标和运动分类器融合为统一场景状态描述符 - ModeTransitionEvaluator — 应用迟滞和优先级规则,以确定是否应发生模式切换 - SubcarrierSelector — 使用 Fisher 信息准则或 SNR 排序,为生命体征模式识别最优子载波子集 - PowerManager — 按模式计算 TX 功率和占空比,使其保持在监管和电池约束范围内

不变量: - 在 30 秒未检测到目标后必须进入 IDLE 模式(可配置) - 模式切换必须满足迟滞条件:≥3 个连续触发事件 - 功率预算绝不得超过监管限制(2.4 GHz 下 20 dBm EIRP) - VITAL 模式下的子载波子集必须包含 ≥16 个子载波,以保证统计可靠性


5. 位移测量上下文

职责:从相干相位时间序列中提取亚毫米级生理位移(呼吸、心跳、震颤)。

┌──────────────────────────────────────────────────────────────┐
│              Displacement Measurement Context                 │
├──────────────────────────────────────────────────────────────┤
│                                                                │
│  ┌──────────────┐                                            │
│  │ Phase Time    │ ← Coherent CSI phase per subcarrier       │
│  │ Series Buffer │   per link, at sounding cadence           │
│  └──────┬───────┘                                            │
│         │                                                     │
│         ▼                                                     │
│  ┌──────────────────┐                                        │
│  │ Phase-to-         │                                        │
│  │ Displacement      │                                        │
│  │ Converter         │                                        │
│  │ δ = λΔφ / (4π)    │                                        │
│  └──────┬────────────┘                                        │
│         │                                                     │
│  ┌──────┴──────────────────────────┐                         │
│  │                                  │                         │
│  ▼                                  ▼                         │
│  ┌──────────────────┐  ┌──────────────────┐                 │
│  │ Respiratory       │  │ Cardiac          │                 │
│  │ Analyzer          │  │ Analyzer         │                 │
│  │ (Aggregate Root)  │  │                  │                 │
│  │                   │  │ Bandpass:        │                 │
│  │ Bandpass:         │  │ 0.8–3.0 Hz      │                 │
│  │ 0.1–0.6 Hz       │  │ (48–180 BPM)    │                 │
│  │ (6–36 BPM)       │  │                  │                 │
│  │                   │  │ Harmonic cancel  │                 │
│  │ Amplitude: 4–12mm │  │ (remove respir.  │                 │
│  │                   │  │  harmonics)      │                 │
│  └────────┬──────────┘  │                  │                 │
│           │             │ Amplitude:       │                 │
│           │             │ 0.2–0.5 mm       │                 │
│           │             └────────┬─────────┘                 │
│           │                      │                            │
│           └──────────┬───────────┘                            │
│                      ▼                                        │
│           ┌──────────────────┐                               │
│           │ Vital Signs      │                               │
│           │ Fusion           │──▶ VitalSignReport             │
│           │ (multi-link,     │                               │
│           │  multi-band)     │                               │
│           └──────────────────┘                               │
│                                                               │
│  Events emitted:                                             │
│    BreathingRateEstimated { bpm, confidence, method }         │
│    HeartRateEstimated { bpm, confidence, hrv_ms }             │
│    ApneaEventDetected { duration_s, severity }                │
│    DisplacementAnomaly { max_displacement_mm, location }      │
│                                                               │
└──────────────────────────────────────────────────────────────┘

聚合: - RespiratoryAnalyzer(聚合根)— 从 0.1–0.6 Hz 位移频带中提取呼吸频率和模式

实体: - PhaseTimeSeries — 每个链路、每个子载波在探测周期下的解卷绕相位值的窗口缓冲区 - DisplacementTimeSeries — 由相位转换而来:δ(t) = λΔφ(t) / (4π),表示以 mm 为单位的物理表面位移 - VitalSignReport — 融合输出,包含呼吸频率、心率、HRV、置信度分数和异常标志

值对象: - PhaseUnwrapped — 以弧度为单位的连续(解卷绕)相位,无 2π 模糊 - DisplacementSample — 带时间戳和置信度的单个 mm 位移值 - BreathingRate — 带置信度分数的 BPM 值(6–36 范围) - HeartRate — 带置信度分数和 HRV 区间的 BPM 值(48–180 范围) - ApneaEvent — 检测到的呼吸停止的持续时间、严重程度和置信度

领域服务: - PhaseUnwrapper — 带异常值拒绝的连续相位解卷绕;对位移转换至关重要 - RespiratoryHarmonicCanceller — 从心脏频带中去除呼吸谐波,以分离心跳信号 - MultilinkFuser — 使用 SNR 加权平均组合节点对之间的位移估计 - AnomalyDetector — 标记与正常生理不一致的位移模式(跌倒、癫痫发作、心脏骤停)

不变量: - 相位解卷绕必须保持连续性:连续样本之间 |Δφ| < π - 位移下限必须对照验收指标进行验证(AT-2:2 m 处 ≤ 0.1 mm) - 心率估计至少需要 10 秒的稳定数据(心脏分析器预热) - 多链路融合必须使用 ≥2 条独立链路进行置信度评分


6. 监管合规上下文

职责:确保所有 CHCI 传输在部署辖区范围内符合适用的 ISM 频段法规。

┌──────────────────────────────────────────────────────────────┐
│              Regulatory Compliance Context                    │
├──────────────────────────────────────────────────────────────┤
│                                                                │
│  ┌───────────────┐    ┌───────────────┐    ┌──────────────┐  │
│  │ FCC Part 15   │    │ ETSI EN       │    │ 802.11bf     │  │
│  │ Rules         │    │ 300 328       │    │ Compliance   │  │
│  │               │    │               │    │              │  │
│  │ - 30 dBm max  │    │ - 20 dBm EIRP│    │ - NDP format │  │
│  │ - Digital mod │    │ - LBT or 10ms │    │ - SAW window │  │
│  │ - Spread      │    │   burst max   │    │ - SMS setup  │  │
│  │   spectrum    │    │ - Duty cycle  │    │              │  │
│  └───────┬───────┘    └───────┬───────┘    └──────┬───────┘  │
│          │                    │                    │          │
│          └────────────┬───────┴────────────────────┘          │
│                       ▼                                       │
│            ┌──────────────────┐                               │
│            │ Compliance       │                               │
│            │ Validator        │                               │
│            │ (Aggregate Root) │                               │
│            │                  │                               │
│            │ Validates every  │                               │
│            │ WaveformConfig   │                               │
│            │ before TX        │                               │
│            └────────┬─────────┘                               │
│                     │                                         │
│                     ▼                                         │
│            ┌──────────────────┐                               │
│            │ Jurisdiction     │                               │
│            │ Registry         │                               │
│            │                  │                               │
│            │ US → FCC         │                               │
│            │ EU → ETSI        │                               │
│            │ JP → ARIB        │                               │
│            │ ...              │                               │
│            └──────────────────┘                               │
│                                                               │
│  Events emitted:                                             │
│    ComplianceCheckPassed { jurisdiction, config_hash }         │
│    ComplianceViolation { rule, parameter, value, limit }       │
│    JurisdictionChanged { from, to }                           │
│                                                               │
└──────────────────────────────────────────────────────────────┘

聚合: - ComplianceValidator(聚合根)—— 在允许传输之前必须批准每个波形配置的关卡

实体: - JurisdictionProfile —— 给定区域(FCC、ETSI、ARIB 等)的完整监管约束集 - ComplianceRecord —— 带有时间戳和配置哈希的合规检查审计轨迹

值对象: - MaxEIRP —— 每个辖区每个频段的以 dBm 为单位的最大等效全向辐射功率 - MaxBurstDuration —— 最大连续传输时间(ETSI:10 ms) - MinIdleTime —— 突发之间的最小空闲时间 - ModulationType —— 对于 FCC,必须是数字调制(OFDM 符合)或扩频 - DutyCycleLimit —— 传输所占时间的最大百分比

不变量: - 在没有通过的 ComplianceCheckPassed 事件的情况下,不得发生任何传输 - 每次周期变化时,必须重新计算并验证占空比 - 必须在部署配置期间设置辖区;默认值为最严格(ETSI)


核心领域实体

CoherentCsiFrame(实体)

pub struct CoherentCsiFrame {
    /// Unique sequence identifier for this sounding frame
    seq_id: u64,
    /// Node that received this frame
    rx_node_id: NodeId,
    /// Node that transmitted this frame (known from sounding schedule)
    tx_node_id: NodeId,
    /// Frequency band: Band2_4GHz, Band5GHz, Band6GHz
    band: FrequencyBand,
    /// UTC timestamp with microsecond precision
    timestamp_us: u64,
    /// Complex channel response per subcarrier: (amplitude, phase) pairs
    subcarrier_responses: Vec<Complex64>,
    /// Phase lock status at time of capture
    phase_lock: LockStatus,
    /// Residual phase offset from calibration (degrees)
    residual_offset_deg: f64,
    /// Signal-to-noise ratio estimate (dB)
    snr_db: f32,
    /// Sounding mode that produced this frame
    source_mode: SoundingMode,
}

不变量: - 帧要用于相干处理,phase_lock 必须为 Locked - subcarrier_responses.len() 必须与 band 和带宽的预期数量匹配(20 MHz 为 56) - 帧要对位移估计做出贡献,snr_db 必须 ≥ 10 dB - timestamp_us 必须按 rx_node_id 单调递增

WaveformConfig(值对象)

pub struct WaveformConfig {
    /// Active sensing mode
    mode: SensingMode,
    /// Sounding cadence in Hz
    cadence_hz: f64,
    /// Active frequency bands
    bands: BandSet,
    /// Bandwidth per band
    bandwidth_mhz: u8,
    /// Transmit power in dBm
    tx_power_dbm: f32,
    /// Subcarrier mask (None = all subcarriers active)
    subcarrier_mask: Option<BitVec>,
    /// Burst duration in microseconds
    burst_duration_us: u16,
    /// Number of symbols per burst
    symbols_per_burst: u8,
    /// Computed duty cycle (must pass compliance check)
    duty_cycle_pct: f64,
}

不变量: - cadence_hz 必须 ≥ 1.0 且 ≤ 5000.0 - duty_cycle_pct 不得超过辖区限制(ETSI:由 10 ms 最大突发推导得出) - tx_power_dbm 不得超过辖区最大 EIRP - bandwidth_mhz 必须是 {20, 40, 80} 之一 - burst_duration_us 必须 ≥ 4(单个 OFDM 符号 + CP)

感知模式(值对象)

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SensingMode {
    /// 1 Hz, single band, presence detection only
    Idle,
    /// 10 Hz, dual band, coarse tracking
    Alert,
    /// 50-200 Hz, all bands, full DensePose + vitals
    Active,
    /// 100 Hz, optimal subcarrier subset, breathing + HR + HRV
    Vital,
    /// 200 Hz, full band, DTW gesture classification
    Gesture,
    /// 20 Hz, single band, apnea/movement/stage detection
    Sleep,
}

impl SensingMode {
    pub fn default_config(&self) -> WaveformConfig {
        match self {
            Self::Idle => WaveformConfig {
                mode: *self,
                cadence_hz: 1.0,
                bands: BandSet::single(Band::Band2_4GHz),
                bandwidth_mhz: 20,
                tx_power_dbm: 10.0,
                subcarrier_mask: None,
                burst_duration_us: 4,
                symbols_per_burst: 1,
                duty_cycle_pct: 0.0004,
            },
            Self::Alert => WaveformConfig {
                mode: *self,
                cadence_hz: 10.0,
                bands: BandSet::dual(Band::Band2_4GHz, Band::Band5GHz),
                bandwidth_mhz: 20,
                tx_power_dbm: 15.0,
                subcarrier_mask: None,
                burst_duration_us: 8,
                symbols_per_burst: 2,
                duty_cycle_pct: 0.008,
            },
            Self::Active => WaveformConfig {
                mode: *self,
                cadence_hz: 100.0,
                bands: BandSet::all(),
                bandwidth_mhz: 40,
                tx_power_dbm: 20.0,
                subcarrier_mask: None,
                burst_duration_us: 16,
                symbols_per_burst: 4,
                duty_cycle_pct: 0.16,
            },
            Self::Vital => WaveformConfig {
                mode: *self,
                cadence_hz: 100.0,
                bands: BandSet::dual(Band::Band2_4GHz, Band::Band5GHz),
                bandwidth_mhz: 20,
                tx_power_dbm: 18.0,
                subcarrier_mask: Some(optimal_vital_subcarriers()),
                burst_duration_us: 8,
                symbols_per_burst: 2,
                duty_cycle_pct: 0.08,
            },
            Self::Gesture => WaveformConfig {
                mode: *self,
                cadence_hz: 200.0,
                bands: BandSet::all(),
                bandwidth_mhz: 40,
                tx_power_dbm: 20.0,
                subcarrier_mask: None,
                burst_duration_us: 16,
                symbols_per_burst: 4,
                duty_cycle_pct: 0.32,
            },
            Self::Sleep => WaveformConfig {
                mode: *self,
                cadence_hz: 20.0,
                bands: BandSet::single(Band::Band2_4GHz),
                bandwidth_mhz: 20,
                tx_power_dbm: 12.0,
                subcarrier_mask: None,
                burst_duration_us: 4,
                symbols_per_burst: 1,
                duty_cycle_pct: 0.008,
            },
        }
    }
}

生命体征报告(值对象)

pub struct VitalSignReport {
    /// Timestamp of this report
    timestamp_us: u64,
    /// Breathing rate in BPM (None if not measurable)
    breathing_bpm: Option<f64>,
    /// Breathing confidence [0.0, 1.0]
    breathing_confidence: f64,
    /// Heart rate in BPM (None if not measurable — requires CHCI coherent mode)
    heart_rate_bpm: Option<f64>,
    /// Heart rate confidence [0.0, 1.0]
    heart_rate_confidence: f64,
    /// Heart rate variability: RMSSD in milliseconds
    hrv_rmssd_ms: Option<f64>,
    /// Detected anomalies
    anomalies: Vec<VitalAnomaly>,
    /// Number of independent links contributing to this estimate
    contributing_links: u16,
    /// Sensing mode that produced this report
    source_mode: SensingMode,
}

pub enum VitalAnomaly {
    Apnea { duration_s: f64, severity: Severity },
    Tachycardia { bpm: f64 },
    Bradycardia { bpm: f64 },
    IrregularRhythm { irregularity_score: f64 },
    FallDetected { impact_g: f64 },
    NoMotion { duration_s: f64 },
}

节点标识与频段(值对象)

/// Unique identifier for a CHCI node in the sensing mesh
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NodeId(pub u8);

/// Operating frequency band
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum FrequencyBand {
    /// 2.4 GHz ISM band (2400-2483.5 MHz), λ = 12.5 cm
    Band2_4GHz,
    /// 5 GHz UNII band (5150-5850 MHz), λ = 6.0 cm
    Band5GHz,
    /// 6 GHz band (5925-7125 MHz), λ = 5.0 cm, WiFi 6E
    Band6GHz,
}

impl FrequencyBand {
    pub fn wavelength_m(&self) -> f64 {
        match self {
            Self::Band2_4GHz => 0.125,
            Self::Band5GHz => 0.060,
            Self::Band6GHz => 0.050,
        }
    }

    /// Displacement per radian of phase change: λ/(4π)
    pub fn displacement_per_radian_mm(&self) -> f64 {
        self.wavelength_m() * 1000.0 / (4.0 * std::f64::consts::PI)
    }
}

领域事件

波形事件

pub enum WaveformEvent {
    /// A sounding frame was transmitted
    SoundingFrameTransmitted {
        seq_id: u64,
        tx_node: NodeId,
        band: FrequencyBand,
        timestamp_us: u64,
    },
    /// A burst sequence completed (micro-burst mode)
    BurstSequenceCompleted {
        burst_count: u32,
        total_duration_us: u64,
    },
    /// Waveform configuration changed (mode transition)
    WaveformConfigChanged {
        old_mode: SensingMode,
        new_mode: SensingMode,
        trigger: ModeTransitionTrigger,
    },
}

pub enum ModeTransitionTrigger {
    CoherenceDeltaThreshold { delta: f64 },
    PersonDetected { confidence: f64 },
    PersonLost { absence_duration_s: f64 },
    PoseClassification { pose: PoseClass },
    MotionSpike { magnitude: f64 },
    Manual,
}

时钟事件

pub enum ClockEvent {
    /// A node achieved phase lock
    ClockLockAcquired {
        node_id: NodeId,
        residual_offset_deg: f64,
    },
    /// Phase drift detected on a node
    PhaseDriftDetected {
        node_id: NodeId,
        drift_deg_per_min: f64,
    },
    /// Phase lock lost on a node — triggers fallback to statistical correction
    ClockLockLost {
        node_id: NodeId,
        reason: LockLossReason,
    },
    /// Calibration procedure completed
    CalibrationCompleted {
        residual_offsets: Vec<(NodeId, f64)>,
        max_residual_deg: f64,
    },
}

测量事件

pub enum MeasurementEvent {
    /// Body surface reconstructed from diffraction tomography
    BodySurfaceReconstructed {
        n_vertices: u32,
        resolution_cm: f64,
        confidence: f64,
        timestamp_us: u64,
    },
    /// Vital signs estimated
    VitalSignsUpdated {
        report: VitalSignReport,
    },
    /// Displacement anomaly detected
    DisplacementAnomaly {
        max_displacement_mm: f64,
        anomaly_type: VitalAnomaly,
    },
    /// Coherence degradation on a link (may trigger recalibration)
    CoherenceDegradation {
        tx_node: NodeId,
        rx_node: NodeId,
        band: FrequencyBand,
        severity: Severity,
    },
}

上下文映射

┌─────────────────────────────────────────────────────────────────────────┐
│                         CHCI Context Map                                │
│                                                                         │
│  ┌────────────────┐         ┌────────────────┐                         │
│  │   Waveform     │ ◀─────  │   Cognitive    │                         │
│  │   Generation   │ config  │   Waveform     │                         │
│  │   Context      │         │   Context      │                         │
│  └───────┬────────┘         └───────▲────────┘                         │
│          │                          │                                   │
│          │ sounding                 │ scene state                       │
│          │ frames                   │ feedback                          │
│          ▼                          │                                   │
│  ┌────────────────┐         ┌───────┴────────┐                         │
│  │   Clock        │ phase   │   Coherent     │                         │
│  │   Synchro-     │ lock ──▶│   Signal       │                         │
│  │   nization     │ status  │   Processing   │                         │
│  │   Context      │         │   Context      │                         │
│  └────────────────┘         └───────┬────────┘                         │
│                                     │                                   │
│                              body surface,                              │
│                              coherence metrics                          │
│                                     │                                   │
│                                     ▼                                   │
│                             ┌────────────────┐                         │
│                             │  Displacement   │                         │
│                             │  Measurement    │                         │
│                             │  Context        │                         │
│                             └────────────────┘                         │
│                                                                         │
│  ┌────────────────┐                                                    │
│  │  Regulatory    │ ◀── validates all WaveformConfig before TX         │
│  │  Compliance    │                                                    │
│  │  Context       │                                                    │
│  └────────────────┘                                                    │
│                                                                         │
│  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─       │
│  Integration with existing WiFi-DensePose bounded contexts:             │
│                                                                         │
│  ┌────────────────┐    ┌────────────────┐    ┌────────────────┐       │
│  │  RuvSense      │    │  RuVector      │    │  DensePose     │       │
│  │  Multistatic   │    │  Cross-View    │    │  Body Model    │       │
│  │  (ADR-029)     │    │  Fusion        │    │  (Core)        │       │
│  └────────────────┘    └────────────────┘    └────────────────┘       │
│                                                                         │
│  CHCI Signal Processing feeds directly into existing                   │
│  RuvSense/RuVector/DensePose pipeline — coherent CSI                   │
│  replaces incoherent CSI as input, same output interface               │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘

防腐层

边界 方向 机制
CHCI 信号处理 → RuvSense 下游 CoherentCsiFrame 通过 IntoLegacyCsi 适配器适配到现有 CsiFrame trait — 现有流水线无需修改即可工作
认知波形 → ADR-039 边缘层级 双向 感知模式映射到边缘层级:IDLE→Tier0,ACTIVE→Tier1,VITAL→Tier2。共享 EdgeConfig 值对象
时钟同步 → 硬件 下游 ClockDriver trait 抽象 SI5351A 硬件细节;用于测试的 mock 实现
法规合规 → 所有 TX 上下文 上游 合规验证器作为策略网关 — 未通过检查则不传输

与现有代码库集成

修改的模块

文件 当前 CHCI 变更
signal/src/ruvsense/phase_align.rs 通过圆形均值进行统计 LO 偏移估计 添加 SharedClockAligner 路径:当 phase_lock == Locked 时,跳过统计估计,仅应用残余校准偏移
signal/src/ruvsense/multiband.rs 独立的逐通道融合 添加 CoherentCrossBandFuser:融合前使用人体模型先验进行跨频段相位对齐
signal/src/ruvsense/coherence.rs Z 分数相干性评分(实值) 添加 ComplexCoherenceMetric:使用幅度和相位信息的相量域相干性
signal/src/ruvsense/tomography.rs 仅幅度的 ISTA L1 求解器 添加 DiffractionTomographyEngine:使用通道对比度进行复值重建
文件 当前 CHCI 变更
signal/src/ruvsense/coherence_gate.rs 接受/拒绝门控决策 添加认知波形反馈:门控决策向模式状态机发出 CoherenceDelta 事件
signal/src/ruvsense/multistatic.rs 注意力加权融合 添加时钟同步状态作为融合权重修正因子
hardware/src/esp32/ TDM 协议、信道跳变 添加 NDP 探测模式、参考时钟驱动器和相位参考输入
ruvector/src/viewpoint/attention.rs CrossViewpointAttention 扩展为跨频段注意力,具有频率相关的几何偏置

新 Crate:wifi-densepose-chci

wifi-densepose-chci/
├── src/
│   ├── lib.rs                    # Crate root, re-exports
│   ├── waveform/
│   │   ├── mod.rs
│   │   ├── ndp_generator.rs      # 802.11bf NDP sounding frame generation
│   │   ├── burst_generator.rs    # Micro-burst OFDM symbol generation
│   │   ├── scheduler.rs          # Sounding schedule orchestration
│   │   └── compliance.rs         # Regulatory compliance validation
│   ├── clock/
│   │   ├── mod.rs
│   │   ├── reference.rs          # Reference clock module abstraction
│   │   ├── pll_driver.rs         # SI5351A PLL synthesizer driver
│   │   ├── calibration.rs        # Phase calibration procedures
│   │   └── drift_monitor.rs      # Continuous drift detection
│   ├── cognitive/
│   │   ├── mod.rs
│   │   ├── mode.rs               # SensingMode enum and transitions
│   │   ├── state_machine.rs      # Mode state machine with hysteresis
│   │   ├── scene_observer.rs     # Scene state fusion from body model + coherence
│   │   ├── subcarrier_select.rs  # Optimal subcarrier subset for vital mode
│   │   └── power_manager.rs      # Power budget per mode
│   ├── tomography/
│   │   ├── mod.rs
│   │   ├── contrast.rs           # Channel contrast computation
│   │   ├── diffraction.rs        # Coherent diffraction tomography engine
│   │   └── surface.rs            # Iso-surface extraction (marching cubes)
│   ├── displacement/
│   │   ├── mod.rs
│   │   ├── phase_to_disp.rs      # Phase-to-displacement conversion
│   │   ├── respiratory.rs        # Breathing rate analyzer
│   │   ├── cardiac.rs            # Heart rate + HRV analyzer
│   │   └── anomaly.rs            # Vital sign anomaly detection
│   └── types.rs                  # Shared types (NodeId, FrequencyBand, etc.)
├── Cargo.toml
└── tests/
    ├── integration/
    │   ├── acceptance_tests.rs   # AT-1 through AT-8
    │   └── mode_transitions.rs   # Cognitive state machine tests
    └── unit/
        ├── compliance_tests.rs
        ├── displacement_tests.rs
        └── tomography_tests.rs

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 wi/RuView