# Human Detection through RSSI Processing with Packet Dropout in Wireless Sensor Network

Authors: Haijing Wang; Fangfang Zhang; Wenli Zhang
Journal: Journal of Sensors
 (2020)

---

## Abstract

This paper presents a device-free human detection method for using Received Signal Strength Indicator (RSSI) measurement of Wireless Sensor Network (WSN) with packet dropout based on ZigBee. Packet loss is observed to be a familiar phenomenon with transmissions of WSNs. The packet reception rate (PRR) based on a large number of data packets cannot reflect the real-time link quality accurately. So this paper firstly raises a real-time RSSI link quality evaluation method based on the exponential smoothing method. Then, a device-free human detection method is proposed. Compared to conventional solutions which utilize a complex set of sensors for detection, the proposed approach achieves the same only by RSSI volatility. The intermittent Karman algorithm is used to filter RSSI fluctuation caused by environment and other factors in data packets loss situation, and online learning is adopted to set algorithm parameters considering environmental changes. The experimental measurements are conducted in laboratory. A high-quality network based on ZigBee is obtained, and then, RSSI can be calculated from the receive sensor modules. Experimental results show the uncertainty of RSSI change at the moment of human through the network area and confirm the validity of the detection method.


---

## Body

## 1. Introduction

Object detection is a popular area of research. Detection based on WSN processes object information collected by sensors, sends to the control center, and then analyses the data to realize the detection [1]. The sensor signal acquisition is significantly important, and the type of sensors concerns the detection result. At present, pyroelectric infrared [2], voice signal, vibration signal, and magnetic signal sensors are commonly used for detection. However, these detection studies often require external sensors or human body carrying corresponding equipment [3, 4].With the rapid development of Internet of Things (IoT), massive data is delivered through trillions of interconnected smart devices. IEEE 802.15.4 is one of the preferred mechanisms to provide modulation and Media Access Control (MAC) in wireless IoT networks. Sensors and actuators in WSNs are usually deployed in edge environments where wireless channels are subject to burst packet loss due to multipath fading or high bit error rate. Packet loss is an important factor that reduces the robustness of WSNs. The research on correctly implementing reasonable control strategies to improve network performance has attracted wide attention from many scholars. At present, data collection phase is one of the most critical phases in the whole process of communication between device and human. Numerous data collection solutions were proposed in the literature [5–7]. There are many methods for evaluating the quality performance of network links, which can be mainly divided into two categories. One is to use the PRR for evaluation [8]. The packet rate can directly reflect the current link quality, but in order to obtain accurate link evaluation, it is necessary to calculate the packet rate through a large number of samples, which wastes a lot of energy and deviates from the low power consumption of wireless sensor networks. The other is by using RSSI and link quality indicator (LQI) [9]. RSSI is one of link quality evaluation indicators and has been widely used in localization [10], distance estimation, and link quality assessment.Mo et al. [11] believe that RSSI values are an important indicator of network packet loss. When the RSSI value is close to the gray area, the packet loss phenomenon will occur remarkably, and a lightweight adaptive repair and adjustment decision method is proposed. See et al. [12] proposed network link quality can be measured by the vector network analyzer or RSSI received by the receiving node, and the probability distribution of the RSSI value at different packet loss rates is used to study the relationship between the path loss and the packet loss rate.However, the existed literatures show that RSSI can be affected by many factors, for instance, the performance of WSN nodes, the temperature and humidity of the surroundings [13–15]. Each can change RSSI, which cause RSSI to cannot accurately reflect the quality of the network link. Hamida and Guillaum [16] found that people have a great influence on RSSI when walking around in the network area and proposed that RSSI cannot accurately network link quality when there is someone in the daytime.In this paper, we introduce a real-time link quality estimation method and a human detection method using RSSI volatility. There are already several researches which have shown detection result using RSSI [17]. Hussain et al. [18] investigated the variation of RSSI can be used to detect the mobility of an intruder and tested by a light sensor. Radio Tomographic Imaging (RTI) has been developed to image the attenuation caused by physical objects using RSSI in a wireless network. An Elliptical Weight Model (EWM) was introduced to describe the characteristic of RSSI attenuation and further to track and estimate the position of individuals [19]. A distributed processing of RSSI for indoor surveillance was proposed to detect and localize moving persons, and power consumption is reduced by the intrusion alert algorithm [20]. The shadowing effect between stationary wireless nodes in which the line of sight obstructed by a human body was adopted and RSSI variations were analyzed for human presence detection [21].This paper describes a WSN for real-time human detection by the fluctuation of RSSI. Different from other previous works, the uncertainty change of RSSI at the moment of human entering or leaving to the detection area is considered. The Intermittent Kalman filter is applied to improve the accuracy of detection by considering the packet loss in WSN and to smooth RSSI volatility caused by the environment or other factors. Furthermore, the real-time RSSI reference value has been sought to reduce the misjudgment of human.The paper is organized as follows. A real-time link quality estimation method based on the RSSI value and a human detection method in the case of data loss are given in Section2. The experimental results are presented to confirm the validity of the detection method in Section 3. Finally, we conclude in Section 4.


## 2. Methodology

### 2.1. Real-Time Link Quality Estimation Method

The real-time wireless link considered in this paper is dynamic and time-varying. If the PRR is calculated according to the success rate of each data reception, the error is large and cannot estimate the link quality. This paper uses an exponential smoothing method [22], which is a common sequence data processing method. It takes into account the role of past data and uses the concept of weight to consider the degree of data impact. Window sliding average processing is now performed on the observed data.The observation data sequence moves on the window that can hold 100 data, and the observation data corresponding to the window center is updated for the window moving on data series, which named window sliding average. In theT time, the number of transmitted data packets is N=100, and the number of successfully received data is m, which is obtained by the exponential smoothing method:
(1)PRRnT=1−aYnT+aPRRn−1T,where PRRnT is the current PRR prediction, PRRn−1T is the last prediction, YnT reflects the PRR measurement of the n-th window time, which is m/N, N=100, so YnT is a fraction less than 1, and also a is a number of 0,1. We can see from the model, the bigger a is, the more weight is given to the last prediction PRRn−1T. On the contrary, the lower a is, the more weight is given to the most recent observation YnT.Since the PRR is a number less than 1, we take the third digit after the decimal point to improve the accuracy and simplify the calculation. LetPnT=1000PRRnT, Equation (1) can be changed to
(2)PnT=10m1−a+aPn−1T.According to Equation (2), the value of the smoothing constant a is the key to obtaining the PRR.Now, we use the RSSI value received by the receiving node to determine the value ofa. The RSSI value can reflect the link quality under certain circumstances. For example, the RSSI is generally stable at around -60 dBm in an unmanned laboratory environment, and in this case, the PRR tends to be relatively high and stable. When a human was moving into the network area, the RSSI will fluctuate greatly and the attenuation can reach -85 dBm; the PRR tends to decrease and be unstable.So the value ofa can be recalculated as a′, which is expressed as
(3)a′=a,σ2nT≤σ02,RSSIavgnT−RSSIavg≤RSSI_offset,a−r,σ2nT≤σ02,RSSIavgnT−RSSIavg>RSSI_offset,a−r,σ2nT>σ02,where r is the influence of the RSSI value on a; σ2nT is the variance of RSSI for the n-th window time; σ02 is the variance of the measured RSSI values in unmanned environment, the average of RSSI for the n-th window time is RSSIavgnT, and RSSIavg is the average RSSI value in the unmanned environment; and RSSI_offset is found empirically by sending a large amount of packets in the unmanned environment.When using Equation (2), the initial value PT should be determined and obtained. Through a large number of statistical data analysis, RSSIavg, the variance σ02 and PT are set. The RSSI value is above the threshold and fluctuates at RSSIavg in a small range in the unmanned environment. The network link quality is relatively stable. a can be obtained through a large number of statistical data in the unmanned environment and by calculating the average and variance of RSSI values over the window time; and the value is very close to 1. a′ is obtained from packets in the case of interference, and the value is close to 0.


### 2.2. Detection Algorithm

