Next Article in Journal
Healthy Personalized Recipe Recommendations for Weekly Meal Planning
Previous Article in Journal
Enhanced Random Forest Classifier with K-Means Clustering (ERF-KMC) for Detecting and Preventing Distributed-Denial-of-Service and Man-in-the-Middle Attacks in Internet-of-Medical-Things Networks
Previous Article in Special Issue
Brain Pathology Classification of MR Images Using Machine Learning Techniques
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Implementation of an Intelligent EMG Signal Classifier Using Open-Source Hardware

by
Nelson Cárdenas-Bolaño
,
Aura Polo
* and
Carlos Robles-Algarín
Facultad de Ingeniería, Universidad del Magdalena, Santa Marta 470004, Colombia
*
Author to whom correspondence should be addressed.
Computers 2023, 12(12), 263; https://doi.org/10.3390/computers12120263
Submission received: 14 July 2023 / Revised: 22 August 2023 / Accepted: 25 August 2023 / Published: 18 December 2023
(This article belongs to the Special Issue Machine and Deep Learning in the Health Domain)

Abstract

:
This paper presents the implementation of an intelligent real-time single-channel electromyography (EMG) signal classifier based on open-source hardware. The article shows the experimental design, analysis, and implementation of a solution to identify four muscle movements from the forearm (extension, pronation, supination, and flexion), for future applications in transradial active prostheses. An EMG signal acquisition instrument was developed, with a 20–450 Hz bandwidth and 2 kHz sampling rate. The signals were stored in a Database, as a multidimensional array, using a desktop application. Numerical and graphic analysis approaches for discriminative capacity were proposed for feature analysis and four feature sets were used to feed the classifier. Artificial Neural Networks (ANN) were implemented for time-domain EMG pattern recognition (PR). The system obtained a classification accuracy of 98.44% and response times per signal of 8.522 ms. Results suggest these methods allow us to understand, intuitively, the behavior of user information.

1. Introduction

Individuals with disabilities constitute one of the populations that are most affected in terms of accessing services such as education, employment, and healthcare [1]. Governments and organizations around the world are promoting policies and strategies to improve the quality of life for this population. In 2014, the World Health Organization (WHO) established action plans to support people with disabilities by strengthening rehabilitation, assistive technology, assistance and support services, and community-based rehabilitation [2]. In the matter of motor disabilities, research and development regarding assistive technology, such as active prostheses, can play an important role in reaching these aims. Surface EMG signal processing is crucial in building active prostheses that give users a more realistic experience [3].
EMG research is being used in different applications, such as in sports medicine for fatigue monitoring [4,5,6], education [7,8], human-machine interfaces (HMI) [9], and clinical applications like diagnosis of neuromuscular disorders, among others [10,11]. In the field of prosthetics, pioneering investigations, such as those implemented in references [12,13,14], explored the use of EMG signals and served as a support for many later works, among which the most notable are the Myo Armband [15], an EMG band of eight channels [16], prostheses with electro-mechanical designs based on EMG signals, and the EMG band designed by Microsoft with a wireless system based on Zigbee with six EMG channels [17].
For the classification of EMG signals, a process of the capture and subsequent extraction of features is performed, which can be represented in the domains of time, frequency, time-frequency or space [9]. Much of the recent research focuses on the development of EMG prostheses based on multi-channel acquisition or high-density measurements [9,18,19,20]. However, these approaches came with specific challenges: having more channels will result in larger datasets [21]. Additionally, they will generate more complex configurations, incur higher manufacturing costs, lead to increased energy consumption, reduced efficiency, and pose greater difficulties for users to adapt [22,23]. Due to this, the process of signal feature extraction can potentially generate numerous representations. Consequently, this could lead to a decline in the performance of the recognition system [24]. To cater to these requirements, employing analytical tools for evaluating the extracted information is the appropriate approach. Such tools assist researchers in selecting various features and channels, while also assessing the performance of the algorithms [25].
Therefore, it is necessary to know a methodological approach that allows a better understanding of features’ behavior. For this, the analysis of the features can be performed using several approaches [26]. One of these is the filter approach, which allows the creation of information quality coefficients according to their separation, correlation or consistency. In the field of EMG signals, some of these have been the Mahalanobis distance [27,28], Bhattacharyya distance [27,29], Davies–Bouldin index [28], Fisher–Markov Selector, and Minimum Redundancy Maximum Relevance [25].
The second approach is known as Wrapper, and it involves applying an evaluation criterion, a search strategy (exponential, sequential or random), and a stop criterion to discover an optimal subset of features. In the study of biomedical signals, this approach has been utilized alongside techniques like Particle Swarm Optimization [24,30], Sequential Forward Searching [28,29], and Bacterial Memetic Algorithm [31], among other methods.
In line with the previously mentioned requirements and methods, this paper combines the simplicity approach with information analysis strategies to develop a real-time intelligent classifier for single-channel EMG signals, employing open-source hardware. In the context of EMG pattern recognition, time-domain signals were employed alongside a feed-forward neural network. Testing was conducted using forearm muscle signals corresponding to the movements of extension, pronation, supination, and flexion.
Machine Learning (ML) techniques have several advantages in various applications, making them ideal for automating complex processes and large-scale data processing. These methods improve accuracy and efficiency in decision-making and are ideal for classification and prediction tasks [32], as they learn from data and adapt over time. Among the ML methods widely used in the literature are supervised learning, unsupervised learning, reinforcement learning, decision trees, and artificial neural networks (ANN) [33].
Therefore, in this research we implement ANN because of their usefulness for modeling linear and nonlinear systems, as confirmed by the results obtained in the consulted literature [11,13,20,34,35,36]. Additionally, neural networks have also demonstrated their utility in processing time series for health-related applications. The authors of reference [37] implemented an ANN for the early prediction of COVID-19 outcomes. The preliminary findings revealed that the ANN accurately predicts intensive care unit hospitalization using only five laboratory indices. Similarly, the researchers in reference [38] utilized deep learning and ANNs to predict the health of football players, obtaining simulation results that serve as the foundation for data-driven monitoring and training.
Finally, signals were used in time-domain due to the low computational cost that facilitates implementation in low-performance platforms [10,13,19,39]. In this research, the implementation of the classifier on the Arduino Uno board using neural networks stands out as a significant contribution, with real-time processing supported by execution time calculations. Additionally, the developed user interface is highlighted, enabling the easy training of the ANN.
This paper is structured as follows: Section 2 outlines the design of the EMG signal acquisition and conditioning device, the database creation process, the proposed analysis strategies, the design of the pattern detection system, and the hardware restrictions for real-time response. The results are detailed in Section 3. Section 4 focuses on the discussion of the experiment. Section 5 describes the conclusions of the investigation.

2. Materials and Methods

Figure 1 shows the block diagram of the prototype implemented for the EMG signal classifier, which is composed of the general blocks responsible for the acquisition, digitization, and transmission of variables.

2.1. Signal Acquisition

A prototype for the acquisition of EMG signals was designed, which is composed of the pre-amplification, filtering, amplification, and DC offset summing stages (Figure 2). The input is a differential signal that is connected to terminals 1 and 2. The electrodes have been placed across two different muscle groups. Although SENIAM (Surface ElectroMyoGraphy for the Non-Invasive Assessment of Muscles) recommendations are not strictly followed [40], some investigations indicate that electrode placement is possible using more than one innervation zone per channel [9]. Thus, a single channel can contain the group muscle information sufficient for pattern recognition without the need to model a particular muscle [9,41,42]. The filters were designed considering that the frequency spectrum of EMG signal has the most power in the range of 20 to 500 Hz [4,43,44,45].
Samples were taken from the right forearm of two test subjects, using a non-invasive technique from 2 electrodes in a differential configuration (1 and 2) and a reference electrode (Figure 3) [5,9,46]. Electrode positions were strategically chosen based on the muscles relevant to the study and within areas feasible for an individual with transradial amputation [47]. The 3 M foam monitoring electrodes 2228 were used.
Once the signal was acquired, the samples were digitized using an Arduino Uno board (Single.board microcontroller, Arduino LL, Torino, PIE, Italy) with a sampling rate of 2 kHz and quantization of 10-bit. Serial communication was used between the Arduino and the computer. Based on the literature, it is observed that the signal length can have values between 50 and 400 ms and the sampling frequency can be between 500 and 2000 Hz [9,28,45,48].

2.1.1. Pre-Amplification

The EMG signal has a maximum level of 10 mV and high levels of noise from different sources. To reduce this noise and increase the amplitude of the signal, the INA128P (Instrumentation amplifier, Texas Instruments, Dallas, TX, USA, EE.UU.) was used, which has a Common Mode Rejection Ratio (CMRR) of 120 dB. Equation (1) was used to set a gain of 10.8 (Rg = 5.1 kΩ).
G = 1 + 50   k R g

2.1.2. Filters

To keep only the spectrum components with more information, several studies highlight the need to remove noise from the electrical network using a band-rejection filter, and that most of the power of an EMG signal lies between the range of 20–500 Hz [4,39,40,41]. Therefore, it was decided to suppress signals below 20 Hz, above 450 Hz, and noise from the power grid (60 Hz). The designs were performed with the UAF42 integrated circuit and Filter42 software [49].
For the first stage, a 60 Hz notch filter was implemented using a UAF42 configured with the PP4 sub-circuit [49], using the components described in Table 1.
For the second stage, a 20 Hz high pass filter with a Butterworth response was implemented, which makes it possible to attenuate motion artifacts [4]. The filter was implemented from a UAF42 configured with the PP3 sub-circuit [49]. Table 2 shows the values of the components used.
In the third stage, a 450 Hz low pass filter with a Butterworth response was implemented [9,22,42]. The components used for the PP3 sub-circuit of the UAF42 can be seen in Table 3.

2.1.3. Amplification

In this stage, the LF353 integrated circuit configured as an inverting amplifier was used. A linear potentiometer was implemented to have a variable gain between 0 and 200. A gain of 50 was used for the experiments (Figure 4).

2.1.4. DC Offset Summing

For the digitization of the signal, the Arduino board uses an analog–digital converter from 0 to 5 V, therefore, it is necessary to add 2.5 V to the signal. Figure 5 shows the circuit implemented with the LF353N. In addition, a Zener diode was implemented for stabilization of the reference voltage.

2.2. Experimental Procedure

The experiments were performed with the participation of 2 non-amputated subjects, who previously signed an informed consent. The movements of extension, pronation, supination, and flexion were recorded (Figure 6).
The session begins with a skin preparation procedure, involving cleansing with alcohol to remove moisture from the skin. A desktop application that communicates with the acquisition system was developed with MATLAB R2023a. The application is responsible for managing data collection during a measurement session with a subject. The session was performed by taking 160 trials of steady-state signals evenly distributed among the 4 study classes (40 trials per movement class). Each movement is requested randomly and stored in the database, resulting in an information structure that is represented in Figure 7.
The data acquisition was performed according to the session presented in Figure 8, in which a rest period of ~1.5 s is interleaved with a run of ~6 s. Each run follows the steps shown in Figure 9.
Speech Cue: a random instruction is presented to the test subject with the 4 possible movements (pronation, supination, flexion, and extension) through an audible signal of ~1.2 s.
Subject Feedback: after the audible signal has been reproduced, the subject performs the movement, maintains it, and instructs the operator to begin the process of recording the trial. This process takes approximately ~2.8 s.
Recording: the signal is recorded with a total duration of 128 milliseconds.
After the acquisition of all the trials, a randomization process was performed in order to eliminate the effects of the capture order in the session.

2.3. Feature Extraction and Analysis

The feature extraction of EMG signals was performed with a time-domain analysis. Features with low computational complexity, and widely used in the state of the art, were preferred [9]. Eleven features were selected: Integrated EMG (IEMG), Mean absolute value (MAV), Modified Mean Absolute Value 1 (MMAV1), Modified Mean Absolute Value 2 (MMAV2), Simple Square Integral (SSI), Variance of EMG (VAR), Root Mean Square (RMS), Waveform Length (WL) [13], Zero Crossing (ZC), Slope Signal Change (SSC), and Willison Amplitude (WAMP). The equations of each algorithm are described in reference [35]. These algorithms assume that the signal is centered at 0 and varies between positive and negative values.
To evaluate the features, two methods are proposed, one graphic and one numerical, which are specified in the following sections.

2.3.1. Numerical Analysis of Discriminative Capacity

An approach is presented to establish the quality of the representation provided by each feature, based on the minimum distance classification method [50], for which a class separability coefficient was proposed.
Let {xi(h,k), (i = 1, …, nk)} be a set of nk elements of one dimension, generated by the h feature from the xi signal, which belongs to the k class, where k = 1, …, K for each of the K classes and where h = 1, …, H for each of the H features. Based on this data, the class separability coefficient S(h) for an h feature is:
S ( h ) = 1 m 0 ( h ) k = 1 K | m k ( h ) m 0 ( h ) | ,   ( h = 1 , ,   H )
where mk(h) is the mean of the k class for an h feature to evaluate and m0(h) is the mean of the classes for an h feature to evaluate:
m k ( h ) = 1 n k i = 1 n k x i ( h , k ) ,   ( h = 1 , ,   H )
m 0 ( h ) = 1 K k = 1 K m k ( h ) ,   ( h = 1 , ,   H )

2.3.2. Graphic Analysis of Discriminative Capacity

Anscombe’s Quartet [51] and Datasaurus [52], among other data sets, have shown that graphs are a fundamental element in understanding a problem. In order to have an intuitive understanding of the differentiation capacity of each feature extraction algorithm, the data resulting from the algorithms were plotted. For each feature, a chart is made, where the x-axis represents the movement, and the y-axis represents the value obtained from the feature extracted. The movements and their associated colors are presented in Figure 10.
The violin plot method was used to represent the statistical performance of the features. If there is no overlap, with these charts it is possible to intuit the algorithm effectiveness to provide useful representation on the pattern recognition of one or more classes.

2.4. EMG Pattern Recognition System Configuration

This stage is responsible for the configuration of the Electromyographic Pattern Recognition System. From the analysis of the features, four sets were proposed to make the classification.
Full set = IEMG, MAV, MMAV1, MMAV2, SSI, VAR, RMS, WL, ZC, SSC and WAMP.
Hudgins set = MAV, ZC, SSC and WL.
Subset1 = IEMG, SSI, RMS, WL, SSC and WAMP.
Subset2 = SSI, RMS and WL.

2.4.1. Offline Training

A three-layer feed-forward ANN, with a sigmoid activation function for their hidden and output layers, was employed for machine learning classification, as depicted in Figure 11 [34]. The input layer’s size is the number of features on which the model is being trained (11 input neurons for the Full set, 4 for the Hudgins set, 6 for Subset1, and 3 for Subset2. The hidden layer consists of 6 neurons, and the output layer has 4 neurons, 1 corresponding to each movement to be classified. The model’s predicted class was determined by identifying the corresponding neuron with the highest activation. The system is augmented by the Majority Voting (MV) decision technique to avoid errors in the transient state of the signal [10,18,20]. The ANN was trained offline using MATLAB R2023a and subsequently implemented on the Arduino Uno board (Single board microcontroller, Arduino LL, Torino, PIE, Italy) [53].
For training the classifier, the information in the database was organized in three segments: Training (60%), Validation (20%), and Test sets (20%) [54] (Table 4). Data were normalized to have a variance equal to 1 and a mean equal to 0. The averages of the features and standard deviations were estimated using only the training data.
In the selection of an appropriate structure for a network, an iterative trial and error process is often required. The possible suitable networks are described by parameters such as number of layers, number of neurons per layer, regularization value, number of iterations, input data, activation function, and more. Given this complexity, and the fact that the same structure can produce high error rates, this led us to propose a selection strategy based on programmed batch training. In this method, the training can be performed several times for the same structure and the performance outcomes can then be graphically represented for subsequent selection. The optimal number of neurons in the hidden layer was chosen based on the best results obtained on the validation set while also aiming to minimize hardware resource utilization. The fmincg training algorithm included an automatic adjustment of the learning rate and stopping criteria. Moreover, we fine-tuned the regularization parameter, lambda, to enhance the model’s generalization capabilities.
This structure is validated through the computation of accuracy performance and F-Value [55]. These metrics are widely adopted in the evaluation of classification systems [11,36].

2.4.2. Implementation for Real-Time Processing

An adjacent windowing technique was used. It is emphasized that the identification and generation of a response by the classification system must be less than the time required for the acquisition of a new signal. The following statements are defined as a necessary and sufficient condition for the proposed solution to be executed in real time [56]:
  • The system must perform the acquisition of a signal while discriminating another immediately preceding it.
  • Considering that the digitalization of 256 samples takes 29.18 ms (empirical value measured by means of an oscilloscope) and that the classification window is 128 ms, the system must classify a signal in a time less than 99.6 ms.
To validate the operation, 8 random signals (2 for each class) were analyzed with the Arduino board. A comparison between the average execution time for all stages with the maximum time available was performed. It should be noted that the evaluations performed verify the execution time with EMG signals from the dataset obtained in this work (See Supplementary Material).

2.5. Desktop App and Prototype

The desktop app was designed to perform the deployment of a complete experiment for each user, from the creation of the database to the hardware implementation. The application is divided into 4 functions that can be accessed from the main interface (Figure 12).
Create Database: configures the EMG signal capture experiment for a user. Generates the database file in mat format.
Information Analysis: this section allows the application of the Numerical and Graphic Analysis of Discriminative Capacity proposed in Section 2.3.1 and Section 2.3.2. It will represent the scores in descending order to inform the researcher about the quality of each characteristic.
ANN training: contains options to configure the artificial neural network to be trained offline (Section 2.4.1). A project file is obtained with the trained neural networks and their performance.
Real-time Implementation: starting from the ANN project file, this stage writes a code for Arduino that can then be copied and pasted into the sketch ino file to load the project with all the information that the network needs to process the signals online.
In Figure 12, some of the interfaces implemented for the application are shown. Figure 12a shows the main interface of the desktop application. Figure 12b shows the stage responsible for the analysis of features. In Figure 12c, the interface for creating the database is observed. Figure 12d shows the interface developed for ANN training.
Finally, Figure 13 shows the prototype implemented for the EMG signal classifier.

3. Results and Discussion

3.1. Data Acquisition

Before performing the integration of all the elements of the prototype, the circuits designed for the acquisition of the signals were tested using the NI Educational Laboratory Virtual Instrumentation Suite (NI ELVIS, National Instruments, Austin, TX, USA, EE.UU.) and the NI myDAQ device (Data acquisition device, National Instruments, Austin, TX, EE.UU.).
Using a 1 Vpp test sinusoidal signal, the following results were obtained: low cutoff frequency of 21.4 Hz, high cutoff frequency of 469 Hz, and attenuation of −23.61 dB at the frequency of 60 Hz. These results show good performance obtained with the high-pass, low-pass and Notch filters.
The frequency spectrum obtained for extension and flexion movements is shown in Figure 14. As expected, these signals showed low amplitude levels at frequencies below 20 Hz, above 450 Hz, and close to 60 Hz.

3.2. Numerical and Graphic Analysis of Discriminative Capacity

Figure 15 shows the results of the numerical analysis obtained for all the features addressed in the present study for each subject. With the IEMG, MAV, MMAV1, MMAV2, and RMS methods, good results were obtained. This is the same case for the SSI and RMS methods.
In addition, Figure 16 shows a violin plot representation of each feature extracted from the EMG signals of the test subjects, with respect to the type of movement executed. The results obtained with four of the features are displayed. It can be observed that the IEMG, MAV, MMAV1, MMAV2, and RMS features have very similar distributions. The same happens with the SSI and VAR features.
The numerical analysis showed a better performance, in terms of the separability coefficient, for energy-based features (IEMG, MAV, MMAV1, MMAV2, SSI, VAR, RMS, and WL), and lower performance for frequency-based features (WAMP, SSC, and ZC), which matches the results reported by Phinyomark [28].
With respect to the graphic method (Figure 16), it is worth highlighting the cases of pronation and supination, since all the features have an overlap for these movements. This situation shows the difficulties the system has in discriminating these signals. Flexion and extension are the simplest movements to classify. Flexion can be easily differentiated from the IEMG, SSI, and WL features, while the extension can be detected from the IEMG, WL, WAMP, SSC, and ZC features.
The worst performances were presented in the SSC and ZC features, in which the flexion, pronation, and supination have a significant overlap. These observations are consistent with the measure of discriminative capacity used in this work, indicating that SSC and ZC are the features that have the lowest quality. The above suggests that the numerical method is consistent with an intuitive interpretation of the dataset information.

3.3. Classification System

Table 5, Table 6, Table 7, Table 8, Table 9, Table 10, Table 11 and Table 12 show the results obtained with subjects 1 and 2 for the four sets proposed in this work (Full Set, Hudgins Set, Subset1, and Subset2).
The results obtained with the performance measures for the two test subjects are shown in Table 13, Table 14 and Table 15. The confusion matrix shows that the classification system has high accuracy, although there are some difficulties with subject 2 in the detection of pronations and supinations (see Table 9, Table 10, Table 11 and Table 12), which is confirmed by the values obtained for the accuracy and the F-values (Table 13 and Table 14). These errors may be due to the supination signals of the test subjects having very low values for IEMG, SSI, and RMS, which are quite close to the extension and supination movements. It is worth highlighting that the best results in terms of the test data came from Subset2, which has the fewest features (see Table 12 and Table 14). An accuracy of 98.44% was obtained (100% for subject 1 and 96.88% for subject 2 using Subset2), which meets the accuracy percentage greater than 90% necessary for the system to be used by a user [23]. The accuracy results are comparable with those obtained in previous research, both with single channel and multichannel [9,10,23], but these results cannot be generalized to amputated subjects [57].

3.4. Execution Time

Execution times were obtained for eight EMG signals. All these signals were randomly chosen from the database, two for each class analyzed (Extension, Pronation, Supination, and Flexion) with an average time of 8.522 ms (Table 16).
With the processor incorporated in the Arduino Uno board, all calculations were performed with an average execution time of 8.522 ms. In this way, it was demonstrated that the system can run in real time, since an execution time much lower than the 99.6 ms limit value discussed in Section 2.4.2 was obtained. The processing capacity of a low-cost tool for the execution of a neural network and for the processing of EMG signals in real time was demonstrated. The processor was programmed to automatically copy the synaptic weights and general structure of the neural network from MATLAB R2023a.

4. Limitations and Future Works

Though this study employed a 60%/20%/20% split, it is important to note that, in situations with limited data, using k-fold cross-validation is recommended for optimal evaluation with less biased or less optimistic estimates. Future research will aim to improve validation estimates using this approach. Furthermore, there is the possibility of experimenting with alternative hardware options to implement a system that is even more efficient and flexible. It is also advisable to work on datasets with a greater number of trials per subject and that have records of amputee subjects.

5. Conclusions

The techniques described in this work have the potential to develop simple devices for the acquisition, conditioning, and recognition of EMG patterns in order to facilitate future implementations of prostheses. Numerical methods are a valuable tool for quickly assessing the quality of the information generated by feature extraction algorithms. Both the graphical and numerical methods proposed in this research align with previous studies and exhibit a consistent level of agreement between them. Reducing redundancy is a constructive approach to enhancing generalization performance. The Arduino Uno board, being a relatively inexpensive product, has showcased adequate hardware capabilities for the development of efficient real-time systems. This work is conceived as a proof of concept, with its subsequent stage involving the creation of a more resilient database containing signals from both healthy and amputated subjects.

Supplementary Materials

The following supporting information can be downloaded at: https://github.com/nelsoncardenas/emg_dataset.

Author Contributions

Formal analysis, A.P. and N.C.-B.; Investigation, A.P. and N.C.-B.; Methodology, A.P., N.C.-B. and C.R.-A.; Software, N.C.-B.; Validation, A.P. and C.R.-A.; Visualization, N.C.-B.; Writing—review and editing, A.P. and C.R.-A. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Fondo General de Regalías of Colombia, as part of the project titled “Desarrollo de un sistema inteligente multiparamétrico para el reconocimiento de patrones asociados a disfunciones neurocognitivas en jóvenes en conflicto con la ley en el departamento del Atlántico”, under code BPIN 20200000100006. Collaborating institutions in this project include the Institución Universitaria de Barranquilla (IUB), the Universidad del Magdalena, and the Universidad Autónoma del Caribe.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

The data presented in this study are available in Supplementary Material.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Disability and Health. Available online: https://www.who.int/news-room/fact-sheets/detail/disability-and-health (accessed on 23 May 2023).
  2. WHO Global Disability Action Plan, 2014–2021. Available online: https://www.who.int/publications/i/item/who-global-disability-action-plan-2014-2021 (accessed on 24 May 2023).
  3. Cordella, F.; Ciancio, A.L.; Sacchetti, R.; Davalli, A.; Cutti, A.G.; Guglielmelli, E.; Zollo, L. Literature review on needs of upper limb prosthesis users. Front. Neurosci. 2016, 10, 209. [Google Scholar] [CrossRef]
  4. De la Peña, S.; Polo, A.; Robles-Algarín, C. Implementation of a Portable Electromyographic Prototype for the Detection of Muscle Fatigue. Electronics 2019, 8, 619. [Google Scholar] [CrossRef]
  5. Jiménez, C.R.; Bennett, P.; García, A.O.; Cuesta Vargas, A.I. Fatigue Detection during Sit-To-Stand Test Based on Surface Electromyography and Acceleration: A Case Study. Sensors 2019, 19, 4202. [Google Scholar] [CrossRef] [PubMed]
  6. Moreno-Barriga, O.S.; Romero-Morales, C.; Becerro-de-Bengoa-Vallejo, R.; Losa-Iglesias, M.E.; Gómez-Salgado, J.; Caballero-López, J.; Vidal-Valverde, L.C.; López-López, D. Effects of Foot Structure Type on Core Stability in University Athletes. Life 2023, 13, 1487. [Google Scholar] [CrossRef]
  7. Polo, A.; Narvaez, P.; Robles Algarín, C. Implementation of a Cost-Effective Didactic Prototype for the Acquisition of Biomedical Signals. Electronics 2018, 7, 77. [Google Scholar] [CrossRef]
  8. Staderini, E.M.; Mugnaini, S.; Kambampati, H.; Magrini, A.; Gentili, S. Improved Multichannel Electromyograph Using Off-the-Shelf Components for Education and Research. Sensors 2022, 22, 3616. [Google Scholar] [CrossRef]
  9. Hakonen, M.; Piitulainen, H.; Visala, A. Current state of digital signal processing in myoelectric interfaces and related applications. Biomed. Signal Process. Control 2015, 18, 334–359. [Google Scholar] [CrossRef]
  10. Naik, G.R.; Selvan, S.E.; Nguyen, H.T. Single-channel EMG classification with ensemble-empirical-mode-decomposition-based ICA for diagnosing neuromuscular disorders. IEEE Trans. Neural Syst. Rehabil. Eng. 2015, 24, 734–743. [Google Scholar] [CrossRef]
  11. Gokgoz, E.; Subasi, A. Comparison of decision tree algorithms for EMG signal classification using DWT. Biomed. Signal Process. Control 2015, 18, 138–144. [Google Scholar] [CrossRef]
  12. Battye, C.K.; Nightingale, A.; Whillis, J. The use of myo-electric currents in the operation of prostheses. J. Bone Jt. Surg. 1955, 37, 506–510. [Google Scholar] [CrossRef]
  13. Hudgins, B.; Parker, P. A New Strategy for Multifunction Myoelectric Control. IEEE Trans. Biomed. Eng. 1993, 40, 82–94. [Google Scholar] [CrossRef] [PubMed]
  14. Childress, D.S. Myoelectric control of Powered Prostheses. IEEE Eng. Med. Biol. Mag. 1982, 1, 23–25. [Google Scholar] [CrossRef]
  15. Hassan, H.F.; Abou-Loukh, S.J.; Kasim Ibraheem, I. Teleoperated robotic arm movement using electromyography signal with wearable Myo armband. J. King Saud Univ. Eng. Sci. 2020, 32, 378–387. [Google Scholar] [CrossRef]
  16. Bebionic. Available online: https://www.ottobockus.com/prosthetics/upper-limb-prosthetics/solution-overview/bebionic-hand/ (accessed on 30 May 2023).
  17. Saponas, T.S.; Tan, D.S.; Morris, D.; Turner, J.; Landay, J.A. Making muscle-computer interfaces more practical. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, Atlanta, GA, USA, 10–15 April 2010. [Google Scholar] [CrossRef]
  18. Huang, H.; Li, T.; Bruschini, C.; Enz, C.; Koch, V.M.; Justiz, J.; Antfolk, C. EMG pattern recognition using decomposition techniques for constructing multiclass classifiers. In Proceedings of the 6th IEEE International Conference on Biomedical Robotics and Biomechatronics (BioRob), Singapore, 26–29 June 2016. [Google Scholar] [CrossRef]
  19. Samuel, O.W.; Zhou, H.; Li, X.; Wang, H.; Zhang, H.; Sangaiah, A.K.; Li, G. Pattern recognition of electromyography signals based on novel time domain features for amputees’ limb motion classification. Comput. Electr. Eng. 2018, 67, 646–655. [Google Scholar] [CrossRef]
  20. Wei, W.; Wong, Y.; Du, Y.; Hu, Y.; Kankanhalli, M.; Geng, W. A multi-stream convolutional neural network for sEMG-based gesture recognition in muscle-computer interface. Pattern Recognit. Lett. 2019, 119, 131–138. [Google Scholar] [CrossRef]
  21. Phinyomark, A.; Scheme, E. EMG Pattern Recognition in the Era of Big Data and Deep Learning. Big Data Cogn. Comput. 2018, 2, 21. [Google Scholar] [CrossRef]
  22. Mane, S.M.; Kambli, R.A.; Kazi, F.S.; Singh, N.M. Hand motion recognition from single channel surface EMG using wavelet & artificial neural network. Procedia Comput. Sci. 2015, 49, 58–65. [Google Scholar] [CrossRef]
  23. Tavakoli, M.; Benussi, C.; Lourenco, J.L. Single channel surface EMG control of advanced prosthetic hands: A simple, low cost and efficient approach. Expert Syst. Appl. 2017, 79, 322–332. [Google Scholar] [CrossRef]
  24. Too, J.; Abdullah, A.; Mohd Saad, N.; Tee, W. EMG Feature Selection and Classification Using a Pbest-Guide Binary Particle Swarm Optimization. Computation 2019, 7, 12. [Google Scholar] [CrossRef]
  25. Liu, J.; Li, X.; Li, G.; Zhou, P. EMG feature assessment for myoelectric pattern recognition and channel selection: A study with incomplete spinal cord injury. Med. Eng. Phys. 2014, 36, 975–980. [Google Scholar] [CrossRef]
  26. De Silva, A.M.; Leong, P.H.W. Grammar-Based Feature Generation for Time-Series Prediction, 2015a ed.; Springer-Verlag: Berlin/Heidelberg, Germany, 2015; pp. 13–24. [Google Scholar]
  27. Al-Angari, H.M.; Kanitz, G.; Tarantino, S.; Cipriani, C. Distance and mutual information methods for EMG feature and channel subset selection for classification of hand movements. Biomed. Signal Process. Control 2016, 27, 24–31. [Google Scholar] [CrossRef]
  28. Phinyomark, A.; Scheme, E. A feature extraction issue for myoelectric control based on wearable EMG sensors. In Proceedings of the 2018 IEEE Sensors Applications Symposium (SAS), Seoul, Republic of Korea, 12–14 March 2018. [Google Scholar] [CrossRef]
  29. Adewuyi, A.A.; Hargrove, L.J.; Kuiken, T.A. Evaluating EMG Feature and Classifier Selection for Application to Partial-Hand Prosthesis Control. Front. Neurorobotics 2016, 10, 15. [Google Scholar] [CrossRef] [PubMed]
  30. Udhaya Kumar, S.; Hannah Inbarani, H. PSO-based feature selection and neighborhood rough set-based classification for BCI multiclass motor imagery task. Neural Comput. Appl. 2016, 28, 3239–3258. [Google Scholar] [CrossRef]
  31. Zhou, D.; Fang, Y.; Ju, Z.; Liu, H. Multi-length Windowed Feature Selection for Surface EMG Based Hand Motion Recognition. In Proceedings of the International Conference on Intelligent Robotics and Applications, Newcastle, Australia, 9–11 August 2018. [Google Scholar] [CrossRef]
  32. Rahimi, I.; Gandomi, A.H.; Asteris, P.G.; Chen, F. Analysis and Prediction of COVID-19 Using SIR, SEIQR, and Machine Learning Models: Australia, Italy, and UK Cases. Information 2021, 12, 109. [Google Scholar] [CrossRef]
  33. Anbalagan, T.; Nath, M.K.; Vijayalakshmi, D.; Anbalagan, A. Analysis of various techniques for ECG signal in healthcare, past, present, and future. Biomed. Eng. Adv. 2023, 6, 100089. [Google Scholar] [CrossRef]
  34. Hagan, M.T.; Demuth, H.B.; Hudson, M.; De Jesús, O. Neural Network Design, 2nd ed.; Oklahoma State University: Stillwater, OK, USA, 2014; pp. 38–48. [Google Scholar]
  35. Chowdhury, R.; Reaz, M.; Ali, M.; Bakar, A.; Chellappan, K.; Chang, T. Surface Electromyography Signal Processing and Classification Techniques. Sensors 2013, 13, 12431–12466. [Google Scholar] [CrossRef]
  36. Gandolla, M.; Ferrante, S.; Ferrigno, G.; Baldassini, D.; Molteni, F.; Guanziroli, E.; Cotti Cottini, M.; Seneci, C.; Pedrocchi, A. Artificial neural network EMG classifier for functional hand grasp movements prediction. J. Int. Med. Res. 2017, 45, 1831–1847. [Google Scholar] [CrossRef]
  37. Asteris, P.G.; Kokoris, S.; Gavriilaki, E.; Tsoukalas, M.Z.; Houpas, P.; Paneta, M.; Koutzas, A.; Argyropoulos, T.; Alkayem, N.F.; Armaghani, D.J.; et al. Early prediction of COVID-19 outcome using artificial intelligence techniques and only five laboratory indices. Clin. Immunol. 2023, 246, 109218. [Google Scholar] [CrossRef]
  38. Alghamdi, W.Y. A novel deep learning method for predicting athletes’ health using wearable sensors and recurrent neural networks. Decis. Anal. J. 2023, 7, 100213. [Google Scholar] [CrossRef]
  39. Parajuli, N.; Sreenivasan, N.; Bifulco, P.; Cesarelli, M.; Savino, S.; Niola, V.; Esposito, D.; Hamilton, T.J.; Naik, G.R.; Gunawardana, U.; et al. Real-Time EMG Based Pattern Recognition Control for Hand Prostheses: A Review on Existing Methods, Challenges and Future Implementation. Sensors 2019, 19, 4596. [Google Scholar] [CrossRef]
  40. Seniam. Available online: http://www.seniam.org/ (accessed on 30 May 2023).
  41. Shenoy, P.; Miller, K.J.; Crawford, B.; Rao, R.P.N. Online Electromyographic Control of a Robotic Prosthesis. IEEE Trans. Biomed. Eng. 2008, 55, 1128–1135. [Google Scholar] [CrossRef] [PubMed]
  42. Simao, M.; Mendes, N.; Gibaru, O.; Neto, P. A Review on Electromyography Decoding and Pattern Recognition for Human-Machine Interaction. IEEE Access 2019, 7, 39564–39582. [Google Scholar] [CrossRef]
  43. Lajante, M.M.P.; Droulers, O.; Amarantini, D. How reliable are “state-of-the-art” facial EMG processing methods? Guidelines for improving the assessment of emotional valence in advertising research. J. Advert. Res. 2017, 57, 28–37. [Google Scholar] [CrossRef]
  44. Ehrmann, G.; Blachowicz, T.; Homburg, S.V.; Ehrmann, A. Measuring Biosignals with Single Circuit Boards. Bioengineering 2022, 9, 84. [Google Scholar] [CrossRef] [PubMed]
  45. Miften, F.S.; Diykh, M.; Abdulla, S.; Siuly, S.; Green, J.H.; Deo, R.C. A new framework for classification of multi-category hand grasps using EMG signals. Artif. Intell. Med. 2021, 112, 102005. [Google Scholar] [CrossRef]
  46. Fang, Y.; Hettiarachchi, N.; Zhou, D.; Liu, H. Multi-modal sensing techniques for interfacing hand prostheses: A Review. IEEE Sens. J. 2015, 15, 6065–6076. [Google Scholar] [CrossRef]
  47. Farina, D.; Jiang, N.; Rehbaum, H.; Holobar, A.; Graimann, B.; Dietl, H.; Aszmann, O.C. The extraction of neural information from the surface EMG for the control of upper-limb prostheses: Emerging avenues and challenges. IEEE Trans. Neural Syst. Rehabil. Eng. 2014, 22, 797–809. [Google Scholar] [CrossRef]
  48. Kaur, A.; Kumar, A. SEMG based classification using wavelet function for around shoulder muscles. J. Eng. Sci. Technol. Rev. 2017, 10, 109–114. [Google Scholar] [CrossRef]
  49. Filter Design Program for the UAF42. Available online: https://www.ti.com/lit/pdf/sbfa002 (accessed on 29 May 2023).
  50. Wang, R. Introduction to Orthogonal Transforms with Applications in Data Processing and Analysis, 1st ed.; Cambridge University Press: Cambridge, UK, 2012; pp. 450–470. [Google Scholar]
  51. Parish, C.M.; Edmondson, P.D. Data visualization heuristics for the physical sciences. Mater. Des. 2019, 179, 107868. [Google Scholar] [CrossRef]
  52. Matejka, J.; Fitzmaurice, G. Same Stats, Different Graphs: Generating Datasets with Varied Appearance and Identical Statistics through Simulated Annealing. In Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems, Denver, CO, USA, 6–11 May 2017. [Google Scholar] [CrossRef]
  53. Setiawan, J.; Ariyanto, M.; Nugroho, S.; Munadi, M.; Ismail, R. A Soft Exoskeleton Glove Incorporating Motor-Tendon Actuator for Hand Movements Assistance. IREACO 2020, 13, 1–11. [Google Scholar] [CrossRef]
  54. James, G.; Witten, D.; Hastie, T.; Tibshirani, R. An Introduction to Statistical Learning, 1st ed.; Springer: Berlin/Heidelberg, Germany, 2013; pp. 127–168. [Google Scholar]
  55. Labatut, V.; Cherifi, H. Accuracy measures for the comparison of classifiers. In Proceedings of the 5th International Conference on Information Technology, Amman, Jordan, 11 May 2011. [Google Scholar]
  56. Kuo, S.M.; Lee, B.H.; Tian, W. Real-Time Digital Signal Processing: Fundamentals, Implementations and Applications, 3rd ed.; Wiley: Hoboken, NJ, USA, 2013; pp. 1–42. [Google Scholar]
  57. Kumar, D.K.; Jelfs, B.; Sui, X.; Arjunan, S.P. Prosthetic hand control: A multidisciplinary review to identify strengths, shortcomings, and the future. Biomed. Signal Process. Control 2019, 53, 101588. [Google Scholar] [CrossRef]
Figure 1. General configuration of the acquisition system.
Figure 1. General configuration of the acquisition system.
Computers 12 00263 g001
Figure 2. Block diagram of the electromyograph implemented.
Figure 2. Block diagram of the electromyograph implemented.
Computers 12 00263 g002
Figure 3. Position of electrodes located on the right arm of the test subjects.
Figure 3. Position of electrodes located on the right arm of the test subjects.
Computers 12 00263 g003
Figure 4. Amplifier based on the LF353.
Figure 4. Amplifier based on the LF353.
Computers 12 00263 g004
Figure 5. Summing amplifier based on the LF353.
Figure 5. Summing amplifier based on the LF353.
Computers 12 00263 g005
Figure 6. Hand movements to acquire the EMG signals. (a) extension; (b) pronation; (c) supination; (d) flexion.
Figure 6. Hand movements to acquire the EMG signals. (a) extension; (b) pronation; (c) supination; (d) flexion.
Computers 12 00263 g006
Figure 7. Scheme of database information.
Figure 7. Scheme of database information.
Computers 12 00263 g007
Figure 8. Outline of the sampling session.
Figure 8. Outline of the sampling session.
Computers 12 00263 g008
Figure 9. Scheme of a run.
Figure 9. Scheme of a run.
Computers 12 00263 g009
Figure 10. Movements and their associated colors for graphical analysis.
Figure 10. Movements and their associated colors for graphical analysis.
Computers 12 00263 g010
Figure 11. Three-layer feed-forward ANN with n input neurons, 6 hidden neurons, and 4 output neurons for movement classification.
Figure 11. Three-layer feed-forward ANN with n input neurons, 6 hidden neurons, and 4 output neurons for movement classification.
Computers 12 00263 g011
Figure 12. (a) Main interface of the application; (b) Interface for the analysis of features; (c) Interface for the creation of the database; (d) Interface for the training of the neural network.
Figure 12. (a) Main interface of the application; (b) Interface for the analysis of features; (c) Interface for the creation of the database; (d) Interface for the training of the neural network.
Computers 12 00263 g012
Figure 13. Prototype implemented.
Figure 13. Prototype implemented.
Computers 12 00263 g013
Figure 14. Frequency spectrum obtained for four signals corresponding to the four positions of the database. (a) Spectrum up to 1000 Hz; (b) Spectrum up to 100 Hz.
Figure 14. Frequency spectrum obtained for four signals corresponding to the four positions of the database. (a) Spectrum up to 1000 Hz; (b) Spectrum up to 100 Hz.
Computers 12 00263 g014
Figure 15. Results of the numerical analysis of discriminative capacity. (a) subject 1; (b) subject 2.
Figure 15. Results of the numerical analysis of discriminative capacity. (a) subject 1; (b) subject 2.
Computers 12 00263 g015
Figure 16. Graphical representation of the information distribution for the EMG signals of four features: (a) IEMG; (b) RMS; (c) SSI; (d) VAR.
Figure 16. Graphical representation of the information distribution for the EMG signals of four features: (a) IEMG; (b) RMS; (c) SSI; (d) VAR.
Computers 12 00263 g016
Table 1. Characteristics of the 60 Hz Notch filter.
Table 1. Characteristics of the 60 Hz Notch filter.
ComponentValueComponentValue
f060 Hzfz60.05 Hz
Q6.05Gain1.026
RF12.65 MΩRz12 kΩ
RF22.65 MΩRz22 kΩ
RQ4.99 kΩRz312.1 kΩ
Table 2. Characteristics of the 20 Hz high pass filter with Butterworth response.
Table 2. Characteristics of the 20 Hz high pass filter with Butterworth response.
ComponentValueComponentValue
f020.10 HzRQ4.7 kΩ
Q0.707RG50 kΩ
RF14.21 MΩGain0.9894
RF24.21 MΩR2A5.49 kΩ
Table 3. Characteristics of the 450 Hz low pass filter with Butterworth response.
Table 3. Characteristics of the 450 Hz low pass filter with Butterworth response.
ComponentValueComponentValue
f0445.8 HzRQ47 kΩ
Q0.707RG51 kΩ
RF1357 kΩGain1
RF2357 kΩ
Table 4. Confusion matrix for test set data.
Table 4. Confusion matrix for test set data.
Movement TrainingCross-ValidationTestTotals
1. Extension248840
2. Pronation248840
3. Supination248840
4. Flexion248840
Totals963232160
Table 5. Confusion matrix for test set data (subject 1—full set).
Table 5. Confusion matrix for test set data (subject 1—full set).
Full SetPredicted
ExtensionPronationSupinationFlexion
ActualExtension8000
Pronation0800
Supination0080
Flexion0008
Table 6. Confusion matrix for test set data (subject 1—Hudgins set).
Table 6. Confusion matrix for test set data (subject 1—Hudgins set).
Hudgins SetPredicted
ExtensionPronationSupinationFlexion
ActualExtension8000
Pronation0800
Supination0080
Flexion0008
Table 7. Confusion matrix for test set data (subject 1—subset1).
Table 7. Confusion matrix for test set data (subject 1—subset1).
Subset1Predicted
ExtensionPronationSupinationFlexion
ActualExtension8000
Pronation0800
Supination0080
Flexion0008
Table 8. Confusion matrix for test set data (subject 1—subset2).
Table 8. Confusion matrix for test set data (subject 1—subset2).
Subset2Predicted
ExtensionPronationSupinationFlexion
ActualExtension8000
Pronation0800
Supination0080
Flexion0008
Table 9. Confusion matrix for test set data (subject 2—full set).
Table 9. Confusion matrix for test set data (subject 2—full set).
Full SetPredicted
ExtensionPronationSupinationFlexion
ActualExtension8000
Pronation0800
Supination0260
Flexion0008
Table 10. Confusion matrix for test set data (subject 2—Hudgins set).
Table 10. Confusion matrix for test set data (subject 2—Hudgins set).
Hudgins SetPredicted
ExtensionPronationSupinationFlexion
ActualExtension8000
Pronation0800
Supination0260
Flexion0107
Table 11. Confusion matrix for test set data (subject 2—subset1).
Table 11. Confusion matrix for test set data (subject 2—subset1).
Subset1Predicted
ExtensionPronationSupinationFlexion
ActualExtension8000
Pronation0800
Supination0260
Flexion0107
Table 12. Confusion matrix for test set data (subject 2—subset2).
Table 12. Confusion matrix for test set data (subject 2—subset2).
Subset2Predicted
ExtensionPronationSupinationFlexion
ActualExtension8000
Pronation0800
Supination0170
Flexion0008
Table 13. Performance measures applied to the test set (subject 1).
Table 13. Performance measures applied to the test set (subject 1).
SetAccuracyF-ExtensionF-PronationF-SupinationF-Flexion
Full set1.00001.00001.00001.00001.0000
Hudgins Set1.00001.00001.00001.00001.0000
Subset11.00001.00001.00001.00001.0000
Subset21.00001.00001.00001.00001.0000
Table 14. Performance measures applied to the test set (subject 2).
Table 14. Performance measures applied to the test set (subject 2).
SetAccuracyF-ExtensionF-PronationF-SupinationF-Flexion
Full set0.93751.00000.88890.85711.0000
Hudgins Set0.90631.00000.84210.85710.9333
Subset10.90631.00000.84210.85710.9333
Subset20.96881.00000.94120.93331.0000
Table 15. Performance measures applied to the test set (subject 1 and subject 2).
Table 15. Performance measures applied to the test set (subject 1 and subject 2).
SetSubject 1Subject 2
TrainingCross-ValidationTestTrainingCross-ValidationTest
Accuracy
Full Set1.00001.00001.00000.98961.00000.9375
Hudgins Set0.98961.00001.00000.98961.00000.9063
Subset10.98961.00001.00000.98961.00000.9063
Subset20.98961.00001.00000.98961.00000.9688
Table 16. Execution times of the EMG signal processor implemented in the Arduino uno board (2 signals were recorded for each class used in the study for a total of 8 signals).
Table 16. Execution times of the EMG signal processor implemented in the Arduino uno board (2 signals were recorded for each class used in the study for a total of 8 signals).
SignalArray Loading (ms)Feature Extraction (ms)ANN (ms)Majority Voting (ms)Total (ms)
10.3724.4603.6520.0168.500
20.3724.4643.6640.0168.516
30.3724.4603.6960.0158.543
40.3724.4763.6800.0168.544
50.3724.4603.6680.0178.517
60.3724.4603.6760.0168.524
70.3724.4283.6680.0168.484
80.3724.4483.7120.0158.547
Mean0.3724.4573.6770.0168.522
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

Cárdenas-Bolaño, N.; Polo, A.; Robles-Algarín, C. Implementation of an Intelligent EMG Signal Classifier Using Open-Source Hardware. Computers 2023, 12, 263. https://doi.org/10.3390/computers12120263

AMA Style

Cárdenas-Bolaño N, Polo A, Robles-Algarín C. Implementation of an Intelligent EMG Signal Classifier Using Open-Source Hardware. Computers. 2023; 12(12):263. https://doi.org/10.3390/computers12120263

Chicago/Turabian Style

Cárdenas-Bolaño, Nelson, Aura Polo, and Carlos Robles-Algarín. 2023. "Implementation of an Intelligent EMG Signal Classifier Using Open-Source Hardware" Computers 12, no. 12: 263. https://doi.org/10.3390/computers12120263

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