WiMonitor: Continuous Long-Term Human Vitality Monitoring Using Commodity Wi-Fi Devices

For a large population of elderly who live alone, a continuous long-term daily monitoring system is critical and imminently needed to enhance the quality of their lives. Continuous monitoring of vitality information (i.e., which area the elder is staying in, the motion state and activity intensity of an elder) is essential for elderly care. In this paper, we use existing commodity Wi-Fi devices to design and implement a long-term device-free human daily vitality system, WiMonitor. Our system can continuously capture the target’s vitality information in a multi-room home environment without compromising the privacy of the target. In a continuous 22-day experiment, WiMonitor successfully captures the human vitality information accurately. We believe our system can provide valuable long-term monitoring data for both researchers and health care personnel.


Introduction
Population aging is a global issue affecting most countries. In 2019, there were 703 million persons aged 65 years or over in the global population, and this number is projected to double to 1.5 billion in 2050 [1]. By 2050, one in six people in the world will be over age 65, and roughly 90 percent of that population prefers to stay in their home rather than in a nursing home [2,3]. In Austria, 51.4% of all households of people aged older than 65 years were single-households in 2018. In Europe, more than a third of older people live alone. In the US, nearly 29% of the 46 million community-dwelling older adults live alone [4,5].
Elderly people who live alone can develop poor health, they may have an accident at home and have no way of alerting someone that they need help [6]. Thus, a continuous long-term daily monitoring system is critical and imminently needed for elderly health care. Specifically, daily life routine and abnormality detection are key for good elderly health care. Besides, regular daily physical activity is one of the most important things people can do to improve their health, and such daily physical activity can decrease the risk of chronic diseases [7]. According to the energy consumed as people perform certain activities, daily activities can be divided into different levels [8,9]. Activity levels may remain relative stable over weeks or months, an early and accurate awareness of decreasing activity levels can act as a warning sign to trigger early intervention [10]. High-level semantics such as the area staying rate of the target, the motion state of the target and long-term physical activity intensity levels are important health-related information. Moreover, if we can continuously and non-intrusively capture these health-related daily life information of elders over the scale of weeks and months, then that would provide a valuable long-term monitoring system for health care.

•
We propose a method to achieve robust long-term room-level area detection.

•
We design a metric to estimate the intensity of physical activity and explain the metric's capability for activity intensity estimation.

•
We implement and deploy a real-time Human Vitality Monitor System-WiMonitor, using commodity WiFi devices for continuous long-term monitoring in a smart home environment, and ask four volunteers to live in the smart home for 24 h in a continuous 22-day experiment. The long-term experiment demonstrates that WiMonitor is able to accurately reveal the daily life routines of different volunteers. The experiment shows that the system can be used to infer the routine habits of people, detect any abnormality. We believe this non-intrusive sensing system and sensing data generated make long-term elderly care and health support at home viable. The rest of this paper is organized as follows. Section 2 introduces the related work. Section 3 introduces the preliminaries of CSI and other related knowledge. Section 4 presents the methodologies of proposed system in detail. Section 5 presents the experimental results analysis. Section 6 discusses the existing indoor positioning techniques and compares with ours. Section 7 draws the conclusion of this work.

Related Work
In recent years, with the rapid development of sensing technology in the era of the Internet of Things (IOT), a variety of human sensing technologies have been developed, including wearable sensors [13,14,32], camera [11,12], radio frequency (e.g., WiFi) [8,[16][17][18][19][20][21][22][23][24][25][26][27][28][29][30], acoustic-based sensors [33,34], infrared [35,36] and so forth. wearable sensor-based technologies require users to wear a specialized device for sensing, which is inconvenient for users. Camera-based technologies can only work well under good lighting conditions and may bring privacy concerns. Acoustic-based technologies are vulnerable to ambient noise and the sensing area is limited. Infrared-based technologies need dedicated infrastructure and are easy to block by obstacles. WiFi-based technologies reuse WiFi devices, and have the characteristics of low cost, easy to deploy, privacy preservation and non-intrusive. These characteristics enable WiFi-based technologies draw more attention among researchers. In this paper, we focus on long-term human vitality monitoring in a multi-room smart home environment using the commodity Wi-Fi devices.
Our monitoring system not only could detect which area the user is staying in, but also could monitor the user's motion state and activity intensity. We also discuss existing research most relevant to our work.

WiFi-Based Device-Free Indoor Localization
The existing device-free indoor localization systems can be categorized as fingerprintbased and geometric mapping-based. Dang et al. [25] uses the post-processed CSI amplitude and phase as fingerprint data to build the fingerprint database. Xiao et al. [37] use the distribution of the CSI amplitudes over the all sub-carriers and the multiple antennas as fingerprint of corresponding positions, in order to improve the localization accuracy. Most of fingerprint-based systems are difficult to deploy since these systems need labor intensive offline training and are sensitive to the changes of the environment. Unlike fingerprint-based method, geometric mapping-based method does not need to build fingerprint database. MaTrack [17] employ the angle-of-arrival (AoA) information to locate the user. However, MaTrack needs phase calibration due to random phase offset of two antennas. Indotrack [18] applies conjugate multiplication between the CSI of two antennas to remove the random phase offset and achieves better localization performance than MaTrack. Through these works can get better localization performance, they cannot obtain accurate area information at room-level.
In a typical home environment, room-level localization is sufficient for a lot of real-life scenarios. Obtaining the accurate area information (i.e., which room the user is staying in) is much more useful than knowing inaccurate fine-grained location information for elder daily life monitoring. WiVit [28] applies a Doppler-Music method [18] to extract the path length change speeds, and utilizes the relationship between path length change speed and the user's position to calculate which area the user is located. However, this method is not robust enough which needs calibration when environment changes. Wiborder [16] applies conjugate multiplication between the CSI of two antennas to construct parameters to discriminate the sensing boundaries which formed by walls of different areas. Wiborder is the first work through boundary sensing determination to achieve accurate area detection. However, CSI amplitude contains noise due to the noise of Automatic Gain Controller (AGC) and the environmental noise, conjugate multiplication between the CSI of two antennas could amplify the amplitude noise, thus the sensing boundary parameter is not robust to achieve long-term area detection. In this paper, we propose a method to remove Sensors 2021, 21, 751 4 of 28 the noise of AGC on CSI amplitude to get more stable sensing boundary parameter and achieve long-term area detection.

WiFi-Based Device-Free Human Motion Detection
As human motion detection plays an important role in many smart home applications such as intrusion detection and activity recognition, a lot of device-free human motion detection systems have been developed using WiFi CSI. Dong et al. [26] extracted both the time and frequent domain features from CSI amplitude to detect human motion in both flat floor and staircase settings. MoSense [27] utilizes the variance of phase difference for human motion detection. The key idea is that the phase difference remains stable when there is no motion, and changes when the user is moving. These research works require offline training and calibration, and the threshold value which is used to distinguish the still and motion status of the target varies in different environments. There are also have some research works which do not require training phase, WiVit [28] utilizes Doppler-Music method to obtain Doppler frequency spectrum and uses the power of Doppler frequency spectrum as the feature to detect human motion. However, both the power of CSI and Doppler-Music method could amplify the amplitude noise, when the target is far from transceivers, the amplitude noise could mask the small CSI changes caused by user's small-scale motion. WiDetect [31] uses the auto correlation function of the power of CSI for motion detection.

Preliminaries
In this section, we first introduce the CSI Primer, and then introduce two novel technologies which can reduce the noises of raw CSI signals.

CSI Primer
In the indoor environment, WiFi signals propagate from transmitter to receiver through multiple paths, i.e., one Line-of-Sight (LOS) path, and multiple paths from surrounding objects such as walls, furniture and the human body. The signal arriving at the receiver is a superposition of signals from all the paths, this phenomenon is called multipath effect [28,38]. The wireless propagation channel can be modeled as Channel Impulse Response (CIR) in time domain to characterize the individual paths, CIR h(τ) can be denoted as: where a i , θ i and τ i represent the amplitude, phase and time delay of the ith path, respectively. N is the total number of multi-path, and δ(τ) is the Dirac delta function [39]. Channel frequency response (CFR) is the Fourier transform of CIR, characterizes the small-scale multipath effect and the combined effect of scattering, reflecting and fading with distance. Let X(f,t) and Y(f,t) represent the frequency domain representations of transmitted and received signals, respectively. CFR for a carrier frequency f at time t. H(f,t) can be represented as: where N represents the Gaussian noise [24]. In WiFi 802.11n, CSI is the sampled version of CFR at subcarrier level. In the area of Wi-Fi sensing, the ideal CSI can roughly be denoted as: where α i is the complex attenuation, d i (t) is the propagation length of the ith path, λ is the wavelength and L is the total number of multi-paths. The multiple paths can be divided into static paths and dynamic paths [24]. The static paths are composed of the LoS path and the reflected paths from the static objects in the Sensors 2021, 21, 751 5 of 28 environment, which do not change with time. While the dynamic paths are the signal paths induced by the moving targets. Thus, the CSI can be rewritten as: where H s (f,t) is the static component which is the sum of CFRs for static paths, and S is the attenuation, ϕ is the phase shift of the static component. H d (f,t) is the dynamic component which is the sum of CFRs for dynamic paths, and α k is the complex attenuation, d k (t) is the path length of the kth path, respectively. However, the CSI measurements provided by commercial WiFi devices contain two major types of noise: the amplitude noise and the phase noise [38]. Due to the power amplifier uncertainty of AGC and environmental noise, the CSI amplitude has noise ∆ AGC and ε. Since the transmitter and receiver are not time-synchronized, there is a time-varying random phase offset e −jθ o f f set in each CSI sample [16,18]. Considering these noises, the CSI can be rewritten as: This CSI noise prevents us from achieving satisfactory sensing performance. In order to remove such noise, several signal processing technologies have been proposed. Among these technologies, CSI conjugate multiplication and CSI ratio are two novel technologies which have been widely used in existing research works [16,18,28,40,41].

CSI Conjugate Multiplication
A commodity WiFi card usually has multiple antennas, the time-varying random phase offsets are the same across different antennas on a WiFi card as they share the same RF oscillator [18]. Thus, conjugate multiplication between the CSI of two antennas can remove the time-varying random phase offsets [18].
The conjugate multiplication between the CSI of two antennas can be denoted as Equation (6), where H cm (f,t) is the output of conjugate multiplication, H 1 ( f , t) is the CSI of the first antenna, H 2 ( f , t) is the conjugation of the CSI of the second antenna.
In Equation (6), the term 1 is the product of the static components and can be treated as a constant within a short time period. The term 2 and term 3 are two products of static component of one antenna and dynamic component of another antenna. The term 4 is the product of dynamic components which can be ignored as the value is very small. From Equation (6), we can see that the random phase offset has been removed from CSI. However, conjugate multiplication between the CSI of two antennas amplifies the amplitude noise.

CSI Ratio
Assuming there is only one reflection path corresponding to the human target's movement, the dynamic component is the path reflected from the human target while the static component is composed of the LoS propagation and other reflection paths from static objects in the environment. The CSI Ratio is calculated by taking the division operation of CSI between two antennas, which is defined as follows: where H 1 ( f , t), H 2 ( f , t) are the CSI of the first antenna and the second antenna, respectively. Through division operation, we can see that the CSI amplitude noises and the random phase The CSI ratio can be rewritten as follows: Since the parameters a, b, c, d are all constant complex numbers, z represents a circle in complex plane, its phase represents the dynamic reflected path. Thus, the CSI Ratio can be regarded as the form of Mobius transformation [40].
The result of CSI Ratio is still a complex number with amplitude and phase, the amplitude is the ratio of the raw CSI amplitudes and the phase is the phase difference of the raw CSI phases. It has been proved in [40,41] that the CSI Ratio has the follow properties: • CSI Ratio has higher signal-to-noise-ratio(SNR) than raw CSI and CSI conjugate multiplication, and changes following a circular pattern in complex plan; • If the reflection path length change is exactly one wavelength, the CSI ratio will rotate exactly 2π in complex plane; • If the reflection path length increases, CSI ratio rotates clockwise, otherwise, it rotates counterclockwise.

Methodologies
Since WiMonitor is a long-term human vitality monitoring system, it contains two major components: long-term area detection and long-term activity intensity estimation (including motion detection). As for area detection, Wiborder [16] constructed a boundary sensing parameter and depicted the area-transition-diagram for multi-room area detection. The sensing boundary parameter is the Rayleigh fitting parameter of the conjugate multiplication between the CSI of two antennas within a short time window, it reflects the fluctuation of the amplitude of the conjugate multiplication between the CSI of two antennas. Due to the power amplifier uncertainty of AGC and environmental noises, the amplitude of the CSI measurements contains a relative large noise. The conjugate multiplication operation amplifies the amplitude noise, so the sensing boundary parameter of Wiborder is not robust enough for long-term monitoring. In this section, we first analyze the noise of AGC, and then introduce the proposed methodology for removing this noise. At last, we introduce the CSI metric for activity intensity estimation. Figure 1 illustrates the signal processing in the Wi-Fi receiver block diagram [42]. The signal from receiver antenna is down converted to base band signal y(t) through a mixer. Due to the path loss and multipath fading, the received signal strength is weaker than the transmitted signal strength. In order to maintain stable received signal strength for better wireless communication, AGC could amplify the signal strength dynamically according to Received Signal Strength Indicator (RSSI). The amplifier gain is large when the received signal strength is weak, so the amplifier gain can be considered as the function of RSSI δ(RSSI). Let y g (t) represents the received signal after AGC, y g (t) can be denoted as:

Remove the Noise Caused by AGC
Yg(f,t) According to the properties of discrete Fourier transfer (DFT), the frequency domain of received signal after AGC Yg(f,t) can be denoted as: where Y(f,t) is the frequency domain of received signal before AGC. According to Equation (2), the CSI after the AGC gain Hg(f,t) can be denoted as: As for wireless sensing, the CSI is modelled to describe the state of wireless channel, which is not include AGC, so δ(RSSI) is the noise which needs to be removed. However, the value of function δ(RSSI) is not accessible due to the hardware limitations of commodity WiFi card. Fortunately, through Intel 5300 CSI Tools [43], we can get RSSI and the gain coefficient of AGC agc in every received CSI packet. Since agc is related to δ(RSSI) and is controlled by RSSI, we can use the function γ(agc) instead of δ(RSSI) to remove the noise of AGC.
Let yg(n) and y(n) be the sampled versions of yg(t) and y(t), respectively. According to Parseval's Theorem, we can get Equations (12) and (13): ( ) ( ) where N is the number of samples. According to Equations (10), (12) and (13), we can get Equation (14): According to the properties of discrete Fourier transfer (DFT), the frequency domain of received signal after AGC Y g (f,t) can be denoted as: where Y(f,t) is the frequency domain of received signal before AGC. According to Equation (2), the CSI after the AGC gain H g (f,t) can be denoted as: As for wireless sensing, the CSI is modelled to describe the state of wireless channel, which is not include AGC, so δ(RSSI) is the noise which needs to be removed. However, the value of function δ(RSSI) is not accessible due to the hardware limitations of commodity WiFi card. Fortunately, through Intel 5300 CSI Tools [43], we can get RSSI and the gain coefficient of AGC agc in every received CSI packet. Since agc is related to δ(RSSI) and is controlled by RSSI, we can use the function γ(agc) instead of δ(RSSI) to remove the noise of AGC.
Let y g (n) and y(n) be the sampled versions of y g (t) and y(t), respectively. According to Parseval's Theorem, we can get Equations (12) and (13): Sensors 2021, 21, 751 8 of 28 where N is the number of samples. According to Equations (10), (12) and (13), we can get Equation (14): The denominator of Equation (14) represents the received signal strength before AGC. Through Intel 5300 CSI Tools, the denominator can be calculated as: The numerator of Equation (14) represents the signal power after AGC in the frequency domain, and can be calculated as [42]: where LTF is the Long Training Field, which is used to estimate the CSI [42]. According to Equations (14)- (16), the function γ(agc) 2 can be denoted as: In order to get the relationship of γ 2 (agc) and agc, we have collected a sufficiently large volume of CSI data. During data collection, we change the positions of transceivers as much as possible in order to get as many agc values as possible. Then, through Equation (17), we can obtain the value of γ 2 (agc) corresponding to each agc, and we can get the relationship of γ 2 (agc) and agc, which is shown in Figure 2. From Figure 2, we can see that the value of γ 2 (agc) increases with the increases of agc. That is to say, when the received signal power is small, agc will be increased in order to sustain a stable level of the received signal power. Moreover, the three antennas of an Intel 5300 WiFi Card use the same AGC gain circuit. The numerator of Equation (14) represents the signal power after AGC in the frequency domain, and can be calculated as [42]: where LTF is the Long Training Field, which is used to estimate the CSI [42]. According to Equations (14)- (16), the function γ(agc) 2 can be denoted as: In order to get the relationship of γ 2 (agc) and agc, we have collected a sufficiently large volume of CSI data. During data collection, we change the positions of transceivers as much as possible in order to get as many agc values as possible. Then, through Equation (17), we can obtain the value of γ 2 (agc) corresponding to each agc, and we can get the relationship of γ 2 (agc) and agc, which is shown in Figure 2. From Figure 2, we can see that the value of γ 2 (agc) increases with the increases of agc. That is to say, when the received signal power is small, agc will be increased in order to sustain a stable level of the received signal power. Moreover, the three antennas of an Intel 5300 WiFi Card use the same AGC gain circuit. Thus, we can use Equation (18) to remove the noise of AGC: Thus, we can use Equation (18) to remove the noise of AGC: Due to the noise of AGC, the CSI amplitude could fluctuate when there is no human motion or environment changes. So the thresholds for area detection of Wiborder will change even in the silence environment, thus Wiborder is not suitable for long-term area detection. In order to evaluate the effectiveness of our proposed method for remove the noise of AGC, we collect CSI data for a long time (about 1.5 h) in the silence environment. Figure 3 shows the impact of AGC and environmental noise on the amplitude.  Figure 3a shows the CSI amplitudes of two antennas, which contain the environmental noise and the noise of AGC. From Figure 3a, we can find besides some fluctuations which caused by environmental noise, the amplitude is divided into two segments at about 5000 second, as marked by red rectangle. Figure 3b,c shows the coefficients agc and γ(agc), respectively. There is also has a similar but smaller jump at around 3500 s in the Figure 3a, but the agc of the corresponding CSI amplitude remains relative stable except for some outliers. These outliers may be caused by environmental noise, how to remove the environment noise is out of scope of our paper. From Figure 3b,c, we can find that agc and γ(agc) are also divided into two segments at about 5000 s. Therefore, we can conclude that the jumping of amplitude at about 5000 s is caused by AGC. Figure 3d shows the amplitude of conjugate multiplication between the CSI of two antennas. From Figure 3d, we can find that the amplitude of conjugate multiplication between the CSI of two antennas also divided into two segmentations at about 5000 s due to AGC.
As the Rayleigh fitting parameter is obtained from the amplitude of conjugate mul-  Figure 3a shows the CSI amplitudes of two antennas, which contain the environmental noise and the noise of AGC. From Figure 3a, we can find besides some fluctuations which caused by environmental noise, the amplitude is divided into two segments at about 5000 s, as marked by red rectangle. Figure 3b,c shows the coefficients agc and γ(agc), respectively. There is also has a similar but smaller jump at around 3500 s in the Figure 3a, but the agc of the corresponding CSI amplitude remains relative stable except for some outliers. These outliers may be caused by environmental noise, how to remove the environment noise is out of scope of our paper. From Figure 3b,c, we can find that agc and γ(agc) are also divided into two segments at about 5000 s. Therefore, we can conclude that the jumping of amplitude at about 5000 s is caused by AGC. Figure 3d shows the amplitude of conjugate multiplication between the CSI of two antennas. From Figure 3d, we can find that the amplitude of conjugate multiplication between the CSI of two antennas also divided into two segmentations at about 5000 s due to AGC.
As the Rayleigh fitting parameter is obtained from the amplitude of conjugate multiplication between the CSI of two antennas, when the amplitude contains the noise of AGC, the parameter is not robust to perform long-term area detection.
The amplitude of CSI and the conjugate multiplication between the CSI of two antennas after removing the noise of AGC is shown in Figure 4. Figure 4a shows CSI amplitude of two antennas after removing the noise of AGC, and Figure 4b shows the amplitude of conjugate multiplication between the CSI of two antennas after removing the noise of AGC. From Figure 4, we can find that after removing the noise of AGC, there only exists environmental noise, and the amplitude of conjugate multiplication between the CSI of two antennas is more stable than before removing the noise of AGC. AGC. From Figure 4, we can find that after removing the noise of AGC, there only exists environmental noise, and the amplitude of conjugate multiplication between the CSI of two antennas is more stable than before removing the noise of AGC.
(a) (b) Figure 4. The amplitude of CSI and the conjugate multiplication between the CSI of two antennas after removing the noise of AGC. (a) The amplitude of CSI and conjugate multiplication between the CSI of two antennas after removing the noise of AGC in the silence environment; (b) the amplitude of conjugate multiplication between the CSI of two antennas after removing the noise of AGC.
Since we can get more stable CSI amplitude after remove the noise of AGC, we can obtain more robust Rayleigh fitting parameter compared with Wiborder. Figure 5 shows the Rayleigh fitting parameter before and after removing the noise of AGC in the silence environment. Figure 5a shows the Rayleigh fitting parameter before removing the noise of AGC, from Figure 5a, we can find that the parameter could not remain stable (such as silence 1 and silence 2) due to environmental noise and the noise of AGC. Figure 5b shows the parameter after removing the noise of AGC, the parameter is more stable (such as silence 1 and silence 2) than Figure 5a shows.  Since we can get more stable CSI amplitude after remove the noise of AGC, we can obtain more robust Rayleigh fitting parameter compared with Wiborder. Figure 5 shows the Rayleigh fitting parameter before and after removing the noise of AGC in the silence environment. Figure 5a shows the Rayleigh fitting parameter before removing the noise of AGC, from Figure 5a, we can find that the parameter could not remain stable (such as silence 1 and silence 2) due to environmental noise and the noise of AGC. Figure 5b shows the parameter after removing the noise of AGC, the parameter is more stable (such as silence 1 and silence 2) than Figure 5a shows.

The CSI Metric of Activity Intensity
In this subsection, we introduce the method for the CSI metric of activity intensity, which include how to extract Doppler frequency from the phase changes of CSI Ratio, and how to estimate activity intensity coefficient. At last, we combine Doppler frequency and activity intensity coefficient to construct the CSI metric for activity intensity estimation.

Extracting Doppler Frequency from the Phase Changes of CSI Ratio
In a typical environment with a pair of WiFi transmitter and receiver, as illustrated in Figure 6 [18]. Due to multipath effect, the signals travel through multiple paths to the receiver. The static paths are composed of the LoS path and the reflected paths from wall in the environment. Suppose there is only one dynamic path which induced by human movement, human movement can cause the path length to change, and introduce a Doppler frequency shift in the received signal [18]: where f is the carrier frequency of the signal, ν path is the speed of path length change, and c is the speed of light.
(a) (b) Figure 4. The amplitude of CSI and the conjugate multiplication between the CSI of two antennas after removing the noise of AGC. (a) The amplitude of CSI and conjugate multiplication between the CSI of two antennas after removing the noise of AGC in the silence environment; (b) the amplitude of conjugate multiplication between the CSI of two antennas after removing the noise of AGC.
Since we can get more stable CSI amplitude after remove the noise of AGC, we can obtain more robust Rayleigh fitting parameter compared with Wiborder. Figure 5 shows the Rayleigh fitting parameter before and after removing the noise of AGC in the silence environment. Figure 5a shows the Rayleigh fitting parameter before removing the noise of AGC, from Figure 5a, we can find that the parameter could not remain stable (such as silence 1 and silence 2) due to environmental noise and the noise of AGC. Figure 5b shows the parameter after removing the noise of AGC, the parameter is more stable (such as silence 1 and silence 2) than Figure 5a shows.

The CSI Metric of Activity Intensity
In this subsection, we introduce the method for the CSI metric of activity intensity, which include how to extract Doppler frequency from the phase changes of CSI Ratio, and how to estimate activity intensity coefficient. At last, we combine Doppler frequency and activity intensity coefficient to construct the CSI metric for activity intensity estimation.

Extracting Doppler Frequency from the Phase Changes of CSI Ratio
In a typical environment with a pair of WiFi transmitter and receiver, as illustrated in Figure 6 [18]. Due to multipath effect, the signals travel through multiple paths to the receiver. The static paths are composed of the LoS path and the reflected paths from wall in the environment. Suppose there is only one dynamic path which induced by human movement, human movement can cause the path length to change, and introduce a Doppler frequency shift in the received signal [18]: path where f is the carrier frequency of the signal, νpath is the speed of path length change, and c is the speed of light. Consider only one signal, its CSI at time t0 is ( , ) = = , where A0 is the attenuation, ϕ0 is the phase of dynamic path at t0, and τ0 is the propagation delay.
If the path length changes at a speed of νpath, after the short time period t, the path length change Δlpath = νpatht, and the propagation delay change is ∆ = . The attenuation change can be ignored duration a short time period, the CSI of the signal is: where ϕ1 is the phase of dynamic path at t1 The phase change Δϕ of dynamic path can be denoted as: Consider only one signal, its CSI at time where A 0 is the attenuation, φ 0 is the phase of dynamic path at t 0 , and τ 0 is the propagation delay. If the path length changes at a speed of ν path , after the short time period t, the path length change ∆l path = ν path t, and the propagation delay change is ∆τ = ν path t c . The attenuation change can be ignored duration a short time period, the CSI of the signal is: where φ 1 is the phase of dynamic path at t 1 The phase change ∆φ of dynamic path can be denoted as: The Doppler frequency shift in the received signal can be rewritten as: In the real environment, due to multipath-effect, the received signal is a superimposition signals from all paths. We can use Equation (22) to approximatively estimate Doppler frequency which introduced by human movements.
From Equation (22), we can see that if we can measure the phase change of dynamic path, we can estimate the Doppler frequency. However, due to the random phase offset of raw CSI, the phase change cannot be directly measured from raw CSI data. Since CSI ratio can remove both amplitude noises and phase noises of raw CSI, and has higher SNR than raw CSI, and the phase change of CSI Ratio represents the path length change of reflected path. we can use CSI Ratio to obtain the phase change of dynamic path. In the complex plane, we use → H t to denote the tangent vector corresponding to dynamic component We introduce a method of measuring the phase change of dynamic component through the tangent vector of dynamic component. Based on geometrical knowledge, we can conclude that the phase change of the tangent vector is equivalent to the phase change of the dynamic component, so we can measure the phase change of tangent vector to obtain the phase change of the dynamic component. We can subtract a sample point with its successor within a short time period t (such as 0.05 s) to calculate the tangent vector The calculated result is a sequence of complex vector, and we extract the phase sequence and unwrap it to eliminate 2π phase jumps. Once we obtain the phase change ∆φ, we can estimate Doppler frequency approximatively using Equation (22). We employ an example to illustrate the Doppler frequency which obtained by this method. We let a person walk towards the ligature of the pair of transceivers and then to walk away twice. In theory, when the person walks towards the ligature of the pair of transceivers, the movement of the person will introduce negative Doppler frequency due to the change in radial component of the motion with respect to the receiver, and vice versa. The extracted Doppler frequency is shown in Figure 7, Figure 7a shows the Doppler frequency spectrum using this method, and Figure 7b shows the extracted Doppler frequency from Figure 7a. The Doppler frequency shift in the received signal can be rewritten as: In the real environment, due to multipath-effect, the received signal is a superimposition signals from all paths. We can use Equation (22) to approximatively estimate Doppler frequency which introduced by human movements.
From Equation (22), we can see that if we can measure the phase change of dynamic path, we can estimate the Doppler frequency. However, due to the random phase offset of raw CSI, the phase change cannot be directly measured from raw CSI data. Since CSI ratio can remove both amplitude noises and phase noises of raw CSI, and has higher SNR than raw CSI, and the phase change of CSI Ratio represents the path length change of reflected path. we can use CSI Ratio to obtain the phase change of dynamic path. In the complex plane, we use to denote the tangent vector corresponding to dynamic component . We introduce a method of measuring the phase change of dynamic component through the tangent vector of dynamic component. Based on geometrical knowledge, we can conclude that the phase change of the tangent vector is equivalent to the phase change of the dynamic component, so we can measure the phase change of tangent vector to obtain the phase change of the dynamic component. We can subtract a sample point with its successor within a short time period t (such as 0.05 s) to calculate the tangent vector . The calculated result is a sequence of complex vector, and we extract the phase sequence and unwrap it to eliminate 2π phase jumps. Once we obtain the phase change Δϕ , we can estimate Doppler frequency approximatively using Equation (22). We employ an example to illustrate the Doppler frequency which obtained by this method. We let a person walk towards the ligature of the pair of transceivers and then to walk away twice. In theory, when the person walks towards the ligature of the pair of transceivers, the movement of the person will introduce negative Doppler frequency due to the change in radial component of the motion with respect to the receiver, and vice versa. The extracted Doppler frequency is shown in Figure 7, Figure 7a shows the Doppler frequency spectrum using this method, and Figure 7b shows the extracted Doppler frequency from Figure 7a.

Estimating the Activity Intensity Coefficient
The tangent vector corresponding to the dynamic component is a complex vector, and its amplitude represents the distances between consecutive samples. In order to find the physical meaning of the sample distances, we conducted an experiment, the experimental setup is shown as Figure 8. The WiFi transceivers are placed at a distance of 2m to each other at the same height, and the position of the user is aligned with perpendicular bisector of the transceivers with a distance of 1.3 m.

Estimating the Activity Intensity Coefficient
The tangent vector corresponding to the dynamic component is a complex vector, and its amplitude represents the distances between consecutive samples. In order to find the physical meaning of the sample distances, we conducted an experiment, the experimental setup is shown as Figure 8. The WiFi transceivers are placed at a distance of 2m to each other at the same height, and the position of the user is aligned with perpendicular bisector of the transceivers with a distance of 1.3 m. We let a person perform in-place activities at first, and then wave his arm while standing still. Figure 9 shows the distances between consecutive samples when the person doing these two actions. From Figure 9, we can find that the distances between consecutive samples are larger in case of person performing in-place activities than waving his arm. When performing in-place activities, the torso is the main reflection body part. As we all know, the torso of human body has a larger reflection area than other body parts such as arms and legs, so the signal energy reflected from torso is stronger than that reflected from arms and legs [44,45], so the amplitude of the tangent vector can represent the signal energies reflected from different body parts.
where α(t0) is the amplitude of tangent vector data sample at time t0.
Let α(t0 + Δtk) represent the k th element of vector ( ) . In order to find the statistical properties of α(t0 + Δtk), we have collected 2 s tangent vector data samples generated by a We let a person perform in-place activities at first, and then wave his arm while standing still. Figure 9 shows the distances between consecutive samples when the person doing these two actions. From Figure 9, we can find that the distances between consecutive samples are larger in case of person performing in-place activities than waving his arm. When performing in-place activities, the torso is the main reflection body part. As we all know, the torso of human body has a larger reflection area than other body parts such as arms and legs, so the signal energy reflected from torso is stronger than that reflected from arms and legs [44,45], so the amplitude of the tangent vector can represent the signal energies reflected from different body parts. We let a person perform in-place activities at first, and then wave his arm while standing still. Figure 9 shows the distances between consecutive samples when the person doing these two actions. From Figure 9, we can find that the distances between consecutive samples are larger in case of person performing in-place activities than waving his arm. When performing in-place activities, the torso is the main reflection body part. As we all know, the torso of human body has a larger reflection area than other body parts such as arms and legs, so the signal energy reflected from torso is stronger than that reflected from arms and legs [44,45], so the amplitude of the tangent vector can represent the signal energies reflected from different body parts.
where α(t0) is the amplitude of tangent vector data sample at time t0. Let α(t0 + Δtk) represent the k th element of vector ( ) . In order to find the statistical properties of α(t0 + Δtk), we have collected 2 s tangent vector data samples generated by a  Suppose the CSI Ratio has M complex data samples within a short time window (such as 2 s), and the tangent vector of dynamic component also has M complex data samples.
[0, ∆t 2 , · · · ∆t M ] is the sampling interval of each sample with respect to the first sample at t 0 , where ∆t 1 = 0. We can construct the sample distance vector from tangent vector: where α(t 0 ) is the amplitude of tangent vector data sample at time t 0 . Let α(t 0 + ∆t k ) represent the kth element of vector → A(t 0 ). In order to find the statistical properties of α(t 0 + ∆t k ), we have collected 2 s tangent vector data samples generated by a silent environment and a dynamic environment (where a human performs in-situ activities), respectively. Figure 10 shows the probability density function (PDF) of log(α(t 0 + ∆t k )) and α(t 0 + ∆t k ), respectively. From Figure 10, we see that the distribution of log α(t 0 + ∆t k ) approximately follows a normal distribution, so the distribution of α(t 0 + ∆t k ) approximately follows a log-normal distribution in both silence environment and dynamic environment. silent environment and a dynamic environment (where a human performs in-situ activities), respectively. Figure 10 shows the probability density function (PDF) of log(α(t0 + Δtk)) and α(t0 + Δtk), respectively. From Figure 10, we see that the distribution of log α(t0 + Δtk) approximately follows a normal distribution, so the distribution of α(t0 + Δtk) approximately follows a log-normal distribution in both silence environment and dynamic environment. The PDF of log-normal distribution is given by: where μ and σ are the mean and standard deviation, respectively, of the associated normal distribution.
The geometric mean of the log-normal distribution is given by [46]: We construct the activity intensity coefficient η using Equation (26): The PDF of log-normal distribution is given by: where µ and σ are the mean and standard deviation, respectively, of the associated normal distribution. The geometric mean of the log-normal distribution is given by [46]: We construct the activity intensity coefficient η using Equation (26): Based on Equation (26), we can obtain the following two properties of η: • In the silent environment, the value of η is very small; • η is larger when activities are produced by the torso than for activities produced by the arms and legs.

Constructing the CSI Metric for Activity Intensity Estimation
Since we have obtained the Doppler frequency and the coefficient of activity intensity, we can construct the CSI Metric for activity intensity estimation which combined with Doppler frequency and the coefficient of activity intensity. When human is still, due to the environmental noises, small Doppler frequency shifts have been observed as phase changes in CSI Ratio, and hence we can use an appropriate threshold f threshold to discriminate human motion and still states. Suppose we have obtained N samples of Doppler frequency sequence [ f 1 , f 2 , · · · , f i , · · · f N ] and N samples of coefficient of activity intensity sequence [η 1 , η 2 , · · · , η i , · · · η N ] in a short time window ∆t (0.4 s), the fraction of time when the user is in the motion state can be denoted as: where the numerator of Equation (27) can represent the time period when the user is non-still during a short time window. The CSI Metric for activity intensity estimation ξ can be constructed as: where the component 1 is the range of activity intensity coefficient, which can roughly quantize the fluctuation scope of activity intensity during a short time window. The component 2 is the fraction of time when the user is in the motion state during a short time window. In order to evaluate the effectiveness of the proposed metric, we conducted an experiment, and the experiment setup as shown in Figure 8. The volunteer first performing in-place activities, and then standing still, at last waving his arm, and repeat this procedure twice. During the experiment, a smartphone was attached to the volunteer's arm to collect the accelerometer data, as shown in Figure 11. The build-in accelerometer of the smartphone is a tri-axial accelerometer, the magnitude of the tri-axial accelerometer data can be denoted as: where a x , a y and a z are the three axes of the accelerometer. The mean of the magnitude of data can be denoted as: where N is the total number of data samples. As subtracting the mean of the magnitude data can remove any constant effects such as gravity [47], we subtracted the gravitational force by subtracting the mean of the magnitude data in the following way: magNoG is used as the ground-truth of intensity, magNoG and the CSI metric for these two actions is shown in Figure 12. The upper subfigure is the ground-truth, and the bottom subfigure is the intensity estimation based on our proposed method. From the upper subfigure of Figure 12, we can see that when the user is in standing still, ground-truth is almost zero, and the ground-truth is larger when the user performs in-place activities than waving arm. From the bottom subfigure of Figure 12, we can see that our Wi-Fi based activity intensity estimation matches well the ground-truth obtained by accelerometer sensor. As shown in this experiment, the proposed CSI metric is an effective way to estimate activity intensity. The mean of the magnitude of data can be denoted as: where N is the total number of data samples. As subtracting the mean of the magnitude data can remove any constant effects such as gravity [47], we subtracted the gravitational force by subtracting the mean of the magnitude data in the following way: magNoG is used as the ground-truth of intensity, magNoG and the CSI metric for these two actions is shown in Figure 12. The upper subfigure is the ground-truth, and the bottom subfigure is the intensity estimation based on our proposed method. From the upper subfigure of Figure 12, we can see that when the user is in standing still, ground-truth is almost zero, and the ground-truth is larger when the user performs in-place activities than waving arm. From the bottom subfigure of Figure 12, we can see that our Wi-Fi based activity intensity estimation matches well the ground-truth obtained by accelerometer sensor. As shown in this experiment, the proposed CSI metric is an effective way to estimate activity intensity.

Experimental Results Analysis
In this section, we analyse the 22 days of continuous 24-h human vitality monitoring data of four volunteers which recorded by a WiMonitor system. Section 5.1 presents the experimental setup. Section 5.2 presents the evaluation for basic information of human vitality. Section 5.3 presents the statistical analysis results of 22 days continuous 24-h human vitality monitoring.

Environmental Setup
We employ miniPCs equipped with off-the-shelf Intel 5300 Wi-Fi cards as the trans-

Experimental Results Analysis
In this section, we analyse the 22 days of continuous 24-h human vitality monitoring data of four volunteers which recorded by a WiMonitor system. Section 5.1 presents the experimental setup. Section 5.2 presents the evaluation for basic information of human vitality. Section 5.3 presents the statistical analysis results of 22 days continuous 24-h human vitality monitoring.

Environmental Setup
We employ miniPCs equipped with off-the-shelf Intel 5300 Wi-Fi cards as the transmitter and receivers. Each receiver is equipped with two antennas. The CSI tool developed by Halperin [43] is installed on each miniPC to collect the CSI samples of each received packet. The sampling rate of CSI is 200 Hz. Both the transmitter and receiver work on the 5 GHz band with a 20 MHz channel bandwidth. To evaluate the performance of WiMonitor system, we conduct experiments in a real multi-room smart home environment, which contains four subspaces: a living room, a bedroom, a kitchen and a toilet. The layout of the environment is shown in Figure 13, and the four subareas are shown as Figure 14. We employ one transmitter and five receivers to construct multiple transceivers with at least one receiver per area and placed around the corner. Four web cameras are deployed inside each area to record the ground-truth. We have implemented WiMonitor as a real-time system, and ask four volunteers to conduct the experiments. The basic information of these volunteers is shown in Table 1. We keep WiMonitor system running continuously, and ask the four volunteers to live alternatively in the smart home alone for 24 h, and perform the daily activities freely in their own styles (such as sleeping, eating, watching TV, etc.). We conducted a continuous 22-day experiment, which including 14 days of volunteer 1, 4 days of volunteer 2, 2 days of volunteer 3 and 2 days of volunteer 4.  We have implemented WiMonitor as a real-time system, and ask four volunteers to conduct the experiments. The basic information of these volunteers is shown in Table 1. We keep WiMonitor system running continuously, and ask the four volunteers to live alternatively in the smart home alone for 24 h, and perform the daily activities freely in their own styles (such as sleeping, eating, watching TV, etc.). We conducted a continuous

Basic Information of Human Vitality
The basic information of vitality contains the area detection results, the motion status and activity intensity. In our experiments, at least one Wi-Fi receiver is employed in each subspace. We can choose the receiver in which the target is located in to obtain the activity intensity. For example, as illustrated in Figure 13, if the target is located in the bedroom, the system chooses RX 4 to obtain the activity intensity. If the target is located in the living-room, the system averages the activity intensities which obtained from RX 1 and RX 2.
As for area detection, we proposed a method to reduce the noise of AGC, thus can provide stable sensing boundary parameter. Based on the area detection method of Wiborder, we can achieve long-term area detection.
In order to evaluate the performance of area detection of WiMonitor, we use two commonly used metrics precision and recall to show the performance. These two metrics are calculated by true positive (TP), false positive (FP), true negative (TN), and false negative (FN). For a certain area i, precision and recall are calculated as below: We calculated the precision and recall for each area separately, and then take the average over all areas. Table 2 shows the precision and recall of area detection of WiMonitor over 22 days. From Table 2, we can conclude that WiMonitor can achieve high precision and recall for area detection, these results demonstrate that WiMonitor is accurate and robust for long-term monitoring. As for motion detection, WiVit [28] utilized the Doppler-Music method to extract Doppler frequency shift from conjugate multiplication between the CSI of two antennas, and used the power of Doppler frequency shift to detect human motion. It may be difficult to detect the small-scale motion actions, thus could not effectively detection such smallscale motion, as shown in Figure 15a,b. Fortunately, the proposed CSI metric for activity intensity estimation in this paper can solve this problem, and can estimate the activity intensity at the same time, as shown in Figure 15c,d.  Figure 15 shows the comparison of Doppler-Music method and our proposed method for detecting turn over on the bed. Figure 15a shows the speed-time spectrum obtained from Doppler-Music method, Figure 15c shows the frequency-time spectrum obtained from our proposed method. From Figure 15a,c, we can see that through our pro-  Figure 15 shows the comparison of Doppler-Music method and our proposed method for detecting turn over on the bed. Figure 15a shows the speed-time spectrum obtained from Doppler-Music method, Figure 15c shows the frequency-time spectrum obtained from our proposed method. From Figure 15a,c, we can see that through our proposed method, we can obtain a clearer spectrum than through Doppler-Music method. Figure 15b shows the motion detection results obtained from Doppler-Music method, and as we can see, the action turning over on the bed could not be detected. Figure 15d shows the intensity of turning over, which obtained from our proposed method.
A continuous 24 h of basic information of human vitality (area detection, motion detection and instantaneous activity intensity) is shown in Figure 16. The upper subfigure, middle subfigure and bottom subfigure of Figure 16 are the 24 h of area detection results, instantaneous motion state, and instantaneous activity intensity, respectively. Compared with Figure 16 and the corresponding ground-truth video, we can see that WiMonitor can achieve long-term vitality monitoring accurately (the markers in Figure 16 match the corresponding ground-truth). Figure 16 only shows the instantaneous vitality, in order to mine more information on human vitality, such as the characteristics of daily activities, we need to analyze vitality information from a perspective of a time period. For example, we can average the instantaneous intensity within a short time period (10 s) every 0.05 s, and category the averaged intensity into different intensity levels (such as silence, slight, moderate, and intense) according to the averaged intensity values. Take three types of daily activities (walk, brush teeth, eating) as example. the averaged activity intensity and the corresponding activity level of the three types of daily activities are shown in Figure 17. Figure 17a shows the averaged activity intensity of the three types of daily activities, and Figure 17b shows the corresponding activity level. From Figure 17, we can find that among the three activities, the activity level of walking is higher than the other two activities. As the WiMonitor system can continuously monitor and record human vitality information in real time, we can analyze the overall activity level of the elderly during one day or even longer to mine the daily living habits and find abnormity.

Statistical Analysis of 22 Days Human Vitality Information
Since WiMonitor system recorded 22 days of continuous 24 h of human vitality information data from four volunteers, in this subsection, we can analyze these data over 24-h from different perspective to capture the living habit patterns of different volunteers.
It is well known that in the smart home environment, physical activities are arearelated, such as sleeping usually takes place in the bedroom, and cooking usually takes place in the kitchen. Analyzing the area occupation rate during 24 h of the elder, could help us to find out the living habits of the elder. Figure 18 shows the area occupation rate of volunteer 1 during 24 h. From Figure 18, we can find that the volunteer 1 spends most of the time in bedroom in one day, and spends the least time in kitchen since the volunteer 1 only enters kitchen to wash dishes after lunch and supper. As the WiMonitor system can continuously monitor and record human vitality information in real time, we can analyze the overall activity level of the elderly during one day or even longer to mine the daily living habits and find abnormity.

Statistical Analysis of 22 Days Human Vitality Information
Since WiMonitor system recorded 22 days of continuous 24 h of human vitality information data from four volunteers, in this subsection, we can analyze these data over 24-h from different perspective to capture the living habit patterns of different volunteers.
It is well known that in the smart home environment, physical activities are arearelated, such as sleeping usually takes place in the bedroom, and cooking usually takes place in the kitchen. Analyzing the area occupation rate during 24 h of the elder, could help us to find out the living habits of the elder. Figure 18 shows the area occupation rate of volunteer 1 during 24 h. From Figure 18, we can find that the volunteer 1 spends most of the time in bedroom in one day, and spends the least time in kitchen since the volunteer 1 only enters kitchen to wash dishes after lunch and supper.
Considering different volunteers may have different living habits in the perspective of long-term area staying information, in order to find whether WiMonitor could capture the living habits of one user and the diversity of habits of different users, we can analyze the accumulated hours of area staying of all the volunteers over 22 days, as shown in Figure 19. The first 14 days are the results of volunteer 1, the fifteenth to eighteenth days are the results of volunteer 2, the nineteenth to twentieth are the results of volunteer 3 and the last two days are the results of volunteer 4. From Figure 19, we can observe the regularities in living habits of one volunteer, and the diversities of different living habits between different volunteers and the same volunteer of different days. For example, the accumulated hours of different areas from volunteer 1 are very similar during 14 days. The accumulated hours of different areas from volunteer 1 are different from volunteer 3. For volunteer 2, the accumulated hours of different areas between different days are also different. related, such as sleeping usually takes place in the bedroom, and cooking usually takes place in the kitchen. Analyzing the area occupation rate during 24 h of the elder, could help us to find out the living habits of the elder. Figure 18 shows the area occupation rate of volunteer 1 during 24 h. From Figure 18, we can find that the volunteer 1 spends most of the time in bedroom in one day, and spends the least time in kitchen since the volunteer 1 only enters kitchen to wash dishes after lunch and supper. Considering different volunteers may have different living habits in the perspective of long-term area staying information, in order to find whether WiMonitor could capture the living habits of one user and the diversity of habits of different users, we can analyze the accumulated hours of area staying of all the volunteers over 22 days, as shown in Figure 19. The first 14 days are the results of volunteer 1, the fifteenth to eighteenth days are the results of volunteer 2, the nineteenth to twentieth are the results of volunteer 3 and the last two days are the results of volunteer 4. From Figure 19, we can observe the regularities in living habits of one volunteer, and the diversities of different living habits between different volunteers and the same volunteer of different days. For example, the accumulated hours of different areas from volunteer 1 are very similar during 14 days. The accumulated hours of different areas from volunteer 1 are different from volunteer 3. For volunteer 2, the accumulated hours of different areas between different days are also different. Since activity intensity is more fine-grained sensing than motion, in this subsection, we only analyze activity intensity instead. As described in Section 5.2, we average the instantaneous intensity within a short time period (10 s), and categorized activity intensity into four levels (silence, slight, moderate, and intense) according to accumulated instantaneous intensity. Similar to long-term area staying information, we can also analyze the living habits of the volunteers in the perspective of long-term activity level information. Figure 20 shows the overall intensity level rate during 24 h of volunteer 1. From Figure  20, we can find that among the four activity levels during 24 h of volunteer 1, the rates of silence (82.23%) and slight (11.45%) level are much higher than moderate (2.13%) and intense (4.19%). Through the corresponding ground truth video, we can see that besides sleeping, the volunteer 1 spent most of the time on sedentary behaviors, such as working at a computer in the bedroom, reading book in the bedroom, and watching TV in the living room, etc. while spending less time on walking, cleaning, and exercising, etc. Considering physical activities are area-related, different types of activities usually take place in different areas, so the activity levels of different areas are also different. Figure 21 shows the activity level rate of different areas during 24 h of volunteer 1. From Figure 21, we can find that the rates of silence and slight level are higher than 90% in bedroom, due to sleeping and working at a computer are performed in the bedroom. The rate of intense level in Since activity intensity is more fine-grained sensing than motion, in this subsection, we only analyze activity intensity instead. As described in Section 5.2, we average the instantaneous intensity within a short time period (10 s), and categorized activity intensity into four levels (silence, slight, moderate, and intense) according to accumulated instantaneous intensity. Similar to long-term area staying information, we can also analyze the living habits of the volunteers in the perspective of long-term activity level information. Figure 20 shows the overall intensity level rate during 24 h of volunteer 1. From Figure 20, we can find that among the four activity levels during 24 h of volunteer 1, the rates of silence (82.23%) and slight (11.45%) level are much higher than moderate (2.13%) and intense (4.19%). Through the corresponding ground truth video, we can see that besides sleeping, the volunteer 1 spent most of the time on sedentary behaviors, such as working at a computer in the bedroom, reading book in the bedroom, and watching TV in the living room, etc. while spending less time on walking, cleaning, and exercising, etc. Considering physical activities are area-related, different types of activities usually take place in different areas, so the activity levels of different areas are also different. Figure 21 shows the activity level rate of different areas during 24 h of volunteer 1. From Figure 21, we can find that the rates of silence and slight level are higher than 90% in bedroom, due to sleeping and working at a computer are performed in the bedroom. The rate of intense level in the kitchen is the highest among the four areas, due to cleaning and wash dishes are performed in the kitchen. the kitchen is the highest among the four areas, due to cleaning and wash dishes are performed in the kitchen.  In order to obtain the living habits of one user and the diversity habits of different users in the perspective of long-term activity level information, we can also analyze the activity level rate of all the 22 days of four volunteers in a specific area and in all the four areas overall. Figure 22 shows the intensity level rate of all the volunteers in the living room. Similar to Figure 19, the first 14 days are the results of volunteer 1, the fifteenth to eighteenth days are the results of volunteer 2, the nineteenth to twentieth are the results of volunteer 3 and the last two days are the results of volunteer 4. From Figure 22, we can also spot regularities in living habits of one volunteer, and the diversity of different living habits between different volunteers and the same volunteer of different days.   In order to obtain the living habits of one user and the diversity habits of different users in the perspective of long-term activity level information, we can also analyze the activity level rate of all the 22 days of four volunteers in a specific area and in all the four areas overall. Figure 22 shows the intensity level rate of all the volunteers in the living room. Similar to Figure 19, the first 14 days are the results of volunteer 1, the fifteenth to eighteenth days are the results of volunteer 2, the nineteenth to twentieth are the results of volunteer 3 and the last two days are the results of volunteer 4. From Figure 22, we can also spot regularities in living habits of one volunteer, and the diversity of different living habits between different volunteers and the same volunteer of different days. In order to obtain the living habits of one user and the diversity habits of different users in the perspective of long-term activity level information, we can also analyze the activity level rate of all the 22 days of four volunteers in a specific area and in all the four areas overall. Figure 22 shows the intensity level rate of all the volunteers in the living room. Similar to Figure 19, the first 14 days are the results of volunteer 1, the fifteenth to eighteenth days are the results of volunteer 2, the nineteenth to twentieth are the results of volunteer 3 and the last two days are the results of volunteer 4. From Figure 22, we can also spot regularities in living habits of one volunteer, and the diversity of different living habits between different volunteers and the same volunteer of different days. Figure 23 shows the intensity level rate of all the 22 days of four volunteers in all areas overall. The first 14 days are the results of volunteer 1, the fifteenth to eighteenth days are the results of volunteer 2, the nineteenth to twentieth are the results of volunteer 3 and the last two days are the results of volunteer 4. From Figure 23, we find that all the four volunteers spend most of their time in the silence and slight activity level, which could be considered as a sedentary lifestyle.   Through analysis statistical properties of human vitality information, we not only can capture the living habits of users, but also detect abnormality. Take sleep as an example, since sleep plays an important role in our health and well-being. Low quality of sleep will increase the risk of sleep disorders. In this paper, we can use instantaneous activity intensity to analysis body movements during sleep. We consider motion states as those instantaneous activity intensity values which are larger than zero. Figure 24 shows the instantaneous activity intensity and the corresponding motion status during sleep of volunteer 1. From Figure 24, we can find that the body movement during sleep can be roughly divided into three stages: stage 1, stage 2 and stage 3. The body movement is intensity level rate intensity level rate    Through analysis statistical properties of human vitality information, we not only can capture the living habits of users, but also detect abnormality. Take sleep as an example, since sleep plays an important role in our health and well-being. Low quality of sleep will increase the risk of sleep disorders. In this paper, we can use instantaneous activity intensity to analysis body movements during sleep. We consider motion states as those instantaneous activity intensity values which are larger than zero. Figure 24 shows the instantaneous activity intensity and the corresponding motion status during sleep of volunteer 1. From Figure 24, we can find that the body movement during sleep can be roughly divided into three stages: stage 1, stage 2 and stage 3. The body movement is intensity level rate intensity level rate Through analysis statistical properties of human vitality information, we not only can capture the living habits of users, but also detect abnormality. Take sleep as an example, since sleep plays an important role in our health and well-being. Low quality of sleep will increase the risk of sleep disorders. In this paper, we can use instantaneous activity intensity to analysis body movements during sleep. We consider motion states as those instantaneous activity intensity values which are larger than zero. Figure 24 shows the instantaneous activity intensity and the corresponding motion status during sleep of volunteer 1. From Figure 24, we can find that the body movement during sleep can be roughly divided into three stages: stage 1, stage 2 and stage 3. The body movement is frequent in stage 1, as the volunteer 1 is going to sleep. The body movement is less frequent in stage 2 and is the most frequent in stage 3.
For an individual subject, it is true that the body movement during sleep over one night cannot tell if the subject sleeps well or not, however, the body movement pattern over weeks or months could be a good indicator for one's sleep quality (especially for very abnormal patterns). In this paper, we used the accumulated body movement time during sleep to represent the body movement frequency. Figure 25 shows the accumulated motion time during sleep of all the volunteers, the first 14 days are the accumulated motion time of volunteer 1. Only consider volunteer 1, we can find that during the 14 days, the accumulated motion time in the ninth and tenth day are much longer than the other twelve days. Through compared with the corresponding ground-truth video, we can find that the volunteer 1 suffered from insomnia for some reason in those two nights. frequent in stage 1, as the volunteer 1 is going to sleep. The body movement is less frequent in stage 2 and is the most frequent in stage 3. For an individual subject, it is true that the body movement during sleep over one night cannot tell if the subject sleeps well or not, however, the body movement pattern over weeks or months could be a good indicator for one's sleep quality (especially for very abnormal patterns). In this paper, we used the accumulated body movement time during sleep to represent the body movement frequency. Figure 25 shows the accumulated motion time during sleep of all the volunteers, the first 14 days are the accumulated motion time of volunteer 1. Only consider volunteer 1, we can find that during the 14 days, the accumulated motion time in the ninth and tenth day are much longer than the other twelve days. Through compared with the corresponding ground-truth video, we can find that the volunteer 1 suffered from insomnia for some reason in those two nights.   For an individual subject, it is true that the body movement during sleep over one night cannot tell if the subject sleeps well or not, however, the body movement pattern over weeks or months could be a good indicator for one's sleep quality (especially for very abnormal patterns). In this paper, we used the accumulated body movement time during sleep to represent the body movement frequency. Figure 25 shows the accumulated motion time during sleep of all the volunteers, the first 14 days are the accumulated motion time of volunteer 1. Only consider volunteer 1, we can find that during the 14 days, the accumulated motion time in the ninth and tenth day are much longer than the other twelve days. Through compared with the corresponding ground-truth video, we can find that the volunteer 1 suffered from insomnia for some reason in those two nights.

Discussion
In recent years, many device-free indoor localization systems have been proposed, and the existing device-free indoor localization systems can be categorized as fingerprint-based and geometric mapping-based. Many methodologies have been proposed to improve the performance, such as deep learning and transfer learning [48,49], etc. Wang et al. [48] presented a deep learning based indoor fingerprinting system DeepFi, the DeepFi architecture has four hidden layers, and a probabilistic data fusion method is developed for online localization. The mean localization error of DeepFi is about 0.9 m. Rao et al. [49] proposed DFPWL system which used transfer deep learning method to cope with time-varying characteristic of CSI which caused by environment changes, the mean localization error about 1.1 m is achieved in [49]. Unlike fingerprint-based method, geometric mapping-based method does not need to build fingerprint database. MaTrack [16] employ the angle-ofarrival (AoA) information to locate the user. The median localization accuracy of MaTrack is about 0.6 m. SiFi [19] uses a single AP to locate the target. The median localization accuracy is about 0.93 m.
Though the above two types of localization approaches are very useful in many applications, such as indoor navigation, augmented reality, disaster rescue, etc. However, in a typical home environment, the rooms are usually divided by walls, detecting which room a person is staying is essential for daily life monitoring. This requires the system to detect the precise sensing boundary between different rooms. However, the above two types of localization approaches couldn't fulfill this requirement, because 20 cm localization error could make wrong judgement of room-level localization when a person is close to the room door. Different from the above works, our proposed approach uses a novel CSI metric for through-wall discrimination to determine the precise sensing boundary between different rooms, thus can achieve accurate room-level detection (the precision and recall of our approach are both higher than 96%).
According to [50], on average, there are already more than eight Wi-Fi-enabled devices in a typical U.S. home environment. In China, with the rapid development of the Internet of Things, Wi-Fi devices are ubiquitous in home environments, ranging from Wi-Fi routers and mobile phones to Wi-Fi-enabled home appliances (e.g., TVs, refrigerators). We strongly believe in the near future these Wi-Fi enabled devices could be utilized for contactless sensing without additional cost, enabling various sensing applications in a home setting, such as fall detection, respiratory monitoring, continuously daily activity monitoring (if Wi-Fi is outdated, there will be Wi-Fi like wireless signals such as 5G/6G).

Conclusions
In this paper, we propose a continuous long-term human vitality sensing system called WiMonitor using commodity Wi-Fi devices. For an elder who lives alone, the WiMonitor system could capture vitality information continuously in real-time without any human effort on offline-training. WiMonitor could achieve continuous long-term accurate area detection by removing the noise of AGC. Moreover, we construct a CSI metric for estimate the instantaneous activity intensity real time. We recruit 4 volunteers to conduct a continuous 22-days experiment, and record the long-term vitality data. Through analysis, we can conclude that the recorded long-term vitality information can be used to obtain the routine habits of the user and detect any abnormality. As the next step, we are going to use our system to track vitality information over a longer term, with the hope that we could observe the long-term routine change trends using the data from several months. We envision our WiMonitor system could be a useful system to provide abundant datasets of the daily living of the elderly to help not just researchers but also healthcare personnel.

Conflicts of Interest:
The authors declare no conflict of interest.