Packet loss is observed to be a familiar phenomenon with transmissions of WSNs. Frequent undesired packet loss seriously degrades the network performance. The real-time link quality estimation method mentioned in Section2.1 can be used to observe the PRR of each window time. The detection result is set to be invalid when the PRR at one time is low. So data dropout in transmission should be considered. In this paper, the Intermittent Kalman filter algorithm [23] is used to estimate the lost RSSI values and further to realize detection.Owing to the existence of measurement error, the measured RSSI valueZk,k=0,1,⋯,m fluctuates randomly within a narrow range near the actual RSSI value Xk, namely, Zk−λ/2≤Xk≤Zk+λ/2, and the measurement precision is determined by constant λ. Gaussian random noise is considered in this experiment and filtered by the Intermittent Kalman algorithm to obtain the real RSSI value [24]. The system of RSSI equations can be described as
(4)Xk=Xk−1+Wk−1,Zk=Xk+Vk,where Xk is the estimated value of RSSI at time k; Zk is the measured RSSI value; Wk−1 is Gaussian random noise of system; Wk−1∼N0,Q, where Q is the variance; Vk is Gaussian random noise of measurement; and Vk∼N0,R, where R is the variance.Q and R should be known, and the values have direct influence on the algorithm. The values need to reset with the changes of the environment. In this paper, online learning is used to set the value of Q and R, which are the learning abilities. The values of RSSI are adopted as the training inputs enabling the algorithm to automatically and timely adapt to the environmental dynamics. Assume there are N arbitrary distinct training samples xi,yi,i=1,2,⋯,N, where X are the training inputs and Y are the training targets; we consider a loss function ly,y^=y∧−y2 that measures the cost of predicting y^ when the actual answer is y. The ultimate goal is to minimize the cumulative loss suffered along its run. And there is a correlation between the past and present when environment changes.We consider this problem as a discrete time system; the uncertainty arises mainly because of packets dropout in the network, which leads to the randomness of receiving observations. Data loss can be described by a random variable which obeyed Bernoulli distribution [25]. Firstly, a random binary variable γt is used to describe the observation at time t, γt=1 expresses the packet at time t received, and γt=0 expresses the packet at time t lost; the probability pγt1=λt,λt0≤λt≤1 is the arrival rate. γt at time t is mutually independent with γt at time s. The measured noise Vt can be defined as follows:
(5)PVt∣γt=N0,r,γt=1,N0,σ2I,γt=0,when γt is equal to 1, the variance of Vt is R; when γt is 0, the variance of Vt is σ2I, and the value of σ2 is arbitrary. In reality, the corresponding observation value cannot be obtained when the packet loss happens, so σ→∞. Now, we use a virtual observation to replace the actual value that has been lost with the given variance σ2, and let σ→∞. Then, the Kalman filter equation can be calculated as follows:
(6)X^t∣t+1=AX^t∣t,(7)Pt+1∣t=APt∣tAT+Q,(8)X^t+1∣t+1=X^t+1∣t+Pt+1∣tHTHPt+1∣tHT+γt+1R+1−γt+1σ2I−1Zt+1−HX^t+1∣t,(9)Pt+1∣t+1=Pt+1∣t−Pt+1∣tHTHPt+1∣tHT+γt+1R+1−γt+1σ2I−1HPt+1∣t,where X^t∣t is the estimate value of RSSI, A is a unit matrix, and H is a unit matrix. If σ→∞, then, (8) and (9) are equivalent to the following two equations:
(10)Xt+1∣t+1=X^t+1∣t+γt+1Kt+1Zt+1−HXt+1∣t,(11)Pt+1∣t+1=Pt+1∣t−γt+1Kt+1HPt+1∣t,where Kt+1=Pt+1∣tHTHPt+1∣tHT+R−1 is the Kalman gain, which is the same as the traditional Kalman algorithm. Calculating Kt,t=1,2,⋯,P0∣0 should be known firstly. P0∣0=EX0−X^0∣0X0−X∧0∣0T. Actually, λt=1 is a kind of ideal state. When λt=0, Equation (8) degrades into the traditional Kalman algorithm.Data loss means we cannot obtain the current RSSI value; for example, the average RSSI value is about -60 dBm in nobody environment in the laboratory. The RSSI value will be extracted as 0 dBm if data loss happened at that time. Therefore, the intermittent Kalman filter algorithm is adopted to avoid the error caused by packet loss.The effect of Intermittent Kalman filtering when packet loss happens during transit is shown in Figure1. There are some data losses in 250 packets sent by the transmitting node, and the RSSI value is extracted as 0 dBm. However, RSSI curve becomes smooth after being filtered. We also find that the fluctuation can reach 15 dBm from real data, which may neutralize the effect of human body and further impact the experiment results. But after being filtered, the maximum RSSI fluctuation of every moment is less than 1 dBm compared with the previous moment. So Intermittent Kalman can in some degree filter fluctuation caused by environmental changes, the performance of sensor nodes, indoor obstacles, and measurement errors.Figure 1
The effect of RSSI data filtered by the Intermittent Kalman algorithm.Recent research has shown that variations of RSSI in indoor environments where sensor nodes have been deployed can reveal movements of persons [26]. The detection method proposed is mainly based on the human body interfering with RSSI by causing fading and shadowing effects.In our earlier works, we compute the average RSSI value in nobody environment; however, we find that average RSSI value laboratory may change by many factors, the performance of WSN nodes, the temperature, humidity of the surroundings, and so on. And when lab students work over their office desk, the values can be obviously different with the value in nobody context, regardless of those persons sitting in or out of the detection area. Especially, while the experiment is ongoing, some persons come in or go out of the lab even out of the detection area which may cause the average RSSI value in nobody environment meaningless. So, we take the change of the lab environment into account in this detection experiment.Owning to the existence of multipath effect, scattering, reflection, obstacle, and other interference factors in the lab, a real-time RSSI reference should be set as shown in Algorithm1. RSSI fluctuates within a narrow range in an unmanned environment, and RSSI offset can be found empirically by sending a large amount of packets. When the current RSSI value is obtained, we compare it with the last RSSI value. If the difference is greater than the RSSI offset, we set the current RSSI as reference. Otherwise, the last value is still the RSSI reference.Algorithm 1: RSSI preprocessing algorithm.
#define RSSI_offset     The threshold value setvar value;          The last RSSI value receivedvar value_new;       The current value obtained11 |value_new-value|<RSSI_of f setreturn value;elsereturn value_new;We can see from Figure2 that a person enters into the network area at the beginning, and the RSSI value obviously decreases about high to 8 dBm. The person leaves at about the 30th data number, and the RSSI value is up to -65 dBm at the moment but reaches a stable level of -68 dBm. A human comes in the area near the 50th number; however, there is a sharp increase rather than a decrease of the RSSI value. Until the person keeps quiet in the detection area, the RSSI value generally remained at -73 dBm, which manifests that a human body can cause RSSI attenuation. The phenomenon can also happen near the 180th and 235th numbers. So, we conclude that at the moment when the human was moving or leaving the network area, the RSSI is unstable and we cannot be sure that the RSSI is reducing. However, there is an exact attenuation when the person stays quietly in the area. Anyway, either the RSSI value increases or decreases, we can observe the moving person by the increasing variance.Figure 2
The effect of using real-time RSSI references.The whole process of the human detection method is mainly shown in Algorithm2. RSSI values are filtered by the Intermittent Kalman algorithm at the beginning, and then, the value of RSSI offset can be obtained from the quantities of the experiment. We get the current RSSI and process it by the RSSI preprocessing algorithm and calculate the variances of processed RSSI values. Then, we can judge whether the human appears or not by the calculated variance.Algorithm 2: Human detection.
Input:Xt−1: the estimated value of RSSI at time t−1.Output:Res: human body detection result1:function Kalman_filterXt−1,Pt−1,Zt2:X^t∣t+1=AX^t∣t3:Pt+1∣t=APt∣tAT+Q4:Kt+1=Pt+1∣tHTHPt+1∣tHT+R−15:Xt+1∣t+1=X^t+1∣t+γt+1Kt+1Zt+1−HXt+1∣t6:Pt+1∣t+1=Pt+1∣t−γt+1Kt+1HPt+1∣t7:returnXt,Pt8:end function9:function RSSI_preprocessingRSSI_offset,val,val_new10:i←val11:j←val_new12:result←013:ifj−i<RSSI_offsetthen14:result←i15:else16:result←j17:end if18:returnresult19:end function20:function Human_judgement(Array,Ref)21:i←X22:k←023:count=lengthArray24:avg←025:result←026:fori=0→countdo27:avg=avg+Arrayi28:end for29:avg=avg/count30:fori=0→countdo31:k=k+Arrayi−avg∗Arrayi−avg32:end for33:k=k/count34:ifk<Refthen35:result←036:else37:result←138:end if39:returnresult40:end function


