Jump to ContentJump to Main Navigation
Show Summary Details
More options …

Current Directions in Biomedical Engineering

Joint Journal of the German Society for Biomedical Engineering in VDE and the Austrian and Swiss Societies for Biomedical Engineering

Editor-in-Chief: Dössel, Olaf

Editorial Board: Augat, Peter / Buzug, Thorsten M. / Haueisen, Jens / Jockenhoevel, Stefan / Knaup-Gregori, Petra / Kraft, Marc / Lenarz, Thomas / Leonhardt, Steffen / Malberg, Hagen / Penzel, Thomas / Plank, Gernot / Radermacher, Klaus M. / Schkommodau, Erik / Stieglitz, Thomas / Urban, Gerald A.

1 Issue per year

Open Access
See all formats and pricing
More options …

Estimation of a respiratory signal from a single-lead ECG using the 4th order central moments

Marcus Schmidt / Johannes W Krug / Andy Schumann
  • Psychiatric Brain & Body Research Group Jena, Department of Psychiatry and Psychotherapy, University Hospital Jena, Germany
  • Other articles by this author:
  • De Gruyter OnlineGoogle Scholar
/ Karl-Jürgen Bär
  • Psychiatric Brain & Body Research Group Jena, Department of Psychiatry and Psychotherapy, University Hospital Jena, Germany
  • Other articles by this author:
  • De Gruyter OnlineGoogle Scholar
/ Georg Rose
Published Online: 2015-09-12 | DOI: https://doi.org/10.1515/cdbme-2015-0016


For a variety of clinical applications like magnetic resonance imaging (MRI) the monitoring of vital signs is a common standard in clinical daily routine. Besides the electrocardiogram (ECG), the respiratory activity is an important vital parameter and might reveal pathological changes. Thoracic movement and the resulting impedance change between ECG electrodes enable the estimation of the respiratory signal from the ECG. This ECG-derived respiration (EDR) can be used to calculate the breathing rate without the need for additional devices or monitoring modules. In this paper a new method is presented to estimate the respiratory signal from a single-lead ECG. The 4th order central moments was used to estimate the EDR signal exploiting the change of the R-wave slopes induced by respiration. This method was compared with two approaches by analyzing the Fantasia database from www.physionet.org. Furthermore, the ECG signals of 24 healthy subjects placed in an 3 T MR-scanner were acquired.

Keywords: central moment; EDR, ECG; monitoring; MRI; respiration

1 Introduction

Magnetic resonance imaging (MRI) has become a widely used diagnostic tool. MRI does not harm the patient since it does not used ionizing radiation. During an MRI scan, the monitoring of vital signs is essential, e.g. when examining patients strongly deseeded or suffering from severe cardiac impairments. In addition to cardiac activities recorded by the electrocardiogram (ECG), respiration is a vital sign of great importance and an indicator of serious illnesses [1]. The spirometry, inductive plethysmography or impedance pneumography are conventional methods to measure the respiratory activity. The respiration rate can also be assessed by analyzing respiratory changes of the ECG (ECG-derived respiration, EDR). Thus, another vital sign can be measured without additional hardware.

In literature a lot of methods for EDR signal estimation have been presented. One group of methods is based on impedance changes between the electrodes caused by filling and discharging of the lungs and the resulting thorax movement [2]. A lot of those approaches do not seem suitable for application to ECGs recorded in the MR-environment because the need to detect Q- or S-peaks in the ECG. This is impaired by the magnetohydrodynamic (MHD) effect that superimposes the ECG-signal altering characteristic shape of the cardiac cycle [3].

Other methods are based on the respiratory-sinus-arrhythmia (RSA), i.e. the change of heart beat intervals depending on the respiration [4]. It is well known that RSA is dependent on age or autonomic status. Thus this approach might be not applicable in elderly subjects or patients with cardiorespiratory impairments [5].

This work presents a method for estimating the EDR signal based on an analysis of the RS-slope. The slope is characterized by the 4th order central moment and evaluated for ECG-signals recorded outside and inside an MR-scanner. A slope based method was chosen because the R-peak and the characteristic slopes of the QRS-complex (QR-slope and RS-slope) are changed only in its amplitude inside the MR-scanner [6] but not in its frequency like the rest of the ECG signal.

2 Theory

Let X be a vector representing a stationary signal with time invariant statistical properties. The mean value of X is given by E(X). The n-th order central moments of the vector X is defined as:


If transients occur in this stationary signal, the n-th order central moment (n 2) can exhibit high values. Hence, it is possible to differentiate transients from the rest of the signal, due to the disruption of stationarity. The fact that QRS complexes represent transients in the ECG was already applied to heartbeat detection inside an MR-scanner up to 3T [9]. Furthermore, the n-th order central moment (n ≥ 2) calculated for samples of edges are a measure of the transient´s slope. For higher orders n more accurate results were achieved intensifying computational effort. This was shown for the 4th order central moment [9] which can be defined in a discrete way as:


3 Methods

3.1 Data acquisition and preprocessing

To compare the new algorithm for EDR estimation to existing methods, data outside and inside an MR-scanner were analyzed. The Fantasia database available at Physionet website [7] and a couple of datasets presented in [8], were used. In both databases only one lead of the ECG-signal was recorded.

The Fantasia database (DBFantasia) consists of 40 datasets recorded from 20 young people (21-34 years old) and 20 elderly people (68-85 years old) whereas each record had a length of 120 min. The ECG and the respiratory excursion were recorded in rest. All signals were digitized with a sampling frequency (fs) of 250 Hz. For the evaluation of the algorithm an undisturbed and artifact-free segment from every dataset lasting 10 min was extracted. The length of 10 min was chosen in order to increase the comparability to the MR records.

The second database (DBMRI) consists of 100 records acquired with an MR-compatible BIOPAC MP150 poly-graph (BIOPAC System Inc., Goleta, CA, USA) outside and inside an MR-scanner (MAGNETOM Trio Tim, Siemens, Germany) during an MRI scan. The sampling rate of the ECG- and the respiratory signal was 500 Hz. To remove artifacts related to the gradients of the MRI, the ECG signals were band-pass filtered with a cutoff frequency of 0.05-35 Hz. In 33 subjects a photoplethysmogram signal was acquired additionally. The recorded finger pulse was used to control for falsely detected R-peaks distorting the estimation of the EDR-signal. 9 of the 33 records were eliminated because of low signal quality of the respiratory signal which was used as a reference. Finally, 24 datasets of healthy controls were analyzed (12 males, 12 females, 24±3years old).

The MR imaging procedure consisted of an anatomical scan, functional gradient-echo echo-planar imaging (GREEPI) and a scan of the magnetic field (GRE field map). During the GRE-EPI sequence the ECG signals and especially the QRS complexes were highly distorted preventing a correct reconstruction of the EDR signal.

Thus, the functional run was excluded from the analysis causing a separation of every dataset into two parts. One (DBMRIP1) began with the subject’s placement in the scanner and ended at the GRE-EPI onset (duration ranged between 4-12 min, overall 228 min). The other part (DBMRIP2) was defined by the end of GRE-EPI run and the time the subjects were moved out of the scanner (8-11 min, overall 237 min). For comparability to the Fantasia database DBFantasia, both MR databases (DBMRI) were re-sampled to 250 Hz.

3.2 Estimation of EDR

For all investigated approaches the correct extraction of R-peaks from the ECG is fundamental derivating the respiratory waveform. A QRS detector based on higher order statistics [9] was shown to reveal reliable results for ECG acquired in an MR scanner.

The ECG-signal was filtered using a 45 Hz 5th order butterworth low-pass filter and a 0.5 Hz 4th order butt-terworth high-pass filter (figure 1, (a)). 4th order central moment defined in equation (2) was calculated in a sliding window of a length L=0.02s·fs=5 samples with a step width D=L/4=1 samples (figure 1, (b)). The Maximum moment found in RS-interval of each annotated QRS-complex was extracted corresponding to the maximum decrease between R- and S-peak. Finally, the selected moment values were interpolated by cubic splines (figure 1, (c)) and band-pass filtered between 0.05 Hz and 1 Hz using butter-worth filter (4th and 5th order) (figure 1, (d)). The algorithm was implemented in Matlab 2013.

