QGesture:Quantifying Gesture Distance and Direction with WiFi Signals.39:5 device,sound wave based solutions can provide distance measurement accuracy of a few centimeters [23,38]. Due to the weakness of sound energy reflected by hand,device-free gesture recognition solutions mostly use the Doppler effect,which only provides low-resolution speed measurements that cannot be used for fine-grained control over a long distance [11].Recent fine-grained tracking solution only works for a short distance of 50 cm [21,30].QGesture uses the similar phase based distances measurement algorithm as LLAP [30].However, our long-range WiFi gesture tracking system needs to handle the phase noises and interferences from nearby movements,which can be ignored in short-range sound-based systems. 3 SYSTEM MODEL In this section,we first present the theoretical model that quantifies the gesture movement distance and direction.We then discuss the noise sources that make CSI measurements from COTS devices deviate from theoretical models.Finally,we present methods to remove the CFO and SFO in CSI measurements so that we can measure the movement distance and direction using theoretical models. 3.1 Modeling Phase-Distance Relationship The magnitude and phase changes in CSI are closely related to the distance and direction of gesture move- ments.For simplicity,we first consider signals traveling through only two paths,i.e.,the Line-Of-Sight(LOS) path(path A)and the hand-reflected path(path B),between a pair of transmitter/receiver as shown in Figure 2. In theory,the resulting Channel Frequency Response(CFR)H(f,t)in CSI measured at time t can be represented as[29,34]: H(f.t)=aa(f.t)e(f,t)e() (1) where jis the imaginary unit with j2=-1,f is the frequency of the WiFi signal,aa(f,t)and aB(f,t)represent the magnitude attenuation and the initial phase in path a and B.As the path length of path A and B are different, their propagation delay tA(t)and rg(t)are also different as we have the relationship ra(t)=la(t)/c,where lA(t) is the length of path A and c is the speed of light. The CFR H(f,t)contains two components:one static component for path A and one dynamic component for path B,as shown in Figure 3.Furthermore,the magnitude of the static component of different pairs of antenna of different subcarriers is different as a result of different propagation delay and different carrier frequencies as showed in our Section 5.5.Note that the CFR H(f,t)is a complex value,where the real and imaginary part are called the In-phase(I)part and Quadrature(Q)part,respectively.Therefore,when we plot CFR in the complex plane,the CFR value at each time instance will be a vector and the end of the vector draws an I/O trace as time evolves.In case that the hand pushes towards the transmitter/receiver,the I/Q trace for a single subcarrier is an arc as shown in Figure 3.This is because when the hand moves,the vector for path A,which is a(f,t)ejf) is not changed as both the transmitter and the receiver remain static.The vector for path A is a static component. However,the vector for path B,which is ag(f,t)e(),significantly changes when the path length of lg(t) changes.When lg(t)reduces,the attenuation ag(f,t)only changes slowly and the phase (t)=-2mfrg(t)= -2flB(t)/c increases significantly.For WiFi signals at 5 GHz,the radio wavelength A=c/f is equal to 6 cm. Therefore,the phase for the vector corresponding to path B,which is o(t)=-2mlg(t)/A,will increase by 2 when lB(t)is reduced by the radio wavelength of 6 cm.By measuring the phase change Aog of the dynamic component,we can get the movement distance d as: △pB入 d=- 2aπ (2) Proceedings of the ACM on Human-Computer Interaction,Vol.1,No.4,Article 39.Publication date:March 2018.QGesture: Quantifying Gesture Distance and Direction with WiFi Signals • 39:5 device, sound wave based solutions can provide distance measurement accuracy of a few centimeters [23, 38]. Due to the weakness of sound energy reflected by hand, device-free gesture recognition solutions mostly use the Doppler effect, which only provides low-resolution speed measurements that cannot be used for fine-grained control over a long distance [11]. Recent fine-grained tracking solution only works for a short distance of 50 cm [21, 30]. QGesture uses the similar phase based distances measurement algorithm as LLAP [30]. However, our long-range WiFi gesture tracking system needs to handle the phase noises and interferences from nearby movements, which can be ignored in short-range sound-based systems. 3 SYSTEM MODEL In this section, we first present the theoretical model that quantifies the gesture movement distance and direction. We then discuss the noise sources that make CSI measurements from COTS devices deviate from theoretical models. Finally, we present methods to remove the CFO and SFO in CSI measurements so that we can measure the movement distance and direction using theoretical models. 3.1 Modeling Phase-Distance Relationship The magnitude and phase changes in CSI are closely related to the distance and direction of gesture movements. For simplicity, we first consider signals traveling through only two paths, i.e., the Line-Of-Sight (LOS) path (path A) and the hand-reflected path (path B), between a pair of transmitter/receiver as shown in Figure 2. In theory, the resulting Channel Frequency Response (CFR) H(f ,t) in CSI measured at time t can be represented as [29, 34]: H(f ,t) = aA(f ,t)e −j2π f τA (t) + aB (f ,t)e −j2π f τB (t) , (1) where j is the imaginary unit with j 2 = −1, f is the frequency of the WiFi signal, aA (f ,t) and aB (f ,t) represent the magnitude attenuation and the initial phase in path A and B. As the path length of path A and B are different, their propagation delay τA(t) and τB (t) are also different as we have the relationship τA(t) = lA(t)/c, where lA(t) is the length of path A and c is the speed of light. The CFR H(f ,t) contains two components: one static component for path A and one dynamic component for path B, as shown in Figure 3. Furthermore, the magnitude of the static component of different pairs of antenna of different subcarriers is different as a result of different propagation delay and different carrier frequencies as showed in our Section 5.5. Note that the CFR H(f ,t) is a complex value, where the real and imaginary part are called the In-phase (I) part and Quadrature (Q) part, respectively. Therefore, when we plot CFR in the complex plane, the CFR value at each time instance will be a vector and the end of the vector draws an I/Q trace as time evolves. In case that the hand pushes towards the transmitter/receiver, the I/Q trace for a single subcarrier is an arc as shown in Figure 3. This is because when the hand moves, the vector for path A, which is aA(f ,t)e −j2π f τA (t) , is not changed as both the transmitter and the receiver remain static. The vector for path A is a static component. However, the vector for path B, which is aB (f ,t)e −j2π f τB (t) , significantly changes when the path length of lB (t) changes. When lB (t) reduces, the attenuation aB (f ,t) only changes slowly and the phase φB (t) = −2π f τB (t) = −2π f lB (t)/c increases significantly. For WiFi signals at 5 GHz, the radio wavelength λ = c/f is equal to 6 cm. Therefore, the phase for the vector corresponding to path B, which is φB (t) = −2πlB (t)/λ, will increase by 2π when lB (t) is reduced by the radio wavelength of 6 cm. By measuring the phase change ∆φB of the dynamic component, we can get the movement distance d as: d = − ∆φBλ 2aπ , (2) Proceedings of the ACM on Human-Computer Interaction, Vol. 1, No. 4, Article 39. Publication date: March 2018