DriveEmo-FL:mmWave雷达+联邦学习实现座舱情绪感知,隐私优先的自适应AV响应

论文信息

项目 内容
论文标题 DriveEmo-FL: in-cabin radar-based emotion sensing for autonomous vehicles smart response
作者 Imran, N., Alnafisah, K.H., Zhang, J. et al.
期刊 Scientific Reports, 16, 13600
发表 2026年3月15日
DOI 10.1038/s41598-026-43662-x
硬件 TI IWR-1443BOOST mmWave雷达

核心创新

DriveEmo-FL是首个将mmWave雷达情绪检测与联邦学习结合的座舱系统,通过上半身微多普勒信号识别乘客情绪,并触发自适应AV响应。

特性 说明
传感器 TI IWR-1443BOOST mmWave雷达 (77GHz)
检测方式 上半身微运动 → 情绪分类
隐私 无摄像头 + 联邦学习(数据不离开车辆)
情绪类别 4类:高兴/悲伤/愤怒/中性
架构 EmoNet双流深度网络 (微多普勒+速度时间特征)

方法详解

1. 系统架构

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
"""
DriveEmo-FL: mmWave雷达座舱情绪感知 + 联邦学习
论文: Scientific Reports 16, 13600 (2026)

硬件: TI IWR-1443BOOST (77GHz FMCW雷达)
架构: EmoNet双流网络 + 联邦学习

依赖: torch, numpy, scipy
"""

import torch
import torch.nn as nn
import numpy as np
from typing import Dict, List, Tuple

class EmoNetDualStream(nn.Module):
"""
EmoNet: 双流情绪分类网络

Stream 1: 微多普勒谱图 → CNN
Stream 2: 速度时间特征(VTP) → BiLSTM

融合: 两流特征拼接 → 分类器
输出: 4类情绪 (高兴/悲伤/愤怒/中性)
"""

def __init__(self, n_classes=4):
super().__init__()

# Stream 1: 微多普勒谱图 CNN
self.doppler_cnn = nn.Sequential(
nn.Conv2d(1, 32, 3, stride=1, padding=1),
nn.BatchNorm2d(32),
nn.ReLU(),
nn.MaxPool2d(2),

nn.Conv2d(32, 64, 3, stride=1, padding=1),
nn.BatchNorm2d(64),
nn.ReLU(),
nn.MaxPool2d(2),

nn.Conv2d(64, 128, 3, stride=1, padding=1),
nn.BatchNorm2d(128),
nn.ReLU(),
nn.AdaptiveAvgPool2d((1, 1)),
)

# Stream 2: 速度时间特征 BiLSTM
self.vtp_lstm = nn.LSTM(
input_size=3, # 速度, 加速度, 敏捷度
hidden_size=128,
num_layers=2,
batch_first=True,
bidirectional=True,
)

# 融合分类器
self.classifier = nn.Sequential(
nn.Linear(128 + 256, 128), # CNN(128) + BiLSTM(256)
nn.ReLU(),
nn.Dropout(0.5),
nn.Linear(128, n_classes)
)

def forward(self, doppler_spec, vtp_features):
"""
Args:
doppler_spec: (B, 1, H, W) 微多普勒谱图
vtp_features: (B, T, 3) 速度时间特征

Returns:
logits: (B, 4) 情绪分类
"""
# Stream 1
doppler_feat = self.doppler_cnn(doppler_spec) # (B, 128, 1, 1)
doppler_feat = doppler_feat.flatten(1) # (B, 128)

# Stream 2
vtp_feat, _ = self.vtp_lstm(vtp_features) # (B, T, 256)
vtp_feat = vtp_feat[:, -1, :] # 取最后时步 (B, 256)

# 融合
fused = torch.cat([doppler_feat, vtp_feat], dim=1)
logits = self.classifier(fused)

return logits


class MicroDopplerExtractor:
"""
从FMCW雷达原始数据提取微多普勒特征

处理流程:
1. Range-FFT: 分离不同距离的目标
2. 选择目标距离bin (乘员位置)
3. 时间维FFT: 多普勒谱图
4. STFT: 微多普勒时频图
"""

def __init__(self, n_range_bins=64, n_doppler_bins=64,
stft_window=64, hop_length=16):
self.n_range_bins = n_range_bins
self.n_doppler_bins = n_doppler_bins
self.stft_window = stft_window
self.hop_length = hop_length

def extract(self, raw_adc_data, target_range_bin=None):
"""
从ADC原始数据提取微多普勒谱图

Args:
raw_adc_data: (n_chirps, n_samples) 复数ADC数据
target_range_bin: 目标距离bin (如已知)

Returns:
doppler_spec: (H, W) 微多普勒谱图
"""
# 1. Range-FFT (沿samples维度)
range_profile = np.fft.fft(raw_adc_data, axis=1)

# 2. 选择目标bin
if target_range_bin is None:
# 自动选择能量最大的bin
target_range_bin = np.argmax(
np.mean(np.abs(range_profile), axis=0)
)

target_signal = range_profile[:, target_range_bin]

# 3. STFT: 微多普勒时频图
from scipy.signal import stft
f, t, Zxx = stft(
target_signal,
nperseg=self.stft_window,
noverlap=self.stft_window - self.hop_length
)

# 取幅度谱
doppler_spec = np.abs(Zxx)

# 归一化
doppler_spec = (doppler_spec - doppler_spec.min()) / \
(doppler_spec.max() - doppler_spec.min() + 1e-8)

return doppler_spec


class VelocityTimeProfiler:
"""
速度时间特征(VTP)提取器

从雷达数据提取:
- 瞬时速度 (多普勒频移)
- 加速度 (速度变化率)
- 敏捷度 (加速度变化率)
"""

def __init__(self, fs=100):
self.fs = fs

def extract(self, range_profile, target_bin):
"""
从距离bin提取速度时间特征

Returns:
vtp: (T, 3) [velocity, acceleration, agility]
"""
# 从相位变化提取位移
phase = np.unwrap(np.angle(range_profile[:, target_bin]))

# 速度 = 相位变化率 × λ / (4π)
wavelength = 3e8 / 77e9 # 77GHz
velocity = np.diff(phase) * wavelength / (4 * np.pi) * self.fs

# 加速度
acceleration = np.diff(velocity) * self.fs

# 敏捷度 (jerk)
agility = np.diff(acceleration) * self.fs

# 对齐长度
min_len = min(len(velocity), len(acceleration), len(agility))
vtp = np.stack([
velocity[:min_len],
acceleration[:min_len],
agility[:min_len]
], axis=1)

return vtp


# ========== 联邦学习框架 ==========
class FederatedEmotionLearning:
"""
DriveEmo-FL 联邦学习框架

每辆车作为独立客户端:
1. 本地收集雷达数据 + 情绪标注
2. 本地训练EmoNet
3. 仅上传模型梯度到服务器
4. 服务器聚合梯度 → 更新全局模型
5. 下发新全局模型到所有车辆

优势:
- 隐私: 原始数据不离开车辆
- 可扩展: 车队规模可扩展
- 个性化: 每车可微调
"""

def __init__(self, n_clients=10, n_rounds=50):
self.n_clients = n_clients
self.n_rounds = n_rounds
self.global_model = EmoNetDualStream()

def federated_averaging(self, client_models, client_weights):
"""
FedAvg: 加权平均客户端模型参数

Args:
client_models: list of state_dicts
client_weights: list of float (数据量权重)
"""
global_state = self.global_model.state_dict()

for key in global_state:
weighted_sum = sum(
w * model[key]
for w, model in zip(client_weights, client_models)
)
global_state[key] = weighted_sum / sum(client_weights)

self.global_model.load_state_dict(global_state)

def simulate_federated_round(self):
"""模拟一轮联邦学习"""
client_accuracies = []

for client_id in range(self.n_clients):
# 模拟每辆车的本地数据(非IID)
n_samples = np.random.randint(50, 200)

# 本地训练 (模拟)
local_acc = 0.75 + 0.15 * np.random.rand()
client_accuracies.append(local_acc)

# 聚合
weights = np.random.dirichlet(np.ones(self.n_clients))
self.federated_averaging(
[self.global_model.state_dict()] * self.n_clients,
weights
)

return np.mean(client_accuracies)


# ========== 测试 ==========
if __name__ == "__main__":
print("=" * 60)
print("DriveEmo-FL: mmWave雷达座舱情绪感知")
print("=" * 60)

# 1. EmoNet模型
model = EmoNetDualStream(n_classes=4)

# 模拟输入
doppler = torch.randn(2, 1, 64, 64) # 2个样本, 64×64谱图
vtp = torch.randn(2, 100, 3) # 100帧VTP特征

logits = model(doppler, vtp)
print(f"\nEmoNet输出:")
print(f" 输入: doppler={doppler.shape}, vtp={vtp.shape}")
print(f" 输出: {logits.shape} (4类情绪)")

emotions = ['高兴', '悲伤', '愤怒', '中性']
for i, (s, l) in enumerate(zip(logits, emotions)):
pred = emotions[s.argmax()]
print(f" 样本{i}: 预测={pred}")

# 模型参数量
params = sum(p.numel() for p in model.parameters())
print(f"\n模型参数量: {params/1e6:.2f}M")

# 2. 微多普勒提取
extractor = MicroDopplerExtractor()
raw_adc = np.random.randn(200, 64) + 1j * np.random.randn(200, 64)
spec = extractor.extract(raw_adc)
print(f"\n微多普勒谱图: {spec.shape}")

# 3. 联邦学习
fl = FederatedEmotionLearning(n_clients=10, n_rounds=50)
print(f"\n联邦学习模拟 (10车辆, 50轮):")
for round_idx in [1, 10, 25, 50]:
acc = fl.simulate_federated_round()
print(f" Round {round_idx:2d}: 平均准确率 {acc:.1%}")

# 4. 情绪→AV响应映射
print(f"\n情绪→AV自适应响应映射:")
av_responses = {
'高兴': '舒适驾驶模式, 播放喜欢的音乐',
'悲伤': '安静驾驶模式, 暖色调灯光, 减速',
'愤怒': '平稳驾驶模式, 冷色调灯光, 避免急加速',
'中性': '标准驾驶模式',
}
for emotion, response in av_responses.items():
print(f" {emotion} → {response}")

2. 情绪分类性能

方法 准确率 说明
EmoNet (微多普勒+VTP) ~85% DriveEmo-FL
仅微多普勒CNN ~72% 单流基线
仅VTP BiLSTM ~68% 单流基线
联邦EmoNet ~82% 10车联邦
中心化EmoNet ~85% 集中训练上限

3. 联邦学习收敛

轮次 平均准确率 说明
1 75% 初始
10 79% 快速上升
25 81% 趋于收敛
50 82% 收敛

IMS开发启示

1. 情绪感知在座舱中的价值

场景 情绪检测应用 IMS响应
路怒症 愤怒→驾驶风格激进 平稳驾驶+冷却提示
疲劳低落 悲伤→反应迟钝 提振音乐+提神提示
兴奋高估 高兴→冒险驾驶 保守驾驶模式
乘客不适 愤怒/悲伤→不适 减速+空调调节

2. 与其他情绪检测方案对比

方案 传感器 隐私 精度 成本 限制
DriveEmo-FL mmWave雷达 ✅ 最强 ~85% $15 上半身可见
摄像头FACS RGB摄像头 ❌ ~90% $10 光照/遮挡
rPPG生理 RGB摄像头 ❌ ~70% $10 需面部清晰
可穿戴EEG 脑电头环 ✅ ~80% $200 需佩戴
WiFi CSI WiFi路由器 ✅ ~60% $0 分辨率低

3. 硬件复用策略

雷达用途 芯片 复用方案
CPD儿童检测 TI IWR6843 情绪检测复用
生命体征 TI AWR2944 情绪检测复用
乘员分类 Calterah Dubhe 情绪检测复用
情绪检测 同一雷达 零增量成本

4. 部署路线

5. 隐私优势

隐私维度 摄像头方案 DriveEmo-FL
面部图像 ❌ 采集 ✅ 无图像
身份识别 ❌ 可识别 ✅ 不可识别
数据存储 云端风险 ✅ 本地训练
联邦学习 不适用 ✅ 仅传梯度
GDPR合规 需同意 ✅ 天然合规

参考文献

  1. Imran, N. et al. “DriveEmo-FL: in-cabin radar-based emotion sensing for autonomous vehicles smart response.” Scientific Reports 16, 13600 (2026). DOI: 10.1038/s41598-026-43662-x
  2. TI IWR-1443BOOST: https://www.ti.com/tool/IWR1443BOOST
  3. Biometric Update. “Lip reading, emotion sensing, face biometrics vie for place in smart auto stack.” (2026.04)

DriveEmo-FL的核心价值是证明了mmWave雷达可以做情绪检测,且联邦学习保护隐私。对于IMS,这意味着CPD/生命体征雷达可以复用做情绪检测,零增量成本实现”情绪感知座舱”。建议在已有的77GHz雷达上采集少量情绪数据,验证EmoNet双流架构效果。