Jump to content

User Reference:FFTFilter

From BCI2000 Wiki

Function

The FFTFilter applies a short-term Fast Fourier Transformation (FFT) to selected channels of its input signal, resulting in a time series of frequency spectra. The computed spectra may be displayed in visualization windows.

Typically, the FFTFilter is used for spectral estimation and demodulation, instead of the ARFilter.

Obtaining FFTW3

The FFTFilter requires the FFTW3 library which, for licensing reasons, you need to obtain separately from BCI2000.

The FFTFilter uses the FFTW3 library to do the actual FFT computation, which is released under the GNU public license (GPL). This makes it impossible for us to distribute the FFTW3 library along with BCI2000. Instead, please download the windows version of FFTW 3.01 from http://www.fftw.org/install/windows.html.

In order to make the FFTW library available to BCI2000, put FFTW3.DLL into your BCI2000 installation's prog directory. When using the command line version of the FFTFilter, put a copy of FFTW3.DLL into your BCI2000 installation's tools/cmdline directory.

For recent Windows builds of FFTW 3, the naming scheme has been changed. If you would like to use such a build with BCI2000, put a copy of the file libfftw3-3.dll into BCI2000/prog and rename it to FFTW3.DLL (untested so far).

Parameters

FFTOutputSignal

Depending on configuration, the FFT filter's output signal will be the computed spectrum, or the unchanged input. Possible values are

  • 0 for input connect-through--
    this option allows using the FFTFilter for visualization purposes.
  • 1 for power spectrum--
    as with the ARFilter, the output signal's elements will correspond to frequency bins.
  • 2 for complex amplitudes--
    the output will be complex fourier coefficients in halfcomplex format, with the spectrum's imaginary part appended to the real part.

FFTInputChannels

A list of input channels for which the FFT is computed. When FFTOutputSignal is set to other than 0, FFTInputChannels list entries determine the correspondence between input and output channels.

FFTWindowLength

The length of the input data window over which the FFT is computed, given as a time value in seconds, or the number of signal blocks as in the following examples:

1.34s
500ms
5

The FFT will be computed once per data block. If the length of the input data window exceeds that of a data block, FFT windows will overlap. If the data window is shorter than a data block, only the most recent samples will enter into the FFT.

FFTWindow

Selects the type of sidelobe suppression window. Possible values are

  • 1 for a Hamming window,
  • 2 for a Hann window,
  • 3 for a Blackman window.

VisualizeFFT

A nonzero value selects visualization of the FFT-computed power spectrum. Independently of the FFTOutputSignal parameter's value, it is always the power spectrum that is visualized.

States

None.

See also

ARFilter