Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linear FFT amplitude is incorrect #1203

Open
philippitts opened this issue Oct 23, 2023 · 1 comment
Open

Linear FFT amplitude is incorrect #1203

philippitts opened this issue Oct 23, 2023 · 1 comment

Comments

@philippitts
Copy link
Member

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

@bobthefairycat
Copy link

bobthefairycat commented Nov 12, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants