Wital: WiFi-based Real-time Vital Signs Monitoring During Sleep

—High-quality sleep is essential to our daily lives, and real-time monitoring of vital signs during sleep is beneﬁcial. Current sleep monitoring solutions are mostly based on wearable sensors or cameras, the former is worse for sleep quality, the latter is worse for privacy, dissimilar to such methods, we implement our sleep monitoring system based on COTS WiFi devices. There are two challenges need to be overcome in the system implementation process: First, the torso deformation caused by breathing/heartbeat is weak, how to effectively capture this deformation? Second, movements such as turning over will affect the accuracy of vital signs monitoring, how to quickly distinguish such movements? For the former, we propose a motion detection capability enhancement method based on Rice- K theory and Fresnel theory. For the latter, we propose a sleep motion positioning algorithm based on regularity detection. The experimental results indicated the performance of our method.


I. INTRODUCTION
Humans spend almost a third of life in sleep, therefore quality sleep is essential to health and well-being [1]. However, many diseases are threating our sleep now, such as cardiac arrest [2], sleep apnea [3] and asthma [4]. Some study also shows that disordered breathing is a major cause of Sudden Infant Death Syndrome (SIDS) for sleeping infants [5]. In numerous instances, patients with respiratory/heart disease only show the symptoms for a short period or on casual occasions. Hence, continuous, real-time and cost-effective vital signs(breath and heart rate) monitoring in home environments during sleep are indispensable.
Traditional schemes mainly use attached sensors to detect vital signs, such as Polysomnography (PSG) [6] and Electrocardiogram (ECG) [7]. Nonetheless, these dedicated devices are not suitable for home environments, they are expensive and damage sleep quality. Other solutions based on pressure or acceleration sensors are required to be in contact with the body too, and lighting conditions limit computer vision based solutions. Recently, Radio Frequency (RF) based methods [8]- [10] has attracted considerable attention as they provided noninvasive vital signs monitoring use SDR (Software Defined Radio). However, the devices used in these solutions are Yu Gu, Xiang Zhang and Huan Yan are with the School of Computer and Information, Hefei University of Technology, China. E-mail: yugu.bruce@ieee.org, zhangxiang@mail.hfut.edu.cn Zhi Liu was with the Dept. of Mathematical and Systems Engineering, Shizuoka University, Japan. E-mail: liu@shizuoka.ac.jp Fuji Ren was with the Dept. of Information Science and Intelligent Systems, Univ. of Tokushima, Japan. E-mail: ren@is.tokushima-u.ac.jp generally expensive. And we realized a real-time system that can carry on the long-term continuous monitoring, experiments have proved the effectiveness of our scheme.
Due to the widespread deployment of WiFi equipment, WiFi-based vital signs detection has received widespread attention [11]- [14]. This is possible because the breath and heartbeat can cause weak deformations in the abdomen and chest, and these deformations can affect the propagation of WiFi signals, which can be recorded by the WiFi Channel State Information (CSI). Nevertheless, there are few researches focus on the simultaneous detection of breath and heart rate [15], which is difficult because the trunk (or torso) deformation caused by breath is small and trunk deformation caused by heartbeat is even weaker.
Moreover, state-of-the-art motion detection capability enhancement schemes based on the Fresnel theory [12], [16] still have limitations. Fresnel based method only based on signal reflect path (dynamic path), it have not consider the ratio of dynamic path and static path, etc. how much signals reflected by human gesture, such ratio can influence the WiFi-based detection. Because the inference of these schemes is based on the premise that the components of the dynamic path do not change significantly, when the proportion of the dynamic path changes, the role of the Fresnel theory is limited.
Current method based on FFT or count number of waveform peak to extract vital signs, it can obtain accurate results. However, these method lack a accurate motion detection method which can differentiate different kind of motions in sleep(such as breath and turn over), such motions can influence the vital signs detection performance, and accurate detect and obtain motion is also important for sleep motion recognition. After obtaining the data containing vital signs information, the most important step is to process the data to obtain vital signs. Current research has adopted methods based on FFT [17] or crest detection [15] when extracting vital signs, both methods are mature and effective. However, most of the schemes do not consider the problem of accurate sleep movement detection. These movements will be mixed with breathing/heartbeat and affect the accuracy of vital signs detection, and motion detection is also very important for sleep state recognition.
In this paper, We aim to propose a low cost, continuous and contactless vital signs monitoring.There are two challenges we need to overcome to build an efficient vital signs monitoring system during sleep. On account of the torso deformation caused by breath is tiny, and the deformation caused by heartbeat is even smaller; the first challenge needs to work out is how to improve the detection sensitivity to the deformation caused by breath and heartbeat? Furthermore, sleep motions such as turning over can be mixed with the torso deformation caused by breath and heartbeat. Such motions can influence the vital signs detection performance, and it is necessary to position them and filter them out. However, breath and heartbeat and other motions during sleep all cause the CSI waveform to fluctuate. The second problem thus is how to locate the sleep motions which are different from breath and heartbeat? To this end, we propose a motion detection capability enhancement method based on the Rice-K theory to solve the first issue. We propose an algorithm based on regularity detection to accurately locate sleep motions different from breath and heartbeat to solve the second technical challenge.
The main contributions of this paper are summarized as follows: 1) We propose a motion detection capability enhancement method based on the Rice-K theory, which greatly enhance the detection ability of weak deformation caused by breath and heartbeat. Note that this method can also be applied in other WiFi-based motion detection and recognition research. 2) We propose a sleep motion positioning algorithm based on regularity detection, which can accurately locate the position of sleep motions (such as turn over and get up) different from breath and heartbeat. 3) We implement a prototype system to evaluate our method. The experimental results indicated the performance of our method, and the accuracy is 96.618% and 94.708% forbreath and heart rate detection, respectively We organize the remainder of this paper as follows: in section II, we provide an overview of the related work. We describe our motion detection capability enhancement method in section III. And we introduce our system design in section IV. Then, we evaluate our method and show the experimental results in section V. Finally, we conclude our work in section VI.

A. Wireless sensing with WiFi
Due to the widespread deployment of WiFi devices and the convenience of wireless sensing, research on passive sensing based on WiFi has received widespread attention [19]- [21]. These research mainly use Received Signal Strength Index (RSSI) or CSI. RSSI is easy to acquire, but the perceiving granularity is coarse. CSI can be obtained by modifying the underlying driver of the WiFi network card, and the perceiving granularity is better than RSSI. With the help of WiFi RSSI or CSI information, person detection, gesture recognition, position, sleep movement detection, driving activity detection, and many other applications can be realized [19].
Based on WiFi, current research can implement person detection [22], gesture recognition [23], position [24], [25], sleep movement detection [26] and driving activity detection [27], etc. Based on the passive sensing characteristics of WiFi signals, some tasks can be better carried out. In the past two years, research based on WiFi perception has been further expanded into new fields. [28] use WiFi devices to image key points of the human body, enabling human visualization without vision equipment. [29] use WiFi devices to track finger draws in the air. [30] achieved steal mobile phone passwords using COTS WiFi devices.

B. Breath and heartbeat detection
Respiratory frequency and heart rate are critical physiological indicators of the human body, and they are important indicators for evaluating health conditions. In general, the methods used to track such information can be categorized into three groups: sensors based, vision-based, and RF signal based.
Most of the traditional solutions use sensors for physiological signal detection, for example, Polysomnography (PSG) [6] and Electrocardiogram (ECG) [7] measures body functions like breath or heart rate by attaching multiple sensors to a patient. H.Aly et al. [31] utilize the accelerometer and gyroscope on the mobile phone to detect the chest breathing action of the person. Smart sleeping mat [32] uses pressure sensor arrays for breath detection. However, sensors-based methods are usually expensive, complex to deploy and invasive.
Vision-based solutions [33] are usually subject to light conditions and also raise privacy concerns. Recently, research on 'taking wireless radio signals as sensors' has received more and more attention. When RF signal travels from a transmitter to a receiver, it can be influenced by the breathinginduced chest movement on the propagation paths. RF signalbased solutions are usually based on special equipment, such as ultra-wideband [8] and Frequency Modulated Continuous Wave (FMCW) radar [9], [10]. The equipment used in these solutions is expensive and not suitable for daily environments. Compared with these solutions, WiFi-based solutions are less expensive and simple to deploy, can be implemented using standard equipment.
Previous WiFi-based breath detection researches are mostly based on RSSI [34]- [36]. RSSI characterizes the total received power of all paths, which is coarse-grained and inherently incapable of capturing multipath effect. In contrast, CSI can reflect fine-grained channel information, and reflect multipath information well. Therefore, the latest related schemes are mostly based on CSI [12], [13], [15], [16], [18], [37], [38]. In particular, Liu et al. [18] obtain respiratory rate by using Short-Time Fourier Transform (STFT) on the CSI amplitude, it can obtain breath information in different sleeping postures. Nevertheless, this solution needs to deploy two routers and three computers. The authors of [15] use a pair of devices to monitor the breath rate in different sleeping postures.However, they need the line of sight between the WiFi device and access point crossing the person's chest.
The authors of [17] use CSI phase to detect breath rate, they use cables and splitters to connect the transmitter and receiver, and need to process two receiver data streams to eliminate phase errors. [12] calculates the best position to detect respiration by deriving the Fresnel diffraction model. However, Fresnel theory is limited by other factors like receive antennas and obstacles in the real environment. [13] uses the CSI-quotient of two receive antennas to eliminate the phase offset and utilize the complex plane projection to achieve long-distance breath detection. However, this method based on signal reconstruction; it cannot recover the heart rate. We compare these systems and our work in Table I. Note that this paper is an extension of our previous work [39]. In this paper, we use Rice-K theory beside Fresnel theory to enhance the detection accuracy. We also propose a new sleep motion positioning algorithm based on regularity detection, which can accurately locate the position of sleep motions (such as turn over and get up) different from breath and heartbeat. We also improve the related work section and the experimental section over our previous work.

