Abstract
This paper highlights a new method for the detection of ischaemic episodes using statistical features derived from ST segment deviations in electrocardiogram (ECG) signal. Firstly, ECG records are pre-processed for the removal of artifacts followed by the delineation process. Then region of interest (ROI) is defined for ST segment and isoelectric reference to compute the ST segment deviation. The mean thresholds for ST segment deviations are used to differentiate the ischaemic beats from normal beats in two stages. The window characterization algorithm is developed for filtration of spurious beats in ischaemic episodes. The ischaemic episode detection is made through the coefficient of variation (COV), kurtosis and form factor. A bell-shaped normal distribution graph is generated for normal and ischaemic ST segments. The results show average sensitivity (Se) 97.71% and positive predictivity (+P) 96.89% for 90 records of the annotated European ST-T database (EDB) after validation. These results are significantly better than those of the available methods reported in the literature. The simplicity and automatic discarding of irrelevant beats makes this method feasible for use in clinical systems.
Introduction
Cardiovascular deaths (CVDs) are projected the leading cause of deaths globally. It is likely that 17.3 million people died because of CVD in 2013, representing 31.5% of total global deaths. The expected deaths due to CVD will increase to 23.3 million by 2030. With the increasing sedentary lifestyle, more people are becoming prone to CVD. Important modulators of CVD include unhealthy diet, lack of exercise, consumption of snuff, alcohol, diabetes, raised lipids and stress (WHO, 2014). As myocardial ischaemia is the forerunner of CVD, so improvement of CVD management is a primary task that requires advances in its diagnosis, treatment and prevention. Ischaemia is the result of plaque building and accumulation of cholesterol in the inner walls of the arteries of the heart. As it progresses, a smaller amount blood flows through the arteries; the heart muscle cannot receive sufficient blood and oxygen, which usually lead to chest pain (angina), myocardial ischaemia (MI) or sometimes infarction (Brownfield and Herbert, 2008; Dash, 2002; Kusumoto, 2004). The most common method for investigating ischaemia is through ECG. The ECG is a process of interpretation of the electrical activity of the heart over a period of time. ECG presents the depolarization and repolarization of the cardiac muscle (Singh, 2010). The ECG is comprised of P, QRS complex and T waves. The most important ECG change caused by myocardial ischaemia includes ST deviation (elevation or depression); an example is shown in Figure 1. Elevation and depression of the ST segment with respect to isoelectric reference in ECG signal is the investigation of myocardial ischaemia around the applied lead. Elevated ST segments (or episodes) appear usually in patients with transmural (sub-epicardial) ischaemia, whereas depressed ST segments (or episodes) appear in patients with sub-endocardial ischaemia (Goldberger, 1981; Park et al., 2012). During recording of ECG, the artifacts, i.e. anything other than muscular activity of heart, are contaminated on the ECG. Commonly noticed artifacts include baseline wanders and muscle tremors. The reasons may be a loose electrode connection, patient movements, etc. These artifacts lead to misdiagnosis of ST segments. Removal of these artifacts is primarily required to facilitate easy, accurate and automatic detection of ST segment deviations in pathological cases (Gacek and Pedrycz, 2012). A number of methods have been developed, which may have linear or non-linear structures for the removal of the artifacts and detection of characteristic points of ECG signals. These methods are broadly divided into four categories – time-based, frequency-based, time–frequency-based and non-linear methods (Li and Wang, 2013; Li et al., 2014, 2015; Martis et al., 2014). Similarly, advanced methods like KICA non-linear, wavelet packet decomposition (WPD) and approximate entropy (ApEn) have been implemented for extraction of ECG features (Li et al., 2016a, 2016b). Time-frequency based, wavelet transform, can provide discrimination between two different signals with the same spectrum magnitude. Hence, wavelet transform is found more appropriate for analysis of non-stationary ST segments in ECG signal via wavelet coefficients thresholding (Beena and Prabavathy, 2014; Bianchi et al., 2000). A number of methods have been reported in literature for the detection of ischaemic beats and episodes, including support vector machine (SVM), kernel density estimation (KDE) (Gacek and Pedrycz, 2012), neural network (Baxt, 1991; Maglaveras et al., 1998; Papaloukas et al., 2002; Silipo and Marchesi, 1998; Silipo et al., 1994; Stamkopoulos et al., 1992, 1998), the self organizing map (SOM) model (Papadimitriou et al., 2001), KLT (Afsar et al., 2008; Jager et al., 1992), genetic algorithms (Papaloukas et al., 2004), hidden Markov models (HMM) (Andreao and Dorizzi, 2004), fuzzy models (Exarchos et al., 2007; Tsipouras and Costas, 2007; Vila et al., 1997; Zahan, 2001), RMS series (Garcia et al., 2000), wavelets (Gramatikov et al., 2000; Lemire et al., 2000; Martis et al., 2013; Ranjith et al., 2003; Taddei et al., 1995), the ant-miner algorithm (Murugan and Radhakrishnan, 2010), isoelectric energy (Kumar and Singh 2016a), statistical analysis (Kumar and Singh, 2016b; Kumar and Sonam, 2016), hermite functions (Rocha et al., 2010), and fractal and statistical features (Don et al., 2013). These methods have their own advantages and disadvantages. Similarly, statistical features using wavelet power spectra for normal and abnormal beats have been identified by Hegde et al. (2013). Real-time detection of myocardial infarction in digital ECG is presented by Kindi and Reza (2011). A survey of ischaemia detection methods has been performed by Manocha and Singh (2011). The presented paper contributes a simplified method for the detection of ischaemic episodes based on statistical analysis, which does not involve any complicated calculation and training. Based on statistical features, additional morphological feature of ST segments may be analysed. The paper is organized in nine sections; the first section introduces the ECG and literature survey for ischaemia, the second discusses deals with resources and methods, the third covers methodology, the fourth covers classification of beats, the fifth divulges episode recognition, the sixth presents statistical analysis, the seventh discusses the results, the eighth makes comparison with existing methods and the last section covers conclusions and future work.

(a) Normal ST segment; (b) ischaemic (depressed) ST segment; (c) ischaemic (elevated) ST segment.
Resources and methods
European ST-T database
The European ST-T Database (EDB) records are projected to be used for performance evaluation of the developed method for validation of the results. This database contains 90 ECG recordings; beat-by-beat annotation is mentioned for 79 subjects. The database contains records of two leads acquired from V1–V5, MLI, MLIII and D leads. The database has total 367 ischaemic episodes, corresponding to ST segment change in the durations between 30 s and several minutes. Each record contains 2-h recording of two channels with 12-bit resolution over a nominal 20 mV input range and a sampling frequency of 250 samples/s. The sample values were re-scaled after digitization, in order to obtain a consistent scale of 200 ADC units/mV for all ECG signals. Three independent cardiologists were appointed to annotate beat by beat in each record for changes in ST segment. The 90 records altogether contain 802,866 annotations (Taddei et al., 1992).
Wavelet transform
The wavelet transform is a representation of a wavelet function (Graps, 1995). Through wavelet transform, a given continuous time signal is divided into different scale components, in which a range of frequency is assigned to each scale component. The mother wavelet function
The dilation and translation properties (Equation 3) states that the mother wavelet can form a basis set denoted by
where u is the translating and s a scaling parameter holding property greater than zero, because defining negative scaling is not possible. For s=2J, the wavelet transform is called a dyadic digital wavelet transform (DWT). The mallet algorithm (Mallat, 1999) is used to compute the DWT of a digital signal f(n); it is a digitized ECG signal in the form of samples, as expressed in Equations (4) and (5).
where
Pre-processing
The main goal of artifact removal or pre-processing is to formalize the accurate and efficient delineation of characteristic points in ECG signals, further used for detection of the region of interest (ROI) for ST segment and isoelectric reference. It is significant to recognize the artifact frequencies and to discriminate these artifact changes from genuine changes to prevent misdiagnosis. The pre-processing (i.e. discarding of wavelet coefficients corresponding to artifact frequencies) process should not have any destructive effects on the morphologies of the original ECG signal to lose the diagnostic information. The choice of wavelet function depends upon the type of signal being analysed. The wavelet with similarity to the processed signal is usually selected.
Removal of baseline wanders
For correction of normalization (DC component), the mean of 1-min ECG record samples have been subtracted from the original ECG signal. Baseline wandering is a low-frequency noise in the range 0.5–1 Hz; hence the ECG signal (with a sampling frequency of 250 Hz) is decomposed to the eighth level using Daubechies (db4) wavelet transform for removal of baseline wander. The db4 wavelet wavelet gives details more correctly than the other wavelets for this noise, because db4 has similarity to the QRS complex and the energy spectrum is concentrated around low frequencies. Thresholding is applied after that, which involves the discarding of approximation coefficients to zero at the eighth decomposition level followed by reconstruction (Beena et al., 2014; Kumar and Singh, 2015). The results for removal of baseline wanders for e0103m record of EDB are shown in Figure 2.

Results for removal of baseline wanders.
Removal of muscle tremors
Muscle tremors are low amplitude noises usually lying in the frequency range 100–110 Hz. The Coiflet (Coif4) wavelet function for removal of these noises to the first level of wavelet decomposition is applied. First, the noise is estimated in the approximate coefficients of the first level of the ECG signal, named sigma, and then the threshold is deliberated by using this sigma value. The soft thresholding technique (Beena et al., 2014; Kumar and Singh, 2015) is applied for the discarding of detail coefficients, while maintaining the approximation coefficients at unity. The results of removing this noise for the e0103m record of EDB are shown in Figure 3.

Results for removal of muscle tremors.
Delineation of characteristic points
Detection of R peaks
While looking for peak locations in the pre-processed ECG signal, we have appended the 100 sample points to the left- and right-hand sides of the pre-processed ECG samples in order to overcome the scope of window crossing the signal boundaries. Firstly, the modulus maximum (maxh) and threshold ε=(max (ECG)−mean (ECG))/2 for searching the highest bumps in the entire record have been computed. Then indices into the boundaries for these peaks for a value of adaptive thresholding {maxh*ε} are applied (Banerjee et al., 2012; Kumar and Singh, 2016c). The time position and amplitude of each R peak is put in the R_INDEX. The results for detection of R peaks for the e0103m record of the EDB are shown in Figure 4.

Delineated P, QRS, T waves in pre-processed electrocardiogram (ECG).
Detection of P, Q, S and T peaks
For detection of P, Q, T, S peaks, a traversing search for maxima and minima is carried out in the implicit window lengths, primarily decided as the normal range of medical societies. As for the Q peak, a search for a local minimum in R_Index-200ms: R_INDEX-40ms is performed, and in the same manner, for R_INDEX- 400ms: R_INDEX-200ms for the local maximum, for the P peak. With similar logic, a search for a local minimum in the window of R_INDEX+20ms: R_INDEX+100ms for S peak and for a local maximum in window of R_INDEX+200ms: R_INDEX+400ms for T peak is performed. Depending upon the polarity of the maximum, any of the six possible T wave morphologies – positive (+), negative (−), biphasic (−/+ or +/−), upwards and downwards – have been carefully identified. Customarily, the Q and S peaks are high-frequency and low-amplitude waves in the ECG signal. The detected sample locations and corresponding amplitudes of the characteristic waves are stored in P_INDEX, Q_INDEX, S_INDEX and T_INDEX. In Figure 4, blue stars symbolize the P, QRS and T peaks consequent to their amplitudes and sample values for the e0103m record of the EDB (Banerjee et al., 2012; Ghaffaria et al., 2009; Kumar and Singh, 2016c; Li et al., 1995).
Detection of onset and offset point
The detection of onset and offset point for P, QRS and T peak is carried out for a corresponding INDEX. The windows of INDEX-80ms: INDEX for onset and INDEX: INDEX+80ms for offset point are fixed. The slope sign inversion in the defined window is computed using Newton’s difference formula (Ghaffaria et al., 2009; Lin et al., 2014; Kumar and Singh, 2016c):
Two-point estimation is used to calculate the slope of a nearby secant line through the points (x, f(x)) and (x+h, f(x+h)), where x represents the sample value. We choose a small number h, where h is a small change in x, and it may be either positive or negative, depending on onset and offset sample value. Detected onset and offset sample points are represented by red and green stars, respectively, for the e0103m record in Figure 4.
Detection of J point
The J point is lies after the QRS complex within the range 80–120 ms. The J point is detected as the first inflection point after the S peak. As shown in Figure 4, magenta-coloured stars represent the J points.
Detection of iso-electric reference
The iso-electric reference (IR) is detected in the TP segment of the ECG signal, i.e. the region between the T offset of current beat and P onset of the next beat.
Heart rate calculation
The heart rate is calculated as the distance between the two corresponding R–R intervals and is expressed in beats per minute (bpm). It is the average time of R–R interval.
ROI and ST Segment deviation measurement
We have defined ROI for accurate detection of ST segment and isoelectric reference. The advantage of defining ROIs includes, the algorithm will involve only peak samples instead of small voltage samples across the boundaries in a segment. It has been assumed that the ST segment lies in the Jpoint to Tonset, depending on the heart rate, i.e.
An algorithm for ROI corresponding to the ST segment is
Similarly, the algorithm for the ROI corresponding to IR is
The ST segment deviation is computed as the potential difference between the ROIST and the ROIIR, as ST Deviation
Classification of beats
After measurement of the ST segment deviation for each beat in a particular record, we define a threshold to classify the beats as either normal or ischaemic. The value of ST segment deviation lies in the range 54–74 µV for elevated ST segments and −52 to −73 µV for depressed ST segments; hence we have defined the mean value of ±65 µV threshold. Keeping this viewpoint, a normal beat always lies between these values. The elevated or depressed beats have a value greater than this threshold (Kumar and Singh, 2016b). The normal beats are assigned to 1 and ischaemic (elevated or depressed) to 0, called the preliminary stage.
An ischaemic beat characterization algorithm has been developed to filter out the spurious ischaemic or normal beats in a record, called the final stage. This algorithm helps to filter out the superior beats in a record, in which the ischaemic episode starts to follow the normal episode (or vice versa). This algorithm decides the final beat annotation, when transitions occur between the same record, and also helps make the proposed method more sensitive and positively predictive. The steps involved in proposed algorithm are:
Divide the entire ECG record of 120 min into 120 sections of 1 min each.
Firstly, each section is de-noised, delineated and each ST segment examined.
Classify all beats as being ischaemic or normal.
Each beat is annotated as 1 if normal and as 0 if ischaemic.
Recombine all section beats of 120-min ECG records with annotations, having an array of L entries, where L is the number of beats in the 120-min ECG record.
To implement an algorithm for the nth beat where 1≤n≤L, the record is appended with four extra entries, i.e. two at the beginning and two at the end. The record now starts at −1 and ends at L+2. The extended array will have [−1, 0, 1, 2, …L, L+1, L+2].
The extended array is now filtered from n=1 to n=L for spurious entries using following algorithm:
Ischaemia episode detection
As per the advice of the European Society of Cardiology, the ischaemic episode detection process should consider a minimum 30-s duration of ECG signals for investigation. Accordingly, an ischaemic window is defined, if it contains at least 80% ischaemic beats (Kumar and Singh, 2016b). A definition of ischaemic episode detection has been presented in Figure 5.

Definition for detection of ischaemic episode.
Statistical analysis of ST measurement
From all individual ST segment values of the enduring beats, we then perform a statistical analysis on the measured ST segment deviations, which may also be used for the validation of results. These involve mean, standard deviation (SD), coefficient of variation (COV), kurtosis, skewness and form factor. Here, xi=ith beat and n=number of beats.
The SD measures the absolute dispersion in a record. It facilitates the evaluation of the whole dataset with its mean. COV is the ratio of standard deviation and mean. The COV represents the consistency. The mean, SD and COV definitions have been mentioned in Equations (12), (13) and (14), respectively. Skewness (S) is a measure of the symmetry of the data set. The skewness of any perfectly symmetric (normal) distribution is exactly zero, defined as:
The kurtosis (K) measures whether the data is flat or peaked in a normal distribution, defined as:
where μ is the mean of x, σ is the standard deviation of x and E represents the expected value. The histogram is a graphical method to represent skweness and kurtosis. The form factor is the ratio of standard deviation of second-order derivative and original ST segment deviation:
Results and discussion
We have measured ST segment deviations, and classify the beat as ischaemic or normal in two stages and correspondingly normal or ischaemic episodes in ECG records. The pre-processing, delineation and ROI’s algorithms have been implemented in MATLAB 2012a and for statistical analysis, IBM SPSS 22 has been used. A general flow chart for the presented method for ischaemia detection is presented in Figure 6. We have validated the proposed algorithm for the entire 90 records of European ST-T database. Statistical analysis includes mean, COV, kurtosis and form factor. These features help to differentiate a record as normal, depressed or elevated. The mean value for normal, depressed and elevated record is 0.035, −0.105 and 0.104; hence the ±65 µV threshold is set to differentiate normal beats from ischaemic beats. The computed values of COV, kurtosis and form factor are 28.57, −0.879 and 3.43 for a normal ST segment. The values of COV, kurtosis and form factor for the depressed ST segment are 7.14, 0.29 and 2.10; similarly, for the elevated ST segment, the values measured are 7.69, −0.377 and 2.58. These features are sufficient to recognize a record. A bell-shaped normal distribution graph is generated for the measured ST segment deviations with its histogram. The normal distribution graphs of the selected 1-min duration ST segment for normal, depressed and elevated ECG records have been shown in Figures 7(a), (b) and (c), respectively. The corresponding values of standard deviation and skewness for these records are displayed in Table 1. The presented method is based on thresholding, and thus does not require any type of testing and training. The performance evaluation for the detected ischaemic episodes is made through the sensitivity (Se) and positive predictivity (+P), defined as
where TP denotes true positive, FP denotes false positive and FN denotes false negative detection for the detection of an ischaemic episode window. Table 2 shows 97.71% SE and 96.89% +P for 90 ECG records of the annotated European ST-T Database.

General flow chart for ischaemia detection process.

