Next Article in Journal
Confirmation of Final Bolt Tightening via Deep Learning-Based Image Processing
Previous Article in Journal
A Model-Based Intelligent Adjustment Method of Toolface for Bent-Housing Motor
Previous Article in Special Issue
Analysis of Information Transmission Characteristics Based on Adaptive Ground Electrode Current Field
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Wi-Senser: Contactless Head Movement Detection during Sleep Utilizing WiFi Signals

School of Management Science and Engineering, Anhui University of Finance & Economics, Bengbu 233030, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(13), 7572; https://doi.org/10.3390/app13137572
Submission received: 26 May 2023 / Revised: 19 June 2023 / Accepted: 25 June 2023 / Published: 27 June 2023
(This article belongs to the Special Issue Computer Science in Wireless Communication)

Abstract

:
Detecting human head movement during sleep is important as it can help doctors to assess many physical or mental health problems, such as infantile eczema, calcium deficiency, insomnia, anxiety disorder, and even Parkinson’s disease, and provide useful clues for accurate diagnosis. To obtain the information of head movement during sleep, current solutions either use a camera or require the user to wear intrusive sensors to collect the image or motion data. However, the vision-based schemes rely on light conditions and raise privacy concerns. Many people, including the elderly and infants, may be reluctant to wear wearable devices during sleep. In this paper, we propose Wi-Senser, a nonintrusive and contactless smart monitoring system for detecting head movement during sleep. Wi-Senser directly reuses the existing WiFi infrastructure and exploits the fine-grained channel state information (CSI) of WiFi signals to capture the minute human head movement during sleep without attaching any sensors to the human body. Specifically, we constructed a filtering channel including a Hampel filter, wavelet filter, and mean filter to remove outliers and noises. We propose a new metric of carrier sensitivity to select an optimal subcarrier for recording the change in targeted body movement from 30 candidate subcarriers. Finally, we designed a peak-finding algorithm to capture the real peak set recording the change in human head movement. We designed and implemented Wi-Senser with just one commercial off-the-shelf (COTS) router and one laptop equipped with an Intel 5300 network interface card (NIC). We evaluated the performance of Wi-Senser with 10 volunteers (6 adults and 4 children). Extensive experiments demonstrate that Wi-Senser can achieve 97.95% accuracy for monitoring head movement during sleep. Wi-Senser provides a new solution for achieving noninvasive, continuous, and accurate detection of minute human movement without any additional cost.

1. Introduction

In recent years, with the rapid development of technologies such as the Internet of Things, smart wearables, and mobile computing, the exploration of human-oriented smart health situational awareness applications has attracted extensive attention from industry and academia. Among these applications, human motion perception (such as gait perception, gesture perception, and breathing perception) has attracted special attention from researchers because it is closely related to people’s daily life and physical health. Traditional human motion-sensing methods mainly sense human motion changes by attaching contact sensors or wearable devices with motion sensors to the surface of the human skin to collect motion data [1,2,3]. This type of method requires the user to always wear or carry the sensing device, which is not applicable to some special groups (such as infants, the elderly, and the disabled), because infants or the elderly wearing the sensing device for a long time is likely to cause physical discomfort, and some disabled people with limb disabilities cannot wear the sensory device. Due to the invasive nature of traditional contact sensing methods, researchers have studied and utilized computer vision technology to achieve contactless human motion perception. In the early days of computer vision-based human motion perception research, image-based detection methods were mainly used [4]; that is, a video stream of human activity is first recorded using a camera, then the video is segmented into frames, and the relevant image processing algorithm is finally used to detect the target human movement. In recent years, video-based human motion perception technology has become increasingly mature and widely used [5,6]. However, the perception method based on computer vision relies on lighting conditions and cannot work in non-line-of-sight environments, and there is also a risk of leaking personal privacy information such as face, height, weight.
In order to overcome the limitations of the above perception methods, such as intrusiveness, light dependence, and privacy leakage, researchers have focused on using wireless signals to implement contactless human motion perception. As early as 2010, researchers proposed to use ultrasonic signals emitted by acoustic sensors to sense the user’s gait, behavioral actions, and breathing rate [7,8,9]. However, this method requires specialized acoustic equipment, which is expensive and difficult to deploy. Therefore, the researchers explored the direct use of acoustic sensing devices (speakers and microphones) built into smartphones to sense human movement [10]. This method can overcome the limitations of light dependence and it has a low hardware cost and is easily deployed, but acoustic signal-based sensing methods are susceptible to environmental noise and still have privacy leakage risks. With the innovation of wireless communication and intelligent computing technology, the research on human motion perception based on wireless radio frequency signals has become a research hotspot in the past five years. As early as 2015, researchers proposed to use frequency-modulated continuous wave radar and millimeter-wave radar technology to perceive human chest movement and gesture posture, and even recognize human emotional changes [11]. Although this method can not only achieve fine-grained human motion perception and protect users’ personal privacy, it also requires special radar equipment, which is expensive and difficult to control. Then researchers proposed to use RFID readers/tags to sense human respiratory movement, sleep activity, and fitness exercise [12,13]. Although the use of commercial RFID equipment can effectively reduce the cost of equipment, it is currently only deployed in specific applications (such as toll stations, parking lots, access control systems), and the popularity of the equipment is not enough to achieve ubiquitous real-time human motion perception.
Recently, in order to achieve ubiquitous real-time human motion perception, the use of WiFi signals has emerged. Specifically, researchers directly utilize the link-layer or physical-layer attributes of ubiquitous WiFi signals, such as the Received Signal Strength Indicator (RSSI) and the physical layer Channel State Information (CSI), to obtain perceptual information related to human movement. The link-layer or physical layer properties of WiFi signals can be extracted from commercial wireless cards such as the Intel 5300 network card and the Atheors 9580 network card [14,15]. Since the link-layer RSS measurement is susceptible to the time-varying and multipath fading of the wireless channel, the existing work mostly uses the physical layer CSI to implement contactless human motion perception. That is, for a WiFi signal with a bandwidth of 20 MHz, the receiver can use the Intel 5300 network card to extract the Channel Frequency Response (CFR) estimate of 30 OFDM subcarriers. Each CSI measurement contains the amplitude and phase information of any OFDM subcarrier, so CSI can provide wireless channel time–frequency domain change information to achieve fine-grained human motion perception. At present, the perception applications based on WiFi CSI mainly focus on human activity recognition, indoor positioning, and respiratory monitoring [16,17,18,19,20,21,22]. Medical studies have shown that frequent shaking of the head during sleep of children is often closely related to physiological diseases such as rickets and eczema, while frequent shaking of the head during sleep of adults is often closely related to mental diseases such as insomnia, anxiety, and even depression. Therefore, monitoring people’s head movement during sleep is an important research topic in the situational perception of smart health.
Therefore, this paper proposes Wi-Senser, a human head motion-detection method based on WiFi signals. Wi-Senser directly utilizes the CSI amplitude information of ubiquitous WiFi signals to achieve contactless human head motion detection without revealing the private details of the user. Specifically, Wi-Senser firstly uses an Intel 5300 network card to extract WiFi CSI data that record changes in human head movement. Then Wi-Senser uses a filter channel consisting of a Hampel filter, a wavelet filter, and an averaging filter to filter out outliers and strong noises in the original CSI signal and retain the rising/falling edges of the movement changes. Subsequently, Wi-Senser uses a sensitivity metric combining standard deviation and kurtosis, and based on this sensitivity metric, an optimal subcarrier is selected from 30 CSI subcarriers, which has the highest sensitivity to changes in head motion and is insensitive to irrelevant environmental changes. Finally, Wi-Senser uses the peak-finding algorithm to capture the true set of peaks caused by head motion from the optimal subcarrier, so as to achieve accurate detection of human head motion.
Overall, Wi-Senser has three main advantages: firstly, it utilizes WiFi signals to detect head movement during sleep, which can protect the privacy of the user and is noninvasive to the human body; secondly, it directly utilizes existing WiFi routers as transmitters, which are cost-effective and easy to deploy; thirdly, WiFi signals have strong penetrability, enabling the detection of human movement in non-line-of-sight scenarios.
The main contributions of this paper are summarized as follows.
  • To the best of our knowledge, Wi-Senser is the first system enabling the detection of contactless human head movement during sleep by reusing the existing WiFi network.
  • We propose a new metric to select an optimal subcarrier from candidate subcarriers and designed an algorithm that has the capability to accurately track human head movements from the extracted fine-grained CSI signals.
  • We implement Wi-Senser with COTS WiFi devices and evaluate the performance with extensive real-world experiments involving 10 volunteers (including 6 adults and 4 children). The results demonstrate that with WiFi signals alone, Wi-Senser is able to achieve higher than 97.95% accuracy in detecting human head movement during sleep.

2. Preliminaries

This section presents a theoretical model for utilizing WiFi signals to perceive changes in human body movement [23]. Specifically, at time t, if the WiFi signal reaches the receiver through N paths, the complex value of channel frequency response CFR of the i t h subcarrier in the WiFi channel can be represented as:
H f i , t = e - j 2 π f t H s f i + k P d a k ( f i , t ) e - j 2 π d k ( t ) λ i
where f is the carrier frequency, ∆f is the carrier frequency offset between the transmitter and receiver, λ is the wavelength, and P d is the dynamic path set. H s f i is the cumulative CFR of static paths, which has relatively stable energy attenuation and propagation delay due to near-constant propagation length. Therefore, H s f i is usually regarded as a constant. a k f i , t represents the energy attenuation of the k t h dynamic path, and - 2 π d k ( t ) λ i represents the phase shift caused by the transmission delay along the k t h dynamic path (with a length of d k ( t ) ). - 2 π f t represents the phase shift caused by the carrier frequency offset ∆f.
According to Equation (1), the CSI energy ( H ( f i , t ) 2 ) can be derived as:
H f i , t 2 = e - j 2 π f t 2 e - j 2 π f t H s f i + k P d a k f i , t e - j 2 π d k t λ i 2
Since e - j 2 π f t represents a unit vector rotating an angle of - 2 π f t in the complex plane, its influence on CSI energy ( H ( f i , t ) 2 ) can be ignored. That is, under the condition of ignoring the effect of carrier frequency offset, Equation (1) can be rewritten as:
H f i , t = H s f i e j ϕ s + k P d a k f i , t e j ϕ k - 2 π d k t λ i
where ϕ s is the rotation angle of the synthesized vector of static paths, and ϕ k is the initial phase of the k t h dynamic path. Based on Euler’s formula ( cos θ + j sin θ = e j θ ), Equation (3) can be further expanded as:
H f i , t = H s f i cos ϕ s + k P d a k f i , t cos ( ϕ k - 2 π d k t λ i )                + j H s f i sin ϕ s + k P d a k f i , t sin ( ϕ k - 2 π d k t λ i )
Therefore, the sum of the squares of the real and imaginary parts in Equation (4) is the CSI energy:
H ( f i , t ) 2 = H s f i cos ϕ s + k P d a k f i , t cos ( ϕ k - 2 π d k t λ i ) 2 + H s f i sin ϕ s + k P d a k f i , t sin ϕ k - 2 π d k t λ i 2
Equation (5) can be expanded, organized, and simplified based on trigonometric properties as:
H f i , t 2 = H s f i 2 + k P d a k f i , t 2 + k P d 2 H s f i a k f i , t cos 2 π d k t λ i + ϕ s - ϕ k + k , l P d k l 2 a k f i , t a l f i , t cos 2 π d l t - d k t λ i + ϕ k - ϕ l
According to the literature [23], by assuming that the k t h dynamic path has a relatively stable velocity change due to human movement in a short time, i.e., d k t = d k 0 + v k t , substituting it into Equation (6), we can obtain:
H f i , t 2 = H s f i 2 + k P d a k f i , t 2 + k P d 2 H s f i a k f i , t cos 2 π d k 0 + v k t λ i + ϕ s - ϕ k + k , l P d k l 2 a k f i , t a l f i , t cos ( 2 π v l - v k t + d l 0 - d k 0 λ i + ϕ k - ϕ l )
where ϕ s , ϕ k , and ϕ l represent the initial phase under static and dynamic paths, respectively, which can be regarded as constants. In addition, 2 π d k 0 λ i and 2 π d l 0 λ i represent the initial phase shifts under different dynamic paths, which can also be regarded as constants. Therefore, we can obtain:
2 π d l 0 - d k 0 λ i + ϕ k - ϕ l = ϕ k l
2 π d k 0 λ i + ϕ s - ϕ k = ϕ s k
Substituting Equations (8) and (9) into Equation (7), we can obtain:
H f i , t 2 = H s f i 2 + k P d a k f i , t 2 + k P d 2 H s f i a k f i , t cos 2 π v k t λ i + ϕ s k + k , l P d k l 2 a k f i , t a l f i , t cos 2 π v l - v k t λ i + ϕ k l
Since H s f i 2 and k P d a k f i , t 2 are approximately constants, the amplitude change in CSI caused by human movement ( H ( f i , t ) ) can be approximated as a sum of DC components and cosine signals whose frequencies change at a speed of v k of dynamic paths and amplitudes change with the length d k of dynamic paths.
In summary, human body movement causes changes in dynamic paths in WiFi signal multipath propagation, which in turn leads to changes in the CSI amplitude of the received signal.

3. System Design

3.1. System Overview

Wi-Senser aims to achieve non-device-based human head motion detection utilizing ubiquitous WiFi signals, without the need for users to wear any professional sensing devices. Figure 1 depicts the system architecture of Wi-Senser. Wi-Senser consists of three functional modules: a data collection module, a data processing module, and a head motion-detection module. In the data collection module, Wi-Senser directly uses a commercial WiFi router as a transmitter while using a laptop with an Intel 5300 network card to receive WiFi signals and extract CSI amplitude data. Since the original CSI amplitude data contain a large number of outliers and strong noise caused by the external environment and hardware equipment, Wi-Senser utilizes a filtering channel consisting of a Hampel filter, wavelet filter, and mean filter in the data processing module to filter out outliers and strong noise, and then uses a sensitivity measure to calculate the sensitivity of CSI amplitude fluctuations of each subcarrier to human head movement. As the CSI amplitude fluctuations of different subcarriers have different sensitivities to human head movement, Wi-Senser first selects the optimal subcarrier with the highest sensitivity from 30 subcarriers according to the calculated sensitivity in the head motion-detection module, and then uses the peak-finding algorithm to capture the real peak set caused by human head movement from the optimal subcarrier to achieve human head motion estimation. The following sections provide a detailed overview of each functional module of Wi-Senser for human head motion detection.

3.2. Data Collection

We conducted a data collection experiment in the laboratory using an 802.11n WiFi network, with a commercial WiFi router (TP-Link WDR5620, Shenzhen city, Guangdong Province, China) set as the transmitter (TX) and a Lenovo laptop equipped with an Intel 5300 network card as the receiver (RX), as shown in Figure 2. The network card has three antenna interfaces, and we connected external antennas to the receiver to enhance the signal strength. The distance between the transmitter and receiver was set to 2.5 m, and the packet transmission rate of the transmitter was set to 20 pkts/s. During the experiment, volunteers lay on a long table between the transmitter and receiver and freely rotated their heads (i.e., rolling their head in a supine position). We used the tool provided in the literature [14] to modify the firmware and driver of the receiver’s network card to obtain CSI measurements of 30 subcarriers in the 2.4 GHz WiFi signal. Specifically, the received single CSI measurement is a complex matrix of size 30 × N T X × N T X , where N T X and N R X are the numbers of transmitting antennas and receiving antennas, respectively.

3.3. Data Processing

Due to the strong noise in the original CSI measurements caused by environmental changes, wireless interference, etc., Wi-Senser needs to perform denoising processing on the original CSI measurements to extract fine-grained CSI amplitude information that records human head motion changes. Wi-Senser mainly considers three types of different noise: outliers (i.e., CSI measurements that deviate from the median by several times the standard deviation in a set of CSI measurements), high-frequency environmental noise, and low-frequency interference noise, and uses a filtering channel consisting of a Hampel filter, wavelet filter, and mean filter to filter out the above noise.

3.3.1. Hampel Filter

