chatGPT는 아래와 같이 대답을 하는데 근거가 없어서 불안하고

The input float range for FFTW depends on the specific implementation and the configuration of the library. However, in general, the input float values should be within the range of -1.0 to 1.0, which represents the normalized range of the input signal.

 

stackoverflow는 과거 글이긴 한데.. 미묘..

Surprisingly there is no single agreed definition for the FFT and the IFFT, at least as far as scaling is concerned, but for most implementations (including FFTW) you need to scale by 1/N in the forward direction, and there is no scaling in the reverse direction.

Usually (for performance reasons) you will want to lump this scaling factor in with any other corrections, such as your A/D gain, window gain correction factor, etc, so that you just have one combined scale factor to apply to your FFT output bins. Alternatively if you are just generating, say, a power spectrum in dB then you can make the correction a single dB value that you subtract from your power spectrum bins.

[링크 : https://stackoverflow.com/questions/4855958/normalising-fft-data-fftw]

 

 

일단은 실험!

1. 원본 데이터 그대로

+-1V / 1.001Khz

-600,000 ~ +600,000 범위로 들어오는 값을 그대~~~로 FFT로 던지니 결과가 이상하게 나온다.

 

2. 원본 / 1000

범위를 벗어나진 않아서 그런가 정상적으로 그나마 주파수 분석이 되는 듯

3. 원본 / 100

/ 1000 이랑 비슷하긴 한데 비율 때문에 그런가 중심 주파수 주변에 좀 높게 나온다.

그냥 나누기 만큼의 억제효과가 나오는 듯?

 

4. 원본 / 838607 (0x7FFFFF 왜 이런 값을 했지.. 홀렸나..)

 

주파수 분석결과를 확대해보면 /1000 보단 깨끗하게 분석된다.

 

5. 원본 + 100mV

FFT 값에 2,147,483이 나와서 16진수로 바꾸어 보니 0x20C49B

무슨 의미를 지닌 분석이라고 보기 힘든데 그래도 1000 근처에 좀 비어있는거 보면 어떻게 해석해야 하나 싶다.

 

6. 원본 / 24bit(0xFFFFFF)

 

아 몰랑 걍 -1.0 ~ 1.0 사이로 정규화 할래!

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fftw 다차원 분석  (0) 2023.05.27
fft phase 연산  (0) 2023.04.07
fft 복소수(complex) - 실수, 허수부(real, imaginary)  (0) 2023.04.07
fft 0 Hz  (2) 2023.04.05
partial fft  (0) 2023.04.04
Posted by 구차니