Discrete fourier transform of signal sampled from $\sin(x)$

fourier transform

I'm new to fourier transform but I somewhat know fourier series. Since the fourier series of $\sin(2\pi t)$ is just $\sin(2\pi t)$, I thought of playing with this function to better understand what fourier transform is doing.

As a start I sampled $5$ points from $f(t)=\sin(2\pi t)$:
$$x=[0,1,0,-1,0]$$
enter image description here

From wolfram it's fourier transform is
$$X=[0, 0.5 + 0.688191 i, -0.5 – 0.16246 i, -0.5 + 0.16246 i, 0.5 – 0.688191 i]$$

To my knowledge above numbers are the weights of the frequencies present in the original function.

  • The first number $0$ says the dc component($0$ frequency) is $0$.
  • Does the second number $ 0.5 + 0.688191 i$ represent the amplitude for $\sin(2\pi\cdot 1\cdot t)$?
  • Similarly does the third number $ −0.5−0.16246i$ represent the amplitude for $\sin(2\pi\cdot 2\cdot t)$?

They don't make sense at all because the original function has only one frequency. Any help what these numbers represent for my specific example problem?

Best Answer

The idea in your message is almost correct. You have nevertheless to remind that, given $N$ the expansion function making a discrete Fourier function are defined on $\{0,N-1\}$, can be extended to be $N$ periodic, and are given by:

$f_k(i)=e^{\frac{2\pi}{N}ik}$

So you see that $f_k(0)=f_k(N)$. So here comes the first point: you do not have to include the last point in the Woflram input. If you do that you obtain:

${DFT([0, 1, 0, -1])}={[0, i, 0, -i]} \ [1]$

which is already much nicer.

Why two frequencies? Well the functions on which you are expanding are complex! If you try:

${DFT([1, i, -1, -i])}={[0, 0, 0, 2]} \ [2]$

Tah dah. Can you see which $k$ I chose in the last example ? To understand better [1], remember that $f_1(i)+f_{-1}(i)$ is the sinus you have drawn (apart from constants)

Related Question