Showing posts with label Mu Waves. Show all posts
Showing posts with label Mu Waves. Show all posts

Wednesday, November 6, 2013

Waveforms from Homemade Electrodes

As follow-up to my surprisingly popular post on my homemade electrodes, ERPOLOGY asked to see the EEG traces.  Well, since making graphs is one of my most favorite things to do (NERD ALERT!), I'm happy to oblige.

First, as a reminder of what I did, I built some EEG electrodes out of really cheap materials.  To see how well they worked, I stuck them to my head using Ten20 conductive paste in locations approximating Cz (top of head) and C3 (side of head).  The spectrogram above shows the data that I recorded.  As you can see, the test contains several test conditions:
  1. Closed Eyes (to see Alpha Waves)
  2. Open Eyes and Relaxed (to see Mu Waves)
  3. Open Eyes While Moving Hand (to suppress my Mu Waves)
Time-Domain Plots

OK, now let's make the new plots.  First, I've chosen short excerpts from each of the three periods.  I've plotted them below.  Note that these plots are zoomed way in so that you can count the period of the Alpha waves and of the Mu waves.

First, below, I show a trace from when my eyes were closed and I was generating Alpha Waves due to my Posterior Dominant Rhythm (PDR).  Remember, my electrodes were not on the back of my head -- they were on the side of my head.  So the PDR Alpha waves are not as pure looking as you might expect.  If you count the peaks, though, you'll see that there are about 9-10 cycles per second (ie, 9-10 Hz), which is what we saw in the spectrogram at the top.


Next, below, I show a trace from when my eyes were open and I was trying very hard to be relaxed (an oxymoron).  I was successful in generating some Mu waves.  They're shown below.  If you could the peaks, you'll get 10-12 waves per second (depending on how you count).  Based on the spectrogram, the frequency of my Mu waves is a little bit higher than my PDR Alpha waves.  This is probably confirmed by the peak-counting in the plot below.


The last time-domain plot, below, is for when I open and close my hand.  This should suppress my Mu waves.  In the spectrogram, they do appear to be absent.  In the plot below, they appear to be absent as well.  Good.



Frequency-Domain Plot

Before we finish, let's go back to the frequency domain...but let's plot a regular spectrum and not a spectrogram.  While the spectrogram is great for getting a sense of what is happening throughout the test, it is not the best tool for being quantitative.  Sometimes a simple spectrum plot is better.  

For the spectrum plot below, I took a long sample of each activity (10s of seconds, several thousand data points), I performed a series of 512-point FFTs and I averaged the FFT results together to get a nice, smooth spectrum for each condition.  By plotting the averaged spectrum for each condition all on the same graph, I can quantify the differences between the three conditions.  Here are the results:


As you can see, the Alpha waves were definitely at a lower frequency (9.3-9.8 Hz using my data reading cursor) than my Mu waves (11.7 Hz).  As I mentioned during the discussion of the time-domain plots, the spectrogram showed this fairly well.  But, a basic spectrum plot like this one makes it much easier to see and quantify the difference between the two.

Also, this graph implies that the Mu waves were about half the amplitude of the Alpha waves.  While it is true that Alpha are clearer in the spectrogram, which suggests that the Alpha were stronger, the primary reason that the Alpha were clearer is because I was able to sustain the Alpha waves more steadily than the Mu waves.  Detailed examination of the data shows that my Mu waves came and went every few seconds.  Therefore, in the averaged FFT plot, the apparent amplitude of the Mu waves will appear to be smaller simply because it includes all those short periods where the Mu waves temporarily went away.  That's a risk with using a heavily-averaged spectrum plot.  You gotta know your tool.

Finally, this spectrum plot nicely shows how clenching my hand (the red trace) suppresses the Mu waves completely.  Again, that was clear in the spectrogram, but this plot shows it very nicely as well.

Implications

With this extra detailed view of the data, you can start to see how you could design a signal processing chain to detect Mu waves.  Looking at the frequency plot, it is clear that you would need a really tight filter...maybe about 1 Hz wide.  For me, the filter would need to be centered on 11.7 Hz.  You might have your own special frequency.  Finally, because this plot shows that the energy in my PDR Alpha overlap with my Mu, you might want to sense the frequencies on either side of your Mu waves.  If there is energy on either side of Mu, then it's likely that the energy inside your Mu frequency band is from something else...such as PDR Alpha.

Without a graph like this, designing the signal processing would be much harder.  With this graph, I get all sorts of ideas.  This is why I like graphs so much...they can give quick insight into complex data.

If you've made it this far...thanks for reading!  You're awesome!

Follow-Up: Want to see my data from this experiment?  Check out my github!

Tuesday, November 5, 2013

Homemade Passive Electrodes

After the challenge of getting oneself some decent EEG electronics, the next hardest part is getting some decent EEG electrodes.  Sure, there are lots out there that can be bought, but some folks have no interest in paying $8-$20 per electrode (plus shipping) because they know that they need to buy 6-10 of these electrodes and, well, that becomes a lot of money.  So, I decided to try to build my own homemade EEG electrodes.  Here's my story...(and for you impatient folks...yes, there's a fairly happy ending)

Wearing my homemade passive EEG electrodes.
(Beware of cheap cameras and flourescent lights)

The Idea: Use Cheap Bits from the Hardware Drawer

When I look at passive EEG electrodes, I just see a piece of flat metal with a wire attached.  Sure, I see the use of fancy metals (gold, silver / silver-chloride), but is that really necessary?  For EEG research or EEG medicine, the quality and repeatability provided by the fancy metals is necessary.  For EEG Hacking?  I'm not so sure.  So, if an electrode is just a piece of flat metal with a wire attached, it seems like I should be able to build one myself.

I started by searching through my hardware drawer to find a suitable piece of metal that is small and flat.  I found some lock washers with a solder tab (see picture below-left).  It is a very basic and inexpensive component.  I'm pretty sure that mine are from Mouser and cost $0.24 each.  You can probably get them cheaper.



I then grabbed a piece of wire, stripped the end, and inserted it into the tab on the washer.  Looks like it'll do nicely (see picture above-right).  To soldered the wire to washer, I simply placed it in my plastic-gripped vice and applied heat and solder (pics below).  If you don't have a vice, a traditional "3rd hand" soldering fixture would have worked fine, too.  This is not fancy work that we're doing here.


Once the wire was soldered to the washer, I realized that I should have added a piece of shrink tube over the wire to cover the solder joint.  But, once it was soldered together, it was too late to add the shrink tube (the other end of my wire already had a connector on it).  Dang!  When I made a second electrode, I remembered to add the shrink tube on that one.  As you can see below, the black shrink tube makes the second electrode look much nicer than the first one.

My First and Second Homemade Passive Electrodes.  On the second one, I remembered to add a piece of shrink tube to cover the solder joint.  It looks much better.
With the working end of the electrode complete, I could consider the other end of the wire...the end where normally on would add a connector for plugging into the EEG electronics.  Since I stole my wire from an old ECG lead wire, I have the "touchproof" connectors on the end of my electrodes.  But, you don't need anything that fancy if you want to spend less money.

The least expensive approach for "connectors" would be to solder on a male or female pin header, which are only about $0.04 per connection.  This kind of connection is perfect for connecting to OpenBCI, which is built around traditional 0.1" spaced pin headers.  So, if you put the mating gender of pin header on your homemade electrodes, they could plug right into the OpenBCI board.  Great!  Alternatively, if you use OpenEEG, you will want to terminate your electrode's wire with a 3.5 mm stereo phono plug.   That is what the OpenEEG is built around.  These pieces about $0.50 each.

So, overall, I estimate that cost of each one of these electrodes is: $0.24 for the washer, about $0.36 for a meter of stranded wire (it's more flexible than solid wire), and $0.50 for a 3.5mm connector.  That's $1.10 in parts, which is a nice reduction compared to commercially available electrodes linked at the top of this post.

But do my homemade electrodes work?

Homemade Electrodes for ECG

As discussed in my previous post, I always like to start my testing by doing ECG measurements.  Because the heart signals are so strong, it is an easy way to confirm that your EEG system (and EEG electrodes) are working to some degree.  So, I got out my tube of Ten20 conductive paste and stuck my electrode to my wrist.  I attached one electrode to my left wrist and the other electrode to my right wrist.

Attaching my homemade electrodes to my wrists to measure my ECG.
The shiny stuff on my skin is Ten20 conductive paste

 How well did they stick?  Well, not nearly as well as the self-adhesive disposable ECG electrodes.  But, the surface area on those sticky ECG electrodes is HUGE, so of course my little electrodes won't stick as well.  Given how small my electrodes were, though, I think that they adhered adequately well.  I think that the big hole in the middle of the washer is not helpful.  If it were solid, I think that these electrodes would stick better.  I'll remember that when I go to make my next set of homemade electrodes.

Once I got the electrodes attached to my wrists, I connected plugged them into my OpenBCI board and had the Arduino pipe the data to my computer, as usual.  Example ECG data from these electrodes is shown below.  I'm showing 6 heart beats.  As you can see, the sharp R-waves and the broad T-waves are both very clear.  The amplitude of the ECG is similar to what I showed in my post yesterday when I used real ECG electrodes.  So, while my signal trace does look a bit noisier than yesterday, I'd say that this is a successful test!

My ECG As Recorded through OpenBCI Using my Homemade Electrodes

Homemade Electrodes for EEG

Since I was successful with the ECG, I made the next step and used my homemade electrodes to acquire some EEG signals.  I am still pretty fixated on my Mu waves, so I decided to use my electrodes to see if I could pick up my Mu waves.

Following a simplified version of my previous procedure, I put one electrode near the top of my head near Cz and one the left side of my head near C3.  As you can see in the photo, it is very tricky to accurately place electrodes on one's own head.  In retrospect, it looks like the one on the top of my head was a bit too far forward for Cz and the one on the side of my head was a bit too far back and a bit too low for C3.  Regardless, they should be good enough to record *something*, so let's see what I got.


Placing my homemade electrodes near
Cz (top of head) and near C3 (side of head).

Using my OpenBCI electronics, I started recording data from my brain.  I spent some time with my eyes closed to generate Alpha waves (Posterior Dominant Rhythm), I spent some time with my eyes open and my right arm and hand relaxed (to hopefully generate Mu waves), and I spent some time with my eyes open and my right hand clenching and un-clenching.  The results are plotted below as a spectrogram.  Unfortunately, it is not very clear where the boundaries were between these different activities, so it is not clear what we *should* be seeing.  We do clearly see the Alpha waves caused by my eyes being closed.  In the middle of the plot, we might also see some Mu waves, but they are very weak.  I would say that these results are fine for Alpha and bad for Mu.


To try to get better results, I moved the homemade electrode that was on the side of my head.  I moved it a little higher to be closer to where C3 is supposed to be.  Then, I repeated my recordings.  This time, I pressed a button on my computer to mark the boundary between each activities to make my post-test analysis easier.  It turns out that the simple act of pressing the button caused my EEG wires to jiggle, which shows up as artifacts within the data.  It makes it clear when I shifted my activity.  See the results below.


As before, the Alpha waves are quite clear.  This time, though, I do think that I see Mu waves during those periods when my eyes were open and my hand and arm were relaxed.  Then, when I moved my hand, I think that I see that the Mu waves go away.  That's exactly what should happen!  At the end, when I relax again, I think that it is interesting that it takes a while for my Mu waves to come back.  Clearly, I am not very good at relaxing.  That's not much of a surprise to me.  I can be quite excitable...especially when I'm EEG HACKING!

Homemade Electrodes Seem to be Good!

So, with this second test, I'm quite pleased with my homemade electrodes.  The signals that I recorded were pretty good.  There was a lot of 60 Hz noise (not shown in these graphs) but that could be due to me not using the traditional 3rd electrode connection (variously named the "bias" or "driven ground" or "driven right leg") for these recordings.  I also felt that these electrodes did not stick to my head as securely as the gold electrodes that I used previously.  I think that the stickiness can be improved by using a piece of metal with more surface area...maybe a regular flat washer instead of the skinny lock washer.  Still, for about a dollar per electrode, I think that the results are pretty darned good.  I'm pleased.

How about you...have you made your own electrodes before?  How did you do it?  Did they work?


Follow-Up: More graphs and discussion of the data is in this post
Follow-Up: Want to see my data from this experiment?  Check out my github!

Tuesday, October 22, 2013

Finding My Mu Waves

I'm trying to control things with my brain.  As discussed in my previous post, I think that Mu waves are the best approach that I know about right now.  I tried to get my Mu waves before, but failed.  Now I'm trying again.  This time, I've done a little more learning, so I think that I know how to do it better.  Let's go!

Listening to My Brain
Approach:  The idea with a Mu wave brain-computer interface (BCI) is that I'll use my EEG system to listen to my brain waves.  Mu waves are simple but strong signals in the Alpha band that appear in the sensorimotor (SM) cortex when you relax parts of your body.  The Mu waves go away when you move (or *think* about moving!) those parts of your body.  Supposedly, different regions of the SM cortex correspond to different portions of your body.  So, with careful use of EEG, I might be able to separate thoughts of moving my legs from thoughts of moving my arms.  Seeing other folks do this on the web, this is pretty exciting stuff.

Goal:  My goal today is not to make a full Mu wave BCI.  That's too big a leap.  Today, I just want to see if I can pick up my Mu waves.

Equipment: To do this test, I need some EEG electrodes and an EEG system:

  • For the EEG electrodes, I'm using re-usable gold-plated cup electrodes from Biopac (EL160, see pic below).  This style of electrode is often used in hospitals and in research settings.  I'm using this style of electrode because I can easily slip them within my hair and stick them to the skin.  To use the electrodes, you need some electrode paste, which is both conductive and sticky.  I used Ten20 paste, also available from Biopac.  Just swab some paste into the electrode cup and stick it firmly onto your scalp, with as little hair as possible between the skin and the electrode.

Re-Usable Gold-Plated Electrodes from Biopac
  • For the EEG system, I'm using the OpenBCI system that I'm helping to develop.  This is an open source EEG system that mates to a microcontroller, such as an Arduino.  I'm using an Arduino Uno, which is simply pumping the EEG data from the OpenBCI board to a PC.  On the PC, I'm running some software to capture the data from the serial port.  I can view the data in real time, but really, I'm going to do most of the processing afterwards.
Using OpenBCI as My EEG System

EEG Montage:  I think that a key challenge with measuring Mu waves is to get the electrodes in the right place.  They must be over the sensorimotor cortex or you're not going to see them.  How do you find the sensorimotor cortex?  Well, you have a good chance of getting it simply by drawing a line from the front of your ear (specifically, your tragion) up over the top of your head.  Really, though, you should follow the directions for finding EEG locations C3 or C4 according to the proper layout of the 10-20 system.  On my head, I put electrodes at C3 (left side), C4 (right size), Cz (top), and Oz (back).  I used Fz (front-top) as my reference electrode.  In the end, though I really only needed C3 and Oz along with the Fz reference.

Electrode Locations Used in My Testing
Another View Showing the Electrode Locations Used in My Testing

Test Plan:  So we need a test plan that will help me see Mu waves, which means that part of my test needs to have me be physically relaxed.  Then I need to make the Mu waves go away, which means that part of my test needs to have me move my body (I'll move my hand).  Actually, let's get fancy...I'm just going to *think* about moving my hand.  Finally, if I do see Mu waves, I need to make sure that I'm not just seeing alpha waves from the back of my head, so a third part of my test will be to close my eyes to induce my Posterior Dominant Rhythm, which are Alpha waves from the back of my head that expresses the idling of my visual cortex.  OK, I've got three parts of my test: relaxed, thinking about moving my hand, and relaxing but with my eyes closed.  I'm going to do this all while seated in a chair.

Data from the Oz, my Visual Cortex:  The data that I collected is messy.  This is true of most data that is ever collected from a living, breathing human being.  To help make sense of the data, I'm going to talk about the easier results first...and those are the results from the electrode at location Oz, on the back of my head.  The plot below is a spectrogram of the signal recorded at Oz.  Time is on the horizontal axis and signal frequency on the vertical axis.  A pixel's color indicates the intensity of the signal at that pixel's time and frequency.  The reason that I'm showing this plot first is because of the obviousness of the red horizontal lines that appear when my eyes are closed.  These red lines indicate strong sinusoidal signals around 9-10 Hz that are sustained when my eyes are closed.  Because it only occurs when my eyes are closed, this is certainly my Posterior Dominant Rhythm (PDR).  These are not Mu waves.  Therefore, moving forward, any signal that occurs at these times and these frequencies in my other electrodes will simply by this PDR being detected from afar.  Again, these are not Mu waves and can be ignored.

Horizontal Lines are my Posterior Dominant Rhythm
Data from the C3, my Sensorimotor Cortex:  Now that we know what to ignore, the plot below shows a spectrogram of the data from electrode C3, with is located over my SM cortex.  Probably the easiest thing to see (though it is generally messy all around) are weaker versions of the horizontal lines that appear when I close my eyes.  As discussed above, these are my PDR and should be ignored.  They are not Mu waves. What is more interesting in this plot are the faint horizontal lines a little higher in frequency (~12 Hz) that only seem to occur when I'm relaxed.  Note that, when I think about moving my hand, they go away.  These must be Mu waves!  I found them!

Some Mu Waves Are Occasionally Seen Around 12 Hz When Relaxed.

Plan for Live Feedback:  OK, so with this one test, I've shown that I can detect my Mu waves when I'm relaxed and that I can make them go away when I think about moving a body part.  That's pretty exciting. The signals are really weak, though.  It's hard to see them and it'll be hard to get the computer to detect them reliably.  Apparently, I'm not good at getting sufficiently relaxed.  My next step, therefore, is to generate some sort of live feedback based on the strength of my Mu waves.  I to do this, I will modify my PC software to process the data and make a dinging sound or something in proportion to the strength of the signal at 12 Hz.  This live feedback will tell my I'm doing the right thing.   As a result, I should be able to train myself to do a better job making Mu waves.

Plan for BCI:  Once I get better at making Mu waves, it will be easier for the computer to differentiate between my relaxed state (strong Mu waves) and my "thinking about my hand" state (no Mu waves).  Once the computer can differentiate between these two states, I will have my magical brain-controlled interface.  Moreover, since the brain is sided (left side vs right side), the computer should be able to tell the difference between thinking about the left hand versus thinking about the right hand.  With two controls (left and right) we can start doing more complex activities...like moving robot arms back and forth...or like changing the television channel up and down...or like driving a rover forward and back.

Yeah, this is gonna be cool...

Follow-Up: I recorded more Mu waves using some homemade electrodes
Follow-Up: I can now view my Mu waves using a real-time spectrogram in my Processing GUI

Tuesday, October 15, 2013

Mu Rhythms for BCI

As discussed previously, there are several approaches that are currently being pursued for Brain Computer Interfaces (BCI).  One approach is to perform an EEG and to measure the "Mu Waves" or "Mu Rhythms" from the sensorimotor portion of one's brain.  The Mu Waves are associated with you moving your body -- either by actually moving your body, or by you *thinking* about moving your body.  Sounds like a great way to command a computer, eh?  Let's dig in a little more...

What Are Mu Waves?  The first paragraph on Mu waves in Wikipedia seems decent enough.  As it says, Mu Waves are a type of oscillating electrical rhythm within the brain that can be seen in an EEG.  Specifically, they occur in the sensorimotor cortex, which is the portion of the brain associated with coordinating muscle motion and the perception of ones muscle and joint motion.  Looking at the image below, the sesnorimotor cortex as the areas labeled "Primary Motor Cortex" and "Primary Somatosensory Cortex".   It is relatively narrow strip going from one ear, up over the top of the head, to the other ear.  This is where Mu Waves seem to occur.

Illustration of Sections of the Brain (via UIC)

When Do they Appear?  It is my understanding that Mu Waves appear naturally when your body is physically relaxed.  The appearance of the Mu Waves are an indication that the sensorimotor portion of your brain is "idling".  When you move a major body part, those portions of your brain stop "idling", they get down to real work, and the Mu Waves go away (are "suppressed") during the motor activity.  Amazingly, this portion of your brain exhibits the same Mu Wave suppression simply by imagining the motion of a body part.  Even better, the specific portion of your cortex where the Mu Waves are suppressed is linked to the body part that you're imagining moving.  Now that's cool!

From BCI2000.  The different regions of the sensorimotor cortex, *roughly* correspond to different body parts.  Feet and legs are near the top of the head.  Hands are near the middle.  Face and tongue are near the bottom of the cortex, which on your scalp is located just above your ears.
Difference From Similar Rhythms:  The Mu rhythm occurs in the frequency range commonly referred to as Alpha waves (8-12 Hz).  There are several sources of activity in the Alpha range.  The most common trigger for Alpha waves is simply to close your eyes.  In most people, closing your eyes idles the visual cortex (the whole back portion of your brain...the "occipital" region), which causes Alpha waves to appear throughout the rear portion of the brain.  This called the Posterior Dominant Rhythm.  The Mu Waves, by contrast, are associated with the sensorimotor portion of your brain, so they should only appear in the signals from the electrodes over that part of the brain.

How Can We Measure Our Mu Waves?  Theoretically, if you hook up an EEG sensor system to your scalp, and if you put some electrodes exactly over the sensorimotor portion of your brain, you should be able to see Mu Waves when you relax your body.  I have yet to be successful with this, though I will try again.  In preparation, I have been reading the tutorial from BCI2000 to get a better idea of where to put my electrodes and which electrodes to use for reference and bias.

Mu Waves in EEG Traces:  Below is a cool video that shows what Mu Waves look like in raw EEG traces. Being localized to just the sensorimotor cortex, they appear most strongly in the F4-C4 trace.  This link also shows Mu waves in a raw EEG trace...in this montage, they're seen most strongly in the F3-C3 trace.  In my own trials, I have not specifically plotted these two combinations of electrodes.  I will.


What Could We Do with Mu Waves?  In the EEG traces above, it appears that the presence or absence of Mu Waves is pretty easy to see...we can probably get a computer to detect their presence pretty easily.  Once the computer sees that they're present, we can imagine moving our body, which should make them go away.  The computer can see that they went away and can take some action (like moving a robotic limb). It would only be a simple on/off control, but it still would be cool!

Using Mu Wave for Fine Control of a BCI:  Mu waves are compelling for BCI, though, because we don't have to be satisfied with simple on-off control.  Take, for example, the fact that our bodies and brains are sided -- the left side of your brain controls the right side of your body, and vice versa.  So, if by imagining motion with the left side of your body, the Mu waves should only be suppressed on the *right* side of your brain.  The converse is true as well -- imagining motion on the right side of your body should suppress the Mu waves on the left side of your brain.  As a result, you should be able to use a Mu wave reading BCI to control a robot to move in two ways...say, left or right.  Now it's getting useful!

Using Different Body Parts:  But we're not done.  Mu waves are quite local.  If you imagine moving just your feet, the Mu waves are only suppressed in a small portion of your sensorimotor cortex that, for the feet, is near the top of your head.  Imagining moving your hands suppresses the Mu waves in a different part of the cortex (down closer to the ears).  So, with more electrodes -- electrodes that are carefully placed over the different regions of the sensorimotor cortex -- we should be able to distinguish between thoughts of moving your hands versus moving your feet.   The movie below shows an example of a group who built a BCI that achieves this.  Fantastic.


The Future:  In theory, more electrodes on the scalp could maybe yield an even finer distinction between body parts, though I've only seen BCIs that do hands versus feet.  Maybe now is the time for a break-through!

Follow Up:  Check out my Mu waves!

Sunday, October 13, 2013

Brain Control Interfaces - Different Approaches

An important question to be able to answer is "Why do you spend all this time hacking with EEG?".  For me, there are a number of answers.  My first answer, though, is that I'm really interested in brain-computer interfaces (BCIs).  I want to be able to control things with my brain.  Why?  Because, when successful, it's like magic.  It's like THE FORCE from Star Wars.  It's the kind of thing that, when demonstrated in real life, gets a heart-felt "Whoa!" from unsuspecting on-lookers.   It's cool.


There are a number of different methods of implementing a brain computer interface.  The first major division in approaches is whether the BCI is invasive or non-invasive.  In this context, "invasive" means that a surgeon cuts open you head, saws open your skull, and implants electrodes directly in your brain.  If you're a quadriplegic, you might be willing to have this done in order to get your best chance at a BCI that works well.


For the rest of us, though, we might be more interested in a non-invasive BCIs that sense your brain waves by electrodes on the scalp.

How do BCIs listen to the signals from your brain (via your scalp) and do something useful?  To my understanding there are three approaches: Frequency Analysis, Mu Wave Detection, and Event-Related Potentials.

Frequency Analysis

The simplest approach is simply to look at the frequency content of the EEG signals recorded from the scalp.  Since nearly everyone produces alpha waves when they close their eyes, a straight-forward example of a frequency-based BCI would be to program the computer to move a motor in proportion to the alpha waves measured in the EEG signals.  I've done it.  It's fun!  More complex control schemes can be developed by looking at more frequency bands (theta, alpha, beta, etc) and by looking at different or multiple locations on the scalp.  With this added range of variables, you can do more complex things.  The video below shows an example of this kind of setup.


The hard part is that most people cannot easily control the frequency content of the signals in their head.  Usually, you're asked to control wishy-washy aspects of your mental/emotional state such as "alertness", "relaxation", "focus", etc.  How do you do that?  Well, it requires much practice and, to date, has yielded unreliable results for most people.  But, it is easy to implement on the computer, so it's a good starting place for people hacking their own BCI system.

Mu Waves (Mu Rhythms)

A special case of the "Frequency Analysis" methods is a method based on looking for "Mu Waves".  Mu waves are special because they occur in the motor cortex (or, more precisely, in the combined sensorimotor cortex).  If you can get your scalp electrodes in the right place, you will see Mu waves whenever your body is physically relaxed.  When you contract the muscles in a relevant body part (or, even if you just visualize yourself contracting the body part), the Mu waves in that part of your brain get suppressed.  So, the EEG setup is a little harder, but one's ability to actually control these brain waves is much better.

To get more information on how to do a Mu wave BCI, the BCI2000 folks have some great information
http://www.bci2000.org/wiki/index.php/User_Tutorial:Mu_Rhythm_BCI_Tutorial

For another example, check out the video below.  They built a BCI for playing World of Warcraft.  If you skip to 0:46, you see how they put together the system and how, through the subject moving his feet and hands, they trained the computer to understand his brain waves.  This use of physical motions is almost certainly training the system to look for the subject's Mu waves.  Furthermore, note that the only electrodes that are wired-up on his EEG cap are the ones over his motor cortex.   It's gotta be a mu-wave system.


Follow Up: Here's more discussion of using Mu waves for my BCI.

Event-Related Potential (ERP)

A third way to do a BCI is to measure event-related potentials (ERPs).  ERPs are EEG measurements in response to a particular sensory stimulus, which then causes a particular response in the brain.  Often visual stimuli are used via a computer screen.  This is useful for BCI because, if the user is consciously paying attention to the visual stimuli, his brain gives one type of response (that is detectable via EEG), while if he ignores the stimuli, it gives a different response.  This means that the human subject can consciously interact with the computer simply through selectively focusing (or not) on the visual stimuli.

The video below presents a typical setup.  Here, the computer presents a grid of letters on the screen.  The human subject wants to spell a word, so he focuses his attention on a letter on the screen...the letter "S", for example.  The computer then randomly highlights the letters on the computer screen.  Whenever the letter "S" is highlighted, the human recognizes that his letter was highlighted and his cognitive response causes a quick and temporary change in his EEG signals (the "P300" feature appears).   Unfortunately, the P300 is a very subtle change, so the whole process has to be repeated many times so that the recordings can be averaged together to make the P300 detectable.  If the computer has to flash through the whole keyboard, you can imagine how slow this is.  The video below illustrates the slowness...he gets about one letter every 40 seconds.


Still, even though it is slow, ERP interfaces allow for a very rich interaction with the computer that can be more complex than the simple "left", "right", "forward" commands seen in the World of Warcraft video above.  Plus, the system used in the video is not the be-all and end-all in ERP interfaces.  This is a very new field and many advances are possible.

If you want to learn more about (or try!) a P300 ERP system, the BCI2000 folks also have some tutorials:
http://www.bci2000.org/wiki/index.php/User_Tutorial:P300_BCI_Tutorial