# Capturing Features and Performing Human Detection from Human Gaits Using RFID
## Materials and Methods
### System Design
#### 2.3.2 Signal Preprocessing  
Considering the interference of environmental noise and other factors, it is not reliable to operate directly on the raw signal; therefore, a series of preprocessing operations need to be performed to improve the signal recognition ability. _Phase unwrapping._ The RFID signal phase reported by the RFID reader is a periodic function from 0 to \(2\pi\), also known as the wrapped phase. This wrapping phase will affect the subsequent analysis process due to its ambiguity. When the phase changes, it may jump from \(2\pi\) to 0 or decrease to 0, so the absolute difference between two adjacent readings should be less than \(\pi\) to be reasonable. Therefore, it is necessary to unwrap the phase. We adopt one of the phase unwrapping methods in [33] and the results are shown in Figure 7.  
_Signal smoothing._ Due to the environmental noise and the defects existing in the hardware itself, the collected raw phase and amplitude are often affected by noise, as shown in Figure 8a,c. Therefore, we use the Savitzky-Golay Filter (SG Filter) [34] for smoothing. The SG filter is usually used to smooth a set of data and is able to significantly improve the accuracy of the data without changing the trend and width of the signal. The  
Figure 6: VGG training process. Figure 7: Comparison before and after phase unwrapping. main principle of the filter is to fit a continuous subset of adjacent data points to a low-degree polynomial by the linear least squares method, which shows obvious advantages when dealing with time series data. Therefore, the SG filter is more applicable in RFID with data changes. The phase and amplitude after denoising are shown in Figure 8b,d. _Signal normalization._ In RFID readers, the collected raw phases may have different dimensional units, which will reduce the comparability between the data and reduce the accuracy of person detection. In order to ensure reliable and accurate results, we normalize the data to improve the convergence speed and accuracy of the model. Specifically, we use min-max normalization [35] to linearly transform the original data \(x\) and output \(y\):  
\[y=\frac{x-min}{max-min} \tag{6}\]  
where \(min\) and \(max\) are the minimum and maximum values in the set, respectively. In addition, the reason why min-max normalization is selected instead of Z-score normalization is that the convergence speed of min-max normalization and the improvement effect on accuracy are better. _Motion segmentation._ After normalization and smoothing, we obtain a relatively smooth curve. At this time, in order to obtain effective motion segments, this curve needs to be segmented and processed. Because the phase and amplitude fluctuations vary greatly between different step lengths, and the segments of continuous human motion are difficult to separate, it is difficult to obtain motion segments by threshing-based segmentation methods. At the same time, due to the influence of environment and subjective consciousness, the setting of ordinary threshold may lead to a significant decline in the performance of mixed activities. In order to deal with these problems, inspired by the method in [36], we first segment the motion curve of continuous persons through its data volatility, and then use the sliding window segmentation method based on variance. Figure 8: Phase and amplitude before and after data smoothing: (**a**,**b**) show the raw phase and amplitude; (**c**,**d**) show the phase and amplitude after processing. _Continuous human motion segmentation_. First, we use an average slope \(k\) to represent the volatility of the entire data segment, and we calculate the standard deviation \(\sigma\) of the entire data. Then, we use the idea of moving average to eliminate the low-frequency noise.