Next Article in Journal
Research on Path Planning with the Integration of Adaptive A-Star Algorithm and Improved Dynamic Window Approach
Previous Article in Journal
Integrated Model Text Classification Based on Multineural Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hardware and Software Design and Implementation of Surface-EMG-Based Gesture Recognition and Control System

1
Trine Engineering Institute, Shaanxi University of Technology, Hanzhong 723001, China
2
School of Physics and Telecommunication Engineering, Shaanxi University of Technology, Hanzhong 723001, China
*
Author to whom correspondence should be addressed.
Electronics 2024, 13(2), 454; https://doi.org/10.3390/electronics13020454
Submission received: 22 November 2023 / Revised: 14 January 2024 / Accepted: 19 January 2024 / Published: 22 January 2024
(This article belongs to the Section Computer Science & Engineering)

Abstract

:
The continuous advancement of electronic technology has led to the gradual integration of automated intelligent devices into various aspects of human life. Motion gesture-based human–computer interaction systems offer abundant information, user-friendly functionalities, and visual cues. Surface electromyography (sEMG) signals enable the decoding of muscle movements, facilitating the realization of corresponding control functions. Considering the inherent instability and minuscule nature of sEMG signals, this thesis proposes the integration of a dynamic time regularization algorithm to enhance gesture recognition detection accuracy and real-time system performance. The application of the dynamic time warping algorithm allows the fusion of three sEMG signals, enabling for the calculation of similarity between the sample and the model. This process facilitates gesture recognition and ensures effective communication between individuals and the 3D printed prosthesis. Utilizing this algorithm, the best feature model was generated by amalgamating six types of gesture classification model. A total of 600 training and evaluation experiments were performed, with each movement recognized 100 times. The experimental tests demonstrate that the accuracy of gesture recognition and prosthetic limb control using the temporal dynamic regularization algorithm achieves an impressive 93.75%, surpassing the performance of the traditional threshold control switch.

1. Introduction

With the rapid development of artificial intelligence technology, the number of intelligent machines and devices in people’s daily lives has gradually increased. Every smart machine and device possesses the capability to perform various routine tasks and offers multiple interaction methods, from industrial production to traditional fields such as military, medical, and service. It is anticipated that human–computer interactions will become increasingly prevalent in the future. Unlike traditional human–computer communication methods, human–computer communication based on bioelectric signals can control external mechanical devices such as intelligent machines, robots, mice, airplanes, and virtual animations. Therefore, the process of decoding human bioelectric signals to discern their corresponding behavioral intentions has emerged as a prominent research area within human–computer communication.
Currently, three commonly used human bioelectric signals are electroencephalography (EEG), electromyography (EMG), and electroneurography (ENG) [1]. Among these, ENG necessitates craniotomy and the subsequent implantation of corresponding sensors into the brain, constituting a complicated process that inflicts significant damage to the human body. Moreover, the surgery and care associated with ENG require the expertise of medical professionals, making this acquisition method unsuitable for daily operational use. EEG, on the other hand, exhibits weak and unstable signal quality, rendering it susceptible to external environmental interference. As a result, it remains in the research stage with limited practical implementation. Surface electromyography (sEMG), employing surface wet or dry electrodes affixed directly to the skin’s surface above corresponding muscle groups, offers a non-invasive alternative with relatively stable signals [2]. The mechanism behind sEMG generation involves the recognition of bioelectrical signals originating from the nervous system, which controls muscle movements on the surface of the human body. Typically, the nervous system employs specific neurons to regulate muscle activity, giving rise to a diverse range of muscle movements on the body’s surface. Consequently, various electromyography signals are emitted by these distinct muscle units.
sEMG comprises the summation of excitation potentials received by neurons when conveying signals that contain information about a person’s intention to move to the corresponding motor muscle. It effectively reflects neural information pertinent to potential movements, signifying that decoding sEMG can discern intentions related to human body manipulation. This feature aligns with one of the fundamental functions of HCI interface design, which involves acquiring intentions to manipulate human behaviors and designing devices accordingly to facilitate external movements based on these behavioral intentions [3]. The controllability and compatibility with human behavior further enhance the appeal of EMG, leading to its frequent utilization in clinical rehabilitation for prosthetic drive and Human–Computer Interaction (HCI) applications, particularly in the field of gesture recognition.
Gesture recognition has emerged as a critical area of research in the field of biomedical engineering and artificial intelligence. The ability to accurately and efficiently interpret human hand gestures has numerous applications, ranging from prosthetic control to human–computer interaction. In recent years, there has been a growing interest in developing noninvasive wearable sensor systems for hand gesture recognition, which offer advantages in terms of comfort, flexibility, and ease of use.
Marinelli et al. [4] discuss the progress made in biomedical engineering, particularly focusing on the application of gesture recognition techniques. Their research highlights the significance of integrating biomedically inspired algorithms and wearable technology for enhanced accuracy and precision in recognizing hand gestures.
Similarly, Tchantchane et al. [5] provide an extensive review of hand gesture recognition systems that utilize noninvasive wearable sensors. Their analysis includes an examination of various sensor types, such as accelerometers, gyroscopes, and flex sensors, and their effectiveness in capturing fine-grained hand movements. The authors also discuss the challenges associated with noise reduction, feature extraction, and classification algorithms, offering valuable insights for future research in the field.
Furthermore, Chen et al. [6] contribute to this field by presenting a comprehensive review of myoelectric control for prosthetic hand manipulation. Their work delves into the advancements in electromyography-based gesture recognition, where muscle signals are harnessed to control prostheses. The paper discusses signal processing techniques, pattern recognition algorithms, and the integration of tactile feedback, shedding light on the possibilities and limitations of myoelectric control in prosthetic technology.
In recent years, researchers have dedicated considerable efforts to the investigation of pattern recognition and the strategic mechanisms governing their control [7]. Substantial progress has been achieved, leading to an impressive 95% recognition rate for over ten intricate movements of the forearm and hand [8].
Powar and Chemmangat [9] also address the issue of wrist variation in the pattern recognition of myoelectric hand prostheses control. Their work focuses on the utilization of dynamic time warping (DTW), a technique that aligns muscle signal patterns by considering temporal variations. By employing DTW, the researchers effectively reduce the impact of wrist variation, leading to improved classification accuracy and robustness in myoelectric control.
Furthermore, Powar and Chemmangat [10,11] investigate the use of dynamic time warping to alleviate the effect of force variation in the myoelectric control of hand prostheses. By employing DTW to align muscle signal patterns affected by varying force levels, the researchers demonstrate enhanced classification accuracy and improved control performance. Their findings provide valuable insights into mitigating the impact of force variation, contributing to the development of more reliable and adaptable myoelectric control systems.
In a different approach, Jabbari, Khushaba, and Nazarpour [12] propose a combined dynamic time warping and spatiotemporal attention approach for myoelectric control. By integrating these two techniques, the researchers aim to enhance the classification accuracy and reliability of gesture recognition systems. Their study highlights the potential benefits of incorporating attention mechanisms in myoelectric control, improving the ability to identify and focus on relevant muscle signal patterns.
Therefore, this paper presents the development of an “active training” method, enabling patients with hand dysfunction to engage in more effective rehabilitation training through the integration of anthropomorphic prosthetic hand technology. The proposed method empowers patients to execute simple gestures by consciously controlling the prosthetic arm, thereby facilitating improved recovery outcomes. By harnessing sEMG signals as control inputs for the mechanical prosthesis, this approach assists individuals with disabilities in resolving fundamental daily life challenges and even offers them the potential for basic work capabilities.

2. Hardware Design of Anthropomorphic Prosthetic Arm and sEMG-Based Control System

Our anthropomorphic prosthetic arm is constructed using AutoCAD 2022 software for 3D modeling, followed by direct 3D printing. The final configuration of the prosthetic arm, resulting from several model modifications, is depicted in Figure 1a. CR-PLA, a key material employed in 3D stereo printing, demonstrates excellent properties, such as high tensile strength, minimal shrinkage, softness, high hardness, smoothness, and ultra-low mechanical weight. These attributes enable the optimal operation of the manipulator. To control the fingers and wrist, servos are utilized as the driving mechanism, as they offer precise control through PWM (Pulse Width Modulation), rendering the control process highly convenient and user-friendly. Specifically, the KS-3518 digital servo, a waterproof model, is chosen for this application, ensuring compliance with the design requirements of this system.
The assembly of the servos for the prosthetic arm is illustrated in Figure 1b. This arm incorporates a total of six digital servos, with one dedicated to controlling the wrist rotation and the remaining five individually responsible for finger movements. The control mechanism relies on servo rotation and traction wire ropes to enable finger bending and straightening. The steel wire selected for this purpose boasts a maximum bearing capacity of 25 kg, far exceeding the required specifications.
sEMG signals possess distinct characteristics that warrant attention in the application of this thesis:
(1) sEMG signals are inherently weak physiological electrical signals [2]. Typically, healthy individuals exhibit sEMG amplitudes ranging between 100 and 5000 μV, with peak values rarely exceeding 6000 μV, which generally remain within the noise level. During muscle relaxation, sEMG signals may reach amplitudes of 20–30 μV, while muscle contraction can elevate them to 60–300 μV. However, in hemiplegic patients, these amplitudes tend to be lower than 350 μV, rendering them more susceptible to external disturbances [2].
(2) The low-frequency characteristics of sEMG signals are influenced by various factors [13]. An effective approach to studying these characteristics is the bipolar model proposed by the Center for Neuromuscular Research at Boston University. This model partitions the sEMG frequency spectrum from 20 to 500 Hz and constrains the power spectra maxima to the range of 30 Hz to 300 Hz, providing a more accurate representation of the muscle’s low-frequency state. Typically, since the frequency of the electronic signals from the epidermis is usually around 1 kHz, this is used as a baseline when collecting this information.
(3) The sEMG can be approximated as a Gaussian with zero mean value, exhibiting symmetry, and it behaves as a white noise process composed of numerous sinusoids.
(4) sEMG represents a muscle voltage signal, where frequency and amplitude positively correlate with muscle tension, usually displaying a reliable linear relationship. This signal offers valuable insights into muscle relaxation and contraction.
(5) Different muscle exercises result in distinguishable changes in time-domain, frequency-domain eigenwaveforms, and amplitude-spectral-domain frequency characteristic curves. Surprisingly, these changes demonstrate significant spectral similarity, indicating certain regularities in EMG signal frequencies across muscle blocks, both within the same type of exercise and across different exercises [14].
(6) The collection of EMG signals exhibits considerable variations as individuals’ age, gender, and physical condition change. Even among similar individuals, harvesting results may differ significantly due to variations in environmental factors, physical characteristics, and muscle fatigue states.
As per the human physiology above, muscle movements need to be stimulated repeatedly to generate EMG signals since they are alternating electrical signals. The acquisition of EMG signals is susceptible to external environmental and physiological influences, with the natural thermal noise of the circuit being the most significant external factor. Moreover, the distribution of electromagnetic fields alters with human activities, impacting the acquisition of EMG signals, particularly when the power supply frequency (industrial frequency interference) is present. Therefore, the precise selection of acquisition equipment is paramount for obtaining accurate EMG signals [15].
Currently, two types of EMG signal detection devices are available on the market: invasive and non-invasive. Invasive devices typically use needle electrodes. The process involves the precise placement of different electrodes at varying depths, necessitating the expertise of a healthcare professional. Once inserted, the needle electrodes must be securely fixed and not move freely, with continuous monitoring by medical personnel. On the other hand, non-invasive devices utilize wet and dry electrodes for surface acquisition, which can be employed multiple times. These non-invasive devices offer straightforward operation and do not require professional supervision, making them more user-friendly. During acquisition, the skin surface at the measuring location is cleaned and disinfected, and then the non-invasive electrodes are applied to obtain the electromyographic signals. This method outperforms needle electrodes, as it ensures a non-invasive, cost-effective, repeatable, and user-friendly process. Since this approach captures muscle signals from the skin’s surface without direct muscle contact, it is susceptible to interference from external factors. Although needle electrodes are more accurate than dry electrodes in terms of signal accuracy, dry electrodes are simpler and easier to use and have been able to surface the signal acquisition needs of EMG-related studies.
This system primarily utilizes muscle signals from the arm muscles of the upper limb. As different arm movements elicit distinct muscle responses, a direct correlation exists between movement and muscle activity. To optimize the classification model, the placement of the dry electrode armband must be determined based on the specific type of movement requiring classification. It is essential to position the dry electrode armband in the region with the strongest muscle activity to minimize error rates and enhance recognition accuracy. After conducting several experimental tests, it was concluded that a three-electrode configuration for the armband yields the best results. The resulting sEMG armband is depicted in Figure 2b.

3. sEMG Signal Acquisition and Processing

Once the preparatory work was completed, the voluntary subjects were informed of the testing process before data collection. During the data collection phase, the subjects were instructed to sit on a stool with their arms hanging in the air. Participants followed computer instructions to perform the relevant operations. Each test comprised three parts: first, a relaxation state lasting 5 s in a semi-handshake position; second, the performance of a specific movement as indicated by the computer, also lasting 5 s; and, finally, returning to the initial state, identical to the first part. Each set involved six gesture movements. All participants underwent 20 sets of data collection. Between each data set, sufficient resting time was allotted to prevent testers’ hands from experiencing fatigue or muscle exhaustion. This resting interval is essential as prolonged hand movements can impact muscle behavior and relaxation, consequently affecting the accuracy of data collection. The study included six types of hand movements: fist clenching, “OK” gesture, “Like” gesture, wrist turning left, hand open, and wrist turning right. Gesture diagrams can be found in Figure 3.
The complexity of raw sEMG signals can lead to significant errors if solely relied upon for recognition [16]. To ensure accuracy in signal pattern recognition detection, it is necessary to process and analyze the raw sEMG signals collected by these sensors. The signal pre-processing section involves a signal amplification and filtering circuit, as illustrated in Figure 4. The pre-processing circuit serves two essential purposes: firstly, it amplifies the sEMG signal to the required voltage level (V) for subsequent A/D data acquisition and signal processing; secondly, it enhances the signal filtering process to effectively eliminate interference from industrial frequency signals, DC bias phenomena, and extract the active signal. The main circuit amplification, combined with secondary circuit amplification, achieves an overall amplification of approximately 1000 times. Motion artifacts and electrical noise from the cable are eliminated using a fourth-order Butterworth high-pass filter (f = 10 Hz), while a band-pass filter (fL = 10 Hz, fH = 500 Hz) is employed to remove high-frequency noise, such as electrode noise at the skin tissues. The industrial frequency noise at 50 Hz is effectively eliminated through trap processing. Additionally, the zero-regulator circuit ensures system input and output balance, effectively reducing the system’s zero deviation.
After signal preprocessing, the crucial step is to extract the start and end points of the valid data. To ensure real-time functionality, a combination of the threshold comparison method and the moving average method (Figure 5) was chosen for improved monitoring of active regions. By employing a fixed sliding window in the moving average method, the average energy of the current region was obtained, which offers a better understanding of its state. This allows for the segmentation of gesture movements from sEMG signals, facilitating the subsequent identification of valid gestures. When the muscle is not actively engaged, the sEMG signal exhibits slight amplitude changes due to individual differences in muscle fiber properties, resulting in minor fluctuations in energy. Conversely, during effective muscle actions, the amplitude changes in the sEMG signal are more pronounced, with significantly larger variations compared to the non-active state [17]. Leveraging the energy method, effective action segments within different sEMG signals can be rapidly identified, leading to enhanced judgment accuracy. The combination of sliding average and energy signal analysis allows for convenient, efficient, and swift signal data segmentation. To facilitate the analysis of energy signals with substantial frequency gradient changes, a sliding window segmentation approach is employed, enabling more intuitive analysis.
In myoelectric pattern recognition algorithms, the extraction and identification of original myoelectric signal features represent the most crucial and essential processing step throughout muscle feature pattern recognition technology. Currently, the mainstream application of myoelectric signal feature recognition algorithms can be broadly categorized into three groups: time-domain methods, frequency-domain methods, and time-frequency domain methods [18]. Time-domain features have the advantage of direct and reliable extraction from the original sEMG signal data, enabling straightforward extraction from time series data sets without necessitating additional data conversion or processing by the system [19]. Hence, this method offers simplicity, ease of system design and implementation, as well as efficiency in system calculation, resulting in a relatively light system workload. On the other hand, frequency domain feature data require Fourier transform calculations, which can lead to poorer real-time performance and less stable data. Furthermore, due to the inherent abstraction of frequency domain features, adjustments of time series parameters within specific ranges are often needed to obtain more information. In such cases, time series features are preferred, and several common time series features can be employed, such as root mean square, waveform width, average of certain integration values, certain value generalization, time past zero crossing coefficient, slope sign variation, and average amplitude rate of change. These features significantly simplify the processing process and enhance the efficiency of various tasks. In this paper, mean amplitude variation, the first burst of amplitude, mean absolute value, root mean square, and standard deviation were used as feature extraction methods for comparative study.
Average amplitude change uses an averaged wavelength, and it can be formulated as follows [20]:
A v e r a g e   a m p l i t u d e   c h a n g e = 1 N i = 1 N 1 x i + 1 x i
For the amplitude of the first burst, the raw EMG signal was squared and then passed through a moving average FIR filter with a Hamming window function. And the low frequency components of the EMG signal are filtered and the maximum value of the first burst is used as the feature. In this study, the Hamming open window function uses a window size of 32 ms. A modified mean absolute value was used for comparison; the algorithm uses the weighted window function donated by wi for MAV feature extraction [20]. MAV feature calculated as follows [20]:
M e a n   a b s o l u t e   v a l u e = 1 N i = 1 1 w i x i ; w i = 1 ,   i f   0.25 N i 0.75 N 0.5 ,   o t h e r w i s e
Root mean square modeled as amplitude-modulated Gaussian random process, which relates to constant force and non-fatiguing contraction [20]. Root mean square feature expressed by
R o o t   m e a n   s q u a r e = 1 N i = 1 N x i 2
s t a n d a r d   d e v i a t i o n = 1 N 1 i 1 N x i 1 N i = 1 n x i 2
Using the time-domain method, features can be efficiently extracted. The underlying principle of this method is to vary the length and width of the window signal to obtain a more accurate average energy measurement. Through analyzing complex sEMG signals, features can be extracted more effectively, enabling a better understanding of their nature. Figure 6a displays a set of raw sEMG data acquired during a specific “Like” gesture, while Figure 6b illustrates the raw data plot after processing the data plot of the item (a) in the legend with the feature extraction operation. The horizontal axis corresponds to the sequence number after the window moves, and the scatter on the plot represents the corresponding feature value at the end of the feature extraction operation. It is evident from the analysis of Figure 6 that noticeable differences exist both in the trend of the changes in eigenvalues and their actual magnitudes. Therefore, when extracting or processing the eigen-signal data, a careful consideration of these changes is crucial for a more accurate analysis of the original signal data. Extracting the features of the original signal simplifies the computer’s analysis and the comparison of data features, facilitating the more effective identification of the feature data.

4. DTW Algorithm Implementation

Dynamic Time Warping (DTW) is employed to determine the difference between two time periods based on the nearest neighbor principle, thus enabling the better identification of their commonalities [21]. However, due to inherent disparities between the time periods of the two languages, achieving a perfect match remains challenging [22,23]. In linguistic and acoustic technologies, the storing and transmitting of linguistic information are influenced by spatial and temporal variations, leading to differences in speech tones and rhythms among individuals. For instance, changes in the tone and rhythm of speech by various speakers result in variations in tone and rhythm during speech. Furthermore, the speed and frequency of pronunciation may differ between two phonemes within the same word. In these intricate scenarios, traditional Euler distance tables do not consider the dynamic changes in speed within the time series, potentially leading to significant errors.
The DTW algorithm finds extensive application, primarily in template matching [24]. Initially, it was employed in speech recognition tasks, such as in language learning software, to assess pronunciation accuracy. Over time, its utility has extended to include sensor motion recognition, biological information matching, data mining, information retrieval, and various other domains.

4.1. DTW Algorithm Implementation

The signals collected in this experiment were discrete time series signals. For the different actions performed by the subjects, the corresponding muscle action signal sequences do not differ much in terms of the intensity and frequency of the muscle movements and the temporal rhythm of the muscle actions. This signal characteristic ensures that it can be stabilized within the time-frequency range of the same type of muscle movement through strict control. The DTW algorithm can be used to achieve the direct identification and analysis of these discrete sEMG signal sequences in the human body, avoiding the problem of failing to identify the signal sequences due to the inconsistency of the length and intensity of the feature sequences at a certain stage, and greatly improving the overall accuracy of the recognition and detection of EMG signals [25,26]. Therefore, in this study, the DTW algorithm is used to realize the automatic identification of feature sequences and generate accurate signal value sequences [26].
Let the total number of action frames in the reference template R be denoted as M, where Ri = {r1, r2, ..., rm, ..., rM}, and each rm represents the action feature vector of the mth frame, with each component being a three-dimensional vector. Similarly, let the test template T be an N-dimensional vector represented as Tj = {t1, t2, ..., tn, ..., tN}, where j = 1, 2, 3. It is worth noting that while the lengths of M and N can vary, their dimension values must remain consistent. To calculate the frame matching distance between the reference template and the test template for each dimension vector, we employ Equation (5).
d i t n , r m = t n r m , i = 1,2 , 3
Figure 7 depicts a two-dimensional Cartesian coordinate system, where the horizontal axis N is the test sample axis and the vertical axis M is the reference sample axis. The integer coordinate points in the figure represent the intersection between the coordinates of each reference sample and the coordinates of the previous reference sample. The DTW algorithm uses these coordinate grid points to find the optimal and shortest path for each completed operation. This path must be chosen from the bottom left to the top right corner, because there can be no reversal of the order of actions between the trajectories of each action. The grid points along the path are in order: (t1, r1)...(tN, rM). To ensure that each point stays within an acceptable range, the slope magnitude is constrained between 0.5 and 2, and the set threshold is not exceeded for each point to reach the final (n, m) position. The preceding point could only be (n − 1, m), (n − 1, m − 1), or (n − 1, m − 2). By calculating Di(tN, rM), the shortest interval between the eigenvectors of each dimension can be determined, as expressed in Equation (6). Moreover, this formula leads to (7), representing the shortest interval DTW between the feature vectors of the third dimension in each dimension.
D i t N , r M = m i n D i t n 1 , r m + d i t n , r m , D i t n 1 , r m 1 + 2 d i t n , r m , D i t n 1 , r m 2 + d i t n , r m ,   i = 1 , 2 , 3
D t N , r M = i = 1 3 D i 2 t N , r M
Utilizing the DTW algorithm, it is possible to locate and match the signals in the sEMG signal sequence that are related to a specific action and obtain results that are very close to the actual situation. In addition, the DTW algorithm can also reduce the accuracy error caused by the inaccurate measurement angle because the dry electrode sensor surrounds the upper arm to collect multi-dimensional information in this system.

4.2. Template Creation

The primary objective of creating gesture templates is to enhance the effective recognition rate of gestures and mitigate the adverse effects of visual deviations, positional differences, and individual variations. Throughout the template creation process, various organizational differences, such as activities and structures in the skin tissue, are taken into consideration. To construct an effective model, data are initially extracted from training samples during the training phase, and their average length is estimated. Subsequently, the effective part of the signal sequence is identified, and samples with similar lengths are selected and averaged for training, determining the optimal sample length.
For each training movement, eight samples with the smallest difference in length from the average movement length are selected. These samples are then used to match other movements, ensuring that the largest, smallest, or lowest movement sample can be found. Employing the DTW search algorithm, the most matching time series points are filtered from the seven movement samples and averaged to create an initial template for each exercise movement. This approach allows for a better reference for and comparison of different movements, leading to more effective training outcomes.
Finally, the prototype of the final templates for the six movements is obtained through a weighted average of the initial models for these six movements. In the experimental tests, only one template was utilized.

5. System Validation Experiments and Analysis

The real-time image acquisition and analysis of three-channel sEMG signal sources were designed and implemented based on the aforementioned technical concepts and steps. To thoroughly evaluate the system’s performance, a function test experiment was conducted using the dry electrode armband. This armband consists of three sEMG sensor components and three dry electrode arm patches, facilitating the continuous and interval-based collection of sEMG signals during rapid and continuous arm muscle movements. The test program involved six fundamental gestures: fist clenching, “OK” gesture, “Like” gesture, wrist turning left, hand open, and wrist turning right.
The wireless Bluetooth module in the armband enables the automatic network transmission of acquired sEMG signal data to the host computer and server. To ensure comprehensive, accurate, and complete action recognition and data acquisition, the original data for each action are collected separately. Additionally, the armband is designed to prevent position changes and minimize interference from external factors during data acquisition. Thus, users do not need to remove the armband after collecting all relevant data on hand movements. Figure 8 displays the graphical representation of the sEMG signal from the host computer.
From Figure 8, it can be seen that the system can accurately capture the sEMG signals of the human body and quickly and accurately reflect and show the size of the process of changes in the strength of human muscle power and the process of human muscle power outbreaks and contractions, but also accurately reflect and show the size of the significant differences in the degree of changes in the robustness and strength of the muscle power of different areas of expertise.

5.1. Endpoint Detection Results

Figure 9 presents the amplified sEMG signal of a series of consecutive movements of fist clenching. The graph depicts a dotted line representing a specific threshold. This threshold varies among individuals due to the diversity in human muscle fiber organization. Therefore, each person calculates the moving average and standard deviation of the signal based on the dynamic range and noise level of their own sEMG signal. Subsequently, they adjust an appropriate threshold based on the standard deviation and an adjustable coefficient. Movements exceeding this threshold’s continuity are considered valid. Through comparative analysis with the threshold signal T, it is evident that valid action points can be accurately extracted from the entire time series signal. The difference is significantly greater compared to the action state without the threshold [27]. This successful endpoint detection attests to the effectiveness of the proposed method in accurately identifying valid movements.
The data listed in Table 1 present the correct rates in the above six types of action endpoint detection experiments. By analyzing Table 1, it can be seen that the sliding average energy method can reach an almost 100% correct rate for the accurate extraction method of effective active segments that come to complete the detection of the action, so the use of this method is fully and directly applicable to the detection of effective action segments to realize the accurate extraction of signal segments.

5.2. Gesture Recognition Results

The results of comparing and matching the test action samples with the six reference action samples, as well as analyzing the action data within the reference test templates database, are presented in Table 2. The diagonal entries in the table represent the DTW distance when the sixth reference action is correctly identified as the reference action, while other entries indicate the DTW distance when the action is incorrectly identified as another reference action.
From an analysis of Table 2, it is evident that the action distance for recognizing the correct hand gestures is significantly smaller than the action distance for recognizing other hand gestures, differing by at least an order of magnitude. This finding demonstrates a high similarity in gesture information between individuals performing the same hand actions. Consequently, a well-designed and produced hand gesture recognition template facilitates the accurate recognition of hand movement information across different individuals. Moreover, this emphasizes the feasibility of utilizing the DTW algorithm for recognizing, processing, and analyzing correct gesture signals derived from EMG signals.
The final recognition results are represented by the confusion matrix, and the corresponding recognition rates are shown in Table 3. Each column in the confusion matrix presents the predicted attribution category of the data, with the total instances in each column matching the total instances of all data in the predicted attribution category. Similarly, each row in the matrix corresponds to the total number of instances of real hand movement data in the respective hand category. The diagonal entries in the matrix indicate correct hand recognition results for the specific gestures. From the analysis of the experimental data, it is evident that the overall recognition rate for hand gestures remains high, reaching approximately 93.752%. Moreover, individual action gestures exhibit excellent recognition rates, particularly for the fist clenching and hand open postures, both achieving a perfect 100% recognition rate. However, the “OK” gesture’s recognition rate remains relatively lower and is sometimes misidentified as a hand open gesture. Among the six gestures, the fist clenching and hand open gestures demonstrate the most distinct characteristics.
By analyzing the initial movement templates of the six movements with the six test movement templates that can be freely extracted, the DTW distance of each movement can be calculated, in which the distance of the fist clenching is the largest and the distance of the hand open is the smallest, and the order of the templates of these test movements is a fist clenching, hand open, wrist turning left, wrist turning right, “OK” gesture, and “Like” gesture. From the comparison of the test data, it can be seen more clearly that the DTW movement distance deviation of all the original samples tested is minimized only when their movement distances are all the same as their initial template movement distances [17]. This confirms the high feasibility of using the DTW algorithm to directly analyze the EMG signal movement distances for muscle action recognition, which is fully capable of realizing the rapid and automatic recognition calculation and the fast and accurate judgment of any two muscle actions that are the same or similar to each other, and improves the accuracy of muscle action recognition and judgment results by making templates. The test results are shown in Figure 10.

5.3. Prosthetic Arm Control Experiment

This experiment only involves the acquisition of human surface EMG and adopts the design of dry electrodes, so the instruments and equipment used will not cause any harm to the human body. The design and implementation of the experiment were approved by the Ethics Committee and all ethical materials were available. The experiment did not involve any specific group of research participants, and they were all school teachers and students. The testing experiment involved a total of 30 individuals, comprising both male and female participants, who were in good health. All the participants volunteered for the test and signed confidentiality agreements. To ensure the universal adaptability of the collected data to the created template, only healthy individuals without physical defects were selected as testers. Table 4 provides information about the participants involved in the study.
To ensure the validity of the experiment, it is crucial to conduct the tests under normal conditions and certain preparations must be made beforehand:
(1) Before the test, participants should refrain from engaging in high-intensity training, such as running or working out, to keep the muscles in the testing area in a relaxed state without fatigue. Muscle fatigue could adversely affect the accuracy of the collected signals.
(2) The surface skin of the muscle to be detected should be sterilized and cleaned before the test. A standardized cleaning method is employed for all participants to maintain uniformity in the collected data. Alcohol would be used for removing scurf and sebum and to cleanse the muscle surface at the beginning of the experiment. This procedure ensures better contact between the dry electrode armband and the skin, leading to more accurate muscle data measurements.
(3) Consistency in electrode placement is crucial when using the dry electrode armband. All electrodes used in the test should be positioned in the exact location on the same arm of each participant to ensure the measurement data’s uniformity and consistency.
Model validation was conducted in accordance with the specified test requirements. The experiment involved comparing hand movements to robot movements to assess recognition accuracy. Successful recognition was determined when the robot’s movements matched the corresponding hand movements, while a mismatch indicated failure. A total of 600 experiments were performed, with each movement recognized 100 times. From the statistical analysis presented in Table 5, it is evident that the clenched-fist and spreading-fist gestures achieved a remarkable recognition accuracy of 96%, outperforming other hand gestures. The remaining hand gestures also demonstrated satisfactory recognition rates, averaging 90%. The higher recognition rates for fist shake and fist spread gestures can be attributed to the enhanced responsiveness of the selected test muscle regions to these specific gestures compared to the other movements [19]. Comparing the results of other studies, Ding et al. [28] used a CNN method for gesture recognition with an average recognition rate of 78.86%, another scholar used a method based on CNN-LSTM for gesture recognition with an average recognition rate of 87%, and Huang et al. [29] used an improved deep forest method for their gesture recognition test with an average recognition accuracy of 94.14%. There is still room for further enhancement and optimization of the method proposed in this study.

6. Conclusions

This paper presents the design and implementation of an sEMG gesture recognition and control system based on the DTW algorithm. The DTW algorithm has been implied to realize the online recognition of gestures based on sEMG signals. With the DTW algorithm, the most matching time series points can be filtered and averaged from the movement samples to obtain an initial template for each practiced movement. This method can help to better reference and compare different gestures, thus improving the training effect more effectively. And according to the classification results, the six servos of the prosthetic arm would be able to complete the gesture action through PWM. The 3D-printed anthropomorphic prosthetic arm is relatively lightweight and easy to use for disabled patients. The demonstrated system has been proven to be a more robust and advanced sEMG gesture recognition and control system, with potential applications in various fields such as rehabilitation, assistive technology, and robotics. The overall results are satisfactory, but further improvements are needed to enhance the recognition rate of EMG signals and achieve better generalization for the prosthetic arm.

Author Contributions

Conceptualization, Z.Z. and T.H.; Methodology, C.H.; Software, Z.Z. and T.H.; Validation, T.H., C.H. and C.S.; Formal analysis, C.H.; Investigation, Z.Z. and C.S.; Resources, T.H. and C.H.; Writing—original draft, Z.Z., T.H. and C.S.; Writing—review & editing, Z.Z., T.H. and C.H.; Visualization, C.S.; Supervision, C.H. and C.S.; Funding acquisition, Z.Z. All authors have read and agreed to the published version of the manuscript.

Funding

Funding was provided by the Key Research and Development Program Projects of Shaanxi Province (Grant: 2023-YBSF-397 and the PhD Startup Fund of Shaanxi University of Technology (Grant: SLGQD2017-06).

Data Availability Statement

The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Li, K.; Zhang, J.; Wang, L.; Zhang, M.; Li, J.; Bao, S. A review of the key technologies for sEMG-based human-robot interaction systems. Biomed. Signal Process. Control 2020, 62, 102074. [Google Scholar] [CrossRef]
  2. Wu, J.; Li, X.; Liu, W.; Wang, Z.J. sEMG signal processing methods: A review. J. Phys. Conf. Ser. 2019, 1237, 32008. [Google Scholar] [CrossRef]
  3. Shi, X.; Qin, P.; Zhu, J.; Zhai, M.; Shi, W. Feature extraction and classification of lower limb motion based on sEMG signals. IEEE Access 2020, 8, 132882–132892. [Google Scholar] [CrossRef]
  4. Marinelli, A.; Boccardo, N.; Tessari, F.; Di Domenico, D.; Caserta, G.; Canepa, M.; Gini, G.; Barresi, G.; Laffranchi, M.; De Michieli, L.; et al. Active upper limb prostheses: A review on current state and upcoming breakthroughs. Prog. Biomed. Eng. 2023, 5, 012001. [Google Scholar] [CrossRef]
  5. Tchantchane, R.; Zhou, H.; Zhang, S.; Alici, G. A review of hand gesture recognition systems based on noninvasive wearable sensors. Adv. Intell. Syst. 2023, 5, 2300207. [Google Scholar] [CrossRef]
  6. Chen, Z.; Min, H.; Wang, D.; Xia, Z.; Sun, F.; Fang, B. A Review of Myoelectric Control for Prosthetic Hand Manipulation. Biomimetics 2023, 8, 328. [Google Scholar] [CrossRef]
  7. Narayan, Y. Comparative analysis of SVM and Naive Bayes classifier for the SEMG signal classification. Mater. Today Proc. 2021, 37, 3241–3245. [Google Scholar] [CrossRef]
  8. Vijayvargiya, A.; Singh, B.; Kumar, R.; Tavares, J.M.R.S. Human lower limb activity recognition techniques, databases, challenges and its applications using sEMG signal: An overview. Biomed. Eng. Lett. 2022, 12, 343–358. [Google Scholar] [CrossRef]
  9. Große Sundrup, J.; Mombaur, K. On the Distribution of Muscle Signals: A Method for Distance-Based Classification of Human Gestures. Sensors 2023, 23, 7441. [Google Scholar] [CrossRef]
  10. Powar, O.S.; Chemmangat, K. Reducing the effect of wrist variation on pattern recognition of Myoelectric Hand Prostheses Control through Dynamic Time Warping. Biomed. Signal Process. Control 2020, 55, 101626. [Google Scholar] [CrossRef]
  11. Powar, O.S.; Chemmangat, K. Dynamic time warping for reducing the effect of force variation on myoelectric control of hand prostheses. J. Electromyogr. Kinesiol. 2019, 48, 152–160. [Google Scholar] [CrossRef] [PubMed]
  12. Jabbari, M.; Khushaba, R.N.; Nazarpour, K. Combined Dynamic Time Warping and Spatiotemporal Attention for Myoelectric Control. In Proceedings of the 2021 43rd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Virtual, 1–5 November 2021; pp. 5940–5943. [Google Scholar] [CrossRef]
  13. Sun, Y.; Li, C.; Li, G.; Jiang, G.; Jiang, D.; Liu, H.; Zheng, Z.; Shu, W. Gesture recognition based on kinect and sEMG signal fusion. Mob. Netw. Appl. 2018, 23, 797–805. [Google Scholar] [CrossRef]
  14. Venugopal, G.; Navaneethakrishna, M.; Ramakrishnan, S. Extraction and analysis of multiple time window features associated with muscle fatigue conditions using sEMG signals. Expert Syst. Appl. 2014, 41, 2652–2659. [Google Scholar] [CrossRef]
  15. Belter, J.T.; Segil, J.L.; SM, B.S. Mechanical design and performance specifications of anthropomorphic prosthetic hands: A review. J. Rehabil. Res. Dev. 2013, 50, 599. [Google Scholar] [CrossRef] [PubMed]
  16. Zheng, K.; Liu, S.; Yang, J.; Al-Selwi, M.; Li, J. sEMG-Based Continuous Hand Action Prediction by Using Key State Transition and Model Pruning. Sensors 2022, 22, 9949. [Google Scholar] [CrossRef] [PubMed]
  17. Meattini, R.; Bernardini, A.; Palli, G.; Melchiorri, C. sEMG-Based Minimally Supervised Regression Using Soft-DTW Neural Networks for Robot Hand Grasping Control. IEEE Robot. Autom. Lett. 2022, 7, 10144–10151. [Google Scholar] [CrossRef]
  18. Ai, Q.; Zhang, Y.; Qi, W.; Liu, Q.; Chen, K. Research on lower limb motion recognition based on fusion of sEMG and accelerometer signals. Symmetry 2017, 9, 147. [Google Scholar] [CrossRef]
  19. Tosin, M.C.; Machado, J.C.; Balbinot, A. SEMG-based upper limb movement classifier: Current scenario and upcoming challenges. J. Artif. Intell. Res. 2022, 75, 83–127. [Google Scholar] [CrossRef]
  20. Phinyomark, A.; Phukpattaranont, P.; Limsakul, C. Feature reduction and selection for EMG signal classification. Expert Syst. Appl. 2012, 39, 7420–7431. [Google Scholar] [CrossRef]
  21. Shokoohi-Yekta, M.; Hu, B.; Jin, H.; Wang, J.; Keogh, E. Generalizing DTW to the multi-dimensional case requires an adaptive approach. Data Min. Knowl. Discov. 2017, 31, 1–31. [Google Scholar] [CrossRef]
  22. Yadav, M.; Alam, M.A. Dynamic time warping (dtw) algorithm in speech: A review. Int. J. Res. Electron. Comput. Eng. 2018, 6, 524–528. [Google Scholar]
  23. Cuturi, M.; Blondel, M. Soft-DTW: A differentiable loss function for time-series. PMLR 2017, 70, 894–903. [Google Scholar]
  24. Cai, S.; Lu, Z.; Chen, B.; Guo, L.; Qing, Z.; Yao, L. Dynamic gesture recognition of A-mode ultrasonic based on the DTW algorithm. IEEE Sens. J. 2022, 22, 17924–17931. [Google Scholar] [CrossRef]
  25. Zhang, H.; Yang, K.; Cao, G.; Xia, C. ViT-LLMR: Vision Transformer-based lower limb motion recognition from fusion signals of MMG and IMU. Biomed. Signal Process. Control 2023, 82, 104508. [Google Scholar] [CrossRef]
  26. Shen, C.; Ning, X.; Zhu, Q.; Miao, S.; Lv, H. Application and comparison of deep learning approaches for upper limb functionality evaluation based on multi-modal inertial data. Sustain. Comput. Inform. Syst. 2022, 33, 100624. [Google Scholar] [CrossRef]
  27. Lu, Y.; Wang, H.; Zhou, B.; Wei, C.; Xu, S. Continuous and simultaneous estimation of lower limb multi-joint angles from sEMG signals based on stacked convolutional and LSTM models. Expert Syst. Appl. 2022, 203, 117340. [Google Scholar] [CrossRef]
  28. Ding, Z.; Yang, C.; Tian, Z.; Yi, C.; Fu, Y.; Jiang, F. sEMG-based gesture recognition with convolution neural networks. Sustainability 2018, 10, 1865. [Google Scholar] [CrossRef]
  29. Huang, S.; Mao, J. Recognition method of sEMG gesture based on improved deep forest. J. Shanghai Univ. Eng. Sci. 2023, 37, 190–197. [Google Scholar]
Figure 1. Design of anthropomorphic prosthetic arm. (a) Main view of anthropomorphic prosthetic arm; (b) The assembly of the servos for the anthropomorphic prosthetic arm; (c) Design Sketch of 3D-printed components of the anthropomorphic prosthetic arm.
Figure 1. Design of anthropomorphic prosthetic arm. (a) Main view of anthropomorphic prosthetic arm; (b) The assembly of the servos for the anthropomorphic prosthetic arm; (c) Design Sketch of 3D-printed components of the anthropomorphic prosthetic arm.
Electronics 13 00454 g001
Figure 2. System design implementation.
Figure 2. System design implementation.
Electronics 13 00454 g002
Figure 3. Human display of gesture diagrams.
Figure 3. Human display of gesture diagrams.
Electronics 13 00454 g003
Figure 4. Hardware denoising and amplification process for sEMG signals.
Figure 4. Hardware denoising and amplification process for sEMG signals.
Electronics 13 00454 g004
Figure 5. Schematic diagram of moving average method.
Figure 5. Schematic diagram of moving average method.
Electronics 13 00454 g005
Figure 6. Raw data and feature extraction result of “Like” gesture. (a) Raw sEMG data of “Like” Gesture; (b) Comparison of five feature extraction methods.
Figure 6. Raw data and feature extraction result of “Like” gesture. (a) Raw sEMG data of “Like” Gesture; (b) Comparison of five feature extraction methods.
Electronics 13 00454 g006
Figure 7. Schematic of search path method of DTW algorithm.
Figure 7. Schematic of search path method of DTW algorithm.
Electronics 13 00454 g007
Figure 8. Graphical representation of the sEMG signal from different subjects.
Figure 8. Graphical representation of the sEMG signal from different subjects.
Electronics 13 00454 g008
Figure 9. Example of threshold selection.
Figure 9. Example of threshold selection.
Electronics 13 00454 g009
Figure 10. Test results of prosthetic arm control based on gesture recognition.
Figure 10. Test results of prosthetic arm control based on gesture recognition.
Electronics 13 00454 g010
Table 1. Correct rates of endpoint detection experiments.
Table 1. Correct rates of endpoint detection experiments.
Name of ActionThe Correct Rates of Specific Endpoint Detection Experiments
Fist clenching100%
Hand open98%
Wrist turning left100%
Wrist turning right100%
“OK” gesture95%
“Like” gesture99%
Table 2. DTW distance between test action samples and the reference action samples.
Table 2. DTW distance between test action samples and the reference action samples.
The Reference Action Samples
Fist ClenchingHand OpenWrist Turning LeftWrist Turning Right“OK” Gesture“Like” Gesture
Test action samplesFist clenching0.57672.72125.87644.01733.72561.0267
Hand open2.96190.34228.17691.39360.96593.5469
Wrist turning left4.25674.90240.39914.99745.83225.8123
Wrist turning right3.84152.74567.13930.56396.02346.0982
“OK” gesture2.36280.86236.58635.88230.42152.8612
“Like” gesture0.96223.21515.96336.25084.33670.5216
Table 3. Confusion matrix for different gesture recognition.
Table 3. Confusion matrix for different gesture recognition.
The Predicted ActionAccuracy/%
Fist ClenchingHand OpenWrist Turning LeftWrist Turning Right“OK” Gesture“Like” Gesture
Ture action Fist clenching3200000100.00
Hand open0320000100.00
Wrist turning left022900190.63
Wrist turning right000301293.75
“OK” gesture131027084.38
“Like” gesture200003093.75
Overall recognition rates/%93.752%
Table 4. Information about the participants.
Table 4. Information about the participants.
SexTotal AmountAge RangeWeight Range (kg)Height Range (cm)BMI Range (kg/m2)
Male1620–3055–95170–18520–29
Female1420–2945–65155–17018–23
Table 5. Confusion matrix for different gesture recognition.
Table 5. Confusion matrix for different gesture recognition.
The Action of Prosthetic ArmAccuracy/%
Fist ClenchingHand OpenWrist Turning LeftWrist Turning Right“OK” Gesture“Like” Gesture
The action of participantFist clenching960010396.00
Hand open096310096.00
Wrist turning left059201292.00
Wrist turning right000861286.00
“OK” gesture270189189.00
“Like” gesture500209393.00
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, Z.; Han, T.; Huang, C.; Shuai, C. Hardware and Software Design and Implementation of Surface-EMG-Based Gesture Recognition and Control System. Electronics 2024, 13, 454. https://doi.org/10.3390/electronics13020454

AMA Style

Zhang Z, Han T, Huang C, Shuai C. Hardware and Software Design and Implementation of Surface-EMG-Based Gesture Recognition and Control System. Electronics. 2024; 13(2):454. https://doi.org/10.3390/electronics13020454

Chicago/Turabian Style

Zhang, Zhongpeng, Tuanjun Han, Chaojun Huang, and Chunjiang Shuai. 2024. "Hardware and Software Design and Implementation of Surface-EMG-Based Gesture Recognition and Control System" Electronics 13, no. 2: 454. https://doi.org/10.3390/electronics13020454

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop