Smart Mat for Respiratory Activity Detection: Study in a Clinical Setting

We discuss in this paper a study of a smart and unobtrusive mattress in a clinical setting on a population with cardiorespiratory problems. Up to recently, the vast majority of studies with unobtrusive sensors are done with healthy populations. The unobtrusive monitoring of the Respiratory Rate (RR) is essential for proposing better diagnoses. Thus, new industrial and research activity on smart mattresses is targeting respiratory rate in an Internet-of-Things (IoT) context. In our work, we are interested in the performances of a microbend fiber optic sensor (FOS) mattress on 81 subjects admitted in the Cardiac Intensive Care Unit (CICU) by estimating the RR from their ballistocardiograms (BCG). Our study proposes a new RR estimator, based on harmonic plus noise models (HNM) and compares it with known estimators such as MODWT and CLIE. The goal is to examine, using a more representative and bigger dataset, the performances of these methods and of the smart mattress in general. Results of applying these three estimators on the BCG show that MODWT is more accurate with an average mean absolute error (MAE) of \(1.97\,\pm \,2.12\;\text {BPM}\). However, the HNM estimator has space for improvements with estimation errors of \(2.91 \pm 4.07\;\text {BPM}\). The smart mattress works well within a standard RR range of 10–20 breaths-per-minute (BPM) but gets less accurate with a bigger range of estimation. These results highlight the need to test these sensors in much more realistic contexts .


Introduction
New sensors for the unobtrusive detection of vital signs have to be tested in a clinical setting to assess their potential and limits. These sensors are interesting to propose better treatment and care for subjects having cardiorespiratory problems in an Internet of Things (IoT) context. This is especially important since long term data is required to offer better and more accurate diagnoses [7]. Recently, smart mattresses acquiring the ballistocardiogram (BCG) [24] have proven to be reliable. The BCG is the motion of the body following the mechanical action of the heart. Consequently, the BCG also contains the motion from the respiration. Thus, if a subject rests on a smart mattress, it would be possible to acquire his vital signs in a completely unobtrusive way during in-bed periods.
Still, most studies on a smart mattress are done using a small number of healthy and/or young subjects [10,[12][13][14]20]. Thus, having a few number of subjects or only healthy subjects is not sufficient because the recruited populations are not representative of the targeted users. Most of the potential users of these sensors have contrasted health issues and physiological differences such as being overweight, underweight, young, old, smoker, and non-smoker. All of these parameters have [8] effects on the quality of the acquired BCG. This is an issue since we want to extract important vital signs such as the respiratory rate (RR) from the BCG. The RR has been neglected in the past but is now more and more in use by nurses and doctors. For instance, an abnormal RR is a strong marker of serious illness [6].
In this paper, we test the performance of a smart mattress, the microbend fiber optic sensor (FOS) mattress, during the detection of the RR. This was done through a study, in a clinical setting, involving 100 subjects having a wide range of cardiorespiratory problems. We acquired the BCG and estimated the RRs of the subjects using well-known methods. Maximal Overlap Discrete Wavelet Transform (MODWT) [22] and Continuous Local Interval Estimation (CLIE) [2,4] are the two most used vital signs estimators for the RR in the literature. Although, CLIE hasn't been tested on an unhealthy population and MODWT has limits in the range of frequency phenomenons it can capture. Thus, we propose to enrich the study with a new estimator based on Harmonic plus Noise Models (HNM) [17].
The rest of this paper is organized as follows: In Sect. 2, we will explore in more details the use of the BCG as well as the signal processing tools we selected. In Sect. 3, we detail our experimental methodology study and describe the population that was recruited. In Sect. 4, we present and analyze the results of the study. In Sect. 5, we discuss the relevance of the results and justify the used tools. In Sect. 6, we conclude with a summary of our findings, we show their limits and propose future relevant work in this field.

Background
The BCG signal contains vital signs such as the Heart Rate (HR) and Respiratory Rate (RR). It is present in the range of indiscernible motions coming from the human body. The BCG measures the ballistic forces generated by the heart, that is, the mechanical response of the body when the heart ejects the blood into the vascular tree. Notwithstanding the heart activity, it is also possible to retrieve the respiratory activity from the motion of the thorax when a subject inhales and exhales. All other motions present during the sleep also corrupt the signals Fig. 1.   Fig. 1. A raw BCG signal containing heart activity, respiratory activity and general body motions. [5] To retrieve the respiratory activity from the BCG, we need both a very sensitive force sensor placed under the subject and advanced signal processing techniques to estimate the information. New generations of sensor-based mattress can unobtrusively monitor the BCG by being placed under the sheets or even under the bed mattress.
Recently, an interesting microbend FOS, embedded in a small mattress, has been developed [24]. This microbend FOS provides a new way of acquiring the mechanical activity of the human body. It is achieved through the intensity attenuation of the light passing through an optic fiber in response to a mechanical stimulus on the fiber [26]. Figure 2 shows the principle of the microbend FOS. Lau et al. [13] used an FOS mattress to monitor the respiration and gait the image in synchrony with said respiration. They obtained high accuracy on the respiration estimation using simple filtering and peak detection on still subjects during functional magnetic resonance imaging (fMRI). Sadek et al. [22,28] also used an FOS mattress to acquire the BCG of subjects during headrest on a chair. Research using this sensor has given promising results, showing high accuracy for that technology.
Nevertheless, as it has been mentioned earlier, such sensors also require advanced signal processing algorithms to estimate the vital signs and more precisely the RR from the raw BCG signal. Multiple estimators have been tested like wavelets [22], empirical mode decomposition (EMD) [23], cepstrum analysis [5,27], clustering [3], standard filtering [14], bayesian fusion [4] and fast Fourier transforms (FFT) [11]. Two methods stand out in the literature for having good results on wider groups of subjects: (1) MODWT and (2) CLIE. These algorithms can be considered as reference methods in the literature. We use them not only as a reference to validate the smart mattress on a symptomatic population, but also to validate the new HNM method we developed.

Maximal Overlap Discrete Wavelet Transform (MODWT).
It is a method to gain a spectro-temporal representation of studied signal by passing it through multiple and customizable narrow filters at arbitrarily selected levels. It is often used for signal denoising as well as for feature extraction. Jin et al. [9] detected the heart rate with a peak searching algorithm and wavelet shrinkage. Sadek et al. [22] implemented the Maximal Overlap Discrete Wavelet Transform (MODWT) to extract the BCG signal from a microbend FOS. Previous studies [15,18,22] have shown that wavelets and especially MODWT fare better than other algorithms such as clustering and EMD. DWT's strengths rely on its ability to split the signal into multiple levels of frequency components. It is, however, harder to select the right level of frequency components to represent the desired phenomenons.

Continuous Local Interval Estimation (CLIE).
It is developed by Bruser et al. [4] and uses the Bayesian fusion of three estimators of the interval between heartbeats. These indicators are respectively i a modified version of the autocorrelation method [19], ii a modified version of the average magnitude difference function (AMDF) [21] and (3) the maximum amplitude pairs (MAP). Using Bayesian mathematics, the three estimators are fused as seen in Fig. 3. This estimator has also been used in a single [4] and multichannel [2] context. It offers a much more robust and reliable estimation of the interval between heartbeats. It has, however, not been tested for estimating the RR.
Harmonic Plus Noise Models (HNM). It represents a signal as a sum of harmonic parts and a noise part [25]. By using special methods like the one developed by Pantazis et al. [17], it is possible to estimate the harmonics of this HNM. This method, known as the iterative estimation of sinusoidal signal parameters, only needs the fundamental frequency of the signal to build a model of it. The goal with HNM is to construct a synthetic representation of the respiration signal. The synthetic signal can be written as follow:  [4]. Each of the estimators proposes its probability distribution of the most probable interval between two heartbeats. The fusion of the three of them, in the bottom graph, shows more robustness in the quality of the estimation than the three separate estimators.
The harmonic part is modeled as a sum of harmonics: where L denotes the number of harmonics included in the harmonic part, φ k (t) is the temporal phase of the k th harmonic, f 0 denotes the fundamental frequency and A k denotes the amplitude of the sinusoidal components. The noise part is commonly considered as white Gaussian noise synchronized with the harmonic part.
In the next section, we explain our experimental setup for conducting the study at a hospital as well as the specifics of the population recruited into the study. We also describe the methods we used to extract the RR from an FOS mattress as well.

Methodology
Experimental Setup. The study for this work was conducted in the Centre Hospitalier de l'Universite de Montreal (CHUM) at the Cardiac Intensive Care Unit (CICU) in Montreal, Canada. This study was reviewed and approved by the TELUQ, ETS and CHUM institutional review board (IRB). We approached patients already admitted in the CICU who were i conscious and able to give informed consent, ii french-speaker, iii at least the whole night in the CICU and iv able to be lightly mobilized for the installation of the smart mattress.
Once patients accepted to take part in the study, we collected data from their health records such as their demographic and anthropomorphic data (age, weight, height, etc.). We then installed the smart mattress directly under the sheets of their bed at the level of their thorax, as visible in Fig. 4. They could still move as they wished during the recording. We then started a recording of the movements of the subject which would last more or less 24 h, depending on the length of the stay. After the recording, the smart mattress would be removed from the subject's bed. The data recorded by the system is then extracted on a normal computer as a *.csv file.
The reference values of the hospital, which serve as ground truth for future estimations of our system, were also extracted from the hospital' systems.
Hardware. The microbend FOS technology allowed us to record raw BCGs with their system. The raw data is sampled at 50 Hz by the acquisition module. Through a debug port on the acquisition module, the time serie of the BCG was stored on a Raspberry Pi 3 B+. The reference values of the hospital' systems were acquired through the CARESCAPE Monitor B850 of GE Healthcare. The CARESCAPE monitor recorded, amongst other values, the ElectroCar-dioGram (ECG), PhotoPlethysmoGraph (PPG) and Impedance PneumoGram (IPG). The CARESCAPE monitor also recorded the time occurrence of anomalous events such as TachyCardia (TC), BradyCardia (BC) and Atrial Fibrillation (AF).
The extracted recordings of the smart mattress and the CARESCAPE monitor were all processed on Intel(R) Core(TM) i7-6700 CPU @ 3.40 GHz computer using Python 3.7.

Dataset.
We have recruited 100 patients that were admitted for the night at the CICU. 20 patients were removed from the study because of (1) missing data or (2) unforeseen leave from the CICU. When a patient leaves the hospital, his recordings are automatically deleted from their systems. Thus, it was impossible to compare the recorded BCG with the reference. In total, 80 patients with a maximum of 24 h of recorded data (53 male, 27 female; age 65.58 ± 12.58 years old; height 168.65 ± 9.35 cm; weight 77.94 ± 18.31 kg) are used for RR detection. The available data compiles 1520 h of recordings.
Filtering and Artefacts Removal. The data went first through a bidirectional Butterworth bandpass filter of 5 th order with bandpass frequencies of 0.1 to 2 Hz. Moreover, the motions from a subject may quickly decrease the quality of the signal. Therefore, the motions were removed from the raw signals using a simple thresholding technique. We added bottom and upper variance thresholds to remove parts of the recordings where the bed was empty and where there was too much motion. We experimented on the size of the sliding window as well as the values of the thresholds. By looking at samples of performance results, we adjusted these parameters to yield maximal precision during estimations. With a sliding window of 6 s, the bottom threshold was set at 0.01 times the variance of the whole complete recording. The upper threshold was set at 10 times the complete recording. Signal segments with a variance outside of these limits were automatically removed with a mask in the end. These parts of the signal generally include motions like turning over, getting in or out of bed and coughing. Since the sensor is a single motion sensor, it remains hard to detect which position the subject is in. Therefore, we keep every segment of the signal with low variance even if the subject is in an undesirable posture.

RR Estimation
To estimate the RR, we used each of the RR estimation technique with a sliding window of 800 samples (16 s). Windows overlapped by 50% (8 s). All parameters were optimized, while the others were fixed, by choosing the value yielding the best estimation performance at the end of the processing chain. Optimized parameters, for our study, include the selected wavelet, its coefficient level, the low and high periods of the CLIE method and the number of harmonics used for synthesizing the signal using HNM.
MODWT. It is one of the estimators that yielded good results in the past. The approach we use is similar to that of Sadek et al. [22]. We use the Symlet 8 (Sym8) wavelet transform to extract the coefficients of the filtered signal. The 6-th level of the approximation coefficients is selected since it represents best the respiration cycle in the BCG. We then apply a basic peak searching algorithm to extract the mean period between peaks and, thus, the RR.

CLIE.
It is implemented as per the work of Bruser et al. [4]. Since they used it to detect the heart rate, we adapted some parameters to capture the period range of the RR instead of the HR. The lowest period T min was set to 1 s and the highest period T max was set to 10 s.

HNM.
When working with the BCG, the heart, respiration, and noise signals are mixed. It is possible to build a synthetic heart signal from its original version using an HNM. It is critical, though, that we estimate the fundamental frequency f 0 of the heart as close as possible to the truth. We do this using an FFT with Harmonic Artifact Rejection (HAR) as proposed by Beattie et al. [1]. A set of heuristics will work to eliminate higher and lower amplitudes harmonics to make sure we extract the true fundamental frequency of the heart. This is more efficient than simply selecting the highest amplitude frequency in the FFT.
We then build an HNM using this frequency by applying the same operations as Pantazis et al. [17]. The filtered signal is directly fed to the HNM algorithm and we build an HNM with L = 6 harmonics of the fundamental heart frequency. We then subtract this HNM from the original signal. This yielded the estimated true respiration component from which we selected, using the highest spectral peak, the fundamental respiration frequency.

