IEEE TRANSACTIONS ON MOBILE COMPUTING,VOL.XX,NO.XX,2020 13 -Movement tag-Touch tag -40 20 AZ9654 1.9cm 40 -60 2-50 10 9.3cm 100 200 300 Sample index Invalid Motiok Touch (a)Broadband stucture (b)RSSI variation of AZ9654 0g Fig.19.RSSI variation of tag AZ9654 during swipe the segment to the motion or touch module to identify the detailed command,as shown in Fig.2. Moreover,for the touch gesture detection,it is important 2 4 10 Time (sec.) to determine the reference RSSI value.The reference value is used to degrade effects of changing environmental factors. Fig.18.Signal variation during performing consecutive commands Theoretically,the range of the RSSI variation during the Note that,it is possible that there are several candidate posi- swipe is steady,it could be better to select the extreme values tions corresponding to the same RSSI value,considering the as the reference,but we cannot obtain the extreme value swipe is a continuous process,the position change should be before the user touches the tag.Considering the user's habit, coherent,so we select the one that lets the position change there usually exists a short pause when the user prepares to smooth and reasonable as the estimated result perform the touch gesture,so it is a basic idea to choose the 7.5 Touch or Motion:Segmentation and Identification stable RSSI value in the short pause.Note that,when the Last but not least,how to segment the received RF-signals finger hangs over the tag with different heights,the RSSI is a key issue during the practical operation.The above value has a small changing range of 1-2dB,so we need to system design of either the motion tracking or the touch update the template when detecting the non-outlier value gesture detection is based on the extracted segment of a beyond the range of the template for the higher accuracy. single command.But in fact,the consecutive signals contain several commands as well as invalid variations due to the 8 DISCUSSION multi-path effect,like a moving hand or a moving person The 2D motion tracking method can extend to the 3D tracking: around the tagged object.Hence,it is significant to segment The model of the rigid motion decomposition in Section 4.4 signals and extract clean signal segments for each valid can be rewritten for the 3D motion with the 3D translation command.Taking the tagged box in Fig.29,we first moved and rotation matrices.To realize the 3D motion tracking, hands around the object,then let it move on the table,after one more antenna orthogonal to the antenna pair in Fig.20 that we performed a swipe on the tag,the collected signals is required.The additional antenna can be deployed on the of one movement tag and one touch tag are illustrated ceiling to capture the signal change mainly along the vertical in the top two figures of Fig.18.It is observed that the direction.Also,to ensure there are always enough tags read motion mainly brings the phase variation and the touch by the reader antenna,more tags with different orientations causes obvious RSSI variation.While for the invalid hand should be attached on the tag,just like Tagball [16]. movement,both phase and RSSI values have slight fluc- The tag type has influence on the touch gesture recognition: tuations.The observation is consistent with Table 1.Thus, Not all kinds of tags can be used as the touch tag.For exam- we use these characteristics to segment signals and identify ple,the antenna of tag AZ9654 is in a broadband structure, commands,including invalid command,motion command,and its RSSI variation due to the swipe is totally different from touch command.The workflow is as follows: the n-wave observed with tag E51,as shown in Fig.19.Our 1)Calculate the differential coefficient (diff)of phase method is more suitable for the tag with meandered lines and extract the candidate segment.As the phase is more in the tag antenna,i.e.,E51,AZ9640 and AZ9662.Due to sensitive than the RSSI,we use the phase diff for segmenta- the different length of meandered lines and chip types,the tion.The signals with continuous non-zero phase diff values performance of different tag types differs,details are shown are the candidate valid command segment. in Section 9.3.Meanwhile,as the swipe along different lines 2)Calculate the feature vector for the segment.We on the tag could incur different RSSI variation patterns,to extract two features:range and standard deviation(std).As ensure the swipe can be performed along the same line,we shown in Fig.18,the motion and touch commands usually prefer the linear tag instead of the square tag. have the larger range and std values than the invalid hand The touch gesture detection module works as long as the touch movement.Thus,we calculate the range and std values of tag can be activated wherever the touch position is:For motion either phase or RSSI for each tag(movement tags and the tracking,we split the scanning area into two regions based touch tag)within the segment,and form a feature vector. on the relationship between tag movement and phase varia- 3)Classify the segment and identify the command,i.e., tion.However,the touch gesture detection relies on the RSSI invalid,motion or touch.With the feature vector,we classify deviation,it views the whole area as the same.As shown in the segment using the decision tree algorithm.The classifier Observation 3,as long as the touch tag can be activated only needs to be trained once in advance,and can be used wherever the touch position is,the touch method works. for any position or orientation of the tagged object within The operating area mainly depends on the smaller readable the monitoring area.The classifier is light-weight,and the range of movement tags and the touch tag.Empirically,the delay of classification can be ignored.If the segment is esti- maximum distances of movement tag AZ9629 and touch tag mated as caused by the motion or touch,the system inputs E51 in our settings are 1.8m and 2m,respectively.IEEE TRANSACTIONS ON MOBILE COMPUTING, VOL. XX, NO. XX, 2020 13 -60 -40 -20 RSSI Movement tag Touch tag 0 5 10 Phase -5 0 5 Phase diff 0 2 4 6 8 10 Time (sec.) 0 0.5 Phase std Motion Touch Reference value Invalid Fig. 18. Signal variation during performing consecutive commands Note that, it is possible that there are several candidate positions corresponding to the same RSSI value, considering the swipe is a continuous process, the position change should be coherent, so we select the one that lets the position change smooth and reasonable as the estimated result. 7.5 Touch or Motion: Segmentation and Identification Last but not least, how to segment the received RF-signals is a key issue during the practical operation. The above system design of either the motion tracking or the touch gesture detection is based on the extracted segment of a single command. But in fact, the consecutive signals contain several commands as well as invalid variations due to the multi-path effect, like a moving hand or a moving person around the tagged object. Hence, it is significant to segment signals and extract clean signal segments for each valid command. Taking the tagged box in Fig. 29, we first moved hands around the object, then let it move on the table, after that we performed a swipe on the tag, the collected signals of one movement tag and one touch tag are illustrated in the top two figures of Fig. 18. It is observed that the motion mainly brings the phase variation and the touch causes obvious RSSI variation. While for the invalid hand movement, both phase and RSSI values have slight fluctuations. The observation is consistent with Table 1. Thus, we use these characteristics to segment signals and identify commands, including invalid command, motion command, and touch command. The workflow is as follows: 1) Calculate the differential coefficient (diff) of phase, and extract the candidate segment. As the phase is more sensitive than the RSSI, we use the phase diff for segmentation. The signals with continuous non-zero phase diff values are the candidate valid command segment. 2) Calculate the feature vector for the segment. We extract two features: range and standard deviation (std). As shown in Fig. 18, the motion and touch commands usually have the larger range and std values than the invalid hand movement. Thus, we calculate the range and std values of either phase or RSSI for each tag (movement tags and the touch tag) within the segment, and form a feature vector. 3) Classify the segment and identify the command, i.e., invalid, motion or touch. With the feature vector, we classify the segment using the decision tree algorithm. The classifier only needs to be trained once in advance, and can be used for any position or orientation of the tagged object within the monitoring area. The classifier is light-weight, and the delay of classification can be ignored. If the segment is estimated as caused by the motion or touch, the system inputs AZ9654 9.3cm 1.9cm (a) Broadband stucture 0 100 200 300 Sample index -50 -45 -40 RSSI (dBm) (b) RSSI variation of AZ9654 Fig. 19. RSSI variation of tag AZ9654 during swipe the segment to the motion or touch module to identify the detailed command, as shown in Fig. 2. Moreover, for the touch gesture detection, it is important to determine the reference RSSI value. The reference value is used to degrade effects of changing environmental factors. Theoretically, the range of the RSSI variation during the swipe is steady, it could be better to select the extreme values as the reference, but we cannot obtain the extreme value before the user touches the tag. Considering the user’s habit, there usually exists a short pause when the user prepares to perform the touch gesture, so it is a basic idea to choose the stable RSSI value in the short pause. Note that, when the finger hangs over the tag with different heights, the RSSI value has a small changing range of 1-2dB, so we need to update the template when detecting the non-outlier value beyond the range of the template for the higher accuracy. 8 DISCUSSION The 2D motion tracking method can extend to the 3D tracking: The model of the rigid motion decomposition in Section 4.4 can be rewritten for the 3D motion with the 3D translation and rotation matrices. To realize the 3D motion tracking, one more antenna orthogonal to the antenna pair in Fig. 20 is required. The additional antenna can be deployed on the ceiling to capture the signal change mainly along the vertical direction. Also, to ensure there are always enough tags read by the reader antenna, more tags with different orientations should be attached on the tag, just like Tagball [16]. The tag type has influence on the touch gesture recognition: Not all kinds of tags can be used as the touch tag. For example, the antenna of tag AZ9654 is in a broadband structure, its RSSI variation due to the swipe is totally different from the Ω-wave observed with tag E51, as shown in Fig. 19. Our method is more suitable for the tag with meandered lines in the tag antenna, i.e., E51, AZ9640 and AZ9662. Due to the different length of meandered lines and chip types, the performance of different tag types differs, details are shown in Section 9.3. Meanwhile, as the swipe along different lines on the tag could incur different RSSI variation patterns, to ensure the swipe can be performed along the same line, we prefer the linear tag instead of the square tag. The touch gesture detection module works as long as the touch tag can be activated wherever the touch position is: For motion tracking, we split the scanning area into two regions based on the relationship between tag movement and phase variation. However, the touch gesture detection relies on the RSSI deviation, it views the whole area as the same. As shown in Observation 3, as long as the touch tag can be activated wherever the touch position is, the touch method works. The operating area mainly depends on the smaller readable range of movement tags and the touch tag. Empirically, the maximum distances of movement tag AZ9629 and touch tag E51 in our settings are 1.8m and 2m, respectively