You are on page 1of 51

Department of Electrical Engineering

School of Electrical Engineering & Computer Science


National University of Sciences & Technology Islamabad, Pakistan

Strength Providing Exoskeleton


(SPEx)

An EMG based exoskeleton for muscular degeneration patients.

By

Shahmeer Mohsin NUST201432974BSEECS60414F


Muhammad Shabib Shahid NUST201434385BSEECS60414F
Muhammad Sohaib Khalid NUST201433446BSEECS60414F

Advisor: Dr. Ahmad Salman


Co-Advisor: Dr. Ammar Hasan
Dedication
We would thus dedicate the success and widespread acclaim of the project to

1) Dr Ahmad Salman (Advisor)


2) Dr Ammar Hasan (Co-Advisor)
3) Our parents and grandparents.
4) All our teachers to date who have developed our technical, managerial and
interpersonal skills.
5) The HEC for trusting NUST, and dispatching endless funding for educational and
research purposes.
Acknowledgements
First of all, we would like to thank God Almighty for bestowing upon us the strength, courage
and knowledge to pursue this revolutionary project. Here are some of the notable people to
whom we would dedicate our project’s success:

1) The person who deserves the most applause is Dr Ahmad Salman, our advisor. He
was there throughout the project, guiding us and motivating us to pursue it.
2) Then after him, our co-advisor, Dr Ammar Hasan should be credited for our success.
He taught us the relevant skills in Power Electronics and Industrial Control, both of
which were imperative for the success of the project.
3) Along with the above mentioned personalities, our parents and grandparents deserve
credit as well, for believing in us and investing their time, energy and monetary
resources on us.
Table of Contents
Abstract: 1
1. Introduction: 2
1.1 Problem Statement 2
1.2 Scope of the Project/Problem: 2
1.3 Personal Motivation 4
1.4 Need to Pursue 4
1.5 Project Objectives 6
2. Literature Review 7
2.1 Exoskeleton Control Methods 7
2.2 Classification Algorithms 9
2.3 Motors 14
2.4 Power Supplies 15
3. Functionality and Design 17
3.1 EMG Signal and Weight attainment 17
3.2 Signal Training and Classification 23
3.3 Driving the motor 27
3.4 Bluetooth Control 31
3.5 Mechanical Design of the Exoskeleton 33
4. Implementation and Results 38
5. Conclusions and Future Recommendations 40
5.1 Important Findings of the Project 40
5.2 Technical Significance of the Results 40
5.3 How Our Daily Lives Will Be Impacted 41
5.4 Commercialization of the Product 41
5.5 Limitations of the Product and How to remove these Limitations 41
Appendix 43
References 45
List of Figures

Figure 1: Percentage of world population with Parkinson’s 3


Figure 2: Percentage of world population with A.L.S. 3
Figure 3: Percentage of world population with Cancer. 3
Figure 4: Percentage of world population who are elderly. 3
Figure 5: Mr Azhar Lateef 4
Figure 6: An expensive exoskeleton 5
Figure 7: An expensive prosthetic arm 5
Figure 8: EEG Electrode Cap 8
Figure 9: LEDs being lit with surface EMG signals of the biceps 9
Figure 10: Euclidean distance. 10
Figure 11:Classifying the training data 11
Figure 12: Formulas 12
Figure 13: Example of classifying the data at run time 13,25
Figure 14: Single phase induction motor 14
Figure 15: The electric equivalent circuit of the armature 15
Figure 16: LION Power 14.8V 5200MAH 30C BATTERY 16,31
Figure 17: Muscle Sensor V3 Electromyography Module 18
Figure 18: Circuit schematic of Electromyography Module 19
Figure 19: Electromyography module connections 20
Figure 20: EMG sensor specification 20
Figure 21: Electrode placement to acquire EMG signals 21
Figure 22: Force sensing resistor 21
Figure 23: Resistance-Force graph of FSR 22
Figure 24: FSR connection with arduino 22
Figure 25: Classes 26,38
Figure 26: Windshield wiper motor 27
Figure 27: The connections of an H-Bridge to two motors 28
Figure 28: The internal circuitry of an H-Bridge 28
Figure 29: The connections of the H-Bridge to the arduino microcontroller 29
Figure 30: Parts of a Knuckle Joint 37
Figure 31: Final Design of Exoskeleton 39
Figure 32: Better EMG electrode pads 42
Figure 33: Current EMG electrode pads 42

Report Organization

The report is organized into 5 chapters.

Chapter 1 is the introduction.

Chapter 2 deals with the literature review.

Chapter 3 states the functionality and design in detail.

Chapter 4 deals with the implementation and results.

Chapter 5 is about the conclusions and future recommendations.


Abstract

Muscular degeneration is widespread not just in Pakistan, but also in other parts of
the world. As people tend to age, limb movement becomes difficult. There are also many
diseases that make limb movement an arduous task. It is estimated that 8.5% of people
worldwide are elderly, and suffer some sort of motor difficulty. Also muscular diseases like
Parkinson’s, A.L.S, multiple sclerosis, cancer et cetera affect 0.73 percent of the world
population combined. The current solutions include medication and surgical implantations. Both
these methods have a miniscule success rate.
People with muscle degeneration thus do not have much hope of rehabilitation with
the current solutions. One way of tackling this problem is by making smart and cost effective
prostheses. The prostheses currently available are mainly for amputees. Prostheses for muscle
degeneration patients are mostly in the prototype and testing stages, and haven’t been widely
commercialized yet. These prostheses are heavy, inaccurate and mostly button controlled.
Some exoskeletons have been commercialized for muscle patients, but they are very costly.
SPEx is an exoskeleton (prosthetic arm) for elbow movement aimed at people with
various muscular disorder like Parkinson’s, A.L.S, multiple sclerosis, cancer et cetera that
provides rehabilitation at a very low cost with immaculate accuracy and portability. Therefore
the key objective of SPEx is to produce a lightweight, robust and cost effective exoskeleton for
the arms. The greatest quality of SPEx is undoubtedly its cost effectiveness. It costs a mere
15000 Rs for production. Along with this, it is immensely lightweight and easy to wear, a
quality that most exoskeletons lack. To tackle the problem of button control in the current
exoskeletons, SPEx is completely brain controlled. It determines the amplitude of the EMG and
Force signals of a patient, attained using an EMG sensor and a Force Sensitive Resistor (F.S.R),
determines the RPM of the motor connected to the exoskeleton using the K-Nearest Neighbour
machine learning algorithm, and then applies the corresponding RPM on the D.C motor
connected to the exoskeleton.
The specifications that had initially been planned have been achieved. SPEx was
aimed to be mind-controlled and accurate; it is 98.5% accurate, and controlled using EMG and
FSR signals. This means that 98.5% of the times SPEx will cause the motor to move with an
RPM that the person wants. Initially, it was desired to make the project cost effective; SPEx is
worth only 15000 Rs, whereas the cheapest exoskeletons currently available cost thousands of
dollars. SPEx thus provides an alternative for treating muscle diseases, which are currently only
dealt with using medications and surgical implantations.
As far as the contributions of SPEx are concerned, SPEx is the only exoskeleton for
muscle patients that is worth a mere 15000 Rs keeping in mind its unique set of values like
brain control and accuracy.

1|Page
Chapter Number 1

1. INTRODUCTION
1.1 Problem Statement:
Some elderly citizens find limb movement a very strenuous task. Muscular
diseases like Parkinson’s, A.L.S and cancer are also very prevalent. These problems
usually make it very cumbersome for the affectees to live their lives normally; their basic
need of limb movement is taken away from them.
One way of allowing such patients to move their elbow is by using
prostheses/exoskeletons. The exoskeletons currently available are mostly for people with
no limbs (amputees). The ones for muscle patients are costly, inaccurate and are not user
friendly. Thus, the unavailability of exoskeletons of value is a problem that has to be dealt
with.
1.2 Scope of the Project/Problem:
Muscular degeneration exists in all parts of the globe. But no product reaches the
heights of the globe instantly; every product starts locally, and then if the venture succeeds, it
reaches the global level.
The National Institute of Health in the U.S.A estimates that 8.5% of people
worldwide are aged 65 or above. After the age of 65, most people suffer muscular
degeneration, with it being more dominant in some people compared to others. Pakistan
Parkinson’s Society estimates that 6.5 million people worldwide suffer from Parkinson’s,
including 450,000 affectees in Pakistan alone. It is expected that the numbers will double in
the next 10-20 years. The Multiple Sclerosis Foundation in the U.S.A estimates that 2.5
million patients worldwide suffer from multiple sclerosis. The A.L.S Therapy
Development Institute in the U.S.A approximates the number of A.L.S patients worldwide
to be 450,000. The most prevalent of these diseases is cancer; the World Health
Organization (W.H.O) claims that 14.1 million new cancer cases came up in 2012 alone.
These stats insinuate the need for developing efficient and effective remedies for muscular
degeneration. Consider the following figures:

2|Page
Figure-1 Percentage of world population Figure-2 Percentage of world
with Parkinson’s. Population with A.L.S

Figure-3 Percentage of world population Figure-4 Percentage of world


with Cancer. population who are elderly.

3|Page
1.3 Personal Motivation:
Shahmeer Mohsin, a group member of SPEx has a family member with
Parkinson’s. One of his father’s paternal uncles, Mr Azhar Lateef pictured below has
Parkinson’s.

Mr Latif lives in the U.S.A and


has gone through the most expensive
treatment in the most advanced country on
the planet, but to no avail. He has even had a
brain implantation surgery, but his condition
hasn’t changed. If muscle patients in
technologically advanced countries have no
hope of getting better, what is the the hope for
people in developing countries like Pakistan?
This calls for the need to develop new
solutions to tackle muscle degeneration. It is
the right time to introduce efficient and cost Figure-5 Mr Azhar Lateef
effective prostheses.

1.4 Need to Pursue:


As far as the treatment of these muscle patients is concerned, the current solutions
include medication and surgical implantation. Both these methods are usually futile, and don’t
lead to long term rehabilitation. It is the right time to focus on an alternative approach. This is
where exoskeletons come into the equation. Exoskeletons for muscle patients are currently in
the prototype stages and have not been widely commercialized. Exoskeletons for amputees are
more common. These exoskeletons usually take massive sums of money for production. The
following exoskeleton was created with an operational cost of $45 million:

4|Page
Figure-6 An expensive exoskeleton.
The following exoskeleton was developed by the John Hopkins University with a military
funding of $120 million.

Most of the current


exoskeletons are button controlled.
People usually find it a very cumbersome
task to move an exoskeleton by pressing
a button. Even if an exoskeleton is brain
controlled, it is usually very inaccurate.
People also find it difficult to wear an
exoskeleton that is heavy, thus making
the development of lightweight
exoskeletons imperative.
The incapability of the
current solutions used by doctors
(medications and implantations), as
well as the drawbacks in the current
exoskeletons make the development of
smart and efficient exoskeletons the
need of the hour.
Figure-7 An expensive prosthetic arm.
5|Page
1.5 Project Objectives (Proposed Methodology):
The goals of the project were to:
● Classify the EMG and FSR signals of a muscle patient, by determining the sort of
movement they want to perform using MATLAB, an EMG sensor and a Force
Sensitive Resistor (FSR).
● Construct an external exoskeleton (prosthetic arm) for one arm.
● Rotate the motor of the exoskeleton with an RPM equal to the RPM desired by the
user, attained after classifying the EMG and FSR signals.

6|Page
Chapter Number 2

2. Literature Review
An Exoskeleton arm is an outer framework that can be worn on a biological arm .
The exoskeleton revolution started in the 19th century when in 1946, researchers at UC
Berkeley developed a sock for lower-limb amputees.
3-D printing, neuroscience and bionic engineering have allowed great advancements
in prostheses. Modern prostheses are mostly button controlled. Brain controlled prostheses are
usually inaccurate and costly. Similarly, prostheses have been commercialized for amputees, but
not for muscle patients as of yet.

2.1 Exoskeleton Control Methods:


Exoskeletons may be EEG, EMG or button controlled. These are explained below:

Electroencephalography (EEG)/ Electrocorticogram (ECoG).:


The electroencephalogram (EEG) is a recording of the electrical activity of the brain from the
scalp. The recorded waveforms reflect the cortical electrical activity.
Signal intensity: EEG activity is quite small, measured in microvolts (mV).
Signal frequency: the main frequencies of the human EEG waves are:[2]
● Delta: has a frequency of 3 Hz or below. It tends to be the highest in amplitude and the
slowest waves. It is normal as the dominant rhythm in infants up to one year and in
stages 3 and 4 of sleep.
● Theta: has a frequency of 3.5 to 7.5 Hz and is classified as "slow" activity. It is perfectly
normal in children up to 13 years and in sleep but abnormal in awake adults.
● Alpha: has a frequency between 7.5 and 13 Hz. Is usually best seen in the posterior
regions of the head on each side, being higher in amplitude on the dominant side.
● Beta: beta activity is "fast" activity. It has a frequency of 14 and greater Hz. It is usually
seen on both sides in symmetrical distribution and is most evident frontally.
For EEG retrieval, an arrangement of electrodes are set on the scalp of the subject.
This technique is non-invasive since no surgery is required. EEG is a fast and cheap technique.
The main drawback is that by recording the electrical activity far away from the source (i.e. the

7|Page
neurones inside the skull), the signal we pick up is distorted and its amplitude reduced.
Moreover EEG is often contaminated with artefacts. The following cap is used for this process:

Figure-8 EEG Electrode Cap.

The next technique in the increasing invasiveness scale is called Electrocorticogram


(ECoG). This technique requires opening the skull of the subject and placing an electrode array
on the exposed brain. The quality of the signal (in terms of distortion and amplitude) is much
better than EEG, but obviously surgery is required. In principle, this technique does not damage
the brain, or at least not too much. It is often used in severe epileptic patients before undergoing
surgery to localise the brain focus of the seizures.
Exoskeletons made using EEG signals are very inaccurate. To improve the
accuracy, Electrocorticogram (ECoG) is used. A drawback of ECoG is that it requires a brain
surgery, and may damage the brain in some situations. Several exoskeletons have been designed
using EEG technology.

Electromyography (EMG):
Electromyography (EMG) refers to the collective electric signal from muscles,
which is controlled by the nervous system and produced during muscle contraction. The signal
represents the anatomical and physiological properties of muscles; in fact, an EMG signal is the
electrical activity of a muscle's motor units, which consist of two types: surface EMG, and
intramuscular EMG. Surface EMG and intramuscular EMG signals are recorded by non-
invasive electrodes and invasive electrodes, respectively. These days, surface-detected signals
are preferably used to obtain information about the time or intensity of superficial muscle
8|Page
activation. Electromyography (EMG) signals are considered most useful as electrophysiological
signals in both medical and engineering fields. The basic method for understanding the human
body's behaviors under normal and pathological conditions is provided by the recording of
EMG signals.

Surface EMG is easy method to retrieve EMG signals. Accurate and low cost exoskeletons can
be constructed using this technique. It removes the problems of inaccuracy and surgical
implantations present in EEG based exoskeletons. The following image shows LEDs being lit
with surface EMG signals of the biceps.

Figure-9 LEDs being lit with surface EMG signals of the biceps.

2.2 Classification Algorithms:


The classification algorithms required for exoskeletons need to be fast, the
exoskeleton needs to move as soon as the user thinks of an arm movement. Some algorithms
that provide fast computation include:

Support Vector Machines (SVM) .

In machine learning, support vector machines are supervised learning models with
associated learning algorithms that analyze data used for classification and regression analysis.
Given a set of training examples that are labelled, an SVM training algorithm builds a model

9|Page
that assigns new examples to one category or the other, making it a non-probabilistic binary
linear classifier. An SVM model is a representation of the examples as points in space, mapped
so that the examples of the separate categories are divided by a clear gap that is as wide as
possible. New examples are then mapped into that same space and predicted to belong to a
category based on which side of the gap they fall.[4]
In addition to performing linear classification, SVMs can efficiently perform a non-
linear classification using what is called the kernel trick, implicitly mapping their inputs into
high-dimensional feature spaces.[4]
When the data is not labelled, some other machine learning algorithm is required,
and SVM fails.

Figure-10 Euclidean distance.


Linear SVM divides the training samples of the two classes with a line that
maximizes the distance between the line and the nearest training sample of both the classes. [5]
The aim is to maximize the Euclidean distance between the dividing line and the nearest
training samples from both the classes.

The Euclidean distance is calculated using this formula:

The following plot illustrates the best division between a line and the red and green classes.

10 | P a g e
Figure-11 Classifying the training data.

K Nearest Neighbours (KNN):

