Artificial Neural Network Accuracy Optimization Using Transfer Function Methods on Various Human Gait Walking Environments

— A bionic leg with ergonomic functionality can increase the user’s independence. However, an ergonomic bionic leg can be challenged to be developed. One of its challenges is related to functionality, where the bionic leg motor can be rugged to adapt to the user. One of the solutions for the bionic leg challenge is the application of a motor driver controlled by the user’s muscle signal. EMG signal can be utilized as the user’s signal source. The EMG signal is then fed back into the motor device. EMG signals obtained during a natural walking environment can result in smooth and natural movement. This study classifies EMG signals into 8 classes: a controlled walking environment (treadmill walking with various speeds) and a natural walking environment (ground walking, upstairs and downstairs walking). This research aims to optimize the ANN method using transfer function variations. The best method will be used to train EMG-driven motors for future studies related to bionic legs. The best ANN parameter in this research using Levenberg-Marquardt backpropagation as a training algorithm with transfer function pairing of the exponential function: Hyperbolic tangent sigmoid transfer function and SoftMax transfer function with 98.8% accuracy and 0.036 MSE value. The best method from the experiment and ANN classification can be used as a training method for a bionic leg in future research.


I. INTRODUCTION
Recent studies related to active foot prostheses and bionic legs show the development in the topic of robots' natural movement achievement utilizing user and device interaction and communication [1]- [3].Interaction and communication between user and device can be achieved using surface electromyography (EMG) and muscle signals recorded during walking activity [3], [4].One method to achieve natural movement of active foot prostheses or bionic legs is using EMG-driven devices [5].EMG signals recorded from belowlimb muscles can be fed back into motors to achieve better and more natural movement.This present study classified human gait in various environments using artificial neural networks (ANN) with transfer function methods optimization.The ANN method optimization in this study will be used as bionic leg training for future studies.
Human gait classification research has been done extensively with various sensors [4], [6]- [8] and machine learning methods [4], [5].However, not a lot of research reports the EMG classification based only on surface EMG (sEMG) sensor data [4], [9], [10].Previous studies recorded EMG signal data using mobile phone sensors consisting of an accelerometer and gyroscope [6].Another study used an Inertial Measurement Unit (IMU) sensor as an EMG signal [7], [8].Some studies have similarities with this present study, which used only the sEMG sensor as a data acquisition device [3], [4], [9], [10].The difference between the present study and studies that have been conducted previously lies in the sEMG sensor type used as a data acquisition device.Previous studies used sEMG, which have been on the market or databases that have been published online, i.e., Wave plus wireless, Cometa Milan, Italy [3], Medical Technology, Italy, Version PCI-32 ch2.0.1 [4] and bilateral EMG, HuMoD database [9], [10].Meanwhile, this current study uses a novel sEMG sensor called Myomes [11], [12].Our research team in Indonesia has developed Myomes.
A lot of previous studies classified human gait based on EMG signals during treadmill walking, where some researchers stated that treadmill walking affected gait performance [4].To achieve natural movement, EMG signals are suggested to be recorded during various natural walking environments such as ground walking, upstairs walking, downstairs walking, uphill terrain walking, and downhill terrain walking [3], [4].This study conducted EMG signals data acquisition in two walking environments: Controlled and natural.Controlled environment EMG signal data acquisition was done during treadmill walking.Meanwhile, the natural environment is conducted during natural movements such as ground walking, upstairs walking, and downstairs walking.A study by [7] classified walking environment into four classes, i.e., incline down, incline up, walking, stairs down, and stairs up.Some studies classified walking environment into five classes [3], [13].
Walking signals recorded from IMU sensor are classified into walking, running, going upstairs, going downstairs, and standing [13] while the more recent study [3] classified sEMG into walking flat-ground, upstairs, downstairs, uphill, and downhill.Another study [14] also differentiated EMG signals into 5 classes, i.e., level ground, upstairs, downstairs, pump, and down ramp.Meanwhile, this current study classified sEMG signal-based walking gait into 8 classes, i.e., controlled movement during treadmill walking with 5 various speeds and natural movement consisting of ground walking, upstairs walking, and downstairs walking.All of the previous studies [3], [7], [13], [14] This study classified below-limb EMG signals based on natural movement in both controlled and natural environments.To our best knowledge, no study has classified below-limb EMG signals into 8 classes with a combination of controlled and natural environments.
Previous studies recorded the EMG signals from more research participants than this study [3], [4].However, this present study involved a more comprehensive range of ages from 25 years old to 40 years old.This present research also involved both gender males and females as research participants; meanwhile, previous research focused on male participants [3], [4].Below limb EMG signals classification has been widely conducted utilizing various machine learning methods [3], [4], [15]- [20].A study by [16] compared three machine learning methods to classify gait signals from EMG.The three classification methods are Convolutional Neural Networks (CNN), Support Vector Machine (SVM), and Knearest neighbors (KNN).The study found that CNN had the highest accuracy among the three methods.Another research uses ANN as a classifier.Recent study [3] used ANN to classify walking environments with the Butterworth filter but did not use EMG features.A study found that complicated data acquisition protocol can increase the ANN accuracy [15], the study used the sigmoid function as one of the layers.EMG features have been calculated in other studies [17], [19], [20].Some studies used 5 time-domain features [17] and other used 14 time domain features [19], meanwhile, another incorporated 11 EMG features with time domain and frequency domain combination [20].The gap between this study's analysis and another study lies in the various transfer function combinations used, and the 12 features consist of both time-domain and frequency-domain features.

