Open access peer-reviewed chapter

An Algorithm Based on the Continuous Wavelet Transform with Splines for the Automatic Measurement of QT Dispersion: Validation and Application in Chronic Kidney Disease

Written By

María de Lourdes Corzo-Cuesta and Carlos Alvarado-Serrano

Submitted: 17 April 2017 Reviewed: 05 February 2018 Published: 06 June 2018

DOI: 10.5772/intechopen.74864

From the Edited Volume

Topics in Splines and Applications

Edited by Young Kinh-Nhue Truong and Muhammad Sarfraz

Chapter metrics overview

1,179 Chapter Downloads

View Full Metrics

Abstract

Chronic kidney disease (CKD) is considered a risk factor for the development of cardiovascular disease. QT interval is an electrocardiographic parameter that quantifies the duration of ventricular repolarization. An increase of its spatial variability measured from the selected leads of a standard electrocardiogram (ECG), named QT dispersion (QTd), is considered a risk factor for malign ventricular arrhythmias and sudden death in the CKD. An algorithm for automatic measurement of QTd in the ECG leads DI, aVF and V2 using the continuous wavelet transform with splines is presented. Validation of QRS complex detection has been done on records from MIT-BIH database, and the accuracy is 99.5%. Validation of detection of QRS wave onset and T wave end has been done on records from CSE and QT databases, and the measurements were within the tolerance limits for deviations with respect to the manual measurements defined by the experts. The algorithm was applied in two studies. In the first study, QTd was evaluated in normal subjects and patients with CKD. In the second study, QTd was analyzed in patients with CKD before, during and after the hemodialysis treatment. In both studies, the algorithm had a good performance for the QTd analysis.

Keywords

  • algorithm
  • wavelet transform
  • splines
  • electrocardiogram
  • QT dispersion
  • cardiovascular disease
  • chronic kidney disease

1. Introduction

According to the World Health Organization (WHO), cardiovascular diseases (CVDs) are the number one cause of death globally, and an estimated 17.7 million people died from CVDs in 2015, representing 31% of all global deaths, of these deaths, an estimated 7.4 million were due to coronary heart disease (CHD) [1]. CHD is a narrowing or blockage of the blood vessels that supply blood and oxygen to the heart, then, the cells in the region served by the vessel will behave abnormally due to hypoxia (myocardial ischemia) or may die (myocardial infarction) [2]. In Mexico, data of the National Institute of Statistics and Geography (INEGI) showed that in 2015, the heart diseases are the main cause of death, and the most frequent is the ischemic heart disease (IHD) [3].

The kidneys are a pair of bean-shaped organs that lie on either side of the spine in the lower middle of the back. Its main function is to remove soluble waste products and excess water and electrolytes from the bloodstream. Chronic kidney disease (CKD) is defined as abnormalities of kidney structure or function, present for 3 months or more, with implications for health [4]. Abnormalities in kidney structure (damage) usually precede abnormalities in function. CKD is divided into five stages of increasing severity. Stage 5 referred to as kidney failure or end-stage renal disease (ESRD) is traditionally considered as the most serious outcome of CKD because there is total or near-total loss of kidney function and patients require treatment with dialysis or transplantation.

CKD is considered a risk factor for the development of cardiovascular disease (CVD) because patients with CKD are more likely to die of CVD than to develop kidney failure [4, 5]. Primary types of CVDs with a high prevalence in CKD are arterial vascular disease in its two subtypes: atherosclerosis and arteriosclerosis, and cardiomyopathy. Clinical presentations of atherosclerosis include IHD, manifested as angina, myocardial infarction and sudden cardiac death, which is common in CKD, cerebrovascular disease, peripheral vascular disease and heart failure [5]. Patients with ESRD requiring maintenance hemodialysis (HD) have a high mortality rate, which is primarily attributable to CVD, including ventricular arrhythmias and sudden death, and the incidence of arrhythmias increases during and immediately after HD [6, 7].

Therefore, the use and development of noninvasive techniques such as electrocardiography, which records the electrical activity generated by the muscles of the heart in the surface of the body, open a useful perspective for diagnosis and treatment in patients with heart diseases such as ischemia and infarction. The electrocardiogram (ECG) is the waveform produced by this electrical activity of the heart and its generation depends on four electrophysiological processes such as the formation of electrical impulse in the main heart pacemaker (sinoatrial node), the transmission of this impulse through specialized fibers in the conduction, the activation (depolarization) and the recovery (repolarization) of the myocardium [8].

The electrical activity generated by the heart can be modeled as a vector whose magnitude and direction change throughout the cardiac cycle. To record the different projections of this vector, several electrodes are attached to the body in different locations known as leads. Because each lead measures the ECG between two points from different directions, amplitudes, polarities, times and durations of the ECG components vary between leads, so these have been standardized. The lead system most accepted in clinical practice is the standard 12-lead system, that is, the combination of the bipolar limb leads I, II and III, the augmented unipolar limb leads aVR, aVL and aVF and the six unipolar precordial leads V1–V6. Limb leads (I, II, III) derive signals from the left arm (LA), the right arm (RA) and the left leg (LL). The right leg (RL) electrode is the common reference in the amplifier [8].

In Figure 1, waves and intervals of interest of the ECG are shown. The P, QRS and T waves reflect the rhythmic electrical depolarization and repolarization of the myocardium associated with the contractions of the atria and ventricles. The P wave represents depolarization of the atrial musculature. The QRS complex is the combined result of the repolarization of the atria and the depolarization of the ventricles, which occur almost simultaneously. The T wave represents repolarization of the ventricles.

Figure 1.

Waves and intervals of interest of the ECG.

Time intervals like RR and QT are important in electrocardiographic diagnosis because they reflect electrophysiological processes of heart and autonomic nervous system (ANS) and carry clinical implications when they lie outside the range of the normal variation. The RR interval measured from the R wave peak to the peak of the next consecutive R wave is the interval between consecutive heart beats, and it determines the heart rate (HR). The QT interval measured from the Q wave onset to the T wave end reflects the total period of ventricular depolarization and repolarization, and it is used in clinical electrocardiology to quantify the duration of ventricular repolarization [9].

Prolongation of the QT interval is recognized as an indicator of an increased risk of malignant ventricular arrhythmias and/or sudden cardiac death in various clinical conditions such as myocardial infarction or ischemia, electrolyte or metabolic imbalance or the action of various drugs [9, 10]. Also, QT interval has an interlead space variability, which led to the hypothesis that the differences between electrocardiographic leads might reflect regional differences in repolarization. Based on experimental and clinical electrophysiological studies which supported the evidence that increased heterogeneity of repolarization may be responsible for generation of malignant ventricular arrhythmias, the interlead variation of QT interval duration was proposed as an index of arrhythmia susceptibility [10]. This measure was termed QT dispersion (QTd), and it was defined as the difference between the maximum and minimum QT interval on the standard 12-lead ECG [11].

Increased QTd has been associated with an increased risk for ventricular arrhythmias and sudden death in the general population and in various clinical conditions, among them, CKD is common. Several studies have reported that QTd increased in patients with ESRD, particularly after the end of HD [6, 12], so that it may be useful to identify patients at high risk for overall and cardiovascular mortality [13]. However, this index is affected by: an inaccurate measurement of the QT interval because of different definitions for the T wave end (with and without fusion with U or P waves), influence of HR, no simultaneous ECG leads recordings and number of ECG leads and of the ECG lead system used [14].

As beat-by-beat manual measurement of QTd on three orthogonal ECG leads is impractical in routine clinical practice, the development of accurate and robust methods for automatic detection of characteristic points of QRS and T waves is important in electrocardiographic diagnosis, in particular for the analysis of long recordings [15]. Wavelet transform is a suitable tool that has been used to determine peaks and limits of ECG waves because of its ability to detect transients and of its robustness in front of noise and artifacts [16, 17, 18]. This chapter presents the development of an algorithm based on the continuous wavelet transform (CWT) with splines for the automatic measurement of QTd in the quasi-orthogonal leads DI, aVF and V2, and its application for the analysis of QTd in patients with CKD.

Advertisement

2. Wavelet transform

Wavelet transforms at different scales describe the time characteristics of a signal in different frequency bands, but the analysis is restricted to scales that are powers of two [19]. The use of B-splines as base functions permits the evaluation of the CWT in any integer scale [20], which enables to use a wider range of scales and to reduce noise and artifacts more efficiently. This feature can allow the direct application of the algorithm over the raw ECG signal without any preprocessing stage because frequency filtering is performed when the CWT is computed.

The CWT of a time-continuous signal xt is defined as:

CWTxtab=1axtψtbadtE1

where ψt is the complex conjugate of the analyzing wavelet function ψt, and a and b are the scale and translation parameters, respectively. The function ψt compresses or dilates depending on a, which enables the CWT to extract the low- and high-frequency components of xt. To implement the CWT, a and b are usually discretized. If a is discretized over a sequence 2jj=12, the analysis is restricted to scales that are powers of two, and the result is the dyadic wavelet transform that can be computed with Mallat’s algorithm [19].

In this chapter, B-splines have been used which allow the evaluation of the CWT in any integer scale [20]. In this formulation, the input signal xt and the analyzing wavelet ψt are both polynomial splines of degree n1 and n2, respectively. The splines considered are constructed from polynomial segments of degree n of unit length that are smoothly connected together at joining points called knots in such a way that guarantees the continuity of the function and its derivatives up to order (n−1) [21]

Assuming that the input signal xt is characterized in terms of its B-spline expansion of degree n1 and the sequence of B-spline coefficients ck

xt=kZckβn1tkE2

Likewise, the wavelet ψt is a spline of degree n2 with its B-spline expansion

ψt=kZpkβn2tkE3

B-splines satisfy a two-scale equation for any integer m, where m is not restricted to a power of two; thus, the wavelet expanded by a factor m can be expressed as:

ψtm=kZpmumn2kβn2tkE4

where the sequence umn2k, when n2 and m are not both even, is given by z transform,

umn2z=zk0mn2k=0m1zkn2+1E5

with

k0=n2+1m1/2E6

Therefore, the resulting CWT at scale m evaluated at integer time samples is a polynomial spline function given by:

CWTxtmk=pmumn2bn1+n2+1ckE7

where the notation pmumn2 represents the upsampling of the sequence p by a factor of m, the filter umn2 is equivalent to a cascade of n2+1 filters of moving average of order m1 with an offset k0 that ensures its symmetry, bn1+n2+1 is the B-spline representation of a spline of order n1+n2+1 and cks are the B-spline coefficients.

The program w=spwavx,m,p,n2,n1 developed by Arregui (written in MATLAB®, The MathWorks Inc.) [22] calculates the CWT of the discrete signal xt at the integer scale m of the cubic spline wavelet (n2=3) with expansion coefficients spline p, where xt is considered a spline of order n1=1. Implementation of the program spwav is based on the fast algorithm proposed by Unser et al. [20], which is done in the following three steps:

  1. Initialization: calculus of the B-spline coefficients ck that interpolate the signal xt and the convolution with the B-spline of order n2.

  2. Iterated moving sum: calculus of the scalar products of the signal xt with the B-splines of order n2 dilated by a factor m and divided by the root of m.

  3. Zero-padded filter: filtering with the expansion coefficients, spline of the basis wavelet p upsampling (with zeros) by a factor of m to obtain wavelet coefficients.

The selected wavelet function ψt is the first derivative of a fourth-order cubic B-spline expanded by two, which leads to the sequence p=1450541 given in Table 1 of [20]. This wavelet is similar to the first derivative of a Gaussian function so that it yields good time and frequency resolution (Figure 2).

Figure 2.

First derivate of a fourth-order B-spline expanded by a factor of two.

The Fourier transform of the wavelet at five scales (e = 1, 2, 3, 8 and 10) at a sampling frequency of 500 Hz is shown in Figure 3, and their −3 db bandwidths are listed in Table 1.

Figure 3.

Amplitude-frequency responses of equivalent filters at five scales for 500 Hz sampling rate.

Scale (e)– 3 dB bandwidth (Hz)
156–186
230–97
319–64
87–24
106–19

Table 1.

Frequency response of equivalent filters at five scales for 500 Hz sampling rate.

In Table 2, the −3 dB bandwidths of the Fourier transform of the wavelet at four scales for the sampling rates of 250–1000 Hz are listed, which correspond to three ECG databases used in this study. MIT-BIH Arrhythmia database (MITDB) [23], QT database (QTDB) [24] and CSE multilead measurement database (CSEDB) [25] used for the validation of the algorithm have sampling rates of 360, 250 and 500 Hz, respectively. The PTB Diagnostic ECG Database (PTBDB) [26, 27] and the E-HOL-12-0051-016 database of the Telemetric and Holter ECG Warehouse of the University of Rochester (THEWDB) [28] used for the application have a sampling rate of 1000 Hz.

NameSampling frequency
250 Hz1000 Hz
Scale−3 dB bandwidth (Hz)Scale−3 dB bandwidth (Hz)
w1129–95259–194
w2216–49525–79
w357–20816–49
w4104–11207–20

Table 2.

Frequency response of equivalent filters at four scales for sampling rates of 250 and 1000 Hz.

Figure 4 shows the relation between the characteristic points of ECG and its CWT at four scales. Because of the form of the wavelet function selected, each distinct wave of the ECG corresponds to a pair of local maxima of the modulus (Pmm) of the CTW at each different scale with a zero crossing between them that corresponds to its peak. The rising slope of each wave yields a minimum and the falling slope yields a maximum [16]. According to the spectrum of the ECG waves [29], most of the energy of the ECG signal lies within the scales 2–10 (Figure 3). P and T waves have their major component at scales 8 and 10, but higher scales can be affected by baseline wandering. If the ECG is contaminated with high-frequency noise, scales 2 and 3 are the most affected.

Figure 4.

ECG and its CWT at scales 2, 3, 8 and 10.

Advertisement

3. Description of the algorithm

The algorithm for automatic measurement of QTd in the quasi-orthogonal leads DI, aVF and V2 is based on the multilead generalization of a previous algorithm for single-lead detection of characteristic points of the QRS complex and T wave using the CWT with splines [18]. This new algorithm for multilead detection includes the identification of more types of morphologies of QRS complex and T waves [30], which are integrated with the previous algorithm for single-lead detection. Figure 5 shows the algorithm proposed which is organized in four modules. In the first module, different kinds of QRS complexes and T-waves are detected and identified. In the second module, the algorithm detects the Q wave onset, R wave peak and T wave end, which is based on an algorithm for single-lead detection previously mentioned [18]. Next, the algorithm measures the QT and RR intervals from detections of significant points in each quasi-orthogonal lead. Finally, the algorithm calculates QTd as the difference in duration between the longest and shortest QT intervals measured on the three quasi-orthogonal leads and HR.

Figure 5.

Flowchart of the algorithm for automatic measurement of QTd in the leads DI, aVF and V2.

3.1. Detection of different kinds of QRS complex and T wave

As a first step in this stage, polarity of QRS complex and T wave is identified. QRS complex corresponds to a Pmm of the CTW and the scale used is w2, where it has its major component. Then, the highest positive peak (Wpq) and its nearest negative peak backwards (Wnq) are searched within the first 2 s of the record in order to define the position of these peaks. If Wnq position is before the Wpq position, then the type complex is qRs, which is defined as positive QRS. If Wnq position is after the Wpq position, then the type complex is rS, which is defined as negative QRS (Figure 6). Flowchart of polarity detection of the QRS complex is shown in Figure 2 of [30].

Figure 6.

Polarity of QRS complexes and their CWT at scale w2. (a) Positive and (b) negative.

To determine the type of QRS complex once its polarity is defined, two algorithms are applied depending if QRS complex is positive or negative. The algorithm to determine the type of QRS complex with positive polarity when R is higher, it defines if Q or S wave is present as follows. From the onset of the Pmm corresponding to the R wave at scale w2, Q wave is present if the nearest positive peak backwards is larger than a defined positive threshold. From the end of this Pmm, S wave is present if the nearest negative peak forward is lower than a defined negative threshold. These peaks are detected by looking inside a search window defined by the maximal duration of both waves. This algorithm detects and identifies the morphologies qR, qRs, R and Rs (Figure 7). Flowchart of the QRS complex type detection when R is higher is shown in Figure 5 of [30].

Figure 7.

Complex types and their CWT at scale w2. (a). qRs and (b) R.

The algorithm to determine the QRS complex with negative polarity when S is higher, it defines if Q or R wave is present as follows. From the onset of the Pmm corresponding to the S wave at scale w2, R wave is present if the nearest negative peak backwards is lower than a defined negative threshold. From this point, Q wave is present if the nearest positive peak backwards is larger than a defined positive threshold. These peaks are detected by looking inside a search window defined by the maximal duration of both waves. This algorithm detects and identifies the morphologies qrS, rS and QS. Figure 8 shows rS complex type and its CWT at scale w2. Flowchart of the QRS complex type detection when S is higher is shown in Figure 6 of [30].

Figure 8.

rS complex type and its CWT at scale w2.

Identification of polarity and type of T wave is performed with two algorithms. The first one classifies T wave into only two types: positive and negative (although it is biphasic, ascending or descending) as follows. As T wave corresponds to a Pmm of the CWT and only in this procedure, the scale used is w4 to enhance its characteristics. The highest positive peak (Wpt) and its nearest negative peak backwards (Wnt) larger than a defined threshold are searched from the end of the Pmm corresponding to R or S wave in a window whose limits depend on HR [31]. If Wnt position is before the Wpt position, then the T wave is positive or normal (Figure 9a). If Wnt position is after the Wpt position, then the T wave is inverted or negative. Flowchart of polarity detection of the T wave is shown in Figure 3 of [30].

Figure 9.

T wave types and their CWT at scale w4. (a). Positive and (b) biphasic.

The second algorithm to determine the type of T wave is applied after, once the R or S wave position is defined by the algorithm for single detection of characteristic points described later [18], and before the T wave detection. To identify T waves, the same procedure used for detecting of Wpt and Wnt of Pmm of T wave described earlier is used. According to the comparison of the absolute values of these peaks with defined thresholds and its position, the algorithm classifies five types of T waves: positive, negative, ascending, descending and biphasic (Figure 9b). Flowchart of the T wave type detection is shown in Figure 4 of [30].

3.2. Detection of characteristic points of QRS complex and T wave

3.2.1. QRS detection

QRS complex is the most characteristic waveform in the ECG due to its shape with high amplitude, which makes its detection easier than other ECG waves. Its accurate detection in the presence of noise and interferences is the most important task in the ECG automatic analysis because it is used as a reference in the cardiac cycle to perform a more detailed analysis of other ECG waves, segments and intervals, as automated measurement of HR and QT interval.

According to the wavelet function selected, QRS complex corresponds to a Pmm of the CWT at selected scale, where the R wave peak (Rp) corresponds to the zero crossing observed between the Pmm (Figure 6). The developed algorithm [18] detects the QRS by using the scale w2 and the Pmm corresponding to the R wave by defined threshold comparing inside a search window defined by the average RR interval and the last RR interval calculated [31]. From that Pmm, the start of the Q wave defined as Qi (or the start of R wave (Ri) in the absence of Q wave) corresponds to the zero crossing preceding the Pmm; the end of the S wave defined as Se (or the end of the R wave in the absence of the S wave) corresponds to the zero crossing after the Pmm (Figure 10). Those zero crossings are detected by looking inside a search window defined by the maximal duration of both waves. Flowcharts of the Rp and Qi (Ri) detection algorithms are shown in Figures 11 and 12, respectively.

Figure 10.

Onset, peak and end of the QRS complex and its CWT at scale w2.

Figure 11.

Flowchart of the Rp detection algorithm.

Figure 12.

Flowchart of the Qi (Ri) detection algorithm.

3.2.2. T wave detection

Because of the low-frequency components of T wave [29], scale w3 of the CWT was used for its detection. The process for detection of positive and negative T waves is as follows: from the end of the Pmm of the Rp, we define a search window whose length decreases when RR diminishes [31]; inside that window, we look for the Pmm corresponding to the T wave that exceeds a defined threshold. The end of this Pmm and the zero crossing between them, corresponds to, respectively, the end (Te) and the peak (Tp) of the T wave. Detection and identification of ascending, descending and biphasic types depend on the number, polarity and absolute values of the found local maxima (Wpt) or minimum (Wnt). Figure 13 shows peak and end of the positive and biphasic T wave and their characteristic points of CWT at scale w3. Flowchart of the Tp and Te detection algorithm of T wave monophasic or biphasic is shown in Figure 14.

Figure 13.

Peak and end of T waves and their CWT at scale w3. (a) Positive and (b) biphasic.

Figure 14.

Flowchart of the Tp and Te detection algorithm of T wave monophasic or biphasic.

3.3. Measurement of QT and RR intervals and calculus of QTd and HR

Once Qi and Te have been detected, the algorithm measures the QT and RR interval points in each quasi-orthogonal lead. Finally, the algorithm calculates QTd as the difference in duration between the longest and the shortest QT intervals measured in the three quasi-orthogonal leads, in which each QT interval is the average of three consecutive QT intervals. HR is calculated from the average of RR intervals measured in the same leads, in which each RR interval is the average of two consecutive RR intervals.

Advertisement

4. Validation and results

4.1. QRS detection

The developed algorithm for QRS detection [18] has been first tested on eight 30 min recordings resampled to 500 Hz from the MITDB [23], in which only channel 1 of the two-channel ECG recordings was used. The selected recordings included serious noise bursts, baseline drifts and movement artifacts. Table 3 shows that QRS detector had 81 false QRS detections of 17,095 beats (0.47%); 51 of them were false positives and 30 were false negatives.

ECG
record
number
BeatsFPFNFalse detections
Beats%
10022720110.04
10118640110.05
10221870000
10320840000
1042229174210.9
10525713113441.71
10721350110.04
1081753310130.7
Total17,0955130810.47

Table 3.

Validation results for the QRS detection algorithm applied to eight records from the MITDB.

FP, false positives; FN, false negatives.

4.2. Delineation of characteristic points of the QRS complex and T wave

The developed algorithm for delineation of Qi and Se of the QRS complex and Te of the T wave has been tested on 25 recordings from the CSE database [25], which includes 15 ECG leads and manual annotations on them. Table 4 shows the average (m) and standard deviation (sd) of the difference between the (WT-based) automatic and the (CSE) manual (annotated) location of those characteristic points. The results for that difference are within the tolerance limits accepted by the CSE experts, as shown in the last row of Table 4 [32].

25 Recordings CSE
Mo1_001:121 (5:5)
QiSeTe
WT – CSEWT – CSEWT – CSE
m ± sd– 4.5 ± 1.57.6 ± 1.88.2 ± 3.6
Tolerance limits for deviations according to experts [31]
sd (CSE)6.511.630.6

Table 4.

Validation results for delineation algorithm of characteristic points Qi, Se and Te on 25 annotated recordings of the CSEDB.

Values are in ms; m, mean; sd, standard deviation.

Also, the algorithm has been tested on 15 recordings from MITDB included in the QTDB [24]. Within each record of two channels, between 30 and 100 representative beats were manually annotated by cardiologists, who identified among other characteristic points of ECG waves, Qi of the QRS-complex and Te of the T-wave. Channel 1 was used in most recordings, in case of ECG distorted, channel 2 was used. Table 5 shows the mean (m) and standard deviation (sd) of the differences between the manual measurements (C1) and automatic measurements (WT) of Qi and Te for each record. The results for the differences between WT and C1 are within the tolerances for deviations with respect to the measurements made by the CSE experts, as shown in the last row of Table 5 [32].

