Robot arm control method using forearm EMG signals

. With the continuous improvement of control technology and the continuous improvement of people's living standards, the needs of disabled people for high-quality prosthetics have become increasingly strong. A control method of robotic arm based on surface electromyography signal (sEMG) of forearm is proposed. Firstly, the 16-channel EMG data of the forearm is obtained via the multi-channel EMG acquisition instrument and the electrode cuff as input signals, the features are extracted, then the gestures are classified and identified by the support-vector machine (SVM) algorithm, and the signals are finally transmitted to the robotic arm, so that people can teleoperate the robotic arm via sEMG signals in real time. Reduce the number of channels to lower the cost while ensuring a high and usable recognition rate. Experiments were performed by collecting EMG signals from the forearm surface of eight healthy volunteers. The experimental results show that the system's overall gesture recognition accuracy rate can reach up to 90%, and the system responds fast, laying a good foundation for manipulating artificial limbs in the future.


Introduction
In the past few decades, robotics has developed unprecedentedly and is widely used in assisted rehabilitation for the disabled. With the advancement of control technology, the accuracy of the prosthesis has also been greatly improved. There are many ways to control prostheses, and a variety of human physiological signals can be used, such as trajectory tracking [1], EEG [2,3], EOG [2,3], EMG [3,4,5]. Among them, the EMG signal has the characteristics of simple acquisition and direct correlation with the contraction and relaxation of muscle fibers, so it is widely used in clinical medicine, rehabilitation medicine, artificial intelligence and other aspects [6].
Surface electromyography signal (sEMG) is a bioelectrical signal generated by the neuromuscular activity recorded on the surface of human skeletal muscle through electrodes [7]. Specifically, the sEMG signal reflects the sum of the action potentials released during the muscle fiber activity near the recording electrode. The sEMG signal is non-stationary and easily contaminated by various factors, including not only the inherent noise of the device, environmental noise and motion artifacts, but also physiological anatomical features, which make it difficult to control the prosthesis. Therefore, there is a need to consider the use of advanced signal processing methods to handle the variability of sEMG signals. The good interactive experience of sEMG signals has a broad application prospect in the field of prosthetic control. Therefore, it is natural and intuitive for amputees to control prosthetic hands with sEMG. Regrettably, however, most commercial prosthetic hands are still very low in functionality and continue to function as decorative fake hands in life. Therefore, researchers are committed to researching new types of multifunctional human prosthetic hands, such as Southampton-REMEDI Hand [8], RTR 2 [9], MANUS [10], Karlsruhe Hand [11] and so on.
In view of the high cost of commercial prosthetic hand control, inflexible operation and poor practicality [12], this paper designs a set of real-time control system of manipulator based on myoelectric signal of forearm surface. The forearm surface EMG signals are extracted for identification and classification, and the coding forms control commands. The robot receives control commands through UDP, thereby realizing real-time interaction between humans and robots.

Experimental design
The whole system needs to connect the myoelectric acquisition device with the robot. The surface electromyography signal can be regarded as the control source. The control scheme is mainly composed of four parts: EMG signal acquisition, preprocessing and feature extraction, motion classification, and action. carried out. Specifically, the subject first acquired the 16-channel myoelectric data of the arm through a multi-channel electromyography instrument and an electrode cuff (including 7 different gestures, as shown in Figure 1 below, each action is maintained for 10 s during acquisition). Time), the data is stored locally, and the corresponding four EMG features are extracted, and then the human gesture electromyography model is trained by the classical machine learning algorithm (this experiment uses the SVM classifier). Then, after the subject rests for 10 minutes (Note: the electrode sleeve cannot be untied to prevent the electrode displacement from shifting), the above 8 gestures are randomly performed, and the corresponding surface EMG data is recorded in real time and passed the trained model. Perform real-time gesture classification. Then, the classified gesture result is transmitted to the machine control terminal through the UDP method. Finally, according to the mapping relationship between each gesture action and the arm movement (the seven groups of actions correspond to upper, lower, left, right, front, rear, and grab respectively), the corresponding motor controller commands are converted to drive the robot arm to move, thereby achieving The effect of the movement of the robot arm is controlled by the myoelectric signal. The entire system control framework is shown in Figure 2.

Apparatus
The equipment used in this article is an Elonxi multi-channel EMG acquisition device developed by Hangzhou Jiaopu Technology Co., Ltd. It mainly includes an EMG acquisition device and an electrode sleeve, as shown in Figure 3 below. Surface EMG signals.  The EMG acquisition instrument uses a sampling frequency of 1kHz and a 12-bit ADC resolution. The sEMG data obtained by the acquisition module is packaged and sent to the PC through two Bluetooth modules for analysis and processing. The device is powered by a 3.3V rechargeable lithium battery and can last up to 10 hours in a single use. In addition, since the surface EMG signal is an unstable signal and is easily susceptible to interference from the external environment, in order to be able to extract a clean signal from the surface of the human body, this device focuses on the source and characteristics of the noise. Fiveelement sEMG amplifier: passive low-pass filter, differential amplifier, band-pass filter, notch filter, and main amplifier. The passive low-pass filter is placed before the differential amplifier to suppress high-frequency noise. A differential amplifier having a high input impedance and a high common-mode rejection ratio (CMRR) is used as the first-stage amplifier. The band-pass filter can remove low-frequency motion artifacts and highfrequency white noise that exceed the sEMG frequency range (20Hz to 500Hz) (although the frequency range of the EMG signal depends to some extent on the type of electrode, the pass range is about 20Hz Bandpass filters up to 500Hz are widely accepted for filtering sEMG signals). In addition, a notch filter with a center frequency of 50 Hz is set to suppress the power line noise penetrating into the myoelectric signal through capacitive coupling, reduce negative effects and improve the robustness of the system. Finally, the main amplifier is used to further amplify the sEMG signal and adjust it to a voltage range suitable for analog-todigital conversion. Through this part of the design, the EMG data of each channel can keep its noise less than 1μV, so as to achieve a good acquisition effect.

Fig. 3. Elonxi EMG collecting device.
This experiment mainly uses the multi-channel acquisition mode, in which the electrode sleeve [13] is used, as shown in Figure 4 below. A dry electrode is used in the cuff to capture the sEMG signal. The dry electrode does not need to be used with a conductive paste, and is mainly used to measure biopotential signals. The electrode material that comes into contact with the skin is nickel-free metal, which was originally designed from a snap button. The entire cuff is built with 18 electrodes. The diameter of each electrode is 25mm, the electrode spacing is 30mm horizontally and 16mm vertically. The whole is arranged in a zigzag pattern. A total of 16 channels of EMG data can be collected. (The remaining two electrodes are bias electrodes) Fig. 4. Electrode sleeve and electrode distribution.

Feature extraction
The surface electromyography signal is rich in information. It is the time and space comprehensive result of the action potentials of multiple muscles obtained by surface electrodes on the skin surface [14]. Feature extraction is to use various methods to extract information that is valuable for research from the original EMG signals, and filter out some of the interference factors and useless information. In order to improve the response speed of the system and ensure the real-time operation of the system, we choose time-domain features with less computation and rapid acquisition as the information metric [15].
The five traditional EMG features selected in this experiment are as follows: Root mean square (RMS) records the amplitude of the surface EMG signal and reflects the degree of contraction of each muscle to a certain extent.
where N is the length of the sliding window and x_i is the i-th sample point 2. Form Waveform Length (WL) is the sum of the accumulated length of the recorded EMG signal waveform, that is, the sum of the difference between two adjacent amplitude values. The expression is as follows: 3. Zero Crossing (ZC) records the number of times the amplitude of the EMG signal crosses zero, which is related to the frequency of the signal. It is essentially a statistical analysis of the time domain characteristics of its frequency information and can reflect changes in different frequency components. In order to avoid low voltage fluctuations or background noise, threshold conditions need to be defined. The calculation definition can be expressed as: ε is a threshold to avoid low-level noise. 4. Mean Frequency (MNF) is also a frequency domain feature. It calculates the ratio of the sum of the product of the power spectrum and the frequency to the sum of the spectrum strengths. The expression is as follows: Among them, f_j represents the frequency spectrum in the frequency band, p_j represents the power spectrum intensity in the frequency band, and M is the length of the entire frequency band.
6. Auto Regressive Coefficients (AR) can also be used as features of EMG signals. The AR model is a linear, second-order moment stationary model. The EMG signal can be a linear combination of the previous sampled signal and the white noise error term. It is defined as: where p is the order of the AR model and a_i is a coefficient that is a feature of the myoelectric signal.

Classification
In the current field of pattern recognition, support vector machine (SVM) is widely used. It has the advantages of relatively complete theory, strong adaptability, global optimization, short training time, and good generalization performance. Because the system requires a low time delay to ensure the smoothness of the experimenter when manipulating the robotic arm, this method is selected as the classifier. In addition, the accuracy of the SVM support vector machine classifier is also superior to other machine learning algorithms in the field of EMG gesture recognition. SVM support vector machines can process linearly inseparable data by mapping data to higher dimensions and using radial basis functions (RBF). Specifically, we use the SVM toolbox in Matlab (Mathworks Inc., Natick, USA). Function LibSVM to build a classifier.

Robot
The experiment chose Baxter robot as the operation terminal, as shown in Figure 5 below. Baxter is equipped with a ROS (Robot Operating System) -based software development kit (SDK). The body integrates a variety of devices and sensors such as cameras, sonars, displays, etc., and is a safe, economical and powerful platform.

Fig. 5. Baxter robot.
Baxter robot is a two-arm 7-axis robot with a structure similar to a human body, including a head, two arms, a torso, and a base (two legs). A head position is equipped with a display that can rotate, nod, and display rich expressions to interact with the operator. There is also a camera above the display to observe the surrounding environment. There are 12 sonar sensors on the top of the head to detect the surrounding conditions and detect if people are approaching to prevent the robotic arm from hurting people. A low-cost PC is built into the Baxter's torso and the Baxter airborne control system Gentoo is installed. Each joint of the Baxter robotic arm has a torque feedback system that can feedback the current torque value.
Baxter's software framework is built on ROS, and its SDK is distributed on airborne computers and client computers. The on-board computer provides an independent ROS host for node management. Any remote computer can connect and control Baxter through the ROS API. The SDK of the Baxter on the client computer mainly provides function interfaces for controlling the joint motor movement of the robot and other hardware devices, defines the types of messages or services required for communication between the hardware, and also provides some auxiliary tools for robot development.

Result and discussion
The content of this experiment is an experiment of grabbing a small object by a robot based on the surface EMG signal, as shown in Figure 6 below. In order to verify the feasibility and control effect of the system, we selected 2 subjects with healthy upper limbs (the corresponding serial numbers are S1 and S2) for experiments. Before that, he had not received any operation training based on EMG signal recognition. According to the previous experimental results, we can get the number of optimized channels (that is, reduced from 16 channels to 6 channels), and their numbers are: 1, 8, 9, 10, 15, 16; 4, 8, 9, 10, 12, 16. In order to verify the effect of its channel optimization in the specific recognition scene, each subject performed 10 gestures for the 7 gesture actions in Figure 1 and recorded the correct number of recognitions, during which the gesture order was disrupted. In addition, record the time required to complete a grab operation (the starting position of each grab) for different groups of channels. Figures 7 to 10 show the visualization of different gestures during real-time EMG acquisition in two different channel optimization scenarios. Among them, Figures 7 and 9 are the EMG data used for offline training classification models, including 7 gestures for a total of 90 seconds. Figures 8 and 10 are two sets of gesture EMG signals randomly selected during real-time acquisition. The middle part is a diagram of our EMG pattern. The visualization of the EMG signal in amplitude mode only highlights the changes in the signal in the time domain, which cannot reflect the spatial relationship between different EMG channels. The EMG pattern studies different EMG signals in a spatial domain. The relationship between the channels, from which areas with strong muscle activity can be identified, so that different gestures can be clearly distinguished.     Table 1 shows the average recognition results of the subjects for the seven gestures, and the numbers represent the number of correct recognitions. Each subject repeats the experiment 3 times. The sequence of gestures in each experiment is random, but the total number of times is 70, and each action is 10 times. Finally, the average of the results of the experiments of the 2 subjects is filled in the table. It can be found from the table that using the 16-channel EMG signals can basically recognize these 7 gestures, and the recognition rate can reach 98.57%. When the number of channels is reduced to 6 channels, the recognition rate slightly decreases, but it can also Reaching 88.57% and 90% respectively, maintaining a high recognition level. In addition, we also recorded the time required for each of the two subjects to complete a grab operation using the three different channel numbers, and took the average value: 3 minutes and 44 seconds (1,8,9,10,15,16), 3 minutes and 36 seconds (4,8,9,10,12,16), 2 minutes and 55 seconds (channels 1-16). The results show that after optimizing the channel and reducing the amount of data, the specific scene recognition operation can still be completed well.

Conclusions
This study designed a manipulator control system based on forearm surface EMG signals. The system has simple control method, good real-time performance and fast response. It realizes the real-time interaction between human and robotic arm, which proves the feasibility of using surface electromyography signals to control the robotic arm and control external equipment for other physiological electrical signals in the future. Platforms and references provided. However, because the EMG signal is easily affected by factors such as muscle fatigue and sweating, the recognition results are unstable, and the operator needs to maintain a posture for a long time to continue to exert force, which is poor in experience. These factors hinder the superficial muscle-based Development of Electric Control Research. In future research work, reducing the influence of external factors on EMG signals will be the focus of work.