2
$\begingroup$

I'm doing a project with an EEG to detect driver drowsiness and learned about EEG frequency bands (alpha, beta, gamma...).

As the frequency bands are simple frequency ranges, I wonder if I can use several bandpass filters to get them (instead of using WPT / FFT)?

Is this approach correct? Is there any reason not to do it (performance)?

$\endgroup$
4
$\begingroup$

As the frequency bands are simple frequency ranges, I wonder if I can use several bandpass filters to get them (instead of using WPT / FFT)?

Sure! That's how it's usually done!

Is there any reason not to do it (performance)?

diabolical laugther as it happens, I've prepared just the blog post for you… TL;DR: If you don't have to process more than 20 Million EEG samples per second, your PC should do fine performance-wise.

Filtering Time-Series Data on the GNU Radio blog.

I came across an EEG problem that tried to do exactly that, filter things into multiple bands. And lo, I had 5 minutes of fun designing this bandpass filterbank for signals with $f_\text{sample}=220\,\text{Hz}$:

$$ \begin{align} \Delta:& [1,3]\text{ Hz}\\ \theta:& [4,7]\text{ Hz}\\ \alpha_1:& [8,9]\text{ Hz}\\ \alpha_2:& [10,12]\text{ Hz}\\ \beta_1:& [13,17]\text{ Hz}\\ \beta_2:& [18,30]\text{ Hz}\\ \gamma_1:& [31,40]\text{ Hz}\\ \gamma_2:& [41,50]\text{ Hz} \end{align} $$

in this GNU Radio Companion flow graph

Filterbank

The result was that, even in this totally naive filterbank implementation, things are so much faster than real-time that you can assume that if done a little more cleverly, it'd work on any halfway DSP-affine microcontroller in real-time.

$\endgroup$
  • 1
    $\begingroup$ Extremely rapid prototyping :) $\endgroup$ – A_A Feb 19 '17 at 22:14
  • $\begingroup$ yeah, my first prototype actually was a single filter, and then I just went ahead and modified the Python script that GNU Radio companion generates to have a loop, which took the passband edges from an array and instantiated a filter for each of those – but then I realized that for the DSP.SE question I mention above, a graphical representation of what's happening would be much nicer :) But I'm slower at clicking than at writing for loops, so it's only semy-rapid prototyping ;) $\endgroup$ – Marcus Müller Feb 19 '17 at 22:16
  • $\begingroup$ Thanks for your answer - nice blog post! I just asked this, as most papers I've read used WPT / FFT to perform a frequency analysis. What does TransitionWidth and Beta do?. $\endgroup$ – ppasler Feb 20 '17 at 7:59
  • $\begingroup$ The transition width is a property of a filter response. It's the distance in frequency between the edge of the pass- end the beginning of the stop-band. (I.e. the width of the part of spectrum that is neither nicely let through by the filter, nor fully suppressed) $\endgroup$ – Marcus Müller Feb 20 '17 at 8:15
  • $\begingroup$ Beta is just a design parameter for a specific type of filter and not relevant here $\endgroup$ – Marcus Müller Feb 20 '17 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.