# Hand Trajectory Recognition by Radar with a Finite-State Machine and a Bi-LSTM
## 3 Methodology
### Simple Trajectory Gesture Recognition
#### 3.1.4 Gesture Trajectory Recognition  
After extracting target parameters, segmenting gesture movements, and preprocessing gesture trajectories, the motion data collected by millimeter-wave radar are normalized for all gestures. Gesture recognition based on target trajectory parameters is to determine the current motion state of a gesture. Typically, most research uses neural networks for gesture recognition. However, neural network methods still have some shortcomings. Neural networks, due to their large-scale architectures and numerous parameters, often require substantial computational resources and time for processing. The extensive matrix operations and complex calculations involved in training and deploying these networks can be both resource-intensive and slow, particularly for real-time applications. In contrast, finite-state machines offer a more efficient alternative by utilizing a simplified computational model. The finite-state machines operate with a fixed number of states and transitions, performing only basic arithmetic operations and conditional logic. This reduced complexity translates to significantly lower computational demands, making finite-state machines a valuable tool for applications where efficiency and speed are critical. By leveraging finite-state machines, we can enhance computational efficiency, reduce resource consumption, and achieve faster processing times compared to the resource-heavy neural network approaches. Therefore, a recognition method that uses finite-state machines to determine gesture actions based on gesture trajectory parameters is proposed to improve the computational efficiency. Firstly, to determine the starting and ending moments, as well as different gesture states during the movement, a complete gesture action can be decomposed into 10 motion states, as outlined in Table 2. \begin{table}
\begin{tabular}{c c} \hline \hline
**State Definition** & **State Description** \\ \hline No Target & No target detected in 3 frames. \\ Random Motion & Undefined gesture action. \\ Gesture Forward & Target approaching in 3 frames. \\ Gesture Backward & Target moving away in 3 frames. \\ Gesture Activated & During approaching, target distance is less than 0.2 m. \\ Gesture Deactivated & During moving away, target distance is greater than 0.25 m. \\ Gesture Leftward & Target moving left in 3 frames. \\ Gesture Rightward & Target moving right in 3 frames. \\ Gesture Upward & Target moving up in 3 frames. \\ Gesture Downward & Target moving down in 3 frames. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Gesture state definition. Figure 12: Resampling results of gesture trajectory. (**a**) Before resampling. (**b**) After resampling. The gesture trajectories begin with the dark blue points and end with the light yellow points. The explanation for various motion states is that when the hand target has not entered the radar detection range, the state is defined as No Target. When the motion trajectory of the hand target is not in a straight line, the state is Random Motion. When the hand target gradually approaches the radar, the state is Gesture Forward. If the current state is Gesture Forward and the distance between the hand target and the radar is less than 0.2 m, it is Gesture Activated. When the state is Gesture Activated, the specific direction of the gesture movement can be judged, such as left and right swings and up and down swings, which correspond to the state Gesture Leftward, Gesture Rightward, Gesture Upward, and Gesture Downward. If the distance between the hand target and the radar gradually increases, the gesture state is determined to be Gesture Backward. When in the state of Gesture Backward, if the distance between the hand target and the radar is greater than 0.25 m, it is judged as Gesture Deactivated.