Abstract
An ECG-derived respiration (EDR) algorithm based on principal component analysis (PCA) is presented and applied to derive the respiratory signals from single-lead ECG. The respiratory-induced variabilities of ECG features, P-peak amplitude, Q-peak amplitude, R-peak amplitude, S-peak amplitude, T-peak amplitude and RR-interval, are fused by PCA to yield a better surrogate respiratory signal than other methods. The method is evaluated on data from the MIT-BIH polysomnographic database and validated against a “gold standard” respiratory obtained from simultaneously recorded respiration data. The performance of fusion algorithm is assessed by comparing the EDR signals to a reference respiratory signal, using the quantitative evaluation indexes that include true positive (TP), false positive (FP), false negative (FN), sensitivity (SE) and positive predictivity (PP). The statistically difference is significant among the PCA data fusion method and the EDR methods based on the RR intervals and the RS amplitudes, showing that PCA data fusion algorithm outperforms the others in the extraction of respiratory signals from single-lead ECGs.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
Introduction
Respiration wave is an important physiological signal. It plays an important role in diagnosis and treatment of many diseases, such as obstructive sleep apnea [1, 2]. The respiratory signal is usually obtained with techniques like impedance pneumography, spirometry, or plethysmography. However, such techniques are unmanageable in certain applications such as stress testing, ambulatory monitoring and sleep studies due to the use of some cumbersome devices that may interfere with natural breath [3]. In contrast to traditional methods, electrocardiogram (ECG)-derived respiration (EDR) derives a respiratory signal from the electrocardiogram which is measured noninvasively via a few electrodes [4]. The ECG signal records easily and has less interference with natural breathing which makes the EDR method more suitable for ambulatory monitoring and home monitoring.
Respiration influences ECG parameters in two ways, mechanical interaction and respiratory sinus arrhythmia (RSA). Mechanical interaction is caused by two factors: (1) the motion of the electrodes relative to the heart during the respiratory cycle. (2) The thoracic impedance variations caused by the volume changes in the lungs [3, 5]. Respiratory sinus arrhythmia is an important phenomenon in heart rate variability (HRV). It shows how respiration modulates heart rate. The heart rate increases during inspiration and decreases during expiration. The mechanism is that heart rate changes due to respiratory-induced changes to the autonomic nervous system [6].
Due to these factors, a number of EDR algorithms have been described in the literatures. These algorithms provided surrogate respiratory signals based on the respiratory-induced changes of the ECG. The first EDR method based on morphologic variations was proposed by Wang and Calvert [7] which used the vectorcardiogram (VCG) to monitor the respiratory rate and depth. Then some EDR methods based on the amplitude of ECG features like R peak [8, 9], RS [10], T peak [11] or the area under the QRS complex [12] were proposed. A few studies got surrogate respiratory signals through VCG [13] or filtering of the ECG [14,15,16]. The methods based on RSA derived EDR signals by applying singular value decomposition (SVD) [17] or S-transform [18] to RR interval series. The methods mentioned above obtained the EDR signals only based on a single piece of information in ECG and this might be improved through data fusion method. Nemati et al. [19] presented a data fusion method based on Kalman-filter to estimate the respiratory rate which proved that data fusion EDR algorithm was more robust to background noise and more accurate. However, this method required multiple physiological sources like ECG, photoplethysmogram, arterial blood pressure and the peripheral arterial tonometry waveforms, and it only derived respiratory rate rather than respiratory waveform. Langley et al. [6] introduced principal component analysis (PCA) to EDR algorithm. They used PCA to look into morphological beat-to-beat variations and applied PCA algorithm to QRS complex and regarded the eigenvectors as EDR signal. They proved that the PCA algorithm outperformed the EDR algorithm based on RS amplitude. Widjaja et al. [5] improved this method by using Kernel PCA to take the nonlinearities in the data into account. These two ways performed well in obtaining EDR signals but they only utilized a part of the respiratory-induced information in ECG. In this article, we combined the ideas of data fusion and PCA to put forward a new EDR algorithm. It should be pointed out that the way we use PCA is completely different to the approach in the two studies mentioned above.
This article is organized as follows. The following section describes the database used in this study. In “ECG-derived respiration” section, the data preprocessing is introduced firstly. Next, the data fusion EDR algorithm based on PCA is presented in detail. The EDR methods based on RR intervals and RS amplitudes are shown at last for comparing. “Comparisons of EDR with standard respiratory signal” section describes the methods for quantitative assessment of respiratory derivation algorithms. The statistical analysis algorithm is given in “Statistical analysis” section. “Result” section presents the result of the proposed method, followed by the “Discussion” and “Conclusion” sections.
Methods
Database
The MIT-BIH Polysomnography Database includes 18 continuous records which come from 16 male subjects who suffer from sleep apnoea. Records slp01a and slp01b are segments of one subject’s polysomnogram, records slp02a and slp02b are segments of another subject’s polysomnogram. The remaining 14 records belong to different subjects. The records are digitized at 250 Hz with 12 bit resolution and continue between 2 and 7 h [20]. The ECG, electromyogram (EMG), electroculogram (EOG), arterial blood pressure, respiration and arterial blood oxygen saturation are included in the database. The respiration signals are recorded by inductance plethysmography or a nasal thermistor. The ECG and respiration signals were used in this article.
ECG-derived respiration
Data preprocessing
There are three main types of noise in ECG: electromyographical interference, powerline interference and baseline wander. In this article, the electromyographical interference was removed through discrete wavelet transform. Here, we took coif4 as wavelet basis to decompose the ECG into five levels. The soft-threshold equaling to 20% of the mean of the first detail component was employed to this component to remove the electromyographical interference. Next, the powerline interference was handled using average filtering whose width was 10, and the baseline wander was eliminated by polynomial fitting. Then the ECG features detection algorithm based on wavelet [21] was applied on the denoised ECG to get the positons and amplitudes of ECG feature points like P, Q, R, S, T and RR interval.
Then we put forward a histogram denoising method to avoid random noise and guarantee the stability of the EDR signal. The number of the bins in histogram was 100 in this study and more bins have no contribution to the effect of denoising. For example, we got the histogram of all R-peak amplitudes. Then two thresholds were confirmed according to that the ratio of the number of R-peaks, whose amplitudes were located in the region determined by these two thresholds, to all the R-peaks exceeded a fixed value. The ratio was 98% in this article. Finally, the R-peak amplitudes which exceeded the threshold were specified to the threshold. The P-peak amplitudes, Q-peak amplitudes, S-peak amplitudes, T-peak amplitudes and RR intervals were also denoised by this method.
PCA data fusion algorithm
-
(a)
Construction of the input matrix
The input matrix X with dimensions m × 6 consisted of 6 variables including P-peak amplitude (PA), Q-peak amplitude (QA), R-peak amplitude (RA), S-peak amplitude (SA), T-peak amplitude (TA) and RR interval (RR). The 6 variables in each row of X came from the same cardiac cycle. m was the number of heartbeats included in ECG.
-
(b)
Principal component analysis
The input matrix X was described as
$${\mathbf{X}}\left( {\text{n}} \right)=\left[ {{\varvec{P}}{\varvec{A}}\left( n \right)~{\varvec{Q}}{\varvec{A}}\left( n \right)~{\varvec{R}}{\varvec{A}}\left( n \right)~{\varvec{S}}{\varvec{A}}\left( n \right)~{\varvec{T}}{\varvec{A}}\left( n \right)~{\varvec{R}}{\varvec{R}}\left( n \right)} \right]=\left[ {{{\varvec{x}}_1}\left( n \right)~{{\varvec{x}}_2}\left( n \right)~{{\varvec{x}}_3}\left( n \right)~{{\varvec{x}}_4}\left( n \right)~{{\varvec{x}}_5}\left( n \right)~{{\varvec{x}}_6}\left( n \right)} \right]~,~n=1,2, \cdots ,m$$(1)Firstly, the means of the \({{\varvec{x}}_{\varvec{i}}}\) were removed from X to get matrix \({\varvec{X}}^{\prime}\)
$${\mathbf{X^{\prime}}}\left( {\text{n}} \right)=\left[ {{{{\varvec{x}}^{\prime}}_1}\left( n \right)~{{{\varvec{x}}^{\prime}}_2}\left( n \right)~{{{\varvec{x}}^{\prime}}_3}\left( n \right)~{{{\varvec{x}}^{\prime}}_4}\left( n \right)~{{{\varvec{x}}^{\prime}}_5}\left( n \right)~{{{\varvec{x}}^{\prime}}_6}\left( n \right)} \right]~,\,n=1,2, \cdots ,m$$(2)Then the covariance matrix C of input matrix \({\varvec{X}}^{\prime}\) was calculated through
$${\mathbf{C}}=\frac{1}{6}\mathop \sum \limits_{{j=1}}^{6} {{\varvec{x}}^{\prime}_j}{{\varvec{x}}^{\prime}_j}^{T}$$(3)Leading to a 6 × 6 matrix.
The solution to
$$\lambda {\varvec{\nu }}={\mathbf{Cv}}$$(4)yielded the eigenvectors \({\mathbf{v}}=[{{\varvec{v}}_{1~}}{{\varvec{v}}_{2~}}{{\varvec{v}}_{3~}}{{\varvec{v}}_{4~}}{{\varvec{v}}_{5~}}{{\varvec{v}}_6}]\)and eigenvalues \({\mathbf{\lambda }}=[{\lambda _{1~}}{\lambda _{2~}}{\lambda _{3~}}{\lambda _{4~}}{\lambda _{5~}}{\lambda _6}].\) The eigenvectors were arranged in order of magnitudes of the corresponding eigenvalues.
Finally, the principal components (PCs) were obtained using
$${\mathbf{PC}}={\varvec{X}}^{\prime}{\mathbf{V}}$$(5)The first k PCs were retained when the sum of \({\lambda _{1~}}\) to \({\lambda _{k~}}\)was greater than a ratio of the sum of all the eigenvalues. Here, we fixed the ratio to 60%.
$$\mathop \sum \limits_{{i=1}}^{k} {\lambda _i} \ge ratio \times \mathop \sum \limits_{{i=1}}^{6} {\lambda _i},~ratio=60\%$$(6)The surrogate EDR signal was defined as the sum of the retained PCs.
$${\mathbf{EDR}}={\varvec{P}}{{\varvec{C}}_1}+ \cdots +{\varvec{P}}{{\varvec{C}}_{\varvec{k}}}$$(7)The surrogate EDR signal can be also expressed as
$${\mathbf{EDR}}={\varvec{X}}^{\prime} \cdot \mathop \sum \limits_{{i=1}}^{k} {{\varvec{v}}_{\varvec{i}}}$$(8) -
(c)
Interpolation and post-processing
The surrogate EDR signals were interpolated to 250 Hz as for the respiratory signal using cubic spline interpolation for comparison. The baseline of the EDR was obtained by applying a 1-D digital filter with the window of 10 s to the EDR signal. Then the baseline was subtracted from the original EDR signal. At last a Kaiser low-pass filter was used whose cut-off frequency was 0.5 Hz and the passband ripple and stopband attenuation were 0.01 and 0.001 respectively. The reason for choosing 0.5 Hz as cut-off frequency was that normal human’s respiration frequency was less than 0.5 Hz [14].
EDR methods based on RR interval and RS amplitude
The algorithm proposed in this article was compared with the EDR signals derived from RR intervals and RS amplitudes.
The RR interval time series and RS amplitude series were constructed as
and
The \(R\left( n \right)\) was the time of the n-th R-peaks in the ECG.
Both of the two series were denoised by the histogram method introduced in “Data preprocessing” section. Finally, the surrogate respiratory signals were generated by applying interpolation and post-processing to the denoised series.
Comparisons of EDR with standard respiratory signal
The assessment method proposed by Mason and Tarassenko [22] was used to compare the EDR signals with the simultaneously recorded reference respiratory signals.
Mason and Tarassenko put forward a quantitative assessment of respiratory derivation algorithms. In their article, the time at which a breath was detected in the EDR signal was compared with the time of the corresponding reference respiratory signal. For breath detection the time window about the reference breath time within which the derived breath should be found was ascertained as 2 s. And every respiration peak or trough was labelled to define a breath beat.
For a detail introduction, a reference respiratory signal and an EDR signal were shown in Fig. 1. There was an antiphase relationship between the two signals. The detailed explanation can be seen in [23]. But not all of the subjects in database were antiphase. In this example, the troughs of the reference signal were served as the breaths and the peaks of the EDR will be considered as breaths. Then the times of the reference respiration breaths will be compared with the times of the EDR breaths [22].
Then the mutually exclusive categories of true positives (TP), false positives (FP), false negatives (FN), sensitivity (SE) and positive predictivity (PP) were employed as the detection statistics. A breath beat in EDR signals that located in the time-match window corresponding to the reference breath will be counted as a TP, and an FP was that had no corresponding breath beat in reference respiration. An FN was a breath beat in the reference respiration that was not matched by a breath in EDR. SE and PP were described as follows:
Statistical analysis
Friedman Test is used for performance compared in sensitivity and positive predictivity among the PCA data fusion method and those for RR intervals and RS amplitudes. It is a nonparametric statistic that investigates whether multiple samples belong to the same overall. It is considered statistically significant when p < 0.05.
Result
Visual comparison
The ECG, reference respiratory and EDR signals of subject slp02b are shown in Fig. 2. The relationships among the reference signals and EDR signals are antiphase. All of the EDR methods can recover the surrogate signals, but visual evaluation of EDR-PCA performs better. In the rectangle of the figure, there is a false wave in EDR-RS signal because of the noise in S wave of ECG. However, the performance of the EDR-PCA is still good, which proves that the PCA data fusion method has a better ability to resist noise.
The morphological differences in three EDR signals in Figs. 3 and 4 show that the PCA data fusion method outperforms the other two methods not only in avoiding noise, also the appearance of the EDR-PCA is superior.
Quantitative comparison
The comparison results from the three methods for extracting respiration from ECG are shown in Table 1. The number of TPs, FNs, FPs, SE and PP are shown for each record. For quantitative comparison across the whole database, the gross statistics for each algorithm are also calculated.
The comparison of the three different algorithms over all subjects in SE and PP are shown in Figs. 5 and 6. Friedman Test displays significant differences in SE of the three EDR methods (p < 0.05), which proves that EDR-PCA is significantly better than EDR-RR and the EDR-RS. However, no statistically significant results are obtained in PP though EDR-PCA is also better than EDR-RS and EDR-RR.
Discussion
In general, PCA is a data dimension reduction method. In this article, we applied it to EDR analysis and obtained better results than the RS-based and RR-based algorithm. There was a significant difference among the three methods in SE but no significant difference was found in PP. The PCA data fusion algorithm also had the advantage that the EDR-PCA was relatively noise free and the appearance of the EDR was more similar to the reference respiration.
In fact, we considered PCA as an approach of data fusion. We can see that, the EDR signal was a linear combination of ECG features such like PA, QA, RA, SA, TA and RR from the formula (2–8). The essence of PCA was to obtain excellent coefficients of the linear combination. So, the method based on RS amplitudes can be considered as a particular case of PCA whose coefficients of RA and SA were 1 and − 1 respectively with the coefficients of other features were 0. The RR intervals algorithm was similar to the method of RS amplitudes. As we know, the theories of EDR methods based on RR intervals and RS amplitudes were RSA and mechanical interaction respectively which were proposed in “Introduction” section. From this point of view, the PCA data fusion method took advantage of all information in single-lead ECG influenced by respiration. Hence, the PCA data fusion method had better robustness and resistance to noise as shown in Figs. 2 and 3. Therefore, it was reasonable that the EDR-PCA outperformed the EDR-RS and EDR-RR.
The coefficients of the linear combination obtained by PCA approach is shown in Table 2. We can see that the coefficients of R, S and T were bigger than the other three coefficients generally. This phenomenon showed that R, S and T sequences were the three most valuable factors to construct EDR signals and proved that these three sequences contained more information of respiration. It was easily to be understood as three articles had obtained the EDR signal based on one of the three sequences separately [8, 10, 11]. The P, Q and RR intervals signals were equally important for modifying the details of EDR signals and resisting noise.
Sleep apnoea occurred in the rectangle region of Fig. 4. It was able to more clearly identify sleep apnoea in EDR-PCA than other EDR signals which showed that the PCA data fusion EDR algorithm had potential in distinguishing sleep apnoea. This will improve the comfort in sleep monitoring for patients without cumbersome devices.
Here, we applied PCA to the whole record. Maybe, we can improve our algorithm by cutting the whole record into several segments to which the PCA will be applied. But this will increase the computation time in turn. The tradeoff between accuracy and time needed more tests. We confirmed the ratio in formula (2–8) to 60% and the ratio in histogram denoising to 98% based on several experiments. The value of the parameters of filters at pre-processing and post-processing sections was fixed in the same way. It required more experiments to get the optimal values for all the records. Nevertheless, the PCA method outperformed the other two methods, even though the ratios were not optimal.
Conclusion
At present, almost all EDR methods obtained the EDR signals based on a single feature from the ECG like R wave or S wave. In this study, we presented a new method for obtaining the ECG-derived respiration signal which combined the ideas of data fusion and PCA technique. The PCA method was applied as a data fusion method to take all of the respiratory-induced variabilities of ECG features into consideration. The results of the algorithm were compared with other two methods. All tests were conducted using MATLAB and the results proved PCA data fusion method to be a promising algorithm to obtain surrogate respiratory signal. It was computationally simple, and applicable to single lead ECG. It acquired excellent ECG-derived respiratory signals without the need for additional transducers or hardware which was suitable for home monitoring and ambulatory monitoring.
References
Tiinanen S, Noponen K, Tulppo M, Kiviniemi A, Seppänen T (2015) Ecg-derived respiration methods: adapted ica and pca. Med Eng Phys 37(5):512–517
Almazaydeh L, Elleithy K, Faezipour M (2012) Detection of obstructive sleep apnea through ECG signal features. In: IEEE international conference on electro/information technology, vol 3. IEEE, pp 1–6
Clifford GD, Azuaje F, McSharry P (2006) Advanced methods and tools for ECG data analysis. Artech House, Inc., Boston
Mason L (2002) Signal processing methods for non-invasive respiration monitoring. University of Oxford, Oxford
Widjaja D, Varon C, Dorado A, Suykens JA, Van Huffel S (2012) Application of kernel principal component analysis for single-lead-ECG-derived respiration. IEEE Trans Biomed Eng 59(4):1169–1176
Langley P, Bowers EJ, Murray A (2010) Principal component analysis as a tool for analyzing beat-to-beat changes in ECG features: application to ECG-derived respiration. IEEE Trans Biomed Eng 57(4):821–829
Wang RC, Calvert TW (1974) A model to estimate respiration from vectorcardiogram measurements. Ann Biomed Eng 2(1):47–57
Felblinger J, Boesch C (1997) Amplitude demodulation of the electrocardiogram signal (ECG) for respiration monitoring and compensation during MR examinations. Magn Reson Med 38(1):129–136
Vargas-Luna JL, Mayr W, Cortés-Ramírez JA (2013) Amplitude modulation approach for real-time algorithms of ecg-derived respiration. Revista Mexicana De Ingenieria Biomedica 35(1):53–69
Dobrev D, Daskalov I (1999) Two-electrode telemetric instrument for infant heart rate and apnea monitoring. Med Eng Phys 20(10):729–734
Raymond B, Cayton RM, Bates RA, Chappell M (2000) Screening for obstructive sleep apnoea based on the electrocardiogram-the computers in cardiology challenge. In: Computers in cardiology. IEEE, pp 267–270
Moody GB, Mark RG, Zoccola A, Mantero S (1985) Derivation of respiratory signals from multi-lead ECGs. Comput Cardiol 12(1985):113–116
Leanderson S, Laguna P, Sörnmo L (2003) Estimation of the respiratory frequency using spatial information in the VCG. Med Eng Phys 25(6):501–507
Yi WJ, Park KS (2002) Derivation of respiration from ECG measured without subject’s awareness using wavelet transform. In: Engineering in medicine and biology. 24th annual conference and the annual fall meeting of the biomedical engineering society EMBS/BMES conference. Proceedings of the second joint, vol 1. IEEE, pp 130–131
Labate D, Foresta FL, Occhiuto G, Morabito FC (2013) Empirical mode decomposition vs. wavelet decomposition for the extraction of respiratory signal from single-channel ecg: a comparison. IEEE Sens J 13(7):2666–2674
Campolo M, Labate D, Foresta FL, Morabito FC, Lay-Ekuakille A, Vergallo P (2011) ECG-derived respiratory signal using empirical mode decomposition. In: IEEE international workshop on medical measurements and applications proceedings. IEEE, pp 399–403
Pilgram B, Di Rienzo M (1993) Estimating respiratory rate from instantaneous frequencies of long team heart rate tracings. In: Computers in cardiology, proceedings. IEEE, pp 859–862
Varanini M, De Paolis G, Emdin M, Macerata AAMA, Pola SAPS, Cipriani MACM, Marchesi CAMC (1997) Spectral analysis of cardiovascular time series by the S-transform. In: Computers in cardiology. IEEE, pp 383–386
Nemati S, Malhotra A, Clifford GD (2010) Data fusion for improved respiration rate estimation. EURASIP J Adv Signal Process 2010(1), 1
Ichimaru Y, Moody GB (1999) Development of the polysomnographic database on CD-ROM. Psychiatry Clin Neurosci 53(2):175–177
Yang X, Yan H, Ren Z, Chen J (2010) An ECG feature points detection algorithm based on wavelet. In: National conference on information acquisition and processing (in Chinese)
Mason CL, Tarassenko L (2001) Quantitative assessment of respiratory derivation algorithms. In: Engineering in medicine and biology society. Proceedings of the 23rd annual international conference of the IEEE, vol 2. IEEE, pp 1998–2001
Zhao L, Reisman S, Findley T (1994) Derivation of respiration from electrocardiogram during heart rate variability studies (pp 53–56). IEEE, Long Beach
Acknowledgements
This work was supported by Advanced Space Medico-Engineering Research Project of China, No. 2014SY54A1102, supported by National Natural Science Foundation of China (61401417), supported by the foundation of China Space Medical Engineering advanced research (2015SY54A0501), supported by State Key Laboratory of Space Medicine Fundamentals and Applications, China Astronaut Research and Training Center (SMFA15A01, SMFA13B03).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Ethical approval
All procedures performed in studies involving human participants were in accordance with the ethical standards of the institutional and/or national research committee and with the 1964 Helsinki declaration and its later amendments or comparable ethical standards. This article does not contain any studies with animals performed by any of the authors.
Informed consent
Informed consent was obtained from all individual participants included in the study.
Rights and permissions
About this article
Cite this article
Gao, Y., Yan, H., Xu, Z. et al. A principal component analysis based data fusion method for ECG-derived respiration from single-lead ECG. Australas Phys Eng Sci Med 41, 59–67 (2018). https://doi.org/10.1007/s13246-017-0612-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s13246-017-0612-9