# LSTM Recurrent Neural Network for Hand Gesture Recognition Using EMG Signals
###### Abstract
Following the three challenges and the second trend mentioned before, Recurrent Neural Networks (RNN) emerge as promising models for gesture recognition classifiers based on EMG signals due to their ability to identify patterns in dynamic time series; RNNs have been widely used in different fields to forecast time series data and model energy system behavior [30; 33; 34]. In the field of Human-Machine Interfaces and electromyography, multiple studies have explored the application of RNNs in gesture recognition systems in order to determine whether is or not suitable for gesture prediction and prosthesis control. For example, [PERSON] et al. has explored the use of stacked LSTM Recurrent Neural Networks for gesture recognition on amputees [35]; [PERSON] performed a comparative study evaluating unidirectional and bidirectional RNNs, using both Long-short Term Memory (LSTM) units and Gated Recurrent Units (GRU), also analyzing the effects of the attention mechanism, [PERSON] found that bidirectional LSTM units with attention yielded the best results [36]; [PERSON] et al. proposed an attention-based hybrid CNN-RNN architecture for gesture recognition, this research compared the models accuracy on different popular gesture recognition datasets [37]; other studies like the ones presented by [PERSON] et al., [PERSON] et al. and [PERSON], proposed different RNNs architectures composed of multiple stacked recurrent layers and their comparison with other architectures such as CNN-RNN models [13; 38; 39]. As can be found in the literature, most of the studies use static data and online datasets in which the data was obtained in controlled environments, however, scientific literature has shown that models that often perform well on static data do not perform well in systems operating in real-time [40], making the results obtained only in static data misleading. Moreover, most of the research found uses a high number of EMG channels (eight or more) [32; 35; 36; 37; 38; 41; 42], which increases the computational needs and the prediction delay, making it hard to implement those systems in embedded devices and commercial applications [5]. This research aims to propose a full hand gesture recognition system capable of predicting different gestures in real-time operation using only four EMG channels. Concepts and design of the acquisition system and the time domain optimum descriptor will be discussed during the overall development of this paper, to highlight their importance in the development of the classifier. This paper presents a novel hybrid RNN model composed of one LSTM (Long Short-Term Memory) layer and dense layers (fully connected layers) to classify in real-time different hand gestures using only four EMG channels. The model achieved an accuracy 99% in the training and validation stages in the recognition of five hand gestures performed with static data. On the other hand, the proposed model was implemented on a personal computer that received the EMG data from a custom made EMG acquisition armband. The model achieved an accuracy of 87 \(\pm\) 7% during real-time testing, proving to be suitable and scalable for real-time prosthesis control. The real-time tests revealed challenges that only occur during real-time operation, giving insights about possible solutions to this challenges to further optimize the system. This article is structured as follows, Section 2 presents the methodology used to define the experimental set up of EMG system, the algorithm choosing and theoretic support are brought up during this section. Section 3 shows the main results obtained form the tests carried out by the system previously described; and a final section shows the conclusions (Section 4), setting ground for future work.