## 2.1. Real-Time Link Quality Estimation Method

The real-time wireless link considered in this paper is dynamic and time-varying. If the PRR is calculated according to the success rate of each data reception, the error is large and cannot estimate the link quality. This paper uses an exponential smoothing method [22], which is a common sequence data processing method. It takes into account the role of past data and uses the concept of weight to consider the degree of data impact. Window sliding average processing is now performed on the observed data.The observation data sequence moves on the window that can hold 100 data, and the observation data corresponding to the window center is updated for the window moving on data series, which named window sliding average. In theT time, the number of transmitted data packets is N=100, and the number of successfully received data is m, which is obtained by the exponential smoothing method:
(1)PRRnT=1−aYnT+aPRRn−1T,where PRRnT is the current PRR prediction, PRRn−1T is the last prediction, YnT reflects the PRR measurement of the n-th window time, which is m/N, N=100, so YnT is a fraction less than 1, and also a is a number of 0,1. We can see from the model, the bigger a is, the more weight is given to the last prediction PRRn−1T. On the contrary, the lower a is, the more weight is given to the most recent observation YnT.Since the PRR is a number less than 1, we take the third digit after the decimal point to improve the accuracy and simplify the calculation. LetPnT=1000PRRnT, Equation (1) can be changed to
(2)PnT=10m1−a+aPn−1T.According to Equation (2), the value of the smoothing constant a is the key to obtaining the PRR.Now, we use the RSSI value received by the receiving node to determine the value ofa. The RSSI value can reflect the link quality under certain circumstances. For example, the RSSI is generally stable at around -60 dBm in an unmanned laboratory environment, and in this case, the PRR tends to be relatively high and stable. When a human was moving into the network area, the RSSI will fluctuate greatly and the attenuation can reach -85 dBm; the PRR tends to decrease and be unstable.So the value ofa can be recalculated as a′, which is expressed as
(3)a′=a,σ2nT≤σ02,RSSIavgnT−RSSIavg≤RSSI_offset,a−r,σ2nT≤σ02,RSSIavgnT−RSSIavg>RSSI_offset,a−r,σ2nT>σ02,where r is the influence of the RSSI value on a; σ2nT is the variance of RSSI for the n-th window time; σ02 is the variance of the measured RSSI values in unmanned environment, the average of RSSI for the n-th window time is RSSIavgnT, and RSSIavg is the average RSSI value in the unmanned environment; and RSSI_offset is found empirically by sending a large amount of packets in the unmanned environment.When using Equation (2), the initial value PT should be determined and obtained. Through a large number of statistical data analysis, RSSIavg, the variance σ02 and PT are set. The RSSI value is above the threshold and fluctuates at RSSIavg in a small range in the unmanned environment. The network link quality is relatively stable. a can be obtained through a large number of statistical data in the unmanned environment and by calculating the average and variance of RSSI values over the window time; and the value is very close to 1. a′ is obtained from packets in the case of interference, and the value is close to 0.


## 2.2. Detection Algorithm

Packet loss is observed to be a familiar phenomenon with transmissions of WSNs. Frequent undesired packet loss seriously degrades the network performance. The real-time link quality estimation method mentioned in Section2.1 can be used to observe the PRR of each window time. The detection result is set to be invalid when the PRR at one time is low. So data dropout in transmission should be considered. In this paper, the Intermittent Kalman filter algorithm [23] is used to estimate the lost RSSI values and further to realize detection.Owing to the existence of measurement error, the measured RSSI valueZk,k=0,1,⋯,m fluctuates randomly within a narrow range near the actual RSSI value Xk, namely, Zk−λ/2≤Xk≤Zk+λ/2, and the measurement precision is determined by constant λ. Gaussian random noise is considered in this experiment and filtered by the Intermittent Kalman algorithm to obtain the real RSSI value [24]. The system of RSSI equations can be described as
(4)Xk=Xk−1+Wk−1,Zk=Xk+Vk,where Xk is the estimated value of RSSI at time k; Zk is the measured RSSI value; Wk−1 is Gaussian random noise of system; Wk−1∼N0,Q, where Q is the variance; Vk is Gaussian random noise of measurement; and Vk∼N0,R, where R is the variance.Q and R should be known, and the values have direct influence on the algorithm. The values need to reset with the changes of the environment. In this paper, online learning is used to set the value of Q and R, which are the learning abilities. The values of RSSI are adopted as the training inputs enabling the algorithm to automatically and timely adapt to the environmental dynamics. Assume there are N arbitrary distinct training samples xi,yi,i=1,2,⋯,N, where X are the training inputs and Y are the training targets; we consider a loss function ly,y^=y∧−y2 that measures the cost of predicting y^ when the actual answer is y. The ultimate goal is to minimize the cumulative loss suffered along its run. And there is a correlation between the past and present when environment changes.We consider this problem as a discrete time system; the uncertainty arises mainly because of packets dropout in the network, which leads to the randomness of receiving observations. Data loss can be described by a random variable which obeyed Bernoulli distribution [25]. Firstly, a random binary variable γt is used to describe the observation at time t, γt=1 expresses the packet at time t received, and γt=0 expresses the packet at time t lost; the probability pγt1=λt,λt0≤λt≤1 is the arrival rate. γt at time t is mutually independent with γt at time s. The measured noise Vt can be defined as follows:
(5)PVt∣γt=N0,r,γt=1,N0,σ2I,γt=0,when γt is equal to 1, the variance of Vt is R; when γt is 0, the variance of Vt is σ2I, and the value of σ2 is arbitrary. In reality, the corresponding observation value cannot be obtained when the packet loss happens, so σ→∞. Now, we use a virtual observation to replace the actual value that has been lost with the given variance σ2, and let σ→∞. Then, the Kalman filter equation can be calculated as follows:
(6)X^t∣t+1=AX^t∣t,(7)Pt+1∣t=APt∣tAT+Q,(8)X^t+1∣t+1=X^t+1∣t+Pt+1∣tHTHPt+1∣tHT+γt+1R+1−γt+1σ2I−1Zt+1−HX^t+1∣t,(9)Pt+1∣t+1=Pt+1∣t−Pt+1∣tHTHPt+1∣tHT+γt+1R+1−γt+1σ2I−1HPt+1∣t,where X^t∣t is the estimate value of RSSI, A is a unit matrix, and H is a unit matrix. If σ→∞, then, (8) and (9) are equivalent to the following two equations:
(10)Xt+1∣t+1=X^t+1∣t+γt+1Kt+1Zt+1−HXt+1∣t,(11)Pt+1∣t+1=Pt+1∣t−γt+1Kt+1HPt+1∣t,where Kt+1=Pt+1∣tHTHPt+1∣tHT+R−1 is the Kalman gain, which is the same as the traditional Kalman algorithm. Calculating Kt,t=1,2,⋯,P0∣0 should be known firstly. P0∣0=EX0−X^0∣0X0−X∧0∣0T. Actually, λt=1 is a kind of ideal state. When λt=0, Equation (8) degrades into the traditional Kalman algorithm.Data loss means we cannot obtain the current RSSI value; for example, the average RSSI value is about -60 dBm in nobody environment in the laboratory. The RSSI value will be extracted as 0 dBm if data loss happened at that time. Therefore, the intermittent Kalman filter algorithm is adopted to avoid the error caused by packet loss.The effect of Intermittent Kalman filtering when packet loss happens during transit is shown in Figure1. There are some data losses in 250 packets sent by the transmitting node, and the RSSI value is extracted as 0 dBm. However, RSSI curve becomes smooth after being filtered. We also find that the fluctuation can reach 15 dBm from real data, which may neutralize the effect of human body and further impact the experiment results. But after being filtered, the maximum RSSI fluctuation of every moment is less than 1 dBm compared with the previous moment. So Intermittent Kalman can in some degree filter fluctuation caused by environmental changes, the performance of sensor nodes, indoor obstacles, and measurement errors.Figure 1
The effect of RSSI data filtered by the Intermittent Kalman algorithm.Recent research has shown that variations of RSSI in indoor environments where sensor nodes have been deployed can reveal movements of persons [26]. The detection method proposed is mainly based on the human body interfering with RSSI by causing fading and shadowing effects.In our earlier works, we compute the average RSSI value in nobody environment; however, we find that average RSSI value laboratory may change by many factors, the performance of WSN nodes, the temperature, humidity of the surroundings, and so on. And when lab students work over their office desk, the values can be obviously different with the value in nobody context, regardless of those persons sitting in or out of the detection area. Especially, while the experiment is ongoing, some persons come in or go out of the lab even out of the detection area which may cause the average RSSI value in nobody environment meaningless. So, we take the change of the lab environment into account in this detection experiment.Owning to the existence of multipath effect, scattering, reflection, obstacle, and other interference factors in the lab, a real-time RSSI reference should be set as shown in Algorithm1. RSSI fluctuates within a narrow range in an unmanned environment, and RSSI offset can be found empirically by sending a large amount of packets. When the current RSSI value is obtained, we compare it with the last RSSI value. If the difference is greater than the RSSI offset, we set the current RSSI as reference. Otherwise, the last value is still the RSSI reference.Algorithm 1: RSSI preprocessing algorithm.
#define RSSI_offset     The threshold value setvar value;          The last RSSI value receivedvar value_new;       The current value obtained11 |value_new-value|<RSSI_of f setreturn value;elsereturn value_new;We can see from Figure2 that a person enters into the network area at the beginning, and the RSSI value obviously decreases about high to 8 dBm. The person leaves at about the 30th data number, and the RSSI value is up to -65 dBm at the moment but reaches a stable level of -68 dBm. A human comes in the area near the 50th number; however, there is a sharp increase rather than a decrease of the RSSI value. Until the person keeps quiet in the detection area, the RSSI value generally remained at -73 dBm, which manifests that a human body can cause RSSI attenuation. The phenomenon can also happen near the 180th and 235th numbers. So, we conclude that at the moment when the human was moving or leaving the network area, the RSSI is unstable and we cannot be sure that the RSSI is reducing. However, there is an exact attenuation when the person stays quietly in the area. Anyway, either the RSSI value increases or decreases, we can observe the moving person by the increasing variance.Figure 2
The effect of using real-time RSSI references.The whole process of the human detection method is mainly shown in Algorithm2. RSSI values are filtered by the Intermittent Kalman algorithm at the beginning, and then, the value of RSSI offset can be obtained from the quantities of the experiment. We get the current RSSI and process it by the RSSI preprocessing algorithm and calculate the variances of processed RSSI values. Then, we can judge whether the human appears or not by the calculated variance.Algorithm 2: Human detection.
Input:Xt−1: the estimated value of RSSI at time t−1.Output:Res: human body detection result1:function Kalman_filterXt−1,Pt−1,Zt2:X^t∣t+1=AX^t∣t3:Pt+1∣t=APt∣tAT+Q4:Kt+1=Pt+1∣tHTHPt+1∣tHT+R−15:Xt+1∣t+1=X^t+1∣t+γt+1Kt+1Zt+1−HXt+1∣t6:Pt+1∣t+1=Pt+1∣t−γt+1Kt+1HPt+1∣t7:returnXt,Pt8:end function9:function RSSI_preprocessingRSSI_offset,val,val_new10:i←val11:j←val_new12:result←013:ifj−i<RSSI_offsetthen14:result←i15:else16:result←j17:end if18:returnresult19:end function20:function Human_judgement(Array,Ref)21:i←X22:k←023:count=lengthArray24:avg←025:result←026:fori=0→countdo27:avg=avg+Arrayi28:end for29:avg=avg/count30:fori=0→countdo31:k=k+Arrayi−avg∗Arrayi−avg32:end for33:k=k/count34:ifk<Refthen35:result←036:else37:result←138:end if39:returnresult40:end function


