A Proposed Lossless ECG Compression Method Using Second-Order Delta Encoding and Arithmetic Coding on a Raspberry Pi-Based Embedded System

Lossless ECG compression Second-order delta encoding Arithmetic coding Embedded system Raspberry Pi

Authors

July 31, 2026
September 23, 2026
October 19, 2026

Downloads

Portable electrocardiogram (ECG) recorders have limited memory, yet their recordings must be stored without any loss of diagnostic information. This study aims to develop and validate a lossless ECG compression method simple enough for a low-cost embedded device. The main contribution is a compression method that combines second-order delta encoding with arithmetic coding, together with a mathematical rule that predicts when second-order delta encoding compresses better than first-order delta encoding. The method was implemented on a Raspberry Pi Zero 2 W with an AD8232 ECG sensor and an ADS1115 analog-to-digital converter, and it was compared with Huffman, Lempel-Ziv-Welch, and run-length coding, with and without delta encoding. The evaluation used hardware recordings from a single volunteer and 687 records from three public databases (MIT-BIH Arrhythmia, European ST-T, and PTB Diagnostic). All 8,244 tested combinations were reconstructed exactly, bit for bit. The proposed method achieved a mean compression ratio of 3.248 on the MIT-BIH database, whereas first-order delta encoding performed better on the European ST-T (2.969) and PTB (4.964) databases, as predicted by the derived rule. On hardware recordings, the compression ratio was about 2.0, and a standing posture raised 50 Hz power-line noise and lowered the compression ratio by up to 23%. Heartbeat detection on 745 beats showed 100% sensitivity and 100% positive predictivity, with no significant timing difference caused by 8-bit quantization (p = 0.361). In conclusion, the proposed method can roughly double the recording time of a memory-limited ECG device without additional hardware, which makes it a practical option for long-term wearable heart monitoring. Future work will extend the validation to multiple subjects and multi-lead recordings.

How to Cite

wicaksana, jalu_telkom, Sugiana, A., & Halomoan, J. (2026). A Proposed Lossless ECG Compression Method Using Second-Order Delta Encoding and Arithmetic Coding on a Raspberry Pi-Based Embedded System. Indonesian Journal of Electronics, Electromedical Engineering, and Medical Informatics, 8(4), 553-566. https://doi.org/10.35882/ijeeemi.v8i4.382

Similar Articles

1-10 of 153

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