A. Participants
EMG data were recorded from five healthy research participants aged 25 -40.Table 1 shows the list of research participants, including their height, weight, and Body Mass Index (BMI) information.According to [21], based on BMI value, all participants fall into healthy and normal weight categories.All research participants had never undergone below-limb surgery, never experienced knee joint pain, and did not have pathological conditions that affected walking abilities.All participants can also walk normally on the ground, up and down the stairs, and on various treadmill speeds.Research participants' selection was based on age range and health condition considerations, where all participants did not smoke or drink alcoholic beverages, and all participants included light exercises in their daily activities.

B. Experimental Procedures
EMG data collection was conducted using a surface EMG kit called Myomes [11], [12], developed by the Center for Biomechanics, Biomaterial, Biomechatronic, and Bio Signal Processing (CBIOM3S).CBIOM3S is a research center specializing in biomedical device development.Located at Integrated Laboratory Universitas Diponegoro, Semarang, Central Java, Indonesia, CBIOM3S has produced a wide range of products and research related to the biomedical engineering field, i.e., artificial knee joint [22], biodegradable bone screw [23] and foot prosthesis [24], [25].This present study used a 1000 Hz sampling frequency.This sampling frequency was selected based on the Nyquist rate where 800-1000 Hz frequency sampling is needed for the EMG experiment to avoid signal deviation and aliasing effect [16].Myomes signal amplitude ranges between 1 to 10 mV and is converted into percentage units [12].65.32 m/min)) and natural environment (ground walking, up and down the stairs).Myomes electrode was attached on four different below-limb muscles as seen in Fig. 2. Myomes electrode was attached using hypafix onto gastrocnemius medial head (Fig. 2(a)), bicep femorus longus (Fig. 2(b)), vastus lateralis (Fig. 2(c)) and tibialis anterior (Fig. 2(d)).Electrode placement was based on professional opinion and SENIAM recommendation [26].

C. Classification Method
This research used ANN as a classification method with Levenberg-Marquardt backpropagation as a training algorithm.Levenberg-Marquardt backpropagation was chosen as the training algorithm due to its better performance than another training algorithm [12].Some studies found that Levenberg-Marquardt backpropagation has classification results above 95% [27]- [30].EMG signals were classified into 8 classes, i.e., treadmill walking with speed 1, labeled as T1, treadmill walking with speed 2, labeled as T2, treadmill walking with speed 3, labeled as T3, treadmill walking with speed 4, labeled as T4, treadmill walking with speed 5 labeled as T5, ground walking labeled as GW, walked upstairs Labelled as UW and walked down stair labeled as DW.This present research mainly focused on the human walking environment so that the gait is not parted.The EMG signal used in this research was one full walking gait, as presented in Fig. 3.   2 shows the list of transfer function pairings used in this study.ANN performance in this research is then defined using the mean square error (MSE) function.

A. EMG Data Acquisition
Various walking environments will result in different EMG signals.The signal pattern is consistent with previous research findings, which stated that a controlled environment, e.g., treadmill walking, affects gait performance [4].Fig. 5 (a)-(e) can be seen and compared to Fig. 5 (f), where the participants did the ground walking, and there was a decreased length of the stance phase.Fig. 5 (e) illustrated that the faster the treadmill, the greater the gait performance affected.Fig. 5 (a), where treadmill speed variation 1 (7.26 m/min), the initial contact, and initial swing show the highest EMG signal at 28% from 0-38 s and 35% from 76-105 s.This record resembles Fig. 4(b), where participants walked on a treadmill under speed variation 2 (20.80 m/min).Fig. 4(b) showed that initial contact and swing had the highest EMG signals, 55% from 0-31 s and 55% from 48-70 s.This value indicated that research participants can still walk comfortably in speed variations 1 and 2. Meanwhile, Fig. 4(c), (d), and (e) show initial contact at 80% from 0-30 s, 95% from 0-45 s, and 96% from 0-37 s.The initial swing shows a decreased value close to zero, indicating that at variation 3 (35.76m/min), variation 4 (50.61m/min), and variation 5 65.32 m/min) the research participants are close to running.
Meanwhile, for the natural environment, Moyes detected full stance phase length.Fig. 5 (f), where research subjects did ground walking, shows a full gait consistent with the sketch in Fig. 3(a).Fig. 5 (g) and (h) indicated the same pattern between upstairs walking and downstairs walking, where mid-stance and initial swing had the highest EMG signal value.

B. Classification Result
Based on previous research [12], [27]- [30] Following the finding that Levenberg-Marquardt backpropagation had the best accuracy result for gait detection, this present research used the same training algorithm.Fig. 6 shows the ANN training accuracy for each transfer function pairing.Hyperbolic tangent sigmoid transfer function labeled as tansig, SoftMax transfer function labeled as SoftMax, elliot 2 symmetric sigmoid transfer function labeled as elliot2sig, elliot symmetric sigmoid transfer function labeled as elliotsig, positive linear transfer function labeled as poslin and linear transfer function labeled as purelin.Fig. 6 indicated that tansig-softmax pairing had the best training accuracy result at 99.2%.The confusion matrix is based on Table 3, where rows indicate the predicted classes (output classes), and columns correspond to true classes (target classes).Diagonal cells (bold marks) are information regarding the EMG signal that has been correctly classified.All the off-diagonal columns are the EMG signal data which have been incorrectly classified.Recall (true positive rate) shows the percentage of all EMG data that is correctly classified.The classification result shows that the ANN method with Levenberg-Marquardt backpropagation and transfer function pairing between Tansig and SoftMax resulted in the highest accuracy at 98.8%.This result is consistent with previous findings which stated that exponential activation function (tansig and SoftMax) results in higher accuracy than non-exponential activation function (Elliotsig, elliot2sig, poslin and Purelin) [31].The finding in this present paper is also consistent with a study by [32] ANN with Levenberg-Marquardt backpropagation and transfer function pairing between Tansig and SoftMax performed better accuracy.The ANN model with various transfer function combinations for different layers is then evaluated using the MSE value.Fig. 7 shows the MSE value for other combinations.Lowest MSE value means that the accuracy is higher in the model [33].The MSE value from Fig. 7

IV. CONCLUSION
From the experiment and ANN classification which have been conducted, a conclusion can be derived that ANN method with Levenberg-Marquardt backpropagation and transfer function pairing (as seen in Table 3) is the pairing that result 98.8% accuracy which exponential transfer function (tansig and SoftMax).This shows better result than previous study where classified EMG signal into five walking environment and conducted ANN classification without EMG features [3].Table 5 resume the comparison of this present study and previous studies.From Table 5, it can be concluded that the tansig-softmax transfer function pairing is suitable for bionic leg training in future studies.The pairing shows the highest overall accuracy while maintaining a low MSE value.
Fig.1 illustrates the research flow method, which consists of EMG data acquisition and a classification process.The classification process includes calculating EMG features and classifying them using ANN.

Fig. 3
Fig. 3 Gait illustration: (a) ground walking and treadmill walking and (b) Upstairs and downstairs walking Classification steps consist of: (i) Feature calculation, (ii) ANN data preparation and (iii) ANN Classification.There were 12 EMG features included in this research for feature calculation.The EMG features consist of 8 time-domain features and 4 frequency domain features.The 8 time-domain features were integrated EMG (IEMG), mean absolute value (MAV), EMG variance (VAR), root mean square (RMS), log detector (LOG), waveform length (WL), kurtosis (KU) and skewness (SK).Meanwhile, the frequency domain features were mean frequency (MNF), median frequency (MF), total power (TTP), and mean power (MNP).In ANN data preparation, EMG signals, which have been feature

Fig. 4
Fig. 4 ANN network structure Fig. 4 illustrated the ANN network with 12 EMG features calculated as input, 25 neurons in hidden layer and 8 output represented class classification mentioned above, i.e., TI, T2, T3, T4, T5, GW, UW and DW.The hidden layer shown in Fig.3 consists of two, which each layer represented with different transfer function.This present research used various pairing of transfer function methods to optimize ANN accuracy.Table2shows the list of transfer function pairings used in this study.

Fig. 5
shows the EMG signals recorded from participants with the illustration of one full gait.The EMG signals were chosen from vastus lateralis muscle.

Fig. 6
Fig. 6 Training accuracy for EMG signals classification ANN optimization uses various transfer function pairings for the hidden layer networks.Table3shows the confusion matrix for overall ANN accuracy.

Fig. 7
Fig. 7 MSE validation result for each transfer function combination: (a) Hyperbolic tangent sigmoid transfer function-Softmax transfer function, (b) Elliot 2 symmetric sigmoid transfer function-Softmax transfer function, (c) Elliot symmetric sigmoid transfer function-Softmax transfer function, (d) Positive linear transfer function-Softmax transfer function, (e) Linear transfer function-Softmax transfer function, (f) Hyperbolic tangent sigmoid transfer function-Elliot 2 symmetric sigmoid transfer function, (g) Hyperbolic tangent sigmoid transfer function-Elliot symmetric sigmoid transfer function and (h) Hyperbolic tangent sigmoid transfer function-Linear transfer function Based on Fig.7 MSE value can indicated accuracy result.Lowest MSE value means that the accuracy is higher in the model[33].The MSE value from Fig.7consists of three values, i.e. training MSE value, validation MSE value and testing MSE value.This present study used the validation MSE value, which can be resumed in Table 4. Table 4 denoted the summary of MSE value for each experiment.From MSE value can be seen that tansig and SoftMax transfer function combination had lowest MSE value hence the highest accuracy.

TABLE II TRANSFER
FUNCTION METHOD PAIRING ON ANN NETWORK HIDDEN LAYER Table 3 shows the confusion matrix for overall ANN accuracy.
consists of three values, i.e. training MSE value, validation MSE value and testing MSE value.This present study used the validation MSE value, which can be resumed in Table 4. Table 4 denoted the summary of MSE value for each experiment.From MSE value can be seen that tansig and SoftMax transfer function combination had lowest MSE value hence the highest accuracy.

TABLE V ACCURACY
COMPARISON FOR THIS PRESENT AND PREVIOUS STUDIES