Results and Discussion
We extracted the average Mean Absolute Error (MAE), Root Mean Squared Error (RMSE) and Standard Deviation (SD) of the Absolute Error (AE) for every recording on 81 patients. The AE is the absolute difference between an estimate of the RR and the RR from the ground truth. Every metric is expressed in Breaths Per Minute (BPM). This yielded the following results for the HNM, CLIE and MODWT estimators. We separated the results for 3 ranges of reference values. The top part of Table 1 represents the performances on all possible values of the recorded reference. This allows us to view if the estimators work well for big (>30 BPM) and small (<10 BPM) reference values. The middle part shows results with reference limits between 5 and 30 BPM. Finally, in the bottom part, we look at the performances between 10 and 20 BPM, which are standard values for the RR of healthy subjects. Figure 5 shows the agreement between the methods and the reference equipment using Bland-Altman analyses. Our artifact removal method yielded a mean coverage of 76.62% ± 12.05%. It is possible to view the results of Table 1, as good indicators of the caveats of RR and even HR estimators. Most studies preoccupy themselves with performances concerning a healthy population. Thus, the subjects of these studies have vital signs within the standard limits. For instance, Paalasmaa et al. [16] had a mean error on the HR of 0.78 BPM for 46 healthy subjects. Our best results, lower than theirs, of 1.97 ± 2.12 BPM is with unhealthy subjects and within a strict range. It drops to 4.57 ± 6.892 BPM with the entire range of RR values. This shows that when facing high variance in the recorded RR values and unhealthy subjects, the quality of the estimations decreases rapidly for estimators that would have similar performances on a similar dataset. An estimator should be able to keep the same performances no matter the reference values and the type of subject. However, we see that previously developed estimators, as well as our HNM estimator, have troubles in finding very high or very low RR values. This especially apparent in every Bland-Altman analyses, where we observe a difference proportional to the mean of the methods. To put it simply, the methods work well between 10 and 20 BPM rates but will overestimate for slower rates and underestimate for faster rates.
Moreover, with every result, we can observe an SD as big or bigger than the average MAE. This means that there are multiple bad estimations but that it is common for the estimator to give results of the right order of magnitude. This is even more apparent with the HNM estimator. Most of the HNM's estimations are directly related to the fundamental frequency estimation, before building the HNM model. The computed fundamental frequency needs to be exactly right if we want to build a high-fidelity model of the respiration. This means that the HAR we used is not as efficient as we thought in finding the right fundamental frequency, thus leading to incorrect models and incorrect true RR estimations.
CLIE is generally seen as the golden standard for estimating the HR. Its performance, however, diminishes in a single channel setup with the RR. It is too sensitive to the heart rate, which we can't remove from the signal perfectly with basic bandpass filtering. With many subjects, the heart signal is often stronger than the respiration signal. In other cases, we see the opposite situation. Thus, during the fusion of the three sub-estimators of CLIE (autocorrelation, AMDF, and MAP), the heart rate will often greatly modify the result. This explains the often very high estimates of CLIE even in the standard RR range.
We also see that MODWT performs the best but gets less and less efficient at very low or very high reference values. For instance, it obtains the same RR estimation precision as Beattie et al. [1], but with a simpler algorithm and inside the same range of RR. MODWT was often used within a small range of reference values. With bigger ranges, one level of wavelet coefficient is not enough to represent well lower and higher magnitude RRs. It would be interesting to select the right coefficient to represent the RR during computations. It would lead to much lower RMSE and SD for MODWT.

Conclusion
In this work, we discuss a study involving a smart FOS mattress for the detection of the respiratory rate in a clinical setting. This study, including 100 subjects, is done with old subjects having a wide range of cardiorespiratory problems, in opposition with precedent studies using mostly young and healthy subjects. We use previously known methods for estimating the RR from the recordings. These methods were MODWT and CLIE. Since they had shortcomings in their precedent applications, we also proposed a new method based on HNM. Our new HNM algorithm gave good results, but the selection of the fundamental frequency for the computation of the HNM needs to be improved. MODWT gave the best performances, similar to other studies on the RR [1], but only within constrained reference values. It is, however, less accurate than other vital signs tools used in bigger studies [4,16] on the HR. This is most probably due to the subjects of these studies being healthy and younger. It would still be interesting to add a way of selecting the right level of wavelet coefficients to further improve the estimation of the RR with MODWT.
Future work will be on the characterization of this database and its relation to the performances of estimators such as MODWT. We will explore the effects of anthropomorphic parameters on the quality of the estimations.