The continuous measurement of the respiratory rate is particularly important in the medical environment as well as in the area of sports applications. Here, the most widely used approach is the measurement of the movements due to breathing using a chest strap or an impedance-based pneumographic device , . However, there are also algorithms that derive the respiratory frequency noninvasively from other biosignals. It has been shown that the amplitude of the QRS-complex is modulated by chest movements during breathing, which results in a changing R-peak amplitude that correlates highly with the actual respiratory signal (taken from a chest strap or a flow sensor) . From this signal one can estimate the breathing rate using a great variety of algorithms. The most commonly used methods are the Fast-Fourier Transform (FFT-method) and the zero-crossing method. The former estimates the rate from the strongest frequency component in the respiration signal, whereas the latter is based on determining the average duration of each breath , .
Interferences in the estimated respiration signal can lead to deviations in the estimated respiration rate. In this paper we propose a new method that allows a less interference-prone estimation of the respiratory rate. We applied the method to respiration signals derived both from ECG and a chest strap and evaluated the results in comparison to FFT and zero-crossing based respiration rate estimation methods.
2.1 Estimation of the respiratory rate
As a first step the respiratory signal is extracted from the ECG-signal sampled with the sampling frequency fs. For this purpose, a Hamilton-Tompkins algorithm  is used to detect all QRS-complexes in the ECG signal (comp. Figure 1). Next, the amplitude of the R-to-S peak is computed, which provides a robust estimation of the signal amplitude with respect to the baseline . These extracted amplitudes are then interpolated by means of cubic splines to obtain the respiratory signal with the same sampling frequency as the ECG signal. An example for an extracted respiratory signal can be seen in Figure 1. Aside from a phase shift there is a high correlation between the extracted and the reference signal.
In order to estimate the respiration rate, the fundamental frequency of the extracted respiratory signal has to be calculated. As mentioned above, this can be done using methods like the FFT in the frequency domain  or the zero-crossing method in the time domain . In this paper we present a different approach which is based on the autocorrelation function of the estimated respiratory signal. The autocorrelation function Ψ(i) of the respiratory signal xresp is defined in Eq. 1 :
Here, N and i denote the number of samples and the displacement of the signal towards itself, respectively. Generally, the autocorrelation function describes the similarity of a signal to a shifted version of itself. In the case of periodic signals, this function shows periodic maxima. The displacements i at which those maxima occur correspond to integer multiples of the fundamental period of the signal (here, i.e. the respiratory signal). Employing the Wiener-Khinchin theorem  allows an efficient calculation of Eq. 1 on the basis of an FFT. Next, the intervals ti of all neighbouring local maxima of the autocorrelation function are determined. Disturbances in the extracted respiratory signal or its non-stationarity may cause additional local maxima. Figure 2 shows one such example. Here it can be seen that high-frequency disturbances of a respiratory signal lead to local maxima (denoted in red) in the autocorrelation function that are unrelated to the fundamental period of the respiratory signal. To suppress the influence of these additional maxima an empirically estimated threshold is used so that only maxima exceeding this threshold were included in subsequent calculations. To further weaken the influence of highly deviating time intervals their median is usesd as the final estimate for the duration of a breath cycle. The respiratory frequency in breaths per minute (bpm) can then be calculated using Eq. 2.
The first reference method to estimate respiratory rates is the FFT. It is used to calculate the spectrum of the respiratory signal. The frequency component fmax with the highest amplitude is thaken as the respiratory frequency. This frequencies can be converted to the respiratory rate in bpm using Eq. 3.
For the zero-crossing method, i.e. the second reference method, the first step is to center the signal at zero by subtracting the mean respiratory signal from each sample. After that, all zero-crossings ti are detected. The respiratory rate can finally be estimated by calculating the mean of all detected zero-crossings using Eq. 4.
2.2 Simulation setup
Simultaneous recordings of ECG and respiration were used to evaluate the method. The recordings of 13 subjects with a length of 30 min each were taken from the Combined Measurement of ECG, Breathing and Seismocardiogram (CEBS) database , . All datasets contained an ECG-signal as well as a respiratory signal measured by a chest strap. The datasets were converted to a MATLAB-readable format using the WFDB toolbox . From each dataset ECG and respiratory signal were obtained and resampled to a sampling frequency of fs = 250 Hz. Both signals were subdivided into sliding windows of length Tmeas = 30 s and an overlap of 15 s. Baseline removal was applied to the ECG-signal . Furthermore, the 50 Hz powerline interference was removed using an IIR-Notch-Filter. The respiratory signal was smoothed using an FIR-lowpass-filter (fcut = 2 Hz). The method described in section 2.1 was used for the estimation of the respiratory rate by means of directly measured respiratory signals (chest strap) and ECG signals. Subsequently, the results are then compared to the ones obtained for the FFT-method and the zero-crossing method.
Figure 3 shows the raw results of all evaluated methods. The horizontal axis represents estimated respiratory rate based on the ECG and the vertical axis represents the respiratory rate based on the chest strap signal. All methods show a high correlation between respiratory rates estimated from ECG and chest strap. Both the autocorrelation method (r = 0.86, p < 10−3) and the zero-crossing method (r = 0.88, p < 10−3) exhibit a strong linear relationship between both estimated respiratory rates whereas this relation is much weaker for the FFT-method (r = 0,6, p < 10−3). The statistical significance of the correlation was tested using a t-test. It can be seen that the reference-based respiratory rate estimated by means of the FFT-method shows discrete values. This is due to the finite frequency resolution. The ECG-based respiration frequency does not show this effect. This is due to the spline interpolation of the R-to-S peak amplitudes leading to slightly varying sample-sizes for each time window and thus to varying frequency resolutions depending on the length of the time window Tmeas.
The error between ECG- and chest-strap-based respiration rates for each method is displayed in Figure 4. A Kolmogorov-Smirnov Test was used to compare the error distibutions. It turned out that all distributions were statistically significantly different (p < 10−3). While the median of the autocorrelation method is located around zero, the median of the FFT-method lies above zero and shows a higher spread. The median of the zero-crossing method is also close to zero. However, its error distribution exhibits an asymmetric deviation from the median. Values for mean and variance of the error are shown in Table 1. It can be seen that the autocorrelation method has a smaller error in average than any of the reference methods. In contrast to the zero-crossing method there is a huge difference regarding the variance of the error between autocorrelation- and FFT-method.
An inter-subject analysis emphasizes these findings. It can bee seen in Figure 5 that the error of the zero-crossing method shows a higher spread than the error of the autocorrelation method. We have omitted the FFT-method since we consider it unsuited here due to its discrete-valued results.
We compared ECG-derived and chest-strap-derived respiratory rates using three different methods, i.e. FFT, zero-crossing and the newly proposed autocorrelation method. It became apparent that there is a high correlation between the results of zero-crossing and the autocorrelation. Yet, the correlation between the FFT-method and the two others is considerably lower. The results also show a low variance of the error for zero-crossing and autocorrelation as opposed to the FFT-method. However, the ECG-based respiratory rate estimates by means of zero-crossing are systematically lower than the chest-based estimation. Apparently, the autocorrelation method is less prone to interferences in the respiratory signal than the other methods. These interferences can be caused by either artifacts in the ECG signal or as a result of natural changes of the breath frequency in the analysed time interval. Another disadvantage of the FFT-method is its finite frequency resolution in the time window under consideration. It is also possible that an insufficient baseline removal leads to low-frequency components in the derived respiratory signal and therefore to a larger error. This effect was reduced by calculating the amplitude of the R-peak with respect to the S-peak but can not be completely eliminated.
Algorithms used for preprocessing can also have a deteriorating effect on the estimation of the respiratory frequency. FIR-filters used to enhance the signal-to-noise ratio almost always also remove important signal components, which in turn can lead to changed R-peak amplitudes. Other techniques (i.e. wavelet filters) might help to mitigiate this effect.
We have shown that the proposed autocorrelation method is generally feasible for the estimation of the respiration rate from both ECG-based and chest strap based respiratory signals. It is applicable to the long-term monitoring of patients in a clinical environment without directly measuring the respiratory signal. This is particularly useful, e.g. during rehabilitation after a surgical intervention. The used data exhibits a rather low variability in terms of respiratory frequency. An evaluation of our method using very low and very high respiratory frequencies is necessary to further substantiate its usefulness. An extension of our method to PPG signals may also be conceivable.
Research funding: This work was funded by the Federal Ministry of Education and Research (BMBF) (FKZ 03FH032IX5). 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 conducted research is not related to either human or animal use.
Grenvik A, Ballou S, McGinley E, Millen JE, Cooley WL, Safar P. Impedance pneumography: comparison between chest impedance changes and respiratory volumes in 11 healthy volunteers. Chest J. 1972;62:439–43. Google Scholar
Gupta AK. Respiration rate measurement basetd on impedance pneumography. Texas Instruments, Tech. Rep. February, 2011. Google Scholar
Moody GB, Mark RG, Zoccola A, Mantero S. Derivation of respiratory signals from multi-lead ECGs. Compu Cardiol. 1985;12:113–6. Google Scholar
Karlen W, Mattiussi C, Florean D. Sleep and wake classification with ECG and respiratory effort signals. IEEE Trans Bio-Med Circuits Syst. 2009;3:71–8. Google Scholar
Hamilton P, Tompkins WJ. Quantitative investigation of QRS detection rules using the MIT/BIH arrhythmia database. IEEE Trans Bio-Med Eng. 1986;33:1157–65. Google Scholar
Dobrev D, Daskalov I. Two-electrode telemetric instrument for infant heart rate and apnea monitoring. Med Eng Phys. 1999;20:729–34. Google Scholar
McLeod P, Wyvill G. A smarter way to find pitch. In: Proceedings of International Computer Music Conference, ICMC; 2005. Google Scholar
Box GE, Jenkins GM, Reinsel GC. Autocorrelation function and spectrum of stationary processes. In: Time series analysis. 4th ed. John Wiley & Sons, Inc., 2013, ch. Autocorrel, p. 19–47. Google Scholar
García-González M, Argelagós A, Fernández-Chimeno M, Ramos-Castro J. Differences in QRS locations due to ECG lead: relationship with breathing. In: XIII Mediterranean Conference on Medical and Biological Engineering and Computing 2013, 2014;13:962–4. Google Scholar
Goldberger AL, Amaral LA, Glass L, Hausdorff JM, Ivanov PC, Mark RG, et al. Physiobank, physiotoolkit, and physionet components of a new research resource for complex physiologic signals. Circulation. 2000;101:215–20. Google Scholar
Silva I, Moody GB. An open-source toolbox for analysing and processing physionet databases in MATLAB and Octave. J Open Res Softw. 2014;2:e27. Google Scholar
Zhang F, Chen S, Zhang H, Zhang X, Li G. Bioelectric signal detrending using smoothness prior approach. Med Eng Phys. 2014;36:1007–13. Google Scholar
About the article
Published Online: 2016-09-30
Published in Print: 2016-09-01
Citation Information: Current Directions in Biomedical Engineering, Volume 2, Issue 1, Pages 241–245, ISSN (Online) 2364-5504, DOI: https://doi.org/10.1515/cdbme-2016-0054.
©2016 Fabian Schrumpf et al., licensee De Gruyter.. This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License. BY-NC-ND 4.0