Remove this ad


Feb 15 16 5:55 PM

Tags : :

We started looking more into the EMG signal acquisition and Olly our software engineer wrote this comical and insightful update that I thought it might be useful for anyone that wanted to look more into EMG signal acquisition/processing.

WUBU2 (what you been up to)? 
I had assumed that during a muscle activation, each muscle produced an electrical signal at a slightly different frequency. To investigate this I used NI SignalExpress to view a real time plot (time domain and frequency domain) of the frequencies present at within an EMG signal. By viewing the signal in the frequency domain I was able to see that there were no specific frequency peaks relating to specific muscle contractions, which directly contradicts my earlier assumption. 

Instead of pursuing FFT analysis further I determined that I didn't have a good enough understanding of the fundamentals of EMG, therefore I decided to investigate the science behind muscle contractions and surface EMG sensing.

WUU2 (what you up to)?
I am currently researching the science behind surface EMG sensing, so as to have a better foundational understanding of how to correctly implement EMG sensing and analysis. My findings are detailed below.

How the heck does a muscle work?
Muscles are composed of many Motor Units (MU), which are comprised of muscle fibers. An electrical impulse from your brain or other source (spinal cord) passes down the nerves and stimulates the muscle at the innervation zones (motoneuron synapses). The synapses release charged chemical signals (Na+) to the insides of the muscle fibers, resulting in an electrical potential across the fibers, causing them to contract. This electrical potential, or Motor Unit Action Potential (MUAP) causes the muscle fibers to contract.

And what about all that EMG stuff?
The EMG sensors detect this MUAP, where the electrical signal is then differentiated, amplified and filtered to reduce background noise, reduce muscle crosstalk and bring the signal up to a usable level. The differentiation is produced by using 2 different 'signal' electrodes with respect a 'ground' electrode.

So have you got any thoughts on the shape/size of the electrodes?
The recommended EMG detection surface is 3 parallel metal (material not confirmed) bars. Each 1cm long, 1-2mm wide and spaced 0.5cm apart. The center electrode is the 'ground' and is used with each of the outer 2 electrodes to create a double differential input to reduce the effects of muscle crosstalk. 

Got any idea where to put it?
The EMG sensor (as detailed above) should be placed at the midpoint between the innervation zones (where the electrical signal is released as a chemical) and the myotendinous junction (where the muscle joins the tendon). The innervation zones differ between people, but the most reliable location is on the belly of the muscle).

Hey muscles, got any names? It would be swell if they were in latin.
Our current forearm muscle sensing method picks up the activation levels of the following muscles (I have also included the respective nerves which trigger the motor unit action potentials).

Open - Extensor
  • Muscle - Extensor carpi radialis longus
  • Nerve - Radial nerve

Close - Flexor
  • Muscle - Palmaris longus (PL)
  • Muscle - Flexor digitorum superficials
  • Nerve - Median nerve

Row row row your QUOTE gently down the stream
"These properties of the conduction volume cause multiple diffractions of the electric field vectors at the discontinuities and generate multiple paths of differing impedances between the source and the detection sites causing the signal to be scrambled in the frequency domain and hence uncorrelated"

[C. J. De Luca, 1997, “The use of surface electromyography in biomechanics”, Journal of Applied Biomechanics, 13 (2): 135-163]

The above basically means that due to the various biological inconsistencies within the forearm, any frequencies produced by muscles vary greatly in magnitude and consistency. This means that using 1 or 2 EMG sites in order to try to extrapolate the MUAP's of multiple muscles may not be possible. One solution may be to use some sort of EMG array, similar to that of the Myo armband. 
Quote    Reply   
Remove this ad
Remove this ad

#1 [url]

Feb 15 16 10:01 PM

I started looking at EMG a while ago, but got distracted :) I was using an olimex EMG shield on an Arduino UNO, connected to a .net app to graph an FFT of the trace. At some point I will go back to it, probably when I get my open BCI headset (expected in the summer sometime). I have a vague plan to use the headset and emg to feed a deep neural network and see if I can train a network that will recognise intended actions from either emg or brain waves.
It is a way off, but I was thinking you could have an app that displays "flash cards" specifying the action that the user should make e.g "clench fist", "point index finger" etc. These classifications would also be fed into the network along with the brain/emg data. TBH I don't think a neural network word be portable to an AVR - there are too many matrix multiplies and the matrices get very big, but once it was trained (ideally on a graphics card) you may get away with an rpi2 or ideally a more bare bones version of an NVidia Jetson .

Last Edited By: jaundice Feb 16 16 10:17 AM. Edited 1 time.

Quote    Reply   

#2 [url]

Feb 16 16 8:41 AM

If an rpi2 is close then there will probably be something even better released in a year or two, could be good to do the project in two phases, where the first one is desktop and the second one assumes some further embedded computing developments will take place in the near future. We've had a fair bit of contact with Conor and Joel from Open BCI and they're super keen for the Open Bionics hand controlled by OpenBCI headset to happen (as we are, we just won't have the time to work on it at the moment). I'll show them this thread but perhaps we make a new design challenge/topic for that project.

I know Easton Lachappelle used a basic EEG headset to control his arm, although I don't think I've ever seen any particularly compelling videos of it working.

A deep neural network design might work pretty well cross platform, for either an EMG array or an EEG array.

Quote    Reply   

#3 [url]

Apr 6 16 10:44 AM

For my final year project I'm doing EMG signal analysis to discriminate between three different gestures: relaxed, open palm and a closed fist.

I'm using an ADC (DT9801). The analog input has EMG signals which go through an amplifier.

If you have any questions on analysing the signals just pop me a message. I'm currently using one sensor on the flexor carpi radialis.

Quote    Reply   

#4 [url]

Apr 7 16 8:52 AM

Hi John,

We'd love to be kept up to date with your progress as your project sounds very interesting.

Will you be using disposable surface EMG electrodes? Or Ag/AGCl reusable electrodes?
Will you be mesaring standard EMG signals? Or will you be measing the muscle impedance?
How are you planning on discerning between the three different gestures using a single EMG site?



Quote    Reply   
Remove this ad

#5 [url]

Apr 7 16 9:19 AM

Hello OMac,

I'm using a reusable electrode - It's the MA-311

Standard EMG signals. So, I'm doing a kind of four step hierachical flow using three threads:

The first thread is just capturing data. We don't want any other things happening in this thread overwise data will be lost. The ADC I'm using (A bit naff) fills up a buffer and then sends that through. So, roughly every 300ms I get a buffer filled with data. This is then copied to a data structure which the second thread will use.

The second thread does three function:
- Filter Data
- Feature Extraction
- Fuzzy Inference System firing.

The filter data part uses a first order butterworth filter with an attenuation point of 100hz (This can be modified, but any less will result in small gesture not really being recognised).

After each point of raw data has been filtered it gets pushed into a sliding window. Then the feature extraction happens;

Currently I'm using two features and getting a third up and running.
- RMS (Root Mean Square. This is basically a rolling average)
- Peak (Measures the peak after the sliding window has x amount of new samples present)
- Contraction / relaxation (Outputs if I'm contracting or relaxating)

Then, after the features have been extracted they get put into a fuzzy logic system with an output being a possible accuracy measurement. The one that fires the highest (0 - 100) is the most likely of appoximations for the gesture (This means I need to sort of "train" each system offline).

The third thread just updates the GUI.

This all needs to happen under that 300ms barrier stated earlier. 

Edit -

The part I am having issues with is the feature extraction. I'm trying to find directly differences between a fist and palm rather than just the power of the signal. Tricky!

Last Edited By: John Apr 7 16 4:16 PM. Edited 1 time.

Quote    Reply   

#6 [url]

Apr 8 16 2:02 AM

Hi John 

I am working on multichannel EMG signal for classification of hand movements.Could you please share your technical flow it will give some direction to me.I have used amplified and rectified circuit.CAn these signal directly fed to arduino for ADC?

Quote    Reply   

#7 [url]

Apr 8 16 2:06 AM

Hi John 

I am working on multichannel EMG signal for classification of hand movements.Could you please share your technical flow it will give some direction to me.I have used amplified and rectified circuit.CAn these signal directly fed to arduino for ADC?

Quote    Reply   

#8 [url]

Apr 8 16 10:40 AM

Hello Kosha, Electronics isn't my strong point but I can't see why you can't send that data stream through the arduinos ADC. As stated in my earlier post, there are four main parts to my project

- Data Aquisition
- Digital Filter
- Feature Vector Extraction
- Fuzzy Logic Gesture Discimination

There are some brilliant papers online that can help you solve your issue. Here are some i've read:

Quote    Reply   
Remove this ad
Add Reply

Quick Reply

bbcode help