Open-source software for respiratory rate estimation using single-lead electrocardiograms

Sci Rep. 2024 Jan 2;14(1):167. doi: 10.1038/s41598-023-50470-0.

Abstract

Respiratory rate (RR) is a critical vital sign used to assess pulmonary function. Currently, RR estimating instrumentation is specialized and bulky, therefore unsuitable for remote health monitoring. Previously, RR was estimated using proprietary software that extract surface electrocardiogram (ECG) waveform features obtained at several thoracic locations. However, developing a non-proprietary method that uses minimal ECG leads, generally available from mobile cardiac monitors is highly desirable. Here, we introduce an open-source and well-documented Python-based algorithm that estimates RR requiring only single-stream ECG signals. The algorithm was first developed using ECGs from awake, spontaneously breathing adult human subjects. The algorithm-estimated RRs exhibited close linear correlation to the subjects' true RR values demonstrating an R2 of 0.9092 and root mean square error of 2.2 bpm. The algorithm robustness was then tested using ECGs generated by the ischemic hearts of anesthetized, mechanically ventilated sheep. Although the ECG waveforms during ischemia exhibited severe morphologic changes, the algorithm-determined RRs exhibited high fidelity with a resolution of 1 bpm, an absolute error of 0.07 ± 0.07 bpm, and a relative error of 0.67 ± 0.64%. This optimized Python-based RR estimation technique will likely be widely adapted for remote lung function assessment in patients with cardiopulmonary disease.

MeSH terms

  • Adult
  • Algorithms
  • Animals
  • Electrocardiography
  • Humans
  • Respiration*
  • Respiratory Rate*
  • Sheep
  • Signal Processing, Computer-Assisted
  • Software