Figure 3 shows the raw CSI amplitude sequence (i.e., 30 CSI subcarriers) collected by the Intel 5300 network card, where it can be observed that there are generally many outliers in the raw CSI amplitude sequence. To address this issue, Wi-Senser utilizes a Hampel filter with a sliding window to remove the outlier CSI amplitudes. Specifically, given the n-length CSI amplitude sequence C i = c 1 i , , c n i in the i t h subcarrier and the j t h sliding window W k i = { c k i , , c k + Φ - 1 i } ( 1 k n - Φ + 1 ) with a length of Φ, if any CSI amplitude c j i k j k + Φ - 1 in the current sliding window satisfies the condition μ k i - γ × σ k i c j i u k i + γ × σ k i , where μ k i and σ k i represent the median and standard deviation of the CSI amplitudes in the current sliding window W k i , and γ represents an expandable factor (i.e., a constant), the Hampel filter considers it as an outlier. For any outlier c j i , the Hampel filter replaces it with the median μ k i . In the experiments, we empirically set γ and Φ to 1.5 and 7, respectively. Figure 4 shows the CSI subcarriers after being filtered by the Hampel filter, where it can be observed that the outliers identified in Figure 3 were effectively removed.

3.3.2. Wavelet Filter

Although the Hampel filter can remove outliers in the CSI amplitude sequence, high-frequency environmental noise still exists. Therefore, Wi-Senser needs to further filter out high-frequency environmental noise. Traditional low-pass filters such as Butterworth and Chebyshev filters suppress not only high-frequency noise but also the rising/falling edges in the CSI amplitude fluctuations, which are often caused by human motion events. Suppressing these edges may cause Wi-Senser to miss/detect false-positive head motion events. Compared with traditional low-pass filters, wavelet filters can better preserve transient changes in signals. Therefore, Wi-Senser utilizes a wavelet filter to suppress high-frequency environmental noise in the CSI amplitude sequence while preserving the rising/falling edges generated by head motion events. Specifically, Wi-Senser uses the Stein unbiased estimate as the threshold selection criterion and sets the threshold usage mode to soft thresholding in the wavelet filter. In each CSI subcarrier, Wi-Senser adopts 4-level db4 wavelet transform and retains the approximation coefficients (i.e., the useful low-frequency signal) to filter out high-frequency environmental noise. Figure 5 shows the CSI subcarriers filtered by the wavelet, where it can be observed that high-frequency environmental noise is effectively suppressed, and the rising/falling edges in the CSI amplitude changes that record head motion are fully preserved. The experimental results demonstrate the effectiveness of the low-pass filter (i.e., wavelet filter) selected by Wi-Senser to filter out high-frequency environmental noise.

3.3.3. Mean Filter

Although the wavelet filter can effectively remove high-frequency environmental noise from the CSI amplitude sequence, it cannot filter out low-frequency interference noise with similar frequencies to human motion signals. Therefore, Wi-Senser further utilizes a mean filter to filter out low-frequency interference noise and extract low-frequency CSI amplitude fluctuations that record head motion changes. Specifically, the mean filter treats consecutive sample data points as a data queue with a length of L. For each new measurement data point, it removes the first sample data point in the previous queue and adds a new sample data point to the end of the queue to form a new data queue with a length of L. Then, it performs arithmetic operations on the new data queue and uses the operation result as the final result of the new measurement task. That is, assuming the input is X and the output is Y, its calculation formula is as follows:
Y n = X n + X n - 1 + X n - 2 + + X n - L + 1 L
In the experiments, Wi-Senser empirically set L to 20 to perform filtering tasks. Figure 6 shows the CSI subcarriers further filtered by the mean filter, where it can be observed that compared with Figure 5, the CSI amplitude signals after mean filtering are smoother and more regular, the hierarchy between subcarriers is clearer, and all head motion-induced CSI amplitude fluctuations can be fully recorded. The experimental results demonstrate the effectiveness of the mean filter used by Wi-Senser to filter out low-frequency interference noise. In addition, Figure 7 shows the comparison of CSI amplitude changes before and after data processing. It can be clearly seen that compared with the original CSI amplitude signal (as shown in Figure 7a), the CSI amplitude signal obtained by Wi-Senser’s filtering channel is smoother, and the CSI amplitude fluctuations caused by head motion are more obvious, while various noises are effectively filtered out (as shown in Figure 7b). The experimental results demonstrate the effectiveness of the filtering channel used by Wi-Senser to filter out various noises.

3.4. Carrier Selection

