0
$\begingroup$

My input numbers are close to 10, here is a sample of some:

9.259992,9.253408,9.322236,9.375503,9.406026,9.507771,9.509567,9.403034,9.397048,9.36054,9.265977,9.262985,9.216302,9.228272,9.338395,9.430565

I am using this PHP library thinkingmik/FastFourierTransformation

My peak numbers in response are about 500. A control which was done using another tool is 1-1.5

FFT is well over my head, so I am trying to read this library to get a bit of an idea, but can't figure this out. The interesting thing is the client says the chart seems to be correct, just numerical values are wrong.

$\endgroup$
  • 4
    $\begingroup$ Have you looked at the formula for the DFT? (The FFT is an algorithm that computes the DFT efficiently...so I would start with that and the answer should be very clear to you). And for your client just divide the answer by N where N is the length of the FFT and things should be as you expect. This is equivalent to averaging without doing the final divide. Same thing. $\endgroup$ – Dan Boschen Feb 7 at 14:49
4
$\begingroup$

As pointed out by Dan Boschen in a comment, these number aren't really surprising. Usually the DFT is defined as

$$X[k]=\sum_{n=0}^{N-1}x[n]e^{-j2\pi kn/N}\tag{1}$$

where $x[n]$ is the input sequence and $N$ is the DFT length. So bin zero, i.e., $X[0]$, is just the average value of your input sequence multiplied by the DFT length. The maximum value of $|X[k]|$ can be as large as the maximum value of $|x[n]|$ multiplied by the DFT length.

|improve this answer|||||
$\endgroup$
  • $\begingroup$ You are right, I guess Dan Boschen had the right answer, but he marked as a comment, so I could not mark it as accepted. I thank you both for the details and support. Thanks @danboschen and matt-l $\endgroup$ – TDawg Feb 7 at 19:38

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.