Department of Electrical and Electronic Engineering, Imperial College London, London SW7 2AZ, UK.
Sensors (Basel). 2023 Aug 30;23(17):7521. doi: 10.3390/s23177521.
At present, a medium-level microcontroller is capable of performing edge computing and can handle the computation of neural network kernel functions. This makes it possible to implement a complete end-to-end solution incorporating signal acquisition, digital signal processing, and machine learning for the classification of cardiac arrhythmias on a small wearable device. In this work, we describe the design and implementation of several classifiers for atrial fibrillation detection on a general-purpose ARM Cortex-M4 microcontroller. We used the CMSIS-DSP library, which supports Naïve Bayes and Support Vector Machine classifiers, with different kernel functions. We also developed Python scripts to automatically transfer the Python model (trained in Scikit-learn) to the C environment. To train and evaluate the models, we used part of the data from the PhysioNet/Computing in Cardiology Challenge 2020 and performed simple classification of atrial fibrillation based on heart-rate irregularity. The performance of the classifiers was tested on a general-purpose ARM Cortex-M4 microcontroller (STM32WB55RG). Our study reveals that among the tested classifiers, the SVM classifier with RBF kernel function achieves the highest accuracy of 96.9%, sensitivity of 98.4%, and specificity of 95.8%. The execution time of this classifier was 720 μs per recording. We also discuss the advantages of moving computing tasks to edge devices, including increased power efficiency of the system, improved patient data privacy and security, and reduced overall system operation costs. In addition, we highlight a problem with false-positive detection and unclear significance of device-detected atrial fibrillation.
目前,中等性能的微控制器已能够执行边缘计算,并能处理神经网络内核函数的计算。这使得在小型可穿戴设备上实现包含信号采集、数字信号处理和心律失常分类的机器学习的完整端到端解决方案成为可能。在这项工作中,我们描述了在通用的 ARM Cortex-M4 微控制器上实现几种房颤分类器的设计和实现。我们使用了 CMSIS-DSP 库,它支持朴素贝叶斯和支持向量机分类器,以及不同的核函数。我们还开发了 Python 脚本,将 Python 模型(在 Scikit-learn 中训练)自动转换为 C 环境。为了训练和评估模型,我们使用了 PhysioNet/Computing in Cardiology Challenge 2020 部分数据,并根据心率不规则性对房颤进行了简单分类。在通用的 ARM Cortex-M4 微控制器(STM32WB55RG)上测试了分类器的性能。我们的研究表明,在测试的分类器中,具有 RBF 核函数的 SVM 分类器的准确率最高,为 96.9%,灵敏度为 98.4%,特异性为 95.8%。这个分类器的执行时间为每个记录 720μs。我们还讨论了将计算任务转移到边缘设备的优势,包括提高系统的功率效率、改善患者数据的隐私和安全性以及降低整个系统的运营成本。此外,我们还强调了设备检测到的房颤的假阳性检测和检测意义不明确的问题。