-
Notifications
You must be signed in to change notification settings - Fork 159
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
formula for windowing algorithms #63
Comments
I don't have any reference documents; as it says on the README this is a
fork from an abandoned project.
The correction factors on the Siemens paper apply to the value after the
FFT, so the value is in Frequency domain. The windowing factors apply to
the signal before the FFT, so the value is in Time domain.
|
Mmh, if I remember well FFT(a f) = a FFT(f), so applying the correction before or after the transform should be the same, right? Or am I missing something? ... |
@jerabaul29 : your expression is correct if |
Mmh, agree I should have been clearer and write that: FFT(a * signal * windowing) = a * FFT(signal * windowing), I wrote in the way I did because it is the usual notation when working with proofs of linearity on vector spaces. But with a the constant scaling factor, it should be the same before or after applying the FFT I would think? ... Just to be clear: I am aware that the Hanning window looks like a 'bell', I am thinking of the factor 0.54 that seems to disagree with other sources I have found. |
On 14.01.21 22:18, JR wrote:
Mmh, agree I should have been clearer and write that:
FFT(a * signal * windowing) = a * FFT(signal * windowing),
I wrote in the way I did because it is the usual notation when working
with proofs of linearity on vector spaces.
But with a the constant scaling factor, it should be the same before or
after applying the FFT I would think? ...
Fourier transformation assumes an infinitely repetitive signal, with the
sample spanning an integral number of waves of the base (lowest)
considered frequency. Thus windowing must assure steady continuation
from the end of a sample to its start.
If sample end and start do not match exactly in all derivatives then the
transformation contains artefacts caused by the jumps from the sample
end to the start level. Choice of the most appropriate windowing
(smoothing) function allows to minimize these artefacts.
DoDi
|
Yes, I am aware of that. What we discuss here is the factor to use so that the windowing does not change the energy content. |
If someone else looks into this and finds this thread. I took a bit of time to double check this. I am pretty confident that these formula are not right: Lines 244 to 249 in bb99065
I take as a reference the reference numpy documentation, which I have much trust in: https://numpy.org/doc/stable/reference/generated/numpy.hanning.html https://numpy.org/doc/stable/reference/generated/numpy.hamming.html And a table from univ. Zurich for the "scaling coefficients": which are in agreement with the previous link. I am personally moving to kissfft, as it fits my needs better. |
Sorry, the Hamming should be good, but the Hann is probably wrong. It is right as pointed higher up that this is the same issue as #61. |
(but I still think that these windows are not compensated; which is fine, but may be worth having a line of comment about the need to compensate to keep either amplitude or energy constant :) ). |
I am confused about the formula used for the windowing algorithms. Do you have a reference document describing these?
For example:
arduinoFFT/src/arduinoFFT.cpp
Lines 305 to 307 in 566803e
does not seem to agree with the amplitude or energy correction factors here:
https://community.sw.siemens.com/s/article/window-correction-factors
Maybe I am just confused though.
The text was updated successfully, but these errors were encountered: