Literature DB >> 21457580

A wavelet-based ECG delineation algorithm for 32-bit integer online processing.

Luigi Y Di Marco1, Lorenzo Chiari.   

Abstract

BACKGROUND: Since the first well-known electrocardiogram (ECG) delineator based on Wavelet Transform (WT) presented by Li et al. in 1995, a significant research effort has been devoted to the exploitation of this promising method. Its ability to reliably delineate the major waveform components (mono- or bi-phasic P wave, QRS, and mono- or bi-phasic T wave) would make it a suitable candidate for efficient online processing of ambulatory ECG signals. Unfortunately, previous implementations of this method adopt non-linear operators such as root mean square (RMS) or floating point algebra, which are computationally demanding.
METHODS: This paper presents a 32-bit integer, linear algebra advanced approach to online QRS detection and P-QRS-T waves delineation of a single lead ECG signal, based on WT.
RESULTS: The QRS detector performance was validated on the MIT-BIH Arrhythmia Database (sensitivity Se = 99.77%, positive predictive value P+ = 99.86%, on 109010 annotated beats) and on the European ST-T Database (Se = 99.81%, P+ = 99.56%, on 788050 annotated beats). The ECG delineator was validated on the QT Database, showing a mean error between manual and automatic annotation below 1.5 samples for all fiducial points: P-onset, P-peak, P-offset, QRS-onset, QRS-offset, T-peak, T-offset, and a mean standard deviation comparable to other established methods.
CONCLUSIONS: The proposed algorithm exhibits reliable QRS detection as well as accurate ECG delineation, in spite of a simple structure built on integer linear algebra.

Entities:  

Mesh:

Year:  2011        PMID: 21457580      PMCID: PMC3076264          DOI: 10.1186/1475-925X-10-23

Source DB:  PubMed          Journal:  Biomed Eng Online        ISSN: 1475-925X            Impact factor:   2.819


Background

The electrocardiogram (ECG) is the recording of the electrical activity of the heart by means of electrodes placed on the body surface. It is the most commonly used non-invasive test in primary care for heart rate and rhythm-related abnormalities detection [1,2]. In recent years the interest for the ECG signal analysis has extended from clinical practice and research to disciplines such as cognitive psychophysiology [3,4], physical training [5,6] and rehabilitation [7]. Many non-diagnostic applications do not require the full 12-lead setup of clinical ECG, employing a limited number of electrodes. In some cases a single lead setup, requiring only three electrodes, is sufficient. Such applications focus on ambulatory ECG monitoring, namely in unconstrained conditions, in which subjects perform normal activities as in their daily life [4], [8-10]. Ambulatory ECG analysis requires processing of signals which are affected by considerable noise, mainly caused by electrode motion and muscular activity, more prominently than in resting ECG recordings, and by power-line coupling. Moreover, emerging wearable technologies for ambulatory ECG monitoring have limited processing resources and low power budget. Clinical information on the cardiac beat is carried by the waveforms appearing on the electrocardiogram, namely: QRS-complex and P, T, U, waves. Their amplitudes and relative time intervals provide insight on heart rhythm abnormalities and heart disease such as ischemia and myocardial infarction. Electrocardiogram delineation is the automatic process of determining such amplitudes and time intervals. Performing an accurate delineation is quite a challenging task, for many reasons. For example, the P wave is characterized by low amplitude and may be masked by electrode motion or by muscular noise. The P and T waves may be biphasic, which increases the difficulty to accurately determine their onset or offset. Moreover, some arrhythmic beats may not contain all the standard ECG waves, for example the P wave may be missing, while in accelerated heart rate patterns, it might be partially overlapped to the T wave of the previous beat. The first stage of ECG delineation is devoted to detecting the QRS-complex, which in most cases is the most pronounced wave of the heart cycle. Subsequent processing locates P, QRS-complex and T waves fiducial points (onset, peak, offset). The cyclic nature of the ECG signal and its spectral components, which mainly appear in well-known and distinguishable frequency bands, make ECG a suitable candidate for multi-resolution decomposition by means of wavelet transforms [11,12]. Methods based on wavelet transforms have been proposed by numerous authors [13-18], building on the first well-known ECG delineator proposed by Li et al. [19]. Unfortunately, most of these ECG delineation algorithms adopt non-linear operators such as root mean square (RMS) or floating point algebra, which are computationally demanding. The work by Sovilj et al. [17] presents a real-time implementation of QRS detection and P wave delineation, though no validation on standard databases is provided, nor is the P wave delineation criterion explained. In [20] a WT-based algorithm for real-time QRS detection and ECG delineation is presented, though no validation is reported on delineation, and the total number of annotated beats used in the validation of QRS detection does not match the record-by-record count, as noted in [13]. The work by Boichat et al. [16] presents a real-time implementation of the offline method proposed by Martinez et al. [13], though no validation on arrhythmia databases (such as the MIT-BIH Arrhythmia Database) is provided. The delineation of QRS onset and QRS offset in [16] is performed on WT detail coefficients at scale 24, namely on the output of a pass-band FIR filter with a 3dB band of 4.1-13.5 Hz. Moreover, the criterion adopted for the validation of the delineation algorithm is based on a 320 ms window, which exceeds the maximum tolerance (150 ms) for QRS detection accuracy allowed by the ANSI/AAMI-EC57:1998 standard. This paper presents a wavelet-based algorithm for single lead QRS detection and ECG delineation of P wave, QRS-complex and T wave, under the algorithmic constraint of 32-bit integer linear algebra online processing and compliance with ANSI/AAMI-EC57:1998 requirements on QRS detection accuracy. The algorithm was validated on MIT-BIH Arrhythmia Database (MITDB), the European ST-T Database (EDB), and QT Database (QTDB), available from Physionet.

Methods

Wavelet Transform

The general theory on wavelet transforms for multi-resolution analysis is described in detail in [11,12], [21] and its application to ECG signal delineation is presented in [13], [19], while a review is given in [14]. With reference to the family of spline functions of degree 2r + 2 proposed in [12] for the smoothing function θ(t), in this study the 8th degree (r = 3) was adopted. Its Fourier transform is expressed in (1.1) and the Fourier transform of the wavelet function is expressed in (1.2). Unlike previous studies [13], [16-20] where a cubic spline smoothing function θ(t) (r = 1) was used, in this study a higher value of r was adopted to reduce the width of the compact support and the pass-band of the equivalent filter for scales higher than 21, to improve frequency band separation across scales. However, the number of filter taps increases with r, therefore a tradeoff should be determined between computational effort and delineation performance. Figure 1 shows the smoothing function θ(t) and wavelet function ψ(t) for r = 1 and r = 3. The compact support of the smoothing (scaling) function decreases in width as r increases.
Figure 1

Smoothing function and wavelet function. Smoothing function θ(t) (left) and wavelet function ψ(t) (right), for r = 1 (dotted line) and r = 3 (solid line).

Smoothing function and wavelet function. Smoothing function θ(t) (left) and wavelet function ψ(t) (right), for r = 1 (dotted line) and r = 3 (solid line). The low-pass filter H and high-pass filter G derived from (1.1) and (1.2) can be expressed as: whose finite impulse response hn and gn are given by the coefficients reported in Table 1.
Table 1

Wavelet Filters Impulse Response

Nhngn
-21/128
-17/128
021/128-2
135/1282
235/128
321/128
47/128
51/128
Wavelet Filters Impulse Response It shall be noted that hn is symmetrical and of even length, representing a linear phase low-pass FIR filter, while gn is anti-symmetrical of even length, representing a linear phase high-pass FIR filter. The frequency response for the filter bank generalized for any given scale can be written as: The filter bank structure is illustrated in Figure 2.
Figure 2

DWT filter bank. Filter bank implementation of biorthogonal dyadic wavelet transform without decimation (algorithme à trous). dis the detail coefficient series for scale 2k. Inspired by [13].

DWT filter bank. Filter bank implementation of biorthogonal dyadic wavelet transform without decimation (algorithme à trous). dis the detail coefficient series for scale 2k. Inspired by [13]. The frequency response of the equivalent filters Qk in (3) is displayed in Figure 3 for the first four scales, for r = 1 (cubic spline smoothing function) and r = 3 (8th degree spline smoothing function). For any given scale 2k, Qk pass-band narrows with increasing r, improving frequency separation of the filter bank across scales.
Figure 3

Equivalent filters magnitude response. Equivalent Filters Qk magnitude response, for different scales 2k, for r = 1 (dotted line) and r = 3 (solid line). Sample frequency F= 250 samples/s.

Equivalent filters magnitude response. Equivalent Filters Qk magnitude response, for different scales 2k, for r = 1 (dotted line) and r = 3 (solid line). Sample frequency F= 250 samples/s. The group delay of the equivalent filter Qk must be accounted for in multi-scale analysis of discrete wavelet transform (DWT) coefficients. To match zero-crossings (and their relative modulus-maxima) across different scales, DWT coefficients must be aligned temporally. The group delay of Qk at scale 2k, k >1, is given by: where: is the group delay of the low-pass filter at scale 2l, and is the group delay of the high-pass filter at scale 2k. According to [22,23], the energy of the main waveforms composing the ECG, namely QRS-complex, P and T waves, lies within a limited frequency range. As a consequence, a limited number of scales is required for ECG delineation. Table 2 summarizes the cutoff frequencies of Qk filters for the scales of interest, for r = 1 and r = 3.
Table 2

Wavelet Filters Bandwidth

ScaleBandwidth [Hz] (*)Bandwidth [Hz] (*)
2k3rd degree Spline θ(t) (r = 1)8th degree Spline θ(t) (r = 3)
k = 162.50 - 125.0062.50 - 125.00
k = 218.02 - 58.6013.12 - 43.55
k = 38.36 - 27.465.98 - 19.99
k = 44.11 - 13.522.93 - 9.80

(*) 3 dB cut-off

Wavelet Filters Bandwidth (*) 3 dB cut-off

Description of the Algorithm

The raw ECG signal is assumed to be sampled at 250 samples/s. The databases used for validation contain records of ECG data stored at 12-bit/sample. Therefore, to prevent overflow in a (signed) integer implementation of the low-pass filter adopted in the filter bank, 16-bit integer capacity is not sufficient. This constitutes the only reason for adopting a 32-bit instead of 16-bit implementation. However, a 32-bit implementation also complies with input signals (raw ECG data) with a sample resolution up to 24-bit/sample. Most, if not all, commercially available ECG front-end devices currently fall within this category. In order to comply with the largest set of such devices on the market, no assumptions are made on the amplitude resolution. The DWT properties which the proposed method is based on are well described in [13], [19]. Based on the properties of the filter bank (2), the zero-crossings of the DWT coefficients dcorrespond to the local maxima or minima of the smoothed input signal at different scales, and the maximum absolute values of dare associated with maximum slopes in the filtered signal [13]. Figure 4 shows DWT detail coefficients computed by the present algorithm, for actual ECG signals (record 108 and 208, from MITDB).
Figure 4

ECG signal and DWT decomposition. Examples of ECG signals from MITDB records (resampled at F= 250 samples/s) MITDB:108 (left), MITDB:208 (right), and DWT detail coefficient dat scales 21 through 25.

ECG signal and DWT decomposition. Examples of ECG signals from MITDB records (resampled at F= 250 samples/s) MITDB:108 (left), MITDB:208 (right), and DWT detail coefficient dat scales 21 through 25. At a sampling frequency of 250 samples/s, the spectral content of the ECG signal mainly falls within the first five scales of the filter bank (2). In particular, the QRS-complex is prominent at scales 22 and 23 while its energy decreases at increasing scales and becomes very low at scales higher than 24, while P shows high energy at scale 23 which decreases at higher ones. At scales 23 through 25 T wave has high energy, though at scale 25 the baseline drift, including respiration effects, becomes prominent. For this reason, scale 25 is not considered in this study. At scales 21 and 22 small peaks in Q and S waves may show zero-crossings though at such low scales, especially scale 21, muscular noise and power-line coupling may appear. Using the information of local maxima, minima and zero-crossing at the scales of interest, the algorithm identifies for each beat the significant points of the ECG in the following steps: 1) detection of the QRS-complex; 2) QRS-complex delineation (onset, offset); 3) P wave delineation (onset, peak, offset); 4) T wave delineation (peak, offset) of the previous beat. Figure 5 displays the flow chart of the state machine for online parsing of detail coefficients d, for QRS detection. Unlike previous works [13], [19], for QRS detection only two scales (22, 23) are processed.
Figure 5

ECG delineation state machine. State Machine flow chart for online ECG delineation. The zero-corssing nwith the largest modulus-maxima pair amplitude A(n) is detected within ΔWQRS (250 ms) at scale 22. Detail coefficients dat scales 22 and 23 are parsed for the verification of QRS candidates according to the QRS-detection decision rule. After QRS-complex detection, the delineation process delineates in the order: the QRS-complex, the P wave, and the T wave.

ECG delineation state machine. State Machine flow chart for online ECG delineation. The zero-corssing nwith the largest modulus-maxima pair amplitude A(n) is detected within ΔWQRS (250 ms) at scale 22. Detail coefficients dat scales 22 and 23 are parsed for the verification of QRS candidates according to the QRS-detection decision rule. After QRS-complex detection, the delineation process delineates in the order: the QRS-complex, the P wave, and the T wave. The algorithm proposed in this work is intended for online processing, therefore it is causal: at discrete time Ti, only ECG samples at Tk ≤ Ti are assumed to be available. To comply with low power budget constraints, the algorithm does not perform back-search for missed beats. The drawback is a decrease in sensitivity; the advantage is a decrease in storage memory and processing time. A memory buffer of 1 s for WT coefficients is sufficient for QRS detection, whereas the required storage size increases (depending on the inter-beat interval duration, in general no more than 1.5 s) for computing delineation of the T wave of the previous beat.

QRS detection

For each beat, the QRS-complex is detected using wavelet detail coefficients dat scales 22 and 23. As shown in Figure 5, only scale 22 is parsed for zero-crossings. When a zero-crossing is detected, the adjacent modulus-maxima pair MMp(n) is determined and the associated amplitude A(n), defined as the difference between the positive maximum and negative minimum detail coefficients, is computed. The zero-crossing is stored and an observation window ΔWQRS of 250 ms is initialized: if a new zero-crossing nis detected within this window such that A(n) > A(n), the window is reset and nis stored, replacing n, as shown in Figure 5. The process is iterated until a full window elapses without new candidates. The zero-crossing nrepresents the QRS-candidate. The QRS-detection decision rule is defined as follows: a window of 200 ms centred around nis considered, and the maximum-minimum difference Δd(n) of detail coefficients within such window, at scale 22, is computed as follows: where ΔW100 represents a time interval of 100 ms expressed in units of samples. The following condition is then tested: where εis an empirically determined threshold computed as follows: where the summation encompasses the N (= 4) most recent QRS-candidates that satisfied (5.2). Under the assumption that the time distance between two consecutive beats is generally not longer than 2 s (corresponding to a heart rate of 30 beats/min), it takes not more than 8 s to collect N (= 4) confirmed candidates. For this reason, a learning period of 8 s is allowed before the algorithm outputs any detected beats. If (5.2) is met, the decision process proceeds to the next step considering scale 23: where εis an empirically determined threshold computed as in (5.3), for scale 23. It shall be noted that, in (5.4), n spans the same window as in (5.1). Coefficients across different scales are time-aligned by accounting for the group delay computed in (4.1). If (5.2) and (5.5) are met, the QRS-candidate is confirmed, and thresholds εand εare updated. Then, if the learning period is expired, the zero-crossing is marked as the local peak (fiducial point) of a QRS-complex, and the algorithm proceeds for the delineation of P, QRS, T waves. It shall be noted that thresholds εand εare initialized to zero and iteratively adapt to QRS candidates. At the early stages of this process, QRS misdetections (false positives) are likely to occur. To prevent this, the algorithm does not output any detected QRS complexes until the learning period has expired. A learning period of 8 s is generally sufficient, although there may be extreme conditions such as lead-fail, cardiac arrest, poor signal-to-noise ratio, in which a longer time is required.

QRS delineation

QRS delineation is performed at scale 22. After detecting the QRS-complex, the QRS onset fiducial point is determined starting from the position nof the modulus maximum preceding the zero-crossing nof the QRS-complex at scale 22. The following thresholds are defined, based on local dcoefficient values: where nis the sample index of the modulus maximum following n. The delineation algorithm searches back from nfor negative minima or positive maxima, and stores the first crossing of the threshold ε2Qon, I to be assigned to QRS onset in case no modulus maxima are found within a fixed size window of 120 ms preceding n. The algorithm stops when a modulus maximum is detected whose amplitude is lower than the threshold ε, or the end of the search window has been reached. If at least one modulus maximum is found, a new threshold is defined: where nis the sample index at which dhas its left-most modulus maximum. The algorithm searches back from nuntil the first crossing of the new threshold εor the end of the fixed-size window is reached. The value is assigned to QRS onset. The symmetrical criterion is adopted for the determination of QRS offset, starting from the position nof the modulus maximum following the zero-crossing n. The threshold used for QRS offset delineation are: where nis the sample index of the right-most modulus maximum following nwhose amplitude exceeds threshold ε. Figure 6 shows examples of different QRS morphologies from QTDB records, the related manual annotations and the automatic delineation markers.
Figure 6

Delineation of QRS morphologies. Examples of various QRS morphologies from QTDB records, with manual annotations (top) and delineated characteristic points (bottom): QRS onset, dominant QRS peak, QRS offset.

Delineation of QRS morphologies. Examples of various QRS morphologies from QTDB records, with manual annotations (top) and delineated characteristic points (bottom): QRS onset, dominant QRS peak, QRS offset.

P wave delineation

P wave delineation is performed at scale 23. Mono- and bi-phasic P waves are handled. After delineating the QRS-complex, the algorithm searches back from QRS onset on scale 23 for the P wave. A fixed-size window whose length is chosen to be the shortest between 300 ms and half the last inter-beat interval is used for the search. Within this window, all zero-crossings are stored. The zero-crossing search is limited to a sub-portion of the window excluding the first (left-most) 100 ms which are only used for determining P onset. The zero crossing nwith maximizes A(n) is marked as P wave dominant peak. To determine the mono- bi-phasic morphology of the P wave, specific conditions are tested: where |d| is the modulus maximum preceding the zero-crossing n, at scale 23, and |d| is the modulus maximum following nZ. If (6.1) is verified, and a zero-crossing npreceding nis available within a distance of 100 ms, (6.1) is tested also for n. If such condition is verified, the following is also tested: If (6.1) and (6.2.1) are verified for n, the P wave is considered to be bi-phasic and nis defined as the sample corresponding to the left-most modulus maximum of MMp(n) otherwise nis defined as the sample corresponding to the left-most modulus maximum of MMp(n). The same procedure is adopted in the search of nfollowing nwithin a distance of 100 ms. If (6.1) is verified for n, the following condition is tested: If (6.1) and (6.2.2) are verified for n, the P wave is considered to be bi-phasic and nis defined as the sample corresponding to the right-most modulus maximum of MMp(n) otherwise nis defined as the sample corresponding to the right-most modulus maximum of MMp(n). The sample nbecomes the starting point for searching back the first crossing of a threshold: If such crossing point is found within the search window, it is assigned to P onset. The algorithm then searches for P offset, namely the estimated end of P, adopting the same procedure described for P onset. The threshold adopted is: If P onset, peak and offset are found within the search window, P wave delineation result is positive, otherwise the algorithm declares that P wave could not be delineated for the given beat. Figure 7 shows examples of P morphologies from QTDB records, the related manual annotations and the automatic delineation markers.
Figure 7

Delineation of P wave. Examples of P waves from QTDB records, with manual annotations (top) and delineated characteristic points (bottom): P onset, dominant P peak, P offset. (a) absent P wave, (b) positive P wave, (c) bi-phasic P wave.

Delineation of P wave. Examples of P waves from QTDB records, with manual annotations (top) and delineated characteristic points (bottom): P onset, dominant P peak, P offset. (a) absent P wave, (b) positive P wave, (c) bi-phasic P wave.

T wave delineation

T wave delineation is performed at scale 23. The following possible morphologies are handled: positive (+), negative (-), biphasic (+/- or -/+), upward and downward. At each identified QRS-complex, T wave is delineated for the previous beat. The search is done over a window defined as: where ndenotes the sample of the QRS offset of the previous beat (assuming the ith beat is the latest detected), rr is the distance in units of samples between the ith and the (i-1)th QRS fiducial point, and ΔW80 represents an interval of 80 ms expressed in units of samples. The T wave dominant peak is searched within a sub-window of ΔWT: Within ΔWT PK all zero-crossings are stored. A zero-crossing nis considered to have a positive (negative) slope if the first non-zero detail coefficient preceding nis negative (positive), and the first non-zero detail coefficient following nis positive (negative). For zero-crossings nwith negative (positive) slopes, the maximum (minimum) value Mof positive (negative) dcoefficients preceding nis stored, together with the minimum (maximum) value Mof negative (positive) dcoefficients following n. The absolute value of the difference Δ(n) between Mand Mis computed and the zero-crossing nwith the highest value is considered. If an adjacent zero-crossing nto the left of nexists and the following condition is met: then the T wave is considered biphasic, nis marked as T wave dominant peak T, nis marked as the end Tof the dominant wave (i.e. the wave whose peak is surrounded by the largest slopes), and the bi-phasic T wave end Tis searched to the right of nfollowing n. Tis then assigned to the first sample for which dfalls below a threshold εdefined as: If ndoes not exist or (7.3) is not verified, nis marked as T, and the search proceeds to the right of nfollowing n. Tis assigned to the first sample for which dfalls below a threshold ε, defined as; where nrefers to n. If an adjacent zero-crossing nexists to the right of n, such that: the T wave is considered to be bi-phasic and Tis defined as the first sample for which dfalls below the threshold in (7.4) where nnow refers to n. Figure 8 shows examples of various T wave morphologies from QTDB records, the related manual annotations and the automatic delineation markers.
Figure 8

Delineation of T wave. Examples of T waves from QTDB records, with manual annotations (top) and delineated characteristic points (bottom): dominant T peak, dominant T offset, T end. (a) positive T wave, (b) negative T wave, (c) upward T wave, (d) downward T wave, (e) and (f) bi-phasic T wave.

Delineation of T wave. Examples of T waves from QTDB records, with manual annotations (top) and delineated characteristic points (bottom): dominant T peak, dominant T offset, T end. (a) positive T wave, (b) negative T wave, (c) upward T wave, (d) downward T wave, (e) and (f) bi-phasic T wave.

Validation

The QRS detection algorithm was validated on manually annotated ECG databases, namely the MIT-BIH Arrhythmia Database (MITDB) and the European ST-T Database (EDB), whereas the P-QRS-T delineation algorithm was validated on the QT Database (QTDB). The MITDB database includes a selection of Holter recordings covering a broad spectrum of arrhythmias. The EDB database contains annotated excerpts of ambulatory ECG recordings with a representative selection of ECG abnormalities including ST segment displacement and cardiac axis shifts. The QTDB database contains records from MITDB and EDB, and from several other databases (Normal Sinus Rhythm, ST Change, Supraventricular Arrhythmia, Sudden Death, Long Term Recordings). This database was created for validation of waveform boundaries and contains annotations by cardiologists for at least 30 beats per record, including QRS-complex, P, T, U waves delineation. For the QRS detector validation on MITDB and EDB, the first ECG channel was used and, for MITDB only, raw data were resampled at 250 samples/s before processing. For the validation on QTDB, reference annotations of first cardiologist (q1c files from QTDB) were used in this work. Records from this database are sampled at 250 samples/s, therefore no resampling was required. Table 3 summarizes the databases used for validation.
Table 3

Databases used for validation

Database#Annotated BeatsRecordsRecord Duration
MITDB1090104830 min
EDB78805090120 min
QTDB362210515 min
Databases used for validation To assess QRS detection performance, sensitivity (Se) and positive predictive value (P+) were calculated: Se = TP/(TP+FN) where TP is the total number of true positives identified in the given record, FN is the total number of false negatives; P+ = TP/(TP+FP) where FP is the total number of false positives. A true positive is achieved when the time difference between the given annotated beat and the detected beat is not greater than 150 ms, in compliance with ANSI/AAMI-EC57:1998 standard. For the validation of ECG delineation on QTDB, the metrics proposed in [13], [16] was adopted, where m is the mean value of the errors intended as the time difference between automatic and reference annotation, for all annotations, and s is the average standard deviation of the error, calculated by averaging the intra-recording standard deviations. For each fiducial point delineation, the ECG channel with the least error was chosen, as in [13], [16]. Sensitivity was calculated for each characteristic point, for P wave, T wave and QRS-complex, separately. For T wave, manual annotations T-peak and T-offset, are matched to Tan Tas defined in the delineation method, respectively. A true positive is achieved when the wave is annotated and the delineation process detects the presence of such wave within a time distance not greater than 150 ms. (in [16] a window of 320 ms is used, in [13] the window size is not reported). A false positive occurs when the delineation process locates a characteristic point which was not annotated. A false negative is considered when the delineation process fails to locate the annotated fiducial point within the above mentioned tolerance of 150 ms. Positive predictive value could not be calculated, as noted in [13]: when there is no annotation it is not possible to determine whether the cardiologist considered that there was no waveform to annotate or was not confident in annotating it (perhaps because of the noise level). Nevertheless, for points other than the QRS delineation, P+ was calculated under the assumption that an absent mark in the annotated beat means that there is no waveform. As a result, the calculated P+ can be interpreted as a lower limit (P+min) of the actual one.

Results

Table 4 and Table 5 show the QRS detector performance on MITDB and EDB databases, respectively. Results are compared to previous studies. As in [13] segments with ventricular flutter in record 207 of MITDB (for an overall length of approximately 2 min 20 s) and those marked as unreadable (in the pertaining annotation file) in EDB, were excluded.
Table 4

Comparison of QRS Detection Performance with Published Methods (First ECG Channel of MITDB)

QRS Detector# annotationsFPFNSe [%]P+ [%]
This work10901014825299.7799.86
Martinez et al. [13]10942815322099.8099.86
Ghaffari et al. [18]10942812910199.9199.88
Aristotle [25]10942894186198.3099.91
Li et al. [19]104182 (*)6511299.8999.94
Afonso et al. [26]9090940637499.5999.56
Bahoura et al. [20]109809 (*)13518499.8399.88
Lee et al. [27]10948113733599.6999.88
Hamilton and Tompkins [28]10926724834099.6999.77
Pan and Tompkins [23]109809 (*)50727799.7599.54
Poli et al. [29]10996354544199.6099.50
Moraes et al. [30]N/RN/RN/R99.2299.73
Hamilton [31]N/RN/RN/R99.8099.80

Inspired by [13], Table 2

(*) a discrepancy was found in the original publication between reported total and record-by-record count

N/R: not reported

Table 5

Comparison of QRS Detection Performance on the European ST-T Database (EDB)

QRS Detector# annotationsFPFNSe [%]P+ [%]
This work7880503511148399.8199.56
Martinez et al. [13]7871034077304499.6199.48
Aristotle [25]787103104053863595.0998.63

Inspired by [13], Table 2

Comparison of QRS Detection Performance with Published Methods (First ECG Channel of MITDB) Inspired by [13], Table 2 (*) a discrepancy was found in the original publication between reported total and record-by-record count N/R: not reported Comparison of QRS Detection Performance on the European ST-T Database (EDB) Inspired by [13], Table 2

ECG delineation

ECG delineation results are shown in Table 6, where they are also compared to the ones obtained in previous studies. The results reported by Ghaffari et al. in [18] are not included in the table because the number of leads used for detection was not stated, nor was the number of annotated beats; it is also unclear the extent to which the authors used third party annotations for validation of their algorithm on the QT Database. The accepted two-standard-deviations 2σCSE tolerance, defined by the Common Standards for Electrocardiography (CSE) working party in [24] based on measurements made on different experts annotations, is also reported in the bottom row of the table. Table 7 shows inter-cardiologist annotations variability calculated on the QTDB records that were annotated by two different cardiologists. Unfortunately, only eleven records include double annotations, and only for QRS and T wave, not for P wave.
Table 6

Comparison of Delineation Performance with Published Methods (QT Database)

MethodParamP onsetP peakP offsetQRS onsetQRS offsetT peakT offset
# annot3194319431943623362335423542
This workSe [%]98.1598.1598.1510010099.7299.77
P+min [%]91.0091.0091.00N/AN/A97.7697.76
m ± s-4.5 ± 13.4-4.7 ± 9.7-2.5 ± 13.0-5.1 ± 7.20.9 ± 8.7-0.3 ± 12.81.3 ± 18.6

Martinez et al. [13]Se [%]98.8798.8798.7599.9799.9799.7799.77
P+min [%]91.0391.0391.03N/AN/A97.7997.79
m ± s2.0 ± 14.83.6 ± 13.21.9 ± 12.84.6 ± 7.70.8 ± 8.70.2 ± 13.9-1.6 ± 18.1

Laguna et al. [32]Se [%]97.7097.7097.7099.9299.9299.0099.00
P+min[%]91.1791.1791.17N/AN/A97.7497.71
m ± s14.0 ± 13.34.8 ± 10.6-0.1 ± 12.3-3.6 ± 8.6-1.1 ± 8.3-7.2 ± 14.313.5 ± 27.0

Boichat et al. [16] (*)Se [%]99.8799.8799.9199.9799.9799.9799.97
P+min [%]91.9892.4691.7098.6198.7298.9198.50
m ± s8.6 ± 11.210.1 ± 8.90.9 ± 10.13.4 ± 7.03.5 ± 8.33.7 ± 13.0-2.4 ± 16.9

CSE Tolerance [24]10.2-12.76.511.6-30.6

Partially inspired by [13], Table 3

(*) 16-bit integer implementation. No. annotations not reported. Se and Puse 320 ms window

N/A: not applicable, N/R: not reported

Table 7

Inter-Cardiologist Annotation Variability on QTDB (Annotation Files: q1c vs. q2c)

# matched annotationsMean Error ± SD [ms]
Q onset360-3.12 ± 14.06
T peak359-0.28 ± 26.24
T offset359-2.99 ± 39.60
Comparison of Delineation Performance with Published Methods (QT Database) Partially inspired by [13], Table 3 (*) 16-bit integer implementation. No. annotations not reported. Se and Puse 320 ms window N/A: not applicable, N/R: not reported Inter-Cardiologist Annotation Variability on QTDB (Annotation Files: q1c vs. q2c)

Discussion

The proposed algorithm performs online QRS detection as well as P, QRS, T waves delineation. Unlike previous DWT based methods [13], [16], [19], the present only uses two scales (22, 23), for both QRS detection and ECG delineation. The QRS detection showed an excellent performance on the MIT-BIH Arrhythmia Database, achieving a sensitivity of 99.77% and a positive predictive value of 99.86% on 109010 annotated beats, and on the European ST-T Database, achieving a sensitivity of 99.81% and a positive predictive value of 99.56% on 788050 annotated beats. Sensitivity and positive predictive value reported for the ST-T database are the highest among previous works, as shown in Table 5. The validation on the QT Database showed very good performance in P, QRS, T waves delineation. The mean error (m) and the average standard deviation (s) were comparable to the ones obtained by other WT-based delineators, as shown in Table 6. Mean error (m) was lower than 6 ms (1.5 samples, at Fs = 250 samples/s) for all characteristic points, whereas the average standard deviation (s) was around 8 ms (2 samples) for QRS delineation, and 12 ms (3 samples) for P wave and T peak delineation. Relatively high values of s in T wave delineation are present in all algorithms, and may be caused by the difficulty in determining the exact fiducial points as confirmed by the large inter-cardiologist annotation variability, especially for T offset as shown in Table 7. Comparing the average standard deviation (s) with the 2σtolerances, the condition s < σ(referred to in [13] as "strict criterion") is met for P peak, QRS offset, T offset, whereas the condition s < 2σ(referred to in [13] as "loose criterion") is not met for any of the characteristic points. However, the "strict criterion" is not met by any methods, as shown in Table 6. Sensitivity and positive predictive value of the ECG delineator for P, QRS, T waves were comparable to the values reported by others, as shown in Table 6. However, it shall be noted that the width of the search window adopted in the computation of true positives (TP) is not the same for all methods. In [13] the window width was not reported, in [16] it was set to 320 ms. In the present work, the window width was set to 150 ms. As a result, Se sand Pmay not be comparable across different methods. Previous DWT-based methods [13], [16], compute the adaptive thresholds in QRS detection εbased on the root mean square (RMS) of dcoefficients at the scales of interest. In [13] RMS is computed over N = 216 samples excerpts, for the first three scales (21, 22, 23). In [16] RMS is emulated over N = 29 samples excerpts for the first four scales. RMS is computationally demanding, as it requires squaring and summing N coefficients and calculating a square root. Although the square root was emulated in [16], a considerable amount of computations is required for squaring large data excerpts. In the present method, which uses only two scales, all thresholds are calculated from few (local) coefficients, which dramatically reduces the computational effort. In particular, the computation of εby (5.3) only requires N = 4 data-points, compared to N = 29 in [16] and N = 216 in [13], and this computation does not require squaring as in RMS. This observation also applies to ε. Moreover, all thresholds are expressed in the linear form of (A·v)/2, where v is an integer variable (or the sum of integer variables), A and B are positive constant integer values. Thus all thresholds can be computed by elementary shift and add operations. The ECG data used in this work were either originally sampled at 250 samples/s or resampled accordingly. Although many ECG front-end devices currently on the market offer data streams at 250 samples/s or 256 samples/s, there may be devices that provide a fixed sample rate which is significantly different from 250 samples/s. In order to preserve an integer linear algebra implementation in these cases, depending on the sample rate different scales of the DWT filter bank (2) may be used, or the filter bank itself may need to be redesigned, either by using a different degree of the spline smoothing function θ(t), or different scaling and wavelet functions.

Conclusions

In this paper, a WT-based single-lead ECG delineation algorithm, designed for online 32-bit integer linear algebra processing, with shift/add operations replacing multiplications and divisions, was presented. The algorithm complies with a sample resolution up to 24-bit/sample without any assumptions on the amplitude resolution of the ECG signal. The algorithm detects the QRS-complex, delineates the onset, dominant peak, and offset of the mono- or bi-phasic P wave, the onset and offset of the QRS-complex, the dominant peak and offset of the mono- or bi-phasic T wave. The QRS detector achieved excellent performance on the MIT-BIH Arrhythmia database (Se = 99.77%, P+ = 99.86%, 109010 annotated beats) and on the European ST-T Database, (Se = 99.81%, P+ = 99.56%, 788050 annotated beats). The proposed algorithm also exhibited very good accuracy in P, QRS, T delineator on QT Database, where the mean error between automatic and manual annotations was lower than 1.5 samples for all the characteristic points, and the associated average standard deviations were comparable to the ones reported from previous methods. However, the QTDB database contains a limited number of annotations, which makes the validation of an automatic ECG delineator not comprehensive. Based on the results achieved on standard databases, the proposed algorithm exhibits reliable QRS detection as well as accurate ECG delineation. Reliability and accuracy are close to the highest among the ones obtained in other studies, in spite of a simplified structure built on integer linear algebra which makes the proposed algorithm a suitable candidate for online QRS detection and ECG delineation under strict power constraints and limited computational resources, such as in wearable devices for long-term non-diagnostic ambulatory monitoring.

Competing interests

The authors declare that they have no competing interests.

Authors' contributions

LYD designed and implemented the algorithm, carried out validation on the cited databases and participated in manuscript preparation and revisions. LC supervised manuscript preparation and revisions. All authors read and approved the final manuscript.
  19 in total

Review 1.  Research methods for measurement of heart rate and respiration.

Authors:  S W Porges; E A Byrne
Journal:  Biol Psychol       Date:  1992-11       Impact factor: 3.251

2.  A wavelet-based ECG delineator: evaluation on standard databases.

Authors:  Juan Pablo Martínez; Rute Almeida; Salvador Olmos; Ana Paula Rocha; Pablo Laguna
Journal:  IEEE Trans Biomed Eng       Date:  2004-04       Impact factor: 4.538

3.  Low power wireless acquisition module for wearable health monitoring systems.

Authors:  C P Figueiredo; K Becher; K P Hoffmann; P M Mendes
Journal:  Annu Int Conf IEEE Eng Med Biol Soc       Date:  2010

4.  A robust wavelet-based multi-lead Electrocardiogram delineation algorithm.

Authors:  A Ghaffari; M R Homaeinezhad; M Akraminia; M Atarod; M Daevaeiha
Journal:  Med Eng Phys       Date:  2009-08-18       Impact factor: 2.242

5.  Monitoring cognitive and emotional processes through pupil and cardiac response during dynamic versus logical task.

Authors:  Mickaël Causse; Jean-Michel Sénard; Jean François Démonet; Josette Pastor
Journal:  Appl Psychophysiol Biofeedback       Date:  2010-06

6.  ECG beat detection using filter banks.

Authors:  V X Afonso; W J Tompkins; T Q Nguyen; S Luo
Journal:  IEEE Trans Biomed Eng       Date:  1999-02       Impact factor: 4.538

7.  Detection of ECG characteristic points using wavelet transforms.

Authors:  C Li; C Zheng; C Tai
Journal:  IEEE Trans Biomed Eng       Date:  1995-01       Impact factor: 4.538

8.  Automatic detection of wave boundaries in multilead ECG signals: validation with the CSE database.

Authors:  P Laguna; R Jané; P Caminal
Journal:  Comput Biomed Res       Date:  1994-02

9.  Electrocardiographic and other clinical correlates of walking ability in older women.

Authors:  Sara Mutikainen; Taina Rantanen; Markku Alén; Markku Kauppinen; Jouko Karjalainen; Alfredo Ortega-Alonso; Jaakko Kaprio; Urho M Kujala
Journal:  Arch Gerontol Geriatr       Date:  2009-11-24       Impact factor: 3.250

10.  Recommendations for interpretation of 12-lead electrocardiogram in the athlete.

Authors:  Domenico Corrado; Antonio Pelliccia; Hein Heidbuchel; Sanjay Sharma; Mark Link; Cristina Basso; Alessandro Biffi; Gianfranco Buja; Pietro Delise; Ihor Gussac; Aris Anastasakis; Mats Borjesson; Hans Halvor Bjørnstad; François Carrè; Asterios Deligiannis; Dorian Dugmore; Robert Fagard; Jan Hoogsteen; Klaus P Mellwig; Nicole Panhuyzen-Goedkoop; Erik Solberg; Luc Vanhees; Jonathan Drezner; N A Mark Estes; Sabino Iliceto; Barry J Maron; Roberto Peidro; Peter J Schwartz; Ricardo Stein; Gaetano Thiene; Paolo Zeppilli; William J McKenna
Journal:  Eur Heart J       Date:  2009-11-20       Impact factor: 29.983

View more
  4 in total

1.  Spatial complexity and spectral distribution variability of atrial activity in surface ECG recordings of atrial fibrillation.

Authors:  Luigi Y Di Marco; John P Bourke; Philip Langley
Journal:  Med Biol Eng Comput       Date:  2012-03-09       Impact factor: 2.602

Review 2.  A comprehensive survey of wearable and wireless ECG monitoring systems for older adults.

Authors:  Mirza Mansoor Baig; Hamid Gholamhosseini; Martin J Connolly
Journal:  Med Biol Eng Comput       Date:  2013-01-19       Impact factor: 2.602

3.  Automatic Real-Time Embedded QRS Complex Detection for a Novel Patch-Type Electrocardiogram Recorder.

Authors:  Dorthe B Saadi; George Tanev; Morten Flintrup; Armin Osmanagic; Kenneth Egstrup; Karsten Hoppe; Poul Jennum; Jørgen L Jeppesen; Helle K Iversen; Helge B D Sorensen
Journal:  IEEE J Transl Eng Health Med       Date:  2015-04-10       Impact factor: 3.316

4.  Electrocardiogram Delineation in a Wistar Rat Experimental Model.

Authors:  Pedro David Arini; Sergio Liberczuk; Javier Gustavo Mendieta; Martín Santa María; Guillermo Claudio Bertrán
Journal:  Comput Math Methods Med       Date:  2018-02-08       Impact factor: 2.238

  4 in total

北京卡尤迪生物科技股份有限公司 © 2022-2023.