OpenBCI_GUI icon indicating copy to clipboard operation
OpenBCI_GUI copied to clipboard

Linear FFT amplitude is incorrect

Open philippitts opened this issue 2 years ago • 1 comments

Problem

The linear FFT amplitude is calculated incorrectly in the FFT Plot widget.

Expected

image (5)

In the above example, the time series peak to peak value is measured at +/- 1500uV. The plot indicates a peak at 800uV, but the peak should be at 1500uV.

Operating System and Version

Windows 10

GUI Version

5.2.2

Are you running the downloaded app or from Processing/VSCode?

Downloaded app

Type of OpenBCI Board

Ganglion

philippitts avatar Oct 23 '23 21:10 philippitts

The DFT computed is likely using the exponential representation of the Fourier series, the coefficients on the negative values of frequency mirror those on the positive side, e.g.: https://www.thefouriertransform.com/series/cosineExample.php

You would expect the positive side to be half the actual amplitude, since the original signal is constructed as a sum including the component from the negative side.

bobthefairycat avatar Nov 12 '23 17:11 bobthefairycat