In Machine Learning, the k-nearest neighbors algorithm (k-NN) is a method used


for both classification and regression. The output of a KNN classifier shows what class the test
sample. An object is classified by a majority vote of its neighbors, with the object being
assigned to the class most common among its k nearest neighbors.
K-NN is a type of instance-based learning, or lazy learning, where the function is
only approximated locally and all computation is deferred until classification. The k-NN
algorithm is among the simplest of all machine learning algorithms.[5]
The algorithm works by measuring the distance between the training sample and the
K nearest training samples. If there are more distances measured with a class named class 1 than
another class, class 2, then class 1 is our class of interest. This distance is usually one of the
following distances:

11 | P a g e
Figure-12 Formulas.

In the following figures, the value of K=3, so the distances between the test sample and the 3
nearest training samples is measured. Two of these distances are with the rugby class, and one
with the sprinter class, so our class of interest is rugby.

12 | P a g e
Figure-13 Example of classifying the data at run time.

13 | P a g e
2.3 Motors:
Various types of motors are available in the industry. Motors are generally classified as A.C and
D.C motors:

Alternating Current (A.C) motors:

An industrial type of AC motor .

Figure-14 Example of classifying the data at run time.

An AC motor is an electric motor driven by an alternating current (AC). The AC


motor commonly consists of two basic parts, an outside stator having coils supplied with
alternating current to produce a rotating magnetic field, and an inside rotor attached to the
output shaft producing a second rotating magnetic field. The rotor magnetic field may be
produced by permanent magnets, reluctance saliency, or DC or AC electrical windings.
The two main types of AC motors are induction motors and synchronous motors. In
an induction motor (or asynchronous motor), there is a difference in speed between the stator
rotating magnetic field and the rotor shaft speed called slip to induce rotor current in the rotor
AC winding. So, the induction motor cannot produce torque at synchronous speed where
induction (or slip) is irrelevant. In contrast, the synchronous motor does not have a slip and uses
either permanent magnets, salient poles (having projecting magnetic poles), or an independently
excited rotor winding.

14 | P a g e
Direct Current (D.C) motors:

A DC motor is any of a class of rotary electrical machines that converts direct


current electrical energy into mechanical energy. The most common types rely on the forces
produced by magnetic fields. Nearly all types of DC motors have some internal mechanism,
either electromechanical or electronic, to periodically change the direction of current flow in
part of the motor.
A DC motor's speed can be controlled over a wide range, using either a variable
supply voltage or by changing the strength of current in its field windings. The functionality of
this motor is that "whenever a current carrying conductor is placed in a magnetic field, it
experiences a mechanical force". The direction of this force is given by Fleming's left hand rule
and its magnitude is given by F = BIL. Where, B = magnetic flux density, I = current and L =
length of the conductor within the magnetic field.
An important difference between D.C and A.C machines lies in the fact that A.C
motors usually change their RPM when the frequency of the supply changes, whereas D.C.
motors usually change their speed when the voltage across their terminals is changed. For
microcontroller interfacing purposes, D.C motors are the best option as microcontrollers are
mostly given D.C power supplies.

2.4 Power Supplies:


To power a DC motor, analysis of its power supply is required. Consider a motor and a voltage
supply connected in series as follows:

Figure-15 The electric equivalent circuit of the armature.

To come to terms with inrush current (maximum starting current) in DC motors, let us consider
the basic voltage equation of the DC motor:

15 | P a g e
Where,
E is the supply voltage,
Ia is the armature current,
Ra is the armature resistance.
And the back emf is given by Eb.
The back emf, in case of a DC motor, is very similar to the generated emf of a DC generator as
it’s produced by the rotational motion of the current carrying armature conductor in presence of
the field. This back emf is directly proportional to the speed N of the motor. Now since at
starting N = 0, Eb is also zero, and under this circumstance the voltage equation is modified to
E=0+Eb Ra

To run a DC windshield wiper motor, a very high starting current is required. For such a high
starting current, Lithium ion batteries are used. A battery with a high inrush current is shown
below:

Figure-16 LION Power 14.8V 5200MAH 30C BATTERY.

16 | P a g e
Chapter Number 3

3. Functionality and Design (Proposed Solution)

After thorough research, the most optimum solution was designed both in terms of efficiency as
well as cost.

3.1 EMG Signal and Weight attainment:

➢ Why the EMG and Force Signals were used (Justification of their use):

Initially EEG and EMG were considered to provide signals carrying information of
elbow flexion. It was determined that EEG required surgical implantations for accurate results,
so EEG was dropped and EMG was considered as it offered a non-invasive and accurate
alternative to EEG. Similarly, for elbow extension, the load cell and force sensitive resistor
(FSR) were considered to provide accurate measurements for the force exerted during elbow
relaxation. The FSR approach was considered as it just required contact between the thumb and
the index finger to give a signal for elbow extension. The load cell approach was dropped as it
does not measure the pressure applied to something, but measure the weight of a body attached
to it.

➢ Functionality of the EMG sensor and FSR:

SPEx is designed in such a way that during flexion of the elbow, the EMG
signal amplitude at the biceps determines the RPM that is to be generated at the motor
connected to the exoskeleton and during extension, the force applied to a Force Sensitive
Resistor (FSR) determines the RPM of the motor in the other direction. A value of 0
attained from the EMG sensor implies no flexion of the elbow, whereas a value of 0 from the
FSR implies no extension of the elbow. The EMG sensor electrodes are attached to the
bicep muscles, and the FSR is attached to the thumb of the user.

The brain sends out electrical signals to the muscles when a person desires to move
a limb. Once these signals reach the muscles, they develop voltages at the muscles. These
17 | P a g e
voltages are called EMG signals. Old age or some muscle disorder can result in the distortion of
the EMG signals. The first and foremost task of SPEx is to determine the EMG signals and
classify them.
As far as the attainment of the EMG signals is concerned, these EMG signals are
attained using an EMG sensor. The EMG signal information is used during elbow flexion to
determine the RPM with which the elbow should flex. SPEx uses an inexpensive and readily
available EMG sensor named Muscle Sensor v3 by Advancer Technologies. This sensor is
shown as follows:

Figure-17 Muscle Sensor V3 Electromyography Module.

The v3 EMG sensor measures the filtered and rectified electrical activity of a
muscle; outputting 0-V Volts depending the amount of activity in the selected muscle, where V
signifies the voltage of the power source.
The schematic of this sensor is as follows:

18 | P a g e
Figure-18 Circuit schematic of Electromyography Module.

19 | P a g e
This sensor is connected to two batteries in series as shown below:

Figure-19 Electromyography module connections.

The microcontroller used is arduino. It attains the EMG signal amplitude on its
A0-A5 analog pins when the SIG pin of the EMG sensor is connected to the analog input pin
and the GND pin is connected to the ground on arduino.

➢ The specifications of the EMG sensor are as follows:

Figure-20 EMG sensor specification.

20 | P a g e
➢ The electrode placement to acquire EMG signals is as follows:

Figure-21 Electrode placement to acquire EMG


signals.

During extension of the elbow, a force sensitive resistor comes into play. The following
picture depicts an FSR:

Figure-22 Force sensing resistor.

This FSR will vary its resistance depending on how much pressure is being applied
to the sensing area. The harder the force, the lower the resistance. When no pressure is being
21 | P a g e
applied to the FSR its resistance will be larger than 1MΩ. This FSR can sense applied force
anywhere in the range of 100g-10kg, as shown below:

Figure-23 Resistance-Force graph of FSR.

The FSR is connected to arduino in the following manner:

Figure-24 FSR connection with arduino.

22 | P a g e
The FSR gives an analog value at one of the analog pins (A0-A5) of the arduino
board.
We have until now attained two analog inputs to the arduino board (EMG signal and FSR
reading). These are obtained on MATLAB using the following MATLAB commands:

a=arduino(‘com3’);
readVoltage(a,'A0')

This reads the analog voltage at the A0 pin. We can attain the analog voltage at another pin by
specifying the pin number.

Why the above mentioned sensors and microcontroller were used (Justification of their
use):

● V3 EMG Sensor: The v3 EMG sensor was used because it is available at a low cost
i.e.Rs 5500 and gives accurate information about the EMG signals.
● 0.5 Diameter Round Force Sensitive Resistor: This FSR was used as it is weighs
almost as much as a feather, and is a very accurate pressure sensor. It allows a person
to press it from both ends to calculate the pressure applied, something a load cell doesn’t
have.
● Arduino UNO: Arduino UNO was used because it is easy to use and can be interfaced
with MATLAB. By adding certain libraries to MATLAB, a user can write data to the
arduino pins or read data, directly using MATLAB.

3.2. Signal Training and Classification:

Why the KNN algorithm was used (Justification of its use):

Signal training was to be done using a very fast, yet efficient machine learning
algorithm. The KNN and SVM algorithms were considered. KNN was considered as it gave
the fastest results. KNNs accuracy was improved by better training of the EMG and FSR
signals.

23 | P a g e
Use of the KNN algorithm:

The training of EMG signals for elbow movement is not that easy because the
data available on the internet is of little use. This is because a Parkinson’s patient, an A.L.S
patient and a normal person have different EMG signal amplitudes for the same kind of
movement, and to add to the misery, two Parkinson’s patients have different EMG signal
amplitudes for the same kind of movement. Same is the case with Force signals from the
FSR. Due to this, the conventional approach of attaining a dataset from the internet is not valid
in our situation. Now suppose that our exoskeleton is to be used by a particular Parkinson’s
patient. EMG electrodes will be connected to the person, and the person will be asked to
perform certain predefined movements. The person’s EMG signal will be recorded in an
excel file, making our dataset. The same will be done during elbow extension using the
Force signals from the FSR. Throughout the project, the SPEx team did its testing on Mr
Shabib Shahid, a team member. For this purpose, Mr Shabib’s EMG and Force dataset were
constructed in 20 minutes by attaching EMG electrodes and an FSR to him, asking him to
perform certain movements, and then making an excel file with that dataset.
Now comes the classification part. The classification of the EMG and FSR
signals is done on MATLAB using the machine learning algorithm, K Nearest Neighbours
(KNN). MATLAB also allows reading and writing data to the arduino microcontroller. The
KNN algorithm measures the Euclidean distance between the test sample and the K nearest
training samples. If the euclidean distances measured with a certain class are more in number
(not magnitude), that particular class becomes our class of interest.
Consider the following scatter plot to understand the KNN algorithm. It is to be
noted that this plot has nothing to do with our project, but is just an example to illustrate the
working of the KNN algorithm. In the scatter plot we have two features, weight and height, in
addition to some training samples from the class of sprinter and rugby player. Now consider a
test sample as in the following figure:

24 | P a g e
Figure-13 Example of classifying the data at run time.

For a value of k=3, the distance between the training sample and the 3 nearest test samples is
measured. As two of these distances are from the rugby player class and one is from the sprinter
class, the class of interest is rugby player as 2>1.

This was just the explanation of the KNN algorithm, with arbitrary features. As far as SPEx is
concerned, we are using one feature for elbow flexion (EMG), and another for elbow
25 | P a g e
extension (Force). Using the EMG signal amplitude for elbow flexion, the RPM a person
wants to generate while moving the arm is determined. The motor then moves with the
corresponding RPM. Using the force signal amplitude for elbow relaxation, the RPM a
person wants to generate while moving the arm is determined. the various classes represent
the RPM of the motor as shown in the following plot:

Figure-25 Classes.

Now the classification of the EMG and FSR signal is done using the following lines of code
on matlab:

data = xlsread('C:\Users\it boulevard\Desktop\data.xlsx');


Class = knnclassify(readVoltage(a,'A0'), data(1:1000,1),data(1:1000,3),100)
%data is the excel file having the training data. The value of K=100 for the KNN
%algorithm
%The variable Class outputs a value from 1 to 5 as shown in the plot above, signifying
%various RPMs of the motors, with class 1 corresponding to 0 RPM and the higher
%classes corresponding to a higher RPM.

26 | P a g e
3.3. Driving the motor:

After classifying the EMG and FSR signals, a windshield wiper D.C motor is driven. A picture
of this motor is as follows:

Figure-26 Windshield wiper motor.

Why a D.C motor was used:

A D.C motor was used because it can be connected to an H-Bridge, which is connected to a
microcontroller. A.C motors can’t be connected to an H-Bridge.

Working of a DC motor and the H-Bridge:

This D.C motor has the ability to increase its RPM when a greater voltage is
applied across its terminals. So if the EMG and FSR signals corresponds to class 1, 0 volts is
applied to the motor terminals, and the motor doesn’t move. If the EMG signal corresponds to a
greater class, +V volts is applied and the motor moves the exoskeleton upwards, causing elbow
flexion. Similarly, if the FSR Force signal corresponds to a greater class, -V volts is applied
and the motor moves the exoskeleton downwards, causing elbow extension.

27 | P a g e
A power electronic circuit called an H-Bridge converts D.C to A.C ensuring
that both +V and -V are applied to the motor. Changing the polarity of the motor causes the
motor to rotate in the opposite direction. It can drive two motors at a time. The connections of
an H-Bridge to two motors are as follows:

Figure-27 The connections of an H-Bridge to two motors.

The internal circuitry of an H-Bridge is shown in the upcoming figure:

Figure-28 The internal circuitry of an H-Bridge.

When V=+V, the path of the current is as shown in figure 2. When V=-V, the path of the current
is as shown in figure 3. In both these cases, opposite polarities are applied on the motor, M
causing rotations in opposite directions.

The connections of the H-Bridge to the arduino microcontroller are as follows:

28 | P a g e
Figure-29 The connections of the H-Bridge to the arduino microcontroller.

MATLAB is used to determine the RPM of the motor and its direction. Then a
corresponding voltage is applied on the H-Bridge using the following lines of code on
MATLAB:

if (Class==1)
writeDigitalPin(a, 'D3', 1);
writeDigitalPin(a, 'D5', 0);
writePWMVoltage(a,'D6',0);
end

if (Class==2)
writeDigitalPin(a, 'D3', 1);
writeDigitalPin(a, 'D5', 0);
writePWMVoltage(a,'D6',0);
end

29 | P a g e
if (Class==3)
writeDigitalPin(a, 'D3', 1);
writeDigitalPin(a, 'D5', 0);
writePWMVoltage(a,'D6',0);
end

if (Class==4)
writeDigitalPin(a, 'D3', 1);
writeDigitalPin(a, 'D5', 0);
writePWMVoltage(a,'D6',0);
end

if (Class==5)
writeDigitalPin(a, 'D3', 1);
writeDigitalPin(a, 'D5', 0);
writePWMVoltage(a,'D6',5);
end
end

%writePWMVoltage(a,'D6',5); writes V volts on the motor, where V volts is the voltage of


%the battery running the H-Bridge.

%writePWMVoltage(a,'D6',0); writes 0 volts on the motor.

%writeDigitalPin(a, 'D3', 1);


%writeDigitalPin(a, 'D5', 0);

%Causes clockwise rotation,

30 | P a g e
%writeDigitalPin(a, 'D3', 1);
%writeDigitalPin(a, 'D5', 0);
%causes anticlockwise rotation.

The H-Bridge is powered using a lithium polymer battery as shown below:

Figure-16 LION Power 14.8V 5200MAH 30C BATTERY.

3.4 Bluetooth Control:

In order to make wireless operation of the exoskeleton arm possible i.e. to


wirelessly connect the microcontroller and the P.C running MATLAB, a bluetooth module

31 | P a g e
called HC-05 was used to connect the system running Matlab with the arduino microcontroller
placed on the exoskeleton.

System running Matlab HC-05 Arduino Uno

HC-05 Specifications:
Hardware features:
● Up to +4dBm RF transmit power
● Low Power 1.8V Operation ,1.8 to 3.6V I/O
● UART interface with programmable baud rate
● With integrated antenna
Software features
● Default Baud rate: 38400, Data bits:8, Stop bit:1,Parity:No parity, Data control: has
supported baud rate: 9600,19200,38400,57600,115200,230400,460800.
● Auto-connect to the last device on power as default.
● Permit pairing device to connect as default.
● Auto-reconnect in 30 min when disconnected as a result of beyond the range of
connection.

32 | P a g e
3.5 Mechanical Design of the Exoskeleton:[7][8]

Parameters considered while designing the Exoskeleton


While designing the exoskeleton, we had set some parameters so that we could
make it the best possible portable device. The four parameter we taken into account are listed
below. Each parameter has a brief explanation of how we achieved it and are well explained
later on.

