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
| class AutomotiveHealthSensorStack: """TU Braunschweig 多模态健康传感器栈""" def __init__(self): self.sensors = { 'ecg_steering_wheel': { 'sensor': '方向盘嵌入式电极', 'signal': '心电图 ECG', 'sampling_rate': '500 Hz', 'measures': ['心率', '心律', 'HRV', '心律失常'], 'contact': '需要手握方向盘', 'clinical_grade': '接近医疗级', 'advantage': '直接电信号,高精度', 'limitation': '需要持续握住方向盘', 'ims_priority': 'P0 - 驾驶员核心生命体征' }, 'camera_rppg': { 'sensor': '后视镜 RGB 摄像头', 'signal': '远程光电容积脉搏波 rPPG', 'sampling_rate': '30 fps', 'measures': ['心率', '呼吸率', '血氧估算'], 'contact': '非接触', 'clinical_grade': '消费级', 'advantage': '非接触,已有 DMS 硬件', 'limitation': '光照依赖,面部遮挡', 'ims_priority': 'P1 - 复用 DMS 摄像头' }, 'seatbelt_phonocardiography': { 'sensor': '安全带嵌入式麦克风', 'signal': '心音图 PCG', 'sampling_rate': '2000 Hz', 'measures': ['心音 S1/S2', '杂音', '呼吸音'], 'contact': '通过安全带接触胸部', 'clinical_grade': '研究级', 'advantage': '可检测心杂音(心律失常前兆)', 'limitation': '安全带需紧贴胸部,体形影响', 'ims_priority': 'P2 - 创新但需量产验证' }, 'ppg_light_sensor': { 'sensor': '内饰光传感器', 'signal': '光电容积脉搏波 PPG', 'sampling_rate': '100 Hz', 'measures': ['心率', '血容量变化', '心律'], 'contact': '非接触(近红外)', 'clinical_grade': '消费级', 'advantage': '非接触,可检测心律失常', 'limitation': '运动伪影', 'ims_priority': 'P1 - 补充 ECG' }, 'vehicle_context': { 'sensor': 'CAN 总线', 'signal': '驾驶动力学数据', 'sampling_rate': '100 Hz', 'measures': ['振动', '加速度', '转向', '制动'], 'contact': 'N/A', 'clinical_grade': 'N/A', 'advantage': '提供生物信号上下文', 'limitation': '需要与生物信号精确同步', 'ims_priority': 'P0 - 必须有上下文' } } def get_signal_quality_assessment(self, driving_context): """根据驾驶上下文评估各传感器信号质量""" quality = {} for sensor, info in self.sensors.items(): if sensor == 'vehicle_context': continue base_quality = 1.0 if driving_context.get('road_vibration', 0) > 0.5: if sensor in ['ecg_steering_wheel', 'seatbelt_phonocardiography']: base_quality *= 0.7 elif sensor == 'camera_rppg': base_quality *= 0.85 elif sensor == 'ppg_light_sensor': base_quality *= 0.8 if driving_context.get('illumination', 'day') == 'night': if sensor == 'camera_rppg': base_quality *= 0.6 elif sensor == 'ppg_light_sensor': base_quality *= 1.0 if not driving_context.get('hands_on_wheel', True): if sensor == 'ecg_steering_wheel': base_quality = 0.0 quality[sensor] = base_quality return quality
|