1 Introduction

ECG signal is the outcome of electrical activity occuring in the atria and ventricles of the heart. The presence of the myocardial disease involves the changes in the pathological and morphological behaviour of the ECG signal. The abnormality in the rhythm or electrical activity of ECG signal is the cause of Dysrhythmia [16]. The P-waves are likely to be affected in Atrial, Mobitz 1 and Mobitz 2 Dysrhythmias. In 3rd degree Heart block, ventricle depolarizes independently and it originates from AV node of heart, where QRS complex can be affected [12]. In some scenarios, Dysrhythmia is followed by cardiac arrest. For physicians, it is quite difficult to see the long ECG records manually and identify the presence of anomaly in it.

The time-frequency analysis of ECG signal using transformation based methods helps to detect the myocardial disease. Short time Fourier transform (STFT) analyses small portion of the signal at a time in both the time and the frequency resolution [4]. But due to its fixed window length, it is limited to give good resolution in both time and frequency [15]. WT has capability of only probing the local amplitude or power spectra of the ECG signal [13]. Wavelet analysis of signal is non-adaptive in nature and the same basis function has to be used for analyzing all the ECG data. ST has got advantages over WT due to its progressive resolution characteristics, frequency invariant amplitude response and absolutely referenced phase information. WT analyses a signal in time-scale plot which is not suitable for intuitive visual analysis, but ST analyses a signal in time-frequency distribution of the signal so that the components of the signal can be isolated and processed independently [15]. These advantages of ST motivate us to adopt it for detection of Dysrhythmia. Generally ST is STFT with variable window and upgraded version of wavelet transform [9, 17]. It can provide better frequency resolution in low frequency and better time resolution in high frequency [10, 15]. Apart from time-frequency resolution, ST can also give good power spectrum [10].

The presence of myocardial disease changes the time-frequency power distribution over the frequencies present in the ECG signal [2, 11, 14]. The presence of high frequency and power in QRS complex of Ischemic cardiomyopathy ECG signal is detected [6]. The change in frequency components between 20 Hz and 40 Hz before and after angioplasty of patients with right and left coronary stenosis are studied in [2]. The QRS complex shows greater ITFP values which is mentioned in [3, 5]. The change in ITFP depends on the age of the subjects and ventricular fibrosis was detected by means of time-frequency power using CWT is described in [11].

The current paper emphasizes on time-frequency analysis using S-transform and the ITFP changes in the respective frequencies have been analyzed thoroughly. Taking ITFP into consideration Dysrhythmia in ECG signal has been detected. Simulation results show better detection accuracy of dysrhythmia in case of S-transform.

2 Materials and Methods

In this study, PTB diagnostic ECG database of Physionet is used for detection of Dysrhythmia. The ECG signals are extracted from 12-lead ECG records. The ECG signal are collected from volunteered Healthy control and the myocardial diseased patients at the Department of Cardiology, University Clinic Benjamin Franklin, Berlin, Germany. The ECG signals are sampled with 1000 Hz. ECG data of 11 dysrhythmic patients and 17 healthy control patients are analysed in this study. Myocardial diseases affect each beat of the entire ECG record in similar manner. When Dysrhythmia happens all the ECG beats get affected uniformly. So, analysis of changes in features in a single beat are enough for the detection of Dysrhythmia [8].

The respiration, body movement and the electrode impedance changes due to perspiration are responsible for the baseline wander in ECG signal. Baseline wander mainly affects the R peaks and the ST segments. So, removal of baseline wander is necessary for the accurate detection of dysrhythmia. In this study, the process of removing baseline wander is same as in [1]. For baseline wander removal the raw ECG signal is subjected to WT. From WT the detail coefficient (D) and approximate coefficient (A) are extracted. Then the approximate coefficient is reconstructed and it is subtracted from raw ECG to obtain baseline wander free signal. The methods for the segmentation of ECG signal given in [7] are as followed.

figure a

2.1 Stockwell Transform (ST)

ST is the combination of Gabor transform with the progressive scale resolution feature of WT [17]. ST is useful to analyse localized signal and provide unique time-frequency localization of the signal. The ST of continuous signal is expressed as [15, 17]:

$$\begin{aligned} ST(\tau ,f) = \int \limits _{ - \infty }^{ + \infty } {s(t){w_s}(|f|(t - \tau ))} {e^{ - 2\pi jft}}dt = F\left[ s \right] \otimes F[{w_s}] \end{aligned}$$
(1)

where s(t) is the signal, F[.] represents Fourier Transform and \( ({w_s}(|f|(t - \tau )) = \frac{{|f|}}{{\sqrt{2\pi } }}{e^{ - \frac{{^{{{(\tau - t)}^2}{f^2}}}}{2}}}\) is the window.

The progressive resolution characteristic of ST gives a precise assessment of the signal properties [10]. Because of the direct relation of ST and FT, computation of ST is comparatively easier.

figure b

Relation Between CWT and ST

CWT of a function, s(t), is given as

$$\begin{aligned} CWT(\tau ,a) = \int \limits _{ - \infty }^{ + \infty } {s(t)\omega (t - \tau ,a)dt} \end{aligned}$$
(2)

where \(\tau \) and a are the translation and scaling parameter, \(\omega (t,a)\) is mother wavelet. Let us multiply (2) by \(e^{ - j2\pi ft}\). Then, (2) becomes

$$\begin{aligned} {S_0}(\tau ,f) = \int \limits _{ - \infty }^{ + \infty } {CWT(\tau ,a){e^{ - j2\pi ft}}} = \int \limits _{ - \infty }^{ + \infty } {s(t)\omega (t - \tau ,a){e^{ - j2\pi ft}}dt} \end{aligned}$$
(3)

If \( \omega (t,a) = \frac{{|f|}}{{\sqrt{2\pi } }}{e^{ - \frac{{{t^2}{f^2}}}{2}}}\), then (3) becomes

$$\begin{aligned} {S_0}(\tau ,f) = \int \limits _{ - \infty }^{ + \infty } {s(t)\frac{{|f|}}{{\sqrt{2\pi } }}{e^{ - \frac{{({t^2} - \tau ){f^2}}}{2}}}{e^{ - j2\pi ft}}dt} \end{aligned}$$
(4)

We can write (4)

$$\begin{aligned} {S_0}(\tau ,f) = \int \limits _{ - \infty }^{ + \infty } {s(t){w_s}(|f|(t - \tau ))} dt = ST(\tau ,f) \end{aligned}$$
(5)

3 Results and Discussions

3.1 Time-Frequency Analysis

In this study, from the whole ECG record, only one beat is extracted for the analysis. The Fig. 1(a) gives time-frequency representation of the lead I ECG data of a healthy individual using ST. The Fig. 1(b) is the 3-D time-frequency representation of the Fig. 1(a) showing the changes in magnitude of ECG signal. The Fig. 1(c) depicts the highest frequency present in the same ECG signal. The ITFP is calculated for all ECG signals (healthy individuals = 17 and Dysrhythmic patients = 11) and then compared. In this investigation, the leads I, II, AVL, AVF, V1, V2 and V3 are considered. In most of the healthy ECG signals, the dominant frequency power lies between 5 Hz to 100 Hz. The ITFP of the frequencies higher than 100 Hz are lower in Healthy individual than that of Dysrhythmia.

The Fig. 2 shows the time-frequency representation of ST-ECG signals of two different Dysrhythmic patients. Figure 2(a) is Atrial Fibrillation and Fig. 2(b) is Congenital complete AV-block. From the representation, the presence of frequency higher than 250 Hz are very significant in Dysrhythmic ECG but the frequencies higher than 200 Hz are not significant in Healthy individual ECG signal. Again,it is observed clearly that the high frequencies (>250 Hz) in Dysrhythmic ECG signal is longer than that of healthy individual ECG signal in the QRS complex. The Fig. 2(c) shows 3D ITFP distribution of ST ECG signal over time and frequency.

In healthy cases, ITFP decreases smoothly with increases in frequency in MF zone. In some ECG signals of healthy individuals, the frequency more than 200 Hz are observed but the ITFP distribution in this frequency range is very low (insignificant). In Dysrhythmic ECG, the frequencies more than 200 Hz are observed in almost all the leads under discussion. In Dysrhythmic case, the abrupt increase in ITFP is observed in HF zone in all the leads under discussion. In all the Dysrhythmic ECG signal, the time-frequency representation is longer in the QRS complex than that of healthy case. The abnormality in the P-wave shows the vibration of atrium resulting in high frequency. The high frequencies more than 200 Hz are observed in the QRS complex in ST-ECG signal, which is depicted in Fig. 3(a). This indicates the presence of Atrial fibrillation. The abnormality which results ventricular vibration can also be captured using ST-ECG. Independent depolarization of ventricles results in 3rd degree heart block which leads to increase in ITFP after the QRS complex is depicted in Fig. 2(b).

Fig. 1.
figure 1

(a) Time-frequency representation of Healthy individual ECG signal of lead I using ST, (b) 3-D representation of Fig. 1(a) and (c) Highest frequency present in the ECG signal

Fig. 2.
figure 2

(a) ST-ECG signal of Atrial fibrillation, (b) ST-ECG signal of congenital complete AV-Block, and (c) 3D representation of Dysrhythmic ST-ECG signal

Fig. 3.
figure 3

(a) ST-ECG signal of Dysrhythmic patient, (b) CWT-ECG signal of same Dysrhythmic patient, (c) Highest frequency present in Fig. 3(a) and (d) Highest frequency present in Fig. 3(b)

Fig. 4.
figure 4

(a) Total mean ITFP of Healthy individual ECG signals and Dysrhythmic ECG signals, (b) Total LF ITFP of healthy individual and Dysrhythmic patient, (c) Total MF ITFP of healthy individuals and Dysrhythmic patients, and (d) Total HF ITFP of healthy individuals and Dysrhythmic patients

3.2 Power Analysis

Figure 4 indicates the ITFP of one beat of the ECG signal. We have considered the powers of leads I, II, AVF, AVL, V1, V2 and V3 for 17 healthy individuals and 11 Dysrhythmic patients from the PTB diagnostic ECG database. The frequency range is classified into 3 zone: Low-frequency (LF) zone (<15 Hz), Mid-frequency (MF) zone (15–80 Hz) and High-frequency (HF) zone (>80 Hz) and the mean of respective ITFP are calculated. Figure 4(a) shows the mean of ITFP of one beat of each ECG signal for the leads mentioned. Figure 4(b), (c) and (d) are the mean of the ITFP segmented frequency zones LF, MF and HF respectively for all the ECG signal. The blue and orange color bars denote the healthy and Dysrhythmic cases respectively.

In the leads I, II, AVL, V1, V2 and V3, the total mean ITFP of all the frequencies in one beat (PQRST) is found to be higher in Dysrhythmic patients than that of healthy individuals which is shown in Fig. 4(a). For the low frequency power in Fig. 4(b), the leads I, AVF, AVL, V1, V2 and V3 are considered for the investigation. When total mean of LF ITFP are compared, it is observed that the Dysrhythmic patients have higher values than that of healthy individuals. Among the leads mention above I, AVL and V1 have significant changes. Most of the powers are distributed equally in mid-frequency range in both healthy individuals and Dysrhythmic patients. However, the difference in total mean ITFP in MF zone can be observed in lead I and V1 only in Healthy and Dysrhythmic case as depicted in Fig. 4(c). High-frequency range is the most important in this study because of presence of high frequency in the PQRST complex in the Dysrhythmic ECG. The abrupt increase in ITFP around 80 Hz or >80 Hz gives higher ITFP in HF zone in Dysrhythmic case. So, the higher ITFP in HF zone of Dysrhythmic ECG is the main criteria for the detection of Dysrhythmia. In the leads I, II, AVF, AVL, V1, V2 and V3, the presence of higher ITFP in Dysrhythmic ECG signal is observed in HF zone than that of the healthy individual ECG signal which is shown in Fig. 4(d).

In our investigation, the same analysis is done using CWT. It is found that the presence of higher frequency can be detected better in the ST than that of CWT which is depicted in Fig. 3(a) and (b). The highest frequency which can be detected by CWT is 245 Hz but for the same signal, the highest frequency localized by ST is 350 Hz. The presence of high frequencies are the main key for the detection of Dysrhythmia. So, ITFP of the high frequency using ST is significant than that of CWT. Because of limitation of high frequency localization in CWT, detection of the Dysrhythmia is better using ST. The calculated ITFP are compared with a threshold value for each individual signals. The values which are greater than the threshold value are kept separated from the values which are lesser than the threshold value. It is found that the ITFP of high frequency of the Dysrhythmic ECG signal is higher than the ITFP values of the high frequency of the Healthy individual ECG signal. The assessment analysis is given in Table 1, where TPR = True Positive Rate, TNR = True Negative Rate, PPV = Positive Predictive Value, FNR = False Negative Rate, FDR = False discovery Rate, ACC = Accuracy.

Table 1. Feature analysis of different leads

4 Conclusion

From the investigation, it is clear that ST is better than CWT in higher frequency analysis. The ITFP of one beat of ECG was calculated using ST for healthy individuals (n = 17) and Dysrhythmic patients (n = 11). The presence of high frequency is detected in the Dysrhythmic ECG signals by time frequency analysis. The ITFP of the Dysrhythmic ECG signal using ST has higher value than the healthy individual ECG signal in all the segmented frequency zones. Accuracy of the detection of Dysrhythmia is found to be better using ST than that of CWT.