Due to different center frequencies/wavelengths of different subcarriers, the sensitivity of CSI amplitude fluctuations of different subcarriers to human head motion changes varies. Specifically, Figure 7b shows the CSI amplitude changes of each subcarrier with human head motion after data processing. It can be observed that human head motion has a smaller impact on the CSI amplitude changes of subcarriers with lower carrier numbers (i.e., subcarriers 1–10), indicating that these subcarriers are less sensitive to human head motion changes. However, human head motion has a greater impact on the CSI amplitude changes of subcarriers with higher carrier numbers (i.e., subcarriers 15–30), indicating that these subcarriers are more sensitive to human head motion changes. Therefore, before performing human head motion detection, Wi-Senser needs to select the optimal subcarrier with the highest sensitivity to human head motion changes from the CSI subcarriers after data processing.
To achieve this goal, Wi-Senser first defines a sensitivity metric to quantify the sensitivity of CSI amplitude changes of different subcarriers to human head motion changes. Specifically, given any processed CSI amplitude sequence C i = { c 1 i , , c n i } , where i is the ordinal of subcarrier and n is the sample length, the sensitivity of C i to human motion can be calculated as:
Q 1 , n i = 1 - θ × s d i + θ × k t i
s d i = j = 1 n c j i - c - 2 n
k t i = 1 n j = 1 n c j i - c - 4 1 n j = 1 n c j i - c - 2 2 - 3
where s d i and k t i are the standard deviation and kurtosis of C i , respectively, and θ 0 , 1 is a weighting factor. This is unlike reference [24], which only utilizes the variance of the CSI amplitude sequence to quantify the sensitivity of different subcarriers to human motion. However, both human movement and non-motion interference can cause large changes in the variance of CSI amplitude, and it is difficult for variance measurement to effectively identify whether the fluctuation of CSI amplitude (that is, large variance value) in a certain period of time is caused by human motion or by non-motion interference. Therefore, as shown in Equation (12), Wi-Senser introduces a joint sensitivity metric of the standard deviation and kurtosis of the CSI amplitude sequence for the first time. The reason for introducing this joint metric is twofold: first, the kurtosis metric can measure the sharpness of CSI amplitude fluctuations, and since the CSI amplitude fluctuations caused by human motion are sharper, this metric can better capture the CSI amplitude fluctuations that reflect human motion changes; second, compared with variance metrics, standard deviation metrics are more robust to CSI amplitude fluctuations. Figure 8 shows the sensitivity calculation results of different subcarriers under different sensitivity metrics. It can be observed that the optimal subcarrier selected by the traditional method (i.e., variance metric) is subcarrier 28, while the optimal subcarrier selected by Wi-Senser (i.e., joint metric) is subcarrier 17. Figure 9 further shows the optimal subcarrier selected under different sensitivity metrics (i.e., subcarrier 28 and subcarrier 17). It can be clearly observed that, as shown in Figure 9a, although subcarrier 28 can fully record human head motion changes (i.e., the green triangle in the figure), it also introduces more spike signals unrelated to human head motion (i.e., the red triangle in the figure), which may lead to false detection. Compared with subcarrier 28, subcarrier 17 shown in Figure 9b is smoother and more stable; specifically, there are no spike signals around the peak of the CSI amplitude fluctuations that reflect human head motion, indicating that subcarrier 17 can more accurately detect human head motion (i.e., the green triangle in the figure) and greatly reduce the possibility of false detection. In conclusion, the joint standard deviation and kurtosis sensitivity metric proposed by Wi-Senser can better select the optimal subcarrier, which has the highest sensitivity to human head motion and is insensitive to irrelevant environmental changes.

3.5. Motion Detection

After Wi-Senser selects the optimal subcarrier with the highest sensitivity to human head motion changes from 30 CSI subcarriers using the joint metric, it further utilizes the peak-finding algorithm to capture the true peak set caused by human head motion from the optimal subcarrier to achieve accurate detection of human head motion. The peak-finding algorithm is detailed in Algorithm 1. Specifically, for the processed CSI amplitude sequence C i , Wi-Senser first uses the sensitivity measure given by Equation (12) to calculate the sensitivity values of each subcarrier to head movement during sleep (lines 1–5 in Algorithm 1). Then, Wi-Senser selects the subcarrier with the highest sensitivity value as the optimal subcarrier (lines 6–10 in Algorithm 1). Next, for the selected optimal subcarrier, Wi-Senser sets a minimum peak height and uses a classical algorithm to find all local maxima as the candidate peak set (lines 11–12 in Algorithm 1). Finally, Wi-Senser filters out false peaks caused by large-scale body movements including getting out of bed and turning over (i.e., changing sleeping postures) from the candidate peak set based on a threshold-based approach to obtain the true peak set that records changes in head movement during sleep (lines 13–18 in Algorithm 1). The reason we can remove irrelevant large body movements is that the environmental changes involving large body movements (e.g., going to bed and turning over) result in much larger changes in CSI measurement than those of minute movements of human head [24].
Algorithm 1: Peak-finding algorithm
Input: The processed CSI amplitude sequence: C i = c 1 i , , c n i 1 i 30 ;
   weight factor: θ ; threshold used to discriminate large body movements: T m a x .
Output: The true peak set: R e a l P e a k S e t
1:  Q m a x 0 ;
2: for i = 1: 30  do
3:    s d i = j = 1 n c j i - c - 2 n ;
4:    k t i = 1 n j = 1 n c j i - c - 4 1 n j = 1 n c j i - c - 2 2 - 3 ;
5:    Q 1 , n i = 1 - θ × s d i + θ × k t i ; # Sensitivity calculation
6:   if  Q 1 , n i > Q m a x  then
7:      Q m a x Q ( 1 , n ) i ; # Optimal subcarrier selection
8:   end if
9: end for
10:  i m a x ;
11:  P h e i g h t = α × M e a n ( C i ) ; #Set a minimum peak height used to filter out non-movement interferences
12:  L o c a l M a x S e t F i n d L o c a l M a x s ( C i , P h e i g h t ) ;/* L o c a l M a x S e t = { φ k , 1 k K } */
13: for  k =1: K  do #Find the true peak set caused by head movements
14:   if  a m p l i t u d e φ k < T m a x  then
15:     add φ k into R e a l P e a k S e t ;
16:   end if
17: end for
18: return R e a l P e a k S e t .

4. Evaluation

4.1. Implementation

4.1.1. Hardware Implementation

The transmitter of Wi-Senser is a TP-Link commercial wireless router model TL-WDR5620, which is set to operate in the 2.4 GHz frequency band and uses the IEEE 802.11n protocol standard. The receiver of Wi-Senser is a Lenovo laptop computer with an Intel 5300 wireless network card (3.3 GHz Intel(R) Core (TM) i5 CPU, 8 GB RAM, 512 GB solid-state drive), which has three antenna interfaces that we externally connect to enhance the received signal strength. The laptop computer is installed with Ubuntu 12.04 LTS and operates in client mode. The laptop computer sends ping commands to the wireless router at a data transmission rate of 20 pkts/s, and the wireless router also transmits 2.4 GHz WiFi signals to the laptop computer at the same data transmission rate. We modified the firmware and driver of the network card using tools provided in reference [14] to obtain CSI measurements of 30 subcarriers in the 2.4 GHz WiFi signal. MATLAB R2018b is used to process and analyze the collected CSI data. Wi-Senser uses a high-definition camera to record actual human head motion. The experimental deployment is shown in Figure 2.

4.1.2. Software Implementation

To obtain rich CSI data to verify the detection performance of Wi-Senser on human head motion, a total of ten volunteers were recruited for this experiment, including six adults (three men and three women) and four children (two boys and two girls), with ages ranging from 6 to 27 years old and weights between 20 kg and 65 kg. During the experiment, the transmitter and receiver were initially placed on both sides of the area where human motion was expected, with an initial relative distance of 2.5 m between them. During the three-day experiment, we asked each of the volunteers to take parts in tests 20 times per day and the duration of each test was approximately 3 min. During the testing, the volunteers rolled their head freely and randomly according to their personal sleeping habits, and one subject watched the video stream transmitted by the camera to record the length of the testing time. Therefore, Wi-Senser collected a total of 600 CSI amplitude data segments (60 times × 10 volunteers).

4.1.3. Performance Metric

We use the detection accuracy as the performance evaluation index of human head motion detection, which is defined as follows:
Detection   Accuracy = R D R A × 100 %
where R D represents the number of true head movements detected by Wi-Senser using the peak-finding algorithm, and R A represents the actual number of head movements recorded by the high-definition camera.

4.2. Overall Performance

4.2.1. Evaluation of Detection of Head Movement during Sleep

The detection results of Wi-Senser on human head motion are shown in the green bar chart in Figure 10. As shown in the figure, the characters ‘G’, ‘B’, ‘M’, and ‘W’ represent girl, boy, man, and woman, respectively. Specifically, the average detection accuracies of Wi-Senser for the ten volunteers’ head movements are 96.5%, 93%, 98%, 95%, 100%, 99%, 100%, 100%, 100%, and 98%, respectively. In general, Wi-Senser achieves an average detection accuracy of over 97.95% for all volunteers’ head movements. It should be noted that the average accuracy of monitoring children’s head movement is lower than 95.7%, which degrades sensing performance by about 4% compared with the adults. The main reason for this phenomenon is that the children’s head movements have smaller amplitude and weaker swing force, resulting in less fluctuation in the received CSI amplitude values and causing Wi-Senser to miss some slight head movements of the children. In addition, the average detection accuracy of male (i.e., two boys and three men) and female (i.e., two girls and three women) subjects is 98.4% and 97.5%, respectively. Therefore, the performance of our Wi-Senser is not sensitive to human gender. Overall, although the accuracy of Wi-Senser degrades a bit when applied to monitoring children’s head movement, it can still achieve satisfactory performance (i.e., accuracy higher than 93%).

4.2.2. Comparison with the Existing Method

To verify the effectiveness of the sensitivity metric proposed by Wi-Senser in selecting the optimal subcarrier, we first used the traditional variance metric to select the optimal subcarrier from the collected 600 CSI data segments, then used the peak-finding algorithm to obtain the corresponding peak set, and finally calculated the detection accuracy. The red bar chart in Figure 10 shows the human head motion-detection performance under the variance metric. It can be observed clearly that the detection accuracy of the optimal subcarrier selected by the variance metric is significantly lower than that of Wi-Senser, with an average detection accuracy reduced from 97.95% to 91.95%. The experimental results confirm the effectiveness of the sensitivity metric proposed by Wi-Senser in improving the detection performance of human head motion.

5. Discussion

Wi-Senser utilizes the multipath propagation effect of WiFi signals to achieve contactless, low-cost, easy-to-deploy human head movement detection during sleep. However, at present, there are also some limitations in practical applications, as follows:
  • The relative position of sensing devices: In order to overcome this limitation, Wi-Senser can try to deploy multiple pairs of transceivers in future work to expand the effective sensing range of the system, and fuse the CSI measurement values collected by multiple pairs of transceivers to achieve more comprehensive and three-dimensional detection of human movement.
  • The relative distance of sensing devices: In order to overcome this limitation, Wi-Senser can try to use high-gain directional antennas to increase the transmission power of WiFi signals in future work, enabling receivers to collect effective CSI measurement values at greater distances.
  • Multiple-user sensing: At present, Wi-Senser can only sense the head movements of a single person. In future work, Wi-Senser can try to use multi-signal classification algorithms such as MUSIC to achieve sensing of multi-person sleep activities.

6. Conclusions

This paper presents a contactless sleep head movement monitoring system, named Wi-Senser, using the existing ubiquitous WiFi signals. Firstly, the theoretical model of using WiFi signals for detecting human body movements is analyzed, which approximates the changes in CSI amplitude caused by body movement as the sum of a series of DC components and cosine signals whose frequencies vary with the dynamic path velocity and amplitudes vary with the dynamic path length. To obtain fine-grained CSI amplitude information, Wi-Senser first constructs a filtering channel composed of a Hampel filter, wavelet filter, and mean filter to filter out the outliers and noises existing in the raw CSI measurements. Then, Wi-Senser proposes a new metric of carrier sensitivity based on standard deviation and kurtosis and then selects an optimal subcarrier for accurately recording the change in human head movements from the 30 candidate subcarriers. Finally, Wi-Senser designs a peak-finding algorithm to capture the real peak set so that our proposed contactless and accurate system for monitoring head movement during sleep can be achieved. Extensive experiments involving six volunteers demonstrate that Wi-Senser is able to achieve an average detection accuracy of higher than 97.95%. Compared with the traditional carrier selection method, the new metric we proposed to select an optimal carrier improves the average detection accuracy of the system by 6%. We envision that Wi-Senser will not only provide monitoring of sleep activities, but that it can also be extended to various novel applications of smart monitoring.

Author Contributions

Conceptualization W.L.; methodology, W.L.; software, W.L.; validation, W.L., Y.F. and S.Z.; formal analysis, W.L. and S.Z.; investigation, W.L.; resources, W.L.; data curation, W.L.; writing—original draft preparation, Y.F.; writing—review and editing, Y.F.; visualization, Y.F.; supervision, W.L.; project administration, W.L.; funding acquisition, W.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China under grant 62202001.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

The data that support the findings of this paper are available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Chou, J.J.; Chang, T.W.; Liu, X.Y.; Wu, T.Y.; Chen, Y.K.; Hsu, Y.T.; Chen, C.W.; Liu, T.T.; Shih, C.S. CIM-Based Smart Pose Detection Sensors. Sensors 2022, 22, 3491. [Google Scholar] [CrossRef] [PubMed]
  2. Matuska, S.; Paralic, M.; Hudec, R. A Smart System for Sitting Posture Detection Based on Force Sensors and Mobile Application. Mob. Inf. Syst. 2020, 2020, 6625797. [Google Scholar] [CrossRef]
  3. Patil, A.K.; Balasubramanyam, A.; Ryu, J.Y.; Chakravarthi, B.; Chai, Y.H. An Open-Source Platform for Human Pose Estimation and Tracking Using a Heterogeneous Multi-Sensor System. Sensors 2021, 21, 2340. [Google Scholar] [CrossRef] [PubMed]
  4. Abir, F.F.; Faisal, A.A.; Shahid, O.; Ahmed, M.U. Contactless Human Activity Analysis: An Overview of Different Modalities. Contactless Hum. Act. Anal. 2021, 200, 83–112. [Google Scholar]
  5. Zhou, X.; Liang, W.; Wang, K.I.-K.; Wang, H.; Yang, L.T.; Jin, Q. Deep-Learning-Enhanced Human Activity Recognition for Internet of Healthcare Things. IEEE Internet Things J. 2020, 7, 6429–6438. [Google Scholar] [CrossRef]
  6. Abdel-Basset, M.; Hawash, H.; Chakrabortty, R.K.; Ryan, M.; Elhoseny, M.; Song, H. ST-DeepHAR: Deep learning model for human activity recognition in IoHT applications. IEEE Internet Things J. 2020, 8, 4969–4979. [Google Scholar] [CrossRef]
  7. Xie, W.; Zhang, Q.; Zhang, J. Acoustic-based Upper Facial Action Recognition for Smart Eyewear. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 2021, 5, 1–28. [Google Scholar] [CrossRef]
  8. Masuda, N.; Furukawa, K.; Yairi, I.E. Stetho Touch: Touch Action Recognition System by Deep Learning with Stethoscope Acoustic Sensing. J. Inf. Process. 2022, 30, 718–728. [Google Scholar] [CrossRef]
  9. Bayram, B.; Ince, G. An Incremental Class-Learning Approach with Acoustic Novelty Detection for Acoustic Event Recognition. Sensors 2021, 21, 6622. [Google Scholar] [CrossRef]
  10. Yuan, G.; Wang, Z.; Meng, F.; Yan, Q.; Xia, S. An overview of human activity recognition based on smartphone. Sens. Rev. 2019, 39, 288–306. [Google Scholar] [CrossRef]
  11. Gu, Z.; Wang, J.; Shen, F.; Xu, K.; Ye, D.; Huangfu, J.; Li, C.; Ran, L. Blind Separation of Doppler Human Gesture Signals Based on Continuous-Wave Radar Sensors. IEEE Trans. Instrum. Meas. 2019, 68, 2659–2661. [Google Scholar] [CrossRef]
  12. Liu, C.; Xiong, J.; Cai, L.; Feng, L.; Chen, X.; Fang, D. Beyond respiration: Contactless sleep sound-activity recognition using RF signals. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 2019, 3, 1–22. [Google Scholar] [CrossRef]
  13. Yang, Y.; Cao, J.; Liu, X. ER-Rhythm: Coupling exercise and respiration rhythm using lightweight COTS RFID. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 2019, 3, 1–24. [Google Scholar] [CrossRef]
  14. Halperin, D.; Hu, W.; Sheth, A.; Wetherall, D. Tool release: Gathering 802.11 n traces with channel state information. ACM SIGCOMM Comput. Commun. Rev. 2011, 41, 53. [Google Scholar] [CrossRef]
  15. Xie, Y.; Li, Z.; Li, M. Precise Power Delay Profiling with Commodity Wi-Fi. IEEE Trans. Mob. Comput. 2018, 18, 1342–1355. [Google Scholar] [CrossRef]
  16. Zhu, A.; Tang, Z.; Wang, Z.; Zhou, Y.; Chen, S.; Hu, F.; Li, Y. Wi-ATCN: Attentional Temporal Convolutional Network for Human Action Prediction Using WiFi Channel State Information. IEEE J. Sel. Top. Signal Process. 2022, 16, 804–816. [Google Scholar] [CrossRef]
  17. Sharma, L.; Chao, C.H.; Wu, S.L.; Li, M.C. High accuracy wifi-based human activity classification system with time-frequency diagram CNN method for different places. Sensors 2021, 21, 3797. [Google Scholar] [CrossRef]
  18. Li, T.; Gao, S.; Zhu, Y.; Gao, Z.; Zhao, Z.; Che, Y.; Xia, T. SM-TCNNET: A High-Performance Method for Detecting Human Activity Using WiFi Signals. Appl. Sci. 2023, 13, 6443. [Google Scholar] [CrossRef]
  19. Zeng, Y.; Wu, D.; Xiong, J.; Yi, E.; Gao, R.; Zhang, D. FarSense: Pushing the range limit of WiFi-based respiration sensing with CSI ratio of two antennas. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 2019, 3, 1–26. [Google Scholar] [CrossRef] [Green Version]
  20. Hao, Z.; Duan, Y.; Dang, X.; Zhang, T. CSI-HC: A WiFi-based indoor complex human motion recognition method. Mob. Inf. Syst. 2020, 2020, 3185416. [Google Scholar] [CrossRef]
  21. Zhang, F.; Wu, C.; Wang, B.; Wu, M.; Bugos, D.; Zhang, H.; Liu, K.J.R. SMARS: Sleep Monitoring via Ambient Radio Signals. IEEE Trans. Mob. Comput. 2019, 20, 217–231. [Google Scholar] [CrossRef]
  22. Zeng, Y.; Wu, D.; Xiong, J.; Liu, J.; Liu, Z.; Zhang, D. MultiSense: Enabling multi-person respiration sensing with commodity wifi. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 2020, 4, 1–29. [Google Scholar] [CrossRef]
  23. Yang, X. A Study of Human Walking Sensing Technology Based on Channel State Information. Ph.D. Thesis, University of Science and Technology of China, Hefei, China, 2020. [Google Scholar]
  24. Liu, J.; Chen, Y.; Wang, Y.; Chen, X.; Cheng, J.; Yang, J. Monitoring Vital Signs and Postures During Sleep Using WiFi Signals. IEEE Internet Things J. 2018, 5, 2071–2084. [Google Scholar] [CrossRef]
Figure 1. System architecture of Wi-Senser.
Figure 1. System architecture of Wi-Senser.
Applsci 13 07572 g001
Figure 2. Wi-Senser deployment in a laboratory.
Figure 2. Wi-Senser deployment in a laboratory.
Applsci 13 07572 g002
Figure 3. CSI subcarriers before data processing.
Figure 3. CSI subcarriers before data processing.
Applsci 13 07572 g003
Figure 4. CSI subcarriers filtered by the Hampel Filter.
Figure 4. CSI subcarriers filtered by the Hampel Filter.
Applsci 13 07572 g004
Figure 5. CSI subcarriers filtered by the wavelet filter.
Figure 5. CSI subcarriers filtered by the wavelet filter.
Applsci 13 07572 g005
Figure 6. CSI subcarriers filtered by the mean filter.
Figure 6. CSI subcarriers filtered by the mean filter.
Applsci 13 07572 g006
Figure 7. CSI amplitude changes under human head motion. (a) Original CSI amplitude changes; (b) CSI amplitude changes after data processing.
Figure 7. CSI amplitude changes under human head motion. (a) Original CSI amplitude changes; (b) CSI amplitude changes after data processing.
Applsci 13 07572 g007
Figure 8. The results of sensitivity calculation under different metrics.
Figure 8. The results of sensitivity calculation under different metrics.
Applsci 13 07572 g008
Figure 9. The optimal subcarrier selected under different metrics. (a) Optimal subcarrier selected based on variance metric (subcarrier 28); (b) optimal subcarrier selected based on joint metric (subcarrier 17).
Figure 9. The optimal subcarrier selected under different metrics. (a) Optimal subcarrier selected based on variance metric (subcarrier 28); (b) optimal subcarrier selected based on joint metric (subcarrier 17).
Applsci 13 07572 g009
Figure 10. The results of human head movement detection under different carrier selection methods.
Figure 10. The results of human head movement detection under different carrier selection methods.
Applsci 13 07572 g010
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Fang, Y.; Liu, W.; Zhang, S. Wi-Senser: Contactless Head Movement Detection during Sleep Utilizing WiFi Signals. Appl. Sci. 2023, 13, 7572. https://doi.org/10.3390/app13137572

AMA Style

Fang Y, Liu W, Zhang S. Wi-Senser: Contactless Head Movement Detection during Sleep Utilizing WiFi Signals. Applied Sciences. 2023; 13(13):7572. https://doi.org/10.3390/app13137572

Chicago/Turabian Style

Fang, Yi, Wei Liu, and Sun Zhang. 2023. "Wi-Senser: Contactless Head Movement Detection during Sleep Utilizing WiFi Signals" Applied Sciences 13, no. 13: 7572. https://doi.org/10.3390/app13137572

APA Style

Fang, Y., Liu, W., & Zhang, S. (2023). Wi-Senser: Contactless Head Movement Detection during Sleep Utilizing WiFi Signals. Applied Sciences, 13(13), 7572. https://doi.org/10.3390/app13137572

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop