Anda di halaman 1dari 14



1.1 Background
Electromyography (EMG) signal is a kind of biology electric motion signal which is produced by
muscles and the neural system. EMG signals are non-stationary and have highly complex time
and frequency characteristics.
There are two kinds of EMG in widespread use: surface EMG and needle (intramuscular) EMG.
To perform intramuscular EMG, a needle electrode is inserted through the skin into the muscle
tissue. A trained professional (most often a physiatrist, neurologist, physical therapist, or
chiropractor) observes the electrical activity while inserting the electrode. The insertional activity
provides valuable information about the state of the muscle and its innervating nerve. Normal
muscles at rest make certain, normal electrical sounds when the needle is inserted into them.
Then the electrical activity when the muscle is at rest is studied. Abnormal spontaneous activity
might indicate some nerve and/or muscle damage. Then the patient is asked to contract the
muscle smoothly. The shape, size and frequency of the resulting motor unit potentials is judged.
Then the electrode is retracted a few millimeters, and again the activity is analyzed until at least
10-20 units have been collected. Each electrode track gives only a very local picture of the
activity of the whole muscle. Because skeletal muscles differ in the inner structure, the electrode
has to be placed at various locations to obtain an accurate study. Instead, a surface electrode may
be used to monitor the general picture of muscle activation, as opposed to the activity of only a
few fibers as observed using a needle.
It has been proposed that the electromyography (EMG) signals from the bodys intact
musculature can be used to identify motion commands for the control of an externally powered
Up to the present, many researchers have investigated rehabilitation systems and designed
prosthetic hands for amputees since Wiener proposed the concept of an EMG-controlled
prosthetic hand. EMG signals have often been used as control signals for prosthetic hands, such
as the Waseda hand.
1.2 Motivation
The project is aimed at assisting people with who have lost the lower part of their hand due to
various reasons: health complication, disease or explosions during war. It will be a great
assistance if they can get an aid to do whatever normal hand can do.

1.3 Objective
This work aims at designing and implementing FPGA based module to process and perform
pattern recognition on EMG (Electromyography) signals that are received from human muscular
movements that are otherwise complex to analyze on some standard methods.
Gaining experience and analyzing the stages involved for processing EMG data

Examining the EMG signals using Wavelet functions and Toolbox on MATLAB
Developing our own algorithm for EMG detection using MATLAB
Implementing our algorithm on real time FPGA based system and familiarize with Xilinx
Final aim is to implement the design on Spartan 3E kit and analyzing the results on real
time input from hardware interface.

1.4 Scope of the Project

The prosthetic hand which could function like a biological hand is rarely available in the world.
In context of our country, when a person loses his hand prosthetic hand is available to replace the
biological hand but it is just a piece of metal or plastic as it cannot function like a biological
hand. In our project we intend to develop a prosthetic hand which could function like biological
hand based on the control command it receives. These control commands are generated after the
analysis of the EMG signal.
The project can be extended to control any prosthetic part of the victim based on the
EMG signal generated.


2.1 System Architecture

2.1.1 Block Diagram

Human Hand

EMG Electrode




Fig: 2.1: System Block Diagram

2.2 System Operation

2.2.1 EMG Electrode
There are mainly two kinds of electrodes in use for EMG study: Surface electrode and needle
electrode. Skin surface electrode is used here because of the non-invasive characteristics, easy
handling and low cost.
Surface electrodes such as silver/silver chloride pre-gelled electrodes are the most often used
electrodes and recommended for the general use as shown in fig 2.2a. Besides easy and quick
handling, hygienic aspects are not a problem when using this disposable electrode type. The
electrode diameter (conductive area) should be sized to 1cm or smaller. Commercial disposable
electrodes are manufactured as wet gel electrodes or adhesive gel electrodes. Generally wet-gel
electrodes have better conduction and impedance conditions (=lower impedance) than adhesive
gel electrodes. The latter one has the advantage that they can be repositioned in case of errors.

At least one neutral reference electrode per subject has to be positioned. Typically an electrically
unaffected but nearby area is selected, such as joints, bony area, frontal head, processus spinosus,
christa iliaca, tibia bone etc. The latest amplifier technology needs no special area but only a
location nearby the first electrode site.
The position of the electrode are as kept as shown in fig 2.2b.Study have shown that this position
of the electrode can provide us with the correct signal for analysis.

Fig 2.2 a: EMG surface electrode

Fig 2.2 b: Position of Electrodes

2.2.2 EMG Signal Acquisition:

The raw EMG signal is processed through the following steps to get a smooth signal that can be
sent to signal conditioning unit. The steps involved are: Raw signal amplification (differential mode)
EMG-amplifiers act as differential amplifiers and their main quality item is the ability to reject or
eliminate artifacts. The differential amplification detects the potential differences between the
electrodes and cancels external interferences out. Typically external noise signals reach both
electrodes with no phase shift. These common mode signals are signals equal in phase and
amplitude. The term "common mode gain" refers to the input-output relationship of common
mode signals. The "Common Mode Rejection Ratio" (CMRR) represents the relationship
between differential and common mode gain and is therefore a criteria for the quality of the
chosen amplification technique. The CMRR should be as high as possible because the
elimination of interfering signals plays a major role in quality. A value >95dB is regarded as
State of the art concepts prefer the use of EMG pre-amplifiers. These miniaturized amplifiers are
typically built-in the cables or positioned on top of the electrodes (Active electrodes). The main
idea of using small EMG pre-amplifiers located near the detection site is early pick up of the
signal, amplify it (e.g. 500 gain) and transmit it on a low Ohm level that is less sensitive to
(cable-) movement artifacts. Analog band pass filter

Filtering of the raw EMG should be specified by:

filter types (e.g., Butterworth, Chebyshev, etc.)

low and/or high pass cut-off frequencies
slopes of the cut-offs (dB/octave or dB/decade)

Analog filtering, usually band pass, is applied to the raw signal before it is digitized. Band pass
filtering removes low and high frequencies from the signal. Low frequency cutoff of band pass
filter removes baseline drift sometimes associated with movement, perspiration, etc., and
removes any DC offset. Typical values for the low frequency cutoff are 5 to 20 Hz. If the mean
value of the signal is not zero before high pass or band pass filtering, it will be afterward,
because these filters remove low frequency components of a signal, and so they force the mean
value to be zero or nearly zero.
High frequency cutoff of band pass filter removes high frequency noise and prevents aliasing
from occurring in the sampled signal. The high frequency cutoff should be quite high so that
rapid on-off bursts of the EMG are still clearly identifiable. Typical values are 200 Hz 1 kHz.
For surface EMG: high pass with 10-20 Hz cutoff, low pass near 500 Hz cutoff, in most cases.
The power density function of the surface EMG signals has negligible contributions outside the
range 5-10 Hz to 400-450 Hz. The bandwidth of the amplifier-filter should be within this range
e.g. high pass 5 Hz, low pass 500 Hz). Rectification
The absolute value of the signal is taken. This is also called full wave rectification. The
rectification step is essential for getting the shape or envelope of the EMG signal. The
envelope cannot capture the low-pass, unrectified signal. The reason this doesnt work well by
itself is that the EMG signal is naturally nearly zero mean, with fast oscillations that swing
quickly and more or less equally on either side of zero. If you smooth such a signal you just get
zero not very useful. If one first rectifies, the negative swings turn into positive swings.
Sampling EMG
A sampling rate of at least twice the frequency of the cutoff frequency of the analog low pass
filter used is recommended. In other words, sampling rate of at least 1000 Hz if the low pass
filter cutoff frequency is 500 Hz. A higher sampling rate (at least five times the nominal low pass
filter cutoff frequency) can be used to avoid aliasing, because analog low pass filters roll off
slowly, so there can be significant power at frequencies well above the cutoff frequency. Thus, if
the high frequency cutoff is 500 Hz, a sampling rate of 2.5 KHz or more is recommended. In
computer processing of the EMG it is important to consider these important factors: It is
advisable that the raw EMG (after amplification and bandpass filtering) is stored in the computer
for digital processing.
The minimal acceptable sampling is at least twice the highest frequency cut-off of the bandpass
filter, e.g., if a bandpass filter of 10-400 Hz was used, the minimal sampling rate employed to

store the signal in the computer should be at least 800 Hz (400 x 2), as specified by Nyquist
theorem, and preferably higher to improve accuracy and resolution. Sampling rates below twice
the highest frequency cut-off are incorrect unless evidence is provided that there is no noise in
the frequency band between the highest signal frequency and the cut-off frequency of the
lowpass filter.
If rectification and smoothing with a low-pass filter is performed with hardware prior to
sampling and storing data in the computer, the sampling rate could be drastically reduced
because of the reduced bandwidth of the linear envelope. Rates of 50-100 Hz are sufficient to
introduce the EMG envelope into the computer. Number of bits, model, and manufacturer of
A/D card used to sample data into the computer should be given. EMG Amplitude Processing
The signal is low pass filtered, with in the 5 100 Hz range, and the result looks like the
envelope of the original signal. One way to low pass filter a signal is to simply take the mean
value, in a window which slides along the signal. Some authors advocate this rectify and
mean approach. Such a movingaverage window is an example of a finite impulse response
(FIR) filter. If the window is symmetric and centered, then it will not alter the phase, or timing,
of the signal. Filters that do not alter the phase are said to have zero phase shift. Another way
to low pass filter the rectified signal is to use a discrete version of a traditional low pass filter
such as Butterworth or Chebyshev. These are infinite impulse response (IIR) filters. An IIR
filter is often applied in both the forward and backward directions, because this results in zero
phase shift.
The combination of rectification and low pass filtering is also called finding the linear
envelope of the signal, since the filtering operation meets the mathematical definition of
linearity (although the absolute value operation does not), and, because it is low pass, it captures
the envelope of the signal.
The rectified signal can be Smoothen with low pass filter of a given time constant (10-250 ms) is
often described as "smoothing with a low pass filter with a time constant of x ms". Time
constants higher than 25-30 ms introduce detectable delays and should be used only when
interest is on the mean amplitude (moving weighted average) and not on any timing relationship
with other events. Digital non causal FIR linear phase filters are recommended The above
process can be described as "linear envelope detection" by giving the time constant value and/or
the cut-off frequency and the order of the low-pass filter used.
The mean value of the rectified EMG over a time interval T is defined as Average Rectified
Value (ARV) or Mean Amplitude Value (MAV) and is computed as the integral of the rectified
EMG over the time interval T divided by T.
Another acceptable method of providing amplitude information is the "Root Mean Square" or
RMS defined as the square root of the mean square value. Just as the ARV, this quantity is
defined for a specific time interval T which must be indicated. EMG frequency processing

Power Density Spectra presentation of the EMG should include:

Time epoch used for each spectral estimate

Type of window used prior to taking the Fourier Transform (e.g. rectangular,
Hamming, etc.)
Algorithm used (e.g. FFT)
Zero padding applied (if any)
The resultant frequency resolution
Equation used to calculate the Median Frequency (MDF), Mean Frequency (MNF),
Moments, etc.

Other processing techniques, especially novel techniques, must be accompanied by full scientific
description. Normalization
One big drawback of any EMG analysis is that the amplitude (microvolt scaled) data are strongly
influenced by the given detection condition (see chapter Influence of Detection Condition): it can
strongly vary between electrode sites, subjects and even day to day measures of the same muscle
site. One solution to overcome this uncertain character of micro-volt scaled parameters is the
normalization to reference value, e.g. the maximum voluntary contraction (MVC) value of a
reference contraction. Prior to the test/exercises a static MVC contraction is performed for each
muscle. This MVC innervation level serves as reference level (=100%) for all forthcoming trials
The MVC test has to be performed for each investigated muscle separately.
2.2.3 EMG signal Recognition Wavelet transform and feature extraction methods
Wavelet transform method is divided into two types: discrete wavelet transform (DWT)
and continuous wavelet transform (CWT). DWT was selected in this study because of the
concentration in real-time engineering applications. DWT is a technique that iteratively
transforms an interested signal into multi-resolution subsets of coefficients. Like the
conventional time-frequency analysis, the DWT transforms the EMG signal with a suitable
wavelet basis function (WF). Therefore, the WF plays a key role in the multi-resolution analysis.
In this study, we investigated the usefulness of the multi-resolution analysis through studying of
the EMG features with different scales and local variations and also the elimination of the
undesired frequency components. In addition, the selection of an optimal WF is proposed.
The original EMG signal (S) is passed through a low-pass filter and a high-pass filter
(coefficients of filters depend on WF type) to obtain an approximation coefficient subset (cA1)
and a detail coefficient subset (cD1) at the first level. In order to obtain the multiple-resolution
subsets, repetitious transformation is done. This process is repeated until the desired final level is

obtained. In this study, four levels of decomposition are selected as shown in Fig.2.3b. In the
EMG analysis, four levels of wavelet decomposition show better performance than the other
levels in a lot of literatures. Finally, this generates the coefficient subsets of the level 4
approximation (cA4) and the level 1, 2, 3, 4 details (cD1, cD2, cD3, and cD4), respectively.
Moreover, each coefficient subset can be reconstructed to obtain an effective EMG signal part.
Reconstruction of a signal is done by using the inverse wavelet transform. Generally, the inverse
transform is performed by using the coefficients of all the components of the final-level
decomposition, that is the fourth-level approximation and the first four levels of detail (cA4,
cD1, cD2, cD3, and cD4). However, in this study, we define the reconstructed EMG signal by
the inversion of subset dependence. For example, in order to obtain the estimated signal from
approximation coefficient subset only, the reconstructed EMG signal (A4) is inversed by using
the coefficients of the fourth-level approximation (cA4) only. Therefore, we will obtain the
reconstructed EMG signals, namely A4, D4, D3, D2, and D1 that are reconstructed from cA4,
cD4, cD3, cD2, and cD1, respectively. However, the optimal wavelet function is dependent on
the type of interested applications. Some good wavelet functions that are suitable for EMG signal
analysis are shown in one of our previous works. Seven mother wavelets are selected to be
evaluated in this study. There are the second and the seventh orders of Daubechies wavelet (db2
and db7), the forth and the fifth orders of Coiflet wavelet (coif4 and coif5), the fifth order of
Symlets wavelet (sym5), the fifth order of BioSplines wavelet (bior5.5), and the second order of
ReverseBior wavelet .

Fig 2.3a: Wavelet transform of a signal

In wavelet analysis, a signal is split into an approximation and a detail. The approximation is
then itself split into a second-level approximation and detail, and the process is repeated. For an
n-level decomposition, there are n+1 possible ways to decompose or encode the signal.

Fig 2.3b: Discrete wavelet transform decomposition tree level 4.

For discriminating the EMG patterns among feature vectors, a three-layer feed forward neural
network is applied to the EMG features. Multi-layer neural networks have been successfully
applied to some difficult and nonlinear problems in diverse domains. BPN were frequently used
in previous research for EMG pattern recognition. Generally, the speed of training feed forward
neural networks is very slow, especially for the common back propagation learning algorithm.
There is considerable research on methods to accelerate the convergence of the algorithm. The
research can be roughly divided into two categories. The first category involves the development
of ad hoc techniques, such as variable learning rate, using momentum and rescaling variables.
Another category of research has focused on standard numerical optimization techniques, such as
conjugate gradient, quasi-Newton methods and nonlinear least squares. The method used in this
paper is the VLR algorithm. The structure of the three-layer feed forward network applied to
EMG pattern recognition is that the number of nodes for the input layer is 12 (twelve AR
parameters or wavelet parameters), and the number of nodes for the output layer is 6,
corresponding to three fingers flexion/extension motion. The number of nodes for the hidden
layer is decided by the experiments, not more than 30 units.
In this study, the popular and successful features called MAV and RMS are selected. However,
in the experiments we found that the MAV and RMS features gave the same trend on the results.
Moreover, MAV feature is better than RMS feature in the class separability point of view.
Therefore, in this paper, only results of the MAV feature were discussed in the later section. The
definition of MAV feature is defined as

where xn represents the nth sample of the EMG signal (S) or the wavelet coefficients subsets
(cD1-cD4, cA4) or the reconstructed EMG signals (D1-D4, A4) in a window segment and N
denotes the length of EMG signal window-segment (N = 256 in this study). The comparison of
class separability in each type is discussed to find the suitable EMG subset.


In evaluating performance of the EMG features, class separability viewpoint is a central

criterion. The good quality in class separability viewpoint means that the result of
misclassification will be as low as possible. In other words, maximum separation between
classes is obtained and minimum of the variation in subject experiment is reached. In this study,
we used two evaluation criteria, called the scatter graph and the RES index (statistical
measurement method). Generally, the selection of EMG features can be deployed based on either
classifier method or statistical measurement index. However, a drawback of an evaluation using
classifier is that the evaluation results are dependent on types of the classifier. Hence, in this
study, we have proposed the selection of EMG features based on statistical index.
Two criteria used in the evaluation are the ratio of a Euclidean distance to a standard deviation
and the scatter graph. The results show that only the EMG features extracted from reconstructed
EMG signals of the first-level and the second-level detail coefficients yield the improvement of
class separability in feature space. It will ensure that the result of pattern classification accuracy
will be as high as possible. Optimal wavelet decomposition is obtained using the seventh order of
Daubechies wavelet and the forth-level wavelet decomposition.
2.2.4 FPGA Implementation
The signal processing is implemented using the FPGA on the Spartan 3E board. This will be new
to learn and further study will be needed. The board is expected to be provided by the collage.
2.2.5 Simulation and Control
The simulation of the correctness of the processed signal can be done using a simulation
environment such as Simulink. After the successful verification of the signal only then the
hardware implementation will start.
2.2.6 Hardware Implementation
The processed signal is used to control a robotic hand similar to the human hand. This robotic ha
hand will be realized by using light weighted metal. Movement of various part of hand is
executed by controlling the servo motors.
2.2.7 Testing and Assembly
After the signal is generated the execution of the control commands to move the prosthetic
hand will be tested using software like MATLAB and Proteus. After the simulation works
properly the control signal will be fed to the designed hardware.




Spartan 3E board*
Stepper motors
EMG electrodes
Differential Amplifier
Operational amplifier
Miscellaneous ICs, Passive components, Operational Amplifier, DSPs.


Matlab IDE
Xilinx ISE
*Expected to be provided by the collage








1 1. Surface EMG Electrode



2 2. Spartan 3E board*

3 3. Operational Amplifiers



4 4. Differential Amplifier









5 5. Passive Elements
6 6. Motors
7 7. Other ICs and PCB components


Table 4.1 Cost Estimation



The overall time duration of the project was about eight months. Different tasks has been found
out and their operation will be carried as shown in the Grantt chart below:












Table 5.2 Grantt Chart

Task 1: Research and Study

Task 2: Circuit Design
Task 3: Signal Acquisition
Task 4: Pattern Recognition
Task 5: Simulation and Physical Implementation
Task 6: Testing and Debugging






Quantification of the dynamic properties of EMG patterns during gait, Anthony L. Ricamato,
Joseph M. Hidler, Journal of Electromyography and Kinesiology

Mathwork manual,

Signal Processing and Pattern Recognition using Continuous Wavelets, Ronak Gandhi, Syracuse
University, Fall 2009

A Five-fingered Underactuated Prosthetic Hand Control Scheme, Jingdong Zhao, Zongwu Xie,
Li Jiang, Hegao Cai Hong Liu, Gerd Hirzinger

The ABC of EMG, Peter Konrad, Version 1.0,April 2005

Jingdong Zhao, Zongwu Xie, Li Jiang, Hegao Cai Hong Liu, Gerd Hirzinger, A Five-fingered
Underactuated Prosthetic Hand Control Scheme, IEEE

Electromyogram analysis, Willam Rose