Can We Monitor Breathing During Sleep via Wi-Fi on Smartphone?
Alexander Tataraidze, Roman Olesyuk, Mikhail Pikhletsky

TL;DR
This study demonstrates that smartphones can detect breathing during sleep by analyzing Wi-Fi channel state information, achieving high correlation with contact sensors, thus enabling contactless sleep monitoring.
Contribution
The paper introduces a novel method for smartphone-based sleep breathing detection using Wi-Fi CSI, eliminating the need for additional sensors.
Findings
Achieved mean correlation coefficient of 0.85 between Wi-Fi CSI and ground truth signals.
Mean absolute difference in respiratory rate estimation is 0.39 breaths per epoch.
Feasibility shown across different sleep postures and body mass indices.
Abstract
Over the last decade there has been high interest in home sleep monitoring among research community and society. Smartphone-based sleep monitoring seems to be especially attractive. However, smartphone should be able to register physiological processes for that, such as breathing or heartbeats. In this study, we tried to detect breathing based on the analysis of channel state information (CSI) of Wi-Fi connection between a smartphone and an access point. We collected data of 5 subjects with different body mass index (17-33) in base sleep postures: prone, supine, and side. The obtained CSI-based respiratory signal was compared with ground truth from a contact belt sensor. The mean correlation coefficient between the signals of 0.85 was achieved. The mean absolute difference between respiratory rates (breaths per epoch) is 0.39. The results show that it is possible to use smartphones…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
This is a preprint copy that has been accepted for publication in Proceedings of the 41th Annual International Conference of the IEEE Engineering in Medicine and Biology Society.
©2019 IEEE. Personal use of this material is permitted. Permission from IEEE must obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
Can We Monitor Breathing During Sleep via Wi-Fi on Smartphone?
Alexander Tataraidze, , Roman Olesyuk, and Mikhail Pikhletsky A. Tataraidze is with Huawei Technologies and Bauman Moscow State Technical University, Moscow, Russia ([email protected]).R. Olesyuk and M. Pikhletsky are with Huawei Technologies, 127562, Moscow, Russia, Altufevskoe h., 1 ([email protected], [email protected]).
Abstract
Over the last decade there has been high interest in home sleep monitoring among research community and society. Smartphone-based sleep monitoring seems to be especially attractive. However, smartphone should be able to register physiological processes for that, such as breathing or heartbeats. In this study, we tried to detect breathing based on the analysis of channel state information (CSI) of Wi-Fi connection between a smartphone and an access point. We collected data of 5 subjects with different body mass index (17–33) in base sleep postures: prone, supine, and side. The obtained CSI-based respiratory signal was compared with ground truth from a contact belt sensor. The mean correlation coefficient between the signals of 0.85 was achieved. The mean absolute difference between respiratory rates (breaths per epoch) is 0.39. The results show that it is possible to use smartphones without additional sensors for registering breathing based on CSI and potentially for sleep monitoring.
I Introduction
Over the last decade there has been an increasing interest in home sleep monitoring among the general population: estimation of sleep stages became a mandatory feature for fitness trackers, app stores have tens of application for sleep estimation [1]. Apparently, the reasons are high prevalence of chronic sleep deprivation and sleep disorders. Around 30–40% of adults report sleep dissatisfaction [2, 3]. Obstructive sleep apnea affects more than 9% of general population [4], while the prevalence of insomnia is around 6–9% [2, 5].
The gold standard for sleep estimation is polysomnography (PSG), when electroencephalography, electromyography and electrooculography are used for sleep staging. However, a number of studies have shown that it is possible to detect sleep stages based on the analysis of Heart Rate Variability (HRV) or respiratory patterns [6, 7, 8, 9, 10]. Furthermore, it is possible to distinguish sleep and wakefulness episodes via analysis of movements. The method is called actigraphy, and it is widely used in sleep medicine.
If we take a look to consumer devices market, we can see that most fitness trackers have a sleep monitoring function. They use photoplethysmography and accelerometer sensors to get HRV and estimate physical activity. There are also non-contact solutions, e.g. ResMed S+ monitors respiratory movements based on radio waves reflected from body, while Emfit and Beddit use ballistocardiography sensors to detect heartbeats and breathing. However, the necessity to buy a specialized device holds back the spread of home sleep monitoring technologies. It would be quite interesting to use already built-in smartphone equipment for this purpose. Recently, it has been shown that it is possible to monitor human breathing based on the analysis of Wi-Fi connection [11, 12, 13].
Wi-Fi is a packet-based wireless transmission system and uses on orthogonal frequency-division multiplexing method. Currently widely adopted version is IEEE 802.11ac. It uses high bandwidth radio channels (from 20 MHz to 160 MHz) on 2.4 GHz and 5 GHz bands. The wide channel experiences frequency selective attenuations and thus a channel equalization is necessary. Here the channel consists of everything between digital-to-analog converter at the transmitter and analog-to-digital converter (ADC) at the receiver including radio frequency (RF) front ends, antennas at the transmitter and the receiver and all the media in between. We can treat the channel as a linear system and equalize it by dividing input signal after ADC in the frequency domain by the frequency response of the channel.
In Wi-Fi systems the channel frequency response is called channel state information (CSI). CSI is estimated on the Wi-Fi chip every time a data packet is received and used internally for equalization. CSI reflects a state of the media as well as the RF front ends and antennas. The RF front ends and antennas are designed to be stable over time so the most of the changes in CSI are due to changes in the media: changes of the reflection patterns and the attenuation properties caused by the movements. Thus, respiratory motions should have a predominant effect on CSI during sleep, if there are no other sources of movement between the connected devices.
Antennas are a part of the channel and influence CSI significantly. A radiation pattern and a polarization are the most important properties of the antenna as well as a size. The simplest antenna design is a half-wavelength dipole. This antennas have a high gain and smooth omnidirectional radiation pattern and are very often used in the stationary equipment (e.g. Wi-Fi access points) where the size is not that important [14]. For the half-wavelength dipole the gain and the phase do not depend on the angle of arrival (AoA) in the horizontal plane. But this design is not suitable for the mobile devices due to the size limitation.
More compact planar inverted F-antennas or planar monopole antennas are used in the smartphones [15]. While these antennas are small they have a low gain and an uneven radiation pattern which in turn decreases a sensitivity and creates directional changes in CSI because the gain and the phase now depend on the AoA [16, 17].
To the best of our knowledge, smartphones have not been used previously in studies devoted to breathing monitoring based on the analysis of CSI. However, it might be more challenging task to register breathing on smartphones than on other devices due to design and size of antennas. The aim of this paper is to check whether it is possible to monitor breathing during sleep via Wi-Fi CSI in conditions close to the real use case — using a smartphone on a bedside table and a few meters away access point (AP). The study is consists of 2 parts. In the first one (II-B), we checked if CSI have information about respiratory motions generally in this scenario. In the second (II-C), we estimated quality of automated detection of respiratory cycles based on CSI in comparison to a belt sensor.
II Materials and Methods
II-A Data collection
A smartphone was placed on a bedside table. We used Nexus 5 with Broadcom BCM4339 Wi-Fi IEEE 802.11ac chip and one antenna. The special firmware [13] was applied to get access to CSI. As far as we know, currently it is the only one open firmware, which allows to have access to CSI values on mobile phones. The smartphone worked in passive mode only for receiving Wi-Fi packets.
As a transmitting AP we used a mini PC with Atheros AR9380 Wi-Fi NIC and one external antenna. The AP was located 6 m away from the opposite side of the bed. Wi-Fi signal transmitted at 5500 MHz with 20 MHz bandwidth. The delay between sending Wi-Fi packets was 16 ms. This value was selected due to limitations of the firmware for CSI extraction on the phone. So, the sampling frequency was around 62.5 Hz with some jitter.
As ground truth we used a Vernier respiration monitor belt. It consists of a gas pressure sensor and a cuff with air fixed on the chest by a strap. The sensor monitors gas pressure changes caused by respiratory motions. The sampling frequency was 100 Hz.
We collected data of 5 male subjects (mean age of 34, range of 28–36, mean Body Mass Index (BMI) of 26, range of 17–33). The subjects imitated sleep — lay on the bed without moving and breathing in a comfortable rhythm — during 5 min in each of three postures: supine, on the right side (the back was directed to the phone), and prone.
II-B Signal Comparison
The firmware provides CSI values for 50 subcarriers. CSI values for one subcarrier during the whole records are shown on Fig. 1. The preprocessing of CSI signals consists of the following steps (Fig. 2):
obtaining magnitude of CSI values; 2. 2.
removing outliers by the Hampel identifier [18, 11] with a window of 1 s and a threshold of 1.7; 3. 3.
linear interpolation to fit 60 Hz sampling frequency; 4. 4.
low-pass filtering by a moving average filter with a window of 1.5 s; 5. 5.
band-pass filtering by the 4th order Butterworth filter with cut-off frequencies of 0.2 Hz and 0.4 Hz.
The belt signal was resampled from 100 Hz to 60 Hz and band-pass filtered in the same range. The CSI record and the belt signal were manually synchronized based on reference points produced by specific phenomena (e.g. posture changing).
Since the CSI record consists of 50 signal recorded simultaneously, we need to select the signal, which better represents information about breathing. The optimal subcarrier might be altered due to channel state changes. We used a window of 10 s and correlation with the belt signal as a criteria for channel selection. The signals were Z-normalized before correlation coefficient estimation.
Mean correlation coefficient were calculated for each subject and the entire dataset. Moreover, visual spectrogram comparison between the signals were performed.
II-C Automated Detection of Respiratory Cycles Based on CSI
For the second step of the study we follow the same methodology for CSI signal preprocessing. Channel selection was made with window of 30 s and Principal Component Analysis (PCA) [19, 11]. The length of the window corresponds to the standard epoch length in sleep analysis. The first component of PCA was used as the respiratory signal. Respiratory cycles were detected based on the analysis of turning points on the obtained signal and the correspond interval of the belt signal. Respiratory rates (RR) were calculated per epoch for both signals. Mean Absolute Difference (MAD) between these RR was estimated for each posture and subject, as well as percent of epochs, which have difference in RR. MAD was computed as
[TABLE]
in which — total number of epochs, — number of respiratory cycles in -th epoch based on the analysis of the belt signal, — number of respiratory cycles in -th epoch based on the analysis of the CSI record.
III Results
According to the methodology described in paragraph II-B, the mean correlation coefficient of 0.85 (range of 0.78–0.92) were achieved between the belt signal and the CSI-based respiratory signal.
Visual comparison of spectrograms (Fig. 3) shows high correlation between respiration related spectral components (yellow "strips" in spectrograms) of belt and CSI signals (e.g. segments 1–2 min, 7.5–8.5 min, 11.5–12.5 min). Fig. 4 shows the signals in the time domain.
MAD of 0.39 between RR were achieved (Table III). A third of the epochs have at least one wrong detected or missed cycle (Table I), and 5% of epochs have two or more (Table II). Fig. 5 shows a distribution of errors in RR estimation.
IV Discussion
The aim of the research was to check whether it is possible to use Wi-FI CSI on a smartphone for breathing monitoring. To the best of our knowledge, this is the first study addressed to this question. Our results show that information about breathing is contained in smartphone’s CSI and can be extracted for subjects with different BMI in different sleep postures. In spite of the fact that the results are quite preliminary, we can say that using CSI on smartphones for sleep and breathing monitoring is a promising direction for research.
Accurate and reliable detection of respiratory cycles and their parameters might be tricky due to high noise level in the signal. This is especially true for prone position, when CSI predominantly modulated by back movements with small amplitude. However, the dataset is too small to make reasonable conclusions about influence of BMI and postures on the signal quality. It is still a question whether the quality of the respiratory signal in the smartphone’s CSI enough for sleep monitoring.
The further research should consider a larger and more diverse dataset with CSI collected during sleep together with PSG to evaluate eligibility of its use for sleep staging. Moreover, phase of CSI should be used in additional to amplitude. Wang et al. [20] shows that the phase difference between two receiver’s antennas is very useful for breathing monitoring. Thus, the smartphone with two or more antennas should be used to have advantage of using both amplitude and phase of CSI for breathing and sleep monitoring.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] A. A. Ong and M. B. Gillespie, “Overview of smartphone applications for sleep analysis,” World Journal of Otorhinolaryngology-Head and Neck Surgery , vol. 2, no. 1, pp. 45–49, 2016.
- 2[2] G. A. Kerkhof, “Epidemiology of sleep and sleep disorders in The Netherlands,” Sleep Medicine , vol. 30, pp. 229–239, 2017.
- 3[3] G. Simonelli, N. S. Marshall, A. Grillakis et al. , “Sleep health epidemiology in low and middle-income countries: a systematic review and meta-analysis of the prevalence of poor sleep quality and sleep duration,” Sleep Health , vol. 4, no. 3, pp. 239–250, 2018.
- 4[4] C. V. Senaratna, J. L. Perret, C. J. Lodge et al. , “Prevalence of obstructive sleep apnea in the general population: A systematic review,” Sleep Medicine Reviews , vol. 34, no. October, pp. 70–81, 2017.
- 5[5] M. M. Ohayon, “Epidemiology of insomnia: What we know and what we still need to learn,” Sleep Medicine Reviews , vol. 6, no. 2, pp. 97–111, 2002.
- 6[6] S. J. Redmond and C. Heneghan, “Cardiorespiratory-based sleep staging in subjects with obstructive sleep apnea,” IEEE Transactions on Biomedical Engineering , vol. 53, no. 3, pp. 485–496, mar 2006.
- 7[7] X. Long, J. Foussier, P. Fonseca et al. , “Analyzing respiratory effort amplitude for automated sleep stage classification,” Biomedical Signal Processing and Control , vol. 14, no. 1, pp. 197–205, nov 2014.
- 8[8] A. Tataraidze, L. Korostovtseva, L. Anishchenko et al. , “Sleep Architecture Measurement Based on Cardiorespiratory Parameters,” in 38th Annual International Conference of the IEEE Engineering in Medicine and Biology Society , vol. 53, Orlando, USA, 2016, pp. 3478–3481.
