# Surface Electromyography-Based Action Recognition and Manipulator Control
## 3 Experiment  
### Design of sEMG Detection and Action Recognition System  
The whole system was composed of an acquisition subsystem, a processing subsystem, and a control subsystem. Functions of signal acquisition, wireless transmission, filtering, overlapping sliding window analysis, feature extraction, action classification, and real-time control were integrated. Data and eigenvalues could be saved and analyzed offline. The acquisition subsystem consisted of signal source, our self-developed wearable and portable acquisition device, and a wireless local area network. The acquisition device involved an acquisition board and a lithium battery. The board took the USR-C322 (Texas Instruments, Dallas, TX, USA) as the core and also had the ADS1299 (Texas Instruments, Dallas, TX, USA), which was designed for simultaneous multi-channel biopotential measurements. The ADS1299 was featured with Common Mode Rejection Ratio (CMRR)-110 dB and was integrated with a 24-bit high-resolution simultaneous-sampling \(\Delta-\Sigma\) Analog-to-Digital Converter (ADC) and PGA. The board was connected to the PC through the User Datagram Protocol (UDP) protocol, and the real-time waveform was displayed and stored by adjusting the preset parameters. The processing subsystem included a series of signal processing steps. After receiving the collected data, the PC processed data such as median filtering, Butterworth notch, Chebyshev filter, overlappingsliding window analysis, feature extraction, and network training. The eigenvalues and training network could also be saved and used repeatedly. When the training network was ready, the new samples as well as the test set, was directly input into the network and compared with the trained data to generate a classification label of actions. The control subsystem took STM32F103C8 (STMicroelectronics, Geneva, Switzerland) as the core. Six independent steering gears were adopted to control 5 fingers and palms of the 6-DOF manipulator. The fingers of the manipulator were connected with the wrist and the steering gear. When the steering gear changed the angle, the manipulator moved. The steering gear was a position servo drive, which is suitable for those control systems that require constant angle changes and can be maintained. First, the control signal enters the signal modulation chip from the channel of the receiver to obtain the DC bias voltage. Next, there is a reference circuit inside, which generates a reference signal with a period of 20 ms and a width of 1.5 ms. Later, the obtained DC bias voltage is compared with the voltage of the potentiometer and a voltage difference is output. Finally, the positive and negative output of the voltage difference to the motor drive chip determines the positive and negative rotation of the motor. We apply the serial port and save the command corresponding to the exact action, in advance. When a label is given by a classifier, the control code sequence is sent to the manipulator, so that the manipulator can follow the command and carry out the actions. At the same time, the movement of the manipulator is observed, which provides feedback to see whether the manipulator shows synchronized and the same actions, with the subjects. The overall composition is shown in Figure 3.