92
Politecnico di Milano Polo di Como Scuola di Ingegneria dell’Informazione Corso di Laurea Specialistica in Ingegneria Informatica A Survey of Algorithms for Ischemia Detection in ECG Recordings Tutor universitario: Elaborato finale: Prof. Giuseppe Pozzi Mario KOSTOSKI, matr. 864445 Dr. Rodolfo Pizzuto Anno Accademico 2017/2018

A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

Politecnico di Milano Polo di Como

Scuola di Ingegneria dell’Informazione

Corso di Laurea Specialistica in Ingegneria Informatica

A Survey of Algorithms for Ischemia Detection in ECG Recordings

Tutor universitario: Elaborato finale:

Prof. Giuseppe Pozzi Mario KOSTOSKI, matr. 864445

Dr. Rodolfo Pizzuto

Anno Accademico 2017/2018

Page 2: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

2

Table of Contents Abstract .............................................................................................................................. 3 Sommario ........................................................................................................................... 4 1. Introduction .................................................................................................................... 5

1.1. Tesina outline ............................................................................................................ 5 2. Source Selection ............................................................................................................ 7 3. Taxonomy of Algorithms ............................................................................................... 8

3.1. The heart’s structure ................................................................................................. 8 3.2. Ischemia such as cardio disease ............................................................................... 9 3.3. Ischemia detection with ECG ................................................................................ 10 3.4. Software detection of the QRS complex ................................................................ 12 3.5. Description of the algorithms ................................................................................. 12

4. The Algorithms ............................................................................................................ 18 4.1. Algorithms based on wavelet transformation ......................................................... 18

4.1.1. Algorithms based on discrete wavelet transformation ................................... 18 4.1.2. Wavelet based ST-segment analysis-algorithm .............................................. 20 4.1.3. An algorithm for the Segmentation of a Waveform and algorithm for the Recognition of the Shape of the ST Segment ........................................................... 24 4.1.4. An algorithm for ST shape analysis ............................................................... 27 4.1.5. ST (change detection) analysis algorithm ...................................................... 31 4.1.6. Algorithm based on ST morphological change (ST shape classification) ...... 34 4.1.7. An algorithm based on simple level thresholding within specified time windows .................................................................................................................... 38 4.1.8. An ST segment analysis algorithm using the Hidden Markov Model ............ 39 4.1.9. An Algorithm of ST Segment Classification and Detection ........................... 42 4.1.10. An algorithm for ECG ST–T complex detection .......................................... 48

4.2. Algorithms based on signal generation and digital filters ...................................... 52 4.2.1.A real-time qt interval detection algorithm (QRS detection) ........................... 52 4.2.2. Pan J, Tompkins WJ, A real-time QRS detection algorithm, .......................... 57 4.2.3. Algorithms for real time electrocardiogram QRS detection using combined adaptive threshold ..................................................................................................... 63 4.2.4. No-adaptive algorithms (Balda and Okada’s methods) .................................. 67 4.2.5. QRS detection algorithms proposed by Friesen an others .............................. 70 4.2.6. A generic algorithm for QRS detection ........................................................... 73

4.3. Algorithms based on neural networks ................................................................... 78 4.3.1. Ischemia Detection via ECG Using ANFIS ................................................... 78

5. Performance Evaluation and Comparison ................................................................... 84 6. Ranking ........................................................................................................................ 86 7. Conclusions .................................................................................................................. 88 8. References .................................................................................................................... 89

Page 3: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

3

Abstract Ischemia is most commonly defined as a clinical syndrome due to an insufficient flow of blood to a muscle. Ischemic heart disease means that the heart, as a muscle, is not receiving the needed flow of blood. Ischemic heart disease is the leading cause of death in the world. In Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for more than 60% of deaths in adults with coronary heart disease. Preventive and permanent activities of patient’s regular control of the heart and blood vessels based on electrocardiographic can significantly reduce this negative statistic and contribute to human health. An ECG signal analysis is one of the basic procedures in the diagnosis and treatment of heart disease. Within the standard ECG recordings the waves morphology, changes in heart rhythm and irregularities in time intervals between certain phenomena can be detected. Proper diagnostics often require signal analysis over a relatively long-time interval, therefore automatic detection can be of great help to the medical personnel. Furthermore, an automatic detection provides the possibility of building a system for remote monitoring of the patient's health status, as well as undertaking particular actions on an alarming situation. The manner of detecting all anomalies of the ECG signal is based on certain types of algorithms that accurately detect the patient's health condition and vary according to their purpose, accuracy, sensitivity, and predictability. Therefore, this tesina aims at describing and comparing different types of algorithms for the detection of ischemic disease of patients. Key words: Ischemia, detection, algorithm, ECG, patients, heart, wave, peak, signal, complex, noise, sensitivity, predictability,

Page 4: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

4

Sommario L'ischemia è comunemente definita come una sindrome clinica dovuta a una disfunzione nel cuore che non può fornire una quantità di ossigeno necessaria per l’organismo e um metabolismo equilibrato dei tessuti periferici. La cardiopatia ischemica è la principale causa di morte nel mondo. In Europa, le malattie cardiovascolari causano il 40% dei decessi anelle persone di 75 anni. L'ischemia è responsabile di oltre il 60% delle morti negli adulti con malattie coronariche. Le cure preventive sono basate sul controllo regolare elettrocardiografico del cuore e dei vasi sanguigni; queste possono ridurre sensibilmente questa statistica negativa e contribuire alla salute dei pazienti. L'analisi del segnale ECG è una delle procedure di base nella diagnosi e nel trattamento delle malattie cardiache. Con l’ECG standard è possibile rilevare la morfologia delle onde, i cambiamenti nel ritmo cardiaco e le irregolarità in intervalli di tempo tra determinati fenomeni. Un'adeguata diagnosi spesso richiede un'analisi del segnale su un intervallo di tempo relativamente lungo, pertanto l'automazione del rilevamento può essere di grande aiuto per il personale sanitario. Un rilevamento automatico offre inoltre la possibilità di costruire un sistema per il monitoraggio remoto dello stato di salute del paziente, nonché di attuare un intervento mirato in situazioni allarmanti. Il metodo di rilevamento di tutte le anomalie del segnale ECG si basa su determinati tipi di algoritmi che rilevano accuratamente le condizioni di salute del paziente e variano, in base al loro scopo, i parametri di accuratezza, sensibilità e prevedibilità. In questa ricerca si mettono a confronto di diversi tipi di algoritmi progettati per rilevare la malattia ischemica nei pazienti. Parole chiave: Ischemia, rilevamento, algoritmo, cardio, ECG, pazienti, cuore, onda, picco, segnale, complesso, rumore, sensibilità, prevedibilità,

Page 5: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

5

1. Introduction Supported by advanced and complex electronic devices, electrocardiography has sharpened the diagnosis of heart disease and facilitated its treatment, which is why Cardiology has developed into an important branch of contemporary medical science. The medical history, the physical finding, and some basic trials are usually sufficient for a clinical diagnosis of ischemia. The diagnosis is often confirmed on the basis of a response to drug therapy. In order to confirm the diagnosis and planning further treatment, an initial noninvasive strategy involves the use of a Coronary Stress Test (CPT) or stress echocardiography. The coronary stress test provides data on effort tolerance, hemodynamic response, symptoms, and ST-segment changes. In addition to the primary role, echocardiography provides data on the extensiveness and localization of ischemia. Echocardiography and other noninvasive investigations (magnetic resonance imaging) provide data for left-handed function. Treatment of ischemia involves an assessment of the overall risk. In order to consider an overall observation of the development of ischemic disease, continuous ECG monitoring is required as follows:

• Ambulatory monitoring according to the Holter method, in the outpatient treatment of patients, and

• Monitoring in intensive care units, in the treatment of patients with ischemia. At the same time ECG monitoring can detect asymptomatic ischemia (ST-depression) that is more common than symptomatic ischemia but is also dangerous to the human health. In order to ensure greater accuracy and relevance of the obtained data in the ECG recording, science applies a range of different types of algorithms (categorized by the way of their work, sensitivity and predictability) which on a different way offer appropriate solutions for the analysis of ECG recordings. Therefore, the main goal of this tesina is to consider some algorithms taken from the literature which analyze ECG recordings to diagnose ischemia.

1.1. Tesina outline This tesina is structured as follows: - Chapter 1 is an introduction to the research topic. - Chapter 2 describes the method of the conducted research as well as the used literature supported by the views and principles underlying the authors whose papers and articles were used in this research. The literature used (and for the most part taken from Google Scholar) paying particular attention to the authenticity and competence of the authors themselves and their views, opinions and perceptions regarding the development of algorithms for the early detection of ischemic disease. - Chapter 3 groups, lists and categorizes the algorithms analyzed in this tesina, at same time considering ischemia as a serious cardiac disease that often ends with tragic consequences.

Page 6: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

6

Within this chapter the heart, its structure and mode of operation are specifically described. - Chapter 4 describes the three different sets of algorithms used to detect ischemic heart disease during ECG recording. Within the groups, a collection, analysis and detailed description of several types of algorithms were analyzed, propagated and researched by a number of different authors. - Chapter 5 evaluates the algorithms and compares them. - Chapter 6 depicts a table in which the ranking of the investigated algorithms in this paper is made based on its sensitivity and specificity. The arithmetic values of its sensitivity and specificity have been presented and compared for most of the investigated algorithms. - Chapter 7 sketches out some conclusions and highlights further research issues.

Page 7: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

7

2. Source selection The research on the types of algorithms used for the analysis of ECG recording (at the early detection of ischemic disease) has been performed on a large range through the Internet (online), given that it is a global resource for a large amount of data from a wide range of areas including algorithms used for ECG recording in terms of early detection of ischemic disease. The National Library of Medicine (NLM) has been searched, as well as Google scholar, detecting more than 35 articles and books related to the research topic. Considering the specific topic of the survey and the required material for the tesina as well, it is most often researched in the existing International Journal of Medical Informatics, which is deeply involved in the research and analysis of existing and new algorithms. In case of ischemia detection and analysis, Jager and others offer a protocol for the performance evaluation of the algorithms. Algorithms based on the wavelet transform for peak detection are mainly based on Mallat and Hwang's approach for the detection of singularities and their classification using local maxima of coefficients of wavelet transformation of the ECG signal. Moreover, Sahambi and others (1998) have developed an ST-segment analysis algorithm, supported by multi-resolution wavelet approach. Skordalakis (1986) also developed a technique for the automatic identification of the ST segment considering the hypothesis that it is either a straight line or a parabola. Furthermore, the classification of the ST shape has been of crucial importance for Jeong and Yu (2007) in terms of monitoring and preventing of ischemia such as cardio disease. From another side Jeong and others (2010) have concluded that the crucial step in identifying myocardial ischemia is to locate the start of the ST level change in the entire ECG. Also, many of the authors presented articles in the IEEE Transactions on Biomedical Engineering Journal, where a number of algorithms are also processed and analyzed. Andreao and others (2004) have proposed a system based on a Markovian approach for online beat detection and segmentation, providing a accurate positioning of all beat wave but above all the PQ and ST segments. Hidden Markov Model has also been used by Langley and others (2003) in order to establish an algorithm and determine its correctness in distinction between ischemic and no ischemic changes in the ECG ST-segment. From another side Song and others (2011) have developed, a robust and efficient hybrid algorithm for ECG ST–T complex detection, using regional method for T-wave onset and offset detection. Furthermore a typical representative of the group of algorithms for the detection of QRS complexes derived from the signal derivation is an algorithm introduced in 1985 by Jiapu Pan and Willis J. Tompkins. Despite the fact that a huge amount of methods has been developed and implemented, supported by high percentages of correct detection, the crucial problem is still open, particularly with focus to higher detection correctness in noisy of ECGs. Therefore Christov (2004) developed a real-time detection technique, based on comparison among total values of distinguished electrocardiograms of one of more ECG leads and adaptive threshold.

Page 8: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

8

3. Taxonomy of algorithms Algorithms for the detection of QRS complexes can be divided into two groups: on-line or real-time; and off-line algorithms. Real-time algorithms1 work with a "live" signal, since they analyze the signal in real time, process the signal that comes to the analyzer at the moment and determine the detection decisions on the data that have been received so far. From another side off-line algorithms work with signals already captured somewhere and these algorithms can make detection decisions based on the entire signal (10). The principles of the work of several groups of algorithms that use the same pre-processing phase in which linear and non-linear filtering is done are explained bellow as variety of logarithms, compared by the used/proposed approach including its performance in terms of the its sensitivity and predictability. However, before we look at the types of algorithms and their application in medicine, it is necessary to review the heart structure, ischemia as a disease, and describe how the algorithms function in the detection of ischemic disease, in order to simplify its analysis, comparison and ranking.

3.1. The heart’s structure The heart is a hollow muscle of compressed-sized fist (Figure 1), which pumps blood through the blood vessels. The heart is grafted with cardiac muscle tissue located in the chest, with 200 - 425 grams in the human body, outside protected by the outer membrane - the heart. This hollow muscular organ is divided by a muscular wall on the left and right side. Cardiac valves regulate the passage of blood from an underlying to the ventricle. The blood pressure that passes from the atria in the ventricle closes the heart valve, and the return of blood is not possible. The human heart includes four cavities: two atria and two ventricles.

Figure 1. The heart’s structure

1 Formally, an algorithm is labelled as “real time” if its correctness depends on the results AND on the time needed to compute those results.

Page 9: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

9

Heart operation consists of two actions - collecting and spreading. Heartbeats can be felt on neck, wrist or forearm. The blood from the right part of the heart into the lung leads to the pulmonary artery. In the lungs, blood is solved by carbon dioxide and enriched with oxygen. Such purified blood is now arterial that comes from the lungs to the left anterior to the lungs. From the left anterior arterial blood goes further into the left ventricle and into the aorta, which spreads through the whole body. Since the left part of the heart pumps arterial blood into the whole body, in the left part of the heart the pressures are three times higher, and its walls are thicker and stronger. A "wall" that divides the heart on the right and the left part (the heart partition) is called a septum, which does not allow contact between the two forequarters and the two cells. Otherwise, there would be a mix of venous and arterial blood. If, due to the disorder, the heart needs to do more work than is normal, the cardiac walls are thickened. The systolic and diastolic are two phases of heart function. The systole is pumping while the diastolic is filling the heart with blood (1).

3.2. Ischemia as a cardio disease Myocardial ischemia represents a disorder of cardiac function as a result of insufficient blood flow to the muscle tissue of the heart and a prime cause for the occurrence of cardiac infarction and dangerous cardiac arrhythmias (2). The most imperative diagnostic parameters for detecting myocardial ischemia represent abnormal changes in the ST segment of an electrocardiogram (ECG) but due to the transient change of the ST segment, its analysis involves a long-term ECG recording. Variation of the ST segment is commonly associated to myocardial irregularity (3). Considering that the most important ECG indicator connected with myocardial ischemia is ST change, it is necessary to observe and analyze the ECG for 24 hours of a individual who suffers from heart disease (2). Ambulatory ECG monitoring system is essential as a result of the recognition of transient ST change due to myocardial ischemia (4). Based on ST change the doctor may determine if myocardial ischemia has occurred in the heart. Therefore the main focus to researchers who develop algorithms or devices in terms of the detection of myocardial ischemia is the automatic detection of ST change episodes. The real ischemic ST changes can be distinguished from non-ischemic ST changes with help of data about ST changes, including ST shape (Figure 2). Nowadays variety of new methods for detecting ischemic episodes are being developed, with accuracy of more than 90%, provided by these algorithms (5).

Page 10: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

10

Figure 2. Normal and abnormal ECG patterns.

3.3. Ischemia detection with ECG The main role for ECG is to keep good health or monitor cardiac function of aged person in order to diagnose the disease of heart patients. The ambulatory ECG monitoring system is extremely efficient to avoid the progress of heart disease and sudden death. Consisting of three basic waves, the P, QRS and T (Figure 3), ECG could detect the impermanent change that is very important to diagnose heart disease such as myocardial ischemia, arrhythmia and cardiac infarction (2).These waves match up to the far field induced by detailed electrical phenomena on the cardiac surface, namely atria depolarization (P wave), ventricular depolarization (QRS complex) and ventricular depolarization (T wave). In order to recognize and analyze these waves ranging from digital filtering techniques to neural network (NN) including spectra-temporal techniques there are variety of developed techniques (6).

Figure 3. P wave, QRS complex and T wave

The constituent ECG waves and the J point have been monitored in the ordinary case. In case of ischemic ECG, there is monitoring of the ST elevation (it could be depression as well), and monitoring in the second beat that the J point is not easily discernible. All similarities between the QRS and PVC are also monitored (6). The first electrocardiogram (Figure 4) has been invented by Willem Einthoven in 1903 (7) and therefore in 1924 he won the Nobel Prize for Medicine.

Page 11: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

11

Figure 4. Electrocardiograph from 1903.

Figure 5. Contemporary electrocardiographs

The electrocardiogram recording represents a non-invasive procedure, conducted for data collecting in terms of cardiac activity. Indications for recording ECG are as follows: - Chest pain - Arrhythmia - Dyspnea (difficulty in breathing) - Other signs indicating the possibility of acute cardiovascular disease. The electrical activity of the heart is represented by the electrocardiogram (ECG) that includes amount of waves — P, QRS, and T — that are linked to the status of the heart action (1). A variety of time intervals has been distinct by the onsets and ends of these waves are vital in electrocardiographic diagnosis. The RR interval, the PQ interval, the QRS duration, the ST segment, and the QT interval (8) are of crucial meaning for monitoring. P wave represents the electrical activity of the contractions of both atria. The QRS complex represents the electrical activity of the chamber. Q wave is the first downstream part of the QRS complex. It is important to know that the Q wave is often not present on the ECG. The first ascending wave that follows the Q wave is R wave. Following the upward R wave, is the S wave. The difference between Q and S is that there is no upward wave in front of the Q wave, and there is an upward wave in front of the S wave. The T wave represents the depolarization of the chambers so that they can be again irritated by the electric impulse. This wave can be understood as a "reset" of the heart cells. One heart cycle has been repeated constantly.

Page 12: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

12

3.4. Software detection of the QRS complex The QRS complex represents the most important waveform within an ECG signal. Since it represents electrical activity inside the heart during ventricular contraction, the time of its occurrence and its shape can provide a lot of information about the current state of the heart and point out many problems within an entire organism. Software packages for ECG signal analysis can provide all possible information related to heart condition, from heart rate to possible diagnosis of the disease. Software detection of the QRS complex is often used as the starting point for ECG compression because the ECG signal contains some things that are not much needed for its analysis.

3.5. Description of the algorithms Detection of R-peaks First of all there is necessary to select and load the desired .mat file [fname path]=uigetfile(‘*.mat); fname=strcat(path,fname); load(fname); In order to remove the possibility of crossing the signal limits during peak location searches, 100 nulls have been set up before and after the signal. z=zeros(100,1); A=[z;A;z]; Then wavelet decomposition has been performed. The wavelet decomposition process decimates the signal, which ultimately means that the sampling is performed at a much lower frequency than the input signal. In this way the details are reduced, and the QRS complex remains preserved. [c,1]=wavedec(s,4,’db4’); Extraction of coefficients after transformation. ca1=appcoef(c,1,’db4’,1); ca2=appcoef(c,1,’db4’,2); ca3=appcoef(c,1,’db4’,3); ca4=appcoef(c,1,’db4’,4); The graphic of the coefficients shows that the frequency bands are mutually separated, and ca1, ca2, ca3 and ca4 are cleaner signals (Figure 6).However, they have fewer samples than the original signal, which is the consequence decimation due to wavelet decomposition. The first signal is similar to the original signal, but it has two times less samples than it. The second level signal has half the samples from the first level signal, while the third level signal has half the samples from the second level signal. Such signals in which the number of samples is reduced are called decimated signals.

Page 13: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

13

Figure 6. Coefficients ca1 - ca4

The second-level decomposition signal released from the noise represents an ideal ECG signal in which individual QRS complexes can be detected. The first R-peak is at about 40th samples in the second decomposition level, while that same peak in the source signal is on about 160th samples. Therefore, when the R-peak is detected in the third decomposition level, the location needs to be referenced in the source signal. Finding R-peaks in the decimated signal is based on finding the value of a signal that is greater than 60% of the value of the largest signal sample. The values obtained represent R-peaks, while the variable 'y1' is a wavelet decomposition signal. m1=max(y1)*.60; P=find(y1>=m1); Now the variable 'P' is a set of samples that satisfy the above condition. It is obviously that the R wave does not represent a peak made up of an isolated pulse. First of all is necessary to remove the locations of the R-tips that are too close to each other, which means leaving only the R-tips that are at least 10 samples away from each other. P1=P; P2=[]; last=P1(1); P2=[P2 last]; for(i=2:l:length(P1)) if(P1(i)>(last+10)) last=P1(i); P2=[P2 last]; end end

Page 14: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

14

Now the variable 'P2' represents the locations of the R-peaks in the decimated signal. Locations in the decimated signal represent locations in the original signal. Therefore, it is necessary to multiply the locations just obtained with 4 in order to get the actual locations of the peaks. P3=P2*4 Locations of R-peaks in the decimated signal will never be exactly at a location scaled by 4 in the original signal. The decimation process always causes a deviation of the position of the signal samples. Therefore, in the source signal, we need to search for the highest values in the window of 20 samples, with the reference samples representing the scaled locations of the R-peaks stored in the variable ‘P3'. Rloc=[]; for(i=1:l:length(P3)) range=[P3(i)-20:P3(i)+20] m=max(A(range)); l=find(A(range)==m); pos=range(l); Rloc=[Rloc pos]; End Variables 'Ramp' and 'Rloc' represent amplitudes and locations of R-peaks in the source signal. The other peaks are detected with regard to the already detected R-peaks, in the manner of looking for local maxima and minima in their surroundings. Considering it, the remaining peaks are sought by passing through the variable 'Rloc'. Observing the waveform of the ECG signal, it is very clear that by searching for the maximum inside the window from (Rloc - 100) to (Rloc - 10), we get the P-peak sample as the highest value. Similarly, Q, S, T-peaks are obtained. a=Rloc(i,j)-100:Rloc(i,j)-10; m=max(y1(a)); b=find(y1(a)==m); b=b(l); b=a(b); Ploc(i,j)=b; Pamp(i,j)=m; Detection of Q-peaks is performed by finding a sample of the least value inside windows from (Rloc - 50) to (Rloc - 10), since Rloc represents the R - peak location. a=Rloc(i,j)-50:Rloc(i,j)-10; m=min(y1(a)); b=find(y1(a)==m); b=b(l); b=a(b); Qloc(i,j)=b; Qamp(i,j)=m;

Page 15: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

15

Detection of S-peaks is performed by finding a sample of the least value inside window from (Rloc + 5) to (Rloc + 50) since Rloc represents the R-peak location. a=Rloc(i,j)+5:Rloc(i,j)+50; m=min(y1(a)); b=find(y1(a)==m); b=b(l); b=a(b); Sloc(i,j)=b; Samp(i,j)=m; Detection of T-peaks is performed by finding a sample of the highest value within the window from (Rloc + 25) to (Rloc + 100) since Rloc represents the R-peak location. a=Rloc(i,j)+25:Rloc(i,j)+100; m=min(y1(a)); b=find(y1(a)==m); b=b(l); b=a(b); Tloc(i,j)=b; Tamp(i,j)=m; Determination of the number of heartbeats and the presence of arrhythmias The fs frequency is 360 Hz. The duration of the heart rate is the ratio of the number of samples of the input signal and the frequency of the typing: length (ECG_1) / 360.In order to get the number of heartbeats per second, the number of R-peaks with that time must be divided and the result must be multiplied by 60 to get the heart rate per minute. heart_rate = 360/length(ECG_1)*length(Rloc)*60 Myocardial ischemia represents an abnormality in the heart structure or function that leads to heart failure to deliver the oxygen at a suitable rate that is adequate to the requirements of metabolism in the tissues, due to narrowing of the blood vessels or increased resistance to blood flow, which ultimately can cause a heart infarct Characteristic properties: inverted T-wave (1). if A(Tloc(i))<A(Tloc(i)+1) Text2=‘myocardial ischemia’; z=1; break; end Whenever a classification tool is used, its performances can be easily validated by the confusion matrix: such a matrix aims at comparing the TRUE labels (i.e., those recognized and assigned by a team of domain experts) with the ASSIGNED labels (i.e., those assigned by the classification tool).

Page 16: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

16

A typical confusion matrix is the following:

ASSIGNED Positive Negative

TRUE Positive TP FN Negative FP TN

TP is the number of instances which in the real world (TRUE) are positive, and the classification tool labels them as positive – no classification error occurs. TN is the number of instances which in the real world (TRUE) are negative, and the classification tool labels them as negative – no classification error occurs. FN is the number of instances which in the real world (TRUE) are positive, but the classification tool labels them as negative - classification errors occur. FP is the number of instances which in the real world (TRUE) are negative, but the classification tool labels them as positive – classification errors occur. In case of ischemia detection and analysis, Jager and others offer a protocol for the performance of the algorithms (9) since two sets of performance indices are defined: (1) sensitivity and positive predictivity for ischemic ST episode detection; and (2) sensitivity and positive predictivity for ischemia duration. Properly detected episodes are termed true positive (TP) episodes, that their length is denoted by ISTP. Missed episodes are termed false negatives (FN) that their length is denoted by ISFN. Erroneously detected no ischemic episodes are termed false positives (FP) since their length is denoted by ISFP. At the end correctly identified normal beats are termed true negative (TN). Thus, there are four indices, defined as: (1) The ratio of the quantity of detected episodes matching the database annotations to the quantity of annotated ischemia episodes represents ischemic ST episode sensitivity (ST_Se). This indicator represents the sensitivity of the algorithm to the detection of ST episodes.

(𝑆𝑇_𝑆𝑒 =𝑇𝑃

𝑇𝑃 + 𝐹𝑁) (2) The ratio of the quantity of properly detected (matching) episodes to the quantity of episodes detected represents ischemic ST episode predictivity (ST_P).

(𝑆𝑇_𝑃 =𝑇𝑃

𝑇𝑃 + 𝐹𝑃) This indicator is a count of the inclination to incur false detection since the denominator is the amount of ischemic ST episodes detected by the identification of algorithm. (3)The ratio of the interval of true matched ischemia to the total interval of annotated ischemia in the database represents ischemia duration sensitivity (IS_Se).

(𝐼𝑆_𝑆𝑒 =𝐼𝑆𝑇𝑃

𝐼𝑆𝑇𝑃 + 𝐼𝑆𝐹𝑁)

Page 17: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

17

4) The ratio of the interval of true matched ischemia to the total interval of the ischemia detected by used algorithm represents ischemia duration predictivity (IS_P).

(𝐼𝑆_𝑃 =𝐼𝑆𝑇𝑃

𝐼𝑆𝑇𝑃 + 𝐼𝑆𝐹𝑃)

An aggregate statistic has been involved in case of small total amount of ischemia episodes in the database or the Holter data. Gross statistic is obtained as a result of evaluating the numerators and denominators of the four indices indicated above over the whole database. Average statistic is usually obtained as a result of evaluating the above indices for each file of the database separately, and averaging over the quantity of files or patient cases (6).

Page 18: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

18

4. The algorithms Within this survey, a variety of algorithms has been categorized in terms of their work into three categories:

• Algorithms based on wavelet transformation • Algorithms based on signal generation and digital filters • Algorithms based on neural networks

Each of the above groups is represented by a variety of different types of algorithms, which mutually differ in terms of their sensitivity and predictability at the analysis and detection of ischemic disease at ECG recording.

4.1. Algorithms based on wavelet transformation Algorithms based on the wavelet transform for peak detection are mainly based on Mallat and Hwang's approach for the detection of singularities and their classification using local maxima of coefficients of wavelet transformation of the ECG signal (11). In this case the singularity in the ECG signal corresponds to a pair of local maxima modules. Classification of peaks, i.e. their detection is done by calculating the degree of singularity. The second algorithm divides the ECG signal into fixed-length segments. R peak is detected at a location where the local maxim module reaches some threshold that counts for each segment. The third algorithm is based on pattern recognition. This algorithm consists of two phases, learning phases and recognition phases. At the learning stage, a set of vectors are generated that correspond to the wavelet transformation when there is R peak. This learning is done on several different R peaks. When there are enough of these vectors, it's time for the recognition phase. The ECG signal is divided into fixed-length segments, wavelet transformations are made, and the resulting vectors are compared with the vectors we received in the learning phase. If the matching ratio is acceptable, the R peak is detected. By using wavelet transformation approach, the detection rate of QRS complexes can be more than 99.8% for the MIT/BIH database and the P and T waves can be identified as well, even with serious base line drift and noise (12).

4.1.1. Algorithms based on discrete wavelet transformation The wavelet transformation (WT) of f(t) is an integral transform defined as:

𝑊𝑓(𝑎, 𝑏) = ∫𝑓(𝑡)Ψ𝑎,𝑏∗ (𝑡)𝑑𝑡∞

−∞

since ψ*(t) represents the conjugated complex wavelet function ψ(t). This transformation has a time-scale representation similar to the time-frequency representation of the STFT transformation. However, opposite of the STFT, the WT uses a set of analysis functions, providing the change of time-frequency resolution for different frequency bands (14). A set of these analysis functions is derived from the so-called mother-wavelet function ψ (t) as:

Page 19: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

19

Ψ𝑎,𝑏(t) =1√2Ψ(𝑡 − 𝑏𝑎 )

since parameter a refers to the scale and is called the dilatation factor, while b is called the translational parameter. Discrete Wavelet Transformation (DWT) has been created by discretizing the scalar and translational parameter:

𝑊𝑓(2𝑗, 𝑏) = ∫𝑓(𝑡)Ψ2𝑗,𝑏∗ (𝑡)𝑑𝑡 , 𝑤ℎ𝑒𝑟𝑒

−∞

Ψ2𝑗,𝑏(𝑡) =1

2𝑗2⁄Ψ(𝑡 − 𝑏2𝑗 )

The shape of the fourth of the Daubechies wavelet family is shown in Figure 7.

Figure 7: The shape of db4 wavelet

Figure 8: Approximation signals and details of the third level of ECG decomposition of signals using db4 wavelet

Algorithm proposed by author Gyaw and Ray, also based on wavelet transformation, is based on pattern recognition (14). This algorithm consists of two phases - the learning phase and the recognition phase. Within the learning phase, a set of vectors corresponding to the wavelet transform is generated when there is R peak. This learning is done on a number of different R peaks. The recognition phase occurs when a sufficient number of such vectors have been reached. Then the ECG signal is divided into segments of fixed length, and after that the wavelet transformation is performed over it. The resulting vectors are compared with the vectors used in the learning phase. If the matching ratio is adequate, the R peak is successfully detected.

Page 20: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

20

The authors Di-Virgilio and others have proposed a wavelet-oriented algorithm that divides the ECG signal into fixed-length segments (14). R peak is detected at the location since the local maxim module reaches the threshold that is previously calculated for each segment. The implementation of the wavelet-oriented algorithm for detecting the QRS complex is shown in Figure 9.

Figure 9: Detection of the QRS complex using db4 wavelet analysis

4.1.2. Wavelet based ST-segment analysis-algorithm If there is deficiency in the blood supply to the heart muscle or no, can be detected by the changes in the ST-segment of an ECG. Also, the ST-segment may become irregular as a result of myocardial ischemia or infarction. Therefore, a precise recognition of the ST-segment including its level, has particular diagnostic importance, and usually more investigations are needed. Sahambi and others (1998) have developed an ST-segment analysis algorithm, supported by multi-resolution wavelet approach. It can detect the QRS complexes and analyses each beat based on the wavelet transformation to identify the characteristic points (fiducial points) that represents iso-electric level, the J point, and onsets and offsets of the QF~S complex and T wave (15). The algorithm determines the T onset by looking for a point of inflection between the J point and the T peak. As a result of detection of characteristic points by the wavelet technique the effect of noise can be reduced. All obtained results highlight that the projected approach provides extremely accurate ST levels, at higher heart rates and with different morphologies, opposite of the traditional (empirical) technique. The algorithm identifies the ST-segment in 92.3% beats with an error of 4ms and for 98.0% of the beats the error is within 8ms. Its accuracy is suitable within the acceptable limits of clinical environment. On-line analysis and display of ST-segment data can be provided since the algorithm has been implemented on a TMS320C25 based add-on DSP card linked to a PC. Method The detection of iso-electric level, onsets and offsets of the QRS and T complexes, and the J point are necessary for the detection and localization of the ST-segment. Necessary ECG data to evaluate the performance of the system are taken from two sources. First set of data is taken from a ECG simulator providing an ECG with known heart rate and ST levels. The variation in the ST levels given in a 1.0 mV ECG signal varied from -0.50 to 0.15 mV. The second set of data is taken from a sample file from the standard European ST-T database (file 'X_EDB') providing ECGs from clinical environments (15).

Page 21: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

21

Detection of iso-electric level, onsets and offsets of QRS complex The detection of iso-electric level, onsets and offset of QRS complex and T wave are provided as a result of highest total value and zero crossings of the wavelet transforms at the characteristic scales. Smoothing function O(t) with non-zero DC value (its integral is not equal to zero) may be considered as an impulse response of a low-pass filter. If smoothing function can be Gaussian and at scale a, then it can be defined such as:

θ𝑎(𝑡) =1√𝑎θ (𝑡𝑎) , 𝑙𝑒𝑡

𝜓(𝑡) = (𝑑𝜃𝑑𝑡) (𝑡)

be a function formed by the first derivative of θ(t). To detect the characteristic points, the wavelet transform of the signal is calculated. The wavelet transform of f(t) with ψ(t) as mother wavelet is defined as the inner product of f(t) with ψ*a,t(t).

Wf(a,τ)=( f(t), ψ*a,t(t))

where a is the scale parameter and τ is the shift parameter. As the wavelet is real function the conjugate of ψa,t(t) is ignored in the subsequent discussion.

𝑊𝑓(𝑎, 𝜏) =1√𝑎

∫𝑓(𝑡)𝜓 (𝑡 − 𝜏𝑎 )

−∞

𝑑𝑡

Now:

𝜓𝑎(𝑡) =1√𝑎𝜓 (

𝑡𝑎)

Let

𝑡𝑎 = 𝑢 ⇒ 𝑑𝑡 = 𝑎𝑑𝑢

Therefore

𝜓𝑎(𝑡) =1√𝑎𝜓(𝑢) =

1√𝑎𝑑𝜃𝑑𝑢 (𝑢)

And by chain rule

𝜓𝑎(𝑡) =1√𝑎(𝑑𝜃𝑑𝑡)

(𝑢)𝑑𝑡𝑑𝑢=𝑎√𝑎

𝑑𝑑𝑡𝜃 (𝑡𝑎)= 𝑎

𝑑𝑑𝑡 [

1√𝑎𝜃 (𝑡𝑎)]

= 𝑎𝑑𝑑𝑡 [

1√𝑎𝜃 (𝑡𝑎)]

= 𝑎 (𝑑𝜃𝑎𝑑𝑡 )

(𝑡)

Page 22: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

22

Using t = - 𝜏 ⇒ 𝑑𝑡 = −𝑑𝜏 in the previous eqn. we get∶

𝛹𝑎(−𝜏) = −𝑎 (𝑑𝜃𝑎𝑑𝜏) (−𝜏),𝑤ℎ𝑖𝑐ℎ 𝑖𝑚𝑝𝑙𝑖𝑒𝑠 𝛹𝑎(𝑡 − 𝜏) = −𝑎 (

𝑑𝜃𝑎𝑑𝜏) (𝑡 − 𝜏) = 𝛹𝑎,𝑡(𝑡)

Considering the previous eqn. the wavelet transform can be written as

𝑊𝑓(𝑎, 𝜏) = ⟨𝑓(𝑡), −𝑎 (𝑑𝜃𝑎𝑑𝜏) (𝑡 − 𝜏)⟩ ⇒ 𝑊𝑓(𝑎, 𝜏) = −𝑎 (

𝑑𝑑𝜏) ⟨𝑓(𝑡), 𝜃𝑎(𝑡 − 𝜏)⟩

Therefore, wavelet transform Wf(a, 𝜏) is proportional to the first derivative (w.r.t 𝜏) of

⟨𝑓(𝑡), 𝜃𝑎(𝑡 − 𝜏)⟩ = ∫𝑓(𝑡)𝜃𝑎(𝑡 − 𝜏)𝑑𝑡∞

−∞

In this case the zero crossing in the wavelet transform Wf(a, z), at some z = z1, match up to the local extreme of the expression in the last equation. For proportioned waveforms such as the P wave, the zero crossing of Wf(a,τ) at some τ=τ1, among its local maxima and minima, would match up to the peak of the waveform. The wavelet transforms are calculated in terms of the scales of interest. The Table 1 bellow highlights the pass bands of the wavelet filters at four scales. The outcome of base line drift and power line interference on the timing characterization and the onset of the QRS complex may be reduced by an optimized wavelet (15).

Scale Lower 3dB Frequency

Upper 3 dB frequency, Hz

21 31.5 80.0

22 15.6 42.5

23 7.0 22.0

24 4.1 12.7

Table 1. Pass bands of wavelet filters at four scales

Within this period the algorithm searches for 30 ms that has a minimum total value & the wavelet transform. It represents the iso-electric level. The search begin from the onset of the QRS complex and goes towards the offset of the P wave. Considering the smaller effect by base line wander looking for the iso-electric level in scale 23 gives a further reliable value. Detection of S point and J point Because of ECG composed of high frequencies around S and J point they are detected using the 21 scale. Step behind the maxima zero crossing of Wf(21,τ) match up the S point. Sometimes J and S point can be same, if the J point is defined as the first inflection after the S point. After the zero crossing, first a peak for the J point is detected in scale 21. A search is conducted for a peak in a range of 20 ms after the S point in order to detect the J point. After this, the point of maximum slope is searched for. In this case The J point is distinct as the

Page 23: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

23

point where the slope of Wf(21,τ) becomes less than 50% of the maximum slope, after the point at which the maximum slope occurs. In the given period if a point of inflection is not found after the S point, then the J point is used as the S point. T onset and offset The T wave keeps up a correspondence to a couple of modulus maxima positioned behind the end of the QRS complex with a zero crossing in between. The zero crossing among the modulus maxima provides the position of the T peak (this is true for positive and negative T waves). The first modulus maxima match up the maximum slope between the onset and the T peak while the second modulus maxima match up the greatest slope between the T peak and the offset. The search is conducted between the first modulus maxima analogous to the T wave and the QRS offset for the onset of the T wave. Let τT1 and τT2 be the times corresponding to the first and second modulus maxima respectively. The first modulus maxima is denoted by TP1 = Wf(23,τT1) and the second by TP2 = Wf(23, τT2 ). Starting from τT1, a backwards search is made for a point where Wf(23, τ ) satisfies any one of the following conditions: (i) The value of Wf(23, τ ) becomes less than or equal to THP1= TP1/kp1. Here kp1 is kept

at four. (ii) The slope of Wf(23, τ ) changes sign (without reaching THP1). (iii) There is major change by the slope of Wf(23, τ ). Results The evaluation of the algorithm is based on test data and on standard ECG data. The J point and the ST-T point are identified to check next to the calculated value. The difference among the values calculated visually and by the system represents the error.

Heart rate

min -1 Percentage of beats having error (e)ms in ST-segment length % of beats

with error within 4ms

% of beats with error within 8ms 0<e<4 4<e<8 8<e<12 12<e<16 16<e<20

80 94% 5% 1% 0% 0% 94.0% 99.0%

120 90% 3% 1% 5% 1% 90.0% 93.0%

160 93% 6% 0% 0% 0% 93.0% 100.0%

File X_EDB 92% 8% 0% 0% 0% 92.0% 100.0%

Average 92.3% 98.0%

Table 2. Results of ST-segment detection with different heart rates (80/120/160)

The algorithm detects the ST-segment in 92.3% beats (Table 2) with an error of 4 ms and for 98.0% of the beats the error is within 8 ms. The accuracy of the algorithm is acceptable within the suitable limits of clinical environment. There are possible errors due to the truth that as the heart rate moves up the T wave closer to the QRS complex. This moves the J point in terms of the T peak and the value considered is

Page 24: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

24

higher (i.e. towards positive side for the case of positive T wave) than the actual value. Its consequence is extremely pronounced at 160 beats min -1. One way around this issue is to modify the value of x based on the heart rate. For example, with some values of x, the errors at 160 beats rain -t are decreased to some extent (Figure 10/c): x=80 ms, for heart rate < 120 x=60 ms, for 120 < heart rate< 140 x=40 ms, for heart rate> t40 The J+x approach would provide inaccurate outcome, as e result of this adaption, due to its empirical nature.

Figure 10. Results of ST level calculations Jbr three values of heart rate. (a) 80," (b) 120," (c) 160 beats rain

It is obvious that the outcomes of the algorithm correspond with ordinary values exceptionally closely, as a result of determined ST-T point by detecting the inflection point between the ST-segment and the T wave but not by empirical method. For that reason there is no need any modification at this approach in terms of higher heart rates, providing additional accuracy of ST level calculation at various heart rates. The conventional approach is detected as a back-up method in case of no inflection point.

4.1.3. An algorithm for the segmentation of a waveform and algorithm for the recognition of the shape of the ST segment SKORDALAKIS (1986) has developed a technique for the automatic identification of the ST segment considering the hypothesis that it is either a straight line or a parabola. The outcomes of this process used to a certain ST segment are: a) The values of the onset and of the end of this ST segment and b) The equation of a straight line or of a parabola that best approximates this ST segment The Algorithm for the Segmentation of a Waveform could be described as follows:

Page 25: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

25

Start: Step l: use couples of adjacent segments in the order (S1, S2), (S3, S4), since Si represents the

segment i (supposing a left to right numbering of them) and adjust the middle point of every couple following the procedure for adjusting the middle point of a couple of segments;

Step2: use couples of adjacent segments in the order (S2, S3), (S4, S5) and adjust the middle

point of each pair of segments as in step l; Step3: if no pair of adjacent segments was adjusted in step l and step 2 then stop else got d-

step l; End.

The Algorithm for the Recognition of the Shape of the ST Segment The following modifications were made to the above algorithm.

1. The quantity of segments is limited to three. 2. The preliminary segmentation is (ib, im1, im2, ie) since ib is the initial sample point of

the auxiliary segment, ie - is the last sample point of the auxiliary segment. im1 = ib + (ie - ib)/3, im2 = im1 + (ie - ib)/3. 3) The data of all three segments S1, S2, S3, are approximated by the functions fk1 (x), fk2 (x), fkl (x), correspondingly since is not necessary for the functions fkl (x), fk2 (X), fk3 (x), to be the same function. Furthermore the algorithm has been implemented four times for measuring four segmentations of the auxiliary segment. Each moment, as functions fkl (x), fk2 (X), fk3 (x), k = 1(1) 4, the ones shown in Table 3 have been implemented.

k J fk1(x) fk2(x) fk3(x)

1 a1x+b1 a2x+b2 a3x+b3

2 a1x+b1 a2x+b2 a2x2+b2x+c2

3 a1x+b1 a2x2+b2x+c2 a3x+b3x

4 a1x+b1 a2x2+b2x+c2 a3x2+b3x+c3

Table 3. fkj Function matrix

As the best segmentation inside all four segmentations of the auxiliary segment is used the one with the smallest error norm. The second segment represents the ST segment. Peng and Wang (2016) have confirmed that using their proposed method, the signal analysis and processing may be separated into two steps as direct and transformation analysis. Implementation of this method may reduce the time for transformation, so useful signal loss can be reduced, and accuracy of detection increased (17).

Page 26: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

26

Signal transformation analysis and processing is performed into wavelet transformation or EMD transformation by mapping the signal to another domain (18). ECG signals processing of usual processes, including denoising, feature recognition, and filtering of the three major procedures are presented at Figure 11/a. In case of n is the duration of the signal under standard conditions, each process needs to undertake a conversion, considering that each transformation obtains a time frequency of T0(n) = C0 n2. Supported by these circumstances, denoising, detection, and compression have been performed. Considering that the time frequency of each procedure is T1(n) = C1n, the entire period necessary for the conventional signal processing method is 3(T0(n)+T1(n)) = 3(C0n2+C1n).

Figure 11: Comparison of two different algorithms for ECG signals processing.

If the projected algorithm has been implemented for completing the denoising, the detection, and the compression operation, the entire procedure only needs to perform the wavelet transform one time, with a period taken of T0(n) + 3T1(n) = C0n2+3C1n ( Figure 11/b). Developed algorithm may decrease the period for transformation between signal domains as a result of the mix of feature detection, signal filtering, and signal compression, providing resources and speeding up the activities (18). As the wavelet transformation needs to follow both activities of decomposition and reconstruction, the useful signal is frequently lost during the process of conversion. The wavelet transform has been implemented by Peng and Wang in order to gain wave trapping extraction, to remove the feature signal component from wavelet decomposition signal. Their technique provides the feature location, signal filtering, signal compressing and other processing, providing reduction of computing resources, speed up the processing, and improve the detection accurateness.

Page 27: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

27

4.1.4. An algorithm for ST shape analysis In order to avoid the progress of heart disease and sudden death, Jeong and others (2010) have designed a small-size (76mm by 59mm) ECG device, providing safety and efficient monitoring. Such system could recognize the temporary change of ECG which is very important to diagnose heart disease such as myocardial ischemia, arrhythmia and cardiac infarction (4). Using LabVIEW program, the major role of the software is to detect the feature points, ST-segment level and shape. The ST segments have been classified by their morphology in order to detect the transient changes of ST. At the beginning a pair of reference ST shapes is given. Included ECG analysis algorithm analysis consists of feature point detection and ST shape classification. Within the procedure of feature point detection S wave and J-point detection have been performed, and the proposed algorithm classifies the STs into reference ST shapes. The rules for the trend of prior beats and the shape category of prior beats have been implemented in order to develop the performance of ST shape categorization. Detection of feature points Supported by searching method based on the R peak there is a detection in terms of the feature points like PR level point, J-point, S wave, etc. as a. (a) and (b).The establishment of detection area for discovering S, Q and T wave has been shown in Fig 12. The duration of the Q wave detection area is 160ms. In general, the PR interval is 120ms to 200ms since the time of 160ms contains the period of the P wave. For that reason 160ms consist of 50% of the period of QRS complex and the beginning of the Q wave. The Q wave detection area has been divided into four parts as shown in Fig 1(c) providing the minimum point or the inflection point as Q wave. Step behind Q wave detection, PR level point has been identified by discovering the inflection point around for Q wave. On the same method S wave, used in Q wave detection as shown in Fig. 12(d). J-point has been identified by finding the inflection point around for S wave. Calculating ST level Based on the definition of ST episodes in the European ST database, the ST level has been calculated. 80ms after the J-point ST segment deviation has been measured but the heart rate had not exceeded 120 bpm. 60ms after the J-point the ST segment deviation has been measured but the heart rate had exceeded 120 bpm. The start of an ST level episode is positioned by looking backward from the time since the total ST deviation first exceeds 0.1mV until a beat is found, for which the total ST deviation is less than 0.05mV. The variation that does not preserve its level for 5sec to construct a continuous section of ST level change has been unnoticed (4). The end of an ST level episode is positioned by searching forward from the period since the total ST deviation last exceeded 0.1mV until a beat is found, for which the total ST deviation is less than 0.05mV. At least 30sec, ST episode section has to keep the total ST deviation no less than 0.1mV

Page 28: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

28

Figure 12. Detection of feature points ST shape classification By match up the four slopes of an ST in ECG data with those in the reference set ST shape classification in ECG data has been conducted. Supported by the four slopes, it has been easy to differentiate among concave, convex and negative-T type, and it has been easy to differentiate these categories from up-sloping, horizontal and down-sloping. The major issue is to make a distinction among up-sloping, horizontal and down-sloping, as a result of the difference among these categories is only the slope in the middle section (4). For that reason, a rule set for improving the performance of ST shape classification among up-sloping, down-sloping and horizontal has been established. All results of the ST shape classification have been shown in Fig 13-16.

Page 29: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

29

Figure 13. STs of concave type

Figure 14. STs of downsloping type

Page 30: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

30

Figure 15. STs of up-sloping type

Figure 16. STs of convex type

Page 31: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

31

Supported by LabVIEW program ECG analysis software that has been developed for Holter analyzer is shown in Fig 17. The software presents all results from ECG shape classification. Also ST level has been displayed below ECG signal. The information of ST shape and ST level change can be provided from the window.

Figure 17. Portable ECG device

An instrumentation amplifier, filter, micro-controller and transmitter module have been included in the portable ECG measurement device. Fig. 18 shows the Hardware configuration of ECG measurement device.

Figure 18. Hardware configuration of ECG device

4.1.5. ST (change detection) analysis algorithm Most of the algorithms that have been developed until now place importance on the detection of the ST level change, but the classification of the ST shape has been from key importance for Jeong and Yu (2007) in terms of monitoring a preventing of ischemia such as cardio disease. A small-size portable ECG device and a suitable developed algorithm detects the ST level changes have been designed by Jeong and Yu. The STs have been classified into seven categories by comparing the slope values of the STs and ones of the reference STs with proposed algorithm (19). All analysis results present the data in terms of ST level change and ST shape change that could be implemented by cardiologists to analyze ST-T episodes. The algorithm designed for ST change detection funds the least squares curve for the data between S wave and T wave in ECG considering that the least square curve for ST has been of importance to notice the change of ST shape. The change of ST shape has been detected

Page 32: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

32

by comparison among pseudo STs that is the approximate curve of the original ST. The ECG has been analyzed by the algorithm automatically and has been noticed irregular part in ECG. All results have been implemented to provide control signal that decides about the start and the end of ECG recording since the device provides the delivers ECG data of recorder to PC (19). Configuration of reference STs Commonly, there are concave, convex, horizontal, down-sloping and up-sloping ST shapes. Fig. 19 represents the reference ST types. In the figure, (+), (0) and (-) mean the sign of the slope value in the ‘|↔|’ marked points.

Figure 19. Reference STs

The proposed algorithm locates the least square curve between the S and T wave step behind the recognition of the QRS complex and T wave in a test ECG. The four slope values have been measure from the least square curve for comparison with those of the reference ST types. The first and the fourth slope values show the permanence of the S wave and the appearance of the T wave, correspondingly. Therefore, since the S wave exists, the first slope value is positive as a result of the positive slope directly after the lowest point of the S wave. Also, the fourth slope has a positive value since the T wave is positive and is negative if the T wave is negative. The slope value in the middle of RR interval has been selected as the fourth slope value in case of no T wave. Usually, the third slope value has been extracted in the middle between the fourth point and J-point, as a result of feature points detection, but if the minimum point with a zero slope value exist around the middle between the first and the fourth point as shown in (d) and (e) of Fig. 19, that point is selected as the third point. Because of similarity among (a) and (e), (a) from (e) can be separated by ST level deviation.

Page 33: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

33

In the middle of the J-point and the third point the second slope value is extracted. No S wave is common to types (a), (e) and (f). The distinction among these types is that kind (a) has only positive slope values after the zero slope point, and kind (e) has both positive and negative slope values before or after the zero slope point, and kind (f) has only negative slope values. All slope values are positive in the case of type (b) while the slope value stays at zero for some instance in the case of type (c). Type (d) varies from type (e) consider type (d) has an S wave. The proposed algorithm classifies STs within seven classes (a), (b), (c), (d), (e), (f) and (X). All additional ST shapes besides the ST shapes exposed in (a) to (f) are classified as type (X). Upslopping depression and concave elevation frequently are without any implication in many cases while down-sloping depression and convex elevation are very important as same as ST depression such as (e). The outcome of distinguishing an ischemic ST from a non-ischemic one is expected to be improved as a result of the ST shape classification (19). Polynomial approximation Within the analysis of the ST shape, the original ECG data has not been used. The real ST data must be interpolated in order to provide calculation of the variation of the ST shape. The interpolation such as process can reduce the noise in the original ECG representing a low-pass filter. Two techniques to approximate ST into a polynomial formula have been implemented. One is to approximate ST into one polynomial formula of 9th order over the entire ST. The second one is to approximate ST into three polynomial formulas of under 5th order for the three-segmented ST. The one of the two ways is chosen due to the magnitude of the noise in ST (19). ST shape classification Within the classification procedure have been used the reference ST types. During the ST shape classification, the values of slopes have been implemented in order to be extracted from the reference ST types. The proposed algorithm implements the slope values of the four points in the section between the S and T waves in order to classify the ST shape type. According to the slopes the four points of the measured ST, have been classified by the algorithm. Fig. 20 represents the ECG analysis process. The first procedure is to detect the feature points such as the QRS complex, J-point, etc. After that, the proposed algorithm discovers the ST level change. ST shape classification is not applied to all ECG data. Its procedure is implemented just to the segments including the ST level change episodes. All ending results of the analysis offer data about both the ST level change and ST shape type that are implemented in the ST level change section (19).

Page 34: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

34

Figure 20. ECG analysis process

4.1.6. Algorithm based on ST morphological change (ST shape classification) Jeong and others (2010) have concluded that the crucial step in identifying myocardial ischemia is to locate the start of the ST level change in the entire ECG and the second crucial step is to verify ST level variation and morphological ST change while finding the end of the ST level change (5). Therefore, Jeong and others paid particular attention to the morphological ST change and on building an algorithm for ST shape categorization. As it is mentioned above, STs are usually divided into five morphologies: up-sloping, down-sloping, horizontal, concave, and convex. Morphological classification of ST ST shape classification in ECG data has been performed by comparing the four slopes of an ST in ECG data with those in the reference set. Using the four slopes, it was easy to distinguish among the concave, convex and negative-T types, and easy to distinguish these types from up-sloping, horizontal, and down-sloping. The main issue is how can we distinguish among up-sloping, horizontal, and down-sloping, because the difference among these types is only in the slope in the middle region. For that reason, a rule set for strengthening the features of ST shape categorization among up-sloping, down-sloping, and horizontal have been developed and implemented supported by several parameters as follows:

Page 35: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

35

(1) p(%): rate of a flat region in between the J-point ant T peak. (2) θ(rad): mean of slope value in the flat region. (3) s(rad): trend of slope for the previous two beats. (4) t: trend of shape for the previous two beats. The slope angle of the second point in ST that has been classified in the horizontal type has been monitored. The slope angle of the second point is less than 0.02 rad (about 1.15◦) for ST to be classified as a horizontal type while the amount of the part where the slopes are less than 0.02 rad to the entire ST part is almost 27.5%. Commonly, the standard QT period between the Q and T wave counts 370 ms, and the period of a normal QRS complex counts 80ms at 70 beats per minute (bpm). The period of the T wave counts 250 ms. The period of a normal ST could be measured at 40ms which accounts for about 25% of the interval between as a result of the common period of the QT interval, QRS complex, and T wave at 70 bpm the J-point and T peak. 0.02 rad, 27.5%, and 25% have been implemented as basic factors for building the four parameters comprising the rules. The first parameter has the period p (%) since the slope angle is up-holded on less than 0.02 rad (about 1.15◦) in between the J point and T peak, that clearly designates the correspondences among the horizontal shape in the reference STs and the ST shape of the present beat p has been classified into three sets, highlighted by

S={ p|22.5 > p}

M={ p|22.5 ≤ p ≤ 27.5}

L={p|27.5 < p}

The next parameter represents the mean slope value θ(rad) of the period whose slope has been established at less than 0.02 rad, clearly indicating the correspondences among the horizontal shape in the reference STs and the ST shape of the present beat. As parameter it can be categorized into three sets as follows:

N ={θ| - 0.0087 > θ}

CE ={θ| - 0.0087≤ θ ≤ 0.0087}

P ={θ| 0.0087 < θ}

The trend of slope s(rad) represents its parameter indicating the trend for the ST slope change. The total of the slope values of the previous two beats is the value s (rad). CE has been implemented including the slope variation of 0.02 rad downward in the previous two beats, since the categorized value s into three sets is represented by

N ={s| - 0.01 > s}

CE ={s| - 0.01 ≤ s ≤ 0.01}

P = {s| 0.01 < s}

The fourth parameter is the score t of the determined shape type of the previous two beats and represents the trend of the ST shape change. The shape trend parameter t is the sum of each

Page 36: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

36

score of the two previous beats and is classified into two sets represented by

L = {t| 0.85 > t} H = {t| 0.85 ≤ t}

The result is given by multiplying K (the value assigned to each ST shape) and W (the weighting factor). K was assigned to be 0.5 for the horizontal shape, 0.4 for the down-sloping and up-sloping shapes, 0.3 for the concave shape, and 0.2 for the convex and negative-T shapes (5). The K value increases if the ST of the previous beat is more similar to horizontal type. If the STs of the earlier two beats were analogous to the horizontal type, there is huge possibility that the ST type of the current beat had been horizontal. The weight feature depends of the slope value of ST and is represented by:

𝑊(𝜃) {0.9 |𝜃| > 0.02(𝑟𝑎𝑑)

5|𝜃| + 1 |𝜃| ≤ 0.02(𝑟𝑎𝑑) In order to provide the best characteristics of distinctive among up-sloping, horizontal, and down-sloping, 0.85 has been determined as the margin between L and H sets. In order to configure N, CE and P sets 0.0087 has been used as θ. As shown in Table 6, supported by the sets of p, θ, s, and t, 27 rules have been developed, produced from an iteration procedure for adjusting parameters and applied to test ECGs, and the results have been calculated. All 27 rules are implemented in the categorization between up-sloping, horizontal, and down-sloping shapes after the end of the ST classification procedure implementing the four slope values. Because the rules have already been implemented to provide better performance of classification among the up-sloping, horizontal, and down-sloping types, authors have implemented the parts of the test ECG to establish the rules (5). In Table 4, ‘–’ correspond to all conditions. For example, when is a part of CE and p is a part of M or L, the ST is determined as a horizontal shape for all s and t. When ST is not categorized by the rules, the outcome of the ST shape classification maintains the shape by ST categorization using four slopes.

Page 37: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

37

Rules IF THEN

Type Θ p s t

1 CE M - - Horizontal

2 CE L - - Horizontal

3 CE S CE H Horizontal

4 CE S N L Downsloping

5 CE S P L Upsloping

6 P M CE H Horizontal

7 P M CE L Horizontal

8 P M N H Horizontal

9 P M P H Horizontal

10 P M P L Upsloping

11 P L CE H Horizontal

12 P L N H Horizontal

13 P L P H Horizontal

14 P L P L Upsloping

15 P S CE H Horizontal

16 P S P - Upsloping

17 N M CE H Horizontal

18 N M CE L Horizontal

19 N M N H Horizontal

20 N M N L Downsloping

21 N M P H Horizontal

22 N L CE H Horizontal

23 N L N H Horizontal

24 N L N L Downsloping

25 N L P H Horizontal

26 N S CE H Horizontal

27 N S N - Downsloping

Table 4. Rules for ST shape classification.

Page 38: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

38

All given results from the proposed algorithm have been verified, including control of the classification correctness. The best correct rate has been 99.70% for e 0121. It has been relatively easy to classify STs since the ECG included only up-sloping and down-sloping, while 99% of the STs have been up-sloping. As a result of confusion between up-sloping, down sloping, and horizontal, the worst correct rate was 65.52% for e0147. Despite the facts the rule set for distinguishing up-sloping, down sloping and horizontal, have been implemented, it was difficult to distinguish between them. The correct answer rate has been 83.14% globally (5).

4.1.7. An algorithm based on simple level thresholding within specified time windows Andreao and others (2004) have proposed a system based on a Markovian approach for online beat detection and segmentation, providing an accurate positioning of all beat wave but above all the PQ and ST segments, with average results from 83% sensitivity and 85 % positive predictivity (20). The heuristic rules generally implemented for detecting the QRS complex, and the beat waveforms, could be successfully substituted by Hidden Markov model (HMM). Andreao and others have preferred Mexican Hat wavelet transforms as most suitable, since it is fitting to peak detection. In addition, implementation of different frequency bands may provide better noise robustness (19). The beat segmentation process includes combination of the HMM models with the ECG waveform patterns. Algorithm has to provide waveform detection information in real-time. Ischemic episode detection The ST-segment amplitude is calculated all time a beat is identified and it constantly refers to the beat baseline. The beat baseline has been given by the PQ-segment level. The online beat segmentation stage has provided PQ and ST segment amplitudes. ST segment amplitude is gained from a reference point placed 80 ms just behind the J point (QRS complex end). In the case of sinus tachycardia (heart rate > 120 bmp), ST deviation is measured 60 ms after the J point. The mean value of 5 samples around the reference point has been retained as ST deviation. At every channel particularly, the ST amplitudes has been measured. From another side, the episode detection stage develops mutual ST amplitude information. It is obviously, two-channels highlight those episodes presenting difference at both channels. The ST-deviation function is related to the ST amplitude and the reference level of every channel. A simple Euclidian distance is subsequently implemented:

𝑠𝑡[𝑡] = √(𝑠𝑡1[𝑡] − 𝑟𝑒𝑓1)2 + (𝑠𝑡2[𝑡] − 𝑟𝑒𝑓2)2 since st[t] represents the ST-deviation function, st1[t] and st2[t] represent the smoothed ST-amplitude, and ref1 and ref2 the reference levels of channels 1 and 2 correspondingly. Conversely, mix of two-channel information is not always suitable, because some beats can been rejected in the stage before. That is the reason for some necessary improvements. At this exacting case, the ST-deviation function becomes:

𝑠𝑡[𝑡] = | 𝑠𝑡𝑗[𝑡] − 𝑟𝑒𝑓𝑗 |

Page 39: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

39

since i is the existing channel. The orientation levels have been measured over the first 180 beats. However, as a result of slow drifts in the ST-deviation function caused by no ischemic factors an adaptive orientation level is necessary. In order to adjust continuously the reference level values, an exponential average filter of 20 minutes time constant has been implemented. The variation is closed any time the ST-deviation function reaches 0.05mV. With implementation of a decision threshold the ischemic episodes have been identified. Following the ischemic episode definition projected by the European ST-T Database project, the beginning and end of a ST episode are complemented using a 0.05 mV threshold to place the first and the last beats (20). For this system is mandatory the rule that two consecutive episodes must have at least 120 s to be considered as divided. The integrated strategy is the main benefits of this system, providing a mix of complementary data of both channels. In case of lack of data in one channel, a single-channel analysis has been performed (20).

4.1.8. An ST segment analysis algorithm using the hidden Markov model Hidden Markov Model has been used by Langley and others (2003) in order to establish an algorithm and determine its correctness in distinction between ischemic and no-ischemic changes in the ECG ST-segment, using proficiently explained ECG data sets as a typical reference. The algorithm refers to the change in ST relative to a baseline ST level (ASr) provided by the PhysioNet database and based on simple level thresholding within particular period. The primary score by 82.3% (correctness 91.1 %, including sensitivity 99.0% and specificity 88.8%) has been achieved (21). The main goals of its algorithm development have been as follows: a) Production of a novel algorithm able to distinguish ischemic and no-ischemic ST changes in the ECG waveform and b) Determination of the correctness of the algorithm using proficiently explained ambulatory ECG data sets as a reference (21). Basic algorithm For the changes in ST (AST) has been implemented information provided by PhysioNet.The figure 21 represents an example of AST. Starting periods of the activity (TJ, for which the expertly classified ST changes (ischemic or non-ischemic) has been familiar and implemented in the progress of the algorithm. AST represents the difference in ST between the current ST level and the baseline level. At the optimization of the algorithm, have been implemented major components of ST provided by PhysioNet.

Figure 21. Example 24 hour AST recording from leaming data set.

The algorithm has been implemented on the principle that ischemic ST changes are large relative to non-ischemic changes since they have been upholded for a period of time. The algorithm categorized activities as ischemic if at the start of the activity ΔST was bigger than a threshold ΔST (Vtresh), and before the end of the activity AST sustained a minimum level (Vmin) for a period of time (Tmin).

Page 40: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

40

Figure 22. Illustration of amplitude thresholds and time intervals used in the algorithm.

The end of an activity (Te) has been described as the period at which ΔST fell below the threshold for additional time (Tthres).

Figure 23. The flow chart for the automatic classification The flow chart for the automatic classification of activities has been described in Figure 23. This essential algorithm provides outcome that have been highly sensitive (identified almost all ischemic activities) but not specific (variety of non-ischemic activities have been classified as ischemic). Number of threshold crossings There is an opinion that in ischemia ST changes would happen quickly with fewer crossings of the threshold voltage than artifactual ST changes. The amount of threshold level crossings (Ncross) for a particular threshold level (Vcross), such as further parameters have been measured for those activities classified as ischemic.

Page 41: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

41

Principal component analysis There is necessity for primary component analysis of the ST time series to be more sensitive to ischemic changes. Threshold levels have been implemented to the time series of the Mahalanohis distance from the first five principal components of the ST. Activities selected as ischemic by the fundamental algorithm, have been deselected as non-ischemic if in the primary element period series the threshold level (Vkltmin) is not be maintained for a period (Tkltmin,). Analysis A calculation has been conducted in terms of the sensitivity, specificity, accuracy and challenge score (amount of correct classifications -amount of incorrect classifications (%)), in order to develop the algorithms under different AST and time thresholds. Results The Table 5 represents all results for altering the values of Vmin, Tmin” and Tthres, since keeping Vthres = 50 pV. Figure 24 describes examples of AST for which correct and incorrect classifications have been conducted.

Vmin (μV)

Tmin (s)

Tthres (s)

Sensitivity (%)

Specificity (%)

Accuracy (%)

Score (%)

100 30 40 99.0 88.8 91.1 82.3

110 30 40 85.6 91.0 89.8 79.6

100 34 40 94.3 89.8 90.8 81.6

100 30 36 99.0 88.8 91.1 82.3

Table 5. Outcomes from the learning set to examine the consequence of varying three

variables.

Providing accuracy of close to 91% for both the learning and test data sets (test data score 81.4%), this algorithm has been developed and tested to precisely divide ischemic and non-ischemic ST changes (21). Despite the fact of a slight improvement in specificity (91% maximum) the addition of the primary components from the ST measurements even slightly reduced overall achievements. The outcomes reveal that the algorithm, based on the premise that ischemic ST changes is representative and useful, considering that it could reliably recognize ischemic ST changes in the ECG waveform (21).

Page 42: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

42

4.1.9. An algorithm of ST segment classification and detection Shen and others (2010) have developed a new algorithm of ST Segment Classification and Detection considering that ST segment is a significant element in ECG detection, particularly in myocardial ischemia and myocardial infarction (22). As a result of ST changes it may produce variety of difficulties of ST detection. Key Points Detection First of all it is worth to be mentioned that the R peak point, ISO point, J point, T peak point and Ton point are the major features in ST segment. The R peak represents the wave peak of QRS wave, the ISO point represents the original point of QRS. Also the J point represents the end of QRS wave, since the T peak point represents the wave peak of T wave and Ton point represents the original point of the T wave, as is shown in figure 24.

Figure 24. Key Points of ST Detection

At ST analysis the R peak point has the most significant role, in accordance of basis method. The wavelet difference technique has been developed in order to calculate the R peak point. First of all, implementing quadratic spline wavelet divides ECG in 5 layers, collect the low frequency part of 2 layer, and then perform a threshold to match up the value with the ECG in 2 layer, in case of bigger value of ECG than threshold, reserve them and a further would be canceled. Next one is to estimate the first order difference, in order to provide the pass zero point in every max-min couple since these zero-point passes are just the R peak point. The next step is detecting the ISO point and J point, with the same method but opposite direction. For ISO point, firstly select the max value point of one order difference as the reference point (RP). If this period is noised and hard to discover the fit point, a curve has been implemented to produce curve fitting to this interval, the fit method is least square method, since determination of the ISO point is provided by fit curve (22). Similar with the ISO, firstly pick up the min value point of one order difference as the reference point (RP), and then pick up the [RP+20, RP+100] as the J exist period, use the same way and select first point as the J point in ECG. The threshold is between 0.05~0.15, this fit for most of the ECG data.

Page 43: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

43

After determination of ISO and J point, the usual step is to measure the T peak point and Ton point. The duration of the QT period, the T wave end point would be summarized by following:

𝑇𝑒𝑛𝑑 = 𝑄𝑜𝑛 + 0.55 ∗ √𝑅 − 𝑅 Considering that the Ton point is the end of the ST segment and the original point of T wave, the different technique has been implemented to verify the Ton point, first pick up the point which 20ms after the J point (J point usually will occur offset for wavelet decompose and call this new point J20 point), and then compute the function of the straight line from J20 point to T peak point, known as L, the function is set up as following:

𝑦 =𝑦(𝑇𝑝𝑒𝑎𝑘) − 𝑦(20)𝑇𝑝𝑒𝑎𝑘 − 𝐽20 ∗ 𝑛 +

𝑦(𝐽20) ∗ 𝑇𝑝𝑒𝑎𝑘 − 𝑦(𝑇𝑝𝑒𝑎𝑘) ∗ 𝐽20𝑇𝑝𝑒𝑎𝑘 − 𝐽20

The next one is estimate the distance between the ECG and L from J20 point to T peak point, and get the point with maximum distance in all these points, considering this point as Ton point, the distance formula is by this formula No.3:

𝐷𝑖𝑠 =|𝑠𝑙𝑜𝑝𝑒 ∗ 𝑛 + 1 ∗ 𝑦(𝑛) + 𝐾√1 + 𝑠𝑙𝑜𝑝𝑒 ∗ 𝑠𝑙𝑜𝑝𝑒

Dis represents the distance from the point to line; K is the constant of function in formula 2. Determination of the ST Offset Level The J+X techniques has been implemented to identify the ST offset level, since the X milliseconds has been detected after J point, call this point JX and match up to the value of JX with ISO to terminate the offset level, the X is determined by formula No.4:

𝑋 =

{

80𝑚𝑠 𝐻𝑅 < 100𝑡𝑖𝑚𝑒𝑠/𝑚𝑖𝑛72𝑚𝑠 100 < 𝐻𝑅 < 110𝑡𝑖𝑚𝑒𝑠/𝑚𝑖𝑛64𝑚𝑠 110 < 𝐻𝑅 < 120𝑡𝑖𝑚𝑒𝑠/𝑚𝑖𝑛60𝑚𝑠 𝐻𝑅 > 120𝑡𝑖𝑚𝑒𝑠/𝑚𝑖𝑛

HR represents the heart rate, after the JX point has been identified; match up the value of JX point with the ISO point, to terminate the offset direction, as a result on formula 5:

Offset = y(JX) - y(ISO) Offset represents the offset level, y represents the value of the ECG, the judgment decisive factor is (within the case the value of K1 is -0.1 and K2 is 0.1): ○1) if the Offset<K1, which means “Lower”; ○2) if the Offset>K2, which means “Higher”; ○3) if the Offset belong to [K1, K2], which means “Normal”.

Page 44: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

44

Determination of the ST Type The next step is identification of the type of ST that includes both, one is straight line ST, the other is curve ST. The points from J20 to T peak as the analysis interval have been selected at Higher offset level while the points from J20 to Ton as the analysis interval have been selected during Lower and Normal offset. The original point of this interval is J20, and the end of this interval is T peak or Ton, here is unified called TE, the type judge method is distance method (21). The function of the straight line that joins the J20 and TE is named as KST, calculated as following:

𝑦 =𝑦(𝑇𝐸) − 𝑦(𝐽20)𝑇𝐸 − 𝐽20 ∗ 𝑛 +

𝑦(𝐽20) ∗ 𝑇𝐸 − 𝑦(𝑇𝐸) ∗ 𝐽20𝑇𝐸 − 𝐽20

In this case the value of threshold is 0.15. Verification of Concave or Convex of Curve Type is the next step. After verification of the type of ST segment, if the ST segment belong to curve type, the next step is verification of ST segment belong to concave curve or convex curve, if the ST segment belong to straight type, the next step is determining if it belongs to upward type, downward type or horizon type. In case of the curve belong to the concave, the entire curve is below the line that attaches the original and end point representing all the value of the curve is smaller than the line. In opposite, when curve belongs to convex, all the value of the curve is higher than the line. This fact could be implemented to determine the curve type. The concave and convex are identified as following: concave = N/M convex = P/M This curve belongs to concave in case of concave>0.7, representing more than 70% points lower than KST. At same manner, curve belong to convex in case of convex>0.7, representing more than 70% points higher than KST. In case of both concave or convex is more than 0.7, it looks like the ST has been noised, therefore a curve and do curve can be used in fitting for the ST segment (22). Determination of Slope Direction of Straight Type There is necessity for verification of the trend of the ST segment in case of ST belongs to straight type. In that case ST segment has a little deviation from the KST, therefore the KST can be used to replace ST to analysis. The calculation is shown in formula:

𝑆𝐾𝑆𝑇 =𝑦(𝑇𝐸) − 𝑦(𝐽20)𝑇𝐸 − 𝐽20

In case of SKST>k1, looks like that the ST segment is upward while in case of the SKST<k2, it looks like that the ST segment is downward, and in case of the k2<SKST<k1, it looks like the ST is horizon. In this case k1=0.15, k2= -0.15 have been selected.

Page 45: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

45

Result of ST Classification In ST segment pattern classification, the ST segment feature include three parts, which include the offset direction, determination of the ST type and the ST direction by measuring the slope of the fit line. The effectiveness of this new method has been confirmed with calculation of the error rate. After all, each database is a typical of ST segment pattern, for example in 105.dat, the ST segment is lower than ISO and shown in straight and horizon, in e0105.dat, the ST has increased and shown in curve and concave, in opposite, in e0515, the ST also has increased but in convex, in e0614 the ST segment is noised when a curve can be used to make curve fitting for the ST segment. In case of myocardial ischemia, the heart could not work usually if coronary atherosclerosis decreased blood flow to the heart, resulting with decreased oxygen supply, irregular myocardial metabolism even infarction. ST may speedily and precisely reveal the myocardial ischemia attack interval, its rigorousness, the contemporary standard if ST fit for the following: ○1 at JX point and nearby, ST shows in horizon or downward type; ○2 drop over 1mm or 0.5mV and continue over 1 minute; ○3 the attack episode is more than 1 minute; it is obviously the myocardial ischemia has occurred. Also, myocardial infarction may be noticed by ST change, since myocardial infarction has occurred, ST would demonstrates in convex type, and be increased until exceed T wave as a result of T wave inversion, ST would become wilder than usual. The connection between ST and myocardial ischemia or infarction has been analyzed whereas all obtained results are shown in Table 6.

Page 46: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

46

Data Expert Conclusion

Expert Diagnose

Offset Direction

ST Type Concave or Convex

Slope Error date %

100.dat Normal Straight Horizon

Normal Normal Straight Horizon 10.00

105.dat Lower Straight Horizon

Myocardial Ischemia

Lower Straight Horizon 16.67

E0104.dat Lower Straight Downward

Low-grade Myocardial Ischemia

Lower Straight Downward 13.33

E0105.dat Higher Curve Concave

Heavy Myocardial Infarction

Higher Curve Concave 3.33

E0515.dat Higher Curve Convex

Acute Myocardial Infarction

Higher Curve Convex 10.00

E0601.dat Higher Curve Concave

Low-grade Myocardial Ischemia

Higher Curve Concave 0.00

E0614.dat Lower Curve Concave (N)

Myocardial Ischemia

Lower Curve Concave (Noised)

13.33

E0704.dat Lower Curve Concave

Myocardial Ischemia

Lower Curve Convex 10.00

Table 6. Data test results

Page 47: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

47

Offset Direction

Type Concave/Convex Slope Direction

Higher

Curve Concave

Convex

Straight

Upward

Horizon

Downward

Normal

Curve Concave

Convex

Straight

Upward

Horizon

Downward

Lower

Curve Concave

Convex

Straight

Upward

Horizon

Downward

Table 7. ST Pattern Classification Summarize According to the interval divided ECG data has been divided in three groups with 10 minutes gaps. Analysis of ST type and real test result are shown in Table 7. According to the obtained results and analysis, this method is effective, that may be suit for most of the ST pattern recognitions and diagnose myocardial ischemia and infarction (22). Analysis the Process of ST Change In real time monitoring, ST change may confirm the patient has been attacked by myocardial ischemia or infarction. According to the test results doctor may conclude about the intensity and acuteness of ischemia or infarction. The ST change process test result is shown in Table 8.

Page 48: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

48

Data 0:00 5:00 10:00 15:00 20:00 25:00 30:00

100 Normal Straight Horizon

No Change

No Change

No Change

No Change

No Change

No Change

105 Lower Straight Horizon

No Change

No Change

No Change

ST great Noise

ST Noise

No Change

E0104.dat Lower Straight Down

No Change

ST Noise

ST Noise

No Change

No Change

No Change

E0105.dat Higher Curve Concave

ST up T up MI

ST up ST up ST up ST up ST up T up MI

E0515.dat Higher Straight Upward

No Change

No Change

ST down ST up Burst MI

ST down Revert

ST down

E0601.dat Higher Curve Concave

No Change

ST Noise

No Change

No Change

No Change

ST down

E0614.dat Lower Curve Concave

ST Noise

No Change

No Change

ST Noise

ST up ST down

E0704.dat Lower Curve Convex

ST up ST up ST down ST up T wave Notch

ST up No Change

Table 8. ST Change Process (“MI = myocardial infarction”)

4.1.10. An algorithm for ECG ST–T complex detection The major role of ECG T-wave onset detection is of a significant meaning for ischemia detection, particularly when it is based on the waveform convexity but not demanding for T-wave peak position. ST–T complex is responsive to interferences and T-wave has a huge morphological unpredictability. In this case, its feature points (onset, peak, and offset of T-wave, J-point) are very hard to be detected precisely (23). Therefore, Song and others (2011) have developed, a robust and efficient hybrid algorithm

Page 49: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

49

for ECG ST–T complex detection, using regional method for T-wave onset and offset detection. With implementation of function comparing method T-wave peak has been located. Based on R-wave peak and T-wave onset, has been developed a squeeze approach for ECG ST-segment detection (23). Such method has provided a good timeliness and robustness, easiness at its implementation in engineering and clinical detection. The accurateness of ST–T detection has reached more than 91%, without locating J-point and T-wave peak directly and it worked well for various T-wave morphologies. T-wave peaks have been positioned by function comparing technique based on onsets and offsets of T-wave. Supported by additional development and knowledge the proposed algorithm can be modified to feature point detection of P-waves in ECG. T-wave onset location Considering that the T-wave onset detection is of crucial meaning in ST–T complex extraction, the vertical T-wave has been used as an example for the next explanation. After the main waveform peak (known as Ri) of QRS complex has been positioned, the searching time [ka, kb] of T-wave onset requests to demarcate, so that T-wave onset is within this period without overlap with other waveforms (QRS and P-wave). t1 and t2 separately represent the period instants of T-wave onset and offset, so the T-wave length L = t2 − t1. The method of T-wave onset detection represents: an indicator Ak reaches its maximum value since the period instant k = t1, and therefore the period would be the T-wave onset. Within its development, a sliding window has been implemented, and its window width w satisfies 0<w< L. At every instant k, the indicator Ak is described as following:

𝐴𝑘 = ∑(𝑆𝑗 − 𝑆𝑘)𝑘+𝑤

𝑗=𝑘

There is a substitution of sk with s̄k, since s̄k represents the mean value of signal sk between k −p and k +p (equal to a smoothing window). Ak is the equivalent geometric object in the period [k, k+w]. Supported by Fig 25, the standard can be clarified spontaneously: with the same level width of Ak regions, Ak reaches its maximum value when k = t1. When the window (its width w < L) has been replaced to the left side, fraction of the area is covering the baseline as a substitute of T-wave, and Ak decreases.

Figure 25. A diagram of different Ak regions in different sliding windows.

Page 50: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

50

Figure 26. Typical morphologies of T-waves.

The projected process could be implemented to identify the onsets of other T-wave morphologies. The planned algorithm for T-wave onset detection is reviewed as following: (1) The sliding window width w and the smoothing window width p, where p _ w has been implemented. A threshold λ(λ > 1) for T-wave morphology categorization has been chosen. (2) Identify R-wave peak instant Ri in the i-th heartbeat. (3) Pick up the values of ka, kb for the searching period [ka, kb]. (4) For every time instant k = ka, ka + 1, . . ., kb in the i-th heartbeat, determine

𝑆𝑘̅̅ ̅ =1

2𝑝 + 1 ∑ 𝑠𝑗

𝑘+𝑝

𝑗=𝑘−𝑝

𝐴𝑘 = ∑ (𝑠𝑗 − 𝑠�̅�

𝑘+𝑤−1

𝑗=𝑘

)

5) Looking for k’, k’’, that are intermediate variables intending to discover the T-wave onset for biphasic T-waves.

𝑘′ = arg min𝑘𝑎≤𝑘≤𝑘𝑏

𝐴𝑘

𝑘′′ = arg min𝑘𝑎≤𝑘≤𝑘𝑏

𝐴𝑘

If 1𝜆<|𝐴𝑘′|

|𝐴𝑘"|< 𝜆 then T-wave onset in current heart beat is t1 = max(k’, k’’) otherwise

t1= argmaxk∈{k’, k’’}|Ak|i+1, and go back to step 2.

Extraction of ECG ST-segment A new method for ST-segment extraction has been developed as a result of the located T-wave onset Tbi and R-wave peak Ri. The time RTi is measured as RTi = Tbi − Ri, while the time [Ri + x, T bi] has been confirmed as ST segment, as following:

𝑆𝑇𝑖 = [𝑅𝑖 + 𝑥, 𝑇𝑏𝑖] =

{

[𝑅𝑖 + 0.4𝑅𝑇𝑖, 𝑇𝑏𝑖] 𝐻𝑅 < 100𝑏𝑝𝑚[𝑅𝑖 + 0.45𝑅𝑇𝑖, 𝑇𝑏𝑖] 100 < 𝐻𝑅 < 110𝑏𝑝𝑚[𝑅𝑖 + 0.5𝑅𝑇𝑖, 𝑇𝑏𝑖] 110 < 𝐻𝑅 < 120𝑏𝑝𝑚[𝑅𝑖 + 0.55𝑅𝑇𝑖, 𝑇𝑏𝑖] 𝐻𝑅 > 120𝑏𝑝𝑚

Page 51: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

51

since the transient heart rate has been identified by HR. In this case there is no impact over extraction of ST-segment by a variety of ST-segment morphologies. T-wave peak detection On this way has been developed the approach of T-wave peak detection. Considering the diversity of T-wave morphologies, there is a measure of the maximum value T max and minimum value T min of T-wave amplitude. In order to be positioned T-wave peak a function comparing process has been implemented (Figure 27). In order to fit the line T_ to be through T-wave onset and offset at the beginning, a linear equation has been proposed. In discrete period instants of the whole T-wave, the relationship T r was calculated on the next way

𝑇𝑟 =𝑁𝑜. 𝑜𝑓 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑡𝑖𝑚𝑒 𝑟𝑒𝑝𝑟𝑒𝑠𝑒𝑛𝑡𝑖𝑛𝑔 𝑇 − 𝑤𝑎𝑣𝑒 𝑎𝑚𝑝𝑙𝑖𝑡𝑢𝑑𝑒 𝑙𝑎𝑟𝑔𝑒𝑟 𝑡ℎ𝑎𝑛 𝑙𝑖𝑛𝑒 𝑇_𝑏𝑒

𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑡𝑖𝑚𝑒 𝑟𝑒𝑝𝑟𝑒𝑠𝑒𝑛𝑡𝑖𝑛𝑔 𝑡ℎ𝑒 𝑒𝑛𝑡𝑖𝑟𝑒 𝑇 − 𝑤𝑎𝑣𝑒

Furthermore, T-wave peak Tp was developed considering the following principle.

𝑇𝑝 = {𝑇_max 𝑖𝑓 𝑇_𝑟 > 0.5𝑇_min 𝑖𝑓 𝑇_𝑟 ≤ 0.5

Figure 27. A diagram of T-wave peak in different T-wave morphologies.

Experimental Results There is verification over seventy recordings in database LTST in order to verify the performance of the developed algorithm that included all T-wave morphologies.

𝑘𝑎 = {𝑅𝑖 + [0.5 × √𝑅𝑅𝑖] + 20 𝑖𝑓 𝑅𝑅𝑖 < 220𝑅𝑖 + [0.5 × √𝑅𝑅𝑖] + 25 𝑖𝑓 𝑅𝑅𝑖 ≥ 220

𝑘𝑏 = {𝑅𝑖 + [0.15 × 𝑅𝑅𝑖] + 30 𝑖𝑓 𝑅𝑅𝑖 < 220𝑅𝑖 + 80 𝑖𝑓 𝑅𝑅𝑖 ≥ 220

Page 52: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

52

Only six out of seventy recordings had shown a few errors in a small quantity of heart beats for ST–T detection (at ratio less than 95%) while the ratios of other recordings are more than 95% (23). The correctness of the developed algorithm has been more than 91%. Despite the fact that method is robust it is very proficient to baseline wandering, T-wave morphological variations, and acquisition noise.

4.2. Algorithms based on signal generation and digital filters Frequency components of the QRS complex are in the range of 10 Hz to 25 Hz. Therefore, almost all algorithms initially use filtering in this way by destroying the interference. This is usually done by the cascade connection of the low-pass filter and the high-pass volume filter, thus forming the bandwidth of the desired range. Some algorithms only use a high-pass filter. A high-pass filter can often be realized as a differentiator. This realization, in particular, highlights the steepness of the QRS complex, which greatly facilitates the detection of the QRS complex. For this, the first and second derivatives of the ECG signal are being used (10). In many algorithms, a combination of first and second derivations is often being used. A QRS complex detection produces a comparable output of a derivative or their linear combinations with a threshold. Usually this threshold is obtained in accordance with signal changes. By detection, we often detect some false QRS complexes, and therefore there are additional comparisons for the correct detection of QRS complexes. One of the algorithms suggests filtering the ECG signal through two different low-pass filters with different limit frequencies. The difference between the outputs of these filters would correspond to the signal at the output of a bandwidth band. This difference would be processed later, and this processing would lead to a reduction in low signal values and a small improvement in peaks. After this comes the decision phase where the threshold is formed based on the difference in the signal at the output of the filters. The second algorithm suggests that the filtered signal is divided into segments since each of them has 15 times the length. The maximum of each segment is sought, and it is further compared with the estimation of adaptive noise and the estimation of the adaptive peak. The decision whether it is noise or a peak is made based on the distance from these estimates, i.e. to which estimation the maximum segment is closer. QRS is detected in the segment where the maximum ECG and the value of the first derivative equal to zero occur at the same time.

4.2.1.A real-time QT interval detection algorithm (QRS detection) Slimane and others (2008) have developed a new real-time QT interval detection algorithm for automatically positioning the QRS and the offset of the T-wave where all results obtained are highly reasonable providing a sensitivity of 99.79% and a specificity of 99.72% (8). In order to develop the performance of the QT interval measurement algorithm, a set of n beats has been implemented at the start of 15 records from the MIT-BIH Arrhythmia Database that are then evaluated an analyzed, considering the error of only 10ms between the automatic and manual QT interval measurements. The overall period of depolarization and re-polarization of the myocardium considered from the start of the QRS complex to the end of the T wave, represents a QT interval (Figure 28).

Page 53: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

53

For that reason, primary in cardiology diagnosis is consistent determination of the limits of the QRS and T waves. Several factors such as heart rate, automatic nervous tone, electrolytes (especially calcium), drugs, age and sex of patient, and even sleep or insomnia have impact over the QY interval. As a result of a variety of types of noise that could be present in the ECG, signal detection of QT sometimes is really difficult. The muscle noise, artefacts due to electrode motion, power-line interference, baseline wander, and T waves could be considered as Noise sources.

Figure 28. A cardiac cycle of an ECG.

In order to improve the sensitivity Se and the specificity Sp and to make R-wave peak definition easier a QRS detector has been used. Figure 29 represents a block diagram of QT interval measurement algorithm. The algorithm is based on compound lead ECGC of two leads — the modified limb lead II and one of the modified leads V1, V2, V4, or V5.360Hz counts the sampling frequency with resolution 5 μV/bit.

Figure 29. Block diagram of our QT interval measurement algorithm.

S/N enhancement of ECG signal First of all there is necessity for enhancement of the signal-to-noise (S/N) ratio, that has been provided by the completion of a band-pass Butterworth filter, necessary to satisfy high-frequency muscle noise, 50Hz power-line interference, and baseline wander. The wanted passband to make the most of the QRS energy is about 1–20Hz.

Page 54: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

54

Nonlinear transformation After filtering, a nonlinear transform has been applied, since:

Y=Y1+Y2

where 𝑌1(𝑛) = {𝑥(𝑛) ∗ 𝑥(𝑛 − 1) ∗ 𝑥(𝑛 − 2), 𝑖𝑓 𝑥(𝑛) ∗ 𝑥(𝑛 − 1) ∗ 𝑥(𝑛 − 2) > 00, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

and 𝑌2(𝑛) = {𝑥(𝑛) ∗ 𝑥(𝑛 − 1) ∗ 𝑥(𝑛 − 2), 𝑖𝑓 𝑥(𝑛) ∗ 𝑥(𝑛 − 1) ∗ 𝑥(𝑛 − 2) < 00, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Y1 and Y2 are intended to divide the positive and negative peaks of the signal (Fig. 30/b). x is the existing complex lead (x(n) = ECGC(n)).

Figure 30. QRS detection algorithm processing steps

Derivative After nonlinear transform, a low-pass differentiator has been implemented in the signal Y to provide data in terms of changes in the signal slope Figure 30/c. It is given by

Z(n) = −y(n − 1) – 2 x y(n − 1) + 2 x y(n + 1)+y(n + 2)

Page 55: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

55

Low-pass filter The first-order low-pass Butterworth filter has been implemented in order to provide an exclusive maximum for every QRS complex (Fig. 30/d). The cut-off frequency counts −3dB is about 1Hz. R-position definition The highest slope in the QRS complex has the R wave. Therefore, the R position Rp has been identified as the zero crossing between Peak a (peak after) and Peak b (peak before), (see Figure 31/b). A pulse-code-modulated signal for each maximum detected has been generate as the next step (Figure 31/c).

Figure31. R-position definition

Figure 32.True R-position definition

The highest positive or negative peak at the initial 2 seconds of the signal, including T1 as the absolute value of this first peak and finally threshold TH = 0.05 ∗ T1 (5% of peak value) has been made (Figure 32). At once a period (typically 200 ms) is locate while the threshold level is exceeded. Within its interval, the highest positive or negative peak and this peak as the true R position have been considered.

Page 56: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

56

QRS onset definition The QRS onset has been considered as the start point of the Q wave (or R wave, when no Q wave is present). Then, the unique signal is distinguished to give the data of QRS complex slope (Fig. 33/b). The slope of the ECG wave is gained by the equations. The achieved signal has been again differentiated (Fig. 33/c). After the differentiated signal, the resulting signal with a first-order low-pass Butterworth filter has been filtered (Fig. 33/d). The cut-off frequency at −3dB is about 1 Hz. The QRS onset (Qb) has been declared as a maximum slope preceding the Pr location in the first-order low-pass Butterworth filtered signal (shown in Fig. 33/d).

Figure33. An QRS onset definition. (a) ECG signal; (b) output of the first differentiator; (c) output of the second differentiator; and (d) output of the first-order low-pass Butterworth

filter.

Figure 34. T-wave peak and T-wave end definition. (a) ECG signal and (b) output of the first-

order low-pass Butterworth filter (after two consecutive differentiation operations).

Page 57: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

57

T-wave peak and T-wave end definition A search window including limits as b-win and e-win, have been defined from the R position (Rp) as follows: (Figure 34/a): bwin(n) = Rp(n) + 0.1 ∗ RRav(n) ewin(n) = Rp(n) + 0.65 ∗ RRav(n). In order to prevent strong changes in the R-R interval, R-R interval average (RRav) has been implemented while Rp represents the R-wave peak position. The coefficients 0.1 and 0.65 are chosen empirically. The T-wave peak (Twp) has been defined as the highest or lowest value of the unique signal in the defined window (8). QT interval measurement After determination of the T-wave peak (Twp) and T-wave end (Twe), the QT time may be determined by subtracting the QRS onset period (Qb) from Twe:

QT = Twe – Qb It is obvious that QTP is the interval between the QRS onset and Twp, provided as follows:

QTP = Twp – Qb.

As a result of a number of consecutive steps: signal-to-noise enhancement, QRS detection, QRS onset, and T-wave end definition, has been developed a new real-time QT interval detection algorithm for automatically locating the onset of QRS and the end of the T wave (8). MATLAB environment under a Pentium 4 PC platform has been used for writing the programs. The results achieved by the QRS detection algorithm have been greater than those of the Pan and Tompkins method.

4.2.2. Pan J, Tompkins WJ, a real-time QRS detection algorithm A typical representative of the group of algorithms for the detection of QRS complexes derived from the signal derivation is an algorithm introduced in 1985 by Jiapu Pan and Willis J. Tompkins. The Pan-Tompkins algorithm successfully detected the 99.3% QRS complex from the signals taken from the MITBIH database (21). This algorithm reliably detects the QRS complex based on its width, amplitude and inclination. In the pre-processing phase, the ECG signal is first passed through the low-pass, and then through the high-pass filter, followed by the phase of differentiation, square and window integration. The algorithm belongs to adaptive algorithms, since the logic for detection contains thresholds that can change depending on the signal being processed. The QRS complex detection is very complex due both to the physiological difference of the QRS complex itself and to the additional noise within the ECG signal. Software detection of the QRS complex usually consists of three phases: linear digital filtering, nonlinear transformation and logic for decision making. The Pan-Tompkins algorithm considers all these phases. These phases are shown in Figure 35.

Page 58: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

58

Figure 35. Method of operation of the algorithm

It has been mentioned that this algorithm consists of three phases (23). This is the phase in which linear digital filtering is done, the phase in which the non-linear transformation and the decision-making phase are carried out. The linear digital filtering phase consists of a filter bandwidth, derivation and integrator. The nonlinear transformation phase consists of signal square signaling. The decision-making phase consists of techniques for finding thresholds and additional decision logic (24). Each of the above steps introduces a certain time delay. The part of the detection algorithm is divided into three phases. These are the learning phase 1, the learning phase 2 and the detection. The learning phase of 1 requires a time interval of about 2 seconds to initialize the threshold values required for detection. These thresholds are determined based on the noise peak values and the peak of the signal. The 2nd learning phase requests 2 heartbeats to obtain the values needed to initialize RR interval values and RR limit values. The RR interval is a time interval between two R peaks. The phase in which QRS complex detection is performed follows these two phases, and after that, impulses for each QRS complex are obtained (24). The threshold values and other parameters are constantly changing in this way, following the changes in the ECG signal. This algorithm uses two set of thresholds and each set has two thresholds. One set of thresholds is applied to the signal that emerged from the bandwidth, and the second set is applied to the signal that emerged from the integrator. The reason is that in this way the reliability of detection of the QRS complex in relation to the results that would be obtained by applying the thresholds to only one of these signals is increased. Using the bandwidth reduces the noise found in the ECG signal. In this way, the signal-to-noise ratio and the sensitivity of detection are increased. This approach reduces the number of false positive QRS complexes. As already mentioned, this algorithm uses two thresholds in each set of thresholds. Two thresholds are used to find the missed QRS complexes and in this way reduce the number of false-negative QRS complexes. One of these thresholds is half the second threshold. Threshold values are constantly changing as their values are calculated based on the previous values of the peaks of the ECG signal. The thresholds work in the following way. Based on previous signal values, the current threshold value is calculated, and this is the value of the higher threshold. The lower threshold is half the higher threshold. The tip that is next tested is tested at a higher threshold and if the peak value is greater than the threshold value, the QRS complex is detected. If 166% of the current RR interval passes without detecting the QRS complex in this way, then the lower threshold is applied from the point where we found the last QRS complex (24).

Page 59: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

59

In this way, we have to avoid having to remember data related to the past ECG signal that would require some kind of buffer, and this method requires a minimum number of calculations when using the search-back 5 technique. Unfortunately, this technique has its own bad side, which is that it reliably detects the QRS complex if the heart rhythm does not change rapidly. For some cardiac conditions where there is a sudden change in heart rate, it is not possible to detect missed QRS complexes. If this is the case, both thresholds are divided in half and then the QRS complex is detected. This increases the sensitivity of detection and prevents the detection of missed QRS complexes. When we manage to detect the QRS complex, 200 ms must pass until the next QRS complex can be detected. This limitation comes from the very heart because it represents the smallest possible distance between two beats. A condition where the heart has between 140 and 250 beats per minute or 2.3 and 4.1 beats per second is called supraventricular tachycardia. Physiologically, cases when heart rate is 4.1 times per second is very rare, therefore cases when the heart has 5 beats per second are impossible because of which we can freely conclude that when we detect the QRS complex in the next 200 ms, surely there will be no new QRS complexes. This way, we prevent the false detection of QRS complexes. Bandpass Filter As we already know, the ECG signal consists of a QRS complex, P wave, T wave, voltage-induced interference, disturbances that impart muscles when passing electrical impulses through them and interference caused by poor contact between the electrodes and the skin. This signal is measured by the frequency measuring 200 Hz. The ECG signal we process is a digital signal, and the filters to be used are digital filters. By passing this signal through the volume band filter, we are trying to reduce the impact of the above interruptions. The range we want to miss is from 5 to 15 Hz. Why are we interested in this range? We can find the answer to this question if we look at the spectrum of the strength of the ECG signal and its individual parts. It is obvious that most of the spectral power of the QRS complex lies in the range of 5 to 15 Hz. For filtering, there is a need of a bandwidth ranging from 5 to 15 Hz. At lower frequencies, there is interference caused by P and T waves and at higher frequencies of interference caused by power supply and muscular disturbances. The bandwidth is usually completed by the cascade connection of the low-pass filter and the high-pass filter. Pan and Tompkins have made a bandwidth filter in the workplace that misses the frequency range of 5 to 11 Hz, which they say "close enough to the desired range" and which should have less than 3dB in this range (Figure 36). The low-pass filter should pass the frequency signals from 0 to 11 Hz and at 11 Hz has a weakness of 3dB.

Page 60: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

60

Figure 36. Amplitude response or the digital bandpass filter.

Figure 37. An amplitude response of the digital derivative filter.

The transfer function of the high pass filter is:

𝐻(𝑧) =−1 + 32𝑧−16 + 𝑧−32

1 + 𝑧−1 The differential equation that describes this filter is:

y(nT)= -y(nT - T) + 32x(nT - 16T) - x(nT) + x(nT - 32T)

Page 61: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

61

The lower cut-off frequency is 5Hz with an increase of 32. In order to achieve the bandwidth of 5-15 Hz, a cascade connection of a low-pass and high-pass filter with integral coefficients is used (due to the possibility of implementation on simple microprocessor systems).A cascade connection is used to reduce the effect of a signal representing noise for QRS complex (signals that travel from muscle) T part of the ECG signal, frequency signals 60 Hz (24). Low pass filter with second-order transmission function:

𝐻(𝑧) =(1 − 𝑧−6)2

(1 − 𝑧−1)2 The differential equation that describes this filter is:

y(nT) = 2y(nT - T) - y(nT - 2T) + x(nT) - 2x(nT - 6T) + x(nT - 12T) The resulting cutoff frequency is 11 Hz with an increase of 36. In order to provide information about the inclinations that occur in the PQRST complex, it uses the copy is featured in 5 points. The function is:

𝐻(𝑧) =18𝑇 (−𝑧

−2 − 2𝑧−1 + 2𝑧1 + 𝑧2) The differential equation that describes this step is:

𝑦(𝑛𝑇) =18𝑇 [−𝑥

(𝑛𝑇 − 2𝑇) − 2𝑥(𝑛𝑇 − 𝑇) + 2𝑥(𝑛𝑇 + 𝑇) + 𝑥(𝑛𝑇 + 2𝑇)] Squaring the signal By squaring the signal (after the previously executed signal output) y (nT) = [x (nT)] 2 all the data become positive and the nonlinear signal amplification is entered. Integration of the signal A number of window functions are used to generate a waveform signal in addition to the already received information on the slope of the R part. The integration is done using the sums of the shifted window shape functions

𝑦(𝑛𝑇) =1𝑁∑𝑥(𝑛𝑇 − (𝑁 − 𝑘)𝑇)

𝑁

𝑘=1

since N is the number of samples contained in one window function. Selecting the number of samples N depends on the width of the window function that should be the same widths as the QRS complex with the largest width (optimum value). The N value of the optimal would cause the R of the wave part to be partitioned with the T part of the wave, and a lower value would lead to the emergence of the peaks (which would negatively affect the selection of

Page 62: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

62

detection thresholds). For a sampling frequency of 200 samples per second, the window function's width is 30 samples (150 ms). Figure 38 shows the relationship between the QRS complex and the integration window.

Figure 38. A relationship of QRS complex to the moving integration waveform. (a) ECG

signal. (b) Output of moving-window integrator. QS: QRS width. W: width of the integrator window.

Thresholds It has already been mentioned that this algorithm applies two set of thresholds and each set has two thresholds. The higher of the two thresholds is used for the first analysis and the second threshold is used if a certain time interval fails to detect the QRS complex with the first threshold. One set of thresholds applies to the peaks we received from the signal after the integrator. Thresholds are calculated from the following terms (24): SPKI(i) = 0.125 • PEAKI(i) + 0.875 •SPKI(i −1) NPKI(i) = 0.125 • PEAKI(i) + 0.875 • NPKI(i −1) THRESHOLDI1(i) = NPKI(i) + 0.25(SPKI(i) − NPKI(i)) THRESHOLDI2(i) = 0.5 • THRESHOLD1(i) PEAKI(i) represents the current peak, i.e. which we are currently comparing with some of the thresholds. SPKI(i) represents the peak of the signal. NPKI(i) represents an assessment of the peak of noise. THRESHOLDI1(i) represents a higher threshold. THRESHOLDI2(i) represents a lower threshold. Degree for detection Thresholds are constantly changing, following ECG signal changes. Two sets of parallel thresholds are used (the name increases reliability), each set has two thresholds again. One set of thresholds has been applied to the signal at the output of the bandwidth of the bandwidth, while the second set has been used for the signal at the output of the integrator. The value of the first de-calculated threshold is one half of the value of the other. Values of the following pair of thresholds are calculated on the basis of the previously obtained peak value of the ECG signal in the following way: the following occurs and the peak of the ECG signal is tested in relation to the higher threshold and if its value is greater The QRS complex is detected. If it passes 166% of the time from the current RR interval without detecting the new QRS complex, then it will take the value of the lower threshold to be reset, starting from the moment when the last QRS complex is located.

Page 63: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

63

For some cardiac conditions, including a sudden change in heart rate, it is not possible to detect missed QRS complexes. In this case, both thresholds are divided in half and then QRS complex detection is performed again. At this level, the sensitivity of detection increases. From the moment of detection of the QRS complex, it must pass 200 ms until the next QRS complex can be detected.

4.2.3. Algorithms for real time electrocardiogram QRS detection using combined adaptive threshold Despite the fact that huge amount of methods has been developed and implemented, supported by high percentages of correct detection, the crucial problem is still open particularly with focus to higher detection correctness in noisy ECGs. Therefore Christov (2004) has developed a real-time detection technique, based on comparison among total values of distinguished electrocardiograms of one of more ECG leads and adaptive threshold, including three factors: an adaptive slew-rate value, a second value that grow up since high-frequency noise takes place, and a third one proposed to prevent missing of low amplitude beats (25). Two adaptive algorithms have been proposed and developed by Christov as follows: real-time algorithm that means algorithm 1 detects at the present beat and pseudo-real time algorithm that means algorithm 2 has an RR interval analysis component in addition (25). Method The distinguished signals from L leads have been compared to the total value of a threshold MFR = M +F + R – a mix of three autonomous adaptive thresholds, including: • M – Steep-slope threshold; • F – Integrating threshold for high-frequency signal components; • R – Beat expectation threshold. Two algorithms have been proposed: Algorithm 1 detects at the existing beat. Algorithm 2 Pseudo-real-time detection with additional triggering of potentially missed heart beat in the last interval by RR interval analyses. Complex lead The algorithm works with a compound lead Y of numerous primary leads L. In cases of 12-standard leads, fusion of the three quasi-orthogonal Frank leads has been recommended first, thus shaping the compound lead as a spatial vector. The complex lead has been a result of:

𝑌(𝑖) =1𝐿∑𝑎𝑏𝑠(𝑋𝑗(𝑖 + 1) − 𝑋𝑗(𝑖 − 1))

𝐿

𝑗=1

since Xj(i) represents the amplitude value of the sample i in lead j while Y(i) represents the existing complex lead. Adaptive steep-slope threshold – M • Primarily M = 0.6*max(Y) represents set for the first 5s of the signal, since minimum 2 QRS complexes be supposed to take place. A buffer with 5 steep-slope threshold values is fixed:

Page 64: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

64

MM = [M1M2M3M4M5], since M1 ÷ M5 are identical to M. • QRS or beat complex has been identified if Yi ≥ MFR, • No detection is acceptable 200ms after the existing one. In the interval QRS ÷ QRS+200ms a new value of M5 has been computed: newM5 = 0.6*max(Yi) The predictable newM5 value may be converted into pretty elevated, if steep slope premature ventricular contraction or artifact occurred, therefore there is a limitation to newM5 = 1.1* M5 if newM5 > 1.5* M5. The MM buffer has been revived without the oldest element but together with M5 = newM5. M is estimated as a usual value of MM. • M is reduced in a period 200 to 1200ms subsequent the last QRS detection at a low slope, getting 60 % of its revived value at 1200ms. • After 1200ms M, has been still unchanged. Fig 39 represents the both ECG leads. Identified QRSs have been distinct with 'red O' on Lead 1. The total lead and the steep-slope threshold have been shown in Fig. 1b. Adaptive integrating threshold – F The incorporated threshold F has been proposed to increase the combined threshold if electromyogram noise is together with the ECG. Primarily F represents the average value of the pseudo-spatial velocity Y for 350 ms. With every signal sample, F has been updated with each signal sample, providing the highest of Y in the latest 50 ms of the 350 ms period and deducting maxY in the earliest 50 ms of the period (25). F = F + (max(Yin latest 50ms in the 350ms interval) - max(Yin earliest 50ms in the 350ms interval))/150 The manner F has been rationalized consider that not each sample in the period has been incorporated, but only the envelope of the pseudo spatial velocity Y. The weight coefficient 1/150 is mathematically obtained. Fig.40a represents both ECG leads. Fig 40b represents the pseudo-spatial velocity Y and the incorporated threshold. The acceptable exposure has occurred as a result of the rise of F (hence of MFR) at almost 0.2 mV. The beat composite has been implemented in the incorporation procedure, providing not possible a close recognition to the earlier compound.

Figure 39: Adaptive steep-slope threshold Figure 40: Adaptive integrating threshold

Page 65: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

65

Adaptive beat expectation threshold – R The beat expectation threshold R has been proposed to mutual work with heartbeats of standard amplitude, joined with a beat with miniature amplitude (including miniature slew rate, proportionally). It could be monitored for example in cases of electrode artifacts. Equally to the incorporated threshold protecting versus erroneous QRS detection, R has been protected versus 'QRS misdetection' (25). A buffer with the 5 last RR period has been rationalized at each new QRS detection. Rm represents the average value of the buffer. • R = 0V in the period from the last identified QRS to 2/3 of the projected Rm. • In the period QRS + Rm * 2/3 to QRS + Rm, R reduces 1.4 times slower than in the past discussed steep slope threshold (M in the 200–1200ms period). • After QRS + Rm the reduction of R has been blocked. The Figure 41 represents, the time-course of the beat expectation threshold R. The reduction of R (correspondingly MFR) at almost 0.2mV within the fourth QRS provides its recognition, without a complex in Lead 2, that goes to a two-fold reduction of the total lead amplitude Y (Figure 40/b).

Figure 41. Adaptive beat expectation threshold | Figure 42: Combined adaptive threshold

Combined adaptive threshold – MFR The mutual adaptive threshold is resulted by an amount of the adaptive steep-slope threshold, adaptive integrating threshold and adaptive beat expectation thresholds. (Fig. 42) MFR = M + F + R Algorithm 2: pseudo-real-time detection with additional triggering of eventually missed heart beat in the last detected RR interval All prior considerations relate to Algorithm 1, that identifies a beat at its occasion. Further examination for any missed heartbeat has been conducted by Algorithm 2.

Page 66: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

66

There is an explanation of its work in Fig 43. The fourth complex at the 15.2 s in Fig. 43/b could be missed as a result of the fact that, MFR is bigger than the total lead Y. The earlier RR period can be marked with t1 while the last – with t2 (Fig. 43/a). If t1 is not shortened, that has been checked by logic OR of the 2 conditions t1>Rm OR Rm-t1<0.12*Rm while in the same time t2 is fairly extended to fulfill the condition abs(t2-2*Rm)<0.5*Rm, the period is subjected to test for a missed complex. A check has been conducted on every primary leads since a sharp peak is searched (determined as a product > 4 μV of both signal differences giving one central and two lateral points 8 ms apart). If the check has been successful another one has been conducted for the amplitude of the total lead at that point, that could be larger than 1/3 of the average value of the buffer MM, in order to determine this point as a missed QRS complex.

Figure 43. Pseudo-real-time detection with extra triggering of eventually missed heart beat in

the last RR interval. Algorithm 2: Se = 99.60 %, Sp = 99.60 %. Algorithm 2 proposed by Christov has enhanced the sensitivity by 0.05 % (0.06 % for the typical evaluation) due to reduced amount of undetected beats. This outcome could be compared for example in recordings 109, 203, 210 and 223, since the further detected beats count 6, 9, 12 and 5 correspondingly (25). The performance of two algorithms particularly has been checked with the file A5001 from the AHA containing Rover- T premature ventricular complexes, very close to the earlier standard QRS complex (Fig.43a). A progress of 74 unnoticed by Algorithm 1 R-on-T complexes has been evaluated. The recognition of such premature ventricular complexes taking place at the interval of ventricular repolarization has been recognized as significant, considering potential risk of ventricular fibrillation triggering by R-on-T events (25).

Page 67: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

67

109548 out of 110050 annotated beats, have been really identified for Algorithm 1 and 109616 for Algorithm 2. The arithmetical results are: Algorithm 1: Se = 99.69 %, Sp = 99.66 %; Algorithm 2: Se = 99.74 %, Sp = 99.65 %. Both algorithms for real-time and pseudo-real time implementation, developed and proposed by Christov are adaptive, autonomous of thresholds with permanent values. Not considering of the resolution and sampling frequency used, both algorithms have been self-synchronized to the QRS steep slope and the heart rhythm. As a result of the combination threshold, the algorithms are almost not sensitive to electromyogram including similar high-frequency noise. The algorithms may work with one or more leads, supported by mutual lead signal obtained by the total values of the differentiated lead signals, resulting with higher arithmetical results.

4.2.4. No-adaptive algorithms (Balda and Okada’s methods) Typical examples of no-adaptive algorithms are Balda and Okada’s algorithms. Balda’s algorithm is based on the derivatives of the input signal x (n). Threshold θ is fixed for each signal, it is determined experimentally (26) - the standard value is θ = 0.5 - 0.8[mV]. First of all, two auxiliary functions y1 (n) and y2 (n) have been formed, and then y3 (n) as a heavy. Sum of these functions:

y1(n) = |x(n + 1) - x(n - 1)|

y2(n) = |x(n + 2) - 2x(n) + x(n - 2)|

y3(n) = A · y1(n) + B · y2(n)

The standard values of the weighted coefficients are A = 1:25, B = 1:15. The QRS complex is thought to occur at time n if the value of the signal y3 (n) is greater than the threshold at the moment n and the previous 5 moments, respectively in the interval n∈[n-5, n]. Characteristic signals are shown in Figures 44 and 45.

Page 68: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

68

Figure 44. Characteristic signals during processing of the ECG signal by the Balda algorithm

Figure 45. Characteristic signals during the processing of the ECG signal by the Balda algorithm

Signal processing with Okada algorithm consists of three steps: linear filtering, nonlinear filtering and determining the detection threshold (27). Linear filtering: The help functions y0 and y1 have been formed.

𝑦0 = 𝑥(𝑛 − 1) + 2𝑥(𝑛) + 𝑥(𝑛 + 1)

𝑦1 =18[𝑥(𝑛 − 3) + 𝑥(𝑛 − 2) + 𝑥(𝑛 − 1) + 𝑥(𝑛) + 𝑥(𝑛 + 1) + 𝑥(𝑛 + 2) + 𝑥(𝑛 + 3)]

Page 69: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

69

Non-linear filtering: The help functions y2 and y3 are formed.

𝑦2 = [𝑦0 − 𝑦1]2

𝑦3 = 𝑦2(𝑛) ∙ [ ∑ 𝑦2(𝑛 + 𝑘)8

𝑘=−8

]

2

Determining the threshold detection θ Threshold θ has been determined as θ = 1/8(max y3(n)). The QRS complex occurs at time n if the value of the signal y3(n) is > than the threshold θ. Characteristic signals during processing are shown in Figures 46 and 47.

Figure 46. Characteristic signals during processing of ECG signal Okada algorithm - linear

filtering

Figure 47. Characteristic signals during processing of the ECG signal Okada algorithm - non-

linear filtering

Page 70: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

70

4.2.5. QRS detection algorithms proposed by Friesen and others Friesen and others (1990) have developed a comparison of dozen QRS detection algorithms, based on: amplitude and first derivative, first derivative only, first and second derivative, and last but not the least the digital filtering. All results obtained by their research can propose a development of a more robust clinical instrument by providing the frontend signal processing more effective (28). Algorithm Selection Criteria There is no practical reason to perform a comparison among a large number of QRS detection schemes from the existing literature (31). Each algorithm in this case considers a particular scheme. However, each of them should be considered as an original and a generic adaptation of the fundamental concept. In this case few basic types of algorithms have been included with at least two variants of each type. The basic type is designated by a two-letter prefix “AF” for algorithms based on both amplitude and first derivative, “FD” for algorithms based on first derivative only, “FS” algorithms utilize both first and second derivative, and the last category was designated “DF” which refers to digital QRS pass filters (28). Algorithm Parameter Determination This research is based on the testing of algorithms based on first and second derivations (FS1 and FS2) and on digital filters (DF1 and DF2). The FS1 algorithm, ie the algorithm based on the first and second derivations, represents the simplification of the Balda algorithm for the detection of the QRS complex. From the ECG signal, the absolute values of the first and second derivatives are calculated, which afterwards are scaled and calculated together. Passing through this summed signal the threshold is requested, and when the threshold is satisfied, the following 8 samples are observed. The QRS has been identified if six of these 8 samples meet the threshold. FS2 algorithm is a derivative-based. The first and second derivatives are counted, and the maximum value of the signal is requested. The two thresholds are applied. One represents the 0.8 times the maximum value of the signal and the other 0.1 times the maximum value of the signal. When the first threshold is satisfied, the following six points are observed, and all must be larger or equal to another threshold in order to satisfy the QRS condition (28). Algorithms Based on First and Second Derivative The FS1 algorithm represents a simple modification of the QRS detection scheme presented by Balda. The total values of the first and second derivative are computed from the ECG as follows:

YO(n) = ABS[X(n + 1 ) - X(n - l ) ] 2 < n < 8189

Y l ( n ) = ABS[X(n + 2 ) - 2X(n) + X(n - 2 ) ] 2 < n < 8189.

These two groups are scaled and then calculated into:

Y2(n) = 1.3 YO(n) + 1 . 1 Y l ( n ) 2 < n < 8189. This group is scanned until a threshold is met or exceeded: Y 2 ( i ) 2 1.0. Once this happens, the next eight points have been compared to the threshold. The standard for detection of a QRS candidate has been achieved if six or more of these eight points meet or exceed the threshold.

Page 71: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

71

The FS2 algorithm has been modified from the QRS detection scheme proposed by Ahlstrom and Tompkins. The rectified first derivative has been computed from the ECG:

Y0(n) = ABS [X(n + 1) - X(n - 1)] 3 < n < 8188 The rectified 1st derivative is smoothed:

Y1(n) = [Y0(n - 1) + 2Y0(n) + Y0(n + 1)]/4 3 < n < 8188 The rectified 2nd derivative is calculated:

Y2(n) = ABS [X(n + 2) - 2X(n) + X(n - 2)] 3 < n < 8188 The rectified, smoothed 1st derivative is added to the rectified 2nd derivative:

Y3(n) = Y1(n) + Y2(n) 3 < n < 8188 The maximum value of this array is determined and scaled to serve as primary and secondary thresholds:

Primary θ = 0.8 max [Y3(n)] 3 < n < 8188 Secondary θ = 0.1 max [Y3(n)] 3 < n < 8188

The group of the calculated first and second derivatives is scanned until a point exceeds the prime threshold. In order to be classified as a QRS candidate, the next six consecutive points have to satisfy the secondary threshold:

Y3(i) > = primary threshold, and Y3(i + 1), Y3(i + 2), … , Y3(i + 6) > secondary threshold.

At the DF1 algorithm, the ECG signal is passed through a differential with a filter level of 62.5 Hz. Then a differentiated signal has been passed through a low-pass digital filter. Two thresholds, equal in amplitude, but of opposite sign, were used. The output of the NP filter is scanned to a point with amplitude greater than the positive threshold achieved. This starting point is a 160 ms long test area. Three conditions are tested, if any of the conditions are satisfied, the case is classified as a QRS candidate. If it subsequently falls below the threshold, it is classified as noise. The DF2 algorithm as well as the DF1 algorithm, is based on digital filtering. Its work is based on a "moving average" filter in three points, and the output from this filter is passed through a low-pass filter variable width t. Then there is a calculation to the square of the difference between the "moving average" and the low-pass filter output, with an arbitrary constant m (the test shows that the best results are achieved with m = 3). In order for the candidate to be taken for QRS, the determined threshold must be satisfied again. The implementation of all the described codes in the MatLab programming language has been identified with an interference algorithm. Each of the codes has been tested for all types of interference with different percentages of silence: 20, 40, 60, 80 and 100%. Previously, the exact number of QRS complexes has been identified, and the results have been recorded in the tables as the percentages of correctly detected QRS complexes with different levels of interference.

Page 72: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

72

Public network

Algorithm Interference

20% 40% 60% 80% 100%

FS1 100% 50% 50% 25% 0%

FS2 87.5% 100% 100% 100% 93.7%

DF1 100% 100% 100% 100% 100%

DF2 100% 100% 100% 100% 100%

Table 9. Results of the interrogation of the city network From the table 9, its visible that digital filter-based algorithms for public network interference are more powerful than derivatives-based algorithms. Thus, DF1 and DF2 detected all complexes with 100% efficiency, while FS1 was the most successful by detecting all QRS complexes with only 20% interference.

EMG

Algorithm Interference

20% 40% 60% 80% 100%

FS1 93.75% 87.5% 68.75% 62.5% 81.25%

FS2 68.7% 37.5% 43.7% 50% 75%

DF1 100% 81.25% 62.5% 68.75% 81.25%

DF2 100% 100% 87.5% 87.5% 62.5%

Table 10. Results of interference testing due to muscular contraction Electromagnetic interference represents a problem for all algorithms, but DF1 and DF2 again show the superiority of FS1 and FS2 algorithms.

Page 73: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

73

Breathing

Algorithm Interference

20% 40% 60% 80% 100%

FS1 100% 100% 100% 100% 100%

FS2 100% 100% 100% 100% 100%

DF1 100% 100% 100% 100% 100%

DF2 100% 100% 100% 100% 100%

Table 11. Breathing disorder Breathing disorders do not represent a problem for any of the algorithms.

Movement

Algorithm Interference

20% 40% 60% 80% 100%

FS1 100% 100% 100% 100% 100%

FS2 100% 93.7% 0% 0% 0%

DF1 100% 100% 100% 100% 100%

DF2 100% 100% 100% 87.5% 100% Table 12. The random movement is only a problem for the FS2 algorithm, while others have

achieved satisfactory results. According to the results of testing the given algorithms, it is obviously that algorithms based on digital filters are superior to those based on derivatives, although none of them are individually superior to all applied disturbances (29).

4.2.6. A generic algorithm for QRS detection Poli and others (1995) have proposed a generic algorithm for QRS detection, with particular focus on to the rest of the signal by polynomial filters and compared to an adaptive threshold. The examinations have confirmed 99.60 % sensitivity (Se) and 99.51 % specificity (Sp) with the MIT-BIH Arrhythmia Database (30). The proposed method has been inappropriate in real time. One of the most commonly addressed goal in ECG-signal processing for the last 20 years, has been QRS detection. Poli and others has developed two mutual optimized modules including a new class of optimum QRS detectors which proficiently face noise, artefacts and unpredictability of ECG morphology by implementation of nonlinear processing and/or sub-sampling, and by conducting the improvement and recognition modules cooperate at their finest. The modules are considered by genetic algorithms, providing a successful exploration of the finest parameters in both discrete and continuous spaces.

Page 74: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

74

Genetic algorithms Genetic algorithms (GA’s) represent optimization and investigate actions stimulated by genetics and the procedure of an assortment where the persons of a population which are fitter with value to the surroundings has a tendency to carry on and replicate longer time than the others. GAS reproduce, in a relatively simplify manner, the actions outlined above to provide enhanced solutions (individuals) for the issue (30). Method A polynomial filter has been implemented as first module of the detectors, which improves the QRS complex, including a very small number of input samples that can be selected by the GA for maximum efficiency. The second module is a plain, adaptive maxima detector with spurious-peak subtraction. The parameters of the filter and the detector are optimized in terms of the performance criterion connected to the amount of right detections on a set of reference ECG signals provided from the MlT-BM Arrhythmia Database (30). The Polynomial Filter In polynomial filters, the output signal yi at time i is the value taken by a polynomial of order M of a set of N input samples {xi - d1, xi - d2, … , xi - dn}

𝑦𝑖 = ∑ ∑ ∙∙∙𝑀

𝑘2=0

∑ ,𝑀

𝑘𝑁=0

𝑀

𝑘1=0⏟ ∑𝑘𝑗<𝑀

𝑎𝑘1𝑘2 …𝑘𝑁𝑥𝑖−𝑑1𝑘1 , 𝑥𝑖−𝑑2

𝑘2 … 𝑥𝑖−𝑑𝑁𝑘𝑁

where dj’s are delays with respect to time i. The maxima detector A plain algorithm has been proposed that can identify the maxima of the filter output (30). In order to prevent fake identifications of presence of noise, QRS-like artefacts, and multi spike filter responses, only the "a that have an amplitude greater than a threshold Y since there is no fall within a refractory period of C samples after the last QRS have been identified. To handle with the variability of the ECG signal, a variation scheme has been implemented since Y, primary set to a permanent value Y start, impulsively reduces exponentially toward 0, providing a start of detection process even in the piece of ECG signals with a very small amplitude.

{𝑌0 = 𝑌𝑠𝑡𝑎𝑟𝑡 𝑌𝑖 = 𝑔[(1 − 𝛼)𝑌𝑖=1 − 𝛽𝑧𝑖−1(𝑌𝑖−1 − 𝛾𝑦𝑖−1)]

where g(x) = max{Ymin, min[Ymax, x]} is a clipping function which makes the adoption scheme more robust by keeping the threshold within the predefined range [Ymin, Ymax], α is the decay rate, and β is a parameter which controls the speed which Yi moves toward the target value γyi-1.

Page 75: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

75

Genetic Design The design of such a QRS detector needs the description of the parameters of the polynomial filter, including the selection of its coefficients and the parameters of the "a detector. Part of them has been created by the human designer, while the others have been selected by a genetic algorithm. The amount of options per sample has been influenced by the order of the polynomial and the number of input samples in order to provide the maximum efficiency. Conversely, performing a small amount of samples does not mean that the filter would perform on a short tract of the ECG signal, as the delays dl ,… , dN may be chosen by the GA. Commonly, the coefficients ak1k2…kN of the polynomial filter and the parameters of the detector would constantly experience genetic optimization, except ao . . 0 , that would be placed it to zero. After identification of the parameters, there is a need for determination of a suitable fitness role (30) that is provided with the following fitness function:

f = fmax - (FP2 + FN2) since fmax is a regular such that f ≥ 0 for any set of parameters. Experimental results In this case three classes of filters for QRS improvement have been measured: one for which a lot of design strategies and instances exist (FIR filters with repeated taps), one for which just a few design methods and instances exist (FIR filters with selected samples), and one for which there is no optimization strategy and example exists (quadratic filters with selected samples). In this case the filters and the maxima detectors that have been achieved, may be considered the real experimental results. The QRS detectors on the 48 records of the MBAD have been checked in order to evaluate their performance and compare them to further QRS detectors (30). The training set for the assessment of the fitness function has been proposed by accidentally picking 10 10-s tracts of the ECG from the primary channel of every one of the 48 30-min records of the database. Thus, the training set has included 5981 beats out of almost 110000 of the entire database. Quasi-Linear Filters with Consecutive Samples The selected M = 1 in (1) direct to a linear FIR filter. Unfortunately, that type of filter cannot create a positive peak both in the presence of the positive R waves of standard QRS and the negative R waves of irregular QRS complexes. Therefore, the quasi-linear filter achieved by taking the total value of the output of the linear filter has been created. In order to provide high effectiveness, the amount of input samples has been set to N = 10.

Page 76: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

76

Filter Detector

Parameter Value Parameter Value

a1000000000 -7.13024 C 25 (208ms)

a0100000000 -7.94744 α 0.00216

a0010000000 3.04609 β 0.50137

a0001000000 4.77475 γ 0.93127

a0000100000 9.22591 Ystart 9.80099

a0000010000 7.31803 Ymin 5.16208

a0000001000 9.37990 Ymax 13.24999

a0000000100 -8.26923

a0000000010 -9.57643

a0000000001 -0.62212

Table 13. Parameters of the optimum QRS detector base on a Quasilinear filter with

consecutive samples Table 13, represents the optimum filter and detector provided by the genetic algorithm, including the impulse reaction of the filter earlier than modification. The sensitivity and positive predictivity of the detector on such records have been more than 99.8%. As a result of noise and alterations enhancement the performances of the detector have been reduced easily (30). Quasi-Linear Filters with Selected Samples Supported by the almost same structure with the previous filters, the only difference at Quasi-Linear Filters with Selected Samples are the delays dl, dz, ... , d~ undergo genetic optimization. Variety of equivalent parameters: {dl, Adz, Ad3, . '. , A ~ N ) has been used in order to prevent multiple selections of the same sample . The interruption of every sample has been resulted by

di = di-1 + Δdi + 1 Quadratic Filters with Selected Samples The selected A4 = 2 in (1) directs to quadratic filters, providing a permanent term, N linear terms and (N + 1) ND quadratic terms. With implementation of quadratic terms, the correlation between samples has been considered as well. The authors have implemented the enormously simple case of a quadratic filter with N = 3 taps and not to rectify the output of

Page 77: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

77

the filter. Such a selection its provides the amount of activities per sample pretty small, obtaining just nine multiplications and eight additions per sample. However, the bigger total values of the coefficients of the quadratic terms designate that they are more imperative in shaping the output of the filter. By analyzing the signs of such coefficients, the terms of shape x2i-di , can been seen as constantly positive, while the terms of shape xi-djxi-dk with j ≠ k have been typically negative. Regardless of the reduced amount of data available to this filter (only 30-60%) with esteem to that fed into the quasi-linear filters, the entire amount of errors is just 11% as a result of the utilization of the correlation among samples. Performance Comparison Comparison of the performances of different QRS detectors is not easy as the detectors described in literature have been tested on different ECG databases. The differences existing in the databases as to the number Q of QRS complexes, the ratio between normal and abnormal beats, and the intensity and frequency of artifacts make it difficult to perform a fair comparison on the basis of reported performances only (30). Poli and others have proposed and tested on the MBAD the detector designed by Engelse and Zeelenberg and the one proposed by Okada in order to provide the minimum amount of errors E on the entire database. Table 14, provides a summary of the outcomes achieved.

Paper Database S% PP% Q

12 CSE 99.99 99.67 14292

6 CSE 99.38 99.48 14292

2 MIT-BIHa 99.76 99.56 116137(?)

13 MIT-BIHa 99.69 99.77 109267

4 MIT-BIHb 99.84/99.09 99.61/98.59 2572/1763

5 AHAc 99.71 99.72 55689

15 other 99.96 99.94 4990 aVentricular filter exclude from record 207 bRecords 105 and 108 cRecords1001-1010, 2001-2010

Table 14. Performance of some QRS detection algorithms on different ECG databases

It is obvious that genetic algorithms have created a great opportunity for optimization of the parameters of the maxima detector and the coefficients of the filter in terms of a particular standard: minimizing the amount of misdetections.

Page 78: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

78

4.3. Algorithms based on neural networks Artificial neural networks are widely applied in nonlinear signal processing, classification and optimization. In many applications, their performance has shown superiority in relation to classic approaches. In terms of QRS detection, the neural network is used as adaptive nonlinear predictors. Their goal is to predict the baseline value of the signal based on its previous values (13). Since the ECG signal essentially consists of non-QRS complex components, the neural network converts to a point where it excellently predicts non-QRS complex segments. Segments with rapid changes, such as QRS segments, are therefore poorly predicted, resulting with an increased prediction error. Therefore, in places where there is increased prediction error, we have the location of the QRS complex (10). The main question is to how to evaluate which QRS complex detection algorithm is better than others. The sensitivity and precision are two basic parameters to evaluate an algorithm. They are computing with formulas (10):

𝑆𝑒 =𝑇𝑃

𝑇𝑃 + 𝐹𝑁

𝑃 =𝑇𝑃

𝑇𝑃 + 𝐹𝑃 since Se is sensitivity and P precision, TP is the number of real QRS complexes, FN number of false negative QRS complexes, and FP number of false positive QRS complexes. For the detected QRS complex we can conclude it is false positive when the QRS complex is detected in a place where it is not present. For the QRS complex we can conclude it is falsely negative when the QRS complex is not detected but it should be. It is necessary to test the algorithms on a standard ECG signal base.

4.3.1. Ischemia detection via ECG Using ANFIS Gharaviri (2008) has developed an adaptive neuro-fuzzy interface system (ANFIS) classifier for automated detection of ischemic episodes resulting from ST-T segment elevation or depression. Supported by the European ST-T database, the performance of the method has been monitored, particularly in terms of beat by-beat ischemia detection and in terms of the detection of ischemic episodes. The algorithm has been exploited to cluster and then train the ANFIS classifier. Resulting with the average ischemia episode detection sensitivity from 88.62% and specificity from more than 99.65%, it algorithm could be implemented in electrocardiogram (ECG) processing in cases where reliable detection of ischemic episodes is mandatory (18). The proposed clustering process is based on fuzzy c-means clustering (FCM) algorithm. The most important difference among fuzzy c-means algorithm and the others is that every sample may fit to all of clusters with the level of belongingness specified by membership level between 0 and 1 (18). For the membership matrix U is acceptable to have fundamentals with values between 0 and 1.

Page 79: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

79

As already has been mentioned a fuzzy c-means clustering algorithm and an ANFIS as a classifier have been included, while various additional implementations such as sequential clustering and two–threshold sequential clustering for clustering method and feed forward neural networks with multiple hidden layers and neural networks based on Radial Basis Function (RBF) have been discovered. At the end of the case the projected clustering and classification algorithms have achieved the best performance, while enhanced sensitivity could be achieved with implementation of SVM classifier or combined classifiers. Material and methods Implemented 2h-long recordings digitized at 250 Hz, have been aimed for the evaluation of algorithms for ischemia analysis based on ST and T wave changes. The database has included 90 continuous two channel records. The leads used included modified leads V1, V2, V3, V4, and V5 and modified limb leads MLI and MLIII, including at least one ST or T ischemic episode provided by each record. Particularly, for the ST episode annotations, the developers used the following criteria:

1) ST segment deviations have been considered in terms of a reference normal waveform chosen from the first 30s of every record.

2) Capacity of ST deviation has been considered 80 ms after the J-point or in the case of tachycardia 60 ms after the J-point.

3) ST episodes must include a period of at least 30s during that the total value of the ST deviation is no less than 0.1 mV.

4) The start and the end of every episode have been interpreted looking for backward and forward, correspondingly, from the ST episode, until a beat is establish with total ST segment deviation less than 0.05 mV. Descriptions and Training Sets Figure 48 represents the wide-ranging arrangement of the developed method. Digital filters have been included for R peak, S point, and J point detection wavelet method and for noise cancellation and artifact rejection an after that each ST segment has been extracted, since every ST segment samples have been minimized into half by separating the ST segment samples into consecutive couple. This technique improved both feature extraction and classifier’s training process without any consequence on its categorization accuracy (18).

Figure 48. General configuration of the system

Page 80: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

80

Signal preprocessing The major role of the ECG preprocessing has been to formalize the ST-segment in order to perform an input appropriate for the classifier without defeat of data. Therefore, a reduction of noise and artifacts has been mandatory, provided by digital filter as Butterworth low pass filter. For detection of ischemic episodes with high sensitivity and specificity, the correct R peak, S point, and J point detection has been mandatory, provided by Pan-Tompkins and Derivative-based methods. Considering the issues with its accurateness a wavelet method for R peak, S point, and J point has been implemented where ECG signal is decomposed to S = 21 – 24 scales by WT algorithm using wavelets. In S =23 scales, R wave has been with the maximum amplitude since the high frequency noises have been reduced decreased, including the low frequency noises, so the R wave has been located at S=23 scale. S wave is high-frequency low-amplitude, and its energy is typically at S = 22 scale. So, the S wave has been located at S = 22 scale. Commonly, low-frequency and slow-changing T wave is under impact of low amplitude and high frequency disturbances, that may be avoided at larger scales such as S = 24, S = 25. So it has been located at S = 24 scale. R peak extraction is based on the link among the signal singularity and its WT, QRS complex wave corresponds to min/max germinations at S = 23 scale, and R peak corresponds to the zero-crossing point of the min/max germinations with a fixed delay. ST segments consist of S peak, J point, the start of the T wave, T peak and ST voltage. S peak is located at the first downward peak after the zero-crossing point of R peak at S = 22 scale. T peak represents the first zero-crossing point of min/max germinations after R peak at S = 24 scale. An issue has been created by the variability of the standard template in the ECG of the same patient, provided by calculating the average of 10 first standard ST segments and it has been implemented as a standard template. Let ỹkn = {yk1, yk2, … , ykg} be the sequence of the samples of the kth ST segment. The normal template ñn = {ñ1, ñ2, … , ñg} was constructed for each ECG as the average of the first ten normal ST segments is as follow:

𝑛𝑖 =∑ 𝑦𝑘𝑖10𝑘=110

The averaging process also reduces the effects of noise. Further, it standardizes the algorithm and renders it insensitive to differences between leads and among patients. If {yki} is the sequence of the kth ST segment samples, the correlation coefficients between {yki} and {ñi} are used as features for our study. Feature extraction and selection The cross correlation among the standard template and each ST segments have been used as elements. It has been shown in the following formula:

Ryk,n(m) = E{nn+my*kn}

Since ỹkn is the n-th sample of kth ST segment, ñn is the nth sample of the normal template, ȳk

is the mean of the kth. Because of lot of feature dimensions, a PCA (principle component analysis) dimension reduction algorithm has been implemented.

Page 81: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

81

Clustering Because of much more usual patterns than the ischemic patterns, classifier has to be able to distinguish the ischemic beats from the normal ones and therefore clustering algorithm has been implemented based on fuzzy c-means clustering (FCM) algorithm. Its normalization stipulates that the summary of level of belongingness for information set constantly will be equal to unity as it is shown in the following formula:

∑𝑢𝑖𝑗 = 1, ∀𝑗 = 1,… , 𝑛𝑐

𝑖=1

Another technique has to be implemented in order to determine the number of clusters.

𝐽(𝑈, 𝑐1, … , 𝑐𝑛) = ∑𝐽𝑖 = ∑∑𝑢𝑖𝑗𝑚𝑑𝑖𝑗2𝑛

𝑗=1

𝑐

𝑖=1

𝑐

𝑖=1

where uij is between 0 and 1, c is the number of clusters, ci is the cluster center of fuzzy group i, dij = ||ci - xi|| is Euclidean distance between ith cluster center and jth sample (xj, j = 1, … , n), and m∈[1, ∞) is a weighting exponent. By differentiating J̄(U, c1, … , cn) with respect to all its input arguments, the necessary conditions for the previous equation to reach its minimum are illustrated below :

𝑐𝑖 =∑ 𝑢𝑖𝑗𝑚𝑛𝑗=1 𝑥𝑗∑ 𝑢𝑖𝑗𝑚𝑛𝑘=1

𝑢𝑖𝑗 =1

∑ (𝑑𝑖𝑗𝑑𝑘𝑗)

2(𝑚−1)𝑐

𝑘=1

The subtractive clustering has been implemented in order to provide the necessary number of clusters. In that case the FCM algorithm has been applied. Concept of ANFIS classifier Adaptive neuro fuzzy interface system that is referred to ANFIS represents a type of adaptive networks that is functionally similar to fuzzy interface systems (18). Learning Algorithm The hybrid algorithm has been implemented to this classifier, that means functional signals go forward up to layer 4 and the consequent parameters have been recognized by the least squares estimation. In the backward pass, the error propagates backward and the premise parameters have been improved by the gradient descent. Membership function ( (x) Ai μ ), which has been implemented in this classifier, has bell-shaped function, with one and zero of the maximum and minimum of this function, presented as follows:

Page 82: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

82

𝜇𝐴𝑖(𝑥) =1

1 + |(𝑥 − 𝑐𝑖𝑎𝑖)2|𝑏𝑖

Both membership functions have been applied in this classifier for every input. The following Figure 49 represents the structure of the ANFIS classifier.

Figure 49. The topology of ANFIS classifier.

Results An absolute amount 158400 beats, that have been achieved by the European ST-T database, have been applied for the evaluation of developed classifier that included 284 ischemic beats, while additional beats are used as normal ones. 60% of normal beats in every file have been applied for clustering procedure. Following the Euclidean distance among all cluster centers and 60% of all beats (normal and abnormal) in each file have been applied as an input for classifier’s training measures (18). For each patient, as a result of the classifier test, the sensitivity and specificity have been calculated via the following equations and correspondingly:

𝑆𝑒(𝑠𝑒𝑛𝑠𝑖𝑡𝑖𝑣𝑖𝑡𝑦) =𝑇𝑃

𝑇𝑃 + 𝐹𝑁

𝑆𝑝(𝑠𝑝𝑒𝑐𝑖𝑓𝑖𝑐𝑖𝑡𝑦) =𝑇𝑁

𝑇𝑁 + 𝐹𝑃 where a properly identified ischemia segment is known as a true positive (TP); an erroneously identification of an Ischemia segment as a standard segment is known as a false negative (FN); an erroneously identification of a standard segment as an ischemia segment is known as a false positive (FP); and a correctly identification of a standard segment as a standard segment is known a true negative (TN). Table 15 on the following page, represents the classification outcomes for the files of the European ST-T database, where the algorithm was monitored, including indicators of the entire characteristics of the algorithm.

Page 83: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

83

File name Healthy beat

Number

Ischemic beat

Number

Train accuracy

%

Test Accuracy

%

Sp% Se%

E0103 7211 15 100 100 100 100

E0105 6626 33 100 97.59 98.70 83.33

E0107 7014 12 99.71 98.38 98.36 100

E0111 7523 6 99.71 95.64 100 82.25

E0113 8927 39 100 96.62 100 78.92

E0121 10613 6 100 98.21 98.18 100

E0123 9168 9 100 98.30 100 87.93

E0125 9061 12 100 98.38 100 89.56

E0127 9390 21 100 95.77 98.55 73.45

E0147 6370 15 100 99.71 100 95.39

E0151 7544 6 100 100 100 100

E0203 10061 12 99.42 98.38 100 75.5

E0303 8866 3 100 98.11 100 69.44

E0305 9379 6 100 98.21 100 73.44

E0405 11087 17 100 98.50 100 95.45

E0411 9466 6 100 100 100 100

E0413 7487 6 100 100 100 100

E0415 11376 9 100 98.30 100 84.56

E0417 9228 9 100 98.30 100 84.56

E0501 7752 18 99.71 95.58 98.41 76.05

E0515 10692 17 100 100 100 100

E0601 8762 6 100 100 100 100

Table 15. The classification results of European ST-T database

Page 84: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

84

5. Performance evaluation and comparison In order to make a comparison of algorithms where the criterion is the reliability of the QRS complex detection, the results of the reliability of the detection results must be grouped into one of three groups:

1. Reliable results - the algorithm has been tested on the entire standard ECG signal base,

2. Less reliable results - the algorithm has been tested on the part of the standard ECG database signal,

3. Unreliable results – the algorithm has been tested on a non-standard ECG signal basis. Table 16 highlights the classification outcome for ischemia detection applied on the files of the European ST-T database for a range of algorithms. The sensitivity and specificity indices for detecting ischemic episodes are reported in the same table. The detection of ischemia episodes is far more successful than that of ischemic beats, since for an ischemic episode to be detected we must have at least 30s of consecutive ischemic beats. The presence of various isolated incorrectly identified ischemic beats does not have an impact over correct detection of an ischemic episode (6) since grouping techniques have been used.

Reference Ischemia episode

sensitivity (%) Ischemia episode predictivity (%)

Maglaveras et al. 88.62 78.38

Jager et al. 83.8 87.1

Taddei et al. 84 81

Table 16. A comparison of the classification results for ischemia detection using different

algorithms Even if an algorithm can be labeled as less reliable, it does not mean that the algorithm does not work well but is equally reliable throughout the standard ECG signal base. It happens that the algorithm is perfectly detecting QRS a complex in signals that are very disturbed by noise but fails to detect the QRS complex in a signal that is little or no disturbed by the noise. Table 17.a, reports data for algorithms where the criterion is the reliability of detection of QRS complex (10).

Page 85: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

85

Reliability Entire standard base Part of standard base Non-standard base

More than 99% Alfonso Bahoura Pan&Tompkins Poli Kohler Li Inoue&Miyazaki

Gritzali Hu Kohama Ruha Sahambi Vijaza Xue

Belforte Dobbs Fischer Thakor&Webster Yu

95%-99% Suppappola&Sun Coast Kadambe

Sornmo Udupa&Murthy

90%-95% Papakonstantinou Trahanias

Less than 90% Ligtenberg&Kunt

Table 17.a Comparison of algorithms where the criterion is the reliability of detection of QRS

complex.

Additionally, the computational load is a not negligible aspect when one has to choose the best algorithm to deploy. Table 17.b reports some preliminary evaluations on the computational load estimated for every algorithm.

Low Medium High

Alfonso et al. Fischer et al. Köhler et al.

Kohama et al. Suppappola & Sun

Trahanias Yu et al

Bahoura et al. Dobbs et al.

Gritzali, Hamilton & Tompkins

Kadambe et al. Ligtenbert & Kunt

Poli et al. Ruha et al.

Vijaya et al.

Belforte et al. Coast et al.

Hu et al Inoue & Miyazaki

Li et al. Papakonstantinou et al.

Sahambi et al. Sörnmo et al.

Udupa & Murphy Xue et al.

Table 17.b. Comparison of algorithms with respect to the computational load.

Page 86: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

86

6. Ranking This Chapter ranks the major algorithms described by the previous chapters. Despite an absolute and strict ranking is not applicable, because of the several parameters which can be measured for every algorithm and of the different nature of the algorithms, Table 18 considers the three main categories of algorithms, namely algorithms based on wavelet transformation, algorithms based on signal generation and digital filters, and algorithms based on neural networks.

Type of algorithm Ischemia episode sensitivity (%)

Ischemia episode specificity (%)

Ranking

1.Algorithms based on wavelet transformation Di-Virgilio еt al, N/A N/A N/A Sahambi et al, 98% (92.3%) 92.3% 2 Skordalakis N/A N/A N/A Peng and Wang N/A N/A N/A Jeong et al, 90% 83.14% 4 Jeong and Yu N/A N/A N/A Andreao et al, 83% 85% 5 Langley et al, 99% 91.1% 1 Shen et al, N/A N/A N/A Song et al, 91% N/A 3

2.Algorithms based on signal generation and digital filters Slimane et al, 99.79% 99.72% 2 Pan and Tompkins more than 99% more than 99% 1 Christov 99.60% 99.60% 3 Balda and Okada 98.32% 98.34% 5 Friesen et al, N/A N/A N/A Poli et al, 99.60% 99.51% 4

3.Algorithms based on neural networks Gharaviri 88.62% 99.65% 1

Table 18. Ranking of the algorithms within their category

Table 18 shows the ranking of the investigated algorithms in the framework of the tesina compared by their categorization. As already mentioned before, the conducted survey was based on three groups of algorithms:

1. Algorithms based on wavelet transformation, 2. Algorithms based on signal generation and digital filters 3. Algorithms based on neural networks.

Page 87: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

87

In spite of the lack of relevant data for all algorithms, the results show that based on their sensitivity/specificity within the first group of algorithms, the algorithm made by Langley et al, (with sensitivity from 99% and specificity from 91.1%) is the best one. In the second group of algorithms, it is obvious that with more than 99% sensitivity and specificity (as the first ranked) has been the Pan and Tompkins algorithm. Also this algorithm, in its applicability in the practice so far, takes the first place, considering its popularity not only among all authors, but researchers as well. It is obvious that Pan and Tompkins's algorithm is a good basis for building new, improved or better algorithms, and therefore it can be concluded that its applicability is the most appropriate since according to its results, this algorithm represents the best solution for detecting ischemic disease. It is also important to point out that in accordance with the selection and the analysis made, the algorithms based on signal generation and digital filters led by the Pan and Tompkins algorithm show significantly higher sensitivity and specificity, representing relevant data on the appropriateness of this type of algorithms and good applicability in the detection of ischemic disease in ECG heart recording. Finally, the set of algorithms based on neural networks has one item only, the approach by Gharaviri. This algorithm has no competitor within its set of algorithm – and obviously ranks as the first one. However, the specificity of this algorithm is extremely high, being close to 99.65%, while its sensitivity is among the lowest one over the entire Table 18. All in all, the algorithm by Gharaviri, according to the data from Table 18, is not the absolute best performer.

Page 88: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

88

7. Conclusions This tesina aims at collecting, describing, and comparing the major algorithms from the literature, focused on performing an automatic analysis of electrocardiographic (ECG) recordings to detect ischemia. ECG is a non-invasive technique which records the electric activity of the heart by placing some electrodes on the patient’s skin. Ischemia is defined as an insufficient flow of blood to a muscle: this may lead to a dangerous situation, including the death of the muscle itself. An accurate analysis of the recorded ECG signals (the medical practice considers 12 clinical leads) enables the physicians to detect if ischemia is occurring, or has occurred, to the heart. Thus, critical situations can be detected by a proper analysis of ECG recordings. While many algorithms for ischemia detection in ECG recordings have been developed and described by the literature, no exhaustive comparison has been performed so far, to the best of this authors’ knowledge. Consequently, this tesina reviewed the major journals and scientific publications on the topic, considered the most important algorithms, surveyed them, and – as much as possible - compared them. It is obvious that the main goal of scientific research is to shift the diagnosis to the earliest stage of the disease, as sooner as possible. In order to provide an accuracy of diagnostics, specific capabilities and options have complementary modalities that replace traditional X-ray diagnostic methods. Considering the necessity of the prevention, an imperative is to move diagnostics into the earlier stage of the disease in order to reduce the costs of treating patients, affect the quality of life of the patient, and progress in interventional treatment of the disease even prevent to cardio surgical surgery. The development of contemporary microprocessor-based computers has moved the difficulty of examining the problem of beat (QRS complex) detection in ECG recordings from hardware to software solutions: the last 30 years have revealed a significant number of proposed algorithms based on different mathematical theories. From the aspect of medicine, cardiac monitoring and automatic extraction of the significance from the electrocardiogram signal is extremely important for medical diagnostics, on a daily basis medical practice and scientific research as well. In this study, a variety of algorithms for the detection of the QRS segment of the ECG signal has been presented, supported by their categorization in mutual comparison, based on sensitivity and predictability in terms of the ischemic disease. The main focus was placed on the interaction with algorithms including their reliability for ischemia detection, the sensitivity parameters and the positive predictability. The prominent types of algorithms differ from each other in terms of the implemented/proposed methods to the operation of the algorithm and its application in early detection of ischemia. Considering the large number of already established algorithms that are used to detect ischemia, as well as the confirmation of their high-quality performance, they represent a good basis for further research and development of new superior algorithms that will bring the science to a new/higher level. Nowadays, some more complex algorithms are already implemented, but this area is still under development: therefore, there is still enough space for new contributions, as well as for further improvement of already existing algorithms. Such a rapid development and application of new algorithms would contribute to increasing the efficiency of ECG devices and early detection of ischemia, as well as other cardiovascular diseases.

Page 89: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

89

8. References 1. S. Serge Barold, Willem Einthoven and the Birth of Clinical Electrocardiography a

Hundred Years Ago,Cardiac Electrophysiology Review,99-104, 2003,USA, https://link.springer.com/article/10.1023/A:1023667812925

2.Wang Z X, Zhang S J, Zhang X P. Shape recognition algorithm for ST-segment of ECG

signal[J]. Journal of Computer Applications, 2011, 31: 2811~2813. http://en.cnki.com.cn/Article_en/CJFDTOTAL-JSJY201110061.htm

3.Kalezić M, Stojanović R, Mirković M,2010, Comparative analysis of algorithms for

detecting qrs segment of ecg signals, INFOTEH-JAHORINA Vol. 9, Ref. E1-14, p. 954-958, March 2010, http://infoteh.etf.unssa.rs.ba/zbornik/2010/radovi/E1/E1-14.pdf

4.Jeong G Y, Joon M J, Yu K H et al. Development of portable ECG measurement device and

PC software for automatic ST analysis [C]. Control Automation and systems (ICCAS), 2010, International Conference on IEEE, 2010: 1171~1174. http://ieeexplore.ieee.org/abstract/document/5669741/

5.Gu-Young Jeong, Kee-Ho Yu. ST shape classsifcation in ECG by constructing reference ST

set [J]. Medical Engineering & Physics 32 (2010):1025 ~1031. http://www.medengphys.com/article/S1350-4533(10)00145-1/abstract

6.Maglaveras N, Stamkopoulos N, Diamantaras K,Pappas C, Strintzis M, ECG pattern

recognition and classification using non-linear transformations and neural networks: A review, International Journal of Medical Informatics 52 (1998) 191–208, https://s3.amazonaws.com/academia.edu.documents/44644760/ECG_pattern_recognition_and_classificati20160411-11956144f33p.pdf?AWSAccessKeyId=AKIAIWOWYYGZ2Y53UL3A&Expires=1513151950&Signature=cEi86nw6iiRPKv3BgCPTbgMT1WI%3D&response-content-disposition=inline%3B%20filename%3DECG_pattern_recognition_and_classificati.pdf

7.N. Herring, D.J. Paterson. ECG diagnosis of acute ischemia and infraction : Past, present and future [J]. An international journal of medicine, 2006, 99 (4): 219~230. https://academic.oup.com/qjmed/article/99/4/219/2261114

8.Slimane ZEH, Reguig FB, A real-time QT interval detection algorithm, J Mech Med Biol

8(2):251–263, 2008. http://www.worldscientific.com/doi/abs/10.1142/S0219519408002577

9.F. Jager, G.B. Moody, A. Taddei, R.G. Mark, Performance measures for algorithms to

detect transient ischemic ST segment changes, Computers in Cardiology, IEEE Comput. Soc. Press (1991) 369–372. http://ieeexplore.ieee.org/abstract/document/169121/

10.Bert-Uwe Kohler, Carsten Hennig, Reinhold Orglmeister, “The Principles of Software

QRS detection“, IEEE engineering in medicine and biology,2002, 42-57.

Page 90: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

90

http://ieeexplore.ieee.org/abstract/document/993193/ 11.T.A. Gyaw and S.R. Ray, “The wavelet transform as a tool for recognition of biosignals,”

Biomed. Sci. Instrum., vol. 30, 63-68, 1994 http://europepmc.org/abstract/med/7948651

12.Li, C. W, Chongxun Zheng, Changfeng Tai. Detection of ECG Characteristic points using

wavelet transforms [J]. IEEE Trans Biomed Eng., 1995, 42(1):21~28. http://ieeexplore.ieee.org/abstract/document/362922/

13.J.I. Peláez, J.M. Doña, J.F. Fornari & G Serra, Ischemia classification via ECG using MLP

neural networks, International Journal of Computational Intelligence Systems,March 2014, https://www.researchgate.net/profile/Jose_Pelaez5/publication/278402671_Ischemia_classification_via_ECG_using_MLP_neural_networks/links/57b5e86c08aede8a665bb74f.pdf

14.V. Di-Virgilio, C. Francaiancia, S. Lino, and S. Cerutti, “ECG fiducial points detection

through wavelet transform,” IEEE Eng. Med. Biol. 17th Ann. Conf. 21st Canadian Med. Biol. Eng. Conf., Montreal, Quebec, Canada, 1997, 1051-1052 http://ieeexplore.ieee.org/abstract/document/579466/

15.Sahambi JS. Tandon SN. Bhalt RKP. Wavelet based ST-segment analysis [J]. Medical &

Biological Engineering & Computing, 1998, 36 (5): 568~572 https://link.springer.com/article/10.1007/BF02524425

16. Skordalakis E. Recognition of the shape of the ST segment in ECG waveforms [J],

IEEE Transactions on Biomedical Engineering, 1986, 33(10): 972~974 http://ieeexplore.ieee.org/abstract/document/4122185/

17.Zhang Q, Illanes Manriquez A, M´edigue C et al., An algorithm for robust and efficient

location of T-wave ends in electrocardiograms, IEEE Trans Biomed Eng 53(12):2544–2552, 2006. http://ieeexplore.ieee.org/abstract/document/4015620/

18.Gharaviri A,Teshnehlab M and Moghaddam H.A, Ischemia detection via ECG using

ANFIS, 30th Annual International IEEE EMBS Conference,Vancouver, British Columbia, Canada, August 20-24, 2008, http://ieeexplore.ieee.org/document/4649368/

19.Gu-Young Jeong, Kee-Ho Yu. Development of Ambulatory ECG Monitoring Device with

ST shape Classification [C]. International Conference Control, Automation and systems, 2007:1591~1595. http://ieeexplore.ieee.org/abstract/document/4406623/

20.Andreao RV, Dorizzi B, Boudy J, Mota JCM. ST-segment analysis using hidden Markov

Model beat segmentation: application to ischemia detection. Computers in Cardiology 2004:381-384 http://ieeexplore.ieee.org/abstract/document/1442952/

Page 91: A Survey of Algorithms for Ischemia Detection in ECG ... Kostoski... · Europe, cardiovascular diseases cause 40% of all deaths at the age of 75 years. Ischemia is responsible for

91

21.Langley P, Bowers EJ, Wild J, Drinnan MJ, Allen J, Brown N. An algorithm to distinguish ischaemic and non-ischaemic ST changes in the Holter ECG. Computers in Cardiology 2003;30,239-242 http://ieeexplore.ieee.org/abstract/document/1291135/

22.Shea Z, Hu C, Iiao J, et al. An algorithm of ST segment classification and detection [C].

IEEE International Conference on automation and Logistics. Hong Kong, 2010:559~564. http://ieeexplore.ieee.org/abstract/document/5585348/

23.J.Z Song, H Yan, et al. A Robust and efficient algorithm for ST-T complex detection in electrocardiograms [J]. Journal of mechanics in medicine and biology, 2011, 11 (5):

1103~1111. http://www.worldscientific.com/doi/abs/10.1142/S0219519411004198

24.Pan J, Tompkins WJ, A real-time QRS detection algorithm, IEEE Trans Biomed Eng 32:

230–236, 1985. http://ieeexplore.ieee.org/abstract/document/4122029/

25.Christov I, Real time electrocardiogram QRS detection using combined adaptive threshold, Biomed Eng. Online 3:28, 2004.

https://biomedical-engineering-online.biomedcentral.com/articles/10.1186/1475-925X-3-28

26.Belmin P,2016,Techniques of extraction of the QRS complex from the ECG signal

(Tehnike ekstrakcije QRS kompleksa iz EKG signala), http://people.etf.unsa.ba/~esokic/zavrsni/2016PUSCUL.pdf

27.M. Okada, A digital filter for the QRS complex detection,_ IEEE Trans. Biomed,Eng., vol.

26, pp. 700-703, Dec. 1979. http://ieeexplore.ieee.org/abstract/document/4122978/

28.Friesen GM, Jannett TC, Jadallah MA, Yates SL, Quint SR, Nagle HT: A comparison of

the noise sensitivity of nine QRS detection algorithms. IEEE Trans on Biomed Eng 1990, 37:85-98. http://ieeexplore.ieee.org/abstract/document/43620/

29.Bojan Kennel, Josip Kramar, Mateja Lončar, Alen Mešić, Mario Sušec,2010, Counting

heart rate (Brojanje otkucaja srca) Croatia, https://www.fer.hr/_download/repository/brojanje_otkucaja_srca.pdf

30.Poli R, Cagnoni S, Valli G: Generic design of optimum linear and nonlinear QRS

detection. IEEE Trans on Biomed Eng 1995, 42:1137-1141. http://ieeexplore.ieee.org/abstract/document/469381/

31.Maglaveras N, Stamkopoulos T, Pappas C, and Gerassimos Strintzis M, An Adaptive

Backpropagation Neural Network for Real-Time Ischemia Episodes Detection: Development and Performance Analysis Using the European ST-T Database, IEEE Trans on Biomed Eng, VOL. 45, NO. 7, JULY 1998,