III. MOTION CAPTURE CAPABILITY ENHANCEMENT
In this part, we analyze the experimental phenomena to explain why the WiFi detection method based on the Fresnel theory is limited. Then, we propose our motion capture capability enhancement method based on Rice-K theory and Fresnel theory.

A. CSI Collection
CSI describes the signal's attenuation on its propagation paths, such as scattering, multi-path fading or shadowing fading caused by motions, and power decay over distance. In frequency domain,it can be characterized as: Where ì and ì are the received and transmitted signal vectors, respectively. ì is the additive white Gaussian noise, and ì is the channel matrix representing CSI information.

B. Effectiveness and Shortcoming of The Fresnel Theory Based WiFi Detection
As shown in Fig. 1, Fresnel zones are defined as a series of concentric ellipsoids, and 1 and 2 are the positions of the transmitting antenna and receiving antenna, respectively. and represent the sender and receiver, respectively. For where is a point at the boundary of the th Fresnel zone. A subject can reflect a WiFi signal, and if the subject moves a small distance, it leads to changes in the phase of the WiFi signal on the corresponding path. If the subject moves ( ), since wireless signals travel at the speed of light, denoted as , ( ) can be represented as ( )/ . Let represent the wavelength, where = / . Thus, the phase shift can be written as − 2 ( )/ .
When a subject appears at the boundary of the even/odd Fresnel zone, the dynamic path phase shift Δ is equal to and 2 , respectively. As a result, the combined signal amplitude should be degraded in the even zones and enhanced in the odd zones. In other words, if an object continues to pass through multiple Fresnel zones, the amplitude of the received CSI signal exhibit a sine-like wave.
The larger the effective displacement of the action, the more obvious the response is on the CSI waveform. The effective displacement is along the direction of the normal line, which can cause the reflection path length change.
Previous researches show that when the direction of the human body is 0 degree, the detection efficiency is the best. As the angle increases, the effective displacement becomes (a)Setting1, T1 is transmit antenna and R1,R2,R3 are receive antennas, the distance from T1-R3 is 80cm, T1-R1 is 120cm; (b) Setting2, the chest is on the LOS of T1-R2, the distance from T1-R3 is 20cm, T1-R2 is 120cm; (c) Setting3, the chest is in the FFZ of T1-R2, the distance from T1-R3 is 30cm, T1-R2 is 120cm.
smaller, and the detection effect becomes worse [16]. Moreover, the closer a human is to the Tx/Rx, the better detection performance is [12]. Based on these findings, we construct a prototype system to carry out some preliminary experiments.
[Prototype] Our prototype system composes of two commodities MiniPCs, which are all equipped with an Intel Network Interface Controller 5300 and are transmitting and receiving device, respectively. Antennas settings are shown in Fig. 2.
[Participant] One 22 year-old student participated in preliminaries experiments.
[Environment] We conduct the experiments in a 7 × 10 2 office room, with the furniture including chairs, couches, computer desks, and book cabinets. Other students are also in the same room during the experiments, as shown in Fig. 4.
[Setting] The package sending rate is set to 1000Hz, participant conducted the experiment with different sleeping postures (prone, supine, facing left recumbent and facing right recumbent) with different antenna setting (as shown in Fig. 2), the experiments results as shown in Fig. 3. We analyze the preliminary results and obtain the following key observations: Breath indeed affects channel response and experimental setting affects the channel response: Firstly, we confirm that breath in terms of signal variations has been recorded by all settings. Through the severity and regularity of the received signal's fluctuations, we can observe that breathing does affect CSI in all settings.
Fresnel theory does enable CSI based detection As shown in Fig.3b and 3c, it's hard to observe significant fluctuation which caused by breath with some sleeping postures sometimes. It owing to the deformation direction of torso in anteroposterior dimension (breath mainly cause deformation in this dimension) is almost parallel to the LOS path of T1-R2, that is, the direction of the human body is nearly 90 degrees, the deformation of the trunk can only cause very weak dynamic path changes (the length of dynamic path does not change when moving along the ellipse border of Fresnel Zone.). It is difficult to cause obvious effective displacement according to the Fresnel based theory [16]. And the abdominal/thoracic deformation during respiration in mediolateral dimension is too small to detect (when facing left/right recumbent, deformation in mediolateral dimension is perpendicular to T1-R2, however, the area and the deformation of the trunk due to breathing of the side of the body are small). These phenomenon can be explained by the Fresnel theory, and prove the effectiveness of the motion detection method based on the Fresnel theory.
Fresnel theory based detection can be further improved For setting 1, when a human is prone or supine, the direction of abdominal/thoracic deformation in anteroposterior dimension caused by breath is nearly parallel to T1-R3. according to the Fresnel theory only, the effective displacement of chest/abdomen is tiny, and the performance of T1-R3 should not be excellent. However, T1-R3 performance good, even if we adjust the height of T1-R1 to make the distance between T1-R1 equal to T1-R3, T1-R3 is still better than T1-R1. This phenomenon is different from the description of the previous work [16], according to wang's theory, T1-R1 should perform better than T1-R3 when humans lying down, because of the body orientation is 0 degree for T1-R1, but nearly 90 for T1-R3.
In summary, the Fresnel theory is beneficial, but other factors in wireless perception can also affect perception. We find that blocking the LOS path can help detect motions too. Next we analyze why blocking the LOS path can increase motion detection sensitivity based on Rice-K theory, and propose a motion detection capability enhancement method based on the Rice-K theory and the Fresnel theory.

C. Detection Capability Enhancement Based on Rice-K Theory
The Rice K factor is defined as the ratio of the power in the LOS path to the power in the NLOS path. The baseband in-phase/quadrature-phase (I/Q) representation of the received signal can be expressed as follows [41]: Here is the Rice factor, Ω denotes the total received power, 0 and 0 are the Angle of Arrival (AOA) and phase of the For WiFi CSI, the received signal's CFR (channel frequency response) can be expressed simply as the superposition of dynamic path CFR and static CFR, and it can be represented as: The received signal has a time-varying amplitude in complex plane [16]: is the phase difference between the static vector and the dynamic vector, the part that causes the amplitude fluctuation of the CSI waveform is 2| ( )|| ( )| . It can be seen that in the case where the range and position of the motion are constant, is constant, and the factor affecting the fluctuation range is | ( )| and | ( )|.
Since antenna do not move in the experiments, ie = 0, we simplify Equation (3) to get: In the case where the torso does not block LOS, all LOS components and part of NLOS components belong to the static path; part of NLOS components belong to the dynamic path. Combined with Equation (6) and ignoring the transmitted power, we define | | and | | as follows: is the proportion of static paths in the NLOS components. Combine with Equation (5) to get the following equation: Signal amplitude variation caused by motion can be quantified as: The value of the above formula is related to three variables, namely , and . Consider that the change in phase difference caused by breath is relatively stable, we omit without considering. Then take the derivative of equation 10 of to get the following formula: When > 1 − 2 , ( , ) decreases as increases, under normal circumstances, only a small part of the signal of the omnidirectional antenna can be reflected by the human body, which means that is generally bigger than 0.5. In other words, blocking the LOS path appropriately can make CSI more sensitive to motions.
Will blocking the LOS make perception capability worse?: Blocking the LOS path can reduce the Rice-K value, but will blocking must improve the detection capability? Equation 10 have two main variables, and . Whether there such a situation that block the LOS path can reduce , but increased, results in poorer motion perception ability? We believe that such a situation is hard to happen. Assuming that the worst case, which is blocking the LOS path increases the NLOS by , but is not allocated to the dynamic vector at all. At this time, the values of | | and | | are unchanged, their product will not change, and the motion detection capability will not be worse, just equal to the original situation. In the actual indoor environment, it is difficult to make the blocked LOS signal do not propagate towards the human body at all due to reflections from indoor objects. Nevertheless, no matter is larger, smaller, or unchanged, the motion detection capability will not be deteriorated by block the LOS (Unless the occlusion affects the signal reception at receiver).

IV. SYSTEM DESIGN
In this section, we present the system design as shown in Fig. 4. We collect better data through the motion detection capability enhancement method based on the Rice-K theory. After obtaining the CSI data, the receiver sent it to the monitor computer through the network for real-time process and display. We selecting the best performing subcarrier by subcarrier  Fig. 4: System architecture selecting first, then positioning the abnormal motions and skip them in the subsequent processing. The data is divided into two parts, mainly including breathing and mainly containing heartbeat respectively by denoising and frequency domain segmenting, then extract the breathing rate and heart rate separately then display.

A. System Overview
After obtaining the CSI data containing vital signs, we need to process the data to obtain vital signs information. Our Wital system is shown in Fig. 4. The system is divided into two parts: Data Preprocessing. We selecting the best performing subcarrier by subcarrier selecting first, then positioning the sleep motions and skip them in the subsequent processing. Vital Signs Extracting. The data after preprocessing are divided into two parts by frequency domain segmenting, one mainly including breathing and other one mainly containing heartbeat, then extract the breathing rate and heart rate separately by Vital Signs Extracting model.

B. Data Preprocessing
Subcarrier Selecting. Different subcarriers have different central frequencies. They may have different performances even for the same motion. Therefore, it is essential to choose proper subcarrier that can better capture the breath. According to previous experience [39], we choose the subcarrier with the most significant variance. Sleep Motion Positioning. People may also have other motions such as turning over, kicking besides breath and heartbeat a during sleep.These motions have close frequency with breath and heartbeat and make it difficult to separate them. Therefore, we design a sleep motion positioning algorithm to locate and filter these motions different from breath/heartbeat. Different types of motions have different regularities, such as breath and walking, and CSI data can record this regularity. We select a collected CSI waveform that includes two turning over and normal respiration to verify this conjecture, as shown in Fig. 5. We set a window with variable length and a window with fixed length. starts at the beginning of the CSI waveform, and starts from the end of , both and have an initial length of 2000 packages.
Then we calculate the minimum euclidean distance (MED) from the CSI waveform contained in and the waveform in , then, the start point of do not change, but the end point moves backward by 100 packages. The start point of moves backward by 100 packages, and the length do not change, repeated calculation of the MED. The result is shown in Fig.5, when the first turning over occurs, the MED increases sharply, and when the motion ends, the MED begins to decrease. Since already contains a turning over motion, when the second turning over occurs, its MED changes are not dramatic. We can see that the regularity between different types of motions is different, and the regularity between the same types of actions is similar. The key steps of this algorithm are as follows: tance from TP to WEP (wave endpoint) is 20 packages, the constructed waveform is shown in Fig.5. Calculate the Euclidean distance between the constructed waveform and the MED waveform at this time and record, move the TP forward by one package, repeat the above steps to calculate the Euclidean distance. Finding the minimum Euclidean distance and map this TP to the point on the actual CSI waveform as the start-point of motion; 4) End-point positioning. Set the start-point we positioned as the beginning of the CSI waveform, initialize the parameters as described in the first step, and calculate the MED as described above. Then use the previous method for positioning the end of the motion. Set the end-point as the beginning of the CSI waveform, and turn to step 1.
Our sleep motion positioning algorithm performance is shown in Fig. 6, it can very accurately positioning sleep motions. Data Denoising. Received CSI data contains a lot of interference noise due to equipment and environmental factors. In the preprocessing module, we choose the Hampel filter to filter out the outliers which have significantly different values from other neighboring CSI measurements. The goal of the Hampel filter is to identify and replace outliers in a given series. We computes the median of a window composed of the sample and its six surrounding samples, three per side. It also estimates the standard deviation of each sample about its window median using the median absolute deviation. If a sample differs from the median by more than three standard deviations, it is replaced with the median.

C. Vital Signs Extracting
Frequency Domain segmentation. The trunk deformation caused by the heartbeat is very small, the CSI waveform change caused by it will be overwhelmed by the change caused by breath [15]. Therefore, we need to distinguish them in the frequency domain. The CSI waveform with the frequency range related to normal heart rate range of people (i.e., 60bpm to 120bpm which corresponds to 1Hz to 2Hz) will input to our heart rate estimation model, and the CSI data with the frequency range related to normal breath rate range of people (i.e., 15bpm to 30bpm which corresponds to 0.25Hz to 0.5Hz) will input to our breath rate estimation model. We use Butterworth bandpass filters to separate such data. Vital Signs Extracting. We use bandpass filters to obtain data containing mainly heart rate and data containing mainly respiratory rate, then extract heart rate and respiratory rate by FFT. We design a real-time system to process and display these vital signs in real time use Matlab as show in Figure. 7. Considering the requirements of real-time and the weak multithreading capabilities of Matlab, our extraction algorithm favors simple and efficient FFT.

V. PERFORMANCE EVALUATION
In this section, we first evaluate the effectiveness of the motion capture enhancement method, then evaluate the realtime vital signs detection system.

A. Evaluation of Motion Detection Capability Enhancement Method
In order to verify our inference in the Section .III, we first calculated the Rice-K value of each stream in setting 1 (the setting as show in Figure.2a) as shown in Figure. 8, it can be found that the larger the K is, the worse the motion capture effect is. Then we placed a Lead sheet between the T1-R1 antenna pair in setting 1 (decrease K) to perform a breath detection experiment, the result as shown in Fig.10. It can be seen that the motion detection capability of T1-R1 has been significantly improved. We show the average breathing detection error (BDE), the variance of the CSI waveform (VAR), and the mean amplitude difference (MAD) as Figure.9. It can be observed that both the detection accuracy and the sensitivity to motion have improved.
Although our system only needs one data stream, we must place the other two antennas, and can't block the LOS between at least one receiving antenna and T1. Because of the CSI tool must receive the data stream of three receiving antennas at the same time to collect CSI data. Moreover, we found in the experiment that no matter how the signal is blocked (Without using a wall to completely block the signal or absorb a lot of signal energy), there always have a data stream with an SNR of about 20, which is the least sensitive for motions. If put three antennas together, there always have one least sensitive data stream, and it's not fixed. Every time you restart the system, you need to find the best data stream. Many studies have not noticed this phenomenon, they merely put three receiving antennas together like [12].

B. Experimental Setup
In the actual setup, we build our prototype system based on setting 1. Due to the limitations of bed, the person's torso is closer to R3 when lying down or face down; in other words, the torso is far away from the mid-perpendicular of T1-R3. When we are lying down/lying with face down, the chest displacement caused by breath/heartbeat in anteroposterior dimensions still has a significant effect on T1-R3 based on the Fresnel theory. It ensures the monitoring performance in different sleeping postures. If we block T1-R1, as shown in Figure.10, when the person is facing left/right recumbent, T1-R1 is sensitive to the breath of the mediolateral dimensions. However, when the person's arm blocks the flank, the monitoring effect becomes poor. It is due to when facing left/right recumbent, the main factor affects the CSI received by R1 is the torso deformation of the flank. This is why we chose T1-R3 to monitor vital signs instead of T1-R1.
We first calculate the Fresnel diffraction model of T1-R3, by adjusting the distance of T1-R3 and their position, to keep the bed stay in a sensitive detection area. That is, leaving the bed outside the second Fresnel zone of T1-R3, but not too far away, then place a lead sheet under T1 to block the LOS path of T1-R3. CSI are collected use csitool [42] and Intel 5300 NIC, after  Fig. 10: Obstacle the direct signal from T1 to R1 in setting1, the K factor of the T1-R1 stream decrease to 12.4, the K factor of the T1-R3 stream increase to 5076.
the receiver receives the CSI data, then transmit them to the processor through the network for real-time processing, We received three streams from three receive antennas, but only process one of them for vital signs detection. We use off-the-shelf hardware devices to implement the proposed system. Specifically, we use two mini PC as the sending and the receiving devices, and their network cards are Intel Link 5300 WiFi NIC. The miniPCs have a 2.16GHz Intel Celeron N2830 processor with 2GB RAM and Ubuntu OS in version12.04. Real-time monitoring machine is a desktop computer equipped with an Intel Core i5 3450 CPU (3.1G HZ), 2GB storage. Our antennas settings are shown in Fig. 11, the distance from T1-R3 is 80cm, we placed lead sheet under T1 to enhance the performance of R3, and there is no blocking between R1 and T1. We only use stream T1-R3 to monitor vital signs; the purpose of place other two antennas is to prepare for future sleep monitoring system expansion (sleep motions recognition such as turning over, sit up; perceive motion direction and disease alert such as epilepsy).
We experimented in a lab environment as shown in Fig.  11, a total of ten volunteers participated in the experiments (6 males and 4 females) whose age ranges is 21 to 26. These ten volunteers were general university students who volunteered for the experiments. In the experiments, we did not limit the normal activities of others in the lab.
Each participant underwent an actual test of 30 minutes in different sleeping postures naturally (prone, supine, facing left recumbent, and facing right recumbent). Different from previous work [15], [17], we did not use a metronome to control the volunteer's respiratory rate, and we do not need to use a directional antenna to detect heart rate under LOS conditions. The ground truths of breath and heartbeat are measured by a accelerometer attached to the abdomen and a fingertip pulse oximeter, respectively. Our real-time system is shown in Fig. 7.

C. Evaluation Results
The CSI waveform, which mainly containing the respiratory information obtained by the bandpass filter, is compared with the acceleration sensor data attached to the abdomen, as shown in Fig. 12. It can be seen that the CSI waveform is highly consistent with the respiratory waveform obtained by the acceleration sensor. Fig. 13 compares the normalized CSI waveform which contain heartbeat to an acceleration sensor's reading attached to the chest, the occurrence of a heartbeat on the accelerometer is consistent with the detection result of CSI. It is indicate that the normalized CSI obtained from WiFi signals could be utilized to extract the fine-grained heartbeat and breath information. We evaluate the overall performance of breath and heart rate estimation under different sleep postures, the final result is an average error of 0.498 bpm (beat per minute) for detect breath, 3.531 bpm for detect heart rate, and the accuracy is 96.887% and 94.708% respectively. 14 illustrates the vital signs (breath and heart rate) monitoring error of different participants; they have different body types, which results in different final results. However, in general, our system has high accuracy in detect respiration, and the error in detect heart rate is also within the acceptable range in a non-clinical environment. Figure. 15 illustrates the vital signs (breath and heart rate) monitoring error of different sleeping postures, in supine and facing right recumbent postures, monitoring error is relatively small. However, for facing left recumbent posture, the error in monitoring heart rate is largest. For prone posture, the error in monitoring breathing rate is largest. In general, our system can accurately monitor vital signs for different sleeping postures.

VI. CONCLUSION
In this paper, we show that we could use WiFi signals to track breath and heartbeat with different sleeping postures using only one pair of WiFi devices. To achieve this, We propose a motion detection capability enhancement method based on the Rice-K theory and the Fresnel theory to help detect the minor motions caused by breath and heartbeat. We also design a sleep motion positioning algorithm based on regularity detection, which can accurately position the range of sleep motions (such as turn over and get up). We also use the Rick-K theory to explain why it is beneficial for vital signs detection when blocking part of the LOS signal. We implement a prototype system to evaluate our method. The experimental results indicated the performance of our method, and the accuracy is 96.618% and 94.708% for breath and heart rate detection, respectively.