For comparison to the method (MMom) described above, EDR signals were also estimated using two other approaches. One method was based on the maximum slope of the RS-line (MSlope) [10]. For the analysis of RSA (MRSA), the temporal difference between the adjacent R-peaks was calculated. The indices computed for every QRS complex were interpolated according to procedure described above (figure 1, (c) and (d)).

Different steps for estimating the EDR signal.
Figure 1

Different steps for estimating the EDR signal.

3.3 Estimation of respiration rate

The maxima of inspiration from the EDR signal were detected in a sliding window of length LResp = {20s, 30s} with a step width DResp = {5s,10s} using the algorithm presented in [11]. In short, the vertical and horizontal distance of respiratory waveforms were used to detect inspiration peaks.

Respiration rate in the current window was calculated by averaging temporal differences of the maxima. The breathing rate fEDR estimated on EDR was compared to the rate extracted from the acquired respiratory signal fRef. Therefore, absolute error of the respiration rates was calculated in breathes per minute (Bpm) for the i-th window by:


Furthermore, the mean relative error was calculated by:


In the equations 3 and 4 the variable N is the number of windows LResp of each dataset.

4 Results

The mean errors of the actual respiration rates and the rates calculated by the three different methods are shown in Table 1 and 2. Window length LResp and shift DResp had

an influence on the errors of the outcome of all investigated methods. The lowest mean errors in all databases were achieved when setting LResp = 30 s and DResp = 10 s.

For the Fantasia database, the smallest mean errors were obtained by MMOM. Errors of MRSA were slightly lower in the young subgroup but increased considerably in elderly for every preset. The opposite effect was observed for MMOM and MSlope. The mean respiration rate for the young group was 17.34 Bpm and for the elderly group 17.54 Bpm.

Table 1

Absolute and relative errors of respiration rate estimates of Fantasia datasets.

In the MRI databases the most accurate breathing rate estimates were obtained by MRSA. Breathing rates estimated by MMOM and MSlope diverged from the reference by about 25% to 36%. The error of MMOM was up to 2.67% smaller in MRIP1 and up to 0.66% higher in MRIP2 compared to MSlope. For the MRI database the mean respiration rate was 16.60 Bpm (MRIP1:16.46 Bpm, MRIP2:16.73 Bpm).

Table 2

Absolute and relative errors of respiration rate estimates of MHD-affected ECGs.

5 Discussion

For the data without MRI influence (DBFantasia) the EDR algorithm based on higher order central moments revealed the most accurate estimates of individual respiration rates. The mean absolute error ranged from 1.18 Bpm to 2.20 Bpm. For comparison 2 Bpm was found to be the maximum deviation of individual breathing rate at rest

[12]. Although there was no intention to compare both age groups of DBFantasia, it stands out that MRSA shows more erroneous results for elderly subjects. In summary, the best results in the Fantasia database were achieved using the higher order central moments.

In both MRIP datasets, MRSA was the most precise estimator of respiration rates and shows marginal differences for the results of the young group of DBFantasia. Whereas the calculated errors of data acquired outside and inside the scanner were almost the same, performances of both MSlope and MMOM declined considerably due to the MRI environment. The reason is most probably the band-pass filter used to remove the gradient artifacts during MRI and the resulting altered morphology of the QRS-complex. Other filter settings might not affect MMOM estimation to this extent. Considering the poor performance of MRSA in the elderly subgroup, it is reasonable to progress investigating higher order central moments or similar approaches utilizing the ECG’s morphology. As a side benefit, the moment-based algorithm could be used in combination with the previously proposed QRS-detector [9]. The calculation of the 4th order central moment is identical and the application of one algorithm would reveal two vital signs, heart rate and breathing rate.

In this paper a new method to estimate the EDR signal from a single lead ECG based on higher order central moments was proposed. To evaluate this approach two databases, outside and inside an MR-scanner, were analyzed. Reliable results were shown outside the scanner but declined markedly due to unselective filtering during MRI. This problem could be circumvented by using other gradient filtering approaches in the future. The potential of the algorithm to explicitly enhance the breathing rate estimation from the ECG was proofed.


Marcus Schmidt and Johannes W. Krug are funded by the Federal Ministry for Economic Affairs and Energy (BMWi, Germany) under grant number KF3172301JL3.


  • [1]

    Cretikos MA, Bellomo R, Hillman K, Chen J, Finfer S, Flabouris A. Respiratory rate: the neglected vital sign. Med J Aust 2008;188:657-659. Google Scholar

  • [2]

    Moody GB, Mark RG, Zoccola A, Mantero S. Derivation of Respiratory Signals from Multi-lead ECGs. Comput In Cardiol 1985;12:113-116. Google Scholar

  • [3]

    Keltner JR, Roos MS, Brakeman PR, Budinger TF. Magnetohydrodynamics of blood flow, Magn Res Med 1990;16:139-149 Google Scholar

  • [4]

    Bernston GG, Cacioppo JT, Quigley KS. Respiratory sinus arrhythmia: Atonomic origins, physiological mechanisms, and psychophysiological implications. Psychophysiology 1993;30:183-196. Google Scholar

  • [5]

    Wieling W, van Brederode JFM, de Rijk LG, Borst C, Dunning AJ. Reflex Control of Heart Rate in Normal Subjects in Relation to Age: A Data Base for Cardiac Vagal Neuropathy. Diabetologia 1982;422:163-166. Google Scholar

  • [6]

    Krug JW, Rose G. Magnetohydrodynamic Distortions of the ECG in Different MR Scanner Configurations. Comput In Cardiol 2011;38:769-772. Google Scholar

  • [7]

    Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG, Mietus JE, Moody GB, Peng C-K, Stanley HE. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 101(23):e215-e220 [Circulation Electronic Pages; http://circ.ahajournals.org/cgi/content/full/101/23/e215]; 2000 (June 13). 

  • [8]

    Beissner F, Schumann A, Brunn F, Eisenträger D, Bär K-J. Advances in functional magnetic resonance imaging of the human brainstem. NeuroImage. 2013;86:91-98. Web of ScienceCrossrefGoogle Scholar

  • [9]

    Schmidt M, Krug JW, Rose G. A real-time QRS detector based on higher-order statistics for ECG gated cardiac MRI. Comput In Cardiol 2014;41:733-736. Google Scholar

  • [10]

    Lazaro J, Alcaine A, Gil E, Laguna P, Bailon R. Electrocardiogram Derived Respiration from QRS Slopes. Eng Med Biol Soc 2013;35:3913-3916. Google Scholar

  • [11]

    Schäfer A, Kratky KW. Estimation of Breathing Rate from Respiratory Sinus Arrhythmia: Comparison of Various Methods. Eng Med Biol Soc 2008;36:476-485.Google Scholar

  • [12]

    Boyle J, Bidargaddi N, Sarela A, Karunanithi M. Automatic Detection of Respiration Rate From Ambulatory Single-Lead ECG. IEEE Trans Inf Technol Biomed 2009;13:890-896. Google Scholar

About the article

Published Online: 2015-09-12

Published in Print: 2015-09-01

Author’s Statement

Conflict of interest: Authors state no conflict of interest.Material and Methods: Informed consent: Informed consent has been obtained from all individuals included in this study. Ethical approval: The research related to human use has been complied with all the relevant national regulations, institutional policies and in accordance the tenets of the Helsinki Declaration, and has been approved by the authors’ institutional review board or equivalent committee.

Citation Information: Current Directions in Biomedical Engineering, Volume 1, Issue 1, Pages 61–64, ISSN (Online) 2364-5504, DOI: https://doi.org/10.1515/cdbme-2015-0016.

Export Citation

© 2015 by Walter de Gruyter GmbH, Berlin/Boston.Get Permission

Comments (0)

Please log in or register to comment.
Log in