Keywords

1 Introduction

Cardiovascular decease (CVD) is the major cause of mortality in the world presently and near future as per World Organization and Unites Nations report [1]. Here, heart rate variability (HRV) plays a vital role in the primary screening of cardiac health conditions [2]. It represents the physiological state of an autonomic nervous system (ANS) that is responsible for cardiac rhythm and activity [2, 3]. In this analysis, QRS wave complex especially R-peak is very important key in electrocardiogram (ECG) signal and its interpretation. Over the years, several researches have been developed in form of algorithms and different systems for screening of HRV based on the R-peak analysis [3, 4]. In this context, different techniques have been proposed for R-peak detection based on different filtering and morphological operations, derivatives methods, transform techniques, template matching, and many more techniques as reported in literature [5,6,7,8,9,10,11,12]. The basic aim of these techniques is to improve the detection rate/sensitivity of algorithm for R-peak detection. Although, these techniques are not up to 100% sensitivity due to different morphology and nonstationary nature of signal that is a challenging and open research problem for the researchers and scientist.

As growing trend of digital monitoring and diagnosis system in healthcare applications is in a growing trend, a wide range of techniques have been proposed in different health screening area. In particular, R-peak or QRS detection algorithms a diverse range of techniques are developed in the last decades [2]. In 1985, Pan Tompkin (PT) has proposed a QRS detection technique that is very popular in the literature based on different filtering and peak finding process [13]. A detailed study of the different algorithm is summarized by Kolher et al. [14]. These techniques have different sensitivity rate in peak detection. Similar to another area of signal processing research [15], wavelet transform based technique gives higher sensitivity and accuracy in peak detection, but it requires the selection of suitable mother wavelet transform. Here, Hilbert transform based R-peak detection technique also popular for higher accuracy but limited cases [16].

In ECG signal, the QRS wave has contained specific band of frequency [13] that can be localized. Several previous works utilized the absolute energy envelope of local spectra for finding the peaks. Here, S-transform and Shannon energy-based R-peak detection technique are presented. Where S-transform offers the frequency-dependent localization; while retaining a direct relationship with the Fourier spectrum. This advantage of S-transform is exploited to isolate the QRS complex in time–frequency domain instead of different filtering operations. Therefore, Shannon energy envelope of QRS spectra in time–frequency domain is exploited for peak localization.

The presented method is evaluated with selected dataset of the MIT-BIH arrhythmia database. The rest of paper is organized as follows with the introduction in Sect. 1, brief details of the methodology are presented in Sect. 2, result and discussion are included in Sects. 3 and 4 followed by a conclusion.

2 R-Peak Detection

In this paper, Shannon energy and s-transform based R-peak detection algorithm has been presented as shown in Fig. 1. The basic processes of peak detection are as follows: preprocessing, peak localization, and postprocessing. The performance of R-peak detection depends on the efficiency of these processes; although, the dataset is also important for evaluation that helps in performance comparison to other works.

Fig. 1
figure 1

Block diagram of R-peak detection process based on S-transform and Shannon Energy Envelope

2.1 Materials and Methods

The presented method of R-peak detection is based on S-transform and Shannon energy. Where dataset play a big role to evaluate the robustness of algorithms with respect to other techniques performance. These are summarized in subsections as follows.

  1. A.

    ECG Dataset

The MIT-BIH arrhythmia database is utilized for evaluating the presenting technique of R-peak detection [17]. The database has conations 48 records of male and female patients. These records having 30-min length of signal from two different channels (modified limb lead II and one of the modified leads V1, V2, V4, or V5) that are recorded with sampling frequency 360 Hz and 11 bits of resolution. In most of the records, lead II is used as a default channel for prominent QTS complexes.

  1. B.

    Performance Evaluation Parameters

The statically parameters are used for evaluating the performance of R-peak detection technique. These are defining as follows:

$$ \bullet \,{\text{Sensitivity}}\, (S_{e} )= \frac{TP}{TP + FN},\, \bullet \,{\text{Positive}}\,{\text{Predictivity}}\, (P_{ + } )= \frac{TP}{TP + FP},\, \bullet \,{\text{Error}}\, (E_{r} )= \frac{FN + FP}{TB} $$

where TP, FP, FN, and TB represent the correctly detected beat (True Positive), falsely detected beats (False Positive), the undetected beats (False Positive), and total detected beats, respectively [12].

  1. C.

    S-Transform

In 1996, Stockwell was proposed a time–frequency analysis tool known as S-transform. It is providing the access to various frequency selections without any filtering process. The S-transform also efficient in time–frequency resolution with maintaining a direct relationship with local Fourier spectra [18]. It is derived from short-time Fourier transform (STFT) and wavelet transform (WT) and is defined as for a time-varying signal x(t),

$$ S(\tau ,f) = \int\limits_{ - \infty }^{ + \infty } {x(t)w(t - \tau )} e^{ - i2\pi ft} dt $$
(1)