## 3. Experimental Results

This section presents the experimental results obtained with the method described in the previous parts.WSN consists of a large number of small sensor nodes with sensing, processing, and communicating abilities. Sensor nodes communicate with the coordinator directly in a typical WSN network. The communication speed of WSN nodes is 2.4 Kbps, and 2.4GHz is used to do tests. There are about 24 bytes being sent every second, and the transmit power is set as 0 dBm. Figure3 shows the photos of the WSN coordinator (a) and sensor node (b).Figure 3
(a) Photo of WSN coordinator. (b) Photo of WSN sensor node.
(a)(b)The testing area is3m∗3m and layouts of nodes as shown in Figure 4. In order to highlight the human body affection, we do the following work before the start of the experiment.
(1)
The power of all the sensor nodes is in sufficient supply(2)
The sending and receiving node antennas apply the invertedF antenna of PCB, and antennas are right and parallel while doing human detection tests(3)
There is no other wireless signal interference close to the experimental frequency in the experimental labFigure 4
Network layout and equipment.The validation of the network real-time link quality evaluation method is verified through an experiment. 1000 packets are used, and each 100 packets are divided into a group. The statistical parameters of each group are shown in Table1. Compared with RSSIavg and σ02, the value of a is determined according to Equation (3), and then, the PRR is calculated for each window according to Equation (2).Table 1
Experimental statistical parameters.
GroupmRSSIavgnT (dBm)σ2nTPRRnT (%)189-82.20814.0157889.3295-83.71112.4556895.43396-81.9434.5618295.84488-86.7045.3843088.78576-83.09218.6494177.28640-92.2379.3998443.73794-86.00539.9654088.97870-86.42125.5831165.90998-85.8060.33486194.791080-86.40.31541181.48We can see from Table1 that the obtained PRRnT of each window is dynamic and very different from each window. When the human body is existing, the network is shown to be unstable and PRR tends to decrease. Then, the weight of real-time measured values should be increased in the estimation method which shows the real-time performance. The PRR of group 6 and group 8 are 43.73% and 65.9%, respectively, which means a substantial amount of dropped packets. If a person object goes into the network area during this time, it cannot be detected. So real-time monitoring link quality can effectively guarantee the accuracy of human detection.This method can monitor network link quality in real time, and its validity and feasibility are proved by an experiment. Real-time estimation of link quality is very important in a human body detection experiment. If the PRR is too low in a certain period of time, the RSSI value cannot be obtained because of packet loss, which directly affects the accuracy of the detection experiment. PRR can be calculated by this method in real time and used for detection.The test scenario is the following: no humans are present in the lab at first; therefore, no detection is reported. Once a human subject enters the network area, he goes through for 7 times. We can see seven relatively large fluctuations in Figure5. During the test, 250 packets have been received by sensor nodes.Figure 5
Network layout and equipment.Figure6 shows the result of one detection test; when a human goes into the network area, the RSSI experiences a rapid change. And there are separately seven parts with variance greater than 0 in Figure 6, and each part indicates there is someone entering into or getting out of the detection area. So the detection method proposed in Section 2 can detect a moving human effectively and accurately. Mainly because of the human body’s absorption and reflection effects, the variations of RSSI are quite satisfactory for accurate human presence detection.Figure 6
The result of detection test.The second experiment is performed to obtain the detection accuracy. We firstly do tests for 100 times by changing the location of the transmit and receive nodes, and the detection accuracy of the proposed method is around 95%, in total. Then, a number of sensor nodes are changed, and we do tests for 50 times; the accuracy is around 92%, in total. The detection accuracy is high; human presence can be detected no matter how close to the sending or receiving node. And each pair of nodes has their own detectable area. The solution to improve the accuracy in a larger detectable area is to install l additional node.


## 4. Conclusions

In this paper, a device-free human body detection method by RSSI is present. In view of the common phenomenon of packet loss in transmission of WSN, a real-time network link quality estimation method is proposed, which can not only overcome the delay caused by statistical PRR but also consider RSSI vulnerability to environmental impact. And the Intermittent Kalman filter algorithm is adopted to filter RSSI data, which improves the accuracy of detection. Compared with other conventional detection methods, the human body does not need to carry any equipment, and sensor nodes do not need to add external sensors. So this method is easy to implement and low cost. Of course, some flaws still exist during our experiment process. Such experiments mentioned above were operated in a spacious and obstacle-free room; the experiment results reflect just one idealized application environment.For more practical consideration, we should conduct experiments in heavily obstructed environments. The attenuation of the radio signal is usually strong. This decreases the transmitting range of the nodes and the packet delivery ratio. A future work will try to find solutions to improve the detection accuracy of the system by further improving the detection algorithm. Multiple sensor nodes will be adapted to realize accurately and tract the movements of a person in a monitored area. In a critical three-dimensional indoor environment, more than a single person should be detected inside the monitored area of the system correctly.



---

*Source: 4758103-2020-09-21.xml*