*3.5.2. 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.

**Figure 12.** Routine developed for definition of the fuzzy network structure.

While creating the initial fuzzy structure was necessary to define the following parameters in Matlab:

• input data: array with fuzzy inputs of the network;

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

*3.5.1. Neuro fuzzy network dimensioning* 

contains eight inputs and one output.

**3.5. Myoelectric signal preprocessing by the neuro fuzzy method** 

in Matlab is called when needed, being processed in the background.

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

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

> Hand contraction 0 Wrist extension 0.083 Wrist flexion 0.166 Forearm flexion 0.249 Forearm rotation 0.333 Hand abduction 0.416 Hand adduction 0.499 Complex 1 0.582 Complex 2 0.665 Complex 3 0.748 Complex 4 0.831 Complex 5 0.914

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,

**Table 2.** Network output values associated with the recognized movements.

*3.5.2. Fuzzy neural network structure definition* 

Movement Corresponded output


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:


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

• 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);

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

Performed movement Abbreviation Hand contraction M0 Wrist extension M1 Wrist flexion M2 Forearm flexion M3 Forearm rotation M4 Hand abduction M5 Hand adduction M6

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

Hand contraction with forearm rotation M7

Forearm rotation and flexion with wrist flexion M9

**Table 3.** Abbreviations representing the performed movements.

**Figure 14.** System output for Subject 1 – section 2 (5 repetitions).

Forearm rotation and flexion M8

Wrist extension followed by flexion M10 Hand contraction with forearm flexion M11

M0 to M11.

• 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.
