Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Apr 15;25(8):2496.
doi: 10.3390/s25082496.

Reliable ECG Anomaly Detection on Edge Devices for Internet of Medical Things Applications

Affiliations

Reliable ECG Anomaly Detection on Edge Devices for Internet of Medical Things Applications

Moez Hizem et al. Sensors (Basel). .

Abstract

The advent of Tiny Machine Learning (TinyML) has unlocked the potential to deploy machine learning models on resource-constrained edge devices, revolutionizing real-time monitoring in Internet of Medical Things (IoMT) applications. This study introduces a novel approach to real-time electrocardiogram (ECG) anomaly detection by integrating TinyML with edge Artificial Intelligence (AI) on low-power embedded systems. We demonstrate the feasibility and effectiveness of deploying optimized models on edge devices, such as the Raspberry Pi and Arduino, to detect ECG anomalies, including arrhythmias. The proposed workflow encompasses data preprocessing, feature extraction, and model inference, all executed directly on the edge device, eliminating the need for cloud resources. To address the constraints of memory and power consumption in wearable devices, we applied advanced optimization techniques, including model pruning and quantization, achieving an optimal balance between accuracy and resource utilization. The optimized model achieved an accuracy of 92.3% while reducing the power consumption to 0.024 mW, enabling continuous, long-term health monitoring with minimal energy requirements. This work highlights the potential of TinyML to advance edge AI for real-time medical applications.

Keywords: ECG; IoMT; TinyML; anomaly detection; edge AI; embedded systems; low-power.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflicts of interest.

Figures

Figure 1
Figure 1
Real-time edge anomaly detection using TinyML platform.
Figure 2
Figure 2
ECG signal details.
Figure 3
Figure 3
ECG signal for normal beat.
Figure 4
Figure 4
ECG signal for supraventricular premature beat.
Figure 5
Figure 5
ECG signal for premature ventricular contraction.
Figure 6
Figure 6
ECG signal for fusion of ventricular and normal beats.
Figure 7
Figure 7
ECG signal for unclassifiable beat.
Figure 8
Figure 8
Data balancing using the SMOTE method.
Figure 9
Figure 9
Proposed CNN model architecture.
Figure 10
Figure 10
Training and validation curve for the best model (CNN).
Figure 11
Figure 11
Confusion matrix for the best model (CNN).
Figure 12
Figure 12
Workflow from ML to TinyML for the chosen models.
Figure 13
Figure 13
Wiring and deployment schematic for the edge device, showing connections between the Raspberry Pi, the Arduino Nano, and the AD8232 ECG sensor.
Figure 14
Figure 14
Real device for ECG data collection using the AD8232 ECG sensor, the Arduino Nano, and the Raspberry PI.
Figure 15
Figure 15
Workflow of the deployed algorithm, detailing the data collection, preprocessing, and inference steps.
Figure 16
Figure 16
Comparison of accuracy across models.

Similar articles

Cited by

References

    1. Quincozes V.E., Quincozes S.E., Kazienko J.F., Gama S., Cheikhrouhou O., Koubaa A. A survey on IoT application layer protocols, security challenges, and the role of explainable AI in IoT (XAIoT) Int. J. Inf. Secur. 2024;23:1975–2002. doi: 10.1007/s10207-024-00828-w. - DOI
    1. Abadade Y., Temouden A., Bamoumen H., Benamar N., Chtouki Y., Hafid A.S. A Comprehensive Survey on TinyML. IEEE Access. 2023;11:96892–96922. doi: 10.1109/ACCESS.2023.3294111. - DOI
    1. Allam A.H., Gomaa I., Zayed H.H., Taha M. IoT-based eHealth using blockchain technology: A survey. Clust. Comput. 2024;27:7083–7110. doi: 10.1007/s10586-024-04357-y. - DOI
    1. Paraschiv E.-A., Tudora E., Tîrziu E., Alexandru A. IoT & Cloud Computing-based Remote Healthcare Monitoring System for an Elderly-Centered Care; In Proceeding of the 2021 International Conference on e-Health and Bioengineering (EHB); Iasi, Romania. 18–19 April 2021; pp. 1–4. - DOI
    1. Zou R., Hung C.-L., Lo C.L., Yang C., Zhang W. Evaluation of the accuracy of ECG captured by CardioChip through comparison of ECG recording to a standard 12-lead ECG recording device; In Proceeding of the 2016 IEEE 25th International Symposium on Industrial Electronics (ISIE); Santa Clara, CA, USA. 8–10 June 2016; pp. 1094–1098. - DOI