where w(t) is a time window that is centred at t  = 0 and is defined as Gaussian window []. The discrete S-transform is defined as

$$ S(j,n) = \sum\limits_{m = 0}^{N - 1} {X(m + n)W(m,n)e^{(i2\pi mj)/N} ;\quad n \ne 0} $$
(2)

The response of S-transform is called ST-matrix of N × M, where rows are representing the time and columns are frequencies.

  1. D.

    Shannon Energy

The Shannon energy is defined as

$$ {\text{SE}}(j) = - [S(j,n)]^{2} \log [S(j,n)]^{2} $$
(3)

where \( [S(j,n)]^{2} \) is the absolute energy of signal or transform coefficients. In absolute energy process, low and high amplitude of R-peak segment makes difficulty for peak or threshold selection. Therefore, Shannon energy-based approach has been exploited to obtain normalized peaks. It has several benefits over absolute energy approach such as small deviated successive peaks, reduction of low amplitude noise coefficients, produce sharp and smooth local maxima of energy envelop. These advantages help in detection of peak time/sample index in ECG signal using peak finding logic and Shannon energy envelope (SEE) [19].

2.2 R-Peak Detection Methodology

The R-peak detection algorithm is based on S-Transform and SSE has been summarized as follows in different stages as discussed earlier and shown in Fig. 1.

  1. Stage I:

    Preprocessing

    1. (a)

      ECG signal is decomposed with ST using Eq. (2), S(j,n) = ST[x(t)]

    2. (b)

      Compute the Shannon energy envelope SE(j) of ST coefficients using Eq. (3)

  1. Stage II:

    R-Peak Localization

    1. (a)

      Find the maxima (peak) of SSE using

      SE(j) > SE(j-1) and SE(j) > SE(j + 1)

    2. (b)

      Find the minima (valley) of SSE using

      SE(j) < SE(j-1) and SE(j) < SE(j + 1)

  1. Stage III:

    Identification of Real R-peak

    1. (a)

      Set threshold value: (maxima-minima)/4

    2. (b)

      Search again in [–25–25] range of maxima with threshold level.

    3. (c)

      Store the current maxima and its index value.

  1. Stage IV:

    ECG signal with R-peaks.

Therefore, detected R-peak helps to identify the heart rate variability, R-R intervals, and maximum amplitude of ECG signals. This analysis helps in preexamination of cardiac health, arrhythmia analysis. Recently, R-peak based temporal modelling of beats has been processed for compression of ECG signals due to its quasi-periodic of nature [15]. The accuracy of detection technique is very important because it causes error during the compression application. It is also important due to clinical accuracy that helps to identify the physiological condition of ANS. In this technique, SEE gives sharp and smooth peaks of selected QRS spectra based on ST that helps in accurate peak detection.

3 Results and Discussion

In this paper, a system is presented for HRV analysis based on the Shannon energy and S-transform. Here, the presented technique is evaluated with 27 different signals from MIT-BIH Arrhythmia records; the system framework gives details of HR as well as average beat duration in term of R-R duration.

The performance of presented technique is illustrated in Table 1 in terms of total beat (TB), true positive (TP), false positive (FP), false negative (FN), sensitivity (SE), predictivity (P), and error rate (ER). The analysis presents that R-peak detection technique has 99.8% of sensitivity and predictivity with 27 different subjects of signals. These illustrations have shown the acceptable quality of sensitivity for R-peak detection that helps in HRV analysis. In this context, Fig. 2 represents the variation of sensitivity and positive predictivity of presented technique for different signal. Here, minimum and maximum sensitivity obtained 98.6 and 100%, respectively. Similarly, minimum and maximum positive predictivity is 96.9 and 100% respectively.

Table 1 Performance analysis for different signals
Fig. 2
figure 2

Sensitivity and positive predictivity of presented technique for different signals

Table 2 demonstrates the performance comparison of presented technique with other existing techniques, which clearly indicates the presented technique is suitable for R-peak detection with better efficiency of sensitivity and predictivity as per compared techniques.

Table 2 Performance comparison with other existing techniques

4 Conclusion

In this paper, an R-peak detection technique and HRV tool (SpandanV.1) has been presented based on S-transform and Shannon energy envelop (SEE). Here, sharp peak of SSE obtains from transform coefficients that help in the allocation of R-peak position in ECG signal. Obtained results have clearly illustrated the presented technique which is suitable for different subjects of signal to investigate HRV components like HR, R-R duration. In this context, demonstrated tool SpandanV.1 gives details and information of discussed HRV component. Overall, the analysis is concluded with the efficiency of the presented technique is efficient for healthcare systems (Fig. 3).

Fig. 3
figure 3

System framework (SpandanV.1) for HRV analysis based on R-peak: a HR with beat duration details for Rec. 119, b R-peaks and SEE for Rec. 117, c R-peak and SEE for Rec. 201