Resource-Constrained On-Chip AI Classifier for Beat-by-Beat Real-Time Arrhythmia Detection with an ECG Wearable System
Mahfuzur Rahman, Bashir I. Morshed
Abstract
The electrocardiogram (ECG) is one of the vital physiological signals for human health. Lightweight neural network (NN) models integrated into a low-resource wearable device can benefit the user with a low-power, real-time edge computing system for continuous and daily monitoring. This work introduces a novel edge-computing wearable device for real-time beat-by-beat ECG arrhythmia classification. The proposed wearable integrates the light AI model into a 32-bit ARM® Cortex™-based custom printed circuit board (PCB). The work analyzes the performance of artificial neural network (ANN), convolutional neural network (CNN), and long short-term memory (LSTM) models for real-time wearable implementation. The wearable is capable of real-time QRS detection and feature extraction from raw ECG data. The QRS detection algorithm offers high reliability with a 99.5% F1 score and R-peak position error (RPE) of 6.3 ms for R-peak-to-R-peak intervals. The proposed method implements a combination of top time series, spectral, and signal-specific features for model development. Lightweight, pretrained models are deployed on the custom wearable and evaluated in real time using mock data from the MIT-BIH dataset. We propose an LSTM model that provides efficient performance over accuracy, inference latency, and memory consumption. The proposed model offers 98.1% accuracy, with 98.2% sensitivity and 99.5% specificity while testing in real time on the wearable. Real-time inferencing takes 20 ms, and the device consumes as low as 5.9 mA of power. The proposed method achieves efficient performance in real-time testing, which indicates the wearable can be effectively used for real-time continuous arrhythmia detection.