Indirect Estimation of Breathing Rate Using Wearable Devices

Wearable sensors can be exploited for the indirect estimation of physiological parameters, such as breathing rate (BR). Indeed, BR is a significative quantity for both general health status monitoring and diagnostic purposes; however, standard methods for its assessment are often uncomfortable and mainly used for punctual (or brief, anyway) measurements. This article aims to perform an uncertainty analysis of BR indirect estimation made starting from electrocardiographic signals gathered through wearable sensors, namely, a cardiac belt (Zephyr BioHarness 3.0) and a smartwatch (Samsung Galaxy Watch3). Three different estimation methods were employed, considering respiratory sinus arrhythmia (RSA), signal amplitude modulation (AM), and machine learning (ML)-based techniques. Finally, the Monte Carlo simulation method was exploited for the measurement uncertainty estimation, including both sensors (hardware) and algorithms (software) contributions in the measurement chain. The results show that both the considered sensors are quite accurate (almost null bias) and precise (±[3, 5] bpm, depending on the estimation method) in the estimation of BR with the three different estimation algorithms. A slightly higher precision is obtained for the cardiac belt (a reduced 95% confidence interval is reported, with a maximum reduction of 4 bpm depending on the estimation algorithm), whose results are also more strongly correlated to the reference ones (Pearson’s correlation coefficient $\ge 0.75$ in all the three methods). The Monte Carlo simulation evidenced that the ML-based method is the most robust with respect to the sensors’ uncertainty (with no differences in the output uncertainty with respect to the sensors’ uncertainty in input); moreover, the higher precision of the cardiac belt with respect to the smartwatch was confirmed (−1 bpm in the output uncertainty) if RSA- and AM-based methods are considered.


Indirect Estimation of Breathing Rate
Using Wearable Devices Gloria Cosoli , Member, IEEE, Luca Antognoli , Luna Panni , and Lorenzo Scalise , Senior Member, IEEE Abstract-Wearable sensors can be exploited for the indirect estimation of physiological parameters, such as breathing rate (BR).Indeed, BR is a significative quantity for both general health status monitoring and diagnostic purposes; however, standard methods for its assessment are often uncomfortable and mainly used for punctual (or brief, anyway) measurements.This article aims to perform an uncertainty analysis of BR indirect estimation made starting from electrocardiographic signals gathered through wearable sensors, namely, a cardiac belt (Zephyr BioHarness 3.0) and a smartwatch (Samsung Galaxy Watch3).Three different estimation methods were employed, considering respiratory sinus arrhythmia (RSA), signal amplitude modulation (AM), and machine learning (ML)-based techniques.Finally, the Monte Carlo simulation method was exploited for the measurement uncertainty estimation, including both sensors (hardware) and algorithms (software) contributions in the measurement chain.The results show that both the considered sensors are quite accurate (almost null bias) and precise (± [3,5] bpm, depending on the estimation method) in the estimation of BR with the three different estimation algorithms.A slightly higher precision is obtained for the cardiac belt (a reduced 95% confidence interval is reported, with a maximum reduction of 4 bpm depending on the estimation algorithm), whose results are also more strongly correlated to the reference ones (Pearson's correlation coefficient ≥0.75 in all the three methods).The Monte Carlo simulation evidenced that the ML-based method is the most robust with respect to the sensors' uncertainty (with no differences in the output uncertainty with respect to the sensors' uncertainty in input); moreover, the higher precision of the cardiac belt with respect to the smartwatch was confirmed (−1 bpm in the output uncertainty) if RSA-and AM-based methods are considered.

I. INTRODUCTION
W EARABLE sensors and devices are continuing to propagate in many different application fields, being them so versatile and able to provide multidomain physiological data [1], [2].Since they are equipped with proper photoplethysmographic (PPG) sensors and electrodes for electrocardiogram (ECG), they can record cardiovascular-related signals and parameters, such as heart rate (HR) and its variability (HRV) and blood oxygen saturation (SpO 2 ), as well as indirectly estimated quantities such as blood pressure (BP) and breathing rate (BR).This is due to the fact that cardiovascular and respiratory activities are interrelated and several techniques have been developed in recent years to derive BR from PPG or ECG signals.Indeed, BR is a pivotal parameter to depict the health status of a subject [3], but the standard tools for its assessment (both contact and contactless [4]) are quite impractical; hence, the continuous monitoring of this parameter is not currently widespread.However, wearable sensors can play a key role in this scenario since BR can be derived from the recorded PPG or ECG signals, making 24-h monitoring possible.The accuracy of the measurement should be adequately taken into account and properly quantified; if the result is reliable, the provided information can be exploited not only for personal health tracking but also to support medical decision-making processes in pathologies such as lung diseases and cardiopulmonary arrest [5], but also disorders related to lungs, heart, red blood cells, and vessels [6], [7].In fact, the analysis of the respiratory pattern is commonly examined in this context [8] for the diagnosis of several different problems (e.g., anxiety, respiratory infections, thoracic/abdominal tumors, labor pain, and driving safety [9], [10], [11], [12]).
Different algorithms for the BR indirect estimation can be mentioned if ECG signals are considered as the starting point.The same authors, starting from the algorithm developed by Schäfer and Kratky [13], estimated BR both from PPG [14] and from ECG [15] signals recorded through wearable devices (Garmin Venu Sq and Samsung Galaxy Watch3, respectively) in dedicated laboratory experiments.The pillar of this method is the respiratory sinus arrhythmia (RSA): when a subject inhales, the inter-beat interval (IBI or RR interval, i.e., the time difference between two R peaks in the ECG trace) shortens, whereas it widens during exhalation [16].
Also, the modulation of the ECG signal can be considered for the estimation of BR.This is because respiration exerts a significant influence on ECG signals, leading to various signal characteristics, including baseline oscillation (BW), amplitude modulation (AM), and frequency modulation (FM) [17].In cases where only single-lead ECGs are available, ECG wave AM can be used to derive a respiratory signal [18].One recent approach, proposed by Babaeizadeh et al. [19], focused on utilizing the modulating QRS morphology to extract respiratory information.This method leveraged the total peak-to-peak amplitude of the QRS complex to quantify respiratory activity.
Different signal processing methods, such as fast Fourier transform (FFT) and wavelet transform [17], [20], or methods based on artificial intelligence (AI) can be employed for the indirect estimation of BR starting from a plethora of physiological signals (e.g., ECG, PPG, ballistocardiogram, seismocardiogram, oscillometric trace, and Korotkoff soundrelated signal [21], [22]).Indeed, AI algorithms are more and more applied for different purposes and literature is replete with examples of this type.Wang et al. [23] evidenced that deep learning methods usually outperform FFT and wavelet-based processing approaches; exploiting a fiberoptic-based sensor and deep learning models, they found that 95.64% of BR values are within the 95% confidence interval (reference instrument: ventilator).Roy et al. [24] exploited a multilayer perceptron neural network to extract BR from PPG signals, achieving a correlation of 90% and a normalized root-mean-squared error (NMRSE) of approximately 0.2.Moreover, vision-based sensors can be exploited to estimate BR; radar systems have been successfully used (e.g., Zhai et al. [25] reported an accuracy of >93%), as well as depth cameras [26] and visible and infrared sensors [27].Cetinkaya et al. [28] investigated different algorithms to estimate BR from ECG and PPG signals with the perspective of improving early diagnosis in healthcare.They highlighted the potential of machine learning (ML) algorithms, reporting the best performance of random forest (RF) and k-nearest neighbor (kNN) models.
Whatever the estimation algorithm is, the measurement uncertainty should be thoroughly estimated to properly interpret the results and evaluate their suitability for different application fields, clearly requiring diverse levels of precision.
In this work, the authors consider three different methods for the indirect estimation of BR from ECG signals gathered through two wearable sensors.
3) AI-based method.In this way, this work can be considered as an extension of the proceedings article presented at MeMeA 2023 conference [15].Hence, the measurement uncertainty was estimated through the Monte Carlo method, as recommended by the Guide to the Expression of Uncertainty in Measurement (GUM) [29].In this way, both the sensor uncertainty and the algorithm uncertainty were included in the evaluation.
The main aim of this work is to compare the measurement uncertainty in the indirect estimation of BR when different wearable sensors and algorithms are employed.
The remainder of this article is organized as follows.The materials and methods employed in the study are reported in detail in Section II.Then, the results are outlined and discussed in Section III.Finally, the authors draw their concluding remarks in Section IV.

II. MATERIALS AND METHODS
In this section, the methods followed to conduct the study, including both experimental campaign and data processing, are reported.

A. Experimental Campaign
All the test sessions took place at Università Politecnica delle Marche, Ancona, Italy.The study was declared compliant with the university Research Integrity Code by the Research Ethics Committee of the university.Moreover, the experimental campaign was performed in accordance with the WMA Declaration of Helsinki [30].Healthy subjects were recruited for participating in the study on a voluntary basis; the test population consisted in a total of 30 healthy subjects (aged 22 ± 3 years, with a body mass index of 22.5 ± 2.3 kg/m 2 , expressed as mean ± standard deviation).The study objectives and modalities were explained in detail before the test execution and the participants were made to sign an informed consent module.Data management was performed according to the General Data Protection Regulation (GDPR).
Two wearable sensors were employed for physiological data acquisition: a chest strap (Zephyr BioHarness 3.0, Zephyr Technology Corporation, Annapolis, MD, USA) and a smartwatch (Samsung Galaxy Watch3, Samsung Electronics Italia, Italy).The former has a measurement accuracy of ±1 and ±2 bpm for HR and BR, respectively [31], whereas no information is available for the latter.
The acquisition procedure comprised a total of six trials for each subject, one half at rest, while the other half after physical activity (i.e., 2-min treadmill sessions at speeds of 3, 8, and 10 km/h, with 0% slope).The detailed protocol is reported in [15] and the experimental test setup is illustrated in Fig. 1.In this way, a total of 180 ECG trials were performed, lasting 30 s each due to smartwatch constraints.

B. Methods to Indirectly Estimate BR
As the first step, the ECG signals recorded through the employed wearable sensors were preprocessed (as reported in detail in [15]) and the related tachograms were computed after R-peak identification.
Three different methods were applied to indirectly estimate the BR from ECG signals or corresponding tachograms as follows.
1) A method based on the consideration of RSA phenomenon, as described in [15]; in brief, the tachogram is filtered in a low-frequency range (i.e., 0.1-0.5 Hz) and both minima and maxima are identified.Hence, vertical Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
differences between these two features are computed and those related to breathing activity are selected according to a determined threshold (i.e., third quartile of vertical differences).In this way, BR can be estimated as the inverse of the length of the obtained breathing cycles.2) A method based on AM; starting from the work by Kozia et al. [32], the authors calculated the peakto-baseline (PBA) amplitude for each QRS complex (identified through Pan and Tompkins algorithm [33]) in the ECG signal (after an initial filtering in the range 0.05-70 Hz).To increase the accuracy and minimize false positives from the R-peak detection, the outliers were removed.PBA values were then oversampled (sampling frequency: 8 Hz-a spline interpolation method was employed) to obtain the ECG-derived respiration (EDR) waveform.Hence, this signal was filtered, focusing on frequency band characteristic of respiration (0.15-0.4 Hz [34]), to extract the final respiratory signal.
Finally, the peaks related to the respiratory cycles were identified and the BR was computed.3) An ML-based method; starting from the article by Stankoski et al. [35], signal portions of 20 s (with a step of 1 s) were extracted from the ECG s; therefore, the authors extracted eight features of interest from the windowed ECG signal as follows.a) RR wind : RR intervals in the selected time window.b) T wind : Tachogram intervals.c) PSD ECG : ECG peak frequency from its power spectral density (PSD).d) PSD tacho : Respiratory signal peak frequency from its PSD.e) RR std : Standard deviation of RR intervals.f) HR max : Maximum HR value.g) HR min : Minimum HR value.h) RMSSD: Root mean square of successive differences between normal heartbeats.i) pNN50: Percentage of consecutive RR intervals differing more than 50 ms.j) pNN20: Percentage of consecutive RR intervals differing more than 20 ms.The features vector was employed as input to train a regression ML model, based on extreme gradient boosting (XG-Boost) algorithm [36].XG-Boost utilizes decision trees as base models, which are used iteratively through boosting to build a more robust model.Each tree is trained to correct the errors of previous models by associating input data with its leaves and providing a continuous score.This iterative process implies that each new tree predicts the residuals or errors of the previous models.The predictions from all the trees are then combined to obtain the final prediction as output (i.e., the estimated BR in this case).The model training was executed using the Python programming language.The following hyperparameters were set accordingly to [36]: XGBRegressor with 1000 estimators, a maximum depth of 7, a learning rate of 0.1, a subsample ratio of 0.7, and a column subsampling ratio of 0.8.
As gold standard, the BR values were derived from the breathing signal provided by the chest-worn sensor (Zephyr BioHarness 3.0) and appropriately preprocessed (see [15] for details) before identifying the peaks useful for BR computation.

