**2. Materials and methods**

#### **2.1 Data acquisition**

Raw sEMG signals were collected with Myo armband placed on forearm's transradial portion as usually performed in common applications. The Myo armband is a wireless wearable technology (**Figure 2**) and has eight medical grade stainless steel EMG sensors. Similar to other surface electrodes, the EMG signals returned by the sensors represent the electric potential of the muscles because of muscle activation. The Myo armband also has a nine-axis inertial measurement unit (IMU) which contains a three-axis gyroscope, three-axis accelerometer, and a three-axis magnetometer [14].

From these units, the orientation and movement of a wearer's arm can be determined through analyzing the spatial data provided. The angular velocity of the armband is provided in a vector format and the accelerometer represents the acceleration the Myo armband is undergoing at a given time. However, the Myo armband is better suited for determining the relative positioning of the arm rather than the absolute position, a consideration to be aware of when applying pattern recognition algorithms. Currently, the Myo armband is able to pull IMU data at sampling rate of 50 Hz. The system is supported on Windows, IOS. MAC and Android and has a Bluetooth 4.0 Smart Wireless connection and a 32-bit ARM Cortex M4 processor with a lithium battery. Signals extracted by Myo armband was processed using Matlab software.

The Myo gesture control armband was used to identify six hand gestures that are the basic ones to achieve the improvement of the grasp: power grasp, palm inward, palm out, open hand, grasp type grasp and hand in rest (**Figure 3**).

Eight datasets were recorded of six hand gestures for five healthy subjects (three males, two females). All subjects did not have any experience in attending this kind of research before. The inclusion criteria adopted in this research were as follows: no evidence in their medical history of peripheral neuropathy, diseases of the

**Figure 2.** *MYO gesture armband device and its parts,Thalmic Labs.*


**Figure 3.** *Hand gestures identify with the MYO device.*

central nervous system, and restricted mobility. The EMG signal has a typical amplitude of 6 mV, and the useful frequency is in the range from 10 to 500 Hz with the greatest amount of concentrated energy up to 150 Hz [15]. According to Calderon et al. [16], the first 400 ms of a muscular activity are enough for the identification of the movement, so the signal was extracted considering this elapsed time as shown in **Figure 4**.

The performed sequence to capture the myoelectric signals is as follows: 200 samples per second were taken for each grasp or hand gesture in an interval of 20 s, it means, there are 4000 samples per sensor. Between each one of the six proposed hand gestures transitions of 5 s were made as was recommended in [15]. The myoelectric signals capture of each sensor was executed at a frequency of 200 Hz [16].

An application for signal processing using a GUI, in the MATLAB® Classification Learner library was developed (**Figure 4**). The GUI shows nine graphs, one for each channel of the myoelectric signals with the Myo armband device and one

*Control Strategy for Underactuated Multi-Fingered Robot Hand Movement Using… DOI: http://dx.doi.org/10.5772/intechopen.93767*

#### **Figure 4.**

*(a) Acquisition of sEMG signals through the developed application in Matlab. (b) Signals obtained from the eight sensor channels.*

where all the signals are displayed. The computed data of these myoelectric signals are stored as matrices format for later offline processing.

#### **2.2 Pattern recognition system**

The proposed system for sEMG processing that includes several blocks of preprocessing, segmentation, feature extraction and the neural network development is shown in the flowchart of **Figure 5**.

#### **2.3 Preprocessing**

Usually, the collected sEMG signals are normally noisy due to ambient noise, motion artifact, inherent noise in electronics equipment, and inherent instability of the sEMG signal. When using the Myo gesture armband, practically the noise ratio in sEMG signals is low and does not affect the sEMG.

**Figure 5.**

*A flowchart for the proposed extracting sEMG signals.*

However, in the preprocessing analyses signals was forced to pass through band pass filters or adaptive filtering to eliminate the undesirable frequency content [17]. The adaptive filter is a system that receives two signals: *x n*ð Þ and *e n*ð Þ, the latter is called an error signal and becomes from the subtraction of a signal called the desired signal or reference, *r n*ð Þ, and another that is the filter outlet *y n*ð Þ (see **Figure 6**).

$$e(n) = r(n) - \wp(n) \tag{1}$$

The filter coefficients are called *w n*ð Þ, which are those that multiply the input *x n*ð Þ to obtain the output.

$$y(n) = w(n) \* \varkappa(n) \tag{2}$$

The purpose of the device is to make the error signal to be zero. For this, the system must be configured so that, from the input signal *x n*ð Þ, the output *y n*ð Þ is generated and it is equal to the signal reference *r n*ð Þ. Each way to minimize that error is an example of implementing adaptive filters. For instance, it could be proposed to minimize the cost function *J* ¼ 2 ∗ *e n*ð Þ ∗ *x n*ð Þ, applying the delta rule would obtain the new coefficients such as:

$$w(n+1) = w(n) - a\nabla f \tag{3}$$

where the constant "*α*" is used to adjust the convergence speed and avoid possible instabilities. Solving, then:

$$w(n+1) = w(n) - 2a \* e(n) \* \varkappa(n) \tag{4}$$

The algorithm implemented for learning an adaptive system could be:


The differences between raw and filtered signals are presented in **Figure 7**.

**Figure 6.** *Flowchart of an adaptive filter.*

*Control Strategy for Underactuated Multi-Fingered Robot Hand Movement Using… DOI: http://dx.doi.org/10.5772/intechopen.93767*

**Figure 7.** *The difference between raw and filtered signals.*

#### **2.4 Segmentation**

These are disjoint EMG segmentation and overlapped segmentation. In disjoint segmentation (a), different segments are used which have predefined length and these segments are used for feature extraction. In case of overlapped segmentation (b), a new segment is placed over the present segment with an increment. Thus, the disjoint segmentation deals only with the segment length while the overlapped segmentation deals with segment length and increment. Overlap technique is chosen for segmenting portion of the signal in this research work.

#### **2.5 Feature extraction**

The time domain (TD) feature is the feature extracted from EMG signal in time representation [16, 18]. TD features such as mean absolute value (MAV), zero crossing (ZC), Wilson Amplitude (WAMP), variance (VAR), and wavelength (WL) were most popular in EMG pattern recognition due to high processing speed in classification. MAV is defined as the average of total absolute value of EMG signal [6, 14]. It can be calculated as:

1.Mean absolute value: the appreciation of the absolute mean value of the x signal in segment i of N samples is given by equation:

$$\overline{X}\_{l} = \frac{1}{N} \sum\_{K=1}^{N} |\mathbf{x}\_{k}|, \text{ para } i = 1, \dots, I - 1 \tag{5}$$

2.Wavelength (WL): WL is an improvement of integrated EMG feature and is defined as a cumulative length waveform over the segment. It can be represented as:

*Biosensors - Current and Novel Strategies for Biosensing*

$$l = \sum\_{K=1}^{N} |\mathbf{x}\_k - \mathbf{x}\_{k-1}| \tag{6}$$

3.Zero crossing (ZC): it has frequency related features, which represents counts of how much signal amplitude crosses the zero amplitude over time segment. It is measuring the frequency shift and shows the number of signal sign variations. The mathematical representation of ZC is as follows

$$\text{ZC} = \sum\_{K=1}^{N} \text{sgn}\left( [\mathbf{x}\_k - \mathbf{0}.4][\mathbf{x}\_{k+1} - \mathbf{0}.4] \right) \tag{7}$$

where

$$\text{sgn}\,(\mathfrak{x}) = \begin{cases} \mathbf{1}\,\mathfrak{x} > \text{Limit} \\ \\ \mathbf{0}\,\text{the rest} \end{cases}$$

4.Wilson amplitude (WAMP): this is the number of times that the difference between two consecutive amplitudes in a time segment becomes more than threshold. It can be formulated:

$$\text{WAMP} = \sum\_{K=1}^{N} f(|\mathbf{x}\_k - \mathbf{x}\_{k+1}|) \tag{8}$$

5.Variance (VAR): it is used to determine thickness, density of EMG signal power.

$$VAR = \frac{1}{N-1} X\_k^2 \tag{9}$$

#### **2.6 Classification**

The EMG data taken from muscle myoelectric signals were grouped in a vector to be used as inputs in a creation of a back-propagation neural network as in [19–21], with 20 neurons in the occult layer and 6 outputs. Thirty characteristic vectors were taken for each of the six selected movement patterns (power grasp, inward palm, outward palm, open hand, pincer grasp and rest), which allowed the training of the network.

#### **2.7 Creation of the artificial neural network**

Neural networks are created using Matlab software. To train and test the network, the dataset is divided into three sets. Datasets were divided in 60% for training, 20% for testing and 20% for validation. This is the most common method of neural network validation [19, 22, 23]. The true error is calculated directly as the test set error, and bias can be calculated by subtracting the apparent error (training set error) from the test set error.

#### **2.8 CAD design**

The five-fingered underactuated prosthetic hand was design using Solidwork 2019 package. This hand has five fingers, driving each one by a DC motor, a worm gear transmission and a four bar mechanisms [24–27] (**Figure 8**). Each finger has three joints. The manufacturing of the hand prostheses was carried out with an

*Control Strategy for Underactuated Multi-Fingered Robot Hand Movement Using… DOI: http://dx.doi.org/10.5772/intechopen.93767*

Ultimaker 3 printer for its good performance and excellent print quality of the figures with a thickness, height and amplitude from a design made by a computer. The polylactic acid or polylactide thermoplastic was used as a raw material.