1. Light Weight
We wanted our exoskeleton to be light in weight. Why light in weight? We
have seen many massive exoskeleton designs which are pretty heavy and their sole
purpose is to provide strength to the users to lift heavy weights and doing the
impossible. But we on the other hand are targeting patients. We want them to have their
normal lives back in which they were able to open door for themselves, lift their
groceries, lift up whatever they want, wash dishes etcetera. Now all of this is possible if
33 | P a g e
the exoskeleton weighs less than a kg. So that the users don’t feel like they are wearing
something and feel comfortable and easy using it. So for making it light in weight, we
decided to use the proper combination of two light weight materials which are
aluminium and hard plastic. The hard plastic is used on the areas where we required to
hold two things together or simply make a moveable joint. So only reason for not using
steel or iron for even stronger exoskeleton build is that they are heavy and they cost
more than aluminium too. Aluminium on the other hand has good weight to strength
ratio, is cheap and is easily available.

2. Easy to wear
Exoskeleton as we know is an external wearable device. The user has to
wear it to do his normal routine activity and should feel comfortable and nothing odd
wearing it. So we looked into different designs and finally ended up with the best
design. We used the knuckle joint for elbow joint and then modified it to make it more
frictionless. We made a pulley in the design which grip a ball bearing in it which
responsible for smooth and frictionless movement of elbow joint. We used Velcro straps
at three different location of the design to stick the exoskeleton firmly with the user’s
arm.

3. Longer Battery Life


Exoskeleton usually don’t have a wireless system to power them. If
there are some, then they don’t have a longer battery life. We have used a 5200mAh
Lithium Polymer Battery in our design which would power the exoskeleton throughout
the day on one time full recharge in a day. And this battery is capable of lasting for 1
year. So it can be said that the battery SPEx uses has a long battery life.

Kinematics Involved:
We have designed our exoskeleton to lift a weight of about 5 kg.
The DC motor used is capable of providing about 1600 N-cm torque at a point 5 cm away from
the shaft. We have a moment arm of 1 foot (30.48 cm) in our exoskeleton. This enables us to
easily lift about 5 kg load easily. Using a second FSR, we are able to measure the weight the
user is about to lift. Greater the load the greater the force the user will be providing to lift
the load. So a greater RPM is generated on the motor. It is also illustrated in following
figure.

34 | P a g e
Why we used Aluminium for SPEX ?
Physically, synthetically and mechanically aluminum is a metal like steel, metal, copper, zinc,
lead or titanium. It can be softened, thrown, framed and machined much like these metals and it
channels electric current. Truth be told frequently a similar hardware and creation techniques
are utilized with respect to steel.

1. Low density
Aluminum is a light metal with a particular weight of 2.7 g/cm3, about a third that of
steel. For instance, the utilization of aluminum in vehicles lessens dead-weight and
vitality utilization while expanding load limit. Its quality can be adjusted to the
application required by altering the creation of its amalgams.

2. Corrosion Resistance
Aluminum normally produces a defensive oxide covering and is exceedingly
consumption safe. Diverse kinds of surface treatment, for example, anodizing, painting
or lacquering can additionally enhance this property. It is especially valuable for
applications where insurance and protection are required.

35 | P a g e
3. Ductility
Aluminum is flexible and has a low softening point and thickness. In a liquid condition
it can be handled in various ways. Its malleability enables results of aluminum to be
essentially shaped near the finish of the item's plan.

4. Recyclability
Aluminum is 100 percent recyclable with no minimizing of its characteristics. The re-
dissolving of aluminum requires little vitality: just around 5 percent of the vitality required to
create the essential metal at first is required in the reusing procedure.

Why we used Knuckle joint for SPEX ?

Prologue to Knuckle Joint:


Knuckle joint is a kind of mechanical joint utilized as a part of structures, to interface two
meeting tube shaped poles, whose tomahawks lie on a similar plane. It allows some rakish
development between the tube shaped bars (in their plane). It is uncommonly intended to
withstand ductile burdens.

Parts of a Knuckle Joint:


A normal knuckle joint has the accompanying parts:
1. Fork end
2. Eye end
3. Knuckle stick
4. Collar
5. Taper stick
All the above parts can be envisioned on the off chance that you investigate the detonated see
demonstrated as follows.

36 | P a g e
Figure-30 Parts of a Knuckle Joint.

Advantages of Knuckle Joint:


1. Has a large load capability.
2. It is highly rigid.
3. Easily produced.
4. Easy to disassemble and assemble.

The exoskeleton manufactured is as follows:

Figure-31 Final Design of Exoskeleton.


37 | P a g e
Chapter Number 4

4. Implementation and Results :

The project resulted in the successful development of an exoskeleton of muscle patients. The
following modules were successfully implemented:

1 ) EMG signal attainment: EMG signals were acquired easily using the EMG sensor. The
following figure shows the EMG signal amplitude that was developed at different flexion
rates.

Figure-25 Classes.

When there was no flexion, amplitude of the signals corresponded to class 1. As the flexion
force was increased, a greater EMG signal amplitude was determined on MATLAB. The unit of
the quantity on quantity on the y-axis is volts. It is the voltage the EMG sensor develops on the

38 | P a g e
arduino microcontroller, and isn’t a direct measure of the EMG signal voltage which is usually
in microvolts or millivolts.

2) EMG signal classification: The EMG signals were correctly classified on MATLAB
using the KNN algorithm. The value of K was taken as 100. Choosing a smaller value of K
resulted in lesser accuracy, whereas a greater value of K resulted in greater computational
complexity.

3) FSR signal attainment and classification: The FSR signal was also correctly attained on
MATLAB and classified using the KNN algorithm taking K=100. The same logic holds for
FSR as does for EMG in points 1) and 2)

4) A robust and lightweight exoskeleton was designed as shown in the figure below:

Figure-31 Final Design of Exoskeleton.

39 | P a g e
Chapter Number 5

5. Conclusions and Future Recommendations:

5.1 Important Findings of the Project:

Our main breakthrough was the discovery that brain controlled exoskeletons
can give a high accuracy by using the KNN algorithm, which requires less computational
complexity, because of which the exoskeleton moves as soon as the person intends to move the
elbow. If we had used
High accuracy is something that is not usually attributed to non-invasive
exoskeletons, but our accuracy with the non-invasive EMG approach is something new.
The cost effectiveness of the exoskeleton makes the results even more significant.
Such exoskeletons are usually expensive. It is mainly because the design engineers use the
wrong approaches and end up making heavy exoskeletons that are impractical to wear. Our
approach of using lightweight aluminum rods allowed us to make an easy to wear and cheap
exoskeleton, which was a huge finding.

5.2 Technical Significance of the Results:

The accuracy of the exoskeleton is quite commendable i.e 98.5 %. The achievement of such a
high accuracy for exoskeletons is possible in button controlled exoskeletons and those EEG
based exoskeletons that require some electrode implantation to acquire the EEG signals. Our
results are significant for the field of neural signal processing as we used the non-invasive
EMG signal approach to attain such a high accuracy. The application of the KNN algorithm
implies that through proper training of the training data, even the most crude algorithms can
give good accuracy, with a high computation speed.

40 | P a g e
5.3 How Our Daily Lives Will Be Impacted (Impact on the Society):

If such an exoskeleton is mass-produced, it will revolutionize the lives of people who find it
difficult to move their arms, and people with arm movement problems will finally get some
hope. Currently, exoskeletons are used for amputees, not people who have limbs, but cannot
move them.. People with such limb movement problems are currently treated using medication
or surgical implantation surgeries, but with the introduction of the exoskeleton remedy, such
people will finally get some hope of a better life, where they can move their upper limbs
efficiently and effectively. This exoskeleton can be a stepping stone for the bionic revolution,
that engineers around the world are focusing on.

5.4 Commercialization of the Product:

Muscular degeneration occurs in large numbers throughout the globe. But if a


product is to be commercialized, the first place to look for is the local market. If we convert
this product into a startup, the local hospital going patients can be the first targets. To start off,
the product can be sold to various hospitals like the Al-Shifa hospital and the Doctor’s Hospital;
these hospitals can then use the product as a remedy for muscular degeneration, along with the
conventional techniques of medication and surgery.
Along with this, due to the potential of our product, large bionic manufacturing
companies will be interested in our work. If we make a startup, they can buy the startup and
make it a subsidiary company; if this happens, the product can reach more customers due to the
reputation of the large bionics company under consideration.

5.5 Limitations of the Product and How to remove these Limitations:

As the product is still in the prototype stages, it has the following limitations:

● The exoskeleton has the ability to lift a maximum of 5 kg of weight. To lift heavier
weights, a motor with a higher torque is required.

41 | P a g e
● The problem with having such a large motor is that it requires a battery that provides
large power. Our battery i.e the LION 5200 mah battery provides a very large inrush
current to the H-Bridge connected to the motor, thus damaging the H-Bridge due to
excessive use. This problem can be solved by using a battery that provides relatively less
power, but still powers the exoskeleton.

● Another main problem is that the EMG electrodes that are connected to the patient
wear out quite quickly, so they are to be bought weekly. This problem can be solved by
using everlasting electrodes that are also available in the market, but are usually larger in
size and difficult to wear. These everlasting electrodes are shown below:

Figure-32 Better EMG electrode pads.

The electrodes we have currently are as follows:

Figure-33 Current EMG electrode pads.

42 | P a g e
Appendix

SVM:
A Support Vector Machine (SVM) performs classification by finding the hyperplane that
amplifies the edge between the two classes. The vectors (cases) that characterize the hyperplane
are the support vectors.

KNN:
The algorithm works by measuring the distance between the training sample and the K nearest
training samples. If there are more distances measured with a class named class 1 than another
class, class 2, then class 1 is our class of interest.

EMG module:
An instrument utilized as a part of the conclusion of neuromuscular issue that creates a sound or
visual record of the electrical movement of a skeletal muscle by methods for an anode
embedded into the muscle or put on the skin.

DC Motor:
A DC Motor is an electric engine intended to be keep running from an direct current (DC)
control source. It has been over 100 years that Brushed DC Motors are utilized as a part of
industry, and residential applications.

Arduino:
It is an open-source platform utilize for building electronics projects. It comprises of both a
physical programmable circuit board and a bit of programming, or Integrated Development
Environment that keeps running on your PC, used to compose and transfer PC code to the
physical board.

Force sensitive resistor:


A type of resistor whose resistance can be varied by varying the force or pressure applied to it.

Aluminum:
Physically, synthetically and mechanically aluminum is a metal like steel, metal, copper, zinc,
lead or titanium. It can be softened, thrown, framed and machined much like these metals and it
channels electric current.
43 | P a g e
L298N:
A motor driving module.

EMG:
Electromyography – Acquiring and monitoring Nerve Signals coming from brain to muscles.

44 | P a g e
References

1. http://unyq.com/the-history-of-prosthetics/
2. http://www.medicine.mcgill.ca/physio/vlab/biomed_signals/eeg_n.htm
3. http://www.mdpi.com -> sensors-13-12431-v4%20(4).pdf
4. https://en.wikipedia.org/wiki?curid=65309
5. https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm
6. https://en.m.wikipedia.org/wiki/DC_motor
7. https://www.azom.com/article.aspx?ArticleID=1446
8. http://mechteacher.com/knuckle-joint/

45 | P a g e

You might also like