C. Estimation of the Measurement Uncertainty
The measurement uncertainty was evaluated through the analysis of the measurement differences (i.e., residualsrounded to an integer) between test (i.e., BR derived from wearable sensors measured ECG, through different estimation methods-as described above) and reference (i.e., BR values from respiratory signal) methods.Residual values exceeding the 95% confidence interval were excluded as considered outliers (being outside the agreement interval according to the Bland-Altman analysis).To this aim, the mean BR value obtained for each of the recorded 30-s signals was considered.Then, the Monte Carlo method was exploited to express the uncertainty according to the recommendations provided by the Guide to the Expression of Uncertainty in Measurement (GUM) [29]).As input uncertainty [i.e., u(x)], the following values for the wearable sensors were set (considering both available user manuals and literature guidelines).
1) Cardiac belt (Zephyr BioHarness 3.0): 0.017 s for RR intervals (considering the uncertainty of 1 bpm reported for HR in the user manual-considering RR as the inverse of HR), and 5.0% of the maximum reading for the ECG signal amplitude (the authors considered the accuracy reported by the manufacturer, i.e., 10%, as expanded uncertainty, with coverage factor k = 2).2) Smartwatch (Samsung Galaxy Watch3-for which no uncertainty values are provided by the manufacturer): 0.042 s for RR, which is an authors' cautionary hypothesis considering an expanded uncertainty of 5 bpm as acceptable [37], and 12.5% of the maximum reading for ECG signal amplitude (derived considering the proportion between cardiac belt and smartwatch uncertainties in terms of RR, i.e., 0.042/0.017≈ 2.5).Both tachograms (i.e., RR intervals) and ECG signals were perturbed, considering the input uncertainty values reported above for RR intervals and signal amplitude, respectively.The two uncertainties concern the RSA-based method and the AM-based method for BR estimation.A Gaussian distribution centered at 0 and characterized by a standard deviation equal to u(x i ) was initially built randomly, with a length equal to the total number of iterations.The ML-based method is affected by both perturbations, including features from both tachogram and ECG signal analysis.
The simulation was performed on all 180 trials, hence including physiological variability as a (nonnegligible [38]) contributor to the measurement uncertainty.This was done for both the employed wearable sensors (i.e., cardiac belt and smartwatch, Section II-A) and for the three estimation algorithms (Section II-B).The output uncertainty, u(y), was evaluated in relation to the estimated BR value (bpm).The number of iterations for each trial was equal to 10 4 , for a total of 1 800 000 iterations.Hence, a coverage interval of 95% for uncertainty was provided through the iteration of the simulation.Finally, the expanded uncertainty was computed with a coverage factor k = 2.

