Abstract
The main objective of this article is to implement and compare QRS subtraction techniques for intra-cardiac atrial electrograms based on using the surface ECG as a reference. A band-pass filter between 8 and 20 Hz followed by rectification, and then a low-pass filter at 6 Hz are used for QRS detection. QRS subtraction was performed using three different approaches: flat, linear and spline interpolations. QRS subtraction affects the power of the signals but it normally does not affect the dominant frequency. The average power of the atrial electrograms after QRS subtraction is significantly reduced for frequencies above 10 Hz.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
During atrial fibrillation (AF), atrial electrical activity is described as chaotic and random [15]. Frequency domain analysis can help to interpret such activity. Ablation at sites with dominant frequency (DF) resulted in a significant prolongation of AF cycle length (AFCL) compared with ablation of a site with nondominant frequencies [13, 19]. This result supports the use of DF mapping to identify suitable ablation targets. It is important to minimize the involvement of ventricular activity (QRS complexes) because the range of frequencies of interest associated with AF (from 5 to 12 Hz) overlaps with the frequency content of QRS complexes (mainly from 10 to 30 Hz). If QRS complex noise were not eliminated, the dominant frequencies present in the atrial electrogram of some sites might be ‘false’ in the sense that they do not indicate atrial activation frequencies but QRS contamination. The main purpose of this article is to demonstrate the effect that the removal of QRS-related activity from atrial electrograms has on the spectrum of these signals. The real importance of our results for clinical application is the enhanced reliability in the identification of atrial DF evidenced by the marked reduction in spectral power of atrial electrograms after 10 Hz resulting from the QRS subtraction.
A cancellation algorithm was presented by Slocum et al. [20] who proposed to average QRST complexes and subtract this averaged pattern from the electrogram. This worked well, but there were residuals due to minor changes in QRST morphology which were caused by movement of the heart with respiration.
Stridh et al. [21] proposed a modification of this technique aimed at reducing the effect of respiration and the improvement was most obvious in leads with weak AF (with low amplitude, in this study, leads V2 and V3). Castells et al. [6] proposed a method similar to that by Slocum et al. [20] where mean QRST complex was computed by principal component analysis (PCA) instead of averaging.
We aimed to evaluating the effects of cancellation on unipolar signals with minimal far field ventricular depolarization using three different approaches, flat, linear and spline interpolations rather than subtracting a pattern.
2 Methods
In this analysis, the algorithm detected ventricular activations from the QRS complexes of a surface ECG lead. The ECG represents the total of the potentials generated by the heart and contains information on all electrical events occurring in the heart [18]. The QRS complex is the dominant characteristic of the ECG signal [22], therefore, reliable QRS detection remains an important area of research. The ECG signal from lead V5 for a patient who has AF is shown in Fig. 1a.
Figure 1b shows unipolar intra-cardiac atrial electrograms measured from inside the atrium. The noncontact mapping system used (Ensite, St. Jude Medical) records 2048 virtual unipolar electrograms from multiple sites simultaneously [11] sampled at 1200 Hz over 20 s. It consists of atrial signals sometimes contaminated with far-field ventricular activity. The patients underwent catheter ablation guided by contact mapping using Ensite, NavX 6.0, St. Jude Medical during electrophysiological procedures of AF.
There was approval from the Local Ethics Committee for mapping and ablation studies for patients undergoing AF ablation which include blood sampling and collection of electrical data during the procedures. Data collected for this study relate to patients who had consented to the above.
It is important to eliminate ventricular signals that contain relatively high frequency components compared with other waves [16]. Therefore, QRS subtraction is the first approach to be implemented for ‘cleaning’ atrial signals before performing spectrum analysis to locate dominant frequencies.
The sweeping of the 3D representation of the atrium of 2048 unipolar electrograms (Fig. 2) is a spiral along the 32 ‘parallels’ from pole to pole stepping down to the next parallel after one full turn (and there are 64 ‘meridians’).
2.1 QRS detection
Accurate QRS detection is important to recognize and classify atrial and ventricular signals. Ventricular component whilst present could not be accurately identified from the noncontact unipolar atrial electrograms. Therefore, we used signals from the surface ECG as a reference to identify ventricular activity. The data collected from surface ECG and the electrograms are sampled simultaneously. A technique based on Thakor et al. [22] was implemented to detect the QRS complexes of the ECG signals. The pass band frequencies, 8–20 Hz were determined based on the minimum and maximum duration of the QRS complex (50–125 ms).
The signal was then rectified and a low-pass filter at 6 Hz applied to the rectified signal. The cut-off frequency of this low-pass filter is determined by the shortest RR interval of the ECG signals (354 beats per minute). FIR filter design using the window method is used for the low pass.
An adaptive threshold technique was used for QRS detection. The adaptive threshold was adjusted and tended to 75% of the running average of the peak of magnitude of the QRS complexes [5]. The peaks were detected using this threshold and to avoid detecting the same beat twice, a refractory period (280 ms) was set, chosen to be a length of time short enough that another beat could not physically occur (214 bpm) [17].
The QRS was replaced by either flat, linear or spline interpolation before frequency analysis was performed. The subtracted points (110 points, with 50 points before and 60 points after the detection) are based on the length of typical QRS complex and the ratio 50/60 was selected because the fiducial point of the detector is the first point above the adaptive threshold.
Interpolation is the estimation of the unknown samples of a signal using a weighted average of a number of known samples by the neighbourhood [24].
2.2 Flat interpolation
In this approach, the subtracted QRS complexes were replaced by a baseline value (near to zero).
2.3 Linear interpolation
Linear interpolation is often used to fill the gaps in a signal. The interpolation consists of fitting a straight line between two data points and choosing interpolated values at the appropriate positions along that line [26]. If we have two known points that have coordinates \( \left( {x_{0} ,y_{0} } \right) \) and \( \left( {x_{1} ,y_{1} } \right) \) as shown in Fig. 3, the data series y along the straight line is obtained from the equation:
where \( x_{0} \) and \( x_{1} \) are the times (positions) of the data collection at the beginning and end of the segment being interpolated and x represents the corresponding time (position) of the desired interpolated value within the interval \( \left[ {x_{0} ,x_{1} } \right]. \)
2.4 Spline interpolation
The term ‘spline’ derives from the flexible drafting tool used by architects to draw piecewise continuous curves [8, 23, 26]. Splines have interesting properties such as highly accurate derivative approximation, good convergence and good stability in the presence of round-off errors [26]. Splines represent a middle ground between a purely analytical description and numerical finite difference methods which break the domain into the smallest possible intervals. With spline interpolation, we approximate the interpolation function \( y\left( x \right) \) over the interval \( \left[ {x_{0} ,x_{1} } \right] \) by dividing the interval into sub regions with the requirement that there be continuity of the function at the joints. We can define a spline function, \( y\left( x \right), \) of degree N (with N = 3 for cubic splines) with values at the joints \( x_{0} = u_{0} \le u_{1} \le u_{2} \ldots \ldots \le u_{{N - x_{1} }} \) and having the properties:
-
(1)
In each interval \( u_{i - 1} \le x \le u_{i} \left( {i = 1,m} \right), \) the function y(x) is a polynomial of degree not greater than N.
-
(2)
At each interior point, \( y\left( x \right) \) and its first N − 1 derivatives are continuous.
Consider a data series with elements \( \left( {x_{i} ,y_{i} } \right),i = 1, \ldots ,N. \) The first two derivatives \( y^{\prime}\left( x \right) \) and \( y^{\prime\prime}\left( x \right) \) will be a constant for all x. Here, the prime symbol denotes differentiation with respect to the independent variable x. We write the spline function in the form
And specify the following conditions at the junctions of the segments:
-
(1)
Continuity of the spline function:
$$ f_{i} \left( {x_{i} } \right) = y\left( {x_{i} } \right) = y_{i} = i = 1,2, \ldots ,N - 1; $$$$ f_{i - 1} \left( {x_{i} } \right) = y\left( {x_{i} } \right) = y_{i} = i = 1,2, \ldots ,N; $$
-
(2)
Continuity of first derivative (slope):
$$ f^{\prime}_{i - 1} \left( {x_{i} } \right) = f^{\prime}_{i} \left( {x_{i} } \right),i = 1,2, \ldots ,N - 1; $$
-
(3)
Continuity of second derivative:
$$ f^{\prime\prime}_{i - 1} \left( {x_{i} } \right) = f^{\prime\prime}_{i} \left( {x_{i} } \right),i = 1,2, \ldots ,N - 1 $$
3 Results
3.1 QRS detection of intra-cardiac atrial electrograms
The band-pass filter used MATLAB filtfilt command to filter the reference signals. This eliminates group delay issues because it uses zero-phase forward and reverse digital filtering. Figure 4a shows the signal after the band-pass filter and rectification, and the signal after low-pass filtering is shown in Fig. 4b.
The peaks of the QRS were detected and marked in red. 50 points to the left and 60 points to the right from the peak points are marked in green as shown in Fig. 4b.
3.2 QRS subtraction from atrial electrograms
In the three different approaches, we implemented the 110 subtracted points are replaced by flat, linear or cubic-spline interpolation, as shown in Fig. 5a–c. The flowchart of the QRS detection and subtraction is shown in Fig. 5d.
The black line represents the atrial electrogram after QRS subtraction (using flat, linear or spline interpolation), while the blue dotted line represents the QRS complex before subtraction was done.
3.3 Time analysis
Time-domain methods have been successfully applied in the characterization of AF periods using ECG [25]. Anuradha et al. [2] use time-domain methods to classify the cardiac signals. They used adaptive neuro-fuzzy interface system (ANFIS) and compared their results with those obtained using the analytical method. As a result, they concluded that ANFIS is the better of the two methods for ECG classification. Husser et al. [9] use time–frequency analysis to monitor and predict atrial drug effects during AF. They showed that antiarrhythmic drugs (class I and III) can cause atrial cycle length increase (decrease fibrillatory rate) together with increased refractoriness and decreased conduction velocity. In time-domain analysis, complex fractionated atrial electrograms (CFAE) have been noticed to occur at areas of slowed conduction and pivot points of reentrant wavelets [14]. Their mapping provides evidence for the hypothesis that CFAE areas may be critical sites for AF perpetuation and can serve as target sites for AF ablation.
3.4 Spectral analysis
Spectral analysis allows us to investigate the dominant frequencies in a signal, as they are likely to be important to the physical process. Berenfeld et al. [3] investigated the mechanism that underlies arrhythmias and focussed on the analysis of human AF in the frequency domain. They reviewed the use of the Fourier power spectrum and its DF to study the AF mechanism in patients. In previous papers [4, 12], they introduced the method of frequency sampling to identify the spatial distribution of excitation frequencies during AF. Their technique provides accurate localized sites of periodic activity during AF and their results support the hypothesis that stable localized sources are responsible for AF maintenance in the isolated sheep heart.
DF analysis is a potential tool to analyse atrial rate in AF [15]. The frequency characteristics of different areas of the atria are not the same [4], hence DF analysis is used to detect the areas that have rapid activations [15]. DF, defined as the frequency with the highest power between 4 and 10 Hz, was obtained over 7 s-long segments. The DF estimation of atrial electrograms after QRS subtraction was determined after removing the direct current (DC) component to obtain a stationary time series. DC component is the mean value of the signals and it is important to remove it to avoid a strong power at frequency zero in the spectrum. The analysis was performed using FFT with frequency resolution 0.29 Hz and 50% overlap [7, 10]. The FFT approach is efficient in terms of computation time [1, 7] and produces reasonable results for a large class of signal processes.
4 Discussion
4.1 Effect of different QRS subtraction approaches on DF
Three different approaches of interpolation were tested to see the effect of the mean spectrum and illustrative results are shown in Fig. 6 (fifth patient).
In Table 1, frequencies were the same value for flat, linear and spline interpolations in each patient except for patient 4. For patient 4, the DF for flat and linear interpolations is the same, but DF for spline is showing a slight reduction. Hence, we observed that the method of interpolation made little difference in the DF of the signals. However, the power amplitude at the DF is different, as shown in Table 1.
The mean power for flat and linear interpolations is lower than for spline interpolation. This is due to the nature of the graph for flat and linear approaches; the end power depends on the slope of the segment of signal to be interpolated. If the signal is on a positive slope, the power for linear approach is generally higher than that for flat interpolation, while if the signal is in on a negative slope the power is lower due to the reduction of area under the graph. Spline interpolation will normally result in higher power due to the increase of area under the curve.
Figure 7a shows the mean frequency for all patients (P1, P2, P3, P4 and P5) before and after QRS subtraction using flat interpolation. We observed that the power for mean frequency after QRS subtraction is reduced and this is most significant for frequencies above 10 Hz. The reduction of higher frequency power after QRS subtraction shows the effect of cancellation of the QRS influences on the atrial electrograms.
The analysis for 2048 unipolar atrial electrograms of noncontact mapping shows that the power of the DF is reduced after QRS subtraction. Figure 7b shows the power spectrum before and after QRS subtraction in one patient. The shape of the figure represents the 3D sweeping of the atrium as explained in the Sect. 2.
In previous studies [20, 21], the QRS subtraction was based on the shape of the QRS signal. In those studies, the QRS complex is replaced with some pattern extracted from the signal. In this study, we use flat, linear and spline interpolations and we do not take the shape of the signal into consideration. As for QRS detection, the surface ECG is used as a reference while interpolation is done on the atrial electrograms. The advantages of this approach are that (i) it is not affected by changes in the shape of the QRS and (ii) the DF values are consistent, irrespective of the choice of the interpolation technique. The QRS subtraction using three different interpolations only affects the power of the signals but not the value of DF derived from the electrograms. Finally, mean frequency after QRS subtraction shows low power for frequencies above 10 Hz.
5 Limitation
In this study, the subtraction includes the QRS complex only (not the T wave). Some researchers argue that T waves might introduce spectral contamination at 3–4 Hz and that they should also be removed prior to estimation of DF. We shall investigate this in a future work.
References
Ahmad A, Schlindwein FS, Ng GA (2010) Comparison of computation time for estimation of dominant frequency of atrial electrograms: fast fourier transform, Blackman Tukey, autoregressive and multiple signal classification. J Biomed Sci Eng (JBiSE) 3:843–847
Anuradha B, Kumar KS, Reddy VCV (2008) Classification of cardiac signals using time domain methods. APRN J Eng Appl Sci 3(3):7–12
Berenfeld O (2007) Quantifying activation frequency in atrial fibrillation to establish underlying mechanism and ablation guidance. Heart Rhythm 4:1225–1234
Berenfeld O, Mandapati R, Dixit S et al (2000) Spatially distributed dominant excitation frequencies reveal hidden organization in atrial fibrillation in the Langendorff-perfused sheep heart. J Cardiovasc Electrophysiol Il:869–879
Boardman A, Schlindwein FS, Thakor NV et al (2002) Detection of asphyxia using heart rate variability. Med Biol Eng Comput 40:618–624
Castells F, Mora C, RIeta JJ et al (2005) Estimation of atrial fibrillatory wave from single-lead atrial fibrillation electrocardiograms using principal component analysis concepts. Med Biol Eng Comput 43:557–560
Cooley J, Tukey O (1965) An algorithm for the machine calculation of complex Fourier series. Math Comput 19:297–301
Greville T (1969) Theory and applications of spline functions. Academic Press Inc, New York
Husser D, Stridh M, Sornmo L et al (2004) Frequency analysis of atrial fibrillation from the surface electrocardiogram. Indian Pacing Electrophysiol J 4(3):122–136
Kay SM, Marple SL (1981) Spectrum analysis—a modern perspective. Proc IEEE 69(11):1380–1419
Lin Y-J, Higa S, Kao T et al (2007) Validation of the frequency spectra obtained from the noncontact unipolar electrograms during atrial fibrillation. J Cardiovasc Electrophysiol 18:1147–1153
Mandapati R, Skanes A, Chen J et al (2000) Stable microreentrant sources as a mechanism of atrial fibrillation in the isolated sheep heart. Circulation 101:194–199
Mandapati R, Skanes A, Chen J et al (2000) Stable microreentrant sources as a mechanism of atrial fibrillation in the isolated sheep heart. Circulation 101:194–199
Nademanee K, McKenzie J, Kosar E et al (2004) A new approach for catheter ablation of atrial fibrillation: mapping of the electrophysiologic substrate. J Am Col Cardiol 43(11):2044–2053
Ng J, Goldberger JJ (2007) Understanding and interpreting dominant frequency analysis of AF electrograms. J Cardiovasc Electrophysiol 18:680–685
Okada M (1979) A digital filter for the QRS complex detection. IEEE Trans Biomed Eng BME 26(12):700–703
Pan J, Willis Tompkins J (1985) A real-time QRS detection algorithm. IEEE Trans Biomed Eng BME-32(3):230–236
Shah D, Yamane T, Choi K-J et al (2004) QRS subtraction and the ECG analysis of atrial ectopics. ANE 9(4):389–398
Skanes AC, Mandapati R, Berenfeld O et al (1998) Spatiotemporal periodicity during atrial fibrillation in the isolated sheep heart. Circulation 98:1236–1248
Slocum J, Byrom E, McCarthy L et al (1985) Computer detection of atrioventricular dissociation from surface electrocardiograms during wide QRS complex tachycardias. Circulation 72:1028–1036
Stridh M, Sörnmo L (2001) Spatiotemporal QRST cancellation techniques for analysis of atrial fibrillation. IEEE Trans Biomed Eng 48:1
Thakor NV, John Webster G, Tompkins WJ (1984) Estimation of QRS complex power spectra for design of a QRS filter. IEEE Trans Biomed Eng BME-31(11):702–706
Schumaker L (1993) Spline function: basic theory. Krieger Publishing Company, Malabar
Vaseghi SV (2008) Advanced digital signal processing and noise reduction, 3rd edn. Wiley, Chichester
Vaya C, Rieta J (2007) ECG signal quantization effects in the analysis of atrial fibrillation. In: Computers in cardiology. Durham, NC, pp 477–480
William JE, Thomson RE (2001) Data analysis methods in physical oceanography. Gulf Professional Publishing, Oxford
Acknowledgements
The study described in this article is part of the research portfolio supported by the Leicester NIHR Biomedical Research Unit in Cardiovascular Disease. This research is also funded by the Ministry of Higher Education of Malaysia and Universiti Teknologi Malaysia. In addition, João Loures is supported by The National Council for Scientific and Technological Development (CNPq) of Brazil, process no. 200598/2009-0.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Ahmad, A., Salinet, J.L., Brown, P. et al. QRS subtraction for atrial electrograms: flat, linear and spline interpolations. Med Biol Eng Comput 49, 1321–1328 (2011). https://doi.org/10.1007/s11517-011-0829-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11517-011-0829-9