Next Article in Journal
Application of Machine Learning Algorithms for Prognostic Assessment in Rotator Cuff Pathologies: A Clinical Data-Based Approach
Next Article in Special Issue
Relationships between Heart Chamber Morphology or Function and Respiratory Parameters in Patients with HFrEF and Various Types of Sleep-Disordered Breathing
Previous Article in Journal
MRI-Based Radiomics Analysis of Levator Ani Muscle for Predicting Urine Incontinence after Robot-Assisted Radical Prostatectomy
Previous Article in Special Issue
Orthodontic and Facial Characteristics of Craniofacial Syndromic Children with Obstructive Sleep Apnea
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

Automatic Heart Rate Detection during Sleep Using Tracheal Audio Recordings from Wireless Acoustic Sensor

School of Computing and Engineering, University of West London, London W5 5RF, UK
Institute of Metrology and Biomedical Engineering, Faculty of Mechatronics, Warsaw University of Technology, 02-525 Warsaw, Poland
Department of Music and Media, Institute of Sound Recording, University of Surrey, Guildford GU2 7XH, UK
Department of Otorhinolaryngology, Faculty of Medicine and Dentistry, Medical University of Warsaw, 02-091 Warsaw, Poland
Author to whom correspondence should be addressed.
Diagnostics 2023, 13(18), 2914;
Submission received: 26 July 2023 / Revised: 30 August 2023 / Accepted: 8 September 2023 / Published: 11 September 2023
(This article belongs to the Special Issue Patient Monitoring and Management in Sleep Medicine)


Background: Heart rate is an essential diagnostic parameter indicating a patient’s condition. The assessment of heart rate is also a crucial parameter in the diagnostics of various sleep disorders, including sleep apnoea, as well as sleep/wake pattern analysis. It is usually measured using an electrocardiograph (ECG)—a device monitoring the electrical activity of the heart using several electrodes attached to a patient’s upper body—or photoplethysmography (PPG). Methods: The following paper investigates an alternative method for heart rate detection and monitoring that operates on tracheal audio recordings. Datasets for this research were obtained from six participants along with ECG Holter (for validation), as well as from fifty participants undergoing a full night polysomnography testing, during which both heart rate measurements and audio recordings were acquired. Results: The presented method implements a digital filtering and peak detection algorithm applied to audio recordings obtained with a wireless sensor using a contact microphone attached in the suprasternal notch. The system was validated using ECG Holter data, achieving over 92% accuracy. Furthermore, the proposed algorithm was evaluated against whole-night polysomnography-derived HR using Bland-Altman’s plots and Pearson’s Correlation Coefficient, reaching the average of 0.82 (0.93 maximum) with 0 BPM error tolerance and 0.89 (0.97 maximum) at ±3 BPM. Conclusions: The results prove that the proposed system serves the purpose of a precise heart rate monitoring tool that can conveniently assess HR during sleep as a part of a home-based sleep disorder diagnostics process.

1. Introduction

The heart rate, thus monitoring the heartbeat frequency and function, is one of the most fundamental parameters in sleep medicine [1]. The analysis of this parameter becomes crucial for the diagnostics of sleep disorders in children, where breathing disorders such as sleep apnoea or snoring vastly influence the activity of the autonomic nervous system, consequently inducing rapid changes in the frequency of the heartbeat [2].
There are several methods used clinically for the detection and analysis of heart rate parameters. The practices used for heart rate monitoring during sleep include electrocardiography (ECG) and pulse oximeter plethysmography wave measurement, also known as the pulse rate. Both methods rely on the R-R interval measurement, where each “R” stands for a successive heartbeat (as part of a QRS complex). Given the recent development of wearable technology, the market offers various smart devices, most commonly in the form of a smartwatch, to provide heartbeat monitoring features ranging from heart rate calculation to atrial fibrillation detection. Nonetheless, the effectiveness and accuracy of these devices remain controversial [3].
Although ECG and the portable Holter ECG monitor are often recognized as the most efficient and successful methods for heart monitoring, the auscultation techniques are preferred for the effective diagnosis of various heart diseases; for instance, the auscultatory diagnostic of heart prosthetic valve dysfunction exhibits 92% sensitivity over other methods [4]. Such an advantage of this method can be crucial for the development of future heart rate measuring devices fully based on automated tracheal auscultation. Due to the proximity of the arteries and the heart, audio recordings collected using a contact microphone placed at the trachea could enable the isolation of recorded heart sounds, therefore presenting an opportunity to detect and calculate the heart rate. Furthermore, tracheal sound recordings can provide reliable information on breathing sounds, including snoring or apnoeic episodes, which provides an opportunity for an accurate obstructive sleep apnoea [5] diagnosis [6].
In recent years, the field of sleep medicine has seen a shift towards simpler, more personal devices for monitoring sleep and breathing during sleep. Traditionally, polysomnography (PSG) has been used to assess sleep and diagnose sleep disorders, but the use of home sleep apnoea testing (HSAT) and other personal sleep monitoring devices is becoming increasingly common [7]. The development of sensors capable of evaluating various signals simultaneously is a key aspect of this trend, as it allows for more comprehensive and accurate assessments of sleep and breathing patterns.
Many wearable devices built for assessing sleep and sleep-disordered breathing are worn on a wrist or a finger, but other approaches have also been explored. For example, sensors placed on the forehead or neck have been used to detect and analyze breathing patterns during sleep [8]. The neck is particularly promising for sensors’ placement—this location provides sensors with the ability to detect, record, and analyze each breath. Furthermore, sensors placed just above the sternum can provide important information about body position during sleep, which is a crucial parameter to analyze in sleep studies [7].
Providing that the sensor’s neck placement allows the efficient detection of breathing patterns based on audio recordings, it can also be a promising placement for heart rate evaluation [9,10]. The primary heartbeat features audible in an audio recording obtained from the neck area are the S1 and the S2 sound components [11]. The S1 and S2, also referred to as lub-dub sounds, signify the phases of the cardiac cycle associated with closing valves during systole and diastole [10]. A wireless sensor equipped with a microphone capable of detecting and recording S1 and S2 episodes could hence provide an efficient heart rate monitor alternative.
Furthermore, diagnostic tools such as PSG or ECG required for precise heart rate assessment can be frequently inaccessible in a private home environment. The potential possibility to calculate the heart rate from audio recordings obtained using a small, easily managed sensor would allow for the regular and more thorough monitoring of the patient’s health. Nonetheless, there are very few studies implementing audio recordings for the detection of heart rate (see Section 4).
Considering the reasoning presented above, the aim of this study was to introduce a heart rate calculation system based solely on heartbeat detection from tracheal audio recordings. The objective was to validate the results obtained using the proposed algorithm and wireless audio sensor against the dataset from an electrocardiogram (for initial algorithm validation), as well as whole-night polysomnography.

