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

© 2012 Winkler Favieiro and Balbinot, licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Proposal of a Neuro Fuzzy System for Myoelectric Signal Analysis from Hand-Arm Segment


Introduction
Many with disabilities have some difficulties in integrating into society due to impossibility or to restriction in performing simple tasks of day-to-day. This situation is gradually changing by virtue of technological development in the biomedical instrumentation area in respect of human rehabilitation and especially with in the development of assistive technology managed by computational intelligence (computing algorithms and learning machines using techniques as fuzzy logic, artificial neural networks, genetic algorithms, support vector machines, among others). Scientific researches in this area are allowing the development of several mechanisms to improve the life quality of people with special needs, making them more independent and more likely to real social and economical integration.
It's possible to cite, for example, research related to robotic prosthesis. The development of system managed by myoelectric signals (MES) with the intention to mimic the human arm movement, is far from perfect, making the subject of many researches (Ajiboye & Weir, 2005;Chan et al., 2000;Englehart & Hudgins, 2003;Hincapie & Kirsch, 2009;Hudgins et al., 1991;Hudgins et al., 1994;Jacobsen et al., 1982;Katutoshi et al., 1992;Khushaba et al., 2010;Momen et al., 2007;Park & Meek, 1995). These researches are mainly being conducted in able-bodies subjects to verify the feasibility and performance of different algorithms for pattern recognition using EMG signals from the forearm muscles. In these studies are usually employed a high number of electrode pairs, ranging from 4 to 12. Using classification patterns techniques such as LDA, fuzzy logic, among others, was found high accuracies (>90%) for the classification of different moves ranging from four to ten. Develop a robotic prosthesis as similar as possible to the human arm is not a simple task. There are great difficulties both in the area of distinguish the various degrees of freedom that the arm can have as developing a robotic prosthesis that can accomplish or replicate all these movements.
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 removal, insertion and sterilization can be accomplished by the user. 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 performed movement.
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 likely to real integration in the society.

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): • human knowledge presented in the form of rules, for example, if-then; • computational models based on biological models, such as the use of neural networks for pattern recognition; • optimization techniques, such as the use of a hybrid technique; • construction of a model with data sample; • numerical computation instead of symbolic computation.
This chapter briefly presents the fuzzy techniques, adaptive algorithms, neuro-fuzzy and data clustering used in the present research.

Fuzzy logic
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): 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): • ( ) = 1 means the full membership of element x to the fuzzy set Z, in others words, ; • ( ) = 0 means the lack of membership of element x to the fuzzy set Z, in others words, ∉ ; • 0 < ( ) < 1 means a partial membership of element x to the fuzzy set Z.

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): 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): 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): 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, Smembership 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. 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).

Fuzzy reasoning and Sugeno fuzzy inference system
In general, the fuzzy reasoning process can be divided into four main steps that are used in a fuzzy inference system (Dubois, 1980): • comparison of the known facts to the fuzzy rules background facts to determine the compatibility degree for each of the antecedent membership function; • 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 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 strength was propagated and utilized in a fuzzy implication statement; • selection of all qualified consequent membership functions for the general output membership.
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): If x is equal to A and y is equal to B, then z=f(x,y) 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)

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).
Typically the ANFIS network topology consists of connected nodes that depend on parameters that change according to certain learning rules that minimize the error criteria. The learning technique most commonly used is the gradient method, however Jang proposed hybrid learning rule which includes the Least Square or simply LSE Estimator (Jang, 1993).
Considering a fuzzy system with three inputs x, y and z one output, v and a fuzzy inference Sugeno model. One possible set of rules is shown in equations (7) and (8): Rule 1: If x is equal to A1, y is equal to B1, and z is equal to C1, then f1 = p1x + q1y + r1y + s1 (7) Rule 2: If x is equal to A2, y is equal to B2, and z is equal to C2, then f2 = p2x + q2y + r2z + s2 (8) as an example, Figure 2 illustrates the reasoning mechanism for the Sugeno inference model. The equivalent ANFIS architecture is presented in Figure 3 with nodes of same layer having similar functions. Following is an explanation for each of the network layers based on Jang's excellent text (Jang, 1997). The first layer of Figure 3 is represented by adaptive nodes i whose functions are determined by equations (9), (10) and (11): where x, y or z entries in node i and Ai Bi-2 and Ci-4 linguistic labels associated with that node. Thus, O1,i represents the pertinence degree to the fuzzy set A (A1, A2, B1, B2, C1 or C2) and specifies the degree to each input x, y or z satisfies the fuzzy set A. The membership function µ can be any of the membership functions presented in section 2.1.1. Importantly, when the values (called the premise parameters) of the membership function are changed, the function varies, i.e., display various types of MF to the fuzzy set A.
Proposal of a Neuro Fuzzy System for Myoelectric Signal Analysis from Hand-Arm Segment 343 The layer 2 has fixed nodes indicated by Π with outputs that represents the input signals product, as indicated in equation (12) -the output nodes represent the firing strength of a given rule: In layer 3 the fixed nodes are referred to N. The ith node calculates the firing strength rate of rule ith to the sum of all firing strength of rules, given by equation (13) -the nodes in layer 3 are generally known as normalized firing strength: Layer 4, for example, the nodes i are adaptive with the function given by equation (14): where is a normalized firing strength from layer 3 and { , , , } the set of parameters (called consequence parameters) of this node.
The last layer of the Figure 3 has only one fixed node called Σ that determines the final output as the sum of all signals represented by equation (15): Considering the architecture shown in Figure 3 it can be seen that while the values of the parameters of the premises is fixed, the final output can be expressed as a linear combination of consequence parameters. Therefore, the output can be rewritten, for example, by the linear equation with the following consequence parameters: p1, q1, r1, s1, p2, q2, r2 and s2 (see equation 16): The hybrid training algorithm is based on the following criteria: In the forward step of the hybrid algorithm, the outputs of the nodes will forward to the layer 4 and the consequence parameters are identified by the least squares method. In the backward step, the error signal is propagated backward and the premise parameters are updated by gradient descent method (Jang, 1993)

Subtractive clustering
The utilization of clustering algorithms allows characterization and organization of data, but also the construction of models from a database. Basically clustering divides data sets derived from a large group into similar groups. Clustering can be used to model an initial fuzzy network, in other words, to determine the fuzzy rules. For this purpose, the clustering technique is validated based on the following propositions: • Similar entries in a target system should be modeled to produce similar outputs; • These similar pairs input-output are packed in clusters of the training data set.
The technique subtractive clustering proposed by Chiu, considers any data points as candidates for the cluster centers (Chiu, 1994). Using this method, the processing is proportional to the number of data points, independent of the size of the problem under consideration.
For example, is a collection of n data points {x1,...,xn} in an M-dimensional space, whose points were normalized to a hypercube. Since each data point is candidate for the cluster center, the density measurement at each point xi is defined by equation (17): where ra is a positive constant. A point will have a great density it has many neighbor points. The radius ra defines the neighborhood and the points outside of the neighborhood contribute very little to the density measurement.
After the density measurement (Di) is calculated for all of the points, the point with highest density is selected to be the center of the first cluster. If xc1 is the selected point and Dc1 your density value, the measured density for each point is revised according to the expression shown in (18): After reviewing the density of each point, the next center xc2 is selected and all of the density measures of the points are revised again. This process is repeated until a sufficient number of clusters are created. When applied the subtractive clustering technique for a set of input-output data, each cluster center will represents a prototype that exhibits certain characteristics of the system being modeled. This cluster centers are used as centers of the premises of the fuzzy rules in a zero order Sugeno model.

Experimental methods
To help understanding, a block diagram of the proposed system is presented in the Figure 4. In the following sections are presented detailed discussions of the key elements that make up this block diagram. The proposed experimental apparatus consists of an LCD screen that generates visual stimulus with animations of random movements of the hand-arm segment which should be replicated by the user An 8-channel electromyography is used with surface electrodes placed in strategic places and previously defined in the right arm to capture the myoelectric signal during displayed movements. Through a data acquisition board, the myoelectric signal is digitized and processed in a portable computer, where it is filtered and analyzed by software using the technique of pattern recognition, based on neuro fuzzy systems. Finally, the system has as output the characterization of the movement and also verifies if the executed movement was well recognized.

Electromyograph and data acquisition system
Electromyograph is a device used to capture the myoelectric signals with the help of electrodes. The electromyograph used in this work was developed in the research project coordinated by Balbinot (Balbinot, 2005).
The recording signal is performed using bipolar electrodes of passive configuration. Located near the electrodes, in each acquisition cable, was used an instrumentation amplifier with differential input, INA118, to minimize the noise as the amplitude of the acquired signal is in mV. The signal is amplified up to 1000 times 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.
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.

Virtual model
Virtual human body models are used in many applications that allow human-machine Interaction. The virtual model created in this work aims to help the standardization of tests for the acquisition of the myoelectric signal. With this virtual model is possible, for the Subject, visualize the movement to be performed during the tests, so that all Subjects perform as best as possible, the same movements at the same time base and at the same time, leaving the system more user-friendly. For the development of the virtual model we used the software MakeHuman Alpha5 and Blender 1.0 Beta 2:54.
Initially, MakeHuman software was used to define the parameters of the humanoid (height, weight, sex) that is subsequently exported to the software Blender. This virtual model is a skeleton whose manipulative joints are used to define the positions that it should take (Tale & Balbinot, 2011). For the development of the animation it was necessary to set the start and end position and movement timing of each of the respective movement. The software then builds an animation by connecting the two points during a defined duration. Also was established a rest position which was adopted for all movements. Importantly, all movements start from the rest position, run and return to it. It should be noted that after the generation of virtual models, a video of the animations are created using a standard rate of 24 fps Avi format.
To display the animations, a routine in Labview was developed enabling the reading of Avi files and reproduction of videos representing the virtual model through a window of Windows Media Player. This window opens in the auxiliary display (LCD screen in Figure  4) being viewed only by the user of the system. The operator sees only the Labview programming window on the laptop screen, where it is shown that the signal is being acquired during the tests.
The set of movements generated through the virtual model was divided into two groups: simple and complex movements (sequence of simple movements). There are seven simple movements represented in Figure 5, which are: wrist flexion; hand contraction, wrist extension, forearm flexion, forearm rotation, hand adduction and hand abduction. For the simple movements were adopted the following time sequence with a total duration of each animation of 8.3 s: • Initial interval: 0,4 s in which the animation will be on rest position; • forward movement: duration of 2,9 s; • movement interval: 1,25 s, in which the animation keeps static at the end the going movement; • 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; . In the Figure 6 is shown a static representation of the simple movements presented in video format.
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 with forearm flexion and wrist extension and flexion.
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 complex movement.

Experimental procedures
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 positioning among other aspects.
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.  To start the acquisition, after correct positioning of the electrodes, the Subject is instructed to replicate the animations of the virtual model, which appear on the LCD screen, using a moderate strength. In order to standardize the testing of signal acquisition was adapted to the methodology proposed by Li (Li, 2010), considering the following aspects: • each test consists of 5 sessions; • is generated a random sequence of animations for each session of the test; • each session is composed of 5 repetitions of each of the 12 selected movements; • between movements, the Subject should rest for 3 seconds; • each Subject participates in a single test.
In the figure 9 is shown a picture of one of the sessions. A Labview routine was developed to interface with Matlab to generate the sequence of movements (See figures 6 and 7) randomly. The output is a vector with a random order of the movements of the virtual model presented to the user.

Acquisition and signal pre processing
The programming language chosen for the development of the proposed system software is Labview (Laboratory Virtual Instrument Engineering Workbench) from National Instruments.
The acquisition and generation of the myoelectric signals database were obtained through a routine created in Labview software to read the input data acquired through the NI USB 6008 card and store them in a file.
To choose the sample rate was considered that the myoelectric signal of interest in this work is in the range 20-500 Hz, and most of the energy of this signal is in the frequency range 50-150 Hz based on this information, the sampling frequency used was 1 kHz which is suitable for the proposed system. For this specification, 1 ms was sufficient to identify the user movements.
The online acquisition is performed in a way that the signal is transferred to the computer in time windows of 50 ms, thought the acquisition board, and the signal is stored in a FIFO (First In First Out) queue, in which the stored time windows are being processed according to the acquisition order, ensuring no data loss. Figure 10 shows the corresponding flowchart of this stage. According to the flowchart shown in Figure 10, the data acquisition and processing are used simultaneously, since it is possible to perform parallel routines in Labview (note that the real parallelism is only supported from the Labview 2010 package).

