毫米波雷达心率估计:呼吸谐波干扰消除方法深度解析

MDPI Sensors 2026 论文解读:非接触心率监测的信号处理突破

论文信息

项目 内容
标题 Radar-Based Heart Rate Estimation Method Under Respiratory Harmonic Interference
期刊 MDPI Sensors 2026, 26(17), 5587
链接 mdpi.com/1424-8220/26/17/5587
发布日期 2026-09
应用领域 车内生命体征监测、健康监测

核心问题

1. 心跳 vs 呼吸信号差异

信号 胸部位移幅度 频率范围
呼吸 ~4-12mm 0.15-0.5 Hz (9-30次/分)
心跳 ~0.5-2mm 0.8-2.0 Hz (48-120次/分)
幅度比 ~5-10倍 心跳被呼吸掩盖

2. 呼吸谐波干扰

1
2
3
4
5
6
频谱:
呼吸基频 (0.3 Hz) ████████████████ ← 最强
呼吸2次谐波 (0.6 Hz) █████████ ← 干扰心跳
呼吸3次谐波 (0.9 Hz) █████ ← 直接重叠心跳基频
心跳基频 (1.2 Hz) ██ ← 被谐波淹没
心跳2次谐波 (2.4 Hz) █ ← 微弱

方法详解

1. 信号处理流程

2. 核心代码复现

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
306
307
308
309
310
311
312
313
"""
毫米波雷达心率估计:呼吸谐波干扰消除
论文: MDPI Sensors 2026, 26(17), 5587

核心方法: 自适应谐波消除 + 带通滤波 + 心率变异性提取
"""

import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from scipy import signal as scipy_signal
from typing import Tuple, Optional

class FMCWRadarPhaseDemodulator:
"""
FMCW雷达相位解调器

从雷达中频信号提取胸壁位移相位

原理: FMCW雷达发射线性调频信号
回波与发射信号混频得到中频(IF)信号
IF信号的相位包含目标距离信息
胸壁运动导致相位变化 → 呼吸+心跳
"""

def __init__(self, sample_rate: float = 100.0, # Hz
freq_slope: float = 60e12, # Hz/s
center_freq: float = 60e9): # 60 GHz
self.sample_rate = sample_rate
self.freq_slope = freq_slope
self.center_freq = center_freq
self.c = 3e8 # 光速

def demodulate(self, if_signal: np.ndarray) -> np.ndarray:
"""
相位解调

Args:
if_signal: (N,) 中频信号

Returns:
phase: (N,) 胸壁位移相位
"""
# FFT获取距离bin
N = len(if_signal)
fft_result = np.fft.fft(if_signal)

# 找到胸壁所在的距离bin(通常~0.5m)
range_resolution = self.c / (2 * self.freq_slope * N / self.sample_rate)
chest_bin = int(0.5 / range_resolution) # 0.5m处

# 提取该bin的相位
# 使用STFT获取时变相位
frame_size = 256
hop_size = 128
phases = []

for i in range(0, N - frame_size, hop_size):
frame = if_signal[i:i+frame_size]
fft_frame = np.fft.fft(frame)
phase = np.angle(fft_frame[chest_bin])
phases.append(phase)

# 解包裹相位
phases = np.unwrap(phases)

# 转换为位移
wavelength = self.c / self.center_freq
displacement = phases * wavelength / (4 * np.pi)

return displacement


class RespiratoryHarmonicCanceller:
"""
呼吸谐波消除器

论文核心方法: 自适应消除呼吸基频及其谐波

步骤:
1. 检测呼吸基频
2. 生成各次谐波
3. 自适应滤波消除
4. 提取残留心跳信号
"""

def __init__(self, num_harmonics: int = 5,
adaptive_filter_length: int = 32):
self.num_harmonics = num_harmonics
self.filter_length = adaptive_filter_length

def detect_resp_freq(self, chest_signal: np.ndarray,
sample_rate: float = 100.0) -> float:
"""
检测呼吸基频

Args:
chest_signal: 胸壁位移信号
sample_rate: 采样率

Returns:
resp_freq: 呼吸频率 (Hz)
"""
# 带通滤波: 0.1-0.5 Hz
b, a = scipy_signal.butter(4, [0.1, 0.5],
btype='band', fs=sample_rate)
resp_filtered = scipy_signal.filtfilt(b, a, chest_signal)

# FFT找峰
freqs = np.fft.rfftfreq(len(resp_filtered), 1/sample_rate)
spectrum = np.abs(np.fft.rfft(resp_filtered))

# 限制搜索范围
mask = (freqs >= 0.1) & (freqs <= 0.5)
peak_idx = np.argmax(spectrum[mask])
resp_freq = freqs[mask][peak_idx]

return resp_freq

def cancel_harmonics(self, chest_signal: np.ndarray,
resp_freq: float,
sample_rate: float = 100.0) -> np.ndarray:
"""
消除呼吸谐波

Args:
chest_signal: 原始胸壁信号
resp_freq: 呼吸基频
sample_rate: 采样率

Returns:
cardiac_signal: 消除呼吸后的心跳信号
"""
N = len(chest_signal)
t = np.arange(N) / sample_rate

# 构建谐波参考信号
reference = np.zeros((N, self.num_harmonics * 2))
for h in range(1, self.num_harmonics + 1):
reference[:, 2*(h-1)] = np.sin(2 * np.pi * h * resp_freq * t)
reference[:, 2*(h-1)+1] = np.cos(2 * np.pi * h * resp_freq * t)

# LMS自适应滤波
weights = np.zeros(self.filter_length * self.num_harmonics * 2)
cardiac_signal = chest_signal.copy()

for n in range(self.filter_length, N):
# 参考信号窗
ref_window = reference[n-self.filter_length:n].flatten()

# 误差信号 = 原始 - 滤波器输出
filter_output = np.dot(weights, ref_window)
error = chest_signal[n] - filter_output
cardiac_signal[n] = error

# LMS权重更新
mu = 0.01 # 步长
weights += mu * error * ref_window

# 带通滤波: 0.8-3.0 Hz (心跳范围)
b, a = scipy_signal.butter(4, [0.8, 3.0],
btype='band', fs=sample_rate)
cardiac_filtered = scipy_signal.filtfilt(b, a, cardiac_signal)

return cardiac_filtered


class HeartRateEstimator:
"""
心率估计器

从消除谐波后的心跳信号估计心率
"""

def __init__(self, window_sec: float = 10.0,
sample_rate: float = 100.0):
self.window_sec = window_sec
self.sample_rate = sample_rate
self.window_samples = int(window_sec * sample_rate)

def estimate(self, cardiac_signal: np.ndarray) -> dict:
"""
估计心率

Args:
cardiac_signal: 心跳信号

Returns:
result: {
'heart_rate': float (BPM),
'confidence': float,
'hrv': float (ms), # 心率变异性
}
"""
N = len(cardiac_signal)

# 滑动窗口估计
estimates = []
for i in range(0, N - self.window_samples, self.window_samples // 2):
window = cardiac_signal[i:i+self.window_samples]

# FFT
freqs = np.fft.rfftfreq(len(window), 1/self.sample_rate)
spectrum = np.abs(np.fft.rfft(window))

# 心跳范围: 0.8-2.0 Hz (48-120 BPM)
mask = (freqs >= 0.8) & (freqs <= 2.0)
if np.any(mask):
peak_idx = np.argmax(spectrum[mask])
hr_hz = freqs[mask][peak_idx]
hr_bpm = hr_hz * 60
confidence = spectrum[mask][peak_idx] / (spectrum.sum() + 1e-8)
estimates.append((hr_bpm, confidence))

if not estimates:
return {'heart_rate': 0, 'confidence': 0, 'hrv': 0}

# 平均估计
hr_values = [e[0] for e in estimates]
conf_values = [e[1] for e in estimates]

avg_hr = np.median(hr_values) # 中位数更鲁棒
avg_conf = np.mean(conf_values)

# HRV: 连续心跳间隔的标准差
# 使用峰值检测
peaks, _ = scipy_signal.find_peaks(
cardiac_signal,
distance=int(0.5 * self.sample_rate), # 最小间隔0.5s
prominence=0.5 * np.std(cardiac_signal)
)

if len(peaks) > 2:
ibi = np.diff(peaks) / self.sample_rate * 1000 # ms
hrv = np.std(ibi)
else:
hrv = 0

return {
'heart_rate': avg_hr,
'confidence': avg_conf,
'hrv': hrv,
}


# ========== 完整测试 ==========
if __name__ == "__main__":
np.random.seed(42)

sample_rate = 100.0 # 100 Hz
duration = 60.0 # 60秒
N = int(duration * sample_rate)
t = np.arange(N) / sample_rate

# 模拟胸壁位移信号
# 呼吸: 0.25 Hz (15次/分), 幅度8mm
resp_freq = 0.25
resp_signal = 8.0 * np.sin(2 * np.pi * resp_freq * t)

# 心跳: 1.2 Hz (72次/分), 幅度1.5mm
hr_true = 72 # BPM
hr_freq = hr_true / 60 # 1.2 Hz
cardiac_signal = 1.5 * np.sin(2 * np.pi * hr_freq * t)

# 呼吸谐波
for h in range(2, 6):
resp_signal += (8.0 / h) * np.sin(2 * np.pi * h * resp_freq * t)

# 合成信号 + 噪声
chest_signal = resp_signal + cardiac_signal + np.random.normal(0, 0.3, N)

print("=" * 60)
print("毫米波雷达心率估计测试")
print(f"真实呼吸频率: {resp_freq * 60:.1f} BPM")
print(f"真实心率: {hr_true} BPM")

# 1. 呼吸谐波消除
canceller = RespiratoryHarmonicCanceller(num_harmonics=5)
detected_resp = canceller.detect_resp_freq(chest_signal, sample_rate)
print(f"\n检测到呼吸频率: {detected_resp * 60:.1f} BPM")

cardiac_clean = canceller.cancel_harmonics(
chest_signal, detected_resp, sample_rate
)

# 2. 心率估计
estimator = HeartRateEstimator(window_sec=10.0, sample_rate=sample_rate)
result = estimator.estimate(cardiac_clean)

print(f"\n估计心率: {result['heart_rate']:.1f} BPM")
print(f"置信度: {result['confidence']:.3f}")
print(f"HRV: {result['hrv']:.1f} ms")
print(f"误差: {abs(result['heart_rate'] - hr_true):.1f} BPM")

# 3. 频谱对比
print("\n频谱分析:")
freqs = np.fft.rfftfreq(N, 1/sample_rate)

orig_spectrum = np.abs(np.fft.rfft(chest_signal))
clean_spectrum = np.abs(np.fft.rfft(cardiac_clean))

# 关键频率点
for f, label in [(0.25, "呼吸基频"), (0.5, "呼吸2次"),
(0.75, "呼吸3次"), (1.2, "心跳基频")]:
idx = np.argmin(np.abs(freqs - f))
orig_mag = orig_spectrum[idx]
clean_mag = clean_spectrum[idx]
reduction = (1 - clean_mag / (orig_mag + 1e-8)) * 100
print(f" {label} ({f:.2f} Hz): {orig_mag:.1f} → "
f"{clean_mag:.1f} (降低{reduction:.0f}%)")

print("\n✅ 测试通过")

在车内场景的应用

1. 驾驶员健康监测

场景 心率正常范围 异常阈值 IMS响应
正常驾驶 60-100 BPM - 记录基线
紧张/路怒 100-140 BPM >120持续5min 警告+深呼吸引导
疲劳驾驶 50-60 BPM <55持续10min 疲劳警告
心律异常 HRV > 100ms 突变 建议休息
心脏事件 <40或>150 急性 紧急呼叫

2. CPD儿童检测中的心率利用

应用 检测目标 雷达配置
儿童呼吸 0.3-0.6 Hz 60GHz, 4Tx4Rx
婴儿心率 1.5-2.5 Hz (90-150BPM) 60GHz, 高灵敏度
成人区分 心率幅度差异 多目标分离

3. 硬件参数

组件 型号 参数
雷达芯片 TI IWR6843AOP 60GHz, 4Tx4Rx, FMCW
天线 板载天线阵列 方位角±60°, 俯仰角±30°
ADC 12-bit 采样率10MHz
处理器 QCS8255 Hexagon NPU
功耗 - <2W (常驻监测)

与传统接触式方案对比

方案 精度 接触 成本 隐私 持续监测
心电图(ECG) ±1 BPM 需要 高 高 不能
脉搏血氧仪 ±2 BPM 需要 低 中 不能
摄像头rPPG ±3 BPM 不需要 低 低 受光照限制
毫米波雷达 ±3 BPM 不需要 中 高 可以

开发启示

  1. 呼吸谐波是雷达心率估计的核心障碍: 心跳幅度仅为呼吸的1/5-1/10,必须主动消除谐波
  2. LMS自适应滤波优于固定滤波: 呼吸频率变化时,自适应方法自动跟踪
  3. 中位数估计比均值更鲁棒: 窗口间心率波动大,中位数抗异常值
  4. HRV比心率本身更敏感: 心率正常时HRV可先异常,是疲劳/压力的早期指标
  5. 60GHz比24GHz更适合座舱: 波长短(5mm)分辨率高,可穿透衣物

与已有博客关联


论文: MDPI Sensors 2026, 26(17), 5587 | https://www.mdpi.com/1424-8220/26/17/5587