2. Materials and Methods

2.1. Participants

A total of 50 participants selected for this research were recruited at the Czerniakowski Hospital, Warsaw, among patients qualified for the polysomnography (PSG) study with NOX A1 system (NOX Medical Inc., Reykjavik, Iceland) (Table 1). This allowed for the simultaneous recording of patients’ heartbeats using traditional methods, as well as the desired audio output using the designed sensor. In accordance with PSG test eligibility, each participant of this study had underlying health issues related to suspected OSA.
Among others, those included loud or profuse snoring, witnessed pauses of breathing or gasping for air during sleep, morning headaches, hypertension, as well as other symptoms related to chronic nasal congestion or upper airway obstruction.
All 50 data samples collected for this study ranged from 3 to 8 h, with an average of 6 h 58 min per participant; 92% of data samples consisted of < 7 h-long recordings. Each data sample consisted of at least 3 h of audio recorded using the sensor’s contact microphone and at least 3 h of heart rate measurements obtained during the polysomnography study.
The validation study was performed on six healthy volunteers who agreed to have a simultaneous 10-min heart rate recording with an ECG Holter and acoustic sensor.

2.2. Sensor and Data Collection Process

For this study, the wireless acoustic sensor (Clebre, Olsztyn, Poland) was used to measure sounds from the upper respiratory tract during sleep, specifically at the level of the trachea. Two digital MEMS (micro-electro-mechanical system) microphone units were selected, both capable of 16-bit registration resolution and digital adjustments of amplification, sensitivity, and subrange. The dimensions of the entire sensor are 33 × 39 × 13 mm, and it weighs 18 g. The microphone used in the sensor is MP34DT06J (by STMicroelectronics, Amsterdam, The Netherlands). It is the MEMS audio sensor omnidirectional digital microphone, characterized by an acoustic overload point at the level of 122.5 dBSPL, 64 dB signal-to-noise ratio, –26 dBFS ±1 dB sensitivity, and very stable frequency response across the entire frequency spectrum. We decided not to implement any noise reduction mechanisms, as this might influence the signal parameters used for the analysis. The audio tract comprises a separated 2 mm audio channel; also, there is a membrane with an area of 6.25 cm2. The use of two microphones enabled simultaneous recording of two distinct signal sources. The first microphone captured ambient noise, while the second, in the form of a contact microphone, was utilized to record sounds directly from a body, particularly a trachea. To ensure stability throughout the night, the sensor was positioned on the subject’s neck, specifically at the sternal notch, and secured in place with medical tape (Figure 1). This configuration optimized signal quality from an analytical perspective, with the microphone, its membrane, and acoustic channel all directed toward the body during data collection.
The recorded acoustic signals were converted into a digital data stream, with a sampling frequency of 8000 Hz established as a balance between transmission restrictions and spectral content. This configuration was selected to enable accurate and reliable recordings of the upper respiratory tract sounds during sleep.

2.3. Signal Pre-Processing Stage

Considering the subject group comprises participants experiencing sleep breathing disorders, the majority of audio recordings obtained during data collection were highly interfered with by loud breathing sounds, such as snoring or loud body movement. To minimize the interference and distinguish all heartbeats, the frequency range of the recordings was significantly reduced by applying a bandpass filter of 20 Hz to 25 Hz, thus eliminating all frequencies above 25 Hz. Such bandpass ensures the removal of most interference while retaining the heartbeat signal that normally resides within the frequency of 20–150 Hz [12]. Although hardly audible for a human ear, the heartbeats were preserved while eliminating most of the snoring and breathing interference.
Given that heart sounds are consistently inaudible unless in direct contact with the chest area, the recording of the ambient microphone had less potential to retain any heart-related audio information. The stereo signal was split, allowing only the channel containing the recording of the contact microphone for further processing.

2.4. Validation

