Speed Estimation Using Commercial Wi-Fi Device in Smart Home

2021-07-19 06:08TIANZengshanYEChenglinZHANGGongzhuiHEWeiJINYue
ZTE Communications 2021年2期

TIAN Zengshan, YE Chenglin, ZHANG Gongzhui, HE Wei, JIN Yue

(Chongqing University of Posts and Telecommunications,Chongqing 400065,China)

Abstract:With the development of Internet of Things (IoT),the speed estimation technology has attracted significant attention in the field of indoor security,intelligent home and personalized service.Due to the indoor multipath propagation, the speed information is implicit in the motion-induced reflected signal.Thus, the wireless signal can be leveraged to measure the speed of moving target.Among existing speed estimation approaches, users need to either carry a specialized device or walk in a predefined route.Wi-Fi based approaches provide an alternative solution in a device-free way.In this paper, we propose a direction independent indoor speed estimation system in terms of Electromagnetic (EM)wave statistical theory.Based on the statistical characteristics of EM waves, we establish the deterministic relationship between the Autocorrelation Function (ACF)of Channel State Information (CSI)and the speed of a moving target.Extensive experiments show that the system achieves a median error of 0.18 m/s for device-free single target walking speed estimation.

Keywords: CSI; speed estimation; electromagnetic wave; direction-independent; autocorrelation function

1 Introduction

Speed estimation systems are appropriate for many emerging smart applications (e.g., human identification and home security).In recent years, significant efforts have been made to explore the indoor device-free speed estimation with fine-grained Channel State Information (CSI).Compared with traditional speed estimation techniques, such as vision[1], floor sensors[2]and wearable sensors[3], the following difficulties need to be overcome.Firstly, vision-based schemes are easily to be sheltered by obstacles,which can only work in Line-of-Sight (LoS)environment, and its performance will reduce under dim light or dark conditions, while a potential privacy issue occurs as well.Secondly, the wearable sensor-based approaches require user’s positive cooperation,which reduces the user experience and causes inconvenience.However, Wi-Fi based schemes are not affected by obstacles and light conditions, which not only provide a solution with larger coverage and better privacy protection but also can realize indoor device-free speed estimation.

Existing Wi-Fi based systems achieve speed estimation by extracting the motion-induced reflection path using CSI.WiFiU[4], measures the changing rate of reflected path length to extract gait pattern, but users are usually required to walk along a predetermined route.On the other hand, based on 2D-Frenel zone model, WiDIGR[5]further eliminates the influence of moving direction but multiple transceiver links are used, which limits the application of speed estimation system.WiWho[6]distinguishes characteristics of different people to achieve walking gait extraction in the training process where per-person gait signatures are built.These systems either require a time-consuming training process or require users to walk in a predefined route.

In this paper, we propose a Wi-Fi based direction-independent speed estimation system, which avoids redundant training process and other machine learning algorithms like Ref.[7].Fig.1 shows an application scenario of the system.Firstly,based on the statistical theory of electromagnetic field,we analyze the relationship between the electromagnetic (EM)wave and human motion theoretically.Then, a speed estimation model based on the autocorrelation function (ACF)of electric field power is derived from the statistical characteristic of angular spectrum.Next,since the information of electromagnetic field is difficult to measure, we further adapt ACF of CSI power to characterize speed information.Finally, an Automatic Multi-scale Peak Detection (AMPD)algorithm is proposed to extract the moving speed from ACF.Fig.2 shows the system framework.

The main contributions of this paper are summarized as follows.

1)Based on the statistical theory of electromagnetic field, we analyze the influence of moving objects on ACF of EM wave,which provides a theoretical basis for the model establishment.

2)We replace the ACF of EM wave with channel power response ACF to eliminate the interference of moving direction.An improved peak detection method is further proposed to extract true speed from ACF.

3)We conduct extensive experiments on commodity Wi-Fi devices in a typical indoor environment with one pair of transceivers.Experimental results show that our proposed speed estimation system achieves a mean absolute error of 0.18 m/s for device-free human walking speed estimation, which is enough in smart home environments.

The rest of this paper is organized as follows.Section 2 introduces the statistical theory of EM waves in indoor environment.Section 3 constructs a speed estimation model by studying the ACF of CSI power.The analysis of experimental results are shown in Section 4.Section 5 concludes this paper.

