# EEG wave signal processing help...!

Discussion in 'Programmer's Corner' started by @m@, Jun 26, 2011.

1. ### @m@ Thread Starter Member

Mar 9, 2009
15
0
hello...!
I am student and beginner for MATLAB... What I have to do is to process my EEG wave using MATLAB ... Actually I am acquiring EEG waves ( mu rhythms) through my analog + digital circuitry and I have to see the changes when the movement (right or left hand ) is performed by the subject and as we know that normally the amplitudes changes cant be notice easily because these changes are too small so we have to process it....
Please..! any suggestions , hints and ideas that from where i should take start and what is the basic step for processing mu rhythms ...
Thank u ...

2. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
Hmm. First, you begin by asking yourself what is in the wave that you want to study.

3. ### TBayBoy Member

May 25, 2011
148
19
Are you positive it is EEG, and not EMG you want to measure?

4. ### @m@ Thread Starter Member

Mar 9, 2009
15
0
Yes ,, sure it is EEG , I have to study Mu rhythms amplitudes and frequencies, that with which manner it is changing if a subject is moving (or intention to move) his thumb,elbow or shoulder...
Is drawing power spectral estimation is a good way for my purpose..
Or taking FFT of my signal which is in txt format....? plz guide

5. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
I did a MSc on EEG.
You have to decide what you are looking for.
Amplitude?
Frequency?
Phase?
Frequency content?
Pattern recognition?

6. ### @m@ Thread Starter Member

Mar 9, 2009
15
0
I want to see changes both in frequency and amplitudes because its first time that I am working on EEG , I have no Idea that if subject moves his hand then what will be the most strongest either frequency content or amplitude of the signa.. If frequency change will be more stronger then i will go for that and if amplitude changes will be more strongest the i will continue with the amplitude changes... thankz

7. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
What is the difference between a power spectrum and FFT?

If the signal is available in TXT format can you post two samples - one with no movement and one with movement.

8. ### @m@ Thread Starter Member

Mar 9, 2009
15
0
I am also confused between PSD and FFT but so far , I studied I concluded that the Fourier transform of a signal may not exist, for instance, a stochastic (i.e. random) process doesn't have a Fourier transform.Therefore, the PSD will exist even if you can't compute the Fourier transform of the signal itself. But still I can't get adequate answer that what I should Use ...
Here are my txt file in which 2 times reading is taken first when a subject is relaxed and 2nd when a subject is intending or imaging to move his thumb..
thank u....

File size:
8 KB
Views:
16
9. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
OK. First a clarification.

The FFT produces the complex frequency spectrum, that is, it contains both frequency and phase information.

The power spectrum shows the square of the amplitude spectrum, that is, no complex info and all positive numbers.

I still need to know your sampling frequency.

The data you posted shows numbers 138 +- 2 counts. You do not have enough signal amplitude to get any meaningful results.

10. ### @m@ Thread Starter Member

Mar 9, 2009
15
0
my sampling frequency is 739 KHz ,,, Okay within 1 day i will post more of my signals with different movements... Thats why I am confused that how will I extract Info from my signal because its not varying too much

11. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
How are you digitizing the signal? How many bits does your A/D have?
You need to amplify your signal to take advantage of the full range of the A/D.

12. ### @m@ Thread Starter Member

Mar 9, 2009
15
0
I am using 8 bit ADC0804 ,, And Also Used amplifier in my analog circuit I used variable amplifier ..
And after ADC0804 I used controller for serial communication..

13. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
Are you using electrodes to the scalp? How are ALL of the electrodes configured and connected to your amplifiers? Are you able to post a circuit diagram of the amplifier?

14. ### @m@ Thread Starter Member

Mar 9, 2009
15
0
Yes I am using scalp electrode , total 4 electrodes placing on scalp according to 10-20 system .. C3 , C4 , DRL and ground C3 and C4 gives input to the AD620 pin2 and pin3 and the remaining DRL electrode to DrL circuit and ground electrode to the ground of the circuit.. I am posting circuit which have lowpass + Variable Amplifier .. Thanks..

File size:
28 KB
Views:
36
15. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
Can you provide some background on this circuit? Did you design and build this or did someone else?

What is the frequency response of this circuit?

What are you using to power this circuit?

For EEG you will need an instrumentation differential amplifier circuit which will consist of two opamps feeding a difference amp. You need very high CMRR.

16. ### @m@ Thread Starter Member

Mar 9, 2009
15
0
Yes sure I design this circuit, it's 2nd order butterworth lowpass filter of Fc=25Hz and the output of the filter is connected to the pin 3 of variable amplifiers having variable pot of 100 k for variable gain .. As i said in my previous post for high CMRR I used AD620 Instrumentation Amplifier...