EMG-Controlled Prosthetic Hand with Fuzzy Logic Classification Algorithm

In recent years, researchers have conducted many studies on the design and control of prosthesis devices that take the place of a missing limb. Functional ability of prosthesis


Introduction
People lose limbs due to accidents and medical conditions. Robotic devices, which imitate the shape and function of a missing limb, are manufactured for use by people who lose their limb in such situations. In recent years, researchers have studied to design and control multifunctional prosthetics hand [1][2][3][4][5][6][7]. The complexity of the movement, that is, the number of independent movements, increases in proportion to the number of joints. There are 206 bones in the adult skeletal system. The 90 bones of the skull and face are connected to each other by nonimmobilized joints, and the 33 bones of the spine are connected to each other by semi-movable joints. Movable joints are only present between the bones (except the metacarpals bones) of the arm (25) and leg (25). In light of this information, aside from the wrist joints, the human hand has 15 independent joints with three on each finger. Therefore, the biological hand movement involves the control of these joints independently. Thus, control of the hand is quite complex. Thus, of all the human parts, the hand is the most complicated in terms of kinetic analysis [8].
However, no matter how perfect the design and manufacture of the prosthetic hand may be, the utility depends on the cognitive interaction, i.e., the control algorithm, being designed properly, e.g., the type of movement and coordination between fingers. If information is not transferred to the prosthetic hand rapidly enough, then the prosthesis will not assume the desired position. Cognitive interaction is the most important factor for user to use effectively. There are many studies about cognitive interaction between human and robotic devices [20][21][22][23][24][25].
All voluntary muscle movements in humans occur as a result of bioelectrical signals transmitted from the brain through the muscle nerves. Bioelectrical electromyogram (EMG) signals transmitted to the muscles carry information about the type of movement, speed, and degree of muscle contraction or relaxation. The biological hand performs the basic tasks of holding and gripping, which involve various finger movements. The wrist movements essentially constitute the axis and assist in these gripping and holding movements. The main factor that increases the functionality of the prosthetic hand is the movement of the fingers. As the number of independent movements made by the prosthetic hand increases, it can mimic the biological hand more successfully. This study realizes the design of the bioelectrical signal control algorithm and the extension of the bioelectrical signal database with the purpose of increasing the finger motion function of bioelectrical signal-controlled prosthesis hands. Figure 1 shows bioelectrical signals in the context of the activity of the muscle movements (e.g., flexion, relaxation force), as seen from the block flow diagram. EMG can be used to detect signals from the flexor pollicis longus, flexor carpi radialis, brachioradialis, extensor carpi radialis, extensor digiti minimi, and extensor carpi ulnaris. Bioelectrical signals were recorded with the help of four surface electrodes and subjected to a series of preprocessing and classification operations to understand the relationships between EMG signals and hand and finger movements. These signals were then applied to the prosthetic hand (space and simulator) as a reference motion signal. With the designed controllers, the position of the prosthetic hand finger joints can be controlled. Thus, a cognitive interface and communication network are established between the user and the prosthetic hand. Briefly summarized, the study creates a bioelectrical database of the activities of the hand muscles and the interaction network between the human and prosthetic hand using this database and interface to design a simulator and develop a control algorithm.   determined. For this reason, the raw EMG signal is first preprocessed. The block diagram of the preliminary preparation stage, including the separation, rectification, and sampling of the recorded EMG signals from noise, is shown in Figure 3.

Numerical sampling
EMG signals are analog voltage signals. Their amplitudes change constantly over the voltage range. Analog-to-digital conversion is the process by which the amplitude of the analog signal voltage is represented by a number sequence at specific time points [29][30][31]. The EMG voltage signals used in this study are converted into a number sequence by sampling with a period of 0.001 s.

Rectification process
Rectification is the evaluation of only the positive parts of the signal. This is done either by halfwave or full-wave rectification of the signal. A full-wave rectification method was applied to preserve the energy of the signal [25,[29][30][31][32][33][34], and the expression for the method is given in Eq. (1).

Smoothing of signal
A bandpass filter (50-500 Hz) was designed to soften the signal by eliminating high-frequency components.

Separate the signal into windows
Before the attributes of the obtained EMG signals are calculated, the frame is processed by the method adjacent to the signal. Experiments in the study of Englehart [18,19] for framing and optimal framing values (R = 256, r = 32 ms) reached with calculations were used.

Featured extractions of EMG signal
The EMG signal is a non-stationary, time-varying signal that varies in amplitude by random negative and positive values [25,31,32]. Bioelectrical signals have certain characteristic values, i.e., information. Features in time domain have been widely used in medical and engineering practices and researches. Time domain features are used in signal classification due to its easy  and quick implementation. Furthermore, they do not need any transformation, and the features are calculated based on raw EMG time series. Moreover, much interference that is acquired through the recording because of their calculations is based on the EMG signal amplitude. However, compared to frequency domain and time-frequency domain, time domain features have been widely used because of their performances of signal classification in low noise environments and their lower computational complexity [29]. In this study, five time domain features methods widely used in the literature have been utilized to obtain the features of the EMG signal.

Signal energy
Mathematically, the energy of the signal m (t) is calculated as in Eq. (2), where t j and t i denote the lower and upper bounds of the part of the signal to be integrated, respectively. The above expression represents the area below the absolute value of the signal curve at time T = t i -t j [30][31][32][33][34][35].

Maximum value of signal
The maximum value of the signal represents the largest of the sampled signal values in each packet divided by windows [29].

Signal average value
Mathematically, the average of the signal m (t) is calculated as Eq. (3) [30,31], where t i and t j denote the upper and lower bounds of the part of the signal to be integrated, respectively. The above expression represents the overall average of the signal at time interval T = t i Àt j .

Effective value of the signal
Effective value is a commonly used signal analysis method in the time domain, such as average rectification [29][30][31][32]. The effective value of the m(t) signal is calculated as Eq. (4).

Variance of signal
The variance value of the signal represents the amount of deviation from the mean of the sampled signal values in each packet divided by windows [30]. p(t) is the variance of the signal to represent the probability density function of t:

Pattern recognition with fuzzy logic algorithm
A classifier's function should be able to map different patterns, match them appropriately, and, in this case, select different hand grip postures. The extracted features were then fed into the fuzzy logic (FL) classifier for the developed control system. FL developed by Lofty Zadeh [35][36][37][38][39][40][41] provides a simple way to arrive at a definite conclusion based solely on imprecise input information. A summary of the feature extraction process from the forearm muscles is shown in Table 2 according to motion.
In total, there are 20 features of EMG signal for four channels. In order to make relations easier, a featured function, which occurs at RMS, AVR, MAX, VAR, and E values, is defined for each channel. Finally, the number of inputs is reduced by four. The featured function is calculated as follows in Eq. (6).
For the FL classification analysis, the triangular shape of the membership function (MF) for the inputs (F i ) and output and the centroid method for defuzzification are used. The rules are created  Figure 4 shows the flow diagram of FL classification process from four SEMG signals for six hand patterns [35].    Performance of FL tested 200 hand motions. Classification performance value for the six motions is shown in Table 4.

Rules
In the medical decision-making process, ROC analysis method is used to determine the discrimination of the test or classification algorithm. In this study, performance of FLC algorithm for six motion class are demonstrated in Table 5 via ROC analysis.
Performance values calculated as Eqs. (7)    The four outcomes can be formulated in a 2 · 2 contingency table. All contingency matrixes for each motion are shown in Table 6. 4. 3D modeling and manufacturing of prosthetic hand

3D modeling of prosthetic hand via SolidWorks
In order to develop a multifunctional prosthetic hand model, the structural characteristics of the human hand must first be determined. In other words, it is necessary to determine the number of joints, the number of links, the fingers and the length and width parameters of each finger. In order to obtain a prosthetic hand the same size as a human hand, the hand characteristics of an adult male were recorded as in Table 7 for the purposes of this study [42][43][44]. Using the parameter values in Table 5, the prosthetic hand 3D model is designed with the help of the SolidWorks program as shown in Figure 5.

Manufacturing of prosthetic hand via 3D printer
The prototype of the prosthetic hand was produced with the help of the EDISON 3D printer manufactured by 3D Design Company. The necessary adjustments for the production (e.g., resolution, amount of fullness, amount of support) were made using the Simplify 3D program, which was offered by the same company as the software program. After a hand of 16 parts was produced, it was assembled as shown in Figure 6.

Mechanical design of prosthetic hand simulator via SimMechanics
SimMechanics used in the realization of simulations of mechanical systems [45,46]. By transferring the 3D CAD model of the prosthetic hand developed in the SolidWorks program to the Matlab SimMechanics program, a chain structure containing each joint and link of the prosthetic hand was obtained as shown in Figure 7. Five fingers connected to the palm, three rotary hinges forming each finger, and three connecting links are arranged in series to form the hand SimMechanics model.  As shown in Figure 7, when SolidWorks solid model is transferred to Matlab Program, a chain structure composed of revolute and link parts is obtained.

Modeling of the DC motor
In this study, it was decided to use a DC servo motor for movement of each joint in the prosthetic hand. The equivalent circuit of the DC servo motor is given in Figure 8 [47][48][49].
Modeling equations of DC motor were expressed in terms of the Laplace variable s as Eqs.
ðLs þ RÞIðsÞ ¼ VðsÞ À K e sθðsÞ ð 12Þ We arrive at the following open-loop transfer function by eliminating I(s) between the two equations above, where the rotation is considered the output and the armature voltage is considered the input. θðsÞ Using the mathematical model of the DC servo motor, the Matlab/Simulink model is constructed as shown in Figure 9.

Controller design
Position of ultra-nano DC servomotors connected to joints is controlled using a PID controller. The controller's proportional gain coefficient (Kp), integral gain coefficient (Ki), and derivative gain (Kd) values are determined by Genetic Algorithm [11,[50][51][52] to ensure that the system quickly reaches a steady state without overshooting as shown in Table 8. The PID controller has an input-output relationship with input e (t) and output u (t) [53][54][55].

Graphical and numerical results
Electromyography is used to measure EMG signals, which are extracted from the forearm muscles and classified with the help of four surface electrodes. The type of motion that one wishes to perform is the perceived and designed three-dimensional prosthetic hand simulator All DC motors connected the each finger joints 0.42176 0.75724 0.0048566 Table 8. PID parameters. and the five-fingered and 15-jointed hand. These movements were made in real time on the prototype. Each joint of the prosthetic hand is moved with one ultra-nano servomotor, and the position control of the motors is provided by the designed PID.
The prosthetic hand was made with hand closure, hand opening, thumb-index touch, hand opening, thumb-middle touch, hand opening, thumb-ring touch, hand opening, thumb-pinkie touch, and hand opening movements. The hand opening movement is performed after the hand closing movement and touch movement.
1. EMG signals were taken from four channels, four groups of muscles simultaneously, as shown in Figures 10-13, and preprocessed. First, the signal amplitude was scaled from 0 to 10 V and then filtered.      Figures 14-17, the energy, maximum, effective, mean, and variance attribute values of the respective signals were calculated.

As shown in
3. Motion pattern was determined by motion classification algorithm.

4.
The specified type of motion information was input to the simulator and the prototype.

5.
According to the recognized hand pattern, the reference joint angles in Table 9 were applied as the control input signal, and the closed loop position control of the DC servomotors was performed according to feedback information from sensors connected to the simulator joints.
Position control of the finger joints for six hand patterns was provided by the PID controllers as shown in Figures 18-23.
For all finger joints, PID performance is shown in Table 10.

Index Middle
Ring Pinkie Thumb  Table 9. Reference value for each finger joints.

Conclusion
The main factor in increasing the functionality of the prosthetic hand to the extent of imitating biological hand functions is the movement of the fingers. The greater the number of movements the fingers can do independently of each other, the greater the ability of the prosthetic hand to move and the more successfully it can mimic the biological hand. Within the scope of this thesis, the function of the prosthetic hand is improved by six different finger movements. Bioelectrical signals of two separate users were recorded from the forearm muscles (the flexor pollicis longus, flexor carpi radialis, brachioradialis, extensor carpi radialis, extensor digiti minimi, and extensor carpi ulnaris) with the help of four surface electrode groups. Thus, a broad bioelectrical signal database was created. The recorded bioelectrical signals were subjected to a series of preprocessing and feature extraction processes to calculate the maximum, effective, mean, variance, and energy values of the EMG signals. An FL classification algorithm was developed to create an effective cognitive interaction network, and 90% classification success was obtained from these algorithms. The identified bioelectrical signals were applied to the designed three-dimensional prosthesis handheld simulator. The five-fingered and 15-jointed prosthetic hand prototypes produced with a 3D printer, and the positional control of the prosthetic finger joints was performed with the designed controllers. Each finger of the prosthetic hand was moved by an ultra-nano DC motor, and the position controls of the motors were provided by the designed PID. Thus, a cognitive interface and communication network were established between the person and the prosthetic hand with great success.