Analysis of EMG Signals during Stance and Swing Phases for Controlling Magnetorheological Brake applications

The development of ankle foot orthoses (AFO) for lower limb rehabilitation have received significant attention over the past decades. Recently, passive AFO equipped with magnetorheological brake had been developed based on ankle angle and electromyography (EMG) signals. Nonetheless, the EMG signals were categorized in stance and swingphases through visual observation as the signals are stochastic. Therefore, this study aims to classify the pattern of EMG signals during stance and swing phases. Seven-timedomains featureswill be extracted and fed into artificial neural network (ANN) as a classifier. Two different training algorithms of ANN namely LevenbergMarquardt (LM) and Scaled Conjugate Gradient (SCG) will be applied. As number of inputs will affect the classification performance of ANN, different number of input features will be employed. In this study, three participants were recruited and walk on the treadmills for 60 seconds by constant the speed. The ANNmodel was designed with 2, 10, 12, and 14 inputs features with LM and SCG training algorithms. Then, the ANN was trained ten times and the performances of each inputs features were measured using classification rate of training, testing, validation and overall. This study found that all the inputs with LM training algorithm gained more than 2% average classification rate than SCG training algorithm. On the other hand, classification accuracy of 10, 12 and 14 inputs were 5% higher than 2 inputs. It can be concluded that LM training algorithm of ANN was performed better than SCG algorithm with at least 10 inputs.


Introduction
Stroke may cause locomotion impairment and affect human body in different ways that can lead to cause of death. According to National Stroke Association of Malaysia, approximately 40,000 of stroke cases are reported each year [1]. A syndrome known as foot drop frequently occurs unilaterally in connection with stroke. It happens due to partial or total central paralysis of the muscles on lower leg. Foot drop patients unable to control the movement at the ankle inward and outward as they suffered from uncontrolled plantar flexion and dysfunctional dorsiflexion that effect the gait pattern. The swinging action and inclination of a body for foot drop patients become larger than normal gait during swing phase in order to avoid a losing balance on the ground. Consequently, the stance phase is not detected. An enhancement on gait pattern of foot drop patients could be done through physical therapy during rehabilitations.
Rehabilitation is a major therapeutic approach as the motor performance functional deficits of patient can be maximized and minimized, respectively. Generally, physiotherapy and rehabilitation are carried out through repeating the exercises many times with the assistance of one or more physiotherapists. Yet, the process of recovery might be delayed due to the limited number of therapists. Moher [2] discovered that an assistance through automated technical system enhance the physical activities especially during rehabilitation. He introduced the control system through Human Machine Interface (HMI) and effectively demonstrated the systems used in the mechanism of lower-limb orthoses. HMI such as orthoses have been designed with different types of actuators, interfaces, and mechanical structures as practical complementary systems for therapists to handle impaired joints or limbs [3].
Nowadays, ankle foot orthoses (AFO) is mostly prescribed to support the movement of lower leg which help individuals to balance their body and walk in a more natural way. It was found an improvement was observed on the ankle kinematics in early stance, toe-off and swing phase but no effects were seen for knee kinematics in terms of swing or hip kinematics [4]. In addition, there exists a short-term effect on ankle movement early after stroke using AFO [5]. The development of AFO can be grouped into three types of joint such as rigid, flexible rigid, and articulated AFO. For rigid and flexible AFO ankle joint, the joint was fixed and more flexible, respectively. On the other hand, the articulated AFO has a freely rotating ankle joint. The mechanical properties of the articulated AFO are more controllable compared to rigid and flexible rigid of AFO as it equipped with an actuator [6].
The development of AFO based on the selection of actuator that can be divided into two types namely active and passive. Active AFO support the leg movement using electronic actuators such as direct current motors, pneumat- ics, solenoids, and springs. Meanwhile, the passive AFO assist the leg movements using actuators such as magnetorheological (MR) dampers and brakes. Passive AFO are had advantages in terms of weight optimization compared with active AFO. In preventing the foot drop, passive AFO become the main concern as the movement generator is not needed as because the foot drop patient able to move it by itself except during dorsiflexion. Therefore, a controllable AFO with a compact MR fluid brake had been developed based on accelerometer and angle of ankle for gait training purpose [7]. By using similar approach of control, work done by Adiputra et al. [8] replaced the accelerometer with electromyography (EMG) signals and reduced the gait phases from three to two and demonstrated the system was applicable in prevention of foot drop. Nonetheless, the main issue arises on interpretation of EMG signals during two phases namely stance and swing phases as they categorized the signals through visual observation.
The EMG signals was reported to be useful for gait phase detection since the lower extremity muscle activity occurs in a repeatable way during gait cycle [9]. They developed an EMG based control system for passive AFO as shown in Figure 1. The EMG signals reflect the electric current that emanate from body muscles during contraction and/or relaxation. For signal processing, there are three stages namely pre-processing, feature extraction and classification. In order to obtain higher classification accuracy, the selected features are the main kernel used in analyzing EMG signals [10]. Although many research works have mainly tried to explore and propose numerous EMG signals classification, there are only a few works that examined the appropriate features set to be extracted especially for gait event, stance and swing phases.
Features in time domain (TD) have been widely adopted because they do not need a transformation, as they are calculated based on the raw EMG time series and computational complexity is low. Previous work had reported that different accuracies were obtained with single and multiple of TD features. For single feature, mean absolute value (MAV) is the most popular features and recommended in classifying EMG signals [11]. Another TD feature such as maximum amplitude (MAX), standard deviation (SD), and root mean square (RMS) had shown a good relationship with contractions of EMG signals [12]. Meanwhile, multiple feature of MAV, variance (VAR), waveform length (WL), slope sign changes and 4 th autoregressive model identified the boundary locations for different gait cycles [13]. In classifying the EMG signals during stance and swing phases, it was found that five TD features, MAV, SD, RMS, integrated EMG (IEMG), and WL gained higher accuracy than single feature of MAV based on ar-tificial neural network (ANN) classifier [9]. However, combination of MAV, SD, RMS, IEMG, WL, VAR, and MAX features have not been explored. Thus, this study aims to extend the research by added another two TD features, VAR and MAX and fed into ANN. As the different number of inputs and training algorithm effect the performance of ANN, the single and multiple feature sets are compared with Levenberg-Marquardt (LM) and Scaled Conjugate Gradient (SCG) training algorithm.

Methodology
Three healthy male subject age between 22 to 25 years old from Shibaura Institute of Technology's student population were recruited with no history of nerve injuries that may affected the walking pattern. This investigation focused on the lower leg and the participants were asked to do some movements related to the selected muscles. In this study, the detection of stance and swing phases are based on the heel strike (HS) and toe off (TO) collected from the footswitch data. Two force sensing resistors (FSR) of footswitch devices were placed under the sole of the foot beneath the hallux and heel after cleaning with wet tissues. A tape was placed around the FSR for extra protection. The footswitch data were recorded using Load Switch System (DKH, Japan) device with an input range of ± 10V and activation force 0.3 N. The placement of both footswitch and EMG signals are shown in Figure 2. Moving on, the EMG signals were recorded from tibialis anterior (TA) and medial gastrocnemius (mGas) muscles with a reference electrode at the patella, following the Surface Electromyography for the Non-Invasive Assessment recommendations. To detect the activation of muscle contraction and verify the accuracy of the footswitch's outputs, the subjects had to perform dorsiflexion and plantar flexion. The output of footswitch data become the reference of stance and swing phases for EMG signals. The EMG signals were collected by using two-channelled EMG device (Nihon Kohden, Japan) and amplified by multichannel amplifier with bandwidth filtering from 15 to 1000 Hz. Both EMG signals and footswitch data were connected to 64 Ch analog-to-digital converters (Model ZO-928, NAC, Japan) and the sampling rate were set at 1000 Hz using the Cortex software. Then, the participants were instructed to walk on the treadmills for 60 seconds with a constant speed as shown Figure 3.
The classification accuracy of EMG signals depends greatly on the features extracted. There are seven TD features were incorporated into this study which are RMS, SD, MAV, IEMG, WL, VAR and MAX. As Oskoei and Hu [14] proved that the performance of four combined features are better than a single or two features for upper limb movement, a single MAV features were compared with multiple set of TD features and the details are shown in Table 1. The TD features of TA and mGas muscles during stance and swing phases in 30 cycles for each subject were extracted. In total, 35000 datasets were computed and fed into the classifier.
The information extracted from the features serves as input for the classifiers. A classifier function is to map the pattern and match the EMG signals appropriately in determining the final output. Machine learning is closely re-  lated with the study and construction of algorithms that can learn from building model and make predictions on data. An application of ANN began to appear for pattern recognition and classification tasks as it is suitable for modelling nonlinear data especially for EMG signals due to its ability to cover the distinctions among different conditions. The capability of ANN had been proven for upper limb movement with 91.2% classification accuracy by using five TD features [15]. ANN also able to discriminate different hand motions [16], neuromuscular diseases [17], and risk of preterm deliveries using EMG signals [18]. Multilayer perceptron of ANN was used in this study to evaluate the performance of each TD features. The ANN model consists three layers of nodes needed which are input layer, hidden layer and output layer. Input vector I with L rows can be denoted by i 1 , i 2 , . . . , i R . Each input was weighted by correlative component w 1,1 , w 2,1 , . . . , w S1,L of the weight matrix, W1 which S1 is neurons number. As aforementioned, two types of training algorithm that were employed in this study; LM and SCG. The training input data were randomly divided: 70% for training, 15% for validation and 15% for testing. The ANN model was designed with 2, 10, 12, and 14 inputs features with LM and SCG training algorithm. The ANN network for each of the TD features was trained ten times and the classification performances for training, testing, validation and overall were recorded.

Results and discussions
An example confusion matrix for LM and SCG training algorithm of ANN model for Group 6 are shown in Figure 4. The target class of the confusion matrix were denoted as number 1 and 2 to represent the output class as stance and swing phases, respectively. The light green cells provide the number of correctly classified while red cells for unclassified numbers. In addition, average classification was showed in grey cell while the total average of classification rate showed in blue cells. The percentage in each cell shows the ratio of the number with total number of movements. It can be seen that the percentage difference for training, test, validation and overall were small. Table 2 and 3 represent the classification accuracy of each TD feature sets for ten times by using LM and SCG training algorithm, respectively. In the table, the classification rate was divided into four; training, validation, test and overall. The highest value of each train for each TD feature sets were bolded. For both LM and SCG training algorithm, the highest value was gained by Group 6 TD features with 96.0% and 92.9%, respectively. Meanwhile, the classification accuracy of was the lowest with 88.8% and 87.9% for LM and SCG training algorithm, respectively. Figure 5 compared the average classification performance of all TD features with different training algorithm of ANN. Group 1, Group 4, Group 5 and Group 6 features gained more than 92% of classification accuracy while C features gained less than 87% for SCG training algorithm. With 5% of difference, it can be concluded that C features was not suggested for represent the EMG signals for gait phases but performed well for hand movement as reported by Phinyomark et al. [11]. Consistent with the literature, this research found that multiple TD features performed better than single TD features [9]. One interesting finding of this study is the difference of classification accuracy between a combination of 5, 6 and 7 TD features were less than 1%. Thus, the combination of 5 TD features which 10 inputs would be enough to discriminate the stance and   swing phases. In other words, increasing the number of inputs more than 10 does not affect the performance of ANN model. Nevertheless, the training algorithm of ANN model influenced the classification accuracy as LM training algorithm was approximately more than 2% higher than SCG training algorithm for all TD features. These results are in agreement with work done by Ibrahimy et al. for discriminate the hand movement [16].

Conclusions
The aim of the current study was to propose a new TD features sets in classifying EMG signals during stance and swing phases. This study has identified multiple TD features, RMS, MAV, SD, IEMG, WL, MAX and VAR were suggested than a single TD feature especially MAV. Additionally, the LM training algorithm of ANN was performed better than SCG algorithm with at least 10 inputs. This approach will prove useful in expanding our understanding of ANN model with different number of inputs. Also, the findings will be of interest in development of AFO to control the actuator. Even though ANN has shown its usefulness in classifying EMG signals for gait event detection, further research might improve the classification accuracy using other TD features with different multiple feature sets and explore other classifier such as support vector machines.