QT
database
QiTe
WT – C1WT – C1
sel10015.4−2.4
sel102−5.322.8
sel10311.920.5
sel1044.1−5.6
sel11414.729.3
sel1162.217.6
sel1171.6−13.8
sel1232.9−20.8
sel21320.416.8
sel22111.2−16.3
sel223−11.214.6
sel2309.33.7
sel23113.14.5
sel2323.220.8
sel233−5.813.2
m ± sd5.8(8)7(15)
Tolerance limits for deviations according to experts [31]
sd (CSE)6.530.6

Table 5.

Validation results of the delineation algorithm of characteristic points Qi and Te for 15 recordings from the QTDB in ms.

Values are in ms; m, mean; sd, standard deviation.

Figure 15 shows some ECG excerpts of records with different T wave morphologies from QTDB with the manual annotations (square symbol) and the automatic detections (star symbol). It can be seen that Qi and Te are well determined by the algorithm, and its accuracy is comparable to a manual measurement of human experts.

Figure 15.

Automatic detections (star) and manual annotations (square) of Qi and Te with different types of morphologies of QRS complex and T wave in patterns of two beats of four records from QTDB. (a) rS positive T wave, (b) qRs biphasic T wave, (c) Rs biphasic T wave and (d) qR negative T wave.

Advertisement

5. Application in chronic kidney disease

The QTd algorithm was applied in two studies. In the first study, QTd was evaluated in normal subjects and patients with CKD. In the second study, QTd was analyzed in patients with CKD before, during and after the HD treatment.

5.1. QTd analysis in normal subjects and patients with CKD

In this study, 14 ECG recordings belonging to the PTBDB were used [26, 27], where the three quasi-orthogonal leads DI, aVF and V2 have been analyzed to obtain QTd. This database includes records of healthy people and patients with different pathologies. The study group was of seven normal subjects (two women and five men, age 66 ± 3.6 years) and seven renal insufficiency patients (three women and four men, age 70 ± 4.5 years). QTd corresponding to both groups was compared by the Wilcoxon rank sum test, where p < 0.05 was considered statistically significant.

Table 6 shows QTd and HR in both groups. Difference in HR in both groups is not significant and therefore HR influence is similar in both groups [(67.7 ± 9) beats/min vs. (70.8 ± 12) beats/min, p = 0.53]. QTd was significantly larger in patients with CKD than in normal subjects [(67.7 ± 28) ms vs. (21.4 ± 12), p = 0.0041]. The results obtained showed that the algorithm is effective to differentiate both groups.

NormalQTdHRPatientsQTdHR
patient1212.684.9patient01254.649.94
patient1221763.6patient01311686.12
patient23940.669.0patient0787073.20
patient24817.663.9patient07974.662.37
patient25527.667.2patient14021.686.41
patient26625.672.6patient1456568.72
patient26718.652.8patient2167269.44
m ± sd21.4(11)67.7(9)m ± sd67.7(28)70.8(12)
p0.00410.53

Table 6.

QTd and HR in seven normal subjects and seven CKD patients.

QTd in ms; HR in beats/min; m, mean; sd, standard deviation; p value is from Wilcoxon rank sum test.

5.2. QTd analysis in patients with CKD before, during and after hemodialysis

In this study, four ECG records of patients with CKD in the stage referred to as kidney failure or ESRD of the THEWDB [28], before (pre-HD), during and after (post-HD) HD session were used. For each patient, the three quasi-orthogonal leads DI, aVF and V2 have been analyzed to obtain QTd in a period of 10 h, in which pre-HD, HD and post-HD periods correspond to the hours 1, 2–6 and 7–10, respectively. Figure 16 shows the dynamics of QTd averaged every 15 min in a period of 10 h of the four CKD patients. It is observed that all the patients have an increase of QTd during HD and post-HD, which has been associated with malign ventricular arrhythmias and sudden death [6, 12].

Figure 16.

Dynamics of QTd of four CKD patients averaged every 15 min in pre-HD, HD and post-HD periods. (a) Patient 1013, (b) Patient 1030, (c) Patient 1050 and (d) Patient 1059.

Advertisement

6. Conclusion

This chapter presents and validates an algorithm based on the CWT with splines for the automatic measurement of QTd in the ECG quasi-orthogonal leads DI, aVF and V2. This algorithm permits the evaluation of the CWT in any integer scale which enables to use a wider range of scales and therefore to reduce noise and artifacts. In addition, the filters implemented in the algorithm based on B-splines are iterated discrete convolutions of moving sums, so that it can be computed without any multiplication, which results in a very efficient algorithm. Some functions of wavelet toolbox of MATLAB® related with this algorithm are as follows: the spline for cubic spline data interpolation, cwt that implements the CWT and gauswavf that returns the first order derivate of the Gaussian wavelet.

This new algorithm is based on the multilead generalization of a previous algorithm for single-lead detection of characteristic points of the QRS complex and T wave. It includes the identification of more types of morphologies of these waves, which are common in the analysis of several ECG leads and heart diseases. To evaluate its performance, ECG recordings of standard annotated databases MIT-BIH, QTDB and CSEDB were used. The results showed that the developed algorithm provides a reliable and accurate QRS detection and delineation of Qi and Te, with standard deviation of the errors within the tolerance limits for variations with respect to the measurements made by different experts.

The QTd algorithm was applied in two studies. In the first one, QTd was evaluated as a discriminator of patients with CKD from normal subjects. The results showed that QTd was significantly larger in CKD patients than in normal subjects, which agrees with similar studies. In the second study, QTd was analyzed in four patients with CKD before, during and after the HD treatment. The results showed that all the patients have an increase of QTd during HD and post-HD, which has been associated with malign ventricular arrhythmias and sudden death in previous studies.

Future applications of this algorithm will focus on to evaluate dispersion in other ECG ventricular activity intervals like JT (from S wave end to T wave end) and Tpe (from T wave peak to T wave end), in order to determine whether they improve the identification of CKD patients with risk of malign ventricular arrhythmias compared with QT dispersion.

References

  1. 1. World Health Organization (WHO). Cardiovascular Diseases (CVDs) [Internet]. 2017-05. Available from: http://www.who.int/mediacentre/factsheets/fs317/en/ [Accessed: July 25, 2017]
  2. 2. Plonsey R. Electrocardiography. In: Webster JG, editor. Electrocardiography. New York: John Wiley & Sons; 1988. pp. 1017-1040
  3. 3. Instituto Nacional de Estadística y Geografía (INEGI). Defunciones generales por residencia habitual del fallecido y causa de la defunción (LISTA 1, CIE-10) según mes de ocurrencia, 2015 [Internet]. [Updated: 2016-11-30]. Available from: http://www.inegi.org.mx/est/contenidos/proyectos/registros/vitales/mortalidad/tabulados/def04.asp?t=13&c=11816 [Accessed: July 24, 2017]
  4. 4. Kidney Disease: Improving Global Outcomes (KDIGO) CKD Work Group. KDIGO 2012 Clinical Practice Guideline for the evaluation and management of chronic kidney disease. Kidney International Supplements. 2013;3:1-150
  5. 5. Sarnak MJ, Levey AS, Schoolwerth AC, Coresh J, Culleton B, Lee HL, et al. Kidney disease as a risk factor for development of cardiovascular disease: A statement from the American Heart Association councils on kidney in cardiovascular disease, high blood pressure research, clinical cardiology, and epidemiology and prevention. Circulation. 2003;108:2154-2169. DOI: 10.1161/01.CIR.0000095676.90936.80
  6. 6. Drighil A, Madias JE, Benjelloun M, Kamoum H, Bennis A, Azzouzi L, et al. Changes in the QT intervals, QT dispersion, and amplitude of T waves after hemodialysis. Annals of Noninvasive Electrocardiology. 2007;12(2):137-144. DOI: 10.1111/j.1542-474X.2007.00152.x
  7. 7. Bleyer AJ, Russell GB, Satko SG. Sudden and cardiac death rates in hemodialysis patients. Kidney International. 1999;55:1553-1559
  8. 8. Márquez-Espinoza A, Mercado-Rojas JG, Vega-Martínez G, Alvarado-Serrano C. ECG ambulatory system for long term monitoring of heart rate dynamics. In: Silviu F, editor. Practical Applications and Solutions Using LabVIEW™ Software. Rijeka, Croatia: InTech; 2011. pp. 201-226. DOI: 10.5772/20946
  9. 9. Zareba W, Moss AJ, Badilini F. Dispersion of repolarization: Noninvasive marker of nonuniform recovery of ventricular excitability. In: Moss AJ, Stern S, editors. Noninvasive Electrocardiology: Clinical Aspects of Holter Monitoring. London; Philadelphia: W.B. Saunders; 1996. pp. 405-419
  10. 10. Kautzner J, Malik M. QT interval dispersion and its clinical utility. Pacing and Clinical Electrophysiology. 1997;20:2625-2640
  11. 11. Day CP, McComb JM, Campbell RWF. QT Dispersion: An indication of arrhythmia risk in patients with long QT intervals. British Heart Journal. 1990;63:342-344
  12. 12. Cupisti A, Galetta F, Morelli E, Tintory F, Sibilia G, Meola M, et al. Effect of hemodialysis on the dispersion of the QTc interval. Nephron. 1998;78:429-432
  13. 13. Beaubien ER, Pylypchuk GB, Akhtar J, Biem HJ. Value of corrected QT interval dispersion in identifying patients initiating dialysis at increased risk of total and cardiovascular mortality. American Journal of Kidney Diseases. 2002;39:834-842
  14. 14. Malik M, Batchvarov VN. Measurement, interpretation and clinical potential of QT dispersion. Journal of the American College of Cardiology. 2000;36:1749-1766
  15. 15. Caminal P, Blasi A, Vallverdú M, Viñolas X, Jané R, Laguna P, et al. New algorithm for QT dispersion analysis in XYZ-lead Holter ECG. Performance and applications. In: Computers in Cardiology; 13-16 Sept. 1998; Cleveland, OH, USA. Piscataway, NJ, USA: IEEE; 1998. pp. 709-712. DOI: 10.1109/CIC.1998.731972
  16. 16. Li C, Zheng C, Tai C. Detection of ECG characteristic points using wavelet transforms. IEEE Transactions on Biomedical Engineering. 1995;42:21-28
  17. 17. Martínez JP, Almeida R, Olmos S, Rocha AP, Laguna P. A wavelet-based ECG delineator: Evaluation on standard databases. IEEE Transactions on Biomedical Engineering. 2004;51:570-581
  18. 18. Alvarado C, Arregui J, Ramos J, Pallàs-Areny R. Automatic detection of ECG ventricular activity waves using continuous spline wavelet transform. In: 2nd International Conference on Electrical and Electronics Engineering (ICEEE) and XI Conference on Electrical Engineering (CIE 2005); 7-9 September 2005; Mexico City, Mexico. IEEE; 2005. pp. 189-192. DOI: 10.1109/ICEEE.2005.1529605
  19. 19. Mallat S. A theory for multiresolution signal decomposition: The wavelet representation. IEEE Transactions on Pattern Analysis and Machine Intelligence. 1989;11:674-693
  20. 20. Unser M, Aldroubi A, Schiff SJ. Fast implementation of the continuous wavelet transform with integer scales. IEEE Transactions on Signal Processing. 1994;42:3519-3523
  21. 21. Unser M. Splines: A perfect fit for signal and image processing. IEEE Signal Processing Magazine. 1999;16(6):22-38. DOI: 10.1109/79.799930
  22. 22. Arregui J. Study of Spectrotemporal Methods and their Application to the ECG. [Final Project]. Barcelona, Spain: Universitat Politècnica de Catalunya; 1996. (In Catalan)
  23. 23. Moody GB, Mark RG. The MIT-BIH arrhytmia database on CD-ROM and software for use with it. In: Computers in Cardiology. Los Alamitos, CA: IEEE Computer Society Press; 1990. pp. 185-188
  24. 24. Laguna P, Mark RG, Goldberg A, Moody GB. A database for evaluation of algorithms for measurement of QT and other waveform intervals in the ECG. In: Computers in Cardiology 1997; 24-27 September. Vol. 2000. Cambridge, MA, USA: IEEE; 2000. pp. 673-676. DOI: 10.1109/CIC.1997.648140
  25. 25. Willems JL, Arnaud P, van Bemmel JH, Bourdillon PJ, Degani R, Denis B, et al. A reference database for multilead electrocardiographic computer measurement programs. Journal of the American College of Cardiology. 1987;10:1313-1321
  26. 26. Bousseljot R, Kreiseler D, Schnabel A. Nutzung der EKG-Signaldatenbank CARDIODAT der PTB über das Internet. Biomedizinische Technik. 1995;40(1):S317
  27. 27. Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PC, Mark RG, et al. PhysioBank, PhysioToolkit, and Physionet: Components of a new research resource for complex physiologic signals. Circulation. 2000;101:e215-e220
  28. 28. Telemetric and Holter ECG Warehouse (THEW). High-resolution 12-lead 48-hours continuous ECG from end-stage renal disease patients: during and after hemodialysis session. [Internet]. 2012. Available from: http://thew-project.org/Database/E-HOL-12-0051-016.html [Accessed: November 28, 2016]
  29. 29. Thakor NV, Webster JG, Tompkins WJ. Estimation of QRS complex power spectra for design of a QRS filter. IEEE Transactions on Biomedical Engineering. 1984;31:702-706. DOI: 10.1109/TBME.1984.325393
  30. 30. Corzo-Cuesta ML, Alvarado-Serrano C. An algorithm for QT dispersion analysis: Validation and application in chronic kidney disease. In: 13th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE); 26-30 September 2016; Mexico City. Mexico: IEEE; 2016. pp. 1-6. DOI: 10.1109/ICEEE.2016.7751237
  31. 31. Laguna P, Thakor NV, Caminal P, Jané R, Yoon HR, Bayés de Luna A, et al. New algorithm for QT interval analysis in 24-hour Holter ECG: Performance and applications. Medical & Biological Engineering & Computing. 1990;28:67-73
  32. 32. The CSE Working Party. Recommendations for measurement standards in quantitative electrocardiography. European Heart Journal. 1985;6:815-825

Written By

María de Lourdes Corzo-Cuesta and Carlos Alvarado-Serrano

Submitted: 17 April 2017 Reviewed: 05 February 2018 Published: 06 June 2018