Is there any good documentation on step by step method to perform discrete wavelet transform on eeg data ? Not even eeglab has detailed explanation on extraction of frequency sub bands. Does anyone have a complete code of extracting such features ?
Martin Gerbert Frasch , I am new to the signal processing. Would you help me know how do I extract the frequency sub-bands (alpha, beta, gamma, delta and theta) along with their power ? I am confused with many terminologies and papers that I read. Please help me if you have more idea about it.
Hi! I can suggest the online lectures of Mike X Cohen. Also, I can suggest to look at Fieldtrip, they also have very detailed explanation of each step.
If you are lazy to read them all (I suggest you not to be), the main steps of the wavelet convolution are:
1. FFT of the raw data (1 channel)
2. in each frequency
a. FFT of the complex Morlet wavelet (at a specific frequency band)
b. the dot product of the FFT of the Morlet wavelet and the FFT of the channel's data
c. inverz fourier transform of the dot product
d. extract the power(the magnitude) from the complex time-series
You will have then your time-frequency results for each frequency. If you want, you can average them by frequency, so you can see the power-alteration of a specific band in time. If you just want to know the average power during the whole trial (or during the whole task), you can simply perform FFT as mentioned above.
There are also different type of analytical processes depending on your task design, I strongly encoure you to be familiar with them, so you can be sure, what you are interpreting.
András Puszta , I was looking for the frequency sub-bands decomposition process. Since EEG signals are non-stationary, their distribution would vary with time. Isn't DWT good for non-stationary signals rather than FFT ?
It depends how do you want your data to be interpreted. Neither is better or worse than the other. Surely the results from the DWT has a time dimension, which has advantage on the EEG. Anyway I think you misunderstood me: I described the steps of the Morlet wavelet convolution, which is also a kind of DWT. I reccomend to take a look at the other two website that I recommended above
András Puszta Yes, that is correct, but you always want to start with stationary conditions for your analysis and then, FFT is a fine place to start. Unless you are specifically looking at dynamic process like state transitions (sleep state transitions for example). A _whole band_ DWT will show you where your peaks are dynamically (temporally) and energy-wise distributed. You can dig in from there.
I checked into many signal processing toolbox tutorials and tried to applied one method. It was a tutorial on removing noise from ECG signals. I tried to do it the same way using FFT.
My problem is: After applying FFT and having obtained the clean signal, how do we separate the frequency sub-bands for alpha, beta, delta, theta and gamma ? Which function should we use to extract the individual frequency bands ? Please provide any suggestion.
Rasa Bhattarai EEGLAB in Matlab can do band-specific analysis of spectral power distribution via graphic interface (perhaps the easiest approach, if you have Matlab). You may also consider starting with something even simpler yet powerful: 95% spectral edge frequency.
Hi Rasa Bhattarai , if you are still looking for MATLAB with DWT or FFT for frequency bands of EEG signal, can provide it. I need to know the sampling rate of the EEG data you have, and which frequency band you are looking for?
Hello Hafeez Ullah Amin , I am looking for alpha, beta and delta frequency bands. The sampling rate is 500Hz. If you do have then please share with me ([email protected]) for both DWT and FFT method. Thank you
Hafeez Ullah Amin I also need the same. I need to extract power for different frequencies (theta, alpha, beta and gamma) with sampling rate 500Hz. I am new to this field, can you send me also ? Thanks.
Dear Hafeez Ullah Amin I am looking for alpha, beta, delta, and gama frequency bands. The sampling rate is 128 Hz. If you do have then please share with me ([email protected]) for both DWT and FFT method. Thank you
Dear Hafeez Ullah Amin I am looking for alpha, beta, delta, and gama frequency bands. The sampling rate is 128 Hz and 500 hz. If you do have then please share with me ([email protected]) for both DWT and FFT method. Thank you
Hello Hafeez Ullah Amin . I am a student aiming to complete Dissertation on EEG data and I have to use Discrete Wavelet Transform (DWT) for features extraction.
I have 4 signals of emotions, I want to extract them as files of images to be then directed towards AlexNet pretrained model for transfer learning.
I am looking for all frequency bands, sampling rate is 128 Hz.
Hafeez Ullah Amin I am a student and I want to apply DWT on EEG signal for feature extraction. My EEG signal is downsampled to 128 HZ, Can you please share the code with me too?
Dear Hafeez Ullah Amin I am looking for alpha, beta, delta, and gama frequency bands from EEG. The sampling rate is 500 hz. If you do have then please share the code with me ([email protected]) for DWT. Thank you in advance.
Dear Hafeez Ullah Amin I am looking for alpha, beta, delta, and gama frequency bands from EEG. The sampling rate is 500 hz. If you do have then please share the code with me ([email protected]) for DWT. Thank you in advance
The wavedec() function performs 1D multilevel Discrete Wavelet Transform decomposition of a given signal and returns an ordered list of coefficients arrays in the form:
[cA_n, cD_n, cD_n-1, ..., cD2, cD1]
where n denotes the level of decomposition. The first element (cA_n) of the result is the approximation coefficients array and the following elements (cD_n - cD_1) are detailed coefficients arrays.
Now coming to the point of different frequency bands
Discrete wavelet transform will always return only one approximation coefficient.
If starting frequency band of the neuroelectric waveform is 0-64 Hz then at level =1 we will get 0-32 Hz which gives approximation coefficients & another band is 32-64Hz which gives the detail coefficient of the wavelet.
At level = 2, the discrete wavelet transform will return 3 frequency bands:
I am a student working on a project with EEG signals. I need PSD and DWT features to be extracted. Can anyone share a code that can help? My email address is '[email protected]'. Thanks.
Mister Hafeez Ullah Amin could you help me, I am a student and I want to apply DWT on EEG signal for feature extraction. I use My EEG signal is downsampled to 128 HZ, Can you please share the code with me too?