For the validation of the designed system, a dataset was developed using Holter monitor measurements. ECG Holter allows for each single heartbeat monitoring, distinguishing between heartbeat peaks and artifacts, therefore enabling the accurate calculation of true positives and false positives for each heartbeat detected by the algorithm.
A group of six healthy individuals were selected. An ECG Holter and the designed wireless sensor were placed on each participant for 10 min. For the validation dataset, the middle seven minutes of each recording were chosen to avoid any ECG Holter artifacts frequent in the first two minutes of a recording. To allow a thorough validation of the results, two independent approaches were established: the estimation of the average heart rate per minute from each device and the calculation of true positives and false positives for each heartbeat.

2.5. Main Algorithm

The designed algorithm begins its pre-processing by loading the chosen dataset, separating individual channels, and saving the right channel output as a mono file. To accelerate the system’s operation, the acquired mono recording is down-sampled and equalized, removing signal below 20 Hz and over 25 Hz from the frequency spectrum (as described in Section 2.3).
Considering significant variations in signal loudness, dependent on body positioning and the patient’s anatomy, the amplitude of the signal is unified by increasing the amplitude of quieter sections so that the average absolute amplitude value for each section in one recording is equal. For this purpose, the recordings are split into one-second-long sections, each one of length equal to the audio sampling rate.
To ameliorate the performance of the algorithm on all recordings within the entire dataset, the average absolute values of each signal’s amplitude are unified. All signals, unified in amplitude, are then subjected to three cycles of heartbeat peak detection. After detecting all the most prominent heartbeat peaks during the first cycle, the algorithm measures intervals between adjacent peaks and preserves only the first audible beats S1 of each heart contraction cycle, removing the second beats S2.
Subsequently, the intervals between detected S1 peaks are evaluated. The algorithm first assumes that the human heart rate does not fall below 40 beats per minute. Secondly, the distance between subsequent S1 peaks is measured. If the interspace is larger than 1.5 s and therefore corresponds to a heart rate lower than 40, the signal is re-evaluated in the second cycle with the higher sensitivity of heartbeat peak detection. The above cycle is repeated once more with slightly increasing its sensitivity.
To avoid over-calculation of heartbeat peaks and identifying peaks where they are absent, the system assumes that the highest possible human heart rate during sleep does not exceed 180 beats per minute. In its last cycle, the algorithm measures the space between adjacent peaks. If the detected heart rate exceeds 180, the heart rate is re-evaluated, readjusting the heart rate detection threshold for each minute of the recording and deleting the least prominent peaks.

2.6. Statistical Analysis

Before the application of the developed heart rate detection algorithm, all data recorded using the wireless acoustic sensor were analyzed to obtain the baseline descriptive statistics for all patients. For each continuous characteristic (such as weight, height, the percentage of snoring, or AHI parameter), the mean and standard deviation values were calculated; furthermore, the minimum and maximum values of each variable present in the dataset were identified (Table 1). Following the application of the proposed heart rate detection algorithm, the correlation between the heart rate detected by the developed system and the PSG-generated heart rate was evaluated. For that, Pearson’s Correlation Coefficient was implemented.

3. Results

The following part of the paper investigates the performance of the designed algorithm in the validation process, as well as against the polysomnography-derived heart rate, the heart rate comparison, and the true positives and false positives calculation approach for beat-to-beat detection.

3.1. Validation Dataset and ECG Holter

3.1.1. Heart Rate

To validate the algorithm, it was investigated on a separate dataset obtained using the wireless sensor and the ECG Holter. Each 7-min-long validation recording was compared to the corresponding matrix of average heart rate measurements collected using the ECG, as shown in Figure 2. This validation approach resulted in 75% of measurements being identical or within ±1 BPM deviation, with the maximum deviation of three data points.

3.1.2. True Positives and False Positives

For this testing method, a true positive indicates a heartbeat peak correctly identified by the algorithm, meaning within the same area that a peak was registered according to the ECG Holter. Such a comparison can be seen in Figure 3.
A false positive indicates a peak that was identified by the algorithm in the absence of a heartbeat, according to the ECG data. Table 2 represents all true positives and false positives detected for all validation datasets. According to the analyzed data, the average accuracy of this validation testing reaches over 92% (92.34%).

3.2. Study Dataset and PSG

The accuracy of the algorithm proposed was evaluated using Pearson’s correlation coefficient, achieving the average of 0.82 for all data samples, with best results of 0.93, with an error tolerance of 0 (Figure 4, Table 3). While increasing the error tolerance of ±3 beats per minute, the best results of the correlation coefficient reach nearly 0.97 (0.9664), with an average correlation coefficient of 0.89 (0.8932).
For a thorough investigation of the algorithm, the Bland-Altman analysis was used. Each recording of the tracheal audio was evaluated separately, dividing audio into 30 s windows and producing a matrix of average heart rate values for all windows (Figure 5). Obtained data was then compared to a matrix of heart rate values obtained during simultaneous polysomnography testing, with the average heart rate calculated for each 30 s of the testing time. The results of the comparison of both matrices were depicted in separate Bland-Altman plots for each subject. Figure 6 shows Bland-Altman analysis for the entire dataset tested collectively, comparing the PSG-generated HR matrix with the matrix of HR calculated using the proposed algorithm. According to Bland-Altman analysis, the coefficient of variation was equal to 4.56%, and the mean of ±2.93 SD difference between audio HR and polysomnography HR was calculated.

4. Discussion

Heart rate [13] is an important physiological parameter, crucial for the evaluation of sleep quality and diagnosis of various sleep disorders. HR fluctuations remain a crucial parameter in sleep medicine, as they can be used to evaluate sleep/wake patterns without the need for an electroencephalogram [13] signal [14]. Furthermore, changes in HR can be used to identify apnoeic episodes, and in patients with obstructive sleep apnoea, the detection of arrhythmias such as atrial fibrillation can be useful in monitoring and treating the condition [15].
The purpose of this study was to develop a heart rate calculation system based on heartbeat detection solely from tracheal audio recordings. The audio dataset required for this study was recorded using a wireless acoustic sensor placed at the patient’s suprasternal notch. The data for our research was obtained using a small wireless sensor with a built-in contact microphone that is to be placed just above the patient’s sternum. The Clebre sensor has already proven its ability to analyze breathing and snoring episodes, detect apnoea, and assess body positioning during sleep [16,17,18]. The portable wireless sensor used for data collection can easily be applied in a home environment for multi-night recordings, providing an opportunity for more adequate and efficient testing due to space comfortable for a patient. Adding an algorithm to detect heart rate would be highly beneficial for the sensor and the system in terms of performing sleep studies.
Subsequently, heart rate was extracted using the proposed heart rate detection and calculation algorithm and compared with heart rate recordings obtained from the simultaneous polysomnography study. The results were obtained using the correlation coefficient.
Most research on HR focuses on the photoplethysmography (PPG) signal obtained from sensors placed on a finger or, more recently, a wrist. PPG measures the changes in blood volume in the underlying tissues, which occur in response to each pulse rate. This signal can be used to derive the heart rate and other cardiovascular parameters, such as heart rate variability (HRV) and pulse wave velocity (PWV) [3]. Although wrist-worn devices are becoming increasingly popular for HR monitoring during sleep due to their non-invasive nature and convenience, their accuracy remains questionable [3].
Recent studies have shown that smartwatches and bracelets can be effective in assessing HR during sleep. In a study by Gruwez et al. [19], the accuracy of a smartwatch was compared with beat-to-beat synchronized ECG monitoring. The authors found that the correlation coefficient between smartwatch-detected HR and ECG monitoring reached over 0.9, suggesting that smartwatches could be a valuable tool for continuous photoplethysmography monitoring. In the assessment of Samsung HR detection accuracy, Sarhaddi et al. found the smartwatch had a high accuracy in detecting heart rate during both rest and exercise, with a mean absolute error of less than 5 bpm [20]. However, the accuracy of heart rate variability measurement was found to be lower, with a mean absolute error of 22.6 ms. The study suggests that smartwatches can provide accurate heart rate measurements during daily activities, but further improvements are needed for heart rate variability measurements.
A study focused on the use of home devices for HR detection investigated the clinical validation of five direct-to-consumer wearable smart devices to detect atrial fibrillation [3]. The study found that the accuracy of these devices varied significantly, and the sensitivity and specificity were dependent on the specific device. This proves the use of wearable devices as an HR detection system needs further improvement and investigation.
A novel method proposed in this research allows for heart rate detection based on the tracheal audio recordings obtained with a wearable sensor equipped with a contact microphone. A similar approach has been investigated previously by Kalkbrenner et al. [9] in a study aimed at detecting apnoea and changes in heart rate in patients with sleep-related breathing disorders. In their research, Kalkbrenner et al. used a tracheal microphone to obtain audio recordings for potential heart rate recognition and calculation. A large benefit of this algorithm was the simultaneous detection of apnoea episodes. Nonetheless, the method failed for any patients with loud breathing sounds, snoring, or those causing distribution with frequent movement. The results obtained from 10 patients showed that the tracheal sounds accurately detected apnoea and estimated heart rate during sleep with a high level of accuracy (with a correlation coefficient of 0.81) compared to PSG data.
Following a similar approach, Sharma et al. [10] introduced an algorithm for extracting the heart rate from acoustic recordings gathered at the neck level. With the application of Hilbert energy envelope and adaptive thresholding, the authors were able to identify S1 and S2 heartbeats, respectively, and consequently calculate the heart rate. The study investigates nearly 75 h of audio recordings from the neck level, from which 4482 min are then evaluated, and heart rate is extracted. The algorithm achieves a 0.93 correlation coefficient and 94.34% validation accuracy, providing a ±3.61 BPM and ±10% error tolerance. The authors identify a significant amount of sound interference (such as snoring). Thus, the algorithm applies a large amount of pre-processing, including artifact removal, low-pass filter, decimation, and median filter.
The work proposed by Kalkbrenner et al. and Sharma et al. suggests the vast potential of heart rate calculation based on tracheal audio recording. Nonetheless, both methods struggle to identify the heartbeats in a sound environment, such as snoring or change in the patient’s body positioning [9,10]. The advantage of the algorithm presented in our work is its high efficiency regardless of the extent of snoring. For instance, the correlation coefficient for a participant experiencing 68% snoring and AHI of 32.2 equals 0.92. Table 4 presents the correlation coefficients for participants with the highest snoring percentage, as well as the highest AHI. It also depicts AHI and snoring parameter values for a participant with the highest correlation coefficient for a thorough comparison.
Furthermore, the wireless sensor proposed in this work was equipped with an accelerometer, which enables the detection of body placement and activity during sleep, thereby facilitating the future exclusion of fragments disturbed by movement avoiding the recording of movement artifacts or fragments disturbed by prolonged loud snoring.
In another related study, Freycenon et al. proposed a method for estimating heart rate from tracheal sounds recorded during sleep [21]. The study involved 16 patients undergoing PSG for the diagnosis of sleep apnoea syndrome while simultaneously having their HR measured using ECG. The Authors used 1-h recording from each patient instead of the whole-night results. The study applied a deep learning approach to extract the heart rate signal from the tracheal sound recordings and found that their method achieved an accuracy between 81% and 98% in estimating heart rate, with an error rate of 5 beats per minute.
Another advantage of the system presented in this work is the highest average correlation coefficient providing 0 error tolerance, whilst the majority of related research investigates the results based on ±3 BPM error tolerance. While incrementing the error tolerance to ±3 BPM, our average correlation coefficient increased significantly, reaching 0.97 at its maximum. Furthermore, in this research, we propose the largest training dataset (over 378 h) in the current state-of-the-art. A thorough comparison of the current state-of-the-art is shown in Table 5.
In our study, 50 participants were recruited, each experiencing certain types of sleep disorders, from habitual snoring to severe obstructive sleep apnoea. From each participant, the audio data was collected using the sensor during a full-night polysomnography study.

