FFT on EEG signal in Android understands code

I am trying to find a library that will allow FFT (fast Fourier transform) to be performed on some EEG signals in Android.

using Geobits, I finally found some code that could help me make FFT on an EEG signal. But it's hard for me to understand how the code works. I want to know what the float array x and y are and maybe an example that can help me a little more.

+6
source share
1 answer

Fft should return a series of complex numbers (can be either rectangular or polar: phase and magnitude) for a certain frequency range ...

I'm still working on expressions, but I'm betting on donuts that the arrays x and y are the real (x) and imaginary (y) components of the complex numbers that are the result of the conversion.

The absolute value of the sum of the squares of these two components should be the value of the harmonic component at each frequency (conversion to polar).

If the phase is important for your application, keep in mind that the FFT (like any phasor) can be attached to a sine or cosine. However, I believe that sine is the standard.

cm

http://www.mathworks.com/help/matlab/ref/fft.html

http://mathworld.wolfram.com/FastFourierTransform.html

Since the FFT gives a truncated approximation to an infinite series created by harmonic decomposition of a periodic signal, any periodic signal can be used to test the functionality of your code.

For example, a square wave should be easily replicated and have very well-known harmonic coefficients. The resolution of the dataset will determine the number of harmonics that you can calculate (most fft algorithms are best for a dataset whose length is equal to the power of two and is a series of integral wavelengths of the longest frequency that you want to use).

The square wave coefficients should be odd multiples of the fundamental frequency and have values ​​that vary inversely with the order of the harmonic.

http://en.wikipedia.org/wiki/Square_wave

+3
source

Source: https://habr.com/ru/post/928075/


All Articles