[EEG] data and bowel movements
aempirei at gmail.com
Tue Jun 23 03:52:05 PDT 2009
also i been using my brain to think about the overall EEG happenings and
came up with some words .i got some crap up in here and heres some info on
whats the haps with the eeg progress. ill go over what i been doin..
for all the homeys who dont like matlib, dont wanna pay for matlab or dont
wanna steal matlab, i been trollin da nets for some free data in not matlab
format. first of all, heres some free datasets for john q public.
you will notice there are mostly matlab ones, but there are also ones called
ASC. these are mostly plain text single or multi column time series float
values. these are useful. download them. also the descriptions are on the
page, read them.
to see whats up in this business, i graphed these datasets. not very useful
but gives you an idea what the hell is eeg data? the answer is this: wiggly
these are seizures:
these are ERP trials:
the graphs with two colors are frequency data, red is pre-task, green is
post-task, i did not normalize for 1/f noise
the other is the time series data for the entire approximately 2 seconds of
data. beyond that i cant discern shit from shinola here in these.
you will notice this stuff is in general disarray. yes, this my standard
modus operandi. get the shit done, wipe after.
C) TIMESERIES DATA IS SLOW, FREQUENCY DATA IS LOW
coming into this i did not realize how slow EEG data is. IT IS VERY SLOW.
we're talking sub 100HZ, and very often, sub 20HZ. hook your brain up to my
car stereo and you will hear the subs rattlin the trunk. this is not
friendly and unusual for many reasons, esp for those with normal signal
processing experience with sound and video (which is WAY FAST). up until
today i had thought that the soundcard in was a viable input, but realize
now that this is not because theres probably bandpass filters gettign rid of
noise below like 10-20hz. additionally, it just flat out takes a lot more
time to get a decent number of sample points since we're sampling at
ridiculously low speeds (of course we can sample at normal 'audio' speeds,
but since we're lookin at data below like 20hz, we effectively are only
getting like 20 samples per second and we're just averaging wide windows of
sample data (if were at like 44.1khz oor whatev), this means we need lots of
data if we are gonna use statistical correction and noise cancellation
methods which ill mention in a sec).
D) AMPS FOR THE CAP
from what ive gleaned, the electrodes and amps are effectively little
antennas picking up low frequency small signal fluctionations in EMF, this
means we need some expensive ass amps (relatively) for the hat, i noticed
we're using burr-brown instrumentational amps that do like 10000x gain. very
fancy. ive also looked at specs online for the general brain amps, ill go
over some hardware recomendations in a sec which can address various issues
E) NOISE, HARDWARE HACKS
it seems like the main badguy we have is noise. there are two primary ways
to reduce noise in so far as what ive come across. hardware methods,
software methods. the primary hardware methods that dont involve chopping
peoples heads open are clean power and moving the amps closer to the signal
(the brain). from what ive looked at, it seems that they use unit-gain op
amps to do this, just to make the wire happy essentially, so these amps are
that expensive compared to the high gains at the output-stage. also, the
designs of these are all pretty straightforward so i can offer up various
napkin schematics for this. also, if we're not using battery power now on
the eeg kits, i recommend just switching to battery power to get rid of the
complexities and issues of power supplies and transformers.
F) NOISE, SOFTWARE HACKS
i was talkin to my homeboy about the noise problems from the software side,
he pointed me into the direction of control theory and it seems like theres
much progress in using kalman filters to reduce noise in image and sound
signals, and with much success. let me point you to this project :
i think directly applying this method to reduction of noise is one of the
quickest and easiest ways to clean up the miserably noisy data from the
openeeg kits. theres only so much thaty ou can do with bandpass filters and
smoothing functionds, and recursive prediction and statistical modeling of
the noise is the best way to really handle this. furthermore this particular
homeboy is relatively adept at machine learning and control systems, and
therefore i will convince him to help with machine learning methods when we
make it to the ERP phase of our eeg project. right now i think theres been a
lot of work done in ai research and control theory fields that basically
adress all our needs for ERP, specifically, using cepstral analysis ideas,
kalman filters, neural networks and markov-based grammar models have been
very successful in the commercial and .mil space.
G) MORE ELECTRODES
since the signals are way lower than i expected in frequency, we can
actually try to timeshare the primary high gain amps across a number of
electrodes to cover more surface area. we're probably sampling at 100-1000
times faster than the wave frequencies we're trying to catch, so we can
easily timeshare the amps by cycling through a series of electrodes. this
takes minimal design. ive gone over the design of the openeeg and that atmel
thats on it is basically doing nothing compared to what it could be doing. i
think they just chose it cause the ease of use. designing our own amp isnt
really a stretch of imagination or a waste of time when/if we decide to use
the funny cap or want to go to active electrodes.
H) CRAPPY CODE
heres some crappy code i used. none of the tools are that useful but if
youre not that experienced with signals or graphing of crap in the unix
commandline, heres barebones stuff that youcan get a sense of how to do it.
http://www.twentygoto10.com/eeg/shitlab.c - loads up MATLAB datafiles from
linux in C and maybe you can convert datasets, it uses libmatio (which sucks
and no example code, so heres an example code)
http://www.twentygoto10.com/eeg/cg-analysis/quickfft.c - convert time series
data to frequency series data using the crappy DCT-II method of real to real
http://www.twentygoto10.com/eeg/120130/gnuplot.plot - heres the gnuplot
script i used to graph the crap (also theres a dct.plot with slightly
I) CATASTRPHIC CRASH COURSE IN SIGNAL PROCESSING AND AMPLIFIER DESIGN
if anyone is interested in learning the related useful informations in
signal processing and amplifier design relevant to the EEG project goings on
and more, then i'l be willing to put together soemthing for one of the up
coming eeg meetings.
J) CRASH COURSE IN NEUROSCIENCE
anyone got one to share?
EEG devices are two steps away from wearing tinfoil hats.
if you wanna chat about this or about shoes and clothes, hit me on the IRC
or "AMBIENT EMPIRE" on AIM.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the EEG