**2. Soft computing**

The understanding, processing or solving complex problems require intelligent systems that combine knowledge, techniques and methodologies from various sources (Zadeh, 1992). Thus, intelligent systems should aggregate human knowledge in a specific domain, adapt and learn the best way possible in environments that are constantly changing. For this reasons, it is very advantageous to use several computational techniques instead of just one, which is the essence of neuro-*fuzzy* technique: neural networks that recognize patterns and are able to adapt to changes and the *fuzzy* inference system that incorporates human knowledge for making decisions.

Typically a fuzzy system incorporates a rule base, membership functions and an inference procedure and has been presenting success in systems with applications in the presence of ambiguous elements (Begg et al., 2008; Zadeh et al., 2004). Systems combining neural networks with fuzzy systems usually have the following characteristics (Jang, 1997):


This chapter briefly presents the fuzzy techniques, adaptive algorithms, neuro-fuzzy and data clustering used in the present research.

#### **2.1. Fuzzy logic**

Computational Intelligence in Electromyography Analysis – 338 A Perspective on Current Applications and Future Challenges

accomplish or replicate all these movements.

performed movement.

**2. Soft computing** 

likely to real integration in the society.

knowledge for making decisions.

various degrees of freedom that the arm can have as developing a robotic prosthesis that can

Briefly, the myoelectric signal is the bio-signal muscle control of the human body which contains the information of the user's intent to contract a muscle and, therefore, perform a certain movement. Studies have shown that amputees are able to repeatedly generate certain standard myoelectric signals in front of intention to carry out a particular movement. It makes the use of such signal highly advantageous, because the control of a robotic prosthesis can be accomplished according to user's intention to perform a specified movement. Furthermore, detection of the myoelectric signal can be obtained noninvasively through surface electrodes. Although the distress signal has low amplitude (mV range) is sufficient for its analysis and surface electrodes are far more hygienic and convenient as the

Therefore, it is possible to distinguish certain muscle movements while processing the electrical parameters of the myoelectric signal both in time domain and frequency domain. With the characterized movements is possible to control a robotic prosthesis that aims to replicate, the best possible, the movements of a human arm. Considering that premise, this research aims to study and develop a system that uses myoelectric signals, acquired by surface electrodes, to characterize certain movements of the human arm, allowing studies between man and machine with adequate precision for future enabling the actual replacement of an amputee limb with a robotic prosthesis suitable and intuitively controlled through the remaining muscle signals. To recognize certain hand-arm segment movements, was developed an algorithm for pattern recognition technique based on neuro-*fuzzy*, representing the core of this research. This algorithm has as input the preprocessed myoelectric signal, to disclosed specific characteristics of the signal, and as output the

The present research was also preoccupy in not only distinguish certain simple movements of the human arm, but also characterize complex movements that combine several degrees of freedom, making this study more closely to the reality, in which more degrees of freedom represents an improve in the life quality of people with special needs, making them more

The understanding, processing or solving complex problems require intelligent systems that combine knowledge, techniques and methodologies from various sources (Zadeh, 1992). Thus, intelligent systems should aggregate human knowledge in a specific domain, adapt and learn the best way possible in environments that are constantly changing. For this reasons, it is very advantageous to use several computational techniques instead of just one, which is the essence of neuro-*fuzzy* technique: neural networks that recognize patterns and are able to adapt to changes and the *fuzzy* inference system that incorporates human

removal, insertion and sterilization can be accomplished by the user.

A fuzzy set is defined as a set or collection of elements with membership values between 0 and 1. Therefore, the transition between belonging or not belonging to the set is gradual and is characterized by its fuzzy Membership Function (MF) that is used to describe the fuzzy membership value given to fuzzy set elements (Begg et al., 2008) enabling the fuzzy set model linguist expression used in everyday life, such as, "the rms value of the masseter myoelectric signal is medium high". For these reasons, the fuzzy sets theory is very efficient when dealing with concepts of ambiguity (Zadeh, 1992) and allows its use in several applications.

Therefore, a fuzzy set not-empty Z in a given space **X** (���), is the set represented by equations (1) e (2):

$$Z = \{ (\mathbf{x}, \mu\_Z(\mathbf{x})); \mathbf{x} \in \mathbf{X} \} \tag{1}$$

$$
\mu\_Z \colon X \to [0, 1] \tag{2}
$$

since �� a membership function of an specified fuzzy set. This function indicates for each element ����� its membership degree to the fuzzy set *Z* between three possibilities (Rutkowski, 2005):


#### *2.1.1. Standard forms of membership functions*

