Archis's Blog

January 9, 2012

BCI Updates

Filed under: Uncategorized — Tags: , , , , — archisgore @ 6:23 am

After having found my blog, a helpful person from Pocket Neurobics (the ones who make the Pendant EEG which I’m using), contacted me and mailed me some C code snippets to read data directly. That was mighty helpful.

I was stuck trying to build my other wine-heater thingy in the meantime, and the job and house move was keeping me busy. Beginning next week, I’ll get back to working on the promised library to read data and allow any apps to process it. My particular interest is in plugging it into sci-lab if I can, so people can have a free signal-processing environment to process PendantEEG data and experiment with it.

That’s all for now, folks! 

April 12, 2011

BCI 2

Filed under: Brain-Computer Interface — Tags: , , , — archisgore @ 9:20 am

A continuation to the original BCI post with very minor updates. The first time, they didn’t ship my electrodes, and in the meantime, I’m in India till 4/20, so have no way of performing any tests until I get back. However, I did get a chance to think of the experimental setup and what my initial sanity tests will be. I won’t be starting a dual-feedback loop for another few months due to the potential dangers involved.

The very first thing when I plug it into a human will be to simply look for correlation of motor activity with the spectrum. In order to prevent the subject from performing repeated actions, I’ll record the data along with markers for various motor activity. In order to synchronize the marker with the activity, I intend to have my program provide a visual cue of what the subject is intended to do now, and provide a 10-second window in which they must do it. Appropriate 3-second windows will be added regularly for eye-blinks (yes, they can’t blink an eye unless I tell them to.) The eye-blinks is tricky because I’m not sure right now what kind of artifacts I am going to find in the signal. Separate out 20% marker data as my “test” data.

The next step is to go over these recordings at high-frequency or high-time resolutions (sort of like wavelets but not quite – still multiple FFTs and Sin/Cos being my constituent functions.) Maybe train a classifier to test for identification of markers and use the test-data to protect against memorization. I love linear classifiers unless the data justifies it.

The purpose here is to:

1. Test my software and know that data pipeline is functional and properly written and I have enough disk space for the recordings.

2. Test the device itself and experimentally verify its claimed accuracy/sensitivity.

3. Warm up to all those things I might have forgotten in 3 years.

To reiterate before concluding – for the near future, my interest is in labelling Motor Activity, not Motor Imagery.

April 1, 2011

Making a Brain-Computer Interface

After five years of consistently blogging, and consistently failing to do something about it, the BCI-building has begun. The academician in me needed an outlet and I’ve been craving for something hardcore technical for a while now. So begins the first formal attempt at building a cheap home-made BCI. I’m going to label all entries so that it will be easy to follow progress on this.

Unlike my regular posts which are composed with at least some thought, this series of entries will be more like a journal. I’ll post entries with what I do, what methods I follow, everything I try. With any luck, there should be enough detail that anyone could replicate what I am doing with full fidelity. The attempt at any original research is not even a long-term goal. The goal here is to, and I say this as directly as possible, with no misconceptions whatsoever, and no subtext, “to have fun.”

If you have any interesting theories, experiments, I would love to hear your thoughts. If you’d like to participate, you’re welcome to join. Most followups will be brain-dumps of my thoughts – unedited, raw, and naive. A side-effect of this blog is to also demonstrate any points of failure, or stuff that doesn’t work. At this point, I have nothing working. I don’t want to claim that I knew everything, in case I succeed.  I won’t use the excuse that I never wanted to succeed in case I fail. I want to make this work, and even if it doesn’t, it won’t change the fact that I still wanted it to work. If I make a mistake it’s going to be published, since I will try and publish what I intend to do before I do it as a validation.

At the moment, I picked the PocketEEG from PocketNeurobics (apparently an Australian company) to get started. I’ve been out of this world for a while (four years), and it takes a long time to catch up on the IEEE Journal of Biomedical Engineering where most BCI work is (used to be?) published. The WaveRider system is a clinical device but it costs too much for me at the moment, but if this device fails, I’ll save up for the WaveRider and go with it. It’s a two-channel device.

I haven’t got the electrodes yet, so haven’t taken any readings, but plenty of work has to happen before the electrodes become relevant. The recommended software to be used with it is BioExplorer which I think costs too much. I instead tried to connect the open-source BioEra software. The UI takes me back to the good old colleges days before the polished world of  iPhones and iPads. It has a way to define the processing pipeline but I rather hate doing it graphically. The dongle does provide a fake serial port on your PC that you can read from, but I didn’t want to go through that much trouble. I intend to use BioEra to capture the signal and send it across a local TCP channel into a server I’ll write that does what I want it to. BioEra seems to support plugins, but I love the flexibility of having my own executable as opposed to being “hosted in” another exe.

This pipeline investigation should take until the weekend, and hopefully I’ll have it coded over the weekend. If I’m lucky, and the electrodes to arrive, I’ll be sure to post some recordings of motor activity of right and left hands, captured from the C3 and C4 points at the beta band.

The reason I don’t want to use the provided FFT block is because I much rather enjoy playing with parameters initially. Do I want it sliding window at every point or will I perform it on intervals? If I intend to do something like auto-regression, I’d much rather use my own buffers and optimize the pipeline to operate on. I’ll post what happens.

March 17, 2009

Want to be part of (another) crazy backyard science attempt?

Filed under: Uncategorized — Tags: , — archisgore @ 11:20 pm

The moment of truth has come. Four years ago, I competed in the BCI contest, and did fairly well for an undergrad student hobbyist. Those who’ve known me more than three years would know my obsession with brain computer interfaces (heck, they showed it in the code4bill video too.)

With work pressures mounting, I didn’t get a lot of time to pursue this. Looks like my Ph.D. plans are put on hold for lack of a problem I find appealing. In the meantime, my backyard science has been severely limited to aging books and (vain) attempts at distilling perfume out of flowers.

The time has come to be more ambitious. I asked a week ago how one finds those “cool professions” they show in movies, and I found the answer – they create them. You know all those geeks on Mythbusters or Junkyard Wars? They just do it. It’s not impossible. It’s not difficult. It’s just a matter of waking up one Saturday morning and asking yourself, “Do you feel lucky?”

I’m resurrecting the BCI fanaticism and am looking for hobbyists to join in. We could set up our base of operations in Hyderabad or Pune, I don’t mind. There are already a couple of friends signed up on this. It’s going to take time, and it’s going to involve sleepless nights, but it’s going to have you wake up one day and feel like James T Kirk – to have boldly gone where not many have gone before! I spent years begging for access to EEG equipment from hospitals and asking colleges/universities for funding. Turns out, in India, actually spending money on academics isn’t the cool thing. Lately though, I realised I make enough money just so I can fuel such crazy initiatives. I’m the type who doesn’t really care about “investments” and buying houses, and I have no hopes of meeting a girl in the near future, so I can pretty much afford to buy one of the over-the-counter biofeedback devices. And here we go….

Here’s the plan (of course this will take upto an year to execute):
1. If you want to fund part of it, I’m certainly not philanthropic, so I wouldn’t mind some monetary contribution towards purchasing such a device.
2. We’ll spend a few months working from the group up, reading on published literature.
3. We’ll replicate some results on pre-recorded data.
4. We’ll try and get access to an EEG device at a hospital. This would be best since buying one doesn’t really serve much of a purpose once we’re done.
5. If all else fails, and we think we have a decent enough processing enging, we’ll go and buy the damn device and do it!
6. We’ll try and replicate the Wolpaw-McFarland experiment from 1992 to control the mouse curser based on the beta band through motor imagery.

Don’t have time to write much. These are just raw ambitious thoughts. :-) This may not work out, but I had to get this out of my system. If anyone’s interested, feel free to ping me, and we can see what comes out of this.

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.