Normal distribution graph for: (a) normal ST deviations; (b) depressed ST deviations; (c) elevated ST deviations.
Statistical features for normal, depressed and elevated ST segments.
Performance evaluation for proposed method: application to records of European ST-T database.
Se, sensitivity; +P, positive predictivity.
Comparison with existing methods
This paper presents a novel method for detection of ischaemic episodes through statistical analysis of ST segments in ECG recordings of the European ST-T database. The presented method is very simple and does not involve any multifaceted calculations for investigation of ischaemia. The performance of the method has been validated on the entire 90 records of the European ST-T database. This database is commonly used as a standard reference by medical researchers internationally for validation of their algorithms or methods. Exclusively, it was considered that each annotated ischaemic episode in the database contains only ischaemic beats. The performance of our method cannot be judged against other methods (Afsar et al., 2008; Baxt, 1991; Correa et al., 2014; Don et al., 2010; Exarchos et al., 2007; Garcia et al., 2000; Gramatikov et al., 2000; Kumar and Singh, 2016a, 2016b; Lemire et al., 2000; Maglaveras, 1998; Murugan and Radhakrishnan, 2010; Papadimitriou et al., 2001; Papaloukas et al., 2004; Park et al., 2012; Ranjith et al., 2003; Rocha et al., 2010; Stamkopoulos et al., 1998; Tsipouras et al., 2007; Zahan, 2001), as they employed different performance measures or different databases or different datasets. The obtained results are better than those of other approaches (Andreao et al., 2004; Jager et al., 1992; Papaloukas et al., 2001, 2002; Rocha et al., 2010; Silipo and Marchesi, 1998; Silipo et al., 1994; Stamkopoulos et al., 1992; Taddei et al., 1995; Vila et al., 1997) in terms of both SE and +P. Other methods have certain advantages and disadvantages, e.g. signal analysis methods (Gramatikov et al., 2000; Lemire et al., 2000; Martis et al., 2013; Ranjith et al., 2003; Taddei et al., 1995) are easy to implement in real time. Similarly, rule-based algorithms (Papaloukas et al., 2001) provide a good decision similar to that of the experts. A limitation of this method is that it requires a representative training set of rules for validation purposes. However, fuzzy logic methods (Exarchos et al., 2007; Tsipouras et al., 2007; Vila et al., 1997; Zahan, 2001) have enormous significance in the analysis of ischaemia for the validation of rules, but it required investigations to improve the analysis performance. HMM (Andreao et al., 2004) is not suitable for detection of non-ischaemic episodes. The ANNs-based approaches (Maglaveras et al., 1998; Papaloukas et al., 2002) cannot be achieved easily, because of ‘black box’ and the required tedious processing to interpret. In the same way, genetic algorithms (Papaloukas et al., 2004), SVM and KDE (Park et al., 2012) based algorithms take more time for decisions, as they involve many complex calculations for the optimization process. The presence of artifacts usually affects the detection of the characteristic points, ST segment and ischaemic beats in the ECG recordings. The wavelet transform-based filtration and delineation makes the proposed method perform better than the modern ECG recorders used currently. The proposed method has two major advantages. The method can provide an interpretation of results. This will help the cardiologist reach a diagnosis faster. Second, it involves direct analysis based on statistical features without involvement of any complex calculations and training. Table 3 shows a comparison of results for the presented method with existing methods in the literature in terms of SE and +P for the same (entire) records of the European ST-T database. The results validate the efficacy of presented method by showing 97.71% Se and 96.89% +P. The above-mentioned methods demonstrate an Se that ranged from 77% to 96.7% and a +P that ranged from 79% to 96.2%. The presented method performance exhibits the highest Se and +P. The simplicity, robustness and automatic discarding of spurious beats in ECG records make the method feasible for use in clinical systems. A disadvantage of the presented method is that it is not applicable to analysis of ischaemia through T waves.
Performance evaluation, comparison of presented method with existing methods for European ST-T records.
Se, sensitivity; +P, positive predictivity.
Conclusion and future scope
We have developed a simple method for the detection of ischaemic episodes in ECG records through statistical analysis. Although this research is effective in detecting myocardial ischaemia and achieved the highest performance, there are still many challenges that need to be addressed. The research has been developed using the datasets of the European ST-T database. In order for the developed method to be used in clinical practice, the database records may be comprehensive and additional types of ischaemic and normal ST segments may be incorporated. The developed method performance may be validated for additional functionality, e.g. for multiple leads and with other promising classifiers. Future work must include the detection of ST segment axis shift and 24-h ambulatory recordings in real-time systems.
Footnotes
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
