Abstract
Electrocardiogram (ECG) signals can be monitored from many patients based on healthcare systems. To enhance these systems, the ECG signals should be collected and then stored in a cloud platform for later analysis. Hence, ECG signals can be utilized to diagnose heart diseases. However, the ECG signals require great internet capacity. So, compression techniques can be implemented to reduce a memory storage capacity for these signals. One of the potential compression techniques is the compressive sensing (CS). This paper proposes a CS technique to compress ECG signals. This technique is used to reduce sampling rates of the ECG signals to be less than the Nyquist rate. Moreover, a framework is suggested for the compression of maternal and fetal ECG signals. The compression of these signals is based on the curvelet transform (CT) to produce sparsity in ECG signals. The MIT-BIH database are utilized for testing the ECG signals. This database includes several ECG signals with various sampling rates, such as aberrant and normal signals. The proposed CS technique achieved a compression ratio (CR) of 15.7 with an accuracy of 98.2%. Also, a percentage root mean difference (PRD) is utilized to calculate the performance of the reconstructed ECG signals. The achieved value of the PRD is 2.0.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The Internet of Things (IoT) is a digital revolution classified as a big technological revolution [1]. It is applied in many industries, especially Industry 4.0 with large commercial applications and small domestic applications. Also, the IoT is used with more smart connected devices, this revolution is increasingly morphing into the Internet of Everything [2, 3]. With the help of a framework made up of various sensors, wireless links, actuators, and technologies of data processing which interact with one another to increase communication capacity for different applications, the IoT is designed to link objects in the physical world to the Internet network for information exchange [4, 5]. Large sensor networks collect a lot of data, which slows down network traffic and reduces the overall performance in terms of compute power, device battery life, and other factors [6,7,8]. Numerous methods have been investigated to enhance data transmission, and the compressive sensing (CS) technique appears to be a strong candidate [9,10,11]. In order to share the bodily states and biomedical signals of a remote patient with a healthcare provider, an IoT framework is essential in biomedical applications. An Electrocardiogram (ECG) signal can be used to remotely detect a patient’s heart, thus this signal is one of the significant biological signals that should be taken into consideration. Moreover, in order to transfer the ECG signal to a cloud, a convenient compression rate for this signal is required to match internet bandwidth requirements. Therefore, to serve numerous remote patients simultaneously. The decompressed signal’s quality must also be sufficient to produce correct data analytics results for machine learning (ML) techniques to anticipate arrhythmia [12, 13].
Figure 1 illustrates the typical ECG signal. There are P, Q, R, S, T, and U waves in this signal. The P wave is the moniker for the initial positive wave. Q, R, and S waves make up the QRS complex wave. Ventricular re-polarization causes the T wave, which has a smooth shape. Prior to the P wave of the following cycle, the U wave arrives after the T wave. In this paper, a CS technique is proposed to automatically extract ECG features to be constructed. The created technique starts by breaking down the original ECG signal using the DWT and the mother wavelet from Daubahies is the db6 wavelet. This algorithm starts to remove high-frequency components that contain a noise component and low-frequency components which includes a baseline drift de-trending. Then, the preprocessed signal is used to aid in the automatic feature extraction from the ECG signal [14]. The utilized ECG signals are obtained from the MIT/BIH database via the Physionet repository with a could be saved in text format [15]. The motivation of using the CS technique is to compress ECG signals and it is convenient to occupy a small space for several IoT cloud memory storages.
This paper has three contributions as follows:
-
Implementing the CS technique to compress ECG signals.
-
Improving the maximum compression ratio (CR) of testing for the proposed technique with different samples of ECG signals.
-
Comparing and assessing the performance of the CS technique based on various performance metrics by utilizing the MIT-BIH database.
The organization of this paper is as follows: Section 2 introduces related works by presenting the most recent compression techniques in this field. Section 3 describes the methodology of the proposed technique for the compression of ECG signals. Section 4 demonstrates performance metrics to validate the proposed CS technique. Section 5 introduces the ECG signal acquisition based on IoT nodes and provides the performance evaluation for sending data on IoT systems. The experimental findings are covered in Section 6 with its discussions. The conclusion drawn from this work is presented in Section 7.
2 Related works
In the literature, there are many approaches to compressing ECG signals [16,17,18,19,20]. In [16], Lu et al. introduced an adaption of a sensing matrix to compress ECG signals. Luisa et al. [17] presented a simple CS and hybrid CS, which were used with cluster-based methods. In [18], a method formulated the multiple measurement vectors compressive sensing issue and spreads signals of uplink access across several subcarriers with equalization processing. This method has a sliding window whose set length was calculated via the rate of heartbeats which performed as a comparable piece of work. The window should be small due to the creation of a transmission that is close to real-time. For reconstruction ECG signals with fewer samples, a suitable amount of heartbeats on the window were included [19]. Hassan et al. [20], presented a dynamic CS technique to compress ECG signals. They achieved a high compression ratio (CR) of 16. Petkovski et al. [21], suggested a wavelet transform based on a compression algorithm, namely Set Partitioning In Hierarchical Trees (SPIHT). The coding was applied using several images. The approach was updated to work in a one-dimensional situation to compress ECG data.
The most difficult to solve can be categorized as choosing the appropriate transformations to acquire the sparse signal of the ECG. This sparse signal can be used to ensure the reconstruction of the original signal when the CS approach is applied. The capacity of each modification to reconstruct the sparse ECG signal is what sets them apart from one another [22]. Their good performance in reconstructing the original signal determines the appropriate transformation to be employed in this field of research. Three transformers: wavelet [23], discrete cosine [24], and walsh hadamard [25] are the most common transformation techniques utilized to compress ECG signals. Finally, the proposed curvelet transform produces efficient results compared to previous studies presented in this literature. The CS technique is described in detail in the parts that follow, along with examples of how well it works. The analysis of the results is presented based on the CT transformation which is the best technique for extracting the sparse ECG signal. A. Cuk et al. [26] presented a method for parkinson’s disease detection which was based on long-short term memory neural networks with tuning attention. In [27], A. Minic et al. proposed recurrent neural networks for anomaly detection in electrocardiogram sensor data.
3 Methodology
The compressive sensing (CS) technique is implemented to compress ECG signals based on curvelet transform. The proposed CS technique is selected due to its much less memory storage, higher data transmission rate, and many times less power consumption. One of the advantages of the CS is the reduction of the sampling rate for sparse signals which have many zero coefficients. Also, the CS performs a reconstruction of ECG signals with the removal of noise.
3.1 The proposed CS technique
Figure 2 shows the flowchart of the CS technique. This technique is applied to an ECG signal for compression and recovery. As shown in this flowchart, there are three steps for recovery and three steps for compressing. For recovery, the first step is loading the ECG signal, while the second step is selecting the level of the signal. The third step is applying the curvelet transform to determine the ECG signal’s sparsity. The optimum number for the threshold value is 58.19 mV, while the selected ECG is a single signal. For compressing steps, the first step entails the CS technique on the sparse ECG signal, while the second step is the quantizing of the signal’s sampled values. The third step is that the quantized values must be encoded. The encoding algorithm which applied is the run length encoding (RLE). This algorithm is proposed to reduce the time complexity and computations of ECG signals. RLE is a lossless compression technique in which a sequence of redundant data i.e., “1, 0”. This sequence represents repeated data into the ECG signal and how many times the sequence appears in the ECG signal. The used data is passed to the last compression stage and can be thought of as having entered the reconstruction stage. The recovery stage, which follows the compression stage in reverse order, is likewise depicted in Fig. 2. The compressed data is subjected to a decoding method in the first recovery stage. Dequantizing data in order to acquire the sparse signal is the second step. In the third stage, the sparse signal, which is thought of as the rebuilt ECG signal is subjected to an inverse curvelet. This flowchart effectively summarized the suggested technique. The impact of the proposed curvelet to acquire the sparse ECG signal.
3.2 Analysis of the proposed curvelet transformation
Curvelet is a transform utilized in a line or super-plane singularities [28]. Consider a f(X1, X2) as a particular signal in two dimensions, and Continuous Curvelet Transform (CCT) represented by CCTf (A,B,\(\theta\)) in realtime R2 is calculated using Eq. (1) [28].
Equation (2) [28] is used to describe the curvelet \({\psi}_{A, B, \theta }\)in 2-D as a function of the wavelet in 1-D.
Equation (2) describes a wavelet in terms of an angle, taking into account that \(X_1\text{cos}\left(\theta\right)+X_2\text{sin}\left(\theta\right)\)= C, where C is a constant, while Eq. (3) [28] describes the Continuous Wavelet Transform (CWT).
Equation (4) shows the wavelet in 2-D as a multiplication of 1-D wavelet which described in Eq. (5) [28, 29].
Where δ is Dirac delta function. The radon transform (RT) represented by Rf(θ,t) can be viewed as a 2-D wavelet transform that has been applied to the RT segments.
The ECG signal is transformed into a sparse signal using Eq. (7). Then, this sparse signal can be applied to CS technique. The continuous ridgelet transform (CRT) represented by \({ CRT}_{f}\left(A, \text{B}, \theta \right)\)in Eq. (7) is comparable to the 2-D CWT in Eq. (3).
4 Performance metrics
In general, compression ratio (CR), percentage root mean difference (PRD), peak signal-to-noise ratio (PSNR), and mean squared error (MSE) are metrics utilized to evaluate the performance of compressed signals. These metrics are used as execution levels to approve this work and assess its merit in the target field. As a result, these metrics are briefly discussed in the next sub-sections.
4.1 Compression Ratio (CR)
The degree of compression achieved and the quality of the reconstructed signal can both be evaluated using specific performance assessment measures. The PRD, MSE, PSNR, and CR are some significant metrics that are frequently used [29, 30].
4.2 Percentage Root Mean Difference (%PRD)
By measuring the difference error between a reconstructed signal \(\widehat{\text{x}}\) and an original signal x, the %PRD ensures the accuracy of the reconstruction.
4.3 Peak Signal-to-Noise Ratio (PSNR)
PSNR is calculated in terms of the mean square error with the square of a maximum value of the signal. Equation (10) presents the PSNR in dB.
4.4 Mean squared Error (MSE)
MSE is calculated based on the difference among the predicted value \({\widehat{\varvec{y}}}_{\left(\varvec{i}\right)}\) and the actual value \({\varvec{y}}_{\left(\varvec{i}\right)}\). Equation (11) shows the MSE metric.
Additionally, there are several other metrics to take into account to classify ECG signals as shown in Eqs. from (12) to (18) [31,32,33]. These metrics depend on many statistics such as True Positive (TrPos), True Negative (TrNeg), False Positive (FaPos), False Negative (FaNeg), Positive Predictive Value (PPV), and Negative Predictive Value (NPV).
5 ECG signal acquisition based on IoT nodes
Assuming that each IoT node in a wireless sensor network (WSN) can gather an associated electrocardiogram signal, which is frequently observed in biomedical networks. In order to achieve a point-reliable signal or knowledge recovery, the archived signal is used as the signal source in the simulation and is collected from the MIT/BIH database. Seven actual electrocardiogram signals with diverse alterations of objects are taken into consideration. For different compressed reconstruction algorithms, we alter the condition of the recovery accuracy and recovery rate [34,35,36]. It goes without saying that, if k is appropriately selected, the signals are completely rebuilt. However, the number of samples is significantly less than the Nyquist rate. This scheme can reduce the power consumption and communication hundreds over all networks for real-time observation using WSNs or IoT. Table 1 illustrates samples of the utilized ECG datasets with a reconstructed evaluation. The results of extensive performance are presented to show how well the utilized signal reconstruction software will function in WSNs or IoT. To see the important components of the proposed CS rule, a modest, low-power IoT network is initially implemented to gather ECG signals. The evaluation of an enormous IoT system demonstrates the quantifiability of the decentralized rule.
The tokenish M in the conducted experiments is 256. This tokenistic value is relaxed to 384 for obtaining a large number of dependent results. It means that only 18.75% of the primary information must be transmitted over a WSN in order for the primary signal to be successfully recovered. This condition results in a 91.35% reduction in the communication load across the WSN. In order to compare the three recovery algorithms “GPSR, LASSO, OMP” in addition to the planned ACSAR algorithm, we tested these algorithms on a 2048-bit graphical record signal (chfdbchf1). In order to find the best solution to demonstrate a quick and accurate response for knowledge with a group of sparseness building, such as an image or continuous signals, the GPSR is designed for bound-constrained optimization. The most popular l1 step-down in atomic number 55, known as LASSO, functions well under a wide range of situations. The effectiveness of the OMP has been shown to be crucial to determine a solution to the problem of an overly detailed illustration. The representation of the electrocardiogram signal has 1,974 keys less than 0.5, and the original electrocardiogram signal (chfdbchf1) has a size of 2,048. Figure 3 illustrated the original signal. The recovered ECG signals are created by the three recovery algorithms in compressed sensing reconstruction. These algorithms are compared in Fig. 4a, b, and c. Figure 4d displays the produced electrocardiogram signal by the ACSAR algorithm. Figure 4a, b, and c show the average reconstructed noise that is 0.3883, 0.2634, and 0.3239, for GPSR, LASSO, and OMP, respectively. The ACSAR reconstructed noise is shown in Fig. 4d; its value of 0.0878. It is clear that the predicted reconstructed algorithm offers a more accurate evaluation than the GPSR, LASSO, and OMP.
6 Results and discussions
Figures 5, 6, 7 and 8 illustrate the CR versus the number of samples for healthy and sick people. Figures 9, 10, 11 and 12 show the PRD with the number of samples of healthy and unwell people. The results of the proposed work are compared to other compression techniques in previous published studies [7, 8, 10, 16, 17]. According to experimental findings, the utilized ECG signals are smoothed away from line discontinuities and represented very well by the curvelet transform. Through suggested optimization processes, the ECG is re-architected with high accuracy by applying a small number of data that are characterized as a sparse signal. Accordingly, it is demonstrated that CS-based ECG compression outperforms its DWT-based cousin in terms of superior reconstruction quality. For compressing ECG signals, the curvelet transform is the best choice due to the curvelet transform having a non-stationary property and being confined. Finally, the MIT-BIH database is selected for the ECG signal testing. The implementation of the proposed technique using MATLAB software.
The simulation results show that CR in the suggested way produced fantastic outcomes. As a result, the CS technique is currently related to biomedical engineering. It encourages scholars to adopt this strategy as a superior one for this type of search, as well. This fact is illustrated in Figs. 6, 7 and 8, and 9. These statistics also show that an increase in the number of samples causes the CR to rise.
The PRD for the suggested approach has acceptable values, as shown in Fig. 11. The proposed CS outperforms the two most recent strategies in the same search domain in terms of PRD values for various sample sizes. These two methods used the DWT to obtain the sparse ECG signal. However, the suggested CS method employed the curvelet transform. The identical simulation is carried out for the patient people in the next figures.
The proposed CS technique is suitable to achieve the least amount of distortion between the original ECG signal and the reconstructed signal, as shown in Figs. 9, 10 and 11, and 12. This makes the CS technique robust for medical and IoT applications. Table 2; Fig. 13 illustrate comparisons between the proposed technique and previous studies in terms of performance metrics.
7 Conclusion
In this paper, a compressive sensing (CS) technique is applied to compress ECG signals toward medical applications. This technique achieves a high compression ratio of the ECG signals with high quality reconstruction. The proposed CS achieved a PRD of 2.0 and a CR of 15.7. One limitation of proposed work is that the CS requires costly hardware to process ECG signals. Further, a curvelet transform (CT) is implemented to analyze the performance of the compression. Results demonstrate that the proposed CT achieved better performance based on the metrics of CR, PRD, PSNR, and MSE. The results illustrate that the proposed CT is superior than discrete wavelet transform (DWT). A DWT technique in previous works is compared to the CS technique, which is based on extracting sparse signals of ECG with the CT. Four signal processing algorithms “GPSR, LASSO, OMP, and ACSAR” are used to compare the CS technique. In future work, various compression techniques could be applied to other biomedical signals to improve their performance. Also, one could use different evaluation metrics and datasets to assess the performance of the CS technique.
Data availability
The paper has no dataset.
References
Sharma N, Madhavi S, Inderjit S (2019) The history, present and future with IoT. Internet of things and Big Data Analytics for Smart Generation, vol 154. Springer, Cham, Switzerland, pp 27–51
Ibarra-Esquer JE, González-Navarro FF, Flores-Rios BL, Burtseva L, Astorga-Vargas MA (2017) Tracking the evolution of the internet of things concept across different application domains. Sensors 17(1379):1–24
Djelouat H, Amira A, Bensaali F (2018) Compressive sensing-based IoT applications: a review. J Sens Actuator Netw 7(45):1–31
Ibrahim AS, Abbas AM, Hassan AMA, Abdel-Rehim WMF, Emam A, Mohsen S (2023) Design and implementation of a pilot model for IoT Smart Home Networks. IEEE Access 11:59701–59728
Lu Y, Papagiannidis S, Alamanos E (2018) Internet of things: a systematic review of the business literature from the user and organisational perspectives. Technol Forecast Soc Change 136:285–297
Chou CY, Chang EJ, Li HT, Wu AY (2018) Low-complexity privacy-preserving compressive analysis using subspace-based dictionary for ECG telemonitoring system. IEEE Trans Biomedical Circuits Syst 12(4):801–811
Picariello F, Iadarola G, Balestrieri E, Tudosa I, De Vito L (2021) A novel compressive sampling method for ECG wearable measurement systems. Measurement 167:108259
Mei Y, Gao Z, Wu Y, Chen W, Zhang J, Ng K (2022) Compressive sensing based joint activity and data detection for grant-free massive IoT access. IEEE Trans Wirel Commun 21(3):1851–1869
Unde AS, Deepthi PP (2019) Design and analysis of compressive sensing-based lightweight encryption scheme for multimedia IoT. IEEE Trans Circuits Syst II Express Briefs 67:167–171
Salsekar B (2016) Filtering of ECG Signal Using Butterworth Filter and its feature extraction. Int J Eng Sci Technol 4:1292–1298
Al Disi M, Djelouat H, Kotroni C, Politis E, Amira A et al (2018) ECG signal reconstruction on the IoT-gateway and efficacy of compressive sensing under real-time constraints. IEEE Access 6:69130–69140
Rani M, Dhok SB, Deshmukh RB (2018) A systematic review of compressive sensing: concepts, implementations and applications. IEEE Access 6:4875–4894
Mishra I, Jain S (2021) Soft computing based compressive sensing techniques in signal processing: a comprehensive review. J Intell Syst 30:312–326
Vijay F, Gowri L, Velmurugan S, Basha AM (2016) Detection and extraction of P Wave and T Wave in ECG to improve sensitivity for E-Health monitoring. Int J Commun Comput Technol 4:4020–4024
Abo-Zahhad M, Ahmed SM, Zakaria A (2012) An efficient technique for compressing ECG signals using QRS Detection, estimation and 2D-DWT coefficients thresholding. Model Simul Eng 20:1–10
Luisa F, Polania F, Carrillo E, lanco-Velasco MB, Kenneth EB (2011) Compressed Sensing Based Method for ECG Compression. IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp 761–764
Lu Z, Pearlman K (2000) Wavelet Compression of ECG signals by the set partitioning in hierarchical trees Algorithm. IEEE Trans Biomed Eng 47:849–856
Aziz A, Singh K, Osamy W, Khedr AM (2019) Effective algorithm for optimizing compressive sensing in IoT and periodic monitoring applications. J Netw Comput Appl 126:12–28
Surekha KS, Patil BP (2016) ECG Signal Compression using the high frequency components of Wavelet Transform. Int J Adv Comput Sci Appl 7:311–315
Hassan AMA, Mohsen S, Abo-Zahhad MM (2023) ECG signals compression using dynamic compressive sensing technique toward IoT applications. Multimed Tools Appl 83:35709–35726
Petkovski M, Bogdanova S, Bogdanov M (2006) A simple adaptive sampling algorithm. In: 14th Telecommunications forum TELFOR, Belgrade, Serbia, pp 329–332
Bensegueni S, Bennia A (2016) ECG signal compression using a sinusoidal transformation of principal components. Int J Softw Eng Appl 10:59–68
Surekha KS, Patil BP (2016) Transform based techniques for ECG Signal Compression. Int J Signal Process 11:6139–6143
Hiremath GPS, Shivashankar S, Pujari J (2006) Wavelet based features for color texture classification with application to CBIR. Int J Comput Sci Netw Secur (IJCSNS) 6:124–133
Arulselvi S, Mangaiyarkarasi P (2011) A new digital image watermarking based on finite ridgelet transform and extraction using ICA. DETECT IEEE 34:837–841
Abbass MY, El-Rabaie S, Abd El-Samie FE (2013) Efficient blind image separation using finite ridgelet transform. International Conference on Computer Theory and Applications (ICCTA), pp 29–31
Qureshi K, Patel VP (2013) Efficent data compression of ECG signal using discrete wavelet transform. Int J Res Eng Technol 2:696–699
Siddhi D, Naitik N (2014) Improved performance of compressive sensing for speech signal with orthognal symmetric Toeplitz matrix. Int J Signal Process Image Process Pattern Recognit 7:371–380
Mohsen S, Ali AM, El-Rabaie E-SM, ElKaseer A, Scholz SG, Hassan AMA (2023) Brain tumor classification using hybrid single image super-resolution technique with ResNext101_32 × 8d and VGG19 pre-trained models. IEEE Access 11:55582–55595
Mohsen S, Alharbi AG (2021) EEG-Based human emotion prediction using an LSTM Model. 2021 IEEE International Midwest Symposium on Circuits and Systems (MWSCAS), Lansing, pp 458–461
Mohsen S (2023) Recognition of human activity using GRU deep learning algorithm. Multimedia Tools and Applications. 82:47733–47749
Surekha KS, Patil BP (2018) ECG signal compression using the high frequency components of wavelet transform. Int J Adv Comput Sci Appl 7:311–315
Hamza RK, Rijab KS, Hussien MA (2021) The ECG data compression by discrete wavelet transform and huffman encoding. 2021 7th International Conference on Contemporary Information Technology and Mathematics (ICCITM), Mosul, Iraq, pp 75–81
Banerjee S, Singh GK (2021) Quality guaranteed ECG signal compression using tunable-Q wavelet transform and möbius transform-based AFD. IEEE Trans Instrum Meas 70:1–11 (Art 4008211)
Cuk A, Bezdan T, Jovanovic L et al (2024) Tuning attention based long-short term memory neural networks for Parkinson’s disease detection using modified metaheuristics. Sci Rep vol 14:4309
Minic A, Jovanovic L, Bacanin N, Stoean C, Zivkovic M, Spalevic P, Petrovic A, Dobrojevic M, Stoean R (2023) Applying recurrent neural networks for anomaly detection in electrocardiogram sensor data. Sensors 23(24):9878
Funding
Open access funding provided by The Science, Technology & Innovation Funding Authority (STDF) in cooperation with The Egyptian Knowledge Bank (EKB).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
There is no conflict of interest regarding the publication of this paper.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Hassan, A.M.A., Mohsen, S. Compression of electrocardiogram signals using compressive sensing technique based on curvelet transform toward medical applications. Multimed Tools Appl (2024). https://doi.org/10.1007/s11042-024-19328-z
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11042-024-19328-z