Introduction

The main aim of signal processing is to evaluate frequency components of the signal and extract changes in terms of amplitude and shape. Most of the signal processing techniques use predetermined basis, thus these techniques are non-adaptive [28]. For processing of non-stationary signals, time- frequency representation is a good alternative, because it provides information of frequency content over the time. Therefore, transform-based techniques have become more popular for processing and analyzing the non-stationary signals. Fourier transform (FT) is a very useful technique for analyzing a signal in frequency domain, however, it only provides the detail about the frequency components present in the signal. The time and frequency information cannot be seen at the same time by FT. This problem is solved by using short-time Fourier transform (STFT) method, which is very effective in analyzing small portion of the signal. However, the main drawback of STFT is that it cannot define instantaneous frequencies effectively, as a result of fixed window size. To overcome this problem, wavelet transform (WT) is used, since it decomposes a signal into a number of time-frequency levels [29]. However, WT is not effective for processing signals in noisy environments. WT technique is a non-adaptive technique because it is based on the custom of basis and independent of the input signal. To overcome the problem of non-adaptability, Huang et al. [30] have introduced empirical mode decomposition (EMD). This technique is good for demonstrating a non-stationary signal as the sums of zero-mean amplitude and frequency modulation components. EMD is also used as a dyadic filter bank [31]. However, the main disadvantages of EMD technique are; (a) less mathematical theory is available, (b) complex method and (c) slow process. These limitations are removed by empirical wavelet transform (EWT) [32]. Nowadays, it is the most popular and widely accepted technique. In a comparative analysis, it is observed that using EWT method, more consistent decomposition is achieved. Another advantage of EWT is, it has good mathematical background in comparison to EMD [33, 34]. Therefore, it is used in several areas, such as, vibration signals measurement [57], wheel-bearing fault diagnosis of trains [59], seismic time-frequency analysis [58], estimation of single-phase and three-phase power-quality [56].

The human body consists of various types of systems, such as cardiovascular system, respiratory system, biochemical system, nervous system, etc. The analysis of these systems can be done by examining the biomedical signal generated by the human body cells. One of the most important biomedical signals is the electrocardiogram (ECG) signal, which represents the polarization and depolarization action of the cardiac cells [1]. The normal ECG signal is depicted in Fig. 1. In this figure, P wave, QRS complex and T wave show the depolarization of two atria, depolarization of the ventricles and repolarization of the ventricles, respectively [2]. Almost all measurement systems suffer from certain kinds of noises. An ECG signal suffers from baseline wander, power line interference, motion artifacts, muscle contractions noise, electrode contact noise and instrumental noise generated by an electronic circuit. For the accurate analysis of an ECG signal, denoising is very important. Therefore, several algorithms are proposed to remove these noise using different techniques, such as; EMD and discrete wavelet transform (DWT), adaptive filtering, ensemble empirical mode decomposition, principal component analysis (PCA) and independent component analysis (ICA), and several other [3,4,5,6].

Fig. 1
figure 1

Normal ECG waveform [2]

Interpretation and diagnosis of disease within the reasonable time are very important for a critically ill cardiac patient. However, it is not possible for all time due to some reasons, such as; (a) low-availability of health experts in district/remote hospitals, (b) vast land areas with difficult/inaccessible terrain in various places, (c) in some seasonal isolation (due to factors like floods, tsunami, earthquake, etc.), it is very difficult to diagnose number of patients simultaneously and (d) low doctor to patient ratio, which is very low in all over the world [7,8,9]. In these situations, telemedicine and e-health care systems play an important role in patient caring. In such systems, physiological parameter extraction is done in one location (patient site) and feature analysis is performed in another location (doctor site) by transmitting the recorded data using suitable transmission channel. For efficient data transmission, data size should be less, therefore data compression is done before the transmission. Data compression is also important to reduce the storage requirement of ECG signal, which is important in Holter monitor system. As a result, numerous schemes have been proposed for ECG signal compressions from the past few decades [10,11,12].

These techniques can be divided into two methods lossy and lossless. In lossy compression schemes, irrelevant information is eliminated to achieve high compression ratio (CR), on the contrary, the recovered data is not the exact replica of the original input data. And in case of lossless data compression, the recovered data is exact replica of input data. These techniques are also categorized into two groups; direct data reduction methods and transform-based data reduction method. The AZTEC, SAPA, CORTES, DPCM and turning-point (TP) data reduction algorithm are some examples of direct data compression methods. In transform-based data compression techniques, data are changed from one domain to another domain, such as; discrete cosine transform (DCT), FT, Walsh–Hadamard transform, WT, etc. Some other methods are also used to compress the ECG signal based on parameter extraction. In these methods, extraction of a set of parameters from the original signal is done and then extracted parameters are used to reconstruct the signal, such as artificial neural network (ANN)-based methods, optimization-based methods and syntactic methods [13,14,15,16,17,18, 47]. Some researchers have introduced hybrid methods based on lossy and lossless methods to improve the compression performance [19, 21,22,23,24]. Among these techniques, transform-based techniques are more preferable because of good signal reconstruction quality and high compression performance [21]. To achieve high CR and low PRD, selection of threshold value is very important. Several methods are proposed to select suitable thresholding [25,26,27]

In the process of compression and decompression of a biomedical signal, coding-based methods are preferred because these are lossless methods and hence, no diagnostic information lost. However, these methods provide low compression ratio. Therefore, it is very important to make trade-off between percent root-mean-square difference (PRD) that uses to examine the reconstruction quality of the signal and CR, i.e., quality score (QS) factor. Therefore, several methods (transform technique and coding based) are proposed for achieving the high CR and very low PRD [24].

Other fidelity parameters are also used to examine the performance of ECG data compression, such as retained energy (RE), signal-to-noise ratio (SNR), correlation co-efficient (CC), maximum error (ME), mean square error (MSE), etc. [24, 35]. An ECG signal is a physiological signal that has different frequency component of different amplitude, which represent different physiological activity of a person. Therefore, reconstructed data should have the same features as original input signal (i.e., amplitude, time duration and instant) any feature loss may leads to wrong interpretation of the diseases. Therefore, data reconstruction performance should be calculated using comparison of features of both signals (original and reconstructed signal) [36] or using weighted diagnostic function (WDD) [37].

Beat detection is the mandatory part of the ECG signal analysis for cardiac disease interpretation. Several methods have been presented to detect the beat (amplitude and location), for example, method based on variable contexts generation [38], a combination of wavelet transform and linear prediction method ([39, 40], emd-based method [41], mathematical morphology based method [42], neural network based [44], geometrical matching [45] and support vector machines (SVMs) classifier [46]. For complete cardiac condition estimation, other feature detection is also required. Therefore, several researchers have introduced several methods for feature detection, viz, WT-based method [54], fast Fourier transform (FFT) and ANN-based method [55], adaptive threshold and PCA and WT. Other methods are also introduced which are given in Karpagachelvi et al. [53].

From the above literature survey, the different points can be concluded: (a) ECG data compression is very important to a diagnose a cardiac patient in telemedicine and e-health care system, (b) transform-based data reduction methods are more preferable than the other data compression techniques, (c) EWT is very effective to process a non-stationary signal, (d) transform- and coding-based hybrid data reduction techniques can improve QS and (e) for a biomedical signal compression, data decompression should be examined by comparison of diagnostic features of input and reconstructed signal.

Therefore, in this paper, EWT- and RLE-based data compression technique is used to compress ECG rhythms. EWT is used because it decomposes signal adaptively and RLE is used, because it is a lossless method, which provide good PRD value. It is also a simple coding method as compared to other lossless methods. A suitable thresholding value is computed based on energy packing efficiency (EPE) to restore the significant coefficient of the signal. Different features of both signals (original and recovered) are extracted and compared to examine the performance of data decompression.

The paper is organized as follows, a brief introduction of ECG signal and literature on ECG data compression and feature extraction is presented in Section “Introduction”. Techniques, viz., differential wavelet transform, empirical wavelet transform and run-length encoding are discussed in Section “Highlights of Methods”. Section “Proposed Methodology” presents the projected methodology. In Section “Results and Discussions”, demonstration of different experimental results of the proposed technique is presented. The conclusion from the experimental results is given in the Section “Conclusions”.

Highlights of Methods

The main goal of ECG data reduction is to reduce the irrelevant information for reducing the size of the signal. In this work, ECG data compression is done using a hybrid technique based on WT and RLE. Empirical wavelet transform is used because of its adaptable property. In this section, brief introduction of EWT, WT and RLE is presented.

Discrete Wavelet Transform (DWT)

Fig. 2
figure 2

Wavelet decomposition

The wavelet transform is one of the most popular mathematical tools that is used to analyze a signal. It is superior to other transform methods of data compression, as a result of multiresolution ability. It is classified into two types: continuous wavelet transform (CWT) and discrete wavelet transform (DWT). A signal can analyze by different scale or resolutions using wavelet transform, which makes WT more popular and large number of applications in different areas. In Fig. 2, a wavelet filter bank structure is shown, here the input signal (X(n) ) is divided into two frequency bands using low pass (G) filter, high pass (H) filter and down-sampling factor (2). Further, the low pass band is again divided into two bands. d1, d2 and d3 indicate the three level of decomposition. This structure is called as tree structure filter bank. It can be designed by using a single prototype filter. Mathematically, it is defined as [29]:

$$\begin{aligned} h_{m,n}(t)=\frac{1}{\sqrt{m}}h\left( \frac{t-n}{m} \right)\,\,\, {\text {where}}, m~ {\text {and}} ~n ~\epsilon R. \end{aligned}$$
(1)

The continuous time WT can be defined for a continuous signal x(t)

$$\begin{aligned} X_{W}(m,n)=\frac{1}{\sqrt{m}}\int _{\infty }^{-\infty }x(t)h*\left( \frac{t-n}{m} \right) x(t) \end{aligned}$$
(2)

where,

$$\begin{aligned} m= & {} 2^{-i} \end{aligned}$$
(3)
$$\begin{aligned} n= & {} j2^{-i} \end{aligned}$$
(4)

and * is used for complex conjugate. A discrete wavelet transform is more compact and required only wavelet coefficients. Therefore, DWT is preferred as compared to CWT. DWT of a signal x(t) can be defined as;

$$\begin{aligned} {\text {DWT}}_{h}x(g,k)=\int _{-\infty }^{\infty }x(t)h*(g,k)x(t){\text {d}}t \end{aligned}$$
(5)

where \(h*_{g,k}=2^{-g}h(2^{g}t-k)\), g and k are the positive set of integers (Z). And the scaling function \((\phi _{g,k}(t) )\) is used for a finite number of coefficients, which can be obtained as;

$$\begin{aligned}{} & {} \phi _{g,k}(t)=2^{-g}\phi (2^{g}t-k) \end{aligned}$$
(6)
$$\begin{aligned}{} & {} \phi (t)=\sum h(l) \phi (2t-l) \end{aligned}$$
(7)

DWT decomposes input sequence into two new sequences using low pass \(h_{1}(l)\) and high pass filter \(g_{1}(n)\) at each level of decomposition [44].

In this work, DWT is used to decompose the signal in different frequency bands for data compression and R-peak detection. Selection of mother wavelet is the very effective part of wavelet signal processing, it is not a universal rule but totally based on the application. These are various types of wavelets such as Daubechies, Meyer, Haar, Mexican Hat, bi-orthogonal, Symlets, Morlet, etc. In this work, bi-orthogonal (bior6.8) is chosen because it performs better in detecting discontinuities and transients then other wavelet. It also provides a clear, vigorous and shows symmetry formulation with Parseval’s theorem [43, 49].

Empirical Wavelet Transform (EWT)

Fig. 3
figure 3

EWT decomposition representation using low pass and band pass filters

An EMD technique is proposed to decompose the signal into a specific mode [30]. From the last decade, this technique has gained a lot of interest in signal analysis, since it separates stationary/non-stationary components from a signal efficiently. However, the less mathematical description presents in the literature is the main drawback of this method. A suitable adaptive method for processing a non-stationary signal is given by Gilles [32]. Similar to other wavelets, this wavelet also resembles in the temporal domain, to dilated versions of a single mother wavelet. Empirical wavelet can be defined as band pass filters on each level of decomposition. Empirical wavelet is important for non-stationary signal analysis, because it has property of adaptability. It is superior to other adaptable method in terms of less complexity and good mathematical theory. The empirical wavelet function can be written as [32].

$$\begin{aligned} \hat{\phi }(\delta ) =\begin{Bmatrix} 1 ~~~~~~~~~~~~~~~~~~~~~~~ \text{if}\, |\delta |\le \delta _{n}-\tau _{n}&\\ {\text {cos}}\left[ \frac{\pi }{2}\lambda \left[ \frac{1}{2\tau }(|\delta |-\delta _{n}+\tau _{n}) \right] \right] ~~~~~~~~~~~\\~~~~~~~~~~~~~~~~~{\text {if}}~ \delta _{n}-\tau _{n}\le |\delta |\le \delta _{n}-\tau _{n}&\\ 0~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~{\text {otherwise}}&\end{Bmatrix} \end{aligned}$$
(8)

where, \(\lambda (x)\) is the function of \(C^{k}([0,1])\) and defined in Eq. 9

$$\begin{aligned} \beta (x)=\left\{ \begin{array}{cc} 0~~ {\text {if}}~x\le {\text {and}} ~\lambda (x)+\lambda (1x)=1\forall ~~x\varepsilon [0,1] &{} \\ 1~~~~~~~~~~~~~~~~~{\text {otherwise}} &{} \end{array}\right. \end{aligned}$$
(9)

and empirical wavelet can be expressed as:

$$\begin{aligned} \hat{\psi _{n} } (\delta )=\left\{ \begin{array}{ll} 1 ~~~~~~~~~ \text{if}~\delta _{n} +\tau _{n}\le \delta _{n+1} +\tau _{n+1} \\ {\text {cos}}\left[ \frac{\pi }{2}\lambda \left[ \frac{1}{2\tau _{n+1} }(|\delta |-\delta _{n+1}+\tau _{n+1}) \right] \right] ~~~~~~\\ ~~~~~~~~~~~\text{if}~ \delta _{n+1}-\tau _{n+1} \le \delta _{n+1}+\tau _{n+1} & \\ {\text {sin}}\left[ \frac{\pi }{2}\lambda \left[ \frac{1}{2\tau _{n} }(|\delta |-\delta _{n}+\tau _{n}) \right] \right] ~~~~~~~~~~~~~~ \\ ~~~~~~~~~~~\text{if}~ \delta _{n}-\tau _{n}\le |\delta |\le \delta _{n}+\tau _{n} \\ 0~~~~~~~~~~~~~~~~ {\text {otherwise}} & \end{array}\right. \end{aligned}$$
(10)

There are several options possible to choose \(\tau _{n}\). In this work, \(\tau _{n}\) is proportional to \(\delta,\) i.e., where, \(0<y<1\), thus \(\forall ~0\). On putting these values in Eqs. 8 and 10.

$$\begin{aligned} \hat{\phi _{n} } (\delta )=\left\{ \begin{array}{ll} 1~~~~~~~~~~~~~ ~~~~~~ \text{if}~|\lambda |\le (1-\gamma )\delta _{n}\\ {\text {cos}}\left[ \frac{\pi }{2}\lambda \left[ \frac{1}{2\gamma \delta _{n} }(|\delta |+(1-\gamma )\delta _{n} \right] \right] ~~~~~~~~~~~~& \\ ~~~~~~~~~~~~~~~~~~~~~\text{if}~ (1-\gamma )\delta _{n}\le |\delta |\le 1+\gamma )\delta _{n}\\ 0 ~~~~~~ ~~~~~~~~~~~~~~~~{\text {otherwise}} \end{array}\right. \end{aligned}$$
(11)

and

$$\begin{aligned} \hat{\psi _{n} } (\delta )=\left\{ \begin{array}{ll} 1 ~~~~~~~~~~~~ \text{if}~(1+\gamma )\delta _{n}\le |\delta |\le (1-\gamma )\delta _{n+1} \\ {\text {cos}}\left[ \frac{\pi }{2}\lambda \left[ \frac{1}{2\gamma \delta _{n+1} }(|\delta |-\delta (1-\gamma )\delta _{n+1}) \right] \right] ~~~~~\\ ~~~~~~~~~~~~~~ \text{if}~ (1-\gamma )\delta _{n+1} \le |\delta |\le (1+\gamma )\delta _{n+1} & \\ {\text {sin}}\left[ \frac{\pi }{2}\lambda \left[ \frac{1}{2\gamma \delta _{n} }(|\delta |-(1-\gamma )\delta _{n} \right] \right] ~~~~~~~~~~~\\ ~~~~~~~~~~~~~~ \text{if}~ (1-\gamma )\delta _{n} \le |\delta |\le (1+\gamma )\delta _{n} \\ 0~~~~~~~~~~~~~~~~~~~~ {\text {otherwise}} & \end{array}\right. \end{aligned}$$
(12)

Segmentation of signal is done in this work is same as in Lei et al., which aims to separate different parts of the signal in the frequency domain. EWT is capable of extracting individual instantaneous frequencies of a signal. Figure 3 shows the EWT decomposition with low pass and high pass filter. Here, \(\delta _{1},\delta _{2},...., \delta _{n}\) are different cutoff frequency and mathematically it can be defined as [23, 32]);

$$\begin{aligned} W_{f}^{\delta }(n,t)=\left\langle f,\psi _{n} \right\rangle =\int f(\tau )\overline{\psi _{n}(\tau -t)}{\text {d}}t \end{aligned}$$
(13)

here, \(W_{f}^{\delta }(n,t)\) is EWT, which is illustrated in ([32]).

$$\begin{aligned} W_{f}^{\delta }(0,t)=\left\langle f,\phi _{1} \right\rangle =\int f(\tau )\overline{\phi _{1}(\tau -t)}{\text {d}}t \end{aligned}$$
(14)

and

$$\begin{aligned} \overline{f(t)}=W_{f}^{\delta }(0,t)\times \phi _{1}(t)+\sum W_{f}^{\delta }(n,t)\times \psi _{n}(t) \end{aligned}$$
(15)

Thus, empirical mode \(f_{k}\), can be written as;

$$\begin{aligned}{} & {} f_{0}(t)=W_{f}^{\delta }(0,t)\times \phi _{1}(t) \end{aligned}$$
(16)
$$\begin{aligned}{} & {} f_{k}(t)=W_{f}^{\delta }(k,t)\times \phi _{k}(t) \end{aligned}$$
(17)

Run-Length Programming (RLM)

Run-length programming scheme later engaged in the communication of television signals. It is a simple and lossless data reduction method in which the data is compacted by demonstrating the sequential rounds of the similar significance in the data as the significance followed by the total. For example: aaaabbccccccrrrrrrffff can be denoted as 4a2b6c6r4f. It is a fast technique; but the reduction efficiency of this technique depends on the data type. It can also be stated in several behaviors to place data belongings and additional reduction technique. RLM is also precise valuable in image reduction. In this effort, modified RLM is used to development the amount of reduction. In this case, two stage RLE is used, which is given in Fig. 4 [11, 23]).

Fig. 4
figure 4

Modified RLM method

Proposed Methodology

The proposed method is divided in three parts such as preprocessing of signal, data compression and feature extraction.

Preprocessing

Preprocessing is very important part of an analysis of the ECG signal. Various types of noises are presented in an ECG signal. In this work, WT is chosen because of its multiresolution property, which provides a more consistent in the resultant data than other method [29]. Firstly, the noisy ECG signal (MIT/BIH arrhythmia database) is obtained, then after, decomposing this signal into different frequency bands and after this, elimination of noisy coefficients is done by applying thresholding.

ECG Data Compression

In this part, proposed methodology of ECG data reduction is presented which is important in Holter monitor, telemedicine and e-health care system, etc. The aim of this study is to achieve high QS factor. Methodology of data reduction is done by using the different steps, and the flow chart of this methodology is given in Fig. 5.

Step 1 ECG signal acquisition.

MIT-BIH arrhythmia database is utilized to measure the performance of the projected data reduction method. This database includes 48 data files of sampling frequency 360 Hz. All signals of this database are 30 min long. This dataset includes 2 leads recording, generally, ML II lead (modified lead II) data is preferred, since it shows all the important ECG components, for example, P wave, QRS complex and T wave.

Fig. 5
figure 5

Proposed data compression method

Step 2 Noise elimination

In this work, performance of data reconstruction is evaluated using the comparative analysis of features of both signals (original and reconstructed signal). Therefore, extraction of features is also done. For exact feature extraction, noise present in the signal must be removed. Sometimes errors are also generated after reconstruction due to noise presents in the signal. Normalization and mean removal are also done in this work before the compression.

Step 3 Signal decomposition

EWT divides the ECG signal into three modes (frequency modes). Three mode decomposition is chosen, to divide frequency efficiently. Two mode signals (mode2 and mode2 are selected, because most of the significant information is present in these modes) are decomposed into different bands using DWT. Selection of decomposition level must be done in such a way, so that all relevant frequency components are separated from the most irrelevant frequency components and signal reconstruction can be done efficiently at the synthesis section. Therefore, in this work, 5 levels of decomposition are applied.

Step 4 Thresholding

Fig. 6
figure 6

Thresholding value measurement

Selection of thresholding value plays an important role in compression of a signal. Compression is achieved by truncating the coefficients below the value of thresholding. In this work, the selection of thresholding is done by the evaluation of energy packing efficiency (EPE) of the decomposed signals. EPE is defined in Eq. (18) [27].

$$\begin{aligned} {\text {EPE}}_{Di}=\frac{\overline{E_{CDi}}}{E_{CDi}}\times 100\% \end{aligned}$$
(18)

where, \(\overline{E}_{CDi}\) and \(E_{CDi}\) are representing the total energy in the detail bands after and before thresholding, respectively, for the level of i. Since, most of the energy coefficients are occupied in the lower frequency bands, therefore selection of thresholding should be done in such a way so that maximum energy will remain same. Since, most of the energy is presented in the approximation band (99.9%) and lower detail band, coefficients of approximation band are not truncated. While coefficients of lowest detail band (d5) are truncated in such a way so that the energy remains (99–97%). For the remaining detail bands energy will be 85–99%. The steps used for detection of the thresholding value are depicted in Fig. 6. After measuring the threshold values apply to their respective bands. After this, all significant coefficients of all bands are used to form two vectors, such as

\({\text {vector}}1=[a5_{1}~~ b5_{1} ~~b4_{1} ~~b3_{1}~~ b2_{1} ~~b1_{1}]\)

\({\text {vector}}2=[a5_{2}~~b5_{2} ~~b4_{2} ~~b3_{2}~~ b2_{2} ~~b1_{2}]\)

Step 5 Modified RLE application

here, a represents the approximation band and b detailed band. Apply modified (given in Fig. 4) RLE to these vectors coefficients for further compression of data. Here, vector coefficient values are used up to 3 decimal point. In this work, 5 bit representation is used to represent the data: first bit is used to sign and remaining four for the magnitude representation.

At the receiver end signal is reconstructed using the different steps.

Step i Application of Run-length decoding.

Two stages RLE decoding used (first by using (v11 and v110) and second by taking result of first RLE decoding and v10)

Step ii Reconstruction of signal

The signal reconstruction is done using inverse transforms. First, the vector coefficients are divided into 5 signals and then recombine all by taking inverse transform.

Feature Extraction

In this study, the features are extracted from original noise free signal and reconstructed signal. The first step of ECG feature extraction is the detection of R-peaks. Then after, all the other features are detected using corresponding R-peak. The procedure for R-peaks detection is done by the different steps;

Step 1 ECG signal acquisition

Noise free signal is taken for extracting the features.

Step 2 Signal decomposition

Bi-orthogonal WT is utilized to detect the R-peaks by decomposition of signal. Here, four level decomposition is applied.

Step 3 Estimate of the peak points

Detection of peaks is done by extracting maximum peaks of low pass signal by applying the thresholding.

Step 4 Estimate of R-peaks

Since 4 level decomposing is applied to the signal, approximate location of R-peak is calculated by:

$$\begin{aligned} R _{i} =r_{i}\times 2^j \end{aligned}$$
(19)

for \(i=1,2,3.....n\) and n is the total number of R-peaks where, \(R_{i}\) is ith R-peak location and j is the number of decomposition level.

Step 5 Evaluation of original R-peak locations: Actual R-peak locations are determine by detection of maximum amplitude points presented between the location sample values (\(i-2^j ~to~ i+2^j\))

Step 6 Detection of the other features of ECG signal. Detection of other features are done using methods given by Saxena et al. [36]. These steps are repeated to extract the features of reconstructed signal. A comparative study is done of the extracted features of original noise free ECG signal (before compression) and corresponding of reconstructed signal, depicted in Table 4.

Results and Discussion

In this division, experimental outcomes of the offered method are presented. This work presents three things: denoising, compression and beat detection. The presentation of proposed data reduction method is measured in expressions of [24, 35]:

  1. (a)

    Compression ratio (CR)

    $$\begin{aligned} {\text {CR}}=\frac{\text {No of bits used to present orginal signal}}{\text {No of bits used to present commpressed signal}} \end{aligned}$$
    (20)
  2. (b)

    Retained energy (RE)

    $$\begin{aligned} {\text {RE}}= \frac{||x(h)||^{2}}{||x(h)-y(h)||^{2}} \end{aligned}$$
    (21)

    where, x(h) and y(h) are base and recover signal, respectively.

  3. (c)

    Percent root mean square difference (PRD)

    $$\begin{aligned} {\text {PRD}}=\left( \frac{\text {Recovered noise energy}}{\text {Original energy}}\right) ^{1/2}\times 100 \end{aligned}$$
    (22)
  4. (d)

    Signal-to-noise ratio (SNR)

    $$\begin{aligned} {\text {SNR}}=100\text{log}_{10} \frac{\sum x^{2}(n)}{\sum |x(n)-y(n)|^{2}} \end{aligned}$$
    (23)
  5. (e)

    Quality score (QS)

    $$\begin{aligned} {\rm {QS}}=\frac{\rm {CR}}{\rm {PRD}} \end{aligned}$$
    (24)
  6. (f)

    Mean Square error (MSE)

    $$\begin{aligned} {\text {MSE}}=\frac{1}{2}\sum \left| x(k)-y(k) \right| ^{2} \end{aligned}$$
    (25)
  7. (g)

    Maximum error (ME)

    $$\begin{aligned} {\text {ME}}=\underset{n}{{\text {max}}}\left| x(k)-y(k) \right| \end{aligned}$$
    (26)

    And the presentation estimation of beat finding method is done by using the different limitations:

  8. (h)

    Sensitivity (\(S_{e }\) )

    $$\begin{aligned} S_{e }=\frac{\text {TP}}{\text {TP}+\text {FN}} \end{aligned}$$
    (27)

    where, FN is false negative and TP is true positive.

  9. (i)

    Positive predictivity (\(+P\)) [38, 40]

    $$\begin{aligned} +P=\frac{\text {TP}}{\text {TP}+\text {FP}}, \end{aligned}$$
    (28)

    where, FP is the false positive.

  10. (j)

    Error \((E_{r} )\)

    $$\begin{aligned} E_{r }=\frac{\text {FP}+\text {FN}}{\text {TB}} \end{aligned}$$
    (29)

    In this equation, TB represents the total number of beats present in the signal and

  11. (k)

    Accuracy (A)

    $$\begin{aligned} A=\frac{\text {TP}}{\text {TP}+\text {FP}+\text {FN}}\times {100}\% \end{aligned}$$
    (30)
Fig. 7
figure 7

MIT/BIH arrhythmia database (100 m signal) and 3 mode signals

Table 1 Fidelity assessment parameters in proposed method
Table 2 Comparative analysis of performance of proposed method with other method
Fig. 8
figure 8

Compression ratio on different detailed energy packing efficiency

Fig. 9
figure 9

PRD on different detailed energy packing efficiency

Fig. 10
figure 10

Original and reconstruction signal

Fig. 11
figure 11

Performance comparison of proposed method in term of CR, PRD and QS using 48 data (MIT-BIH arrhythmia database)

Fig. 12
figure 12

Beat detection of MIT/BIH database (123 m)

Table 3 Presentation indices of beat detection

MIT-BIH arrhythmia database has been taken to estimate the presentation of the offered technique. In this work, first the noise present in the signal is removed using WT. The noise free signal is divided into 3 modes (Mode1, Mode2 and Mode3) using EWT, which are depicted in Fig. 7. Mode3 and Mode2 signals are applied to wavelet decomposition of the signal. In this work, bi-orthogonal (bior6.8) wavelet is used to decompose Mode2 and Mode3 signal into five frequency bands. These bands are divided into two categories, i.e., approximation band and detail band. Most of the energy of Mode2 and Mode3 is presented in their respective approximation band and lower detail bands.

Table 4 Comparative analysis of different features

In this work, for approximation band (a5) EPE is taken 99.99% and for lowest detail band (d5) is 95% for measuring the threshold value. Threshold value is estimated by using steps given in Fig. 6. The value of CR and PRD for different EPE are shown in Figs. 8 and 9, respectively. In Fig. 10a, original input signal is presented and reconstructed signal is shown in Fig. 10b, which is the replica of the input signal. In This case, the compression ratio is achieved 29.9, the PRD is = 0.78, SNR = 31.45, and RE = 99.96. The performance of this method is examine using fidelity parameters for different data, which is presented in Table 1, and the comparative analysis of performance of proposed method with the other existing methods is depicted in Table 2, from this table it can be observed that the proposed algorithm provides better results as compared to other methods in terms of CR and PRD both, i.e, overall QS is improved.

The performance of CR, PRD and QS of presented method is given in Fig. 11 for MIT-BIH arrhythmia dataset. In this work, R-peak detection is also done using bi-orthogonal wavelet. For R-peak detection, first the input signal is decomposed into 4 level and the peaks of this signal are detected using amplitude and time (sample) thresholding. Here, the amplitude thresholding value is chosen according to maxima of the 4th level decomposed signal and time thresholding 35 sample is chosen. Wavelet decomposition and peak detection is given Fig. 12. The exact R-wave location detection is done using steps 4 and 5 (given in Section “Feature Extraction”). After detection of R-peaks, full beat locations and other feature detection are performed. For detection of all other features, some rule base algorithms used given in. In Table 3, the experimental results of beat detection are presented. For data reconstruction (decompression using steps Step i and ii of Section “ECG Data Compression”), the performance of data reconstruction is also examined by comparing the features of both (input signal and reconstructed signal) which is depicted in Table 4. This table demonstrates the sample value of the respective features of the original and reconstructed signal. For example: first P wave peak of the MIT-BIH database (100) is presented on the sample value 8 and P peak of reconstructed signal is presented on the sample value of 7. Similarly, the first R-peak is presented at 78th sample of original signal and R-peak of reconstructed signal is presented at 76th sample. From this table, it can be concluded that the features are either on the same sample value or within the tolerance limit.

Conclusions

In this paper, a new effective procedure is offered for the ECG data reduction. The data compression is done by the highly adaptable technique EWT. Further, the performance of proposed algorithm is improved using RLE in terms of CR that is depicted in Table 1. For evaluation of performance of proposed algorithm, MIT-BIH arrhythmia database is taken as input signal. Different fidelity parameters are used to calculate the presentation of the projected technique. Simulated results demonstrate that the offered algorithm completely reconstructed the compressed signal without loss of diagnostic information. Table 1 shows that proposed method gives up to 31.1 of CR and 0.075 PRD, which is highly recommended. From the comparative analysis given in Table 2, it can be concluded that the projected technique is superior to the other existing methods. This work also presents the beat tabular results which determine that the offered method gives beat detection accuracy up to 100%, sensitivity up to 99.67% and positive predictivity up to 99.79, which is depicted in Table 3. Demonstration from Table 4 is that the reconstructed signal gives same or within the tolerance range diagnostic information as the original signal.