Study Limitations

The development of a novel wireless acoustic sensor deploying tracheal recording for accurate heart rate detection is a challenging matter due to the nature of sleeping disorders and the current golden standard for their diagnosis—PSG testing. Throughout the study, limitations were thoroughly investigated, and the methods were adjusted to address all issues.
The first recorded limitation pertained to the quality of the desired audio content. We did not study patients who would have any pathologies in their trachea or larynx. Subglottic, or tracheal stenosis, unilateral or bilateral vocal fold paralysis, could produce additional sounds that could influence the quality of our algorithms. This problem needs to be addressed in future studies. Due to the character of sleeping disorders, the majority of research subjects were experiencing various breathing difficulties, such as snoring, which strongly interferes with the desired audio signal. To ensure the maximum preservation of a heartbeat sound, the according frequency bandpass was implemented, eliminating the vast majority of interference. However, provided that snoring causes a vibrational response of the vocal tract, parts of the filtered signal remained affected by the snoring activity. Nonetheless, the sound of a heartbeat overlapping disturbances caused by snoring was recorded, causing subtle regular changes in the signal’s amplitude.
Considering that the placement of the sensor changes slightly depending on the patient’s body positioning during sleep, certain fragments can be significantly decreased in loudness. Furthermore, the volume of audio recordings varies significantly depending on each subject’s anatomical structure; in the case of a patient’s obesity, the presence of a larger amount of tissue can lead to a drop in a heartbeat’s loudness. To reduce this factor’s impact on the algorithm’s workflow, the amplitude of each signal is averaged and normalized equally for each subject. Future studies may increase our knowledge about the differences in the loudness of breathing vs. heart rate signals in accordance with the sleep position. This is because our sensor detects the sleep position and can allow such analysis. Also, thanks to the accelerometer used, we can remove signal analysis during body movement when the acoustic noise is intensive.
To ensure the correct detection of all present heartbeats while avoiding the incorrect interpretation of signal peaks where a heartbeat is absent, it was crucial to determine the maximum and minimum values of beats per minute. According to medical literature, the maximum human heart rate cannot exceed 220 beats per minute, regardless of age [22], whereas a heart rate falling below 60 beats per minute is recognized as bradycardia [23]. However, considering this research pertains to asleep individuals, a slight decline in heart rate is expected. For the purposes of this research, the specific minimal and maximal heart rate of 40 and 180 beats per minute was established, respectively. This is because we did not enroll patients with any known cardiac arrhythmias. Additional studies on patients with irregular heart rhythms are needed to show the performance of this algorithm in such cases.

5. Conclusions

Audio recordings of heart rate seem much easier and more user-friendly in the home environment than the ECG. This study of heart rate detection and calculation based on tracheal audio recordings proves the high accuracy and reliability of the proposed method. Employing the proposed wireless acoustic sensor and the developed heart rate calculation algorithm provides a promising result and a solid base for further investigation. Considering the dataset for this study was obtained by placing the wireless acoustic sensor at the suprasternal notch, the next step in this research includes the comparison of the algorithm-generated results depending on the placement of the sensor—suprasternal notch versus its placement at the heart level. Subsequent future research efforts will include a real-time application of the algorithm, as well as a possible thorough investigation of sleep/wake patterns based on combined algorithms analyzing heart rate, breathing parameters, and body position.

Author Contributions

Conceptualization, W.K. and J.Z.T.; methodology, W.K. and J.Z.T.; software, J.Z.T.; validation, J.Z.T., W.K. and M.M.; formal analysis, W.K., J.Z.T., M.Ł. and M.M.; investigation, W.K. and J.Z.T.; resources, W.K. and M.M.; data curation, J.Z.T. and M.Ł.; writing—original draft preparation, J.Z.T. and W.K.; writing—review and editing, W.K., A.G., C.C. and M.M.; visualization, J.Z.T.; supervision, W.K. and M.M.; project administration, W.K. and M.M.; funding acquisition, W.K. and M.M. All authors have read and agreed to the published version of the manuscript.


This research was performed as a project number POIR.01.01.01-00-0212/19 titled: “Wireless sensor and telemedical system for the diagnosis of sleep disordered breathing” co-financed by European Union from the European Regional Development Fund, Smart Growth 2014-2020 Operational Diagnostics 2022, 12, 1195 8 of 9 Program. The Project is implemented under the competition of the Polish National Center for Research and Development.

Institutional Review Board Statement

The study was conducted according to the guidelines of the Declaration of Helsinki and approved by the Ethics Committee of the Medical University of Warsaw (KB/14/2018) on 6 February 2018.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

Data supporting the reported results are available from the corresponding author on reasonable request.


We thank Renata Główczyńska and Daniel Śliż for their help with Holter ECG studies.

Conflicts of Interest

W.K. and M.M. are shareholders of Clebre but received no remuneration for performing this study. The funders had no role in the design of the study, in the collection, analyses, or interpretation of data, in the writing of the manuscript, or in the decision to publish the results.


  1. Macey, P.M.; Kumar, R.; Woo, M.A.; Yan-Go, F.L.; Harper, R.M. Heart rate responses to autonomic challenges in obstructive sleep apnea. PLoS ONE 2013, 8, e76631. [Google Scholar] [CrossRef] [PubMed]
  2. Halbower, A.C.; Degaonkar, M.; Barker, P.B.; Earley, C.J.; Marcus, C.L.; Smith, P.L.; Prahme, M.C.; Mahone, E.M. Childhood obstructive sleep apnea associates with neuropsychological deficits and neuronal brain injury. PLoS Med. 2006, 3, e301. [Google Scholar] [CrossRef] [PubMed]
  3. Mannhart, D.; Lischer, M.; Knecht, S.; du Fay de Lavallaz, J.; Strebel, I.; Serban, T.; Vogeli, D.; Schaer, B.; Osswald, S.; Mueller, C.; et al. Clinical Validation of 5 Direct-to-Consumer Wearable Smart Devices to Detect Atrial Fibrillation: BASEL Wearable Study. JACC Clin. Electrophysiol. 2023, 9, 232–242. [Google Scholar] [CrossRef]
  4. Mintz, G.S.; Carlson, E.B.; Kotler, M.N. Comparison of noninvasive techniques in evaluation of the nontissue cardiac valve prosthesis. Am. J. Cardiol. 1982, 49, 39–44. [Google Scholar] [CrossRef] [PubMed]
  5. Figueras-Alvarez, O.; Cantó-Navés, O.; Cabratosa-Termes, J.; Roig-Cayón, M.; Felipe-Spada, N.; Tomàs-Aliberas, J. Snoring intensity assessment with three different smartphones using the SnoreLab application in one participant. J. Clin. Sleep Med. 2020, 16, 1971–1974. [Google Scholar] [CrossRef] [PubMed]
  6. Penzel, T.; Sabil, A. The use of tracheal sounds for the diagnosis of sleep apnoea. Breathe 2017, 13, e37–e45. [Google Scholar] [CrossRef]
  7. Kapur, V.K.; Auckley, D.H.; Chowdhuri, S.; Kuhlmann, D.C.; Mehra, R.; Ramar, K.; Harrod, C.G. Clinical Practice Guideline for Diagnostic Testing for Adult Obstructive Sleep Apnea: An American Academy of Sleep Medicine Clinical Practice Guideline. J. Clin. Sleep Med. 2017, 13, 479–504. [Google Scholar] [CrossRef]
  8. Azarbarzin, A.; Sands, S.A.; Taranto-Montemurro, L.; Vena, D.; Sofer, T.; Kim, S.W.; Stone, K.L.; White, D.P.; Wellman, A.; Redline, S. The Sleep Apnea-Specific Hypoxic Burden Predicts Incident Heart Failure. Chest 2020, 158, 739–750. [Google Scholar] [CrossRef]
  9. Kalkbrenner, C.; Eichenlaub, M.; Rudiger, S.; Kropf-Sanchen, C.; Rottbauer, W.; Brucher, R. Apnea and heart rate detection from tracheal body sounds for the diagnosis of sleep-related breathing disorders. Med. Biol. Eng. Comput. 2018, 56, 671–681. [Google Scholar] [CrossRef]
  10. Sharma, P.; Imtiaz, S.A.; Rodriguez-Villegas, E. An Algorithm for Heart Rate Extraction From Acoustic Recordings at the Neck. IEEE Trans. Biomed. Eng. 2019, 66, 246–256. [Google Scholar] [CrossRef]
  11. Kumar, D.; Carvalho, P.; Antunes, M.; Henriques, J.; Eugenio, L.; Schmidt, R.; Habetha, J. Detection of S1 and S2 heart sounds by high frequency signatures. In Proceedings of the 2006 International Conference of the IEEE Engineering in Medicine and Biology Society, New York, NY, USA, 30 August–3 September 2006; pp. 1410–1416. [Google Scholar] [CrossRef]
  12. Mondal, A.; Bhattacharya, P.; Saha, G. An automated tool for localization of heart sound components S1, S2, S3 and S4 in pulmonary sounds using Hilbert transform and Heron’s formula. Springerplus 2013, 2, 512. [Google Scholar] [CrossRef] [PubMed]
  13. Bogaerts, M.; Schrooten, W.; Lemkens, N.; Indesteege, F.; Postelmans, T.; Lemkens, P. Patient reported outcome measures (PROMs) in children with sleep-disordered breathing undergoing adenotonsillectomy. B-ENT 2013, 9, 185–191. [Google Scholar] [PubMed]
  14. de Groot, E.R.; Knoop, M.S.; van den Hoogen, A.; Wang, X.; Long, X.; Pillen, S.; Benders, M.; Dudink, J. The value of cardiorespiratory parameters for sleep state classification in preterm infants: A systematic review. Sleep Med. Rev. 2021, 58, 101462. [Google Scholar] [CrossRef]
  15. Zhang, L.; Hou, Y.; Po, S.S. Obstructive Sleep Apnoea and Atrial Fibrillation. Arrhythm. Electrophysiol. Rev. 2015, 4, 14–18. [Google Scholar] [CrossRef]
  16. Kukwa, W.; Lis, T.; Laba, J.; Mitchell, R.B.; Mlynczak, M. Sleep Position Detection with a Wireless Audio-Motion Sensor—A Validation Study. Diagnostics 2022, 12, 1195. [Google Scholar] [CrossRef]
  17. Mlynczak, M.; Migacz, E.; Migacz, M.; Kukwa, W. Detecting Breathing and Snoring Episodes Using a Wireless Tracheal Sensor-A Feasibility Study. IEEE J. Biomed. Health Inform. 2017, 21, 1504–1510. [Google Scholar] [CrossRef]
  18. Młyńczak, M.; Valdez, T.A.; Kukwa, W. Joint apnea and body position analysis for home sleep studies using a wireless audio and motion sensor. IEEE Access 2020, 8, 170579–170587. [Google Scholar] [CrossRef]
  19. Gruwez, H.; Evens, S.; Desteghe, L.; Dreesen, P.; Knaepen, L.; Wouters, F.; Dauw, J.; Deferm, S.; Smeets, C.; Pison, L.; et al. Assessment of heart rate agreement on continuous photoplethysmography monitoring using a smartwatch versus beat-to-beat synchronized ECG monitoring. Eur. Heart J. 2021, 42, ehab724.0319. [Google Scholar] [CrossRef]
  20. Sarhaddi, F.; Kazemi, K.; Azimi, I.; Cao, R.; Niela-Vilen, H.; Axelin, A.; Liljeberg, P.; Rahmani, A.M. A comprehensive accuracy assessment of Samsung smartwatch heart rate and heart rate variability. PLoS ONE 2022, 17, e0268361. [Google Scholar] [CrossRef]
  21. Freycenon, N.; Longo, R.; Simon, L. Estimation of Heart Rate From Tracheal Sounds Recorded for the Sleep Apnea Syndrome Diagnosis. IEEE Trans. Biomed. Eng. 2021, 68, 3039–3047. [Google Scholar] [CrossRef] [PubMed]
  22. Robergs, R.A.; Landwehr, R. The surprising history of the “HRmax= 220-age” equation. J. Exerc. Physiol. Online 2002, 5, 1–10. [Google Scholar]
  23. Sidhu, S.; Marine, J.E. Evaluating and managing bradycardia. Trends Cardiovasc. Med. 2020, 30, 265–272. [Google Scholar] [CrossRef] [PubMed]
Figure 1. The placement of the wireless acoustic sensor.
Figure 1. The placement of the wireless acoustic sensor.
Diagnostics 13 02914 g001
Figure 2. Comparison of ECG heart rate measurements (blue) with the heart rate acquired using the wireless sensor and the proposed algorithm (orange)—data shown for a single participant.
Figure 2. Comparison of ECG heart rate measurements (blue) with the heart rate acquired using the wireless sensor and the proposed algorithm (orange)—data shown for a single participant.
Diagnostics 13 02914 g002
Figure 3. Comparison of audio recording (blue), peaks detected by the algorithm (red), and the peaks indicated by the ECG dataset (yellow)—data shown for a single participant.
Figure 3. Comparison of audio recording (blue), peaks detected by the algorithm (red), and the peaks indicated by the ECG dataset (yellow)—data shown for a single participant.
Diagnostics 13 02914 g003
Figure 4. Correlation plot depicting the relation between the heart rate obtained from polysomnography (x-axis) and the heart rate calculated by the algorithm designed in this study (y-axis).
Figure 4. Correlation plot depicting the relation between the heart rate obtained from polysomnography (x-axis) and the heart rate calculated by the algorithm designed in this study (y-axis).
Diagnostics 13 02914 g004
Figure 5. An example of PSG-derived heart rate (blue) compared to the algorithm-generated heart rate (orange)—data shown for a single participant.
Figure 5. An example of PSG-derived heart rate (blue) compared to the algorithm-generated heart rate (orange)—data shown for a single participant.
Diagnostics 13 02914 g005
Figure 6. Bland-Altman analysis plot depicting the relation between the heart rate obtained from polysomnography and the heart rate calculated by the algorithm designed in this study.
Figure 6. Bland-Altman analysis plot depicting the relation between the heart rate obtained from polysomnography and the heart rate calculated by the algorithm designed in this study.
Diagnostics 13 02914 g006
Table 1. Demographic overview of the research group involved in the study, depicting minimum and maximum values within the dataset, as well as mean and standard deviation values for the entire dataset. TRT—Total Recording Time. TST—Total Sleep Time. AHI—Apnoea-Hypopnoea Index. ODI—Oxygen Desaturation Index.
Table 1. Demographic overview of the research group involved in the study, depicting minimum and maximum values within the dataset, as well as mean and standard deviation values for the entire dataset. TRT—Total Recording Time. TST—Total Sleep Time. AHI—Apnoea-Hypopnoea Index. ODI—Oxygen Desaturation Index.
ParameterMalesFemalesTotalMean-Max for Total
Age49.15 ± 13.160.12 ± 11.552.88 ± 13.529.0–77.0
Height (cm)177.09 ± 5.9161.53 ± 8.3171.80 ± 10.0150.0–186.0
Weight (kg)100.00 ± 22.280.71 ± 21.293.44 ± 23.553.0–158.0
TRT07:00:11 ± 0.006:55:39 ± 0.106:58:38 ± 0.003:05:00–08:14:00
TST06:06:40 ± 0.005:33:18 ± 0.105:55:19 ± 0.002:25:00–07:35:00
AHI29.66 ± 19.626.86 ± 22.228.71 ± 20.32.4–93.3
ODI27.79 ± 19.525.15 ± 23.326.90 ± 20.71.4–93.9
Snoring (%)40.79 ± 20.635.92 ± 19.839.14 ± 20.20.8–80.1
Time % <90% SaO213.57 ± 17.416.48 ± 24.714.56 ± 20.00.0–67.9
Table 2. True positives and false positives are calculated for each validation dataset.
Table 2. True positives and false positives are calculated for each validation dataset.
Dataset Nr
Total Number of S1 Peaks DetectedTrue Positives (TP)False Positives (FP)TP %
Table 3. Correlation Coefficient for Spearman’s and Pearson’s Correlation at ±0 BPM error tolerance. The last column represents the correlation coefficient at ±3 BPM.
Table 3. Correlation Coefficient for Spearman’s and Pearson’s Correlation at ±0 BPM error tolerance. The last column represents the correlation coefficient at ±3 BPM.
Spearman’s Correlation CoefficientPearson’s
Correlation Coefficient
Correlation Coefficient at ±3 BPM
Error Tolerance
0.8025 ± 0.0880.8203 ± 0.0760.8932 ± 0.069
Table 4. AHI, snoring parameter, and correlation coefficient were calculated for participants with the highest AHI within the dataset, highest snoring within the dataset, and highest correlation coefficient, respectively.
Table 4. AHI, snoring parameter, and correlation coefficient were calculated for participants with the highest AHI within the dataset, highest snoring within the dataset, and highest correlation coefficient, respectively.
Participant with:GenderAgeAHISnoring %Correlation Coefficient
Highest AHIMale3493.346.8%0.90
Highest Snoring %Female7654.680.1%0.76
Highest Correlation CoefficientFemale4414.234.0%0.93
Table 5. Summary of State-Of-The-Art methods for estimation of heart rate from tracheal audio recordings.
Table 5. Summary of State-Of-The-Art methods for estimation of heart rate from tracheal audio recordings.
LiteratureProposed MethodValidation MethodNumber of SubjectsRecording TimeResultsAdvantages of the Method
Kalkbrenner et al., 2017 [9]
  • Signal amplification
Subjects undergoing full night polysomnography correlated with developed system1069 h 45 min0.816 correlation coefficientHigh correlation coefficient (relative to currently presented work).
  • 10–50 Hz bandpass filter
  • Peak detection
et al., 2021 [21]
  • Adaptive Prediction Filter
ECG signal as a reference method for validation subject.Study: 16Study: 16 hStudy: average at ±3 BPM = 81–98%High validation results (relative to currently presented work).
  • Cross-correlation
Validation: 1Validation: 8 h 30 minValid.: average at ±3 BPM = 94.5%
et al., 2018 [10]
  • Hilbert energy envelope
Subjects undergoing polysomnography correlated with developed system1375 hAccuracy at ±3.61 BPM = 94.34%High validation results provide a relatively large dataset.
  • Adaptive thresholding
Correlation coefficient at ±3.61 BPM = 0.93
  • Peak Normalisation
Heart rate calculated by proposed algorithm compared with simultaneous ECG measurements—False Positive and True Positive calculation.Study: 50Study:
378 h 40 min
Study: average correlation coefficient at zero error tolerance (±0 BPM) = 0.82, highest correlation coefficient at zero error tolerance = 0.93 Highest correlation coefficient, providing 0 error tolerance (±0 BPM).
  • 20–25 Hz bandpass filter
Largest study dataset in the state-of-the-art.
  • Peak detection
Validation: 6Validation: 42 minValidation: 92.34%Largest validation dataset in the state-of-the-art.
  • S1 peak preservation, S2 peak rejection
S1 and S2 peak detection and differentiation.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Tomaszewska, J.Z.; Młyńczak, M.; Georgakis, A.; Chousidis, C.; Ładogórska, M.; Kukwa, W. Automatic Heart Rate Detection during Sleep Using Tracheal Audio Recordings from Wireless Acoustic Sensor. Diagnostics 2023, 13, 2914.

AMA Style

Tomaszewska JZ, Młyńczak M, Georgakis A, Chousidis C, Ładogórska M, Kukwa W. Automatic Heart Rate Detection during Sleep Using Tracheal Audio Recordings from Wireless Acoustic Sensor. Diagnostics. 2023; 13(18):2914.

Chicago/Turabian Style

Tomaszewska, Julia Zofia, Marcel Młyńczak, Apostolos Georgakis, Christos Chousidis, Magdalena Ładogórska, and Wojciech Kukwa. 2023. "Automatic Heart Rate Detection during Sleep Using Tracheal Audio Recordings from Wireless Acoustic Sensor" Diagnostics 13, no. 18: 2914.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop