EMG based Control of Transtibial Prosthesis
Anoosha Anis
1
, M. Abbas Irshad
1
, Syed M. Hamza
1
, Noman Naseer
1
, Hammad Nazeer
1
, Andrian
2
1
Department of Mechatronics Engineering, Air University, Islamabad, Pakistan
2
Faculty of Technology and Computer Science, Universitas Prima Indonesia, Medan, Indonesia
Keywords: Transtibial Amputation, Active Control, Gait, EMG driven, Indirect BCI
Abstract: Amputation is defined as the loss of a limb. Transtibial amputation is the amputation below the knee. The
purpose of this research is to develop an Electromyography (EMG) based control to mimic the three positions
of an ankle. The EMG signals are extracted using eight channel Myo Armband on the tibialis muscles on
eight subjects. These signals correspond to the two extreme positions of an ankle and a rest position. The
features are extracted and K-Nearest Neighbour is used as a classifier to differentiate between the extreme
positions with 98.75 % training classification accuracy. The classified signals are then used to control the
prosthesis which mimics the ankle movement. This research can be applied to rehabilitate the ankle and help
the people with lower limb amputations.
1 INTRODUCTION
A prosthesis is an artificial device that is developed
to replace the function of a lost limb. There are two
major types of limb prostheses: Upper-extremity
prostheses and Lower-extremity prostheses. Upper-
extremity prostheses include prostheses for trans-
radial amputation, trans-humeral amputation, wrist
dis-articulation, elbow dis-articulation and shoulder
dis-articulation. Whereas, lower-extremity prosthesis
includes prostheses for hip disarticulation,
transfemoral amputation, knee disarticulation,
transtibial amputation, ankle disarticulation and
partial foot amputation.
Moreover, they can be divided into Active and
Passive depending on the use of external power
(Windrich et al., 2016). The passive prosthesis does
not contain any electronic or mechanical moving part.
These prostheses are mostly used for cosmetic
purposes and provide the basic functions like
pushing, pulling and supporting (Maat et al., 2018).
An active prosthesis includes externally powered
devices. They consist of sensors in contact with the
skin, which pick up the signals from the skin and in
turn control the devices/ actuators, which in turn
controls the movement (Windrich et al., 2016).
The intuitive control can be developed using
different techniques like Surface Electromyography
(sEMG) (Anil and Sreeletha, 2019), Ultrasound
imaging(González and Castellini, 2013),
electroencephalography (EEG) (Bright et al., 2016),
Force myography (FMG) (Cho et al., 2016),
Implantable Myoelectric Sensors (Pasquina et al.,
2015) and Targeted Muscle Reinnervation
(TMR)(Cheesborough et al., 2015). Out of these
techniques sEMG, ultrasound imaging, EEG, FMG
are non-invasive techniques whereas, Implantable
Myoelectric sensor and TMR are invasive
techniques(Turnip, Soetraprawata and Kusumandari,
2013).
The Myoelectric signals are produced due to
variations in the state of muscle fibre. The variation
in electric potential in the motor neurons is detected
by the electrodes as an EMG signal. So greater the
variation/contraction will be, greater the amplitude of
the recorded voltage will be. The EMG signals can be
detected either by intrusive/intramuscular or non-
intrusive technique. The intrusive technique involves
the use of needle EMG electrodes by inserting them
into the muscle under examination. The advantage of
this technique is that it reduces the muscle noise and
thus produces more accurate results (Waris and
Kamavuako, 2018). Whereas, the non- intrusive
technique uses surface EMG electrodes which uses
the surface-based detection technique for the EMG
signal. This technique does involve more muscle
noise but is preferred over the previous method as it
does not involve any special formalities and
procedure. Moreover, the latest research and
technology has resulted in more sensitive sensors
which can capture the signals from the skin much
74
Anis, A., Irshad, M., Hamza, S., Naseer, N., Nazeer, H. and Andrian, .
EMG based Control of Transtibial Prosthesis.
DOI: 10.5220/0009464200740081
In Proceedings of the International Conference on Health Informatics and Medical Application Technology (ICHIMAT 2019), pages 74-81
ISBN: 978-989-758-460-2
Copyright
c
2020 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
very accurately without the need of inserting them
(Del Vecchio et al., 2017).
The aim of this research is to encounter all the
issues faced due to passive prosthesis by developing
a physical prototype of an ankle foot prosthetic active
in nature to exhibit its benefits to a transtibial
amputee. This includes development and
implementation of methodology for EMG signal
acquisition as well as classification and identification
of intuitive signal for the lower limb prosthesis
control. The prosthesis mimics the position of the
ankle on the basis of the EMG signals that are
classified using the KNN classifier.
The conducted research has various applications
in the field of Robotics, Bio-medical Industry and
Health sector. Such as, to help people with transtibial
amputations to become independent and in defence
sector to help the soldiers with amputations to return
to normal life.
2 METHODOLOGY
The methodology of this project is divided into four
major stages. The first step includes acquisition of
data from the subjects. In the second step, the
acquired data is then processed and different
statistical features are extracted and fed to the
classifier. The third step includes the training of
classifier on the extracted features and the last step
involves the testing of the classifier on the real-time
data. The methodology of this process can be seen in
the figure 1.
2.1 Data Acquisition
Myo Armband was utilized for the purpose of signal
acquisition. It consists of eight EMG electrodes and
and an in-built bluetooth for data transmission. The
use of multiple channels improves the accuracy. It
also comprises of accelerometer and a gyroscope. The
transmitted signals can be captured via Myo SDK on
MATLAB. The figure 2 shows Myo Armband sensor.
Figure 2: Myo Armband sensor.
It was worn by the subject just below the knee that
continuously read the muscle data and sent it via the
in-built Bluetooth to the laptop present right next to
the subject in form of a vector. The laptop’s Bluetooth
received the incoming data and passed it to the
MATLAB. Figure 3 and 4 shows position of sensor.
Figure 1: Experimental setup.
EMG based Control of Transtibial Prosthesis
75
Figure 3: Location of electrodes on muscles (frontal view.)
Figure 4: Location of electrodes on muscles (dorsal view).
The paradigm decided for this project is as follows:
Number of classes(actions) = 2
Number of subjects = 8
Number of male subjects = 6
Number of female subjects = 2
Age group = 20-25 years
Number of activities per subject per
trial= 10
Total time for each trial = 30s
All subjects are healthy
2.2 Feature Extraction and Accuracy
The Myo Armband provides filtered signals so after
receiving the data from Myo Armband, Savitzky-
Golay filter was applied to smoothen the signal
(Christov, Raikova and Angelova, 2018). Figure 5
shows un-filtered EMG signal whereas, Figure 6
shows filtered EMG signal.
Figure 5: Un-filtered EMG signal.
Figure 6: Filtered EMG signal.
After smoothing the signal, the features were
extracted. The features help reducing the input data
into less but useful data (Phinyomark, Khushaba and
Scheme, 2018). They provide useful information
about the signal; therefore, features need to be
selected carefully. Different statistical features were
extracted such as standard deviation, root mean
square, mean absolute value, zero crossings, maxima
and minima (Hong, Khan and Hong, 2018). The
classifiers Linear discriminant analysis (LDA),
Support Vector Machine (SVM) and k-nearest
neighbours (KNN) were trained separately on each of
the above feature. Maximum accuracy was achieved
using Root Mean Square as a feature on KNN.
2.3 Real-time Classification and
Application Interface
In this phase, the data is classified real-time on the
trained classifier. It is also called Online
classification. When the amplitude being calculated
exceeds the threshold of 0.4, the wave is sent for
ICHIMAT 2019 - International Conference on Health Informatics and Medical Application Technology
76
feature extraction and then the features are fed to the
classifier. The classifier then classifies the gesture
into respective class and then, based on the output
class, the prosthetic foot moves up or down. The
process is shown in figure 7.
Figure 7: Application interface.
3 MODELING AND SIMULATION
3.1 Gesture
There are two gestures i.e. up and down. The rest
position was distinguished on the basis of amplitude.
If the calculated amplitude was greater than 0.4 then
it meant gesture and its features were extracted and
passed on to the classifier. Otherwise, it meant rest
(Reaz, Hussain and Mohd-Yasin, 2006). The total
number of classes is two as seen in Figure 8-10.
3.2 Data Collection
The Data was collected via Myo Armband which
continuously sent the data wirelessly to the laptop at
the sampling frequency of 200 Hz. The data was
received in the form of a nx8 vector where ‘n’
depends on the duration of the activity and eight
represents number of electrodes. It was then plotted
and processed using MATLAB. The Figure 11- 14
shows the raw data obtained for rest, up and down
gesture on each electrode as well as a combination of
all the electrodes.
Figure 8: Rest position.
Figure 9: Up gesture.
Figure 10: Down gesture.
3.3 Classification
The classifier was used to differentiate between the
two classes on the basis of input features(Qureshi et
al., 2016). A classifier was needed that could satisfy
the following conditions: easy to understand, need
EMG based Control of Transtibial Prosthesis
77
only acceptably short calculation time and have a
more than decent predictive power(Simbolon et al.,
2016). Three classification algorithms Support
Vector Machine (SVM), Linear Discriminant
Analysis (LDA) and K-Nearest neighbour (KNN)
were trained, tested and validated.
Figure 11: Raw EMG signal for rest.
Figure 12: Raw EMG signal for up gesture.
Figure 13: Raw EMG signal for down gesture.
Figure 14: Raw signals for rest, up and down gesture.
In Support Vector Machine, each data item is
plotted as a point in space where the dimension of the
space depends on the number of features(Turnip et
al., 2016). The classification is then performed by
finding the hyper-plane that separates the classes
well. The new data is then plotted in the same space
and the category is decided on the basis of the side of
the gap where they fall(Alkan and Günay, 2012). An
offline accuracy of 88.7% was achieved using SVM.
The LDA predicts the class of the set of data by
calculating the probability for each class. The
probability is estimated using the Bayes Theorem.
The class with the highest probability is selected as
the output class (Alam and Arefin, 2018).LDA is a
general form of Fisher’s linear discriminant, which is
used in statistics and pattern recognition
problems(Naseer et al., 2016). An offline accuracy of
96.4%was achieved using LDA.
KNN is another method used for classification
which makes use of the fact that the similar things
exist in close proximity. The input data is assigned the
class of majority of its closest neighbours. It is easy
to implement and can be used for both the regression
and classification problems. The advantages of this
algorithm are that it doesn’t need to make various
assumptions and to build a separate model(Altın and
Er, 2016). The only con is that it becomes slower as
the number of examples increase(Khan et al., 2018).
An offline accuracy of 98.7% and an online accuracy
of 90% was achieved. The KNN was chosen since it
provided the highest classification accuracy and fast
calculation time. The results can be seen in the Figure
15.
4 RESULTS
When the muscle is at rest then the calculated
amplitude is less than 0.4 and no action is performed
ICHIMAT 2019 - International Conference on Health Informatics and Medical Application Technology
78
Figure 15: Percentage accuracy versus features on three different classifiers.
at the output. So, if the foot is up then the prosthetic
also stays up and if the foot is down then the
prosthetic remains down at rest.
When the calculated amplitude is greater than 0.4
and a change in the muscle signals is detected, then
the signal is sent for feature extraction and then to the
classifier. Depending on the classification result, a
command is generated.
The output command generated from the
MATLAB is sent to the Arduino using Arduino
hardware support package on MATLAB. On the basis
of the classified signal the MATLAB generates the
forward, backward or rest command to Arduino
which controls the actuator integrated with it and
moves the ankle up, down or keeps it in rest state.
In the Figure 16-18, one can observe the output of
prosthetic foot against each of the gesture.
Figure 16: Rest position.
Figure 17: Up gesture.
Figure 18: Down gesture.
5 CONCLUSIONS AND FUTURE
RECOMMENDATIONS
This paper presents an improved technique to control
a transtibial prosthesis using EMG signals and
machine learning algorithms.
EMG based Control of Transtibial Prosthesis
79
The EMG signals were obtained using Myo
Armband. Features such as root mean square were
extracted and fed to the classifier and the classifiers
were then trained, tested and validated on different
features. It was found that using root mean square as
a feature and KNN as a classifier gave maximum
accuracy. An offline accuracy of 98.75% and an
online accuracy of 90% was achieved(Anil and
Sreeletha, 2019).
However, the prosthesis can be made more
natural-like by mimicking the human gait that can be
done by increasing the number of output classes on
the basis of the angle of the ankle joint.
Moreover, the classifier performance can be
improved by increasing the number of training data
set. The combination of different features can also be
implemented to increase the accuracy. The artificial
neural networks or other deep learning techniques
may be applied to improve the accuracy.
Although, the prime objective of controlling the
prosthetic was achieved, closed loop control must be
introduced for precise and robust control of the joint.
More work needs to be done to make the
prosthesis portable by the introduction of single board
computer like Beaglebone, Raspberry Pi and UDOO.
REFERENCES
Alam, M. S. and Arefin, A. S. (2018) ‘Real-Time
Classification of Multi-Channel Forearm EMG to
Recognize Hand Movements using Effective Feature
Combination and LDA Classifier’, Bangladesh Journal
of Medical Physics, 10(1), pp. 2539. doi:
10.3329/bjmp.v10i1.39148.
Alkan, A. and Günay, M. (2012) ‘Identification of EMG
signals using discriminant analysis and SVM
classifier’, Expert Systems with Applications. Elsevier
Ltd, 39(1), pp. 4447. doi:
10.1016/j.eswa.2011.06.043.
Altın, C. and Er, O. (2016) ‘Comparison of Different Time
and Frequency Domain Feature Extraction Methods on
Elbow Gesture’s EMG’, European Journal of
Interdisciplinary Studies, 5(1), p. 35. doi:
10.26417/ejis.v5i1.p35-44.
Anil, N. and Sreeletha, S. H. (2019) ‘EMG Based Gesture
Recognition Using Machine Learning’, Proceedings of
the 2nd International Conference on Intelligent
Computing and Control Systems, ICICCS 2018. IEEE,
(Iciccs), pp. 15601564. doi:
10.1109/ICCONS.2018.8662987.
Bright, D. et al. (2016) ‘EEG-based brain controlled
prosthetic arm’, Conference on Advances in Signal
Processing, CASP 2016, pp. 479483. doi:
10.1109/CASP.2016.7746219.
Cheesborough, J. E. et al. (2015) ‘Targeted muscle
reinnervation and advanced prosthetic arms’, Seminars
in Plastic Surgery, 29(1), pp. 6272. doi: 10.1055/s-
0035-1544166.
Cho, E. et al. (2016) ‘Force myography to control robotic
upper extremity prostheses: A feasibility study’,
Frontiers in Bioengineering and Biotechnology,
4(MAR), pp. 112. doi: 10.3389/fbioe.2016.00018.
Christov, I., Raikova, R. and Angelova, S. (2018)
‘Separation of electrocardiographic from
electromyographic signals using dynamic filtration’,
Medical Engineering and Physics. Elsevier Ltd, 57, pp.
110. doi: 10.1016/j.medengphy.2018.04.007.
González, D. S. and Castellini, C. (2013) ‘A realistic
implementation of ultrasound imaging as a human-
machine interface for upper-limb amputees’, Frontiers
in Neurorobotics, 7(OCT), pp. 111. doi:
10.3389/fnbot.2013.00017.
Hong, K. S., Khan, M. J. and Hong, M. J. (2018) ‘Feature
Extraction and Classification Methods for Hybrid
fNIRS-EEG Brain-Computer Interfaces’, Frontiers in
Human Neuroscience, 12(June), pp. 125. doi:
10.3389/fnhum.2018.00246.
Khan, R. A. et al. (2018) ‘FNIRS-based Neurorobotic
Interface for gait rehabilitation’, Journal of
NeuroEngineering and Rehabilitation. Journal of
NeuroEngineering and Rehabilitation, 15(1), pp. 117.
doi: 10.1186/s12984-018-0346-2.
Maat, B. et al. (2018) ‘Passive prosthetic hands and tools:
A literature review’, Prosthetics and Orthotics
International, 42(1), pp. 6674. doi:
10.1177/0309364617691622.
Naseer, N. et al. (2016) ‘Determining optimal feature-
combination for LDA classification of functional near-
infrared spectroscopy signals in brain-computer
interface application’, Frontiers in Human
Neuroscience, 10(MAY2016), pp. 110. doi:
10.3389/fnhum.2016.00237.
Pasquina, P. F. et al. (2015) ‘First-in-man demonstration of
a fully implanted myoelectric sensors system to control
an advanced electromechanical prosthetic hand’,
Journal of Neuroscience Methods. Elsevier B.V., 244,
pp. 8593. doi: 10.1016/j.jneumeth.2014.07.016.
Phinyomark, A., Khushaba, R. N. and Scheme, E. (2018)
‘Feature extraction and selection for myoelectric
control based on wearable EMG sensors’, Sensors
(Switzerland), 18(5), pp. 117. doi:
10.3390/s18051615.
Qureshi, N. K. et al. (2016) ‘Comparison of classification
performance for fNIRS-BCI system’, 2016 2nd
International Conference on Robotics and Artificial
Intelligence, ICRAI 2016, pp. 5457. doi:
10.1109/ICRAI.2016.7791228.
Reaz, M. B. I., Hussain, M. S. and Mohd-Yasin, F. (2006)
‘Techniques of EMG signal analysis: Detection,
processing, classification and applications’, Biological
Procedures Online, 8(1), pp. 1135. doi:
10.1251/bpo115.
Simbolon, A. I. et al. (2016) ‘An experiment of lie detection
based EEG-P300 classified by SVM algorithm’,
Proceedings of the 2015 International Conference on
Automation, Cognitive Science, Optics, Micro Electro-
ICHIMAT 2019 - International Conference on Health Informatics and Medical Application Technology
80
Mechanical System, and Information Technology,
ICACOMIT 2015, pp. 6871. doi:
10.1109/ICACOMIT.2015.7440177.
Turnip, A. et al. (2016) ‘EEG-based brain-controlled
wheelchair with four different stimuli frequencies’,
Internetworking Indonesia Journal, 8(1), pp. 6569.
Turnip, A., Soetraprawata, D. and Kusumandari, D. E.
(2013) ‘A Comparison of EEG Processing Methods to
Improve the Performance of BCI’, International
Journal of Signal Processing Systems, 1(1), pp. 6367.
doi: 10.12720/ijsps.1.1.63-67.
Del Vecchio, A. et al. (2017) ‘Associations between motor
unit action potential parameters and surface EMG
features’, Journal of Applied Physiology, 123(4), pp.
835843. doi: 10.1152/japplphysiol.00482.2017.
Waris, A. and Kamavuako, E. N. (2018) ‘Effect of
threshold values on the combination of EMG time
domain features: Surface versus intramuscular EMG’,
Biomedical Signal Processing and Control. Elsevier
Ltd, 45, pp. 267273. doi: 10.1016/j.bspc.2018.05.036.
Windrich, M. et al. (2016) ‘Active lower limb prosthetics:
A systematic review of design issues and solutions’,
BioMedical Engineering Online. BioMed Central,
15(3), pp. 519. doi: 10.1186/s12938-016-0284-9.
EMG based Control of Transtibial Prosthesis
81