A membership function (MF) is a curve that defines how a point in the input space is mapped into a membership degree between 0 and 1 (Dubois, 1980). Typically a MF is defined by a mathematical expression. Following is a few membership functions (��(�)) commonly used.

The triangular membership function or simply membership function of class *t* is defined by equation (3):

$$\mu\_Z(\mathbf{x}) = t(\mathbf{x}; a, b, c) = \begin{cases} 0, & \mathbf{x} \le a \\ \frac{\mathbf{x} - a}{b - a}, & a \le \mathbf{x} \le b \\ \frac{c - \chi}{c - b}, & b \le \chi \le c \\ 0, & c \le \chi \end{cases} \tag{3}$$

Proposal of a Neuro Fuzzy System for Myoelectric Signal Analysis from Hand-Arm Segment 341

The triangle and trapezoidal function are widely used in several applications because they are simple expressions and have suitable computational efficiency for real-time applications. However, these two membership functions are composed of straight line segments showing no soft edge at their ends. As a result, the Gaussian and Bell membership functions are

In general, the fuzzy reasoning process can be divided into four main steps that are used in

• comparison of the known facts to the fuzzy rules background facts to determine the

• combination of compatibility degrees in relation to the antecedents membership functions in a rule using fuzzy operators, for example, 'AND' or 'OR' to form the firing

• selection of all qualified consequent membership functions for the general output

A fuzzy set is characterized by its membership function and operations on fuzzy sets manipulate these functions. For further details on fuzzy operations such as adding, subtracting, inverse operation, scaling operation, among others, just as, fuzzy relations and their properties consult the works indicated in the references of this chapter (Begg et al.,

In recent years, different structures of neuro-fuzzy networks have been proposed combining the advantages of neural networks and fuzzy logic (Rutkowski, 2005). Several studies using the Mamdani type interference or the Takagi-Sugeno model. For this study the Sugeno fuzzy model proposed by Takagi, Sugeno and Kang (Sugeno, 1988; Takagi, 1985) had been used to generate fuzzy rules from a set of input and outputs. A typical fuzzy rule in the

as A and B sets of fuzzy antecedents and *z*= *f*(*x*,*y*) the crisp consecutive function. Considering the computational performance and the mathematical operations usually used (for instance, weighted sum) the Sugeno fuzzy model is the most popular inference system

Adaptive Neuro Fuzzy Inference System or ANFIS is a class of adaptive networks whose functionality is equivalent to a fuzzy inference system, proposed by Jang, which generates a

If x is equal to A and y is equal to B, then z=f(x,y) (6)

strength that indicates the degree whose part of the antecedent rule is satisfied; • application of firing strength for the consequent membership function of a rule to generate a qualified consequent membership function that represents how the firing

compatibility degree for each of the antecedent membership function;

strength was propagated and utilized in a fuzzy implication statement;

increasingly used to specify fuzzy sets (Jang, 1997).

a fuzzy inference system (Dubois, 1980):

membership.

2008; Dubois, 1980; Rutkowski, 2005).

Sugeno fuzzy model is shown in (6):

for fuzzy modeling based on input data (Jang, 1993)

**2.2. Adaptive Neuro Fuzzy Inference System** 

fuzzy rule base and membership functions automatically (Jang, 1993).

*2.1.2. Fuzzy reasoning and Sugeno fuzzy inference system* 

where *b* is the modal value (� � � � �) and *a* and *b* are the upper and lower bounds of *t*(*x*;*a*,*b*,*c*), respectively.

The Gaussian-membership function é specified by equation (4):

$$\mu\_{\mathcal{Z}}(\mathbf{x}) = g(\mathbf{x}; \sigma) = \exp\left(-\left(\frac{\mathbf{x} - \mathbf{x}}{\sigma}\right)^{2}\right) \tag{4}$$

where �̅ is the middle and � defines the width of the Gaussian curve. It is the most common membership function (Rutkowski, 2005). While Bell membership function é specified by equation (5):

$$\mu\_Z(\mathbf{x}) = bell(\mathbf{x}; a, b, c) = \frac{1}{1 + \left|\frac{\mathbf{x} - c}{a}\right|^{2b}}\tag{5}$$

where the parameter *a* defines its width, the parameter *b* its slopes, and the parameter *c* its center.

Other membership functions found in some applications are �-membership function, *S*membership function, trapezoidal-membership function and exponential-membership functions. For more details, see (Rutkowski, 2005). As an example, Figure 1 shows the standard format of the MF Gaussian and MF Bell.

**Figure 1.** Membership function: (a) Gaussian and (b) bell.

The triangle and trapezoidal function are widely used in several applications because they are simple expressions and have suitable computational efficiency for real-time applications. However, these two membership functions are composed of straight line segments showing no soft edge at their ends. As a result, the Gaussian and Bell membership functions are increasingly used to specify fuzzy sets (Jang, 1997).

#### *2.1.2. Fuzzy reasoning and Sugeno fuzzy inference system*

Computational Intelligence in Electromyography Analysis – 340 A Perspective on Current Applications and Future Challenges

commonly used.

*t*(*x*;*a*,*b*,*c*), respectively.

equation (3):

equation (5):

center.

defined by a mathematical expression. Following is a few membership functions (��(�))

The triangular membership function or simply membership function of class *t* is defined by

� � � �

where *b* is the modal value (� � � � �) and *a* and *b* are the upper and lower bounds of

� � �

where �̅ is the middle and � defines the width of the Gaussian curve. It is the most common membership function (Rutkowski, 2005). While Bell membership function é specified by

��(�) = ����(�� �� �� �) <sup>=</sup> �

where the parameter *a* defines its width, the parameter *b* its slopes, and the parameter *c* its

Other membership functions found in some applications are �-membership function, *S*membership function, trapezoidal-membership function and exponential-membership functions. For more details, see (Rutkowski, 2005). As an example, Figure 1 shows the

���

� �� � � � ��� ��� � �����

> ��� � ����� �� � � �

> > ��� ��� � �

(3)

� (4)

�� (5)

��(�) = �(�� �� �� �) = 

The Gaussian-membership function é specified by equation (4):

��(�) = �(�� �) = ��� �� ����̅

standard format of the MF Gaussian and MF Bell.

**Figure 1.** Membership function: (a) Gaussian and (b) bell.

In general, the fuzzy reasoning process can be divided into four main steps that are used in a fuzzy inference system (Dubois, 1980):


A fuzzy set is characterized by its membership function and operations on fuzzy sets manipulate these functions. For further details on fuzzy operations such as adding, subtracting, inverse operation, scaling operation, among others, just as, fuzzy relations and their properties consult the works indicated in the references of this chapter (Begg et al., 2008; Dubois, 1980; Rutkowski, 2005).

In recent years, different structures of neuro-fuzzy networks have been proposed combining the advantages of neural networks and fuzzy logic (Rutkowski, 2005). Several studies using the Mamdani type interference or the Takagi-Sugeno model. For this study the Sugeno fuzzy model proposed by Takagi, Sugeno and Kang (Sugeno, 1988; Takagi, 1985) had been used to generate fuzzy rules from a set of input and outputs. A typical fuzzy rule in the Sugeno fuzzy model is shown in (6):

$$\text{If } \mathbf{x} \text{ is equal to } \mathbf{A} \text{ and } \mathbf{y} \text{ is equal to } \mathbf{B}, \text{ then } \mathbf{z} \mathbf{w} \mathbf{f} (\mathbf{x}, \mathbf{y}) \tag{6}$$

as A and B sets of fuzzy antecedents and *z*= *f*(*x*,*y*) the crisp consecutive function. Considering the computational performance and the mathematical operations usually used (for instance, weighted sum) the Sugeno fuzzy model is the most popular inference system for fuzzy modeling based on input data (Jang, 1993)

#### **2.2. Adaptive Neuro Fuzzy Inference System**

Adaptive Neuro Fuzzy Inference System or ANFIS is a class of adaptive networks whose functionality is equivalent to a fuzzy inference system, proposed by Jang, which generates a fuzzy rule base and membership functions automatically (Jang, 1993).

$$\mathcal{O}\_{1,l} = \mu\_{A\_l}(\mathbf{x}), \qquad \operatorname{para} \; l = 1, 2 \tag{9}$$

$$\mathcal{O}\_{1,l} = \mu\_{\mathcal{B}\_{l=2}}(\mathcal{y}), \quad \operatorname{para} \; i = 3, 4 \tag{10}$$

$$\mathcal{O}\_{1,l} = \mu\_{\mathcal{C}\_{l=a}}(\mathbf{y}), \quad \text{para } i = 5, 6 \tag{11}$$

$$\mathcal{O}\_{2,1} = \omega\_l = \mu\_{\mathcal{A}\_l}(\mathbf{x})\mu\_{\mathcal{B}\_l}(\mathbf{y})\mu\_{\mathcal{C}\_l}(\mathbf{z}), \quad l = 1, 2. \tag{12}$$

$$\mathcal{O}\_{3,l} = \overline{\omega\_l} = \frac{\omega\_l}{\omega\_1 + \omega\_2}, \quad l = 1, 2. \tag{13}$$

$$\mathcal{O}\_{4,l} = \overline{\boldsymbol{\omega}}\_l \boldsymbol{f}\_l = \overline{\boldsymbol{\omega}}\_l (\mathbf{p}\_l \mathbf{x} + \mathbf{q}\_l \mathbf{y} + \mathbf{r}\_l \mathbf{z} + \mathbf{s}\_l) \,. \tag{14}$$

$$final\,\,output = \,\,\, O\_{5,1} = \sum\_{l} \overline{\omega\_{l}} f\_{l} = \frac{\sum\_{l} \omega\_{l} f\_{l}}{\sum\_{l} \omega\_{l}} \tag{15}$$

$$\begin{array}{c} = & \frac{\omega\_1}{\omega\_1 + \omega\_2} f\_1 + \frac{\omega\_2}{\omega\_1 + \omega\_2} f\_2 \\ f = & \frac{\overline{\omega\_l}(p\_1 x + q\_1 y + r\_1 z + s\_1) + \overline{\omega\_2}(p\_2 x + q\_2 y + r\_2 z + s\_2)}{(\overline{\omega\_l} x)p\_1 + (\overline{\omega\_l} y)q\_1 + (\overline{\omega\_l} z)r\_1 + (\overline{\omega\_l} z)s\_1 + (\overline{\omega\_l} x)p\_2 + (\overline{\omega\_l} z)q\_2 + (\overline{\omega\_l} z)r\_2 + (\overline{\omega\_l} z)s\_2} \end{array} \tag{16}$$


$$\mathbf{D}\_{l} = \sum\_{f=1}^{n} \exp\left(-\frac{\left\|\mathbf{x}\_{l} - \mathbf{x}\_{f}\right\|^{2}}{(r\_{a}/2)^{2}}\right) \tag{17}$$

$$\mathbf{D}\_{l} = \mathbf{D}\_{l} - \mathbf{D}\_{c1} \exp\left(-\frac{\|\mathbf{x}\_{l} - \mathbf{x}\_{c1}\|^{2}}{(r\_{b}/2)^{2}}\right) \tag{18}$$

The frequency of the muscular signals captured by the surface electrodes has a range varying from 20 to 500 Hz. Due to this fact, the EMG designed consist of two cascaded second order low-pass filters with a cutoff frequency at 1000 Hz, and two cascaded second order high-pass filters with cutoff frequency at 20Hz.

Proposal of a Neuro Fuzzy System for Myoelectric Signal Analysis from Hand-Arm Segment 347

• movement interval: 1,25 s, in which the animation keeps static at the end the going

**Figure 5.** Pictures representing the simple movements created by the virtual model: (a) resting position, (b) wrist extension, (c) wrist adduction, (d) wrist flexion (e) wrist abduction, (f) forearm flexion, (g)

In the Figure 6 is shown a static representation of the simple movements presented in video

The movements that are called complex are characterized by a combination of determined basic movements defined above. For this study, five complex movements were selected as shown in Figure 7, that are: hand contraction with forearm rotation, forearm rotation with forearm flexion; forearm rotation with forearm flexion and wrist flexion, hand contraction

For the animations of the complex movements, the same parameters of the simple movement animations were been used, but with total duration of 17 second for each

All the experiments were carried out with consent of the Subjects, according to the ethical precepts and respecting the bio signal acquisition techniques (in this case related to the myoelectric signal acquisition), like for instance the treatment of the skin, electrode

For the data acquisition the NI USB 6008 board was used. Eight pairs of electrodes located in the main muscle groups of the Subject were been used, which are the main part of the movements that were chosen to characterize: Biceps (C0), palmaris longus (C1), flexor carpi ulnaris (C2), flexor carpi radialis (C3), pronator teres (C4), extensor digitorum (C5),

brachioradialis (C6) and extensor carpi ulnaris (C7), as shown in Figure 8.

• backward movement: same duration of the forward movement (2,9 s);

• final interval: duration of 0,8 s, which the animation is again on rest position; .

• forward movement: duration of 2,9 s;

hand contraction and (h) forearm rotation.

with forearm flexion and wrist extension and flexion.

format.

complex movement.

**3.3. Experimental procedures** 

positioning among other aspects.

movement;

To perform the data acquisition was chosen the National Instruments acquisition board NI USB 6008. This board features eight analog input channels with 10 bit resolution and sampling rate of 10 kS/s. In this study we used the eight analog input channels (one entry per channel) with an acquisition rate of 1 kHz per channel.