Calibration procedure
The calibration of the system aims to achieve specific characteristics of the voluntary muscle signal, as each person may have a different muscle activity. Thus, the calibration allows that the system is generic and therefore adapts itself to different users. The calibration procedure of the system involves capturing the muscle signal in a time of relaxation and in a moment of maximum voluntary contraction (MVC). Figure 11 shows a brief block diagram of the calibration procedure. This step involves eight Boolean variables (SNR (x), x = 1.2 .. 8) indicating that all channels of myoelectric signal acquisition were correctly calibrated. If a pair of electrodes is not properly positioned, the distress signal has low quality, and once again must be repositioned until the signal / noise ratio is at least greater than 2 -value established based on the signal acquisition trials previously conducted with this electromyograph (Favieiro, 2009).
For the calibration of each channel, initially an acquisition of the signal is performed with the muscle in rest position. Then the signal is processed to calculate the average peak values. Later on a MVC movement is performed and captured, and after this, again the average peak value is calculated. With this information is possible to evaluate the signal to noise ratio (SNR) that is given by dividing the value processed during the movement with MVC by the value found when captured a rest movement.
A percentage ranging from 30-50% of the average peak values of the acquired signal with the maximum voluntary contraction (MVC) is then used to determine, during processing of the signal, the threshold value which indicates whether or not a muscle contraction occurring during the process of windowing the signal.

Preprocessing procedures
Were used mathematical procedures typically used in the myoelectric signal analysis to preprocess the signal and generating one or more characteristics of interest to the classification stage.
The techniques used are this stage was (for further details consult Favieiro, 2011): • removal of DC component (offset adjustment); • full-wave rectification; • windowing the signal of interest; • determining the rms value of the signal of interest.
The signal is analyzed in periods of 50 ms, since it provides a comprehensive overview of the signal but, at the same time, specific, since it does not occur in tests muscle relaxation in period shorter than the determined, resulting in an efficient analysis of runtime system and results. To perform the windowing of the signal, the period in which a muscle contraction occurs were developed a routine in Labview which analyses the signal every 50 ms, where each channel is analyzed simultaneously, ensuring if in these data windows occurs a signal peak with value above the threshold. To consider that a movement is taking place is necessary to satisfy the following assumptions: • is considered that the channel is active if, in the processed time window, there are any peaks above the threshold limit. Considering the threshold a variable that has a value ranging from 30-50% of the respective channel MVC. This percentage is defined empirically according to preliminary test conducted with a user; • is necessary that at least three channels have a peak above the respective threshold, i.e., being active. This is done to ensure that any random noise introduced in at least one channel interfere with the signal windowing; • the signal must be considered active, at least 80% of the last 20 windows, i.e., the last one second. The history of activation of the channels is taken into consideration to try to ensure that a movement is actually occurring.
With these assumptions satisfied, it is considered that a movement is occurring, and in turn, the signal is windowed in all channels simultaneously, considering the same time based for the beginning and end of the muscle contraction. Another assumption considered important is if two sequential movements were spaced in time by up to 3 seconds, they will be considered one single movement and the beginning time of the first movements and the end time of the second are used to define a new single window containing these two movements. Thus, ensuring that complex movements are not considered two or more distinct movements by the signal windowing.
The set time of 3 seconds has been based on in the resting time of the Subject, which is 3 seconds. Thus, the windowing of a movement is determined only after a time longer than 3 seconds without the occurrence of a movement, only then is possible to analyze the windows stored in each channel, calculating the rms value from each channel in the occurrence time of a muscle contraction.

Myoelectric signal preprocessing by the neuro fuzzy method
The step of characterizing the signal is achieved by a neuro fuzzy type ANFIS. The system takes as input the rms values of each pre-processed data acquisition channel. Presents as output the movements characterized that are being carried out by the human arm. The system ANFIS used in this research was implemented using the Matlab tool (Fuzzy Logic Toolbox). The fuzzy neural network is interfaced via Labview, where the routine developed in Matlab is called when needed, being processed in the background.

Neuro fuzzy network dimensioning
First was set the number of network inputs, which can vary from 2 to 8 depending on the number of channels which is intended to analyze. The channel that will be used on the network can be selected by the operator of the system which the developed routine performs reading of all channels and automatically separates the desired channels for processing. This function has as input the array of channels to be selected and as output only the desired channels. The output of the neuro-fuzzy networks is considered fixed, containing the 12 movements previously determined. The output values ranges from 0 to 1, and for each movement there is a corresponding fixed known value, as shown in Table 2.
He developed structure is a fuzzy network type Sugeno obtained in the generation of a initial structure adapted from a input-output set acquired in the systems tests. The structure contains eight inputs and one output.

Fuzzy neural network structure definition
To adjust the system it is necessary first creates an initial fuzzy network, which should be representative of the Subject data. For this, was used the subtractive clustering technique, which can generate, from a input-output data, membership functions of input and output, and the fuzzy rules structure for type Sugeno. This technique was chosen because it obtained good results in preliminary studies cases, its routine is represented in Figure 12. This routine is performed using the MatlabScript node that defines a script to be run in Matlab. While creating the initial fuzzy structure was necessary to define the following parameters in Matlab: • input data: array with fuzzy inputs of the network; • output data: array with the expected output for the input data set; • membership function: the Gaussian function was selected because it is a smooth function on the edges, have shown better results in these trials; • radius: was selected the value of 0.1, which represents the influence radius of the cluster, when it is considered a unitary hypercube. The smaller the radius, more clusters are created and, consequentially, a greater number of rules.
In the first Subject assay, the expected input and output values are used to create the system initial structure representing the fuzzy network of 8 inputs, 60 clusters (i.e., 60 rules) e one output, generated for a system assay, and adjust it later to adapt to represent more faithfully a model that can characterize the Subject movements.
After creating the initial fuzzy structure is necessary to adapt the membership functions for the data acquired in the session, thus making a fine adjustment of the functions, leading to results more consistent with the ones expected. The adaptation step is very important, because it help to better define the limits and parameters of the membership functions, leaving the model best suited for the Subject. In this step were used a hybrid training function. The hybrid training is a combination of the gradient method with the LSE method to optimize the time convergence of the model, since it reduces the demand on the dimensional space. This function used the following parameters, according to the routine which utilized the MatlabScript function represented in Figure 13: • initial fuzzy network, created from the subtractive clustering technique; • input data: array with the network fuzzy inputs; • output data: vector with the expected output for the input data set; • number of training epochs: the value 10 was selected , which defines the number of training cycles, i.e., the maximum number of times the training set is presented to the network. An excessive number of cycles can lead to loss of power to the network generalization (over fitting). On the other hand, with a small number of cycles, the network cannot reach its best performance (under fitting); • target error: the value 0 was selected, which consists in terminate the training after the mean square error falls below a predetermined value α. Figure 13. Training routine of the neuro-fuzzy network.
As output of the training step, is generated a fuzzy network with adapted membership functions to a particular Subject, causing the limits of each functions to be left according to the training data.

Results and discussion
This topic will discuss the test performed during system development, and the results obtained. It is important to note that the pre-processing routine and calibration have already been validated in previous studies (Favieiro, 2009;.
Subjects participating in this research present an age range of 20±5 years old, of both sexes. Altogether were conducted trials with seven Subjects. The abbreviations of the characterized movements are presented in Table 3.
It is worth noting that the parameters of ANFIS training were the same for all Subjects. Figure 14 represents the result of section 2 for Subject 1 where is possible notice that for the movement M11 that is the hand contraction with the forearm flexion, 40% of the error was due to the fact that the network believed was dealing with movement M0 (hand contraction) which represents partially the movement performed. Another movement in which occurred the incorrect recognition was the M4 (forearm rotation) with M3 (forearm flexion), causing 60% of error, which may occur since these movements uses muscle in common, such as the biceps, and were used only surface electrodes.
As an example, Table 4 represents the average accuracy rate of the system for each movement per session, and the overall average of each movement per session for the Subject 1. The movements with lower hit rate are: hand contraction (M0), forearm rotation (M4) and hand contraction and forearm rotation (M11), with 65%, 57% and 50% hit rate, respectively. It happened by the similarity of M4 to M3 (forearm flexion) and by the similarity between M0 to M11.

Performed movement Abbreviation
Hand contraction M0

Hand adduction M6
Hand contraction with forearm rotation M7

Forearm rotation and flexion M8
Forearm rotation and flexion with wrist flexion M9 Wrist extension followed by flexion M10 Hand contraction with forearm flexion M11 Table 3. Abbreviations representing the performed movements.   Table 4. Summary of the system average accuracy rate to the subject 1.

Comparison between subjects
As an example, Figure 15 shows the average accuracy rate for movement M10 for all Subjects. The average score was higher than 70% in all cases. This happened mainly because of the simple movements that compose the M10 movement are easily detectable antagonistic movements. Like the movements M1 and M2 achieved accuracy rates above 75% in most cases. Figure 15. Results of movement M10. Figure 16 represents the average of all tests performed for each movement. Analyzing the graph it is clear that the more accurate movements were M1, M2, M5 and M10 (combination of M1 and M2), with averages rates of approximately 80%. These movements are quite distinct, which increases the accuracy rate of the system. The worst case occurred with the movement M11, which had an average hit rate below 50%, it combines simple movements used in most of the complex movements performed, impairing the correct recognition.
Overall the system achieved an average accuracy of 65%.

Comparison between the researched results and other studies
The vast majority of studies in the area of recognition of hand-movements of the arm segment are based on the classification of simple movements, not taking into account combined movements, as was the aim of this study. As it was possible to see the results of this work, most of the errors were caused by similar movements, or the differentiation of compound movements with their simple movements. The human arm has many degrees of freedom and be able to develop a system that can characterize many different movements and combined is where the real challenge and for this reason is an active area of research ).
Comparing the system developed by Chan using fuzzy techniques which were classified four simple movements using only two channels with an accuracy of 91% (Chan, 2000). Also a system was developed by Ajiboye to characterize four classes of movements using four channels, obtaining an accuracy of 86% (Ajiboye, 2005). These systems had similar results to those found in the preliminary study of this research in which the neuro fuzzy technique was used to classify five distinct movements using three channels of signal acquisition, obtaining an accuracy of 86% ). Demonstrating the system using only simple movements and a limited number of channels achieved accuracy higher than that found to characterize the combined movements.
Compared with the research of Momen which categorize nine distinct movements, using only the rms characteristic of the window processed and four acquisition channels obtained an average accuracy of 48.9%. This study is very similar to the system developed, in the sense that uses the same characteristic of the signal and making a direct comparison of the average hit rate of the developed system is 30% higher than to 9 moves obtained per Momen (Momen, 2007 Another difference that it is important to note is that the proposed study used only one feature extracted for each channel, unlike other studies that use up to 13 features per channel, whose average accuracy was 87% for the classification of 10 distinct movements (Khushaba, 2010).

Conclusions
The proposed system was designed to use a limited amount of up to 8 channels of the myoelectric signal acquisition and with the assistance of a more robust artificial intelligence technique was able to verify the validity of this system in terms of performance in the characterization of 11 distinct movements, including 5 complex movements. In tests, the mean peak signal with a maximum voluntary contraction (MVC) appeared at least four times greater than the average peak signal at a time of muscle relaxation. Thus, was possible determine a level ranging from 30 to 50% of MVC to differentiate a time of muscle contraction, representing a movement. With the windowing signal occurs at the instant when a movement occurs, is possible to obtain the rms value for each of the channels 8 and to use these values as input to a neuro fuzzy network with one output an up to 8 inputs. This network aims to characterize the movements that are being executed. The network is adapted in accordance with supervised training, to evaluate system performance over time. As can be seen on the results, some movements have achieved a lower hit rate, this may occur due to poor signal quality, user error, and the quantity of motion that was presented to the neuro fuzzy network, since most of the errors were caused by similar movements, or the differentiation of compound movements with their simple movements, which have a response very similar in rms value, causing the network to get confused. The average accuracy obtained was 65% of hit rate to 11 distinct movements in tests of long duration, about three hours.
Also, it's important to notice that the vast majority of studies in the area of recognition of hand-movements of the arm segment are based on the classification of simple movements, not taking into account combined movements, as was the aim of this study. The preliminary study of this research in which the neuro fuzzy technique was used to classify five distinct simple movements using three channels of signal acquisition, obtained an accuracy of 86% ). Demonstrating the system using only simple movements and a limited number of channels achieved accuracy higher than that found to characterize the combined movements.
The human arm has many degrees of freedom and be able to develop a system that can characterize many different movements and combined is the real challenge of this kind of research, which will really improve the life quality of people with special needs, making them more independent and more likely to real social and economical integration.

Future studies
It would be very important in future studies performing the tests with a larger number of volunteers, to conduct a robust statistical analysis of results, and allow a more robust assessment of its results, its flaws and strengths. Is ongoing the use of the system with Volunteers with total and partial amputation of the upper limb. This is crucial for research to find out how the system would apply and adapt, it is possible to ascertain the validity of future control system for a prosthetic hand-arm segment by myoelectric signals. Another proposal for further work would find other characteristics that could be extracted from the signal to improve the performance of the fuzzy neural network, so that the system would be able to characterize a wide range of complex movements with a hit ratio above 90%, and a higher capacity to differentiate motion. One way to improve the hit rate of the system is to implement a feedback to the user, to the person performing the test whether they are doing it correctly, avoiding common errors of distraction, or applying excessive force.