▲Figure 1.Application scenario of the system

▲Figure 2.System overview

2 Preliminary

2.1 Equivalent Model of Indoor Multipath Propagation

Since the EM waves can be absorbed and scattered by walls, doors, windows, moving objects, etc., radio propagation inside buildings is very difficult to analyze.However, in indoor buildings, EM waves can be approximated as plane waves with obvious electric field statistical characteristics[8],such as uniform distribution of direction of arrival, polarization and phase.Therefore, the multipath propagation of the wireless signal in indoor environment can be equivalent to the radiation of electric field.

Fig.3 shows the equivalent model of indoor multipath propagation.In the indoor environment,the signal arrives at the receiver through different paths,including one LoS path,several static reflected paths, and other dynamic reflected paths.In the reverberation chamber, in order to study the influence of target motion on the EM wave, the human can be regarded as an infinite number of scatterers,which can reflect the incident EM wave in all directions.In practice, the transceivers are equipped with an omni-directional antenna, and according to the electric field superposition principle,the received electric field can be decomposed into the sum of the electric fields contributed by all scatterers.

whereare the sum of the electric fields contributed by the static and dynamic scatterers, respectively.Ωd(t)denotes the set of dynamic (moving)scatterers.

As the received electric field is a vector,it is very difficult to measure and analyze its characteristics at the receiver.Since the power of the electric field is quantitatively equivalent to the power of the channel frequency response (CFR)of commercial Wi-Fi devices[9], the power of CFR can be expressed as:

whereH(t,f)is the CFR.By measuring the change in CFR power instead of the phase of CFR, we can safely ignore the phase noises introduced by Carrier Frequency Offset(CFO)[10].

2.2 Statistical Theory of Angular Spectrum

In a relatively short time, the signal will experience the same channel fading in the transmission process according to the channel reciprocity theory.In order to explore the transmission process of EM wave in space, we first analyze the distribution of electric field in a two-dimensional plane, and then extend it to three-dimensional space.The influence of the moving target on the electric field of the receiver can be characterized as the transmission process of the EM wave angular spectrum.Because the complex amplitude of the electric field and the EM wave angular spectrum are Fourier transforms of each other, we further explore the statistical characteristics of the EM field angle spectrum to establish the speed estimation model.

Since the EM waves are spherical waves, we first study the distribution of EM waves on the plane using the surface integral theory, and deduce the complex amplitude of plane electric field.The motion of human will affect the propagation of plane wave angular spectrum.The complex amplitude of electric field is usually represented by the propagation of angular spectrum.Therefore, the propagation of angular spectrum in space is analyzed firstly.As shown in Fig.4a, a series of EM waves are projected on thez1=(x,o,y)plane along the axis.According to the superposition principle of electric field, the complex amplitude of electric field can be regarded as a linear superposition of infinite plane components,written as

▲Figure 3.Equivalent model of indoor multipath propagation

▲Figure 4.Propagation of angular spectrum

whereUz(x,y,z1)is the complex amplitude of electric field,andAz(u,v,z1)is called the angular spectrum ofUz(x,y,z1).uandvare the spatial frequencies of the plane wave components respectively, whereu=cosα/λandv=cosβ/λ.cosαand cosβare called directional cosines of plane waves, whereαandβare called the direction angles, which represents the direction of signal transmission.Then,we can get

According to the superposition principle of waves,any complex wave can be expressed as a linear combination of plane wave and spherical wave.They both satisfy the wave equation because they are the basic solutions of wave equation[9].TakingUz(x,y,z1)into Gibbs-Helmholtz equation

where the symbol ∇is Hamiltonian operator andk=2πf/cis wave number.fis the frequency of the wave, andcis the speed of light.The solution of the above equation can be obtained as

If cos2α+cos2β<1, the following conclusions can be obtained.

1)When the plane wave propagates along a certain distancez, only a certain phase shift will be introduced and the amplitude is a constant.

2)The distance between the different components of the plane EM wave to the receiver is related to its propagation direction and the resulting phase shift is also related to the propagation direction.

3)In the propagation of angular spectrum, its phase changes with the direction angle, while its amplitude will not.The spatial frequency of angular spectrum is inversely proportional to its phase delay.

If cos2α+cos2β=1,we have

Eq.(7)shows that when the propagation direction of plane wave component is perpendicular to thezaxis, and there is no energy propagation along thezaxis, which means the component without contribution to the angular spectrum along thezaxis.

Eqs.(8)and (9)show that the component of the angular spectrum decays exponentially with the increase of the propagation distanced,and will decay to zero in the distance of several wavelengths.

In practice, the received EM wave will radiate in all directions.According to Eq.(7), no energy will propagate along thezaxis.Thus, we can establish a space rectangular coordinate system with thezaxis as the speed direction.

As shown in Fig.4b,A→(α,β)represents the angular spectrum of the plane EM wave, which is used to characterize the complex amplitude of the electric field.k→represents the wave number vector in free space, where its amplitudekrepresents the wave number, and its phase represents the propagation direction of the wave.The relationship between the wave number vector and the direction cosine is as follows

According to the principle of vector field decomposition,the angular spectrum can be decomposed into two parts

In the reverberation chamber, EM wave can be seen as the plane wave.Because the plane wave satisfies Maxwell equations, the complex amplitude of electric field expressed in Eq.(13)also satisfies Maxwell equations.For a spherical wave, Eq.(13)is a complete and strict expression of plane wave expansion.However, for an aspheric wave, the expansion of plane wave can start from a spherical wave and be extended analytically based on a certain sphere[8].

Angular spectrum can be deterministic or stochastic.Due to the uniform distribution of the direction of arrival, polarization and phase of plane EM wave, the angular spectrum of EM wave can be regarded as a random variable.In indoor multipath environment,the statistics of received electric field are generated by the multipath and reflection of wireless signal in the process of propagation.The statistical characteristics of angular spectrum can represent the statistical characteristics of electric field in a complex indoor environment.

Because the angular spectrum can be regarded as a series of rays with random phase, its orthogonal components will obey Gaussian distribution according to the central limit theorem[9].Due to multipath propagation, the angular spectrum component with orthogonal phase is uncorrelated and its expectation is zero.

Due to the real part and the imaginary part of angular spectrum is a constant, its mathematical expectation can be expressed as

where C is a constant.Based on Eqs.(14)and(15),two important relationships can be derived.

where ( · )*is conjugate operation.These two relationships will be leveraged to calculate the ACF of signal power.

3 Speed Estimation Model

3.1 Channel Frequency Response Autocorrelation Function

The electric field at the receiver can be regarded as the superposition of a large number of plane waves with uniformly distributed arrival direction, antenna polarization and phase.Therefore, the angular spectrum can be considered as a random variable with following assumptions:

1)For any (α,β), bothAα(α,β)andAβ(α,β)are circularly symmetric Gaussian random variables with the same variance and they are statistical independent[11].

2)For each dynamic scatterer, the angular spectrums from different directions are not correlated,statistically.

3)For two momentst1,t2and different dynamic scatterersi1,i2∈Ωd,are statistically independent.

The rationality of Assumption 1 lies in the fact that the angular spectrum is superimposed of many rays bouncing with random phases and thus can assume that each orthogonal component ofA→(α,β)tends to be Gaussian under the central limit theorem.

For Assumption 2, because the angular spectrum components corresponding to different directions will result in multiple uncorrelated scattering paths, thus, these angular spectrum components can be assumed to be uncorrelated.Meanwhile,Assumption 3 results from the fact that the CFR is statistically uncorrelated if the transmission distance difference larger than half a wavelength, and the electric fields contributed by different scatterers can thus be assumed to be uncorrelated[12].

Next, we analyze the CSI power autocorrelation function.Since the expectation of the angular spectrum is zero, the expectation of the complex amplitude of the received electric field is also zero.

The mean square value of the electric field is directly proportional to the energy density of the electric field,so it is very important to learn the statistical characteristics of the electric field.According to Eq.(18), the expectation of electric field mean square value is

Eq.(20)shows that each component of the electric field in an ideal space is the same, which provides theoretical bases for the following study.Based on the above assumptions, the ACF of the electric field can be defined.The received electric field of the reflector can be regarded as a stationary random process with respect to timeT.The Pearson ACF of the received electric field at different times can be written as

whereE[X,Y]≜E[X·Y*].According to Eq.(19), the denominator ofρU→(τ,f)isU20.From Eqs.(19)and (21), the ACF can be further deduced as

Eq.(22)shows that the essence of the electric field ACF is a sinusoidal attenuation caused by the motion of the scatterer,and it will decay to zero in a few short wavelengths.The importance of the formula is that the speed information of a single reflector can be derived from the ACF of the received electric field,and the direction of the reflector has no effect on ACF.

3.2 Speed Estimation Algorithm

From Eq.(22), it is very simple to estimate the speed of a single reflector out of the ACF.However, it is difficult to measure the electric field and analyze its ACF.As mentioned above, the power of the electric field can be equivalent to the power of CSI.

In order to extract speed information from CSI power, the ACF of CSI power is adapted.According to Ref.[9], the ACF of CSI power can be expressed as

whereγG(τ,f)represents the auto-covariance function,Tis the number of samples,and(f)is the sample mean.

For a Wi-Fi system with bandwidth of 40 MHz and carrier frequency of 5.805 GHz, the difference in wave numberkof each subcarrier can be neglected.According tok=2πf/c, the maximum EM wave number can be calculated askmax=122.36, and the minimum iskmin=120.68.Thus, we can get∀f,ρ(τ,f)≈ρ(τ).Meanwhile, in a short time interval,can be approximated as:

whereris the solution of equation= 0.Since the equation has no closed solution, the second smallest solutionr=0.54λis taken as the solution of the equation.The specific algorithm implementation is shown in Algorithm 1.

3.3 Automatic Multi-Scale Peak Detection Algorithm

The key of speed estimation is to identify the first local peak point of ACF.The traditional peak detection method cannot be adapted to the waves with multiple local peak values,which will lead to the misjudgment of the first peak point in the local scope.Therefore, we design an automatic multi-scale peak detection algorithm to solve this problem, which can maintain a high estimation accuracy when there are multiple local peak values for time-varying waveforms.

The basic principle of AMPD algorithm is to use the local maximum of the signal to detect the peak of all signals.LetX=[x1,x2,...,xN]represent the ACF of each sampling time in a moving window.Firstly, we calculate the Local Maxima Scalogram (LMS)the linear detrending of the signal.Then, the local maximum of the signalXis determined using a moving window whose lengthwφsatisfies {wφ=2φ|φ=1,2,...,L},whereφis theφ-th scale andL=[N/2]- 1, and [x] is the ceiling function that gives the smallest integer not less thanx.This is realized for every scalekand fori=φ+2,...,N-φ+1,according to

whereris a uniformly distributed random number in the range[0,1],αmis a constant factor and is usually set as 1.Wheni=1,...,φ+1 ori=N-φ+2,...,N, the valuer+αcan be assigned tomφ,i.These operations of Eq.(30)result in the matrix:

The value of window lengthωkis contained in theφ-th row of the matrix.All elements in matrixMare in the range of[0,αm+1],and matrixMis the LMS of signalX.

The second step of the algorithm calculates the sum of each row of the LMS matrix:

The vector=[s1,s2,...,sL] contains the information about the scale-dependent distribution.The global minimum ofS→isμ, i.e.,μ=arg min(sφ), which represents the scale with the largest local maxima.The valueμwill be used in the third step of the algorithm to reshape the LMS matrix by removing all elementsmφ,isatisfyφ>μ, leading to a new matrixMr=(mφ.i)of sizeμ×N.

Finally, the AMPD algorithm detects the peak value by calculating the column standard deviationσiof the matrixMr:

When the indicesisatisfyσi=0 , we store them in a vector=[p1,p2,...,pN], whereprefers to the indices of the detected peaks.Therefore, the sampling point in the matrix that satisfies its column standard deviationσi=0 can be considered as the peak point.

4 Experimental Results

4.1 Experimental Environment

We collect 50 sets of data from two volunteers to validate the performance of our proposed system.The walking route is shown in Fig.5.

The transmitter and receiver consist of two mini-PCs with one Intel 5300 NIC.The PCs are installed with 64-bit operating system of Ubuntu10.04.Specifically, one PC equipped with an external antenna works as transmitter, while the other with three works as receiver.The original CSI data is obtained through the open source tool Linux 802.11n CSI tool.The detailed installation process is shown in Ref.[5].Our system works on Channel 149 at 5.745 GHz band and the packet transmission frequency is 1 000 Hz.At the same time, the transmitter is set to the injection mode and the receiver is set to the monitor mode.

▲Figure 5.Illustration of walking direction

The data collection is described as follows.Firstly, for single target speed estimation,we collected CSI data of two different volunteers walking on different routes with a consistent speed of 1 m/s respectively to analyze the influence of movement direction, and 50 samples are collected for each walking direction.Next, in order to further explore the influence of the moving targets number on the estimated results,we collect data of two, three and four volunteers walking on different routes, where one target walks along predefined routes and others walk randomly in the area as miscellaneous targets.In the experiment, we obtain ground truth via accelerometerbased solution.Specifically, a smartphone with accelerometer is installed on each tester’s ankle to capture true speed measurement.

4.2 Analysis of Results

Since the theoretical assumption is feasible in a short time,in the step of the speed estimation algorithm, the maximum time intervalτis set as 0.2 s.The ACF of a sample is calculated every 0.05 s.As known for all,human walking is a periodic motion.Fig.6a is an estimation result of walking speed,which shows a clear periodic acceleration and deceleration motion pattern.Although there are a large number of outliers in the original speed estimation,a Kalman filter can be applied to obtain a smoothed speed curve.In order to avoid the influence of external factors on the results in the process of data collection,the first second and last second data are set to zero.Meanwhile, Fig.6b shows the relationship betweenand moving speed.We choose four different time to calculateand the corresponding moving speed with different colors.We can conclude that although the ACFs are very different,the locations of the first peak ofare highly consistent as long as the ACFs are calculated under similar walking speed.For each different sampling time in speed estimation,it can be calculated that thewithin 0.2 s, then we can get the first peak point inwhereτ1=0.030 s (orange),τ2=0.033 s (purple),τ3=0.024 s (green),τ4=0.029 s(blue), and the corresponding speed values arev1=0.93ms,v2=0.84ms,v3=1.16ms,v4=0.96ms.

▲Figure 6.Speed estimation results

Then,we verify the direction-independence of our speed estimation system.Fig.7a shows the median error of speed estimation in different direction.From the figure, it can be seen that our proposed system achieves a mean absolute error of 0.18 m/s for device-free human walking speed estimation.Moreover, our proposed system achieves a consistent error among different walking directions with the minimum error as 0.3 m/s and maximum error as 0.35 m/s (Volunteer 2 in 90°),which is enough in smart home environments.

▲Figure 7.Median errors of speed estimation in different direction

Finally,we verify the influence of the number of moving targets in the environment.Fig.7b shows the median error of speed estimation when there are multiple targets walking in the area.From the figure, it can be seen that the median error of speed estimation reaches 0.77 m/s for two targets, 1.92 m/s for three targets and 2.75 m/s for four targets.This is because the speed of moving target is calculated with the first local peak point of ACF, and the target with larger speed will contribute more to the ACF components.Thus, the system will take the target with larger speed as the final estimation result when there are multiple targets walking in the environment,which will lead to a significant reduction in the estimation accuracy.

5 Conclusions

In this paper, we propose a direction-independent indoor speed estimation system based on commercial Wi-Fi devices,which can be used in many fields, such as indoor security and intelligent identification.The system is designed to estimate the speed of a single moving object in the environment.If there exist multiple moving objects within the coverage of system, it would capture the highest speed among the objects.Firstly, we analyze the relationship between the electric field power and the CSI power, and then introduce the related concepts of optical angular spectrum to derive the ACF of the EM wave angular spectrum.Secondly, based on the speed model of EM wave, we derive directional processing in existing systems and summarize the robustness of direction independence.Finally, the AMPD peak detection algorithm is used to extract speed information from ACF.A large number of experiments are carried out in a typical indoor environment.With low cost, strong robustness and good real time performance,our system provides a new idea for speed estimation with wireless sense applications especially in smart homme.