III. RESULTS AND DISCUSSION
The results related to the BR estimation with the different methods (see Section II-B) and the uncertainty estimation (see Section II-C) are reported in Sections III-A and III-B.

A. Indirect Estimation of BR With the Different Methods
The authors evaluated the performance of the three algorithms by analyzing the measurement differences (i.e., residuals) with respect to the reference BR (derived from the respiration signal provided by the cardiac belt).An example of the distribution of residuals is reported in Fig. 2 for BR estimated from (a) Zephyr BioHarness 3.0 and (b) Samsung Galaxy Watch3 considering the ML-based method.Both the distributions are Gaussian-like and centered at 0 bpm (the value is rounded to unit), index of the accuracy of the estimation; tails are slightly wider for the latter (as can be observed in Fig. 3(a) and (b) for cardiac belt and smartwatch, respectively).Indeed, chest-worn sensors are generally more precise than wrist-worn ones due to positioning and working principle, but both measurement accuracy and precision can be assumed to be comparable (0 and ±3 bpm, respectively).These values are acceptable for monitoring purposes, hence confirming the potentialities of ML algorithms for physiological monitoring systems.
The results from the different estimation methods are reported in Tables I and II for Zephyr BioHarness 3.0 and Samsung Galaxy Watch3, respectively (where σ indicates the standard deviation and ρ indicates Pearson's correlation coefficient).The method differing most between the two sensors is the AM-based one; in fact, the precision is slightly worse for the smartwatch (±5 versus ±4 bpm), even if a small bias (i.e., −1 bpm) is obtained for the cardiac belt (while it is 0 bpm for the smartwatch).Indeed, as mentioned above, cardiac belt devices tend to be more precise than smartwatches and this can be attributed to both positioning and intrinsic functioning of the sensors.
Concerning the correlation between test and reference BR values, the scatter plot is reported in Fig. 4(a) for Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.There is a linear correlation between the two; as can be observed in Tables I and II, the linear correlation is strong (≥0.75) and moderate (≥0.57) for the cardiac belt and smartwatch, respectively.Indeed, considering the ML-based estimation method, a strong correlation is obtained for both the wearable sensors, highlighting the potentiality of ML, which proves again to be able to provide results highly correlated to the reference ones and outperforming both RSA-and AM-based methods.This allows to establish linear relationships with the expected values, and this can be useful for the calibration of these indirect estimation methods.
Summarizing, it can be stated that the measurement accuracy of the proposed methods is very high (almost null mean value of residuals is obtained for both the wearable sensors with the three methods-the only exception is for the BR estimated with the RSA-based method considering ECG data from the cardiac belt, where the bias is equal to −1 bpm).The distribution of residuals is more compact for the cardiac belt, as evidenced by the narrower confidence intervals (as it can be observed from the Bland-Altman plots), and this can be attributed to the different sensing principle and measurement framework.

B. Uncertainty Analysis
The results obtained through the Monte Carlo method are reported in Table III for the considered wearable sensors.
The probability distributions for the three estimation methods are reported in Fig. 5 (RSA-based), Fig. 6 (AM-based),  The u(y) values related to the different cases are reported both in Table III and in the figure captions, for ease of readability.Considering the RSA-based estimation method, the input uncertainty of 0.017 s for the cardiac belt reflects in an output uncertainty of ±3 bpm (expanded uncertainty, coverage factor k = 2: ±6 bpm).On the other hand, the higher RR-related uncertainty for the smartwatch (i.e., 0.042 s) results in an output uncertainty of ±4 bpm (expanded uncertainty: ±8 bpm).For the AM-based method, the input uncertainty defined in percentage terms of the maximum reading (i.e., 5.0% and 12.5% of the maximum reading for Zephyr BioHarness 3.0 and Samsung Galaxy Watch3, respectively) leads to an output uncertainty on the estimated BR equal to ±3 and ±4 bpm for cardiac belt and smartwatch, respectively.Concerning the ML-based method, an output uncertainty of ±4 bpm is obtained for both the wearables.This proves that the ML algorithm is robust toward input uncertainty, and this can be advantageous to develop low-cost systems for physiological monitoring exploiting ML techniques.In fact, ML could compensate for the lower accuracy of a low-cost sensor thanks to its robustness.However, when considering the cardiac belt, the ML-based method has a higher uncertainty (i.e., ±4 bpm) with respect to the others (±3 bpm).This could be attributed to an intrinsic limitation of the model, not being able to have an uncertainty lower than ±4 bpm.
Hence, also from the Monte Carlo method, it is possible to infer that ECG data from the cardiac belt lead to more precise results in terms of estimated BR with respect to those measured through the smartwatch; this is in line with the results from previous studies of the same authors and also with literature findings.Indeed, cardiac belts are based on chest electrodes and are, hence, less prone to motion artifacts and slight movements.

IV. CONCLUSION
The main aim of this work was to characterize from a metrological point of view different estimation procedures for BR, starting from ECG data collected through wearable devices (i.e., Zephyr BioHarness 3.0 and Samsung Galaxy Watch3).The distribution of measurement differences (residuals) with respect to the gold standard method was analyzed and measurement uncertainty was analyzed.Moreover, the Monte Carlo simulation method was exploited to express measurement uncertainty as recommended by the GUM [29], running sufficient iterations to obtain a 95% confidence interval on the uncertainty estimation.
The results are given as follows.
1) Both the wearable sensors (i.e., Zephyr BioHarness 3.0 and Samsung Galaxy Watch3) provide BR estimation with optimal accuracy (almost null bias), whatever estimation algorithm is employed.2) The cardiac belt is more precise than the smartwatch, as expected.This is reflected in narrower 95% confidence intervals.
3) The Monte Carlo simulation method confirmed the lower uncertainty in the BR estimation for cardiac belt with respect to the smartwatch.4) The ML-based estimation method is more robust toward the sensors' input uncertainty.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
The proposed approach can be applied also to different types of (wearable) sensors, providing insight on measurement uncertainty of devices widely applied in different fields (e.g., sport, rehabilitation, and medicine).It is worth underlining the importance of validation protocols and metrological characterization of sensors, to allow the users to properly interpret the results, also according to the specific target applications and related requirements.Finally, the influence of the involved processing techniques and exploited models should always be considered to depict a wide picture of what is happening along a measurement chain.It is worth noting that this study involved a limited test population, quite homogeneous in terms of demographic characteristics.This was in part mitigated by the employment of Monte Carlo simulation method.However, to widen the physiological variability and the considered BR range, in the future, it would be interesting to expand the dataset involving heterogeneous age groups and also other types of physical activities.

Fig. 2 .
Fig. 2. Distribution of the measurement differences between the BR estimated through (a) Zephyr BioHarness 3.0 ECG and (b) Samsung Galaxy Watch3, and the reference values from the respiratory signal (Zephyr Bio-Harness 3.0) (mean value: 0 bpm; standard deviation: 3 bpm-for both the sensors)-ML-based method.

TABLE I ANALYSIS
OF RESIDUALS IN THE INDIRECT BR ESTIMATION (CARDIAC BELT, ZEPHYR BIOHARNESS 3.0)

TABLE III RESULTS
FROM THE MONTE CARLO SIMULATION