Real-time Assessment of ECG Classification based on Time-series Data and Other Types of Features

Authors

  • Thanh-Luan Tran Faculty of Mechanical Power Engineering, Vinh Long University of Technology Education, Nguyen Hue Street, Long Chau Ward, Vinh Long Province 85000 https://orcid.org/0009-0001-2221-0813
  • Bao-Toan Thai Faculty of Automation Engineering, College of Engineering, Can Tho University, 3/2 Street, Ninh Kieu Ward, Can Tho City 94000 https://orcid.org/0009-0005-7036-1893
  • Vy-Khang Tran Faculty of Automation Engineering, College of Engineering, Can Tho University, 3/2 Street, Ninh Kieu Ward, Can Tho City 94000 https://orcid.org/0000-0002-4321-0126
  • Xuan-Nhi Nguyen-Thi Vinh Long Vocational College, 1A National Highway , Phuoc Yen Hamlet, Phu Quoi Commune, Vinh Long Province 85000, https://orcid.org/0009-0009-5583-2051
  • Chi-Ngon Nguyen Faculty of Automation Engineering, College of Engineering, Can Tho University, 3/2 Street, Ninh Kieu Ward, Can Tho City 94000 https://orcid.org/0000-0002-9638-7259
  • Van-Khanh Nguyen Faculty of Automation Engineering, College of Engineering, Can Tho University, 3/2 Street, Ninh Kieu Ward, Can Tho City 94000 https://orcid.org/0000-0003-0006-6803

Abstract

Cardiovascular diseases are the leading cause of mortality worldwide. An increasing number of studies have applied artificial intelligence (AI) to identify anomalies and classify electrocardiograms (ECGs), supporting early detection and diagnosis. This study proposes and evaluates the classification of ECG signals based on time-series data and features extracted via fast Fourier transform (FFT) and discrete cosine transform (DCT), implemented on resource-limited microcontroller units (MCUs) for selected AI models. Two models, the artificial neural network (ANN) and the convolutional neural network (CNN), were proposed for classifying five common ECG labels. These models were trained and tested with three types of input data: time-series data, FFT features, and DCT features, sourced from an available database. After training, the optimized models were quantized to assess their accuracy before being deployed in real-time to measure inference time on the ESP32 MCU. Before quantization, the ANN model achieved the highest accuracy with both DCT and time-series inputs (98.0%); meanwhile, the CNN model performed best with time-series input (97.0%). After quantization, the ANN maintained the highest accuracy with time-series input (97.1%), followed by the ANN with DCT at 95.6%. CNN models remained stable, with post-quantization accuracy of 95.8% for time-series input, 94.9% for DCT, and 90.0% for FFT. In contrast, ANN with FFT input showed a significant drop to 65.6%.

How to Cite

Thanh-Luan Tran, Bao-Toan Thai, Vy-Khang Tran, Xuan-Nhi Nguyen-Thi, Chi-Ngon Nguyen, Van-Khanh Nguyen (2025). Real-time Assessment of ECG Classification based on Time-series Data and Other Types of Features. Journal of Engineering and Technological Sciences, Vol. 57 No. 4 (2025): Vol. 57 No. 4 (2025): August , 530-544. https://doi.org/10.5614/j.eng.technol.sci.2025.57.4.8

Metrics

Download data is not yet available.

References

Ahmed, K., & Hassan, M. (2022). tinyCare: A tinyML-based Low-Cost Continuous Blood Pressure Estimation on the Extreme Edge. 2022 IEEE 10th International Conference on Healthcare Informatics (ICHI), 264–275. https://doi.org/10.1109/ICHI54592.2022.00047

Amirshahi, A., & Hashemi, M. (2021). ECG classification algorithm based on STDP and R-STDP neural networks for real-time monitoring on ultra low-power personal wearable devices. IEEE Transactions on Biomedical Circuits and Systems, 13(6), 1483–1493. https://doi.org/10.1109/ TBCAS.2019.2948920

BinMakhashen, G. M., Arafat, S. M. A., & Dohrmann, M. L. (2014). CAD detection using neural network fusion of the 12 lead stress ECG system. Information Fusion, 6(7), 8.

Caesarendra, W., Hishamuddin, T. A., Lai, D. T. C., Husaini, A., Nurhasanah, L., Glowacz, A., &

Alfarisy, G. A. F. (2022). An Embedded System Using Convolutional Neural Network Model for Online and Real-Time ECG Signal Classification and Prediction. Diagnostics, 12(4), 1–19. https://doi.org/10.3390/diagnostics12040795

Cai, J., Zhou, G., Dong, M., Hu, X., Liu, G., & Ni, W. (2021). Real-Time Arrhythmia Classification Algorithm Using Time-Domain ECG Feature Based on FFNN and CNN. Mathematical Problems in Engineering, 2021, 6648432. https://doi.org/10.1155/2021/6648432

Chowdhury, D., & Chattopadhyay, M. (2023). An on-device machine learning assisted system for unobtrusive cardiac auscultation. Microprocessors and Microsystems, 101, 104906. https://doi.org/https://doi.org/10.1016/j.micpro.2023.104906

Condran, S., Bewong, M., Islam, M. Z., Maphosa, L., & Zheng, L. (2022). Machine Learning in Precision Agriculture: A Survey on Trends, Applications and Evaluations Over Two Decades. IEEE Access, 10, 73786–73803. https://doi.org/10.1109/ACCESS.2022.3188649

Elmir, Y., Himeur, Y., & Amira, A. (2023). ECG classification using Deep CNN and Gramian Angular Field. Proceedings - IEEE 9th International Conference on Big Data Computing Service and Applications, BigDataService 2023, 137–141. https://doi.org/10.48550/arXiv.2308.02395

Falaschetti, L., Alessandrini, M., Biagetti, G., Crippa, P., & Turchetti, C. (2022). ECG-Based Arrhythmia Classification using Recurrent Neural Networks in Embedded Systems. Procedia Computer Science, 207, 3473–3481. https://doi.org/10.1016/j.procs.2022.09.406

Farag, M. M. (2023). A Tiny Matched Filter-Based CNN for Inter-Patient ECG Classification and Arrhythmia Detection at the Edge. Sensors, 23(3), 1–23. https://doi.org/10.3390/s23031365

Fikri, M. R., Soesanti, I., & Nugroho, H. A. (2021). ECG Signal Classification Review. International Journal of Innovative Technology and Exploring Engineering (IJITEE), 5(1), 1–6.

Hizem, M., Bousbia, L., Ben Dhiab, Y., Aoueileyine, M. O. E., & Bouallegue, R. (2025). Reliable ECG Anomaly Detection on Edge Devices for Internet of Medical Things Applications. Sensors, 25(8), 1–24. https://doi.org/10.3390/s25082496

Khan, F., Yu, X., Yuan, Z., & ur Rehman, A. (2023). ECG classification using 1-D convolutional deep residual neural network. PLoS ONE, 18(4 April). https://doi.org/10.1371/journal.pone.0284791

Khanh, N. Van, Khang, T. V., Khai, N. M., & Em, T. V. T. (2022). Realtime Non-invasive Fault Diagnosis of Three-phase Induction Motor. Journal of Technical Education Science, 72B, 1–11.

Khorrami, H., & Moavenian, M. (2010). A comparative study of DWT, CWT and DCT transformations in ECG arrhythmias classification. Expert Systems with Applications, 37(8), 5751–5757. https://doi.org/10.1016/j.eswa.2010.02.033

Kim, E., Kim, J., Park, J., Ko, H., & Kyung, Y. (2023). TinyML-Based Classification in an ECG Monitoring Embedded System. Computers, Materials & Continua, 75, 1751–1764. https://doi.org/ 10.32604/cmc.2023.031663

Kiranyaz, S., Ince, T., & Gabbouj, M. (2016). Real-Time Patient-Specific ECG Classification by 1-D Convolutional Neural Networks. IEEE Transactions on Biomedical Engineering, 63(3), 664–675.

Kumar, M. A., & Chakrapani, A. (2022). Classification of ECG signal using FFT based improved Alexnet classifier. PLoS ONE, 17(9 September), 1–22. https://doi.org/10.1371/journal.pone.0274225

Laureanti, R., Bilucaglia, M., Zito, M., Circi, R., Fici, A., Rivetti, F., Valesi, R., Oldrini, C., Mainardi, L. T., & Russo, V. (2020). Emotion assessment using Machine Learning and low-cost wearable devices. Proceedings of the Annual International Conference of the IEEE Engineering in Medicine and Biology Society, EMBS, 2020-July, 576–579. https://doi.org/10.1109/EMBC44109.2020. 9175221

Li, F., Feng, Y., Fu, Y., Wu, Z., & Yuan, J. (2025). Design of a wearable ECG signal monitoring system and research on arrhythmia classification methods. Proceedings of the 2024 5th International Symposium on Artificial Intelligence for Medicine Science, 102–107. https://doi.org/10.1145/ 3706890.3706907.

Liu, C. L., Xiao, B., & Tsai, C. F. (2025). ECG-STAR: Spatio-temporal attention residual networks for multi-label ECG abnormality classification. Information Sciences, 717, 122273. https://doi.org/10.1016/j.ins.2025.122273

Liu, M., Shao, N., Zheng, C., & Wang, J. (2021). Real Time Arrhythmia Monitoring and Classification Based on Edge Computing and DNN. Wireless Communications and Mobile Computing, 2021, 5563338. https://doi.org/10.1155/2021/5563338

Makhoul, J. (1980). A Fast Cosine Transform in One and Two Dimensions. IEEE Transactions on Acoustics, Speech, and Signal Processing, 28(1), 27–34. https://doi.org/10.1109/TASSP. 1980.1163351

Marasović, T., & Papić, V. (2018). A Comparative Study of FFT, DCT, and DWT for Efficient Arrhytmia Classification in RP-RF Framework. International Journal of E-Health and Medical Communications, 9(1), 35–49. https://doi.org/10.4018/IJEHMC.2018010103

Mborgerding, M. (2021). A fast Fourier transform (FFT) library that tries to keep it simple [Computer software]. Github. https://github.com/mborgerding/kissfft

Nayuki. (2018). Fast discrete cosine transform algorithms. Nayuki. https://www.nayuki.io/ page/fast-discrete-cosine-transform-algorithms

Nguyen, V. K., Tran, V. K., Pham, H., Nguyen, V. M., Nguyen, H. D., & Nguyen, C. N. (2023). A multi-microcontroller-based hardware for deploying Tiny machine learning model. International Journal of Electrical and Computer Engineering, 13(5), 5727–5736. https://doi.org/10.11591/ ijece.v13i5.pp5727-5736

Panwar, A., Narendra, M., Arya, A., Raj, R., & Kumar, A. (2025). Integrated portable ECG monitoring system with CNN classification for early arrhythmia detection. Frontiers in Digital Health, 7, 1–13. https://doi.org/10.3389/fdgth.2025.1535335

Pham, M. H. (2024). The global burden of cardiovascular disease over the past 40 years: our challenges and actions. Journal of Vietnamese Cardiology, 107S(1). https://jvc.vnha.org.vn/tmh/article/view/785

Saadatnejad, S., Oveisi, M., & Hashemi, M. (2020). LSTM-Based ECG Classification for Continuous Monitoring on Personal Wearable Devices. IEEE Journal of Biomedical and Health Informatics, 24(2), 515–523. https://doi.org/10.1109/JBHI.2019.2911367

Song, Y., Chen, J., & Zhang, R. (2023). Heart Rate Estimation from Incomplete Electrocardiography Signals. Sensors, 23(2), 1–20. https://doi.org/10.3390/s23020597

Sun, B., Bayes, S., Abotaleb, A. M., & Hassan, M. (2023). The Case for tinyML in Healthcare: CNNs for Real-Time On-Edge Blood Pressure Estimation. Proceedings of the 38th ACM/SIGAPP Symposium on Applied Computing, 629–638. https://doi.org/10.1145/3555776.3577747

Thilagavathy, R., Srivatsan, R., Sreekarun, S., Sudeshna, D., Lakshmi Priya, P., & Venkataramani, B. (2020). Real-Time ECG Signal Feature Extraction and Classification using Support Vector Machine. 2020 International Conference on Contemporary Computing and Applications, IC3A 2020, 44–48. https://doi.org/10.1109/IC3A48958.2020.233266

Ullah, W., Siddique, I., Zulqarnain, R. M., Alam, M. M., Ahmad, I., & Raza, U. A. (2021). Classification of Arrhythmia in Heartbeat Detection Using Deep Learning. Computational Intelligence and Neuroscience, 2021, 2195922. https://doi.org/10.1155/2021/2195922

Vu, T., Petty, T., Yakut, K., Usman, M., Xue, W., Haas, F. M., Hirsh, R. A., & Zhao, X. (2023). Real-time arrhythmia detection using convolutional neural networks. Frontiers in Big Data, 6. https://doi.org/10.3389/fdata.2023.1270756

World Health Organization. (2021). Cardiovascular diseases (CVDs). https://www.who.int/en/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds)

Xing, Y., Zhang, L., Hou, Z., Li, X., Shi, Y., Yuan, Y., Zhang, F., Liang, S., Li, Z., & Yan, L. (2022). Accurate ECG Classification Based on Spiking Neural Network and Attentional Mechanism for Real-Time Implementation on Personal Portable Devices. Electronics (Switzerland), 11(12). https://doi.org/10.3390/electronics11121889

Zhao, Y., Cheng, J., Zhang, P., & Peng, X. (2020). ECG Classification Using Deep CNN Improved by Wavelet Transform. In Computers, Materials & Continua, 64(3). https://doi.org/10.32604/cmc.2020.09938

Downloads

Date Log

Submitted
November 6, 2024
Accepted
July 25, 2025
Published
August 29, 2025

Keywords

  • artificial neural network
  • convolutional neural network
  • discrete cosine transform
  • electrocardiograms
  • fast fourier transform
  • microcontroller units

How to Cite

Real-time Assessment of ECG Classification based on Time-series Data and Other Types of Features. (2025). Journal of Engineering and Technological Sciences, 57(4), 530-544. https://doi.org/10.5614/j.eng.technol.sci.2025.57.4.8

Similar Articles

1-10 of 21

You may also start an advanced similarity search for this article.

Most read articles by the same author(s)