Y-Axis units on FFT graph

1.5k Views Asked by At

A 50Hz sinusoid wave with a voltage range of +/-20V is sampled at 512Hz for 1 second. No bias or phase shift are present. The signal is run through an FFT. The result is one spike at 50Hz on the frequency domain with power of $226.274$.

My question is, how do we get from an amplitude of +/-20V on the voltage-time graph to an amplitude of $226.274$ on the FFT graph. I know the formula $|F(w)|^2=(x^2+y^2)/N$ applies in this situation, but what are the variables? Please keep answers simple, any help is greatly appreciated!

1

There are 1 best solutions below

1
On

I'm not sure how you got that power (amplitude?) value. If I do the same in Matlab/Octave then I get exactly the expected amplitude of $NA/2=5120$, where $N=512$ is the FFT length and $A=20$ is the amplitude of the signal:

n=0:511;
x=20*sin(2*pi*50/512*n);
X=fft(x);
max(abs(X))

ans =  5120.0

Note that for a real-valued sinusoidal signal (with a frequency that lies exactly on the FFT grid), you always get two peaks, each with amplitude $NA/2$. This is a result of the following property of the DFT for real-valued signals:

$$X[k]=X^*[N-k]$$