# Location Adaptive Motion Recognition Based on Wi-Fi Feature Enhancement
## 3 Enhanced Wi-Fi Features Based on Human Body Speed Distribution
### Motion Velocity Distribution Model Based on Human Frame of Reference  
When a human body makes an action, its body parts (for example, two hands, two arms, and the trunk) move at different speeds, and DFS is highly correlated with the orientation of the human body position. The movement speed distribution obtained from DFS is also related to human body position. However, in the human frame of reference, the segmentation of the moving body is only associated with the type of action and the distribution of movement speed, which is irrelevant to the position. Thus, we must transform to the human frame of reference to reduce parameters. It is necessary to estimate the target's position information in the Z-axis direction and two-dimensional plane simultaneously to establish the human body's three-dimensional coordinate system. The local coordinate system centered on the human body takes the front-facing direction of the human body as the X-axis, and the other direction parallels the ground and is perpendicular to the X-axis as the Y-axis. To include the actual height of most people, we set the altitude datum of the Z-axis to 1.3 m relative to the ground and obtain the three-dimensional coordinates of the transmitting end and receiving end of the i-th channel in the human coordinate system:  
\[l_{t}^{(i)}=\Big{(}x_{t}^{(i)},y_{t}^{(i)},z_{t}^{(i)}\Big{)} \tag{11}\]  
Figure 2: Diagram with virtual diagram. \[l_{r}^{(i)}=\left(x_{r}^{(i)},y_{r}^{(i)},z_{r}^{(i)}\right) \tag{12}\]  
Velocity component \(\vec{v}=\left(v_{x},v_{y},v_{z}\right)\) caused by human action contributes to the frequency component. We label it as \(f^{(i)}(\vec{v})\), and the following is the corresponding relation for the \(i\)-th channel:  
\[f^{(i)}(\vec{v})=a_{x}^{(i)}v_{x}+a_{y}^{(i)}v_{y}+a_{z}^{(i)}v_{z} \tag{13}\]  
where \(a_{x}^{(i)}\),\(a_{y}^{(i)}\),\(a_{z}^{(i)}\) are the coefficients determined by the three-dimensional position information of the transmitting end and the receiving end:  
\[a_{x}^{(i)}=\frac{1}{\lambda}\left(\frac{x_{x}^{(i)}}{\left\|l_{t}^{(i)} \right\|_{2}}+\frac{x_{r}^{(i)}}{\left\|l_{r}^{(i)}\right\|_{2}}\right) \tag{14}\]  
\[a_{y}^{(i)}=\frac{1}{\lambda}\left(\frac{y_{y}^{(i)}}{\left\|l_{t}^{(i)} \right\|_{2}}+\frac{y_{r}^{(i)}}{\left\|l_{r}^{(i)}\right\|_{2}}\right) \tag{15}\]  
\[a_{z}^{(i)}=\frac{1}{\lambda}\left(\frac{z_{t}^{(i)}}{\left\|l_{t}^{(i)} \right\|_{2}}+\frac{z_{r}^{(i)}}{\left\|l_{r}^{(i)}\right\|_{2}}\right) \tag{16}\]  
According to Equations (14)-(16), the coefficients \(a_{x}^{(i)}\),\(a_{y}^{(i)}\),\(a_{z}^{(i)}\) between human body's velocity and frequency are obtained. Due to the limitation of human body structure (such as joints), the number of reflected multi-path signals is limited. The possible velocity components caused by human motion in the X and Y axes are generally no more than 8, and that in the Z axis is generally no more than 5. Thus, we traverse all possible \(\vec{v}\) in a certain speed range according to the set step size and multiply it by corresponding \(a_{x}a_{y}a_{z}\). The possible frequency component generated by the possible speed component of the human body is obtained. If the frequency component calculated is between the maximum and minimum sampling frequencies, the corresponding position of the allocation matrix is 1; otherwise, it is 0, and the initial allocation matrix in \(i\)-th link \(A_{F_{x},PN2}^{(i)}\) is obtained. \(F\) represents the number of samples, namely the number of peak values in the DFS profile or the number of actual velocity components. \(N\) is the number of possible velocity components in X or Y axes [35], and \(P\) is that in Z axes. \[A_{j,k}^{(i)}=\left\{ \begin{array}{ll}1&f_{min}<f^{(i)}(\vec{v}_{k})<f_{max }\\ 0&others\end{array} \right. \tag{17}\]  
where \(f_{min}\) and \(f_{max}\) are the minimum and maximum frequency sampling frequency, respectively, \(f^{(i)}(\vec{v}_{k